Merge branch 'vue3'

This commit is contained in:
pikachu1995@126.com
2026-07-13 16:56:36 +08:00
34 changed files with 129 additions and 262 deletions

View File

@@ -67,14 +67,21 @@ One codebase supports:
Built with:
- Spring Boot
- Spring Cloud
- MySQL
- Redis
- RocketMQ
- Elasticsearch
- Docker
- ShardingSphere
Supports distributed deployment and high concurrency ecommerce scenarios.
Supports standalone deployment: **buyer-api** (8888), **manager-api** (8887, includes store APIs), **im-api** (8885). Product search uses MySQL. Async messaging uses Redis queues. Scheduled tasks use Spring `@Scheduled`.
### Frontend API paths
| App | Public API prefix |
| :--- | :--- |
| Buyer | `{buyerUrl}/buyer/common/*` |
| Seller | `{sellerUrl}/store/common/*` |
| Manager | `{managerUrl}/manager/common/*` |
The legacy `common-api` and `/common/common/*` paths are removed.
### Ecommerce Features
@@ -96,14 +103,11 @@ Supports distributed deployment and high concurrency ecommerce scenarios.
### Backend
- Java
- Spring Boot
- Spring Cloud
- Java 21
- Spring Boot 4
- MyBatis Plus
- MySQL
- Redis
- RocketMQ
- Elasticsearch
- JWT
- Docker

View File

@@ -103,10 +103,30 @@ LILISHOP 是基于 Spring Boot / Spring Cloud / Vue / Uniapp 开发的 Java 开
[**部署文档 -> 环境准备**](https://docs.pickmall.cn/deply/deply.html)
#### 数据库初始化
- **推荐方式**: 使用项目提供`docker-compose` 配置,可自动完成数据库(MySQL, Redis, Elasticsearch等的部署与初始化。
- **推荐方式**: 使用 [`docker`](https://gitee.com/beijing_hongye_huicheng/docker) 仓库中`docker-compose`,可自动完成 **MySQLRedis** 等中间件的部署与初始化。
- **手动方式**: 如果您选择手动部署SQL脚本位于以下地址。请确保获取与您代码版本一致的SQL文件。
[**数据库脚本 (Gitee)**](https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql)
#### 后端服务与端口(`vue3` 分支)
| 服务 | 端口 | 说明 |
| :--- | :--- | :--- |
| buyer-api | 8888 | 买家端 API |
| manager-api | 8887 | 平台 + 商家 API`/manager/**``/store/**` |
| im-api | 8885 | 客服 IM / WebSocket |
运行依赖:**MySQL + Redis**。商品搜索使用 MySQL异步消息使用 Redis 队列;定时任务使用 Spring `@Scheduled`(内嵌在 manager-api
#### 前端 API 路径约定
| 端 | 公共接口前缀 |
| :--- | :--- |
| 买家 PC/H5 | `{buyerUrl}/buyer/common/*` |
| 商家端 | `{sellerUrl}/store/common/*` |
| 平台端 | `{managerUrl}/manager/common/*` |
`common-api` 已下线,请勿再使用 `/common/common/*` 旧路径。
---
### 5. 架构文档边界
@@ -120,16 +140,11 @@ LILISHOP 是基于 Spring Boot / Spring Cloud / Vue / Uniapp 开发的 Java 开
- H5 / 小程序 / APP`lilishop-uniapp`
- 部署、SQL、镜像与启动脚本`docker`
All-In-One 仅用于本地体验、演示或验证,不代表生产高可用部署架构。生产部署应按实际访问量、稳定性、监控、备份和扩缩容要求拆分数据库、缓存、搜索、消息、任务调度、前端静态资源和后端服务。
### 6. 功能列表
[功能清单](https://bdwx2tfwwt.feishu.cn/sheets/FFQKscQKDhUx60to1k9cbMngnYb?from=from_copylink)
### 7. 开源与授权
1. **开源协议**: 本项目遵循 `AGPL-3.0` 开源协议。

View File

@@ -3,15 +3,9 @@ var BASE = {
* @description api请求基础路径
*/
API_DEV: {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
API_PROD: {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
};

View File

@@ -1,5 +1,5 @@
import request, {
Method, commonUrl
Method, buyerUrl
} from '@/plugins/request.js';
// 会员收货地址列表
@@ -55,7 +55,7 @@ export function getAddrDetail (id) {
// 传给后台citycode 获取城市街道等id
export function handleRegion (params) {
return request({
url: `${commonUrl}/common/common/region/region`,
url: `${buyerUrl}/buyer/common/region/region`,
needToken: true,
method: Method.GET,
params

View File

@@ -1,11 +1,11 @@
import request, {Method, commonUrl} from '@/plugins/request.js';
import request, {Method, buyerUrl} from '@/plugins/request.js';
/**
* 获取拼图验证
*/
export function getVerifyImg (verificationEnums) {
return request({
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
url: `${buyerUrl}/buyer/common/slider/${verificationEnums}`,
method: Method.GET,
needToken: false
});
@@ -15,7 +15,7 @@ export function getVerifyImg (verificationEnums) {
*/
export function postVerifyImg (params) {
return request({
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
url: `${buyerUrl}/buyer/common/slider/${params.verificationEnums}`,
method: Method.POST,
needToken: false,
params
@@ -26,7 +26,7 @@ export function postVerifyImg (params) {
*/
export function sendSms (params) {
return request({
url: `${commonUrl}/common/common/sms/${params.verificationEnums}/${params.mobile}`,
url: `${buyerUrl}/buyer/common/sms/${params.verificationEnums}/${params.mobile}`,
method: Method.GET,
needToken: false,
params
@@ -36,7 +36,7 @@ export function sendSms (params) {
// 地区数据,用于三级联动
export function getRegion (id) {
return request({
url: `${commonUrl}/common/common/region/item/${id}`,
url: `${buyerUrl}/buyer/common/region/item/${id}`,
needToken: true,
method: Method.GET,
loading: false
@@ -80,7 +80,7 @@ export function articleDetail (id) {
// 获取IM接口前缀
export function getIMDetail () {
return request({
url: `${commonUrl}/common/common/IM`,
url: `${buyerUrl}/buyer/common/IM`,
method: Method.GET
});
}
@@ -89,7 +89,7 @@ export function getIMDetail () {
//获取图片logo
export function getBaseSite(){
return request ({
url:`${commonUrl}/common/common/site`,
url:`${buyerUrl}/buyer/common/site`,
method: Method.GET,
needToken: false
})
@@ -98,7 +98,7 @@ export function getBaseSite(){
// 获取主题色配置
export function getThemeSetting() {
return request({
url: `${commonUrl}/common/common/site/theme`,
url: `${buyerUrl}/buyer/common/site/theme`,
method: Method.GET,
needToken: false,
});

View File

@@ -5,7 +5,7 @@ import request, {
// 商品列表
export function goodsList (params) {
return request({
url: '/buyer/goods/goods/es',
url: '/buyer/goods/goods/search',
method: Method.GET,
needToken: false,
optionalToken: true,
@@ -16,7 +16,7 @@ export function goodsList (params) {
// 商品分类 筛选条件 品牌, 尺寸等
export function filterList (params) {
return request({
url: '/buyer/goods/goods/es/related',
url: '/buyer/goods/goods/search/related',
method: Method.GET,
needToken: false,
optionalToken: true,

View File

@@ -1,5 +1,5 @@
import request, {Method, commonUrl} from '@/plugins/request.js';
import request, {Method, buyerUrl} from '@/plugins/request.js';
import storage from '@/plugins/storage.js';
/**
@@ -7,7 +7,7 @@ import storage from '@/plugins/storage.js';
*/
export function getVerifyImg (verificationEnums) {
return request({
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
url: `${buyerUrl}/buyer/common/slider/${verificationEnums}`,
method: Method.GET,
needToken: false,
headers: {uuid: storage.getItem('uuid')}
@@ -19,7 +19,7 @@ export function getVerifyImg (verificationEnums) {
*/
export function postVerifyImg (params) {
return request({
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
url: `${buyerUrl}/buyer/common/slider/${params.verificationEnums}`,
method: Method.POST,
needToken: false,
params,

View File

@@ -47,7 +47,7 @@
<script>
import { Message } from "@/utils/message";
import { editMemberInfo } from '@/api/account.js';
import { commonUrl } from '@/plugins/request.js';
import { buyerUrl } from '@/plugins/request.js';
import storage from '@/plugins/storage.js';
import { User } from '@element-plus/icons-vue';
export default {
@@ -59,7 +59,7 @@ export default {
nickName: [{required: true, message: '用户昵称不能为空'}, { max: 16, message: '用户昵称不能超过15个字符' }]
},
formItem: {}, // 表单数据
action: commonUrl + '/common/common/upload/file', // 上传接口
action: buyerUrl + '/buyer/common/upload/file', // 上传接口
accessToken: {} // 验证token
}
},

View File

@@ -79,7 +79,7 @@ import { Message, Notice } from "@/utils/message";
import { Camera, Delete, View } from '@element-plus/icons-vue';
import { orderDetail } from '@/api/order.js';
import { addEvaluation } from '@/api/member.js';
import { commonUrl } from '@/plugins/request.js';
import { buyerUrl } from '@/plugins/request.js';
import storage from '@/plugins/storage';
export default {
components: { Camera, Delete, View },
@@ -93,7 +93,7 @@ export default {
descriptionScore: 5
}, // 表单
visible: false, // 图片预览
action: commonUrl + '/common/common/upload/file', // 上传地址
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
accessToken: {}, // 验证token
previewImage: '', // 预览图片地址
loading: false, // 提交加载状态

View File

@@ -105,7 +105,7 @@
import { Message, Notice } from "@/utils/message";
import { Camera, Delete, View } from '@element-plus/icons-vue';
import { afterSaleReason, afterSaleInfo, applyAfterSale } from '@/api/member.js'
import { commonUrl } from '@/plugins/request.js';
import { buyerUrl } from '@/plugins/request.js';
import storage from '@/plugins/storage';
import * as RegExp from '@/plugins/RegExp'
export default {
@@ -132,7 +132,7 @@ export default {
num: 1
},
uploadList: [], // 上传列表
action: commonUrl + '/common/common/upload/file', // 上传地址
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
accessToken: {}, // 验证token
visible: false, // 图片预览
previewImage: '', // 预览图片url

View File

@@ -66,7 +66,7 @@ import { Message, Notice } from "@/utils/message";
import { Camera, Delete, View } from '@element-plus/icons-vue';
import { orderDetail } from '@/api/order.js';
import { afterSaleReason, handleComplain } from '@/api/member.js';
import { commonUrl } from '@/plugins/request.js';
import { buyerUrl } from '@/plugins/request.js';
import storage from '@/plugins/storage';
export default {
components: { Camera, Delete, View },
@@ -79,7 +79,7 @@ export default {
content: ''
}, // 表单
visible: false, // 图片预览
action: commonUrl + '/common/common/upload/file', // 上传地址
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
accessToken: {}, // 验证token
previewImage: '', // 图片地址
loading: false, // 加载状态

View File

@@ -197,7 +197,7 @@ import { applyFirst } from '@/api/shopentry';
import * as RegExp from '@/plugins/RegExp.js';
import multipleMap from "@/components/map/multiple-map";
import storage from '@/plugins/storage';
import { commonUrl } from '@/plugins/request.js';
import { buyerUrl } from '@/plugins/request.js';
const FIRST_APPLY_DRAFT_KEY = 'shopEntryFirstDraft';
export default {
@@ -211,7 +211,7 @@ export default {
},
data () {
return {
action: commonUrl + '/common/common/upload/file', // 上传地址
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
accessToken: {}, // 验证token
visible: false, // 预览图片
loading: false, // 加载状态

View File

@@ -99,7 +99,7 @@ import { applyThird } from '@/api/shopentry';
import { getCategory } from '@/api/goods';
import storage from '@/plugins/storage';
import { commonUrl } from '@/plugins/request.js';
import { buyerUrl } from '@/plugins/request.js';
import multipleMap from "@/components/map/multiple-map";
@@ -118,7 +118,7 @@ export default {
return {
loading: false, // 加载状态
uploadLoading: false, // 上传加载状态
action: commonUrl + '/common/common/upload/file', // 上传地址
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
accessToken: {}, // 验证token
previewPicture: '', // 预览图片

View File

@@ -13,18 +13,6 @@ export const buyerUrl =
process.env.NODE_ENV === "development"
? BASE.API_DEV.buyer
: BASE.API_PROD.buyer;
export const commonUrl =
process.env.NODE_ENV === "development"
? BASE.API_DEV.common
: BASE.API_PROD.common;
export const managerUrl =
process.env.NODE_ENV === "development"
? BASE.API_DEV.manager
: BASE.API_PROD.manager;
export const sellerUrl =
process.env.NODE_ENV === "development"
? BASE.API_DEV.seller
: BASE.API_PROD.seller;
let isRefreshToken = 0;
const refreshToken = getTokenDebounce();

View File

@@ -86,7 +86,7 @@ export async function fetchAndApplyTheme(requestFn) {
}
} catch (error) {
console.warn(
"[theme] 主题色加载失败,请确认 common-api(8890) 已启动且已执行 version4.9to4.10.sql",
"[theme] 主题色加载失败,请确认 buyer-api 已启动且站点主题配置可用",
error
);
}

View File

@@ -2,7 +2,7 @@ NODE_ENV=production
VUE_APP_PREVIEW=false
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket
VUE_APP_COMMON=https://common-api.pickmall.cn
VUE_APP_COMMON=https://buyer-api.pickmall.cn
VUE_APP_BUYER=https://buyer-api.pickmall.cn
VUE_APP_SELLER=https://store-api.pickmall.cn
VUE_APP_WEBSITE_NAME="LiLi IM"

View File

@@ -2,7 +2,7 @@ NODE_ENV=development
VUE_APP_PREVIEW=false
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket
VUE_APP_COMMON=https://common-api.pickmall.cn
VUE_APP_COMMON=https://buyer-api.pickmall.cn
VUE_APP_BUYER=https://buyer-api.pickmall.cn
VUE_APP_SELLER=https://store-api.pickmall.cn
VUE_APP_WEBSITE_NAME="LiLi IM"

View File

@@ -71,7 +71,7 @@ export const ServeSendTalkFile = (data) => {
// 发送聊天图片服务接口
export const ServeSendTalkImage = (data) => {
return upload("/common/common/upload/file", data);
return upload("/buyer/common/upload/file", data);
};
// 发送表情包服务接口

View File

@@ -3,15 +3,9 @@ var BASE = {
* @description api请求基础路径
*/
API_DEV: {
common: "http://127.0.0.1:8890",
buyer: "http://127.0.0.1:8888",
seller: "http://127.0.0.1:8889",
manager: "http://127.0.0.1:8887",
},
API_PROD: {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
/**

View File

@@ -1,29 +1,29 @@
import {commonUrl, getRequest, getRequestWithNoToken, postRequestWithNoToken,uploadFileRequest,uploadFile} from '@/libs/axios';
import {managerApiUrl, getRequest, getRequestWithNoToken, postRequestWithNoToken,uploadFileRequest,uploadFile} from '@/libs/axios';
// 通过id获取子地区
export const getChildRegion = (id) => {
return getRequest(`${commonUrl}/common/common/region/item/${id}`);
return getRequest(`${managerApiUrl}/manager/common/region/item/${id}`);
};
// 点地图获取地址信息
export const getRegion = (params) => {
return getRequest(`${commonUrl}/common/common/region/region`, params);
return getRequest(`${managerApiUrl}/manager/common/region/region`, params);
};
// 获取拼图验证
export const getVerifyImg = (verificationEnums) => {
return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
return getRequestWithNoToken(`${managerApiUrl}/manager/common/slider/${verificationEnums}`);
};
// 拼图验证
export const postVerifyImg = (params) => {
return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
return postRequestWithNoToken(`${managerApiUrl}/manager/common/slider/${params.verificationEnums}`, params);
};
// 获取系统基础信息(登录页等场景无需 token
export const getBaseSite = () => {
return getRequestWithNoToken(`${commonUrl}/common/common/site`);
return getRequestWithNoToken(`${managerApiUrl}/manager/common/site`);
};
// 上传文件

View File

@@ -9,20 +9,18 @@ import {
putRequestWithNoForm,
postRequestWithNoTokenData,
postRequestWithNoForm,
managerUrl
managerUrl,
managerApiUrl
} from "@/libs/axios";
let commonUrl = (process.env.NODE_ENV === 'development' ? BASE.API_DEV.common : BASE.API_PROD.common)
// 文件上传接口
export const uploadFile = commonUrl+ "/common/common/upload/file";
export const uploadFile = managerApiUrl + "/manager/common/upload/file";
// Websocket
export const ws = managerUrl + "/ws";
//获取所有city
export const getAllCity = (params) => {
return getRequest(commonUrl + '/common/common/region/allCity', params)
return getRequest(managerApiUrl + '/manager/common/region/allCity', params)
}
@@ -356,7 +354,7 @@ export const aliDownloadFile = (fKey, params) => {
// base64上传
export const base64Upload = (params) => {
return postRequest("/common/common/upload/file", params);
return postRequest("/common/upload/file", params);
};
// 系统设置
@@ -460,31 +458,6 @@ export const resetPassword = (params) => {
return postRequest(`/passport/user/resetPassword/${params}`);
};
// 初始化商品索引
export const createIndex = () => {
return getRequest(`/other/elasticsearch`);
};
// 初始化商品索引
export const getProgress = () => {
return getRequest(`/other/elasticsearch/progress`);
};
// 删除ES中下架的商品
export const deleteGoodsDown = () => {
return getRequest(`/other/elasticsearch/deleteGoodsDown`);
};
// 删除不存在的索引
export const delSkuIndex = () => {
return getRequest(`/other/elasticsearch/delSkuIndex`);
};
// 生成所有商品的缓存
export const generateGoodsCache = () => {
return getRequest(`/other/elasticsearch/cache`);
};
// 分页查询自定义分词
export const getCustomWordsPage = (params) => {
return getRequest(`/other/customWords/page`, params);
@@ -532,22 +505,22 @@ export const getHotWordsHistory = (params) => {
// 获取文件目录列表
export const getFileDirectory = () => {
return getRequest(commonUrl+`/common/resource/fileDirectory`);
return getRequest(managerApiUrl+`/manager/common/fileDirectory`);
};
// 添加文件目录
export const addFileDirectory = (params) => {
return postRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
return postRequestWithNoForm(managerApiUrl+`/manager/common/fileDirectory`,params);
};
// 修改文件目录
export const updateFileDirectory = (params) => {
return putRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
return putRequestWithNoForm(managerApiUrl+`/manager/common/fileDirectory`,params);
};
// 删除文件目录
export const delFileDirectory = (id) => {
return deleteRequest(commonUrl+`/common/resource/fileDirectory/${id}`);
return deleteRequest(managerApiUrl+`/manager/common/fileDirectory/${id}`);
};

View File

@@ -1,13 +1,13 @@
import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
import {managerApiUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
// 获取拼图验证
export const getVerifyImg = (verificationEnums) => {
return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
return getRequestWithNoToken(`${managerApiUrl}/manager/common/slider/${verificationEnums}`);
};
// 拼图验证
export const postVerifyImg = (params) => {
return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
return postRequestWithNoToken(`${managerApiUrl}/manager/common/slider/${params.verificationEnums}`, params);
};

View File

@@ -6,16 +6,13 @@ import Cookies from "js-cookie";
import {v4 as uuidv4} from 'uuid';
// 统一请求路径前缀
export const commonUrl =
export const managerApiUrl =
process.env.NODE_ENV === "development"
? BASE.API_DEV.common
: BASE.API_PROD.common;
export const managerUrl =
(process.env.NODE_ENV === "development"
? BASE.API_DEV.manager
: BASE.API_PROD.manager) + BASE.PREFIX;
: BASE.API_PROD.manager;
export const managerUrl = managerApiUrl + BASE.PREFIX;
// 文件上传接口
export const uploadFile = commonUrl + "/common/common/upload/file";
export const uploadFile = managerApiUrl + "/manager/common/upload/file";
const service = axios.create({

View File

@@ -190,7 +190,7 @@
<el-upload
v-if="canUploadImages"
ref="up"
:action="commonUrl + '/common/common/upload/file'"
:action="managerApiUrl + '/manager/common/upload/file'"
:data="uploadData"
:headers="accessToken"
:before-upload="beforeUpload"
@@ -385,7 +385,7 @@ import {
updateFileDirectory,
} from "@/api/index";
import DPlayer from "dplayer";
import {commonUrl} from "@/libs/axios";
import {managerApiUrl} from "@/libs/axios";
import config from "@/config/index";
import playIcon from "@/assets/play.png";
@@ -417,7 +417,7 @@ export default {
},
data() {
return {
commonUrl, // 上传文件路径
managerApiUrl, // 上传文件路径
config, // api地址
fileDirectoryId: "",
groupFormValidate: {

View File

@@ -51,15 +51,6 @@
</el-form-item>
</div>
<div class="label-btns goods-setting-btns">
<div class="goods-setting-action-row">
<el-button type="success" @click="createIndex()">重新生成所有商品索引</el-button>
<el-button type="info" @click="deleteDownGoods()">删除ES中下架的商品</el-button>
<el-button type="warning" @click="generateCache()">生成所有商品的缓存</el-button>
<el-button type="danger" @click="deleteNotExistIndex()">删除不存在的索引</el-button>
<div class="progress-item" v-if="showProgress">
<el-progress :percentage="progressVal" />
</div>
</div>
<div class="goods-setting-save-row">
<el-button type="primary" @click="submit('formValidate')">保存</el-button>
</div>
@@ -69,7 +60,7 @@
</template>
<script>
import { ElMessage } from "element-plus";
import { setSetting, createIndex, getProgress, deleteGoodsDown, generateGoodsCache, delSkuIndex } from "@/api/index";
import { setSetting } from "@/api/index";
export default {
props: ["res", "type"],
data() {
@@ -83,9 +74,6 @@ export default {
originalPictureWidth: "0",
originalPictureHeight: "0",
},
progressVal: 0,
showProgress: false,
intervalProgress: null,
ruleValidate: {},
result: "",
};
@@ -103,69 +91,6 @@ export default {
}
});
},
createIndex() {
createIndex().then((res) => {
if (res.success) {
ElMessage.success("开始生成!");
this.showProgress = true;
setTimeout(() => {
this.intervalProgress = setInterval(() => {
getProgress().then((resp) => {
const progressResult = resp.result;
if (progressResult != null && progressResult.flag === 0) {
clearInterval(this.intervalProgress);
this.showProgress = false;
ElMessage.success("生成成功!");
} else {
this.progressVal = Math.floor((progressResult.processed / progressResult.total) * 100);
}
});
}, 1000);
}, 10000);
} else if (res.code === 100000) {
this.showProgress = true;
this.intervalProgress = setInterval(() => {
getProgress().then((resp) => {
const progressResult = resp.result;
if (progressResult != null && progressResult.flag === 0) {
clearInterval(this.intervalProgress);
this.showProgress = false;
ElMessage.success("生成成功!");
} else {
this.progressVal = Math.floor((progressResult.processed / progressResult.total) * 100);
}
});
}, 1000);
}
});
},
deleteDownGoods() {
deleteGoodsDown().then((res) => {
if (res.success) {
ElMessage.success("删除成功!");
} else {
ElMessage.error("删除失败!");
}
});
},
generateCache() {
generateGoodsCache().then((res) => {
if (res.success) {
ElMessage.success("生成成功!");
} else {
ElMessage.error("生成失败!");
}
});
},
deleteNotExistIndex() {
delSkuIndex().then((res) => {
if (res.success) {
ElMessage.success("删除成功!");
} else {
ElMessage.error("删除失败!");
}
});
},
setupSetting() {
setSetting(this.type, this.formValidate).then((res) => {
if (res.success) {
@@ -217,19 +142,6 @@ export default {
gap: 10px;
margin-left: 150px;
}
.goods-setting-action-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
}
.goods-setting-action-row .progress-item {
flex: 0 0 240px;
min-width: 200px;
}
.goods-setting-action-row .progress-item :deep(.el-progress) {
width: 100%;
}
:deep(.el-input){
width: 180px !important;
}

View File

@@ -3,16 +3,10 @@ var BASE = {
* @description api请求基础路径
*/
API_DEV: {
common: "http://127.0.0.1:8890",
buyer: "http://127.0.0.1:8888",
seller: "http://127.0.0.1:8889",
manager: "http://127.0.0.1:8887",
seller: "http://127.0.0.1:8887",
},
API_PROD: {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn",
},
/**
* @description // 跳转买家端地址 pc端

View File

@@ -1,23 +1,23 @@
import { commonUrl, getRequest, uploadFileRequest, uploadFile, request} from "@/libs/axios";
import { sellerUrl, getRequest, uploadFileRequest, uploadFile, request} from "@/libs/axios";
// 通过id获取子地区
export const getChildRegion = (id) => {
return getRequest(`${commonUrl}/common/common/region/item/${id}`);
return getRequest(`${sellerUrl}/store/common/region/item/${id}`);
};
// 点地图获取地址信息
export const getRegion = (params) => {
return getRequest(`${commonUrl}/common/common/region/region`, params);
return getRequest(`${sellerUrl}/store/common/region/region`, params);
};
// 获取IM接口前缀
export function getIMDetail() {
return getRequest(`${commonUrl}/common/common/IM`);
return getRequest(`${sellerUrl}/store/common/IM`);
}
//获取图片logo
export function getBaseSite() {
return getRequest(`${commonUrl}/common/common/site`);
return getRequest(`${sellerUrl}/store/common/site`);
}
// 上传文件
@@ -29,5 +29,5 @@ export const upLoadFileMethods = (bold) => {
* 发送短信验证码
*/
export function sendSms (params) {
return getRequest(`${commonUrl}/common/common/sms/${params.verificationEnums}/${params.mobile}`,params);
return getRequest(`${sellerUrl}/store/common/sms/${params.verificationEnums}/${params.mobile}`,params);
}

View File

@@ -6,7 +6,6 @@ import {
deleteRequest,
importRequest,
getRequestWithNoToken,
commonUrl,
postRequestWithNoForm
} from "@/libs/axios";
// 获取数据字典

View File

@@ -9,12 +9,12 @@ import {
putRequestWithNoForm,
postRequestWithNoToken,
postRequestWithNoForm,
commonUrl,
sellerUrl,
} from "@/libs/axios";
//获取所有city
export const getAllCity = (params) => {
return getRequest(commonUrl+'/common/common/region/allCity', params)
return getRequest(sellerUrl+'/store/common/region/allCity', params)
}
// 获取全部权限数据
@@ -73,7 +73,7 @@ export const sendRegistSms = (mobile, params) => {
};
// 发送重置密码短信验证码
export const sendResetSms = (mobile, params) => {
return getRequest(`${commonUrl}/common/captcha/sendResetSms/${mobile}`, params);
return getRequest(`${sellerUrl}/common/captcha/sendResetSms/${mobile}`, params);
};
// 发送修改绑定手机短信验证码
export const sendEditMobileSms = (mobile, params) => {
@@ -229,31 +229,31 @@ export const deleteMessageSend = (ids, params) => {
// 分页获取文件数据
export const getFileListData = params => {
return getRequest(`${commonUrl}/common/common/file`, params);
return getRequest(`${sellerUrl}/store/common/file`, params);
};
// 复制文件
export const copyFile = params => {
return postRequest(`${commonUrl}/common/common/file/copy`, params);
return postRequest(`${sellerUrl}/store/common/file/copy`, params);
};
// 重命名文件
export const renameFile = params => {
return postRequest(`${commonUrl}/common/common/file/rename`, params);
return postRequest(`${sellerUrl}/store/common/file/rename`, params);
};
// 删除文件
export const deleteFile = (ids, params) => {
return deleteRequest(`${commonUrl}/common/common/file/delete/${ids}`, params);
return deleteRequest(`${sellerUrl}/store/common/file/delete/${ids}`, params);
};
// 下载文件
export const aliDownloadFile = (fKey, params) => {
return getRequest(`${commonUrl}/common/common/file/ali/download/${fKey}`, params);
return getRequest(`${sellerUrl}/store/common/file/ali/download/${fKey}`, params);
};
// base64上传
export const base64Upload = params => {
return postRequest("/common/common/upload/file", params);
return postRequest("/store/common/upload/file", params);
};
@@ -391,20 +391,20 @@ export const editOtherUser = (id, params) => {
// 获取文件目录列表
export const getFileDirectory = () => {
return getRequest(commonUrl+`/common/resource/fileDirectory`);
return getRequest(sellerUrl+`/store/common/fileDirectory`);
};
// 添加文件目录
export const addFileDirectory = (params) => {
return postRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
return postRequestWithNoForm(sellerUrl+`/store/common/fileDirectory`,params);
};
// 修改文件目录
export const updateFileDirectory = (params) => {
return putRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
return putRequestWithNoForm(sellerUrl+`/store/common/fileDirectory`,params);
};
// 删除文件目录
export const delFileDirectory = (id) => {
return deleteRequest(commonUrl+`/common/resource/fileDirectory/${id}`);
return deleteRequest(sellerUrl+`/store/common/fileDirectory/${id}`);
};

View File

@@ -7,16 +7,13 @@ import { handleRefreshToken } from "@/api/index";
import {v4 as uuidv4} from 'uuid';
// 统一请求路径前缀
export const baseUrl =
(process.env.NODE_ENV === "development"
? BASE.API_DEV.seller
: BASE.API_PROD.seller) + BASE.PREFIX;
export const commonUrl =
export const sellerUrl =
process.env.NODE_ENV === "development"
? BASE.API_DEV.common
: BASE.API_PROD.common;
? BASE.API_DEV.seller
: BASE.API_PROD.seller;
export const baseUrl = sellerUrl + BASE.PREFIX;
// 文件上传接口
export const uploadFile = commonUrl + "/common/common/upload/file";
export const uploadFile = sellerUrl + "/store/common/upload/file";
var isRefreshToken = 0;
const refreshToken = getTokenDebounce();
const service = axios.create({

View File

@@ -1,13 +1,13 @@
import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
import {sellerUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
// 获取拼图验证
export const getVerifyImg = (verificationEnums) => {
return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
return getRequestWithNoToken(`${sellerUrl}/store/common/slider/${verificationEnums}`);
};
// 拼图验证
export const postVerifyImg = (params) => {
return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
return postRequestWithNoToken(`${sellerUrl}/store/common/slider/${params.verificationEnums}`, params);
};

View File

@@ -147,7 +147,7 @@
<el-upload
v-if="canUploadImages"
ref="up"
:action="commonUrl + '/common/common/upload/file'"
:action="sellerUrl + '/store/common/upload/file'"
:data="uploadData"
:headers="accessToken"
:before-upload="beforeUpload"
@@ -317,7 +317,7 @@ import {
updateFileDirectory,
} from "@/api/index";
import DPlayer from "dplayer";
import {commonUrl} from "@/libs/axios";
import {sellerUrl} from "@/libs/axios";
import config from "@/config/index";
import playImg from "@/assets/play.png";
@@ -342,7 +342,7 @@ export default {
},
data() {
return {
commonUrl, // 上传文件路径
sellerUrl, // 上传文件路径
config, // api地址
fileDirectoryId: "",
groupFormValidate: {

View File

@@ -97,7 +97,7 @@
<el-form-item v-if="canUploadImages">
<el-upload
ref="up"
:action="commonUrl + '/common/common/upload/file'"
:action="sellerUrl + '/store/common/upload/file'"
:data="uploadData"
:headers="accessToken"
:before-upload="beforeUpload"
@@ -313,7 +313,7 @@ import {
updateFileDirectory,
} from "@/api/index";
import DPlayer from "dplayer";
import {commonUrl} from "@/libs/axios";
import {sellerUrl} from "@/libs/axios";
import config from "@/config/index";
import playImg from "@/assets/play.png";
@@ -342,7 +342,7 @@ export default {
},
data() {
return {
commonUrl, // 上传文件路径
sellerUrl, // 上传文件路径
config, // api地址
fileDirectoryId: "",
groupFormValidate: {

View File

@@ -151,7 +151,7 @@
<el-upload
v-if="canUploadImages"
ref="up"
:action="commonUrl + '/common/common/upload/file'"
:action="sellerUrl + '/store/common/upload/file'"
:data="uploadData"
:headers="accessToken"
:before-upload="beforeUpload"
@@ -323,7 +323,7 @@ import {
updateFileDirectory,
} from "@/api/index";
import DPlayer from "dplayer";
import {commonUrl} from "@/libs/axios";
import {sellerUrl} from "@/libs/axios";
import config from "@/config/index";
@@ -351,7 +351,7 @@ export default {
},
data() {
return {
commonUrl, // 上传文件路径
sellerUrl, // 上传文件路径
config, // api地址
fileDirectoryId: "",
groupFormValidate: {