mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 02:47:29 +08:00
Merge branch 'vue3'
This commit is contained in:
24
README.en.md
24
README.en.md
@@ -67,14 +67,21 @@ One codebase supports:
|
|||||||
Built with:
|
Built with:
|
||||||
|
|
||||||
- Spring Boot
|
- Spring Boot
|
||||||
- Spring Cloud
|
- MySQL
|
||||||
- Redis
|
- Redis
|
||||||
- RocketMQ
|
|
||||||
- Elasticsearch
|
|
||||||
- Docker
|
- 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
|
### Ecommerce Features
|
||||||
|
|
||||||
@@ -96,14 +103,11 @@ Supports distributed deployment and high concurrency ecommerce scenarios.
|
|||||||
|
|
||||||
### Backend
|
### Backend
|
||||||
|
|
||||||
- Java
|
- Java 21
|
||||||
- Spring Boot
|
- Spring Boot 4
|
||||||
- Spring Cloud
|
|
||||||
- MyBatis Plus
|
- MyBatis Plus
|
||||||
- MySQL
|
- MySQL
|
||||||
- Redis
|
- Redis
|
||||||
- RocketMQ
|
|
||||||
- Elasticsearch
|
|
||||||
- JWT
|
- JWT
|
||||||
- Docker
|
- Docker
|
||||||
|
|
||||||
|
|||||||
27
README.md
27
README.md
@@ -103,10 +103,30 @@ LILISHOP 是基于 Spring Boot / Spring Cloud / Vue / Uniapp 开发的 Java 开
|
|||||||
[**部署文档 -> 环境准备**](https://docs.pickmall.cn/deply/deply.html)
|
[**部署文档 -> 环境准备**](https://docs.pickmall.cn/deply/deply.html)
|
||||||
|
|
||||||
#### 数据库初始化
|
#### 数据库初始化
|
||||||
- **推荐方式**: 使用项目提供的 `docker-compose` 配置,可自动完成数据库(MySQL, Redis, Elasticsearch等)的部署与初始化。
|
- **推荐方式**: 使用 [`docker`](https://gitee.com/beijing_hongye_huicheng/docker) 仓库中的 `docker-compose`,可自动完成 **MySQL、Redis** 等中间件的部署与初始化。
|
||||||
- **手动方式**: 如果您选择手动部署,SQL脚本位于以下地址。请确保获取与您代码版本一致的SQL文件。
|
- **手动方式**: 如果您选择手动部署,SQL脚本位于以下地址。请确保获取与您代码版本一致的SQL文件。
|
||||||
[**数据库脚本 (Gitee)**](https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql)
|
[**数据库脚本 (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. 架构文档边界
|
### 5. 架构文档边界
|
||||||
@@ -120,16 +140,11 @@ LILISHOP 是基于 Spring Boot / Spring Cloud / Vue / Uniapp 开发的 Java 开
|
|||||||
- H5 / 小程序 / APP:`lilishop-uniapp`
|
- H5 / 小程序 / APP:`lilishop-uniapp`
|
||||||
- 部署、SQL、镜像与启动脚本:`docker`
|
- 部署、SQL、镜像与启动脚本:`docker`
|
||||||
|
|
||||||
All-In-One 仅用于本地体验、演示或验证,不代表生产高可用部署架构。生产部署应按实际访问量、稳定性、监控、备份和扩缩容要求拆分数据库、缓存、搜索、消息、任务调度、前端静态资源和后端服务。
|
|
||||||
|
|
||||||
### 6. 功能列表
|
### 6. 功能列表
|
||||||
|
|
||||||
[功能清单](https://bdwx2tfwwt.feishu.cn/sheets/FFQKscQKDhUx60to1k9cbMngnYb?from=from_copylink)
|
[功能清单](https://bdwx2tfwwt.feishu.cn/sheets/FFQKscQKDhUx60to1k9cbMngnYb?from=from_copylink)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 7. 开源与授权
|
### 7. 开源与授权
|
||||||
|
|
||||||
1. **开源协议**: 本项目遵循 `AGPL-3.0` 开源协议。
|
1. **开源协议**: 本项目遵循 `AGPL-3.0` 开源协议。
|
||||||
|
|||||||
@@ -3,15 +3,9 @@ var BASE = {
|
|||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
API_DEV: {
|
API_DEV: {
|
||||||
common: "https://common-api.pickmall.cn",
|
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
buyer: "https://buyer-api.pickmall.cn",
|
||||||
seller: "https://store-api.pickmall.cn",
|
|
||||||
manager: "https://admin-api.pickmall.cn"
|
|
||||||
},
|
},
|
||||||
API_PROD: {
|
API_PROD: {
|
||||||
common: "https://common-api.pickmall.cn",
|
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
buyer: "https://buyer-api.pickmall.cn",
|
||||||
seller: "https://store-api.pickmall.cn",
|
|
||||||
manager: "https://admin-api.pickmall.cn"
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import request, {
|
import request, {
|
||||||
Method, commonUrl
|
Method, buyerUrl
|
||||||
} from '@/plugins/request.js';
|
} from '@/plugins/request.js';
|
||||||
|
|
||||||
// 会员收货地址列表
|
// 会员收货地址列表
|
||||||
@@ -55,7 +55,7 @@ export function getAddrDetail (id) {
|
|||||||
// 传给后台citycode 获取城市街道等id
|
// 传给后台citycode 获取城市街道等id
|
||||||
export function handleRegion (params) {
|
export function handleRegion (params) {
|
||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/region/region`,
|
url: `${buyerUrl}/buyer/common/region/region`,
|
||||||
needToken: true,
|
needToken: true,
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
params
|
params
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import request, {Method, commonUrl} from '@/plugins/request.js';
|
import request, {Method, buyerUrl} from '@/plugins/request.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取拼图验证
|
* 获取拼图验证
|
||||||
*/
|
*/
|
||||||
export function getVerifyImg (verificationEnums) {
|
export function getVerifyImg (verificationEnums) {
|
||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
|
url: `${buyerUrl}/buyer/common/slider/${verificationEnums}`,
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: false
|
needToken: false
|
||||||
});
|
});
|
||||||
@@ -15,7 +15,7 @@ export function getVerifyImg (verificationEnums) {
|
|||||||
*/
|
*/
|
||||||
export function postVerifyImg (params) {
|
export function postVerifyImg (params) {
|
||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
|
url: `${buyerUrl}/buyer/common/slider/${params.verificationEnums}`,
|
||||||
method: Method.POST,
|
method: Method.POST,
|
||||||
needToken: false,
|
needToken: false,
|
||||||
params
|
params
|
||||||
@@ -26,7 +26,7 @@ export function postVerifyImg (params) {
|
|||||||
*/
|
*/
|
||||||
export function sendSms (params) {
|
export function sendSms (params) {
|
||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/sms/${params.verificationEnums}/${params.mobile}`,
|
url: `${buyerUrl}/buyer/common/sms/${params.verificationEnums}/${params.mobile}`,
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: false,
|
needToken: false,
|
||||||
params
|
params
|
||||||
@@ -36,7 +36,7 @@ export function sendSms (params) {
|
|||||||
// 地区数据,用于三级联动
|
// 地区数据,用于三级联动
|
||||||
export function getRegion (id) {
|
export function getRegion (id) {
|
||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/region/item/${id}`,
|
url: `${buyerUrl}/buyer/common/region/item/${id}`,
|
||||||
needToken: true,
|
needToken: true,
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
loading: false
|
loading: false
|
||||||
@@ -80,7 +80,7 @@ export function articleDetail (id) {
|
|||||||
// 获取IM接口前缀
|
// 获取IM接口前缀
|
||||||
export function getIMDetail () {
|
export function getIMDetail () {
|
||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/IM`,
|
url: `${buyerUrl}/buyer/common/IM`,
|
||||||
method: Method.GET
|
method: Method.GET
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,7 @@ export function getIMDetail () {
|
|||||||
//获取图片logo
|
//获取图片logo
|
||||||
export function getBaseSite(){
|
export function getBaseSite(){
|
||||||
return request ({
|
return request ({
|
||||||
url:`${commonUrl}/common/common/site`,
|
url:`${buyerUrl}/buyer/common/site`,
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: false
|
needToken: false
|
||||||
})
|
})
|
||||||
@@ -98,7 +98,7 @@ export function getBaseSite(){
|
|||||||
// 获取主题色配置
|
// 获取主题色配置
|
||||||
export function getThemeSetting() {
|
export function getThemeSetting() {
|
||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/site/theme`,
|
url: `${buyerUrl}/buyer/common/site/theme`,
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: false,
|
needToken: false,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import request, {
|
|||||||
// 商品列表
|
// 商品列表
|
||||||
export function goodsList (params) {
|
export function goodsList (params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/buyer/goods/goods/es',
|
url: '/buyer/goods/goods/search',
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: false,
|
needToken: false,
|
||||||
optionalToken: true,
|
optionalToken: true,
|
||||||
@@ -16,7 +16,7 @@ export function goodsList (params) {
|
|||||||
// 商品分类 筛选条件 品牌, 尺寸等
|
// 商品分类 筛选条件 品牌, 尺寸等
|
||||||
export function filterList (params) {
|
export function filterList (params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/buyer/goods/goods/es/related',
|
url: '/buyer/goods/goods/search/related',
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: false,
|
needToken: false,
|
||||||
optionalToken: true,
|
optionalToken: true,
|
||||||
|
|||||||
@@ -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';
|
import storage from '@/plugins/storage.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7,7 +7,7 @@ import storage from '@/plugins/storage.js';
|
|||||||
*/
|
*/
|
||||||
export function getVerifyImg (verificationEnums) {
|
export function getVerifyImg (verificationEnums) {
|
||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
|
url: `${buyerUrl}/buyer/common/slider/${verificationEnums}`,
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: false,
|
needToken: false,
|
||||||
headers: {uuid: storage.getItem('uuid')}
|
headers: {uuid: storage.getItem('uuid')}
|
||||||
@@ -19,7 +19,7 @@ export function getVerifyImg (verificationEnums) {
|
|||||||
*/
|
*/
|
||||||
export function postVerifyImg (params) {
|
export function postVerifyImg (params) {
|
||||||
return request({
|
return request({
|
||||||
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
|
url: `${buyerUrl}/buyer/common/slider/${params.verificationEnums}`,
|
||||||
method: Method.POST,
|
method: Method.POST,
|
||||||
needToken: false,
|
needToken: false,
|
||||||
params,
|
params,
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
import { editMemberInfo } from '@/api/account.js';
|
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 storage from '@/plugins/storage.js';
|
||||||
import { User } from '@element-plus/icons-vue';
|
import { User } from '@element-plus/icons-vue';
|
||||||
export default {
|
export default {
|
||||||
@@ -59,7 +59,7 @@ export default {
|
|||||||
nickName: [{required: true, message: '用户昵称不能为空'}, { max: 16, message: '用户昵称不能超过15个字符' }]
|
nickName: [{required: true, message: '用户昵称不能为空'}, { max: 16, message: '用户昵称不能超过15个字符' }]
|
||||||
},
|
},
|
||||||
formItem: {}, // 表单数据
|
formItem: {}, // 表单数据
|
||||||
action: commonUrl + '/common/common/upload/file', // 上传接口
|
action: buyerUrl + '/buyer/common/upload/file', // 上传接口
|
||||||
accessToken: {} // 验证token
|
accessToken: {} // 验证token
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ import { Message, Notice } from "@/utils/message";
|
|||||||
import { Camera, Delete, View } from '@element-plus/icons-vue';
|
import { Camera, Delete, View } from '@element-plus/icons-vue';
|
||||||
import { orderDetail } from '@/api/order.js';
|
import { orderDetail } from '@/api/order.js';
|
||||||
import { addEvaluation } from '@/api/member.js';
|
import { addEvaluation } from '@/api/member.js';
|
||||||
import { commonUrl } from '@/plugins/request.js';
|
import { buyerUrl } from '@/plugins/request.js';
|
||||||
import storage from '@/plugins/storage';
|
import storage from '@/plugins/storage';
|
||||||
export default {
|
export default {
|
||||||
components: { Camera, Delete, View },
|
components: { Camera, Delete, View },
|
||||||
@@ -93,7 +93,7 @@ export default {
|
|||||||
descriptionScore: 5
|
descriptionScore: 5
|
||||||
}, // 表单
|
}, // 表单
|
||||||
visible: false, // 图片预览
|
visible: false, // 图片预览
|
||||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
|
||||||
accessToken: {}, // 验证token
|
accessToken: {}, // 验证token
|
||||||
previewImage: '', // 预览图片地址
|
previewImage: '', // 预览图片地址
|
||||||
loading: false, // 提交加载状态
|
loading: false, // 提交加载状态
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
import { Message, Notice } from "@/utils/message";
|
import { Message, Notice } from "@/utils/message";
|
||||||
import { Camera, Delete, View } from '@element-plus/icons-vue';
|
import { Camera, Delete, View } from '@element-plus/icons-vue';
|
||||||
import { afterSaleReason, afterSaleInfo, applyAfterSale } from '@/api/member.js'
|
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 storage from '@/plugins/storage';
|
||||||
import * as RegExp from '@/plugins/RegExp'
|
import * as RegExp from '@/plugins/RegExp'
|
||||||
export default {
|
export default {
|
||||||
@@ -132,7 +132,7 @@ export default {
|
|||||||
num: 1
|
num: 1
|
||||||
},
|
},
|
||||||
uploadList: [], // 上传列表
|
uploadList: [], // 上传列表
|
||||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
|
||||||
accessToken: {}, // 验证token
|
accessToken: {}, // 验证token
|
||||||
visible: false, // 图片预览
|
visible: false, // 图片预览
|
||||||
previewImage: '', // 预览图片url
|
previewImage: '', // 预览图片url
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ import { Message, Notice } from "@/utils/message";
|
|||||||
import { Camera, Delete, View } from '@element-plus/icons-vue';
|
import { Camera, Delete, View } from '@element-plus/icons-vue';
|
||||||
import { orderDetail } from '@/api/order.js';
|
import { orderDetail } from '@/api/order.js';
|
||||||
import { afterSaleReason, handleComplain } from '@/api/member.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';
|
import storage from '@/plugins/storage';
|
||||||
export default {
|
export default {
|
||||||
components: { Camera, Delete, View },
|
components: { Camera, Delete, View },
|
||||||
@@ -79,7 +79,7 @@ export default {
|
|||||||
content: ''
|
content: ''
|
||||||
}, // 表单
|
}, // 表单
|
||||||
visible: false, // 图片预览
|
visible: false, // 图片预览
|
||||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
|
||||||
accessToken: {}, // 验证token
|
accessToken: {}, // 验证token
|
||||||
previewImage: '', // 图片地址
|
previewImage: '', // 图片地址
|
||||||
loading: false, // 加载状态
|
loading: false, // 加载状态
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ import { applyFirst } from '@/api/shopentry';
|
|||||||
import * as RegExp from '@/plugins/RegExp.js';
|
import * as RegExp from '@/plugins/RegExp.js';
|
||||||
import multipleMap from "@/components/map/multiple-map";
|
import multipleMap from "@/components/map/multiple-map";
|
||||||
import storage from '@/plugins/storage';
|
import storage from '@/plugins/storage';
|
||||||
import { commonUrl } from '@/plugins/request.js';
|
import { buyerUrl } from '@/plugins/request.js';
|
||||||
const FIRST_APPLY_DRAFT_KEY = 'shopEntryFirstDraft';
|
const FIRST_APPLY_DRAFT_KEY = 'shopEntryFirstDraft';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -211,7 +211,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
|
||||||
accessToken: {}, // 验证token
|
accessToken: {}, // 验证token
|
||||||
visible: false, // 预览图片
|
visible: false, // 预览图片
|
||||||
loading: false, // 加载状态
|
loading: false, // 加载状态
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ import { applyThird } from '@/api/shopentry';
|
|||||||
import { getCategory } from '@/api/goods';
|
import { getCategory } from '@/api/goods';
|
||||||
|
|
||||||
import storage from '@/plugins/storage';
|
import storage from '@/plugins/storage';
|
||||||
import { commonUrl } from '@/plugins/request.js';
|
import { buyerUrl } from '@/plugins/request.js';
|
||||||
|
|
||||||
|
|
||||||
import multipleMap from "@/components/map/multiple-map";
|
import multipleMap from "@/components/map/multiple-map";
|
||||||
@@ -118,7 +118,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
loading: false, // 加载状态
|
loading: false, // 加载状态
|
||||||
uploadLoading: false, // 上传加载状态
|
uploadLoading: false, // 上传加载状态
|
||||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
action: buyerUrl + '/buyer/common/upload/file', // 上传地址
|
||||||
accessToken: {}, // 验证token
|
accessToken: {}, // 验证token
|
||||||
previewPicture: '', // 预览图片
|
previewPicture: '', // 预览图片
|
||||||
|
|
||||||
|
|||||||
@@ -13,18 +13,6 @@ export const buyerUrl =
|
|||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? BASE.API_DEV.buyer
|
? BASE.API_DEV.buyer
|
||||||
: BASE.API_PROD.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;
|
let isRefreshToken = 0;
|
||||||
const refreshToken = getTokenDebounce();
|
const refreshToken = getTokenDebounce();
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export async function fetchAndApplyTheme(requestFn) {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn(
|
console.warn(
|
||||||
"[theme] 主题色加载失败,请确认 common-api(8890) 已启动且已执行 version4.9to4.10.sql",
|
"[theme] 主题色加载失败,请确认 buyer-api 已启动且站点主题配置可用",
|
||||||
error
|
error
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
2
im/.env
2
im/.env
@@ -2,7 +2,7 @@ NODE_ENV=production
|
|||||||
VUE_APP_PREVIEW=false
|
VUE_APP_PREVIEW=false
|
||||||
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
|
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
|
||||||
VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket
|
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_BUYER=https://buyer-api.pickmall.cn
|
||||||
VUE_APP_SELLER=https://store-api.pickmall.cn
|
VUE_APP_SELLER=https://store-api.pickmall.cn
|
||||||
VUE_APP_WEBSITE_NAME="LiLi IM"
|
VUE_APP_WEBSITE_NAME="LiLi IM"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ NODE_ENV=development
|
|||||||
VUE_APP_PREVIEW=false
|
VUE_APP_PREVIEW=false
|
||||||
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
|
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
|
||||||
VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket
|
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_BUYER=https://buyer-api.pickmall.cn
|
||||||
VUE_APP_SELLER=https://store-api.pickmall.cn
|
VUE_APP_SELLER=https://store-api.pickmall.cn
|
||||||
VUE_APP_WEBSITE_NAME="LiLi IM"
|
VUE_APP_WEBSITE_NAME="LiLi IM"
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export const ServeSendTalkFile = (data) => {
|
|||||||
|
|
||||||
// 发送聊天图片服务接口
|
// 发送聊天图片服务接口
|
||||||
export const ServeSendTalkImage = (data) => {
|
export const ServeSendTalkImage = (data) => {
|
||||||
return upload("/common/common/upload/file", data);
|
return upload("/buyer/common/upload/file", data);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 发送表情包服务接口
|
// 发送表情包服务接口
|
||||||
|
|||||||
@@ -3,15 +3,9 @@ var BASE = {
|
|||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
API_DEV: {
|
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",
|
manager: "http://127.0.0.1:8887",
|
||||||
},
|
},
|
||||||
API_PROD: {
|
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"
|
manager: "https://admin-api.pickmall.cn"
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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获取子地区
|
// 通过id获取子地区
|
||||||
export const getChildRegion = (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) => {
|
export const getRegion = (params) => {
|
||||||
return getRequest(`${commonUrl}/common/common/region/region`, params);
|
return getRequest(`${managerApiUrl}/manager/common/region/region`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取拼图验证
|
// 获取拼图验证
|
||||||
export const getVerifyImg = (verificationEnums) => {
|
export const getVerifyImg = (verificationEnums) => {
|
||||||
return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
|
return getRequestWithNoToken(`${managerApiUrl}/manager/common/slider/${verificationEnums}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 拼图验证
|
// 拼图验证
|
||||||
export const postVerifyImg = (params) => {
|
export const postVerifyImg = (params) => {
|
||||||
return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
|
return postRequestWithNoToken(`${managerApiUrl}/manager/common/slider/${params.verificationEnums}`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 获取系统基础信息(登录页等场景无需 token)
|
// 获取系统基础信息(登录页等场景无需 token)
|
||||||
export const getBaseSite = () => {
|
export const getBaseSite = () => {
|
||||||
return getRequestWithNoToken(`${commonUrl}/common/common/site`);
|
return getRequestWithNoToken(`${managerApiUrl}/manager/common/site`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
|
|||||||
@@ -9,20 +9,18 @@ import {
|
|||||||
putRequestWithNoForm,
|
putRequestWithNoForm,
|
||||||
postRequestWithNoTokenData,
|
postRequestWithNoTokenData,
|
||||||
postRequestWithNoForm,
|
postRequestWithNoForm,
|
||||||
managerUrl
|
managerUrl,
|
||||||
|
managerApiUrl
|
||||||
} from "@/libs/axios";
|
} 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
|
// Websocket
|
||||||
export const ws = managerUrl + "/ws";
|
export const ws = managerUrl + "/ws";
|
||||||
|
|
||||||
//获取所有city
|
//获取所有city
|
||||||
export const getAllCity = (params) => {
|
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上传
|
// base64上传
|
||||||
export const base64Upload = (params) => {
|
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}`);
|
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) => {
|
export const getCustomWordsPage = (params) => {
|
||||||
return getRequest(`/other/customWords/page`, params);
|
return getRequest(`/other/customWords/page`, params);
|
||||||
@@ -532,22 +505,22 @@ export const getHotWordsHistory = (params) => {
|
|||||||
|
|
||||||
// 获取文件目录列表
|
// 获取文件目录列表
|
||||||
export const getFileDirectory = () => {
|
export const getFileDirectory = () => {
|
||||||
return getRequest(commonUrl+`/common/resource/fileDirectory`);
|
return getRequest(managerApiUrl+`/manager/common/fileDirectory`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 添加文件目录
|
// 添加文件目录
|
||||||
export const addFileDirectory = (params) => {
|
export const addFileDirectory = (params) => {
|
||||||
return postRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
|
return postRequestWithNoForm(managerApiUrl+`/manager/common/fileDirectory`,params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 修改文件目录
|
// 修改文件目录
|
||||||
export const updateFileDirectory = (params) => {
|
export const updateFileDirectory = (params) => {
|
||||||
return putRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
|
return putRequestWithNoForm(managerApiUrl+`/manager/common/fileDirectory`,params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 删除文件目录
|
// 删除文件目录
|
||||||
export const delFileDirectory = (id) => {
|
export const delFileDirectory = (id) => {
|
||||||
return deleteRequest(commonUrl+`/common/resource/fileDirectory/${id}`);
|
return deleteRequest(managerApiUrl+`/manager/common/fileDirectory/${id}`);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
|
import {managerApiUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
|
||||||
|
|
||||||
|
|
||||||
// 获取拼图验证
|
// 获取拼图验证
|
||||||
export const getVerifyImg = (verificationEnums) => {
|
export const getVerifyImg = (verificationEnums) => {
|
||||||
return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
|
return getRequestWithNoToken(`${managerApiUrl}/manager/common/slider/${verificationEnums}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 拼图验证
|
// 拼图验证
|
||||||
export const postVerifyImg = (params) => {
|
export const postVerifyImg = (params) => {
|
||||||
return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
|
return postRequestWithNoToken(`${managerApiUrl}/manager/common/slider/${params.verificationEnums}`, params);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,16 +6,13 @@ import Cookies from "js-cookie";
|
|||||||
import {v4 as uuidv4} from 'uuid';
|
import {v4 as uuidv4} from 'uuid';
|
||||||
|
|
||||||
// 统一请求路径前缀
|
// 统一请求路径前缀
|
||||||
export const commonUrl =
|
export const managerApiUrl =
|
||||||
process.env.NODE_ENV === "development"
|
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_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({
|
const service = axios.create({
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
<el-upload
|
<el-upload
|
||||||
v-if="canUploadImages"
|
v-if="canUploadImages"
|
||||||
ref="up"
|
ref="up"
|
||||||
:action="commonUrl + '/common/common/upload/file'"
|
:action="managerApiUrl + '/manager/common/upload/file'"
|
||||||
:data="uploadData"
|
:data="uploadData"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
@@ -385,7 +385,7 @@ import {
|
|||||||
updateFileDirectory,
|
updateFileDirectory,
|
||||||
} from "@/api/index";
|
} from "@/api/index";
|
||||||
import DPlayer from "dplayer";
|
import DPlayer from "dplayer";
|
||||||
import {commonUrl} from "@/libs/axios";
|
import {managerApiUrl} from "@/libs/axios";
|
||||||
import config from "@/config/index";
|
import config from "@/config/index";
|
||||||
import playIcon from "@/assets/play.png";
|
import playIcon from "@/assets/play.png";
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
commonUrl, // 上传文件路径
|
managerApiUrl, // 上传文件路径
|
||||||
config, // api地址
|
config, // api地址
|
||||||
fileDirectoryId: "",
|
fileDirectoryId: "",
|
||||||
groupFormValidate: {
|
groupFormValidate: {
|
||||||
|
|||||||
@@ -51,15 +51,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="label-btns goods-setting-btns">
|
<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">
|
<div class="goods-setting-save-row">
|
||||||
<el-button type="primary" @click="submit('formValidate')">保存</el-button>
|
<el-button type="primary" @click="submit('formValidate')">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +60,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { setSetting, createIndex, getProgress, deleteGoodsDown, generateGoodsCache, delSkuIndex } from "@/api/index";
|
import { setSetting } from "@/api/index";
|
||||||
export default {
|
export default {
|
||||||
props: ["res", "type"],
|
props: ["res", "type"],
|
||||||
data() {
|
data() {
|
||||||
@@ -83,9 +74,6 @@ export default {
|
|||||||
originalPictureWidth: "0",
|
originalPictureWidth: "0",
|
||||||
originalPictureHeight: "0",
|
originalPictureHeight: "0",
|
||||||
},
|
},
|
||||||
progressVal: 0,
|
|
||||||
showProgress: false,
|
|
||||||
intervalProgress: null,
|
|
||||||
ruleValidate: {},
|
ruleValidate: {},
|
||||||
result: "",
|
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() {
|
setupSetting() {
|
||||||
setSetting(this.type, this.formValidate).then((res) => {
|
setSetting(this.type, this.formValidate).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -217,19 +142,6 @@ export default {
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
margin-left: 150px;
|
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){
|
:deep(.el-input){
|
||||||
width: 180px !important;
|
width: 180px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,10 @@ var BASE = {
|
|||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
API_DEV: {
|
API_DEV: {
|
||||||
common: "http://127.0.0.1:8890",
|
seller: "http://127.0.0.1:8887",
|
||||||
buyer: "http://127.0.0.1:8888",
|
|
||||||
seller: "http://127.0.0.1:8889",
|
|
||||||
manager: "http://127.0.0.1:8887",
|
|
||||||
},
|
},
|
||||||
API_PROD: {
|
API_PROD: {
|
||||||
common: "https://common-api.pickmall.cn",
|
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
|
||||||
seller: "https://store-api.pickmall.cn",
|
seller: "https://store-api.pickmall.cn",
|
||||||
manager: "https://admin-api.pickmall.cn",
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description // 跳转买家端地址 pc端
|
* @description // 跳转买家端地址 pc端
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
import { commonUrl, getRequest, uploadFileRequest, uploadFile, request} from "@/libs/axios";
|
import { sellerUrl, getRequest, uploadFileRequest, uploadFile, request} from "@/libs/axios";
|
||||||
|
|
||||||
// 通过id获取子地区
|
// 通过id获取子地区
|
||||||
export const getChildRegion = (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) => {
|
export const getRegion = (params) => {
|
||||||
return getRequest(`${commonUrl}/common/common/region/region`, params);
|
return getRequest(`${sellerUrl}/store/common/region/region`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取IM接口前缀
|
// 获取IM接口前缀
|
||||||
export function getIMDetail() {
|
export function getIMDetail() {
|
||||||
return getRequest(`${commonUrl}/common/common/IM`);
|
return getRequest(`${sellerUrl}/store/common/IM`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取图片logo
|
//获取图片logo
|
||||||
export function getBaseSite() {
|
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) {
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import {
|
|||||||
deleteRequest,
|
deleteRequest,
|
||||||
importRequest,
|
importRequest,
|
||||||
getRequestWithNoToken,
|
getRequestWithNoToken,
|
||||||
commonUrl,
|
|
||||||
postRequestWithNoForm
|
postRequestWithNoForm
|
||||||
} from "@/libs/axios";
|
} from "@/libs/axios";
|
||||||
// 获取数据字典
|
// 获取数据字典
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import {
|
|||||||
putRequestWithNoForm,
|
putRequestWithNoForm,
|
||||||
postRequestWithNoToken,
|
postRequestWithNoToken,
|
||||||
postRequestWithNoForm,
|
postRequestWithNoForm,
|
||||||
commonUrl,
|
sellerUrl,
|
||||||
} from "@/libs/axios";
|
} from "@/libs/axios";
|
||||||
|
|
||||||
//获取所有city
|
//获取所有city
|
||||||
export const getAllCity = (params) => {
|
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) => {
|
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) => {
|
export const sendEditMobileSms = (mobile, params) => {
|
||||||
@@ -229,31 +229,31 @@ export const deleteMessageSend = (ids, params) => {
|
|||||||
|
|
||||||
// 分页获取文件数据
|
// 分页获取文件数据
|
||||||
export const getFileListData = params => {
|
export const getFileListData = params => {
|
||||||
return getRequest(`${commonUrl}/common/common/file`, params);
|
return getRequest(`${sellerUrl}/store/common/file`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 复制文件
|
// 复制文件
|
||||||
export const copyFile = 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 => {
|
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) => {
|
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) => {
|
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上传
|
// base64上传
|
||||||
export const base64Upload = params => {
|
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 = () => {
|
export const getFileDirectory = () => {
|
||||||
return getRequest(commonUrl+`/common/resource/fileDirectory`);
|
return getRequest(sellerUrl+`/store/common/fileDirectory`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 添加文件目录
|
// 添加文件目录
|
||||||
export const addFileDirectory = (params) => {
|
export const addFileDirectory = (params) => {
|
||||||
return postRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
|
return postRequestWithNoForm(sellerUrl+`/store/common/fileDirectory`,params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 修改文件目录
|
// 修改文件目录
|
||||||
export const updateFileDirectory = (params) => {
|
export const updateFileDirectory = (params) => {
|
||||||
return putRequestWithNoForm(commonUrl+`/common/resource/fileDirectory`,params);
|
return putRequestWithNoForm(sellerUrl+`/store/common/fileDirectory`,params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 删除文件目录
|
// 删除文件目录
|
||||||
export const delFileDirectory = (id) => {
|
export const delFileDirectory = (id) => {
|
||||||
return deleteRequest(commonUrl+`/common/resource/fileDirectory/${id}`);
|
return deleteRequest(sellerUrl+`/store/common/fileDirectory/${id}`);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,16 +7,13 @@ import { handleRefreshToken } from "@/api/index";
|
|||||||
import {v4 as uuidv4} from 'uuid';
|
import {v4 as uuidv4} from 'uuid';
|
||||||
|
|
||||||
// 统一请求路径前缀
|
// 统一请求路径前缀
|
||||||
export const baseUrl =
|
export const sellerUrl =
|
||||||
(process.env.NODE_ENV === "development"
|
|
||||||
? BASE.API_DEV.seller
|
|
||||||
: BASE.API_PROD.seller) + BASE.PREFIX;
|
|
||||||
export const commonUrl =
|
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? BASE.API_DEV.common
|
? BASE.API_DEV.seller
|
||||||
: BASE.API_PROD.common;
|
: 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;
|
var isRefreshToken = 0;
|
||||||
const refreshToken = getTokenDebounce();
|
const refreshToken = getTokenDebounce();
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
|
import {sellerUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
|
||||||
|
|
||||||
|
|
||||||
// 获取拼图验证
|
// 获取拼图验证
|
||||||
export const getVerifyImg = (verificationEnums) => {
|
export const getVerifyImg = (verificationEnums) => {
|
||||||
return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
|
return getRequestWithNoToken(`${sellerUrl}/store/common/slider/${verificationEnums}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 拼图验证
|
// 拼图验证
|
||||||
export const postVerifyImg = (params) => {
|
export const postVerifyImg = (params) => {
|
||||||
return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
|
return postRequestWithNoToken(`${sellerUrl}/store/common/slider/${params.verificationEnums}`, params);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
<el-upload
|
<el-upload
|
||||||
v-if="canUploadImages"
|
v-if="canUploadImages"
|
||||||
ref="up"
|
ref="up"
|
||||||
:action="commonUrl + '/common/common/upload/file'"
|
:action="sellerUrl + '/store/common/upload/file'"
|
||||||
:data="uploadData"
|
:data="uploadData"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
@@ -317,7 +317,7 @@ import {
|
|||||||
updateFileDirectory,
|
updateFileDirectory,
|
||||||
} from "@/api/index";
|
} from "@/api/index";
|
||||||
import DPlayer from "dplayer";
|
import DPlayer from "dplayer";
|
||||||
import {commonUrl} from "@/libs/axios";
|
import {sellerUrl} from "@/libs/axios";
|
||||||
|
|
||||||
import config from "@/config/index";
|
import config from "@/config/index";
|
||||||
import playImg from "@/assets/play.png";
|
import playImg from "@/assets/play.png";
|
||||||
@@ -342,7 +342,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
commonUrl, // 上传文件路径
|
sellerUrl, // 上传文件路径
|
||||||
config, // api地址
|
config, // api地址
|
||||||
fileDirectoryId: "",
|
fileDirectoryId: "",
|
||||||
groupFormValidate: {
|
groupFormValidate: {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
<el-form-item v-if="canUploadImages">
|
<el-form-item v-if="canUploadImages">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="up"
|
ref="up"
|
||||||
:action="commonUrl + '/common/common/upload/file'"
|
:action="sellerUrl + '/store/common/upload/file'"
|
||||||
:data="uploadData"
|
:data="uploadData"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
@@ -313,7 +313,7 @@ import {
|
|||||||
updateFileDirectory,
|
updateFileDirectory,
|
||||||
} from "@/api/index";
|
} from "@/api/index";
|
||||||
import DPlayer from "dplayer";
|
import DPlayer from "dplayer";
|
||||||
import {commonUrl} from "@/libs/axios";
|
import {sellerUrl} from "@/libs/axios";
|
||||||
|
|
||||||
import config from "@/config/index";
|
import config from "@/config/index";
|
||||||
import playImg from "@/assets/play.png";
|
import playImg from "@/assets/play.png";
|
||||||
@@ -342,7 +342,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
commonUrl, // 上传文件路径
|
sellerUrl, // 上传文件路径
|
||||||
config, // api地址
|
config, // api地址
|
||||||
fileDirectoryId: "",
|
fileDirectoryId: "",
|
||||||
groupFormValidate: {
|
groupFormValidate: {
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
<el-upload
|
<el-upload
|
||||||
v-if="canUploadImages"
|
v-if="canUploadImages"
|
||||||
ref="up"
|
ref="up"
|
||||||
:action="commonUrl + '/common/common/upload/file'"
|
:action="sellerUrl + '/store/common/upload/file'"
|
||||||
:data="uploadData"
|
:data="uploadData"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
@@ -323,7 +323,7 @@ import {
|
|||||||
updateFileDirectory,
|
updateFileDirectory,
|
||||||
} from "@/api/index";
|
} from "@/api/index";
|
||||||
import DPlayer from "dplayer";
|
import DPlayer from "dplayer";
|
||||||
import {commonUrl} from "@/libs/axios";
|
import {sellerUrl} from "@/libs/axios";
|
||||||
|
|
||||||
import config from "@/config/index";
|
import config from "@/config/index";
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
commonUrl, // 上传文件路径
|
sellerUrl, // 上传文件路径
|
||||||
config, // api地址
|
config, // api地址
|
||||||
fileDirectoryId: "",
|
fileDirectoryId: "",
|
||||||
groupFormValidate: {
|
groupFormValidate: {
|
||||||
|
|||||||
Reference in New Issue
Block a user