From fa41413b883ec5fe66c21433b448b27953047620 Mon Sep 17 00:00:00 2001 From: sj <1304317391@qq.com> Date: Tue, 8 Nov 2022 13:48:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A6=9C=E5=8D=95=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/material/index.vue | 6 ++++++ src/utils/request.js | 10 +++++++++- src/views/bxg/activity/bargain/form.vue | 15 +++++++++------ src/views/bxg/activity/bargain/index.vue | 3 ++- src/views/bxg/activity/combination/form.vue | 14 +++++++------- src/views/bxg/shop/yxStoreHotList/index.vue | 8 ++++---- 6 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/components/material/index.vue b/src/components/material/index.vue index 19a546b..f1c0323 100644 --- a/src/components/material/index.vue +++ b/src/components/material/index.vue @@ -172,6 +172,12 @@ export default { return 5 } }, + // disabled:{ + // type:Boolean, + // default(){ + // return false + // } + // }, // 宽度 width: { type: Number, diff --git a/src/utils/request.js b/src/utils/request.js index cf716e6..ead5e25 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -61,6 +61,7 @@ service.interceptors.request.use(config => { // 响应拦截器 service.interceptors.response.use(res => { + // console.log('res1111111111',res) // 未设置状态码则默认成功状态 const code = res.data.code || 200; // 获取错误信息 @@ -89,7 +90,14 @@ service.interceptors.response.use(res => { type: 'error' }) return Promise.reject(new Error(msg)) - } else if (code === 901) { + }else if(res.data.status === 500){ + Message({ + message: msg, + type: 'error' + }) + return Promise.reject(new Error(msg)) + } + else if (code === 901) { Message({ type: 'error', duration: 0, diff --git a/src/views/bxg/activity/bargain/form.vue b/src/views/bxg/activity/bargain/form.vue index 6420b7e..198e232 100644 --- a/src/views/bxg/activity/bargain/form.vue +++ b/src/views/bxg/activity/bargain/form.vue @@ -6,14 +6,17 @@ - + + + + - + - + - + @@ -208,9 +211,9 @@ export default { Object.keys(that.form).forEach(key=>{ if(data[key]) that.form[key] = data[key]; }) - that.form.productId = data.id + that.form.productId = data.id; + that.form.storeName = data.store_name; that.form.cate_id = cate_id; - that.form.title = data.store_name that.form.info = data.store_info that.form.unitName = data.unit_name that.form.imageArr = data.image diff --git a/src/views/bxg/activity/bargain/index.vue b/src/views/bxg/activity/bargain/index.vue index 72b0c12..60b7ce4 100644 --- a/src/views/bxg/activity/bargain/index.vue +++ b/src/views/bxg/activity/bargain/index.vue @@ -24,7 +24,8 @@ - + +