diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 2ad9bc60..6c476b8c 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -20,8 +20,8 @@ export interface Sku { stock?: number // 库存 weight?: number // 商品重量,单位:kg 千克 volume?: number // 商品体积,单位:m^3 平米 - subCommissionFirstPrice?: number | string // 一级分销的佣金 - subCommissionSecondPrice?: number | string // 二级分销的佣金 + firstBrokerageRecord?: number | string // 一级分销的佣金 + secondBrokerageRecord?: number | string // 二级分销的佣金 salesCount?: number // 商品销量 } diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index 6f55b573..80669c57 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -51,11 +51,10 @@ export interface OrderVO { avatar?: string } // 订单操作日志 - logs?: logs[] + logs?: OrderLogRespVO[] } -// TODO @puhui999:OrderLogRespVO 会不会更好哈。 -export interface logs { +export interface OrderLogRespVO { content?: string createTime?: Date userType?: number diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index bc6dbe73..1a4741b6 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -191,11 +191,6 @@ service.interceptors.response.use( } return Promise.reject('error') } else { - // TODO @puhui999:这个先不用支持哈; - // 前端处理 data 为 null 的情况,进行提示 - if (data.msg !== '') { - ElNotification.error({ title: msg }) - } return data } }, diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index ffadf8b5..e8d01721 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -230,6 +230,7 @@ const getCookie = () => { } } } +const loading = ref() // ElLoading.service 返回的实例 // 登录 const handleLogin = async (params) => { loginLoading.value = true @@ -244,7 +245,7 @@ const handleLogin = async (params) => { if (!res) { return } - ElLoading.service({ + loading.value = ElLoading.service({ lock: true, text: '正在加载系统中...', background: 'rgba(0, 0, 0, 0.7)' @@ -264,13 +265,9 @@ const handleLogin = async (params) => { } else { push({ path: redirect.value || permissionStore.addRouters[0].path }) } - } catch { - loginLoading.value = false } finally { - setTimeout(() => { - const loadingInstance = ElLoading.service() - loadingInstance.close() - }, 400) + loginLoading.value = false + loading.value.close() } } diff --git a/src/views/mall/product/spu/components/SkuList.vue b/src/views/mall/product/spu/components/SkuList.vue index 81e2347d..fbbb96c8 100644 --- a/src/views/mall/product/spu/components/SkuList.vue +++ b/src/views/mall/product/spu/components/SkuList.vue @@ -80,7 +80,7 @@