diff --git a/.env.development b/.env.development index 2378386..219bbb7 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,17 @@ # 本地环境 ENV = 'development' -# 本地环境接口地址 -VITE_API_URL = 'http://localhost:8808/' - +# ============================================================ +# 后端服务地址配置 +# 切换环境时,修改下面两个地址的 IP 即可 +# 当前环境: 192.168.3.11(本地开发地址) +# 备用环境: 192.168.3.200(服务器地址) +# ============================================================ +# 主服务地址(端口8808) +# 用途: 系统管理、用户认证、权限控制、模块开通等原有功能 +VITE_API_URL = 'http://192.168.3.200:8808/' +# 新功能服务地址(端口8000) +# 用途: 资产管理、分类、SKU、订单等新业务模块 +VITE_NEW_API_URL = 'http://192.168.3.200:8000/' diff --git a/public/web/subscribe.html b/public/web/subscribe.html new file mode 100644 index 0000000..d3cc214 --- /dev/null +++ b/public/web/subscribe.html @@ -0,0 +1,744 @@ + + + + + + 服务开通 - 智能营销服务平台 + + + + + + + + + + +
+
+

开通服务

+

选择适合您的套餐,立即开通使用

+
+ + +
+
+

正在加载套餐信息...

+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + diff --git a/src/api/assets/asset/index.ts b/src/api/assets/asset/index.ts index 8932121..f36e3f9 100644 --- a/src/api/assets/asset/index.ts +++ b/src/api/assets/asset/index.ts @@ -5,7 +5,7 @@ export interface AssetQueryParams { name?: string; type?: string; status?: number; - page?: number; + pageNum?: number; pageSize?: number; } @@ -92,7 +92,7 @@ export interface SkuQueryParams { keyword?: string; minPrice?: number; maxPrice?: number; - page?: number; + pageNum?: number; pageSize?: number; } @@ -119,6 +119,15 @@ export function listAssetSkus(params: SkuQueryParams) { }); } +// 根据assetId获取资产和SKU信息(用于套餐开通弹窗) +export function getAssetAndSku(params: { assetId: string }) { + return newService({ + url: '/assets/asset/getAssetAndSku', + method: 'get', + params, + }); +} + // 创建 SKU export function createAssetSku(data: CreateSkuParams) { return newService({ @@ -137,8 +146,8 @@ export function getAssetSku(id: string) { }); } -// 修改 SKU -export function updateAssetSku(data: CreateSkuParams & { id: string }) { +// 修改 SKU(支持部分更新,只传递修改过的字段) +export function updateAssetSku(data: Partial & { id: string }) { return newService({ url: '/assets/asset/sku/updateAssetSku', method: 'put', @@ -154,3 +163,84 @@ export function deleteAssetSku(id: string) { params: { id }, }); } + +// 获取规格单位选项 +export function getSpecsUnitOptions(assetType: string) { + return newService({ + url: '/assets/enum/getSpecsUnit', + method: 'get', + params: { assetType }, + }); +} + +// 获取库存表单字段 +export function getStockFormFields(assetSkuId: string) { + return newService({ + url: '/assets/stock/manage/getStockFormFields', + method: 'get', + params: { assetSkuId }, + }); +} + +// 库存操作 +export interface StockOperationParams { + assetSkuId: string; + stock?: number; + batchNo?: string; + productionDate?: string; + expiryDate?: string; + expiryWarningDate?: string; + [key: string]: any; // 支持动态字段 +} + +export function stockOperation(data: StockOperationParams) { + return newService({ + url: '/assets/stock/manage/stockOperation', + method: 'post', + data, + }); +} + +// 操作日志查询参数 +export interface LogQueryParams { + collection_id: string; + pageNum?: number; + pageSize?: number; +} + +// 操作日志信息 +export interface OperationLogInfo { + id: string; + service_name: string; + collection: string; + collection_id: string[]; + operation: string; + creator: string; + createdAt: string; + data: { FieldName: string; FieldValue: any }[] | null; + ip_address: string; +} + +// 查询操作日志 +export function listLogs(params: LogQueryParams) { + return newService({ + url: '/assets/log/listLogs', + method: 'get', + params, + }); +} + +// 订阅/开通资产服务参数 +export interface SubscribeAssetParams { + skuId: string; + assetId?: string; +} + +// 订阅/开通资产服务 +export function subscribeAsset(data: SubscribeAssetParams) { + return newService({ + url: '/assets/asset/subscribe', + method: 'post', + data, + }); +} diff --git a/src/api/assets/category/index.ts b/src/api/assets/category/index.ts index b8f7316..ab5943a 100644 --- a/src/api/assets/category/index.ts +++ b/src/api/assets/category/index.ts @@ -23,7 +23,7 @@ export function getCategory(id: string) { // 获取属性类型选项 export function getCategoryAttrTypeOptions() { return newService({ - url: '/assets/category/getCategoryAttrTypeOptions', + url: '/assets/enum/getCategoryAttrType', method: 'get', }); } diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index 68dc955..f72ed10 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -10,7 +10,7 @@ export function getRoleList(query:Object) { export function getRoleParams() { return request({ - url: '/api/v1/system/role/getParams', + url: '/api/v1/system/role/getParamsInfo', method: 'get' }) } diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index e036799..bfb063a 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -2,7 +2,7 @@ import request from '/@/utils/request'; export function getUserList(query:Object) { return request({ - url: '/api/v1/system/user/list', + url: '/api/v1/system/user/getList', method: 'get', params:query }) @@ -17,7 +17,7 @@ export function getDeptTree() { export function getParams() { return request({ - url: '/api/v1/system/user/params', + url: '/api/v1/system/user/paramsInfo', method: 'get' }) } diff --git a/src/layout/logo/index.vue b/src/layout/logo/index.vue index 67178af..ec68cdb 100644 --- a/src/layout/logo/index.vue +++ b/src/layout/logo/index.vue @@ -1,9 +1,9 @@ @@ -11,6 +11,7 @@ + + diff --git a/src/views/customerService/account/component/editAccount.vue b/src/views/customerService/account/component/editAccount.vue index 1906b15..c7e613b 100644 --- a/src/views/customerService/account/component/editAccount.vue +++ b/src/views/customerService/account/component/editAccount.vue @@ -171,7 +171,7 @@ const onSubmit = async () => { emit('refresh'); } catch (error) { console.error('操作失败:', error); - ElMessage.error(state.formData.id ? '修改失败' : '添加失败'); + // 错误已由请求拦截器统一处理 } finally { state.loading = false; } diff --git a/src/views/customerService/account/component/promptConfig.vue b/src/views/customerService/account/component/promptConfig.vue index af69cf9..1fa0eaa 100644 --- a/src/views/customerService/account/component/promptConfig.vue +++ b/src/views/customerService/account/component/promptConfig.vue @@ -144,10 +144,11 @@ const onSubmit = async () => { closeDialog(); emit('refresh'); } else { - ElMessage.error(res.message || '配置失败'); + // 错误已由请求拦截器统一处理 } } catch (error: any) { - ElMessage.error(error.message || '配置失败'); + console.error('配置失败:', error); + // 错误已由请求拦截器统一处理 } finally { state.loading = false; } diff --git a/src/views/customerService/account/index.vue b/src/views/customerService/account/index.vue index 6f99d8d..f42b91f 100644 --- a/src/views/customerService/account/index.vue +++ b/src/views/customerService/account/index.vue @@ -173,7 +173,7 @@ const getList = async () => { } } catch (error) { console.error('获取客服账号列表失败:', error); - ElMessage.error('获取数据失败'); + // 错误已由请求拦截器统一处理 tableData.data = []; tableData.total = 0; } finally { @@ -267,7 +267,7 @@ const handleStatusChange = async (row: TableDataItem) => { return; } console.error('状态切换失败:', error); - ElMessage.error('状态切换失败'); + // 错误已由请求拦截器统一处理 } finally { setTimeout(() => { row.statusLoading = false; diff --git a/src/views/customerService/product/component/editRole.vue b/src/views/customerService/product/component/editRole.vue index 06c913e..f77a082 100644 --- a/src/views/customerService/product/component/editRole.vue +++ b/src/views/customerService/product/component/editRole.vue @@ -115,7 +115,7 @@ const openDialog = async (row?: ProductFormData) => { state.isShowDialog = true; } catch (error) { console.error('打开对话框失败:', error); - ElMessage.error('初始化数据失败'); + // 错误已由请求拦截器统一处理 } }; @@ -155,7 +155,7 @@ const onCancel = () => { */ const onSubmit = async () => { if (!formRef.value) { - ElMessage.error('表单引用不存在'); + console.error('表单引用不存在'); return; } @@ -189,7 +189,7 @@ const onSubmit = async () => { emit('refresh'); } catch (error) { console.error('提交失败:', error); - ElMessage.error(state.formData.id === 0 ? '添加失败' : '修改失败'); + // 错误已由请求拦截器统一处理 } finally { state.loading = false; } diff --git a/src/views/customerService/product/component/exportDialog.vue b/src/views/customerService/product/component/exportDialog.vue index e440edb..b473acc 100644 --- a/src/views/customerService/product/component/exportDialog.vue +++ b/src/views/customerService/product/component/exportDialog.vue @@ -74,7 +74,7 @@ const handleExport = async () => { isShowDialog.value = false; } catch (error: any) { console.error('导出失败:', error); - ElMessage.error(`导出失败:${error.message || '未知错误'}`); + // 错误已由请求拦截器统一处理 } finally { loading.value = false; } diff --git a/src/views/customerService/product/component/importDialog.vue b/src/views/customerService/product/component/importDialog.vue index 1d2109e..dd69461 100644 --- a/src/views/customerService/product/component/importDialog.vue +++ b/src/views/customerService/product/component/importDialog.vue @@ -288,7 +288,7 @@ const handleCustomUpload = async (file: File) => { success: false, message: error.message || '导入失败', }; - ElMessage.error(`导入失败:${error.message || '未知错误'}`); + // 错误已由请求拦截器统一处理 } }; @@ -324,7 +324,8 @@ const handleDownloadTemplate = async () => { saveAs(zipBlob, filename); ElMessage.success(`模板下载成功!`); } catch (error: any) { - ElMessage.error(`模板下载失败:${error.message || '未知错误'}`); + console.error('模板下载失败:', error); + // 错误已由请求拦截器统一处理 } finally { downloadLoading.value = false; } @@ -343,7 +344,7 @@ const handleUploadSuccess = (response: any, file: UploadFile, fileList: UploadFi */ const handleUploadError = (error: Error, file: UploadFile, fileList: UploadFiles) => { console.error('上传失败回调', error); - ElMessage.error('文件上传失败'); + // 错误已由请求拦截器统一处理 // 手动上传模式下不会执行到这里 }; diff --git a/src/views/customerService/product/index.vue b/src/views/customerService/product/index.vue index 35ab69a..8b9d0ed 100644 --- a/src/views/customerService/product/index.vue +++ b/src/views/customerService/product/index.vue @@ -173,7 +173,7 @@ const getProductList = async () => { } } catch (error) { console.error('获取产品列表失败:', error); - ElMessage.error('获取产品列表失败'); + // 错误已由请求拦截器统一处理,此处不再重复提示 } finally { tableData.loading = false; } diff --git a/src/views/customerService/report/component/exportDialog.vue b/src/views/customerService/report/component/exportDialog.vue index fcba1be..03cfd7d 100644 --- a/src/views/customerService/report/component/exportDialog.vue +++ b/src/views/customerService/report/component/exportDialog.vue @@ -74,7 +74,7 @@ const handleExport = async () => { isShowDialog.value = false; } catch (error: any) { console.error('导出失败:', error); - ElMessage.error(`导出失败:${error.message || '未知错误'}`); + // 错误已由请求拦截器统一处理 } finally { loading.value = false; } diff --git a/src/views/customerService/report/index.vue b/src/views/customerService/report/index.vue index a27b439..ee8ccab 100644 --- a/src/views/customerService/report/index.vue +++ b/src/views/customerService/report/index.vue @@ -201,7 +201,7 @@ const dataList = async () => { tableData.total = res.data.total; } catch (error) { console.error('获取数据失败:', error); - ElMessage.error('获取数据失败'); + // 错误已由请求拦截器统一处理 } finally { tableData.loading = false; } diff --git a/src/views/customerService/script/component/editRole.vue b/src/views/customerService/script/component/editRole.vue index b0f66cd..02a96cf 100644 --- a/src/views/customerService/script/component/editRole.vue +++ b/src/views/customerService/script/component/editRole.vue @@ -162,7 +162,7 @@ const onSubmit = async () => { emit('refresh'); } catch (error) { console.error('提交失败:', error); - ElMessage.error('操作失败'); + // 错误已由请求拦截器统一处理 } finally { state.loading = false; } diff --git a/src/views/customerService/script/index.vue b/src/views/customerService/script/index.vue index d4dc424..7d7e0df 100644 --- a/src/views/customerService/script/index.vue +++ b/src/views/customerService/script/index.vue @@ -197,7 +197,7 @@ const loadTableData = async () => { tableData.total = total; } catch (error) { console.error('加载数据失败:', error); - ElMessage.error('数据加载失败'); + // 错误已由请求拦截器统一处理 tableData.data = []; tableData.total = 0; } finally { @@ -238,7 +238,7 @@ const handleDelete = async (row: ScriptItem) => { } catch (error) { if (error !== 'cancel') { console.error('删除失败:', error); - ElMessage.error('删除失败'); + // 错误已由请求拦截器统一处理 } } }; diff --git a/src/views/digitalHuman/audioAssets/index.vue b/src/views/digitalHuman/audioAssets/index.vue new file mode 100644 index 0000000..f373694 --- /dev/null +++ b/src/views/digitalHuman/audioAssets/index.vue @@ -0,0 +1,368 @@ + + + + + diff --git a/src/views/digitalHuman/avatar/index.vue b/src/views/digitalHuman/avatar/index.vue new file mode 100644 index 0000000..7110195 --- /dev/null +++ b/src/views/digitalHuman/avatar/index.vue @@ -0,0 +1,340 @@ + + + + + diff --git a/src/views/digitalHuman/videoAssets/index.vue b/src/views/digitalHuman/videoAssets/index.vue new file mode 100644 index 0000000..1b05a8a --- /dev/null +++ b/src/views/digitalHuman/videoAssets/index.vue @@ -0,0 +1,483 @@ + + + + + diff --git a/src/views/system/user/component/editUser.vue b/src/views/system/user/component/editUser.vue index 7141a76..7cc544a 100644 --- a/src/views/system/user/component/editUser.vue +++ b/src/views/system/user/component/editUser.vue @@ -67,13 +67,13 @@ --> - +
- + +