From c810ab56ef6eaac2b1d69e689bf5598b91d4c727 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Tue, 9 Apr 2024 15:55:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=80=BB=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E5=95=86=E5=93=81=E7=BC=96=E8=BE=91=E6=97=B6=20?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=BC=96=E8=BE=91=E6=98=9F=E7=BA=A7=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E3=80=81=E5=95=86=E5=93=81=E6=8E=A8=E8=8D=90=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/addProduct/index.vue | 65 ++++++++++++++-------- src/views/product/productExamine/index.vue | 4 +- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue index a69eec4..18a839c 100644 --- a/src/views/product/addProduct/index.vue +++ b/src/views/product/addProduct/index.vue @@ -929,18 +929,15 @@ + + + + + - - + + {{ item.name }} @@ -969,7 +966,6 @@ 为0或者空则使用商户默认设置(实际支付的金额 * 倍数) - @@ -1179,7 +1175,7 @@ @@ -1439,9 +1435,13 @@ const defaultObj = { is_batch: 0, // 是否支持按批购买 batch_num: 0, // 一批等于多少 batch_unit: '', // 一批的单位 - sort: 0, + rank: 0, once_max_count: 0, is_good: 0, + is_benefit: 0, + is_hot: 0, + is_best: 0, + is_new: 0, temp_id: '', video_link: '', guarantee_template_id: '', @@ -1492,6 +1492,9 @@ const defaultObj = { // 积分抵扣 integral_deduction_type: 0, integral_deduction_money: 0, + // 其他营销内容设置 + star: 1, + } const objTitle = { price: { @@ -1519,7 +1522,13 @@ const objTitle = { title: '体积(m³)' } } -const proOptions = [{name: '店铺推荐', value: 'is_good'}] +const proOptions = [ + {name: '店铺推荐', value: 'is_good'}, + {name: '热门榜单', value: 'is_hot'}, + {name: '促销单品', value: 'is_benefit'}, + {name: '精品推荐', value: 'is_best'}, + {name: '首发新品', value: 'is_new'} +] export default { name: 'ProductProductAdd', components: { @@ -1536,6 +1545,7 @@ export default { data() { const url = SettingMer.https + '/upload/image/0/file?ueditor=1&token=' + getToken() return { + colors: ['#99A9BF', '#F7BA2A', '#FF9900'], myConfig: { autoHeightEnabled: false, // 编辑器不自动被内容撑高 initialFrameHeight: 500, // 初始容器高度 @@ -2133,9 +2143,11 @@ export default { this.$store.dispatch('tagsView/updateVisitedView', route) }, onChangeGroup() { - this.checkboxGroup.includes('is_good') - ? (this.formValidate.is_good = 1) - : (this.formValidate.is_good = 0) + this.checkboxGroup.includes('is_benefit') ? (this.formValidate.is_benefit = 1) : (this.formValidate.is_benefit = 0) + this.checkboxGroup.includes('is_hot') ? (this.formValidate.is_hot = 1) : (this.formValidate.is_hot = 0) + this.checkboxGroup.includes('is_best') ? (this.formValidate.is_best = 1) : (this.formValidate.is_best = 0) + this.checkboxGroup.includes('is_new') ? (this.formValidate.is_new = 1) : (this.formValidate.is_new = 0) + this.checkboxGroup.includes('is_good') ? (this.formValidate.is_good = 1) : (this.formValidate.is_good = 0) }, watCh(val) { const tmp = {} @@ -2699,10 +2711,15 @@ export default { cate_id: info.cate_id, // 平台分类id mer_cate_id: info.mer_cate_id || [], // 商户分类id unit_name: info.unit_name, - sort: info.sort, + rank: info.rank, once_max_count: info.once_max_count || 1, once_min_count: info.once_min_count || 0, - is_good: info.is_good, + is_good: info.is_good || 0, + is_benefit: info.is_benefit || 0, + is_hot: info.is_hot || 0, + is_best: info.is_best || 0, + is_new: info.is_new || 0, + star: info.star || 1, temp_id: info.temp_id, guarantee_template_id: info.guarantee_template_id ? info.guarantee_template_id : "", attr: info.attr, @@ -2764,9 +2781,13 @@ export default { this.ManyAttrValue = info.attrValue; this.generate(); } - if (this.formValidate.is_good === 1) { - this.checkboxGroup.push("is_good"); - } + + if (this.formValidate.is_benefit === 1) this.checkboxGroup.push("is_benefit"); + if (this.formValidate.is_hot === 1) this.checkboxGroup.push("is_hot"); + if (this.formValidate.is_best === 1) this.checkboxGroup.push("is_best"); + if (this.formValidate.is_new === 1) this.checkboxGroup.push("is_new"); + if (this.formValidate.is_good === 1) this.checkboxGroup.push("is_good"); + this.getAttr(); this.fullscreenLoading = false; }, diff --git a/src/views/product/productExamine/index.vue b/src/views/product/productExamine/index.vue index 0389c45..ed31ab7 100644 --- a/src/views/product/productExamine/index.vue +++ b/src/views/product/productExamine/index.vue @@ -146,7 +146,7 @@ @@ -451,7 +451,7 @@ export default { // 修改商品状态 changeStatus(row){ // 状态取反 - let status = Number(row.us_status) == 1 ? 0 : 1; + let status = Number(row.is_show) == 1 ? 0 : 1; // 发起请求 changeProductStatus(row.product_id, status).then(({message}) => { this.$message.success(message)