mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 10:57:26 +08:00
解决 Profile.vue 合并冲突,同步master代码
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,8 +47,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
import { editMemberInfo } from '@/api/account.js';
|
import { editMemberInfo } from '@/api/account.js';
|
||||||
|
<<<<<<< HEAD
|
||||||
import { getMemberMsg } from '@/api/login.js';
|
import { getMemberMsg } from '@/api/login.js';
|
||||||
import { commonUrl } from '@/plugins/request.js';
|
import { commonUrl } from '@/plugins/request.js';
|
||||||
|
=======
|
||||||
|
import { buyerUrl } from '@/plugins/request.js';
|
||||||
|
>>>>>>> 29d5ba98ff40ecd028bcd8d89bf410f952052931
|
||||||
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 {
|
||||||
@@ -60,7 +64,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({
|
||||||
|
|||||||
@@ -17,6 +17,17 @@ export interface LiveRoomForm {
|
|||||||
endTime?: string
|
endTime?: string
|
||||||
pushStreamServer?: string
|
pushStreamServer?: string
|
||||||
pushStreamCode?: string
|
pushStreamCode?: string
|
||||||
|
imSdkAppid?: string | number
|
||||||
|
imSdkAppId?: string | number
|
||||||
|
sdkAppId?: string | number
|
||||||
|
imSdkSecretKey?: string
|
||||||
|
sdkSecretKey?: string
|
||||||
|
secretKey?: string
|
||||||
|
userSig?: string
|
||||||
|
imUserSig?: string
|
||||||
|
adminUserSig?: string
|
||||||
|
imGroupId?: string
|
||||||
|
groupId?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LiveCoupon {
|
export interface LiveCoupon {
|
||||||
|
|||||||
@@ -38,9 +38,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="160" fixed="right" align="center">
|
<el-table-column label="操作" width="160" fixed="right" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
<template v-if="canPassAuth(row)">
|
||||||
<a class="link-text" @click="handleAuth(row, 'PASS')">通过</a>
|
<a class="link-text" @click="handleAuth(row, 'PASS')">通过</a>
|
||||||
|
</template>
|
||||||
|
<template v-if="canPassAuth(row) && canRejectAuth(row)">
|
||||||
<span class="op-split">|</span>
|
<span class="op-split">|</span>
|
||||||
<a class="link-text" @click="handleAuth(row, 'REJECT')">拒绝</a>
|
</template>
|
||||||
|
<a v-if="canRejectAuth(row)" class="link-text" @click="handleAuth(row, 'REFUSE')">拒绝</a>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -82,9 +86,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="160" fixed="right" align="center">
|
<el-table-column label="操作" width="160" fixed="right" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
<template v-if="canPassAuth(row)">
|
||||||
<a class="link-text" @click="handleAuth(row, 'PASS')">通过</a>
|
<a class="link-text" @click="handleAuth(row, 'PASS')">通过</a>
|
||||||
|
</template>
|
||||||
|
<template v-if="canPassAuth(row) && canRejectAuth(row)">
|
||||||
<span class="op-split">|</span>
|
<span class="op-split">|</span>
|
||||||
<a class="link-text" @click="handleAuth(row, 'REJECT')">拒绝</a>
|
</template>
|
||||||
|
<a v-if="canRejectAuth(row)" class="link-text" @click="handleAuth(row, 'REFUSE')">拒绝</a>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -262,6 +270,14 @@ export default {
|
|||||||
const map = { PASS: "success", REFUSE: "danger", TOBEAUDITED: "warning" };
|
const map = { PASS: "success", REFUSE: "danger", TOBEAUDITED: "warning" };
|
||||||
return map[status] || "info";
|
return map[status] || "info";
|
||||||
},
|
},
|
||||||
|
canPassAuth(row) {
|
||||||
|
const status = row?.authStatus;
|
||||||
|
return status === "TOBEAUDITED" || status === "REFUSE" || !status;
|
||||||
|
},
|
||||||
|
canRejectAuth(row) {
|
||||||
|
const status = row?.authStatus;
|
||||||
|
return status === "TOBEAUDITED" || status === "PASS" || !status;
|
||||||
|
},
|
||||||
parsePageResult(res) {
|
parsePageResult(res) {
|
||||||
if (!res) return { records: [], total: 0 };
|
if (!res) return { records: [], total: 0 };
|
||||||
if (res.records) {
|
if (res.records) {
|
||||||
@@ -342,7 +358,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleAuth(record, authStatus) {
|
handleAuth(record, authStatus) {
|
||||||
authLiveMessage({ id: record.id, authStatus }).then((res) => {
|
authLiveMessage({
|
||||||
|
...record,
|
||||||
|
authStatus,
|
||||||
|
}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("操作成功");
|
this.$Message.success("操作成功");
|
||||||
this.loadMessages();
|
this.loadMessages();
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { toRef } from "vue";
|
import { toRef } from "vue";
|
||||||
import { useChat } from "../composables/useChat";
|
import { useChat } from "../composables/useChat";
|
||||||
|
import { resolveImConfigFromDetail } from "../composables/useLiveSetting";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "LiveChatPanel",
|
name: "LiveChatPanel",
|
||||||
@@ -71,7 +72,7 @@ export default {
|
|||||||
userInfo = {};
|
userInfo = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
return useChat(toRef(props, "liveId"), userInfo);
|
return useChat(toRef(props, "liveId"), userInfo, toRef(props, "liveDetail"));
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -84,30 +85,60 @@ export default {
|
|||||||
imGroupId() {
|
imGroupId() {
|
||||||
return this.liveDetail?.imGroupId || this.liveDetail?.groupId || this.liveId || "";
|
return this.liveDetail?.imGroupId || this.liveDetail?.groupId || this.liveId || "";
|
||||||
},
|
},
|
||||||
|
imSdkAppId() {
|
||||||
|
return resolveImConfigFromDetail(this.liveDetail).sdkAppId;
|
||||||
|
},
|
||||||
|
canInitChat() {
|
||||||
|
const { sdkAppId, secretKey, userSig } = resolveImConfigFromDetail(this.liveDetail);
|
||||||
|
return !!(this.imGroupId && sdkAppId && (userSig || secretKey));
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
imGroupId: {
|
canInitChat: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(id) {
|
handler(ready) {
|
||||||
if (!id) return;
|
if (!ready) return;
|
||||||
this.setGroupID(id);
|
this.setGroupID(this.imGroupId);
|
||||||
if (this.active) {
|
if (this.active) {
|
||||||
this.bootstrapChat();
|
this.bootstrapChat();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
imGroupId(id) {
|
||||||
|
if (!id) return;
|
||||||
|
this.setGroupID(id);
|
||||||
|
},
|
||||||
active(val) {
|
active(val) {
|
||||||
if (val && this.imGroupId && !this.chatInited) {
|
if (val && this.canInitChat && !this.chatInited) {
|
||||||
this.bootstrapChat();
|
this.bootstrapChat();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
liveId() {
|
liveId() {
|
||||||
this.chatInited = false;
|
this.chatInited = false;
|
||||||
this.cleanup();
|
this.cleanup();
|
||||||
if (this.active && this.imGroupId) {
|
if (this.active && this.canInitChat) {
|
||||||
this.bootstrapChat();
|
this.bootstrapChat();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
liveDetail: {
|
||||||
|
deep: true,
|
||||||
|
handler(detail, oldDetail) {
|
||||||
|
const nextConfig = resolveImConfigFromDetail(detail);
|
||||||
|
const prevConfig = resolveImConfigFromDetail(oldDetail);
|
||||||
|
if (
|
||||||
|
nextConfig.sdkAppId &&
|
||||||
|
(nextConfig.sdkAppId !== prevConfig.sdkAppId ||
|
||||||
|
nextConfig.secretKey !== prevConfig.secretKey ||
|
||||||
|
nextConfig.userSig !== prevConfig.userSig)
|
||||||
|
) {
|
||||||
|
this.chatInited = false;
|
||||||
|
this.cleanup();
|
||||||
|
if (this.active && this.canInitChat) {
|
||||||
|
this.bootstrapChat();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
this.cleanup();
|
this.cleanup();
|
||||||
@@ -117,7 +148,7 @@ export default {
|
|||||||
this.createTextMessageByInput();
|
this.createTextMessageByInput();
|
||||||
},
|
},
|
||||||
async bootstrapChat() {
|
async bootstrapChat() {
|
||||||
if (!this.liveId || this.chatInited || this.initializing) {
|
if (!this.liveId || this.chatInited || this.initializing || !this.canInitChat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ import { nextTick, ref, unref, watch } from "vue";
|
|||||||
import { postSendMessage } from "@/api/live";
|
import { postSendMessage } from "@/api/live";
|
||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
import TencentCloudChat from "@tencentcloud/chat";
|
import TencentCloudChat from "@tencentcloud/chat";
|
||||||
import { fetchLiveSetting } from "./useLiveSetting";
|
import { resolveImConfigFromDetail } from "./useLiveSetting";
|
||||||
import { genTestUserSig } from "../utils/GenerateTestUserSig";
|
import { genTestUserSig } from "../utils/GenerateTestUserSig";
|
||||||
|
|
||||||
const MAX_MESSAGE_COUNT = 100;
|
const MAX_MESSAGE_COUNT = 100;
|
||||||
const ADMIN_IM_USER_ID = "admin";
|
const ADMIN_IM_USER_ID = "admin";
|
||||||
|
|
||||||
export function useChat(liveId, userInfo) {
|
export function useChat(liveId, userInfo, liveDetail) {
|
||||||
const chat = ref(null);
|
const chat = ref(null);
|
||||||
const groupID = ref("");
|
const groupID = ref("");
|
||||||
const messageList = ref([]);
|
const messageList = ref([]);
|
||||||
@@ -67,22 +67,25 @@ export function useChat(liveId, userInfo) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const setting = await fetchLiveSetting();
|
const detail = unref(liveDetail) || {};
|
||||||
if (!setting?.imSdkAppid) {
|
const { sdkAppId, secretKey, userSig: detailUserSig } = resolveImConfigFromDetail(detail);
|
||||||
initError.value = "请先在系统设置中配置直播 IM SDK APPID";
|
if (!sdkAppId) {
|
||||||
return;
|
initError.value = "直播间详情缺少 IM SDK APPID";
|
||||||
}
|
|
||||||
if (!setting?.imSdkSecretKey) {
|
|
||||||
initError.value = "请先在系统设置中配置直播 IM SDK 密钥";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sdkAppId = Number(setting.imSdkAppid);
|
let userSig = detailUserSig;
|
||||||
const { userSig } = genTestUserSig({
|
if (!userSig) {
|
||||||
|
if (!secretKey) {
|
||||||
|
initError.value = "直播间详情缺少 IM 登录凭证";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
userSig = genTestUserSig({
|
||||||
SDKAppID: sdkAppId,
|
SDKAppID: sdkAppId,
|
||||||
secretKey: setting.imSdkSecretKey,
|
secretKey,
|
||||||
userID: ADMIN_IM_USER_ID,
|
userID: ADMIN_IM_USER_ID,
|
||||||
});
|
}).userSig;
|
||||||
|
}
|
||||||
|
|
||||||
if (chat.value) {
|
if (chat.value) {
|
||||||
detachChatEvents(chat.value);
|
detachChatEvents(chat.value);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export async function fetchLiveSetting(force = false) {
|
|||||||
return fetchingPromise;
|
return fetchingPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 解析 IM SDK AppID */
|
/** 解析 IM SDK AppID(系统设置,兼容旧逻辑) */
|
||||||
export function resolveSdkAppId(setting) {
|
export function resolveSdkAppId(setting) {
|
||||||
if (!setting?.imSdkAppid) {
|
if (!setting?.imSdkAppid) {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -42,3 +42,30 @@ export function resolveSdkAppId(setting) {
|
|||||||
const id = Number(setting.imSdkAppid);
|
const id = Number(setting.imSdkAppid);
|
||||||
return Number.isNaN(id) ? 0 : id;
|
return Number.isNaN(id) ? 0 : id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 从直播间详情解析 IM SDK AppID */
|
||||||
|
export function resolveSdkAppIdFromDetail(detail) {
|
||||||
|
return resolveImConfigFromDetail(detail).sdkAppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 从直播间详情解析 IM 配置 */
|
||||||
|
export function resolveImConfigFromDetail(detail) {
|
||||||
|
if (!detail) {
|
||||||
|
return { sdkAppId: 0, secretKey: "", userSig: "" };
|
||||||
|
}
|
||||||
|
|
||||||
|
const sdkRaw = detail.sdkAppId ?? detail.imSdkAppId ?? detail.imSdkAppid;
|
||||||
|
const sdkAppId =
|
||||||
|
sdkRaw == null || sdkRaw === "" ? 0 : Number(sdkRaw);
|
||||||
|
|
||||||
|
const secretKey =
|
||||||
|
detail.imSdkSecretKey ?? detail.sdkSecretKey ?? detail.secretKey ?? "";
|
||||||
|
const userSig =
|
||||||
|
detail.userSig ?? detail.imUserSig ?? detail.adminUserSig ?? "";
|
||||||
|
|
||||||
|
return {
|
||||||
|
sdkAppId: Number.isNaN(sdkAppId) ? 0 : sdkAppId,
|
||||||
|
secretKey: String(secretKey || ""),
|
||||||
|
userSig: String(userSig || ""),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -239,7 +239,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getSetting } from "@/api/index";
|
|
||||||
import {
|
import {
|
||||||
endLive,
|
endLive,
|
||||||
getLiveInfo,
|
getLiveInfo,
|
||||||
@@ -363,7 +362,6 @@ export default {
|
|||||||
this.$Message.error("缺少直播ID");
|
this.$Message.error("缺少直播ID");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.loadWapSetting();
|
|
||||||
this.refreshAll();
|
this.refreshAll();
|
||||||
this.startDurationTimer();
|
this.startDurationTimer();
|
||||||
},
|
},
|
||||||
@@ -644,7 +642,7 @@ export default {
|
|||||||
},
|
},
|
||||||
buildShareUrl() {
|
buildShareUrl() {
|
||||||
const base = (this.wapUrl || BASE?.WAP_URL || config.website || "").replace(/\/?$/, "/");
|
const base = (this.wapUrl || BASE?.WAP_URL || config.website || "").replace(/\/?$/, "/");
|
||||||
return `${base}pages/promotions/live/detail?id=${this.liveId}`;
|
return `${base}pages/promotion/live/room?id=${this.liveId}`;
|
||||||
},
|
},
|
||||||
handleShare() {
|
handleShare() {
|
||||||
const url = this.buildShareUrl();
|
const url = this.buildShareUrl();
|
||||||
@@ -692,15 +690,6 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadWapSetting() {
|
|
||||||
getSetting("BASE_SETTING")
|
|
||||||
.then((res) => {
|
|
||||||
if (res.success && res.result?.buyerDomain) {
|
|
||||||
this.wapUrl = res.result.buyerDomain;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ export default {
|
|||||||
},
|
},
|
||||||
buildH5ShareUrl(liveId) {
|
buildH5ShareUrl(liveId) {
|
||||||
const base = (this.wapUrl || BASE?.WAP_URL || config.website || "").replace(/\/?$/, "/");
|
const base = (this.wapUrl || BASE?.WAP_URL || config.website || "").replace(/\/?$/, "/");
|
||||||
return `${base}pages/promotions/live/detail?id=${liveId}`;
|
return `${base}pages/promotion/live/room?id=${liveId}`;
|
||||||
},
|
},
|
||||||
handleShare(row) {
|
handleShare(row) {
|
||||||
this.shareTitle = row.title || "";
|
this.shareTitle = row.title || "";
|
||||||
@@ -246,8 +246,40 @@ export default {
|
|||||||
},
|
},
|
||||||
copyShareUrl() {
|
copyShareUrl() {
|
||||||
if (!this.shareH5Url) return;
|
if (!this.shareH5Url) return;
|
||||||
navigator.clipboard.writeText(this.shareH5Url);
|
this.copyText(this.shareH5Url);
|
||||||
this.$Message.success("链接已复制");
|
},
|
||||||
|
copyText(text) {
|
||||||
|
const onSuccess = () => this.$Message.success("链接已复制");
|
||||||
|
const onFail = () => this.$Message.error("复制失败,请手动复制");
|
||||||
|
|
||||||
|
if (navigator.clipboard?.writeText) {
|
||||||
|
navigator.clipboard
|
||||||
|
.writeText(text)
|
||||||
|
.then(onSuccess)
|
||||||
|
.catch(() => {
|
||||||
|
this.copyTextFallback(text) ? onSuccess() : onFail();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.copyTextFallback(text) ? onSuccess() : onFail();
|
||||||
|
},
|
||||||
|
copyTextFallback(text) {
|
||||||
|
const textArea = document.createElement("textarea");
|
||||||
|
textArea.value = text;
|
||||||
|
textArea.style.position = "fixed";
|
||||||
|
textArea.style.left = "-9999px";
|
||||||
|
document.body.appendChild(textArea);
|
||||||
|
textArea.focus();
|
||||||
|
textArea.select();
|
||||||
|
let ok = false;
|
||||||
|
try {
|
||||||
|
ok = document.execCommand("copy");
|
||||||
|
} catch (e) {
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
document.body.removeChild(textArea);
|
||||||
|
return ok;
|
||||||
},
|
},
|
||||||
handleStart(row) {
|
handleStart(row) {
|
||||||
if (row.liveStatus === "LIVING") {
|
if (row.liveStatus === "LIVING") {
|
||||||
|
|||||||
@@ -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",
|
seller: "https://admin-api.pickmall.cn",
|
||||||
buyer: "https://buyer-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}`);
|
||||||
};
|
};
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.6 MiB After Width: | Height: | Size: 1.1 MiB |
@@ -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