From 59460e9ffd1b58bc6d5dfd2007d43d0bffca282f Mon Sep 17 00:00:00 2001 From: mrsun <1078706823@qq.com> Date: Mon, 5 Feb 2024 16:30:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=95=86=E5=93=81=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/product/productAttr.js | 12 + .../components/OilStationSelection.vue | 230 +++++++++++++++--- src/views/product/productAdd/index.vue | 10 +- src/views/product/productAdd/newIndex.vue | 28 ++- 4 files changed, 234 insertions(+), 46 deletions(-) diff --git a/src/api/product/productAttr.js b/src/api/product/productAttr.js index de06fe7..e63d756 100644 --- a/src/api/product/productAttr.js +++ b/src/api/product/productAttr.js @@ -75,6 +75,18 @@ export default { data }) }, + getChannels() { + return request({ + url: `/${service_name}/mallProductSiteRelation/getAllChannels`, + method: 'get', + }) + }, + getCheckedSites(productId) { + return request({ + url: `/${service_name}/mallProductSiteRelation/getCheckedSites/${productId}`, + method: 'get', + }) + }, brandGetAll(data) { return request({ url: `/${service_name}/mallProductBrands/getAll`, diff --git a/src/views/product/productAdd/components/OilStationSelection.vue b/src/views/product/productAdd/components/OilStationSelection.vue index 293a434..bfff141 100644 --- a/src/views/product/productAdd/components/OilStationSelection.vue +++ b/src/views/product/productAdd/components/OilStationSelection.vue @@ -1,30 +1,94 @@ - + diff --git a/src/views/product/productAdd/index.vue b/src/views/product/productAdd/index.vue index e764d53..2032d07 100644 --- a/src/views/product/productAdd/index.vue +++ b/src/views/product/productAdd/index.vue @@ -36,7 +36,7 @@ - + - + @@ -1166,7 +1166,7 @@
{{ color }} @@ -3052,7 +3052,7 @@ export default { } .box-video-style { - width: 375px; + width: 375px; height: 211px; border-radius: 10px; background-color: #707070; @@ -3276,7 +3276,7 @@ export default { .ifam { width: 344px; height: 644px; - + background-size: 344px 644px; padding: 40px 20px; padding-top: 50px; diff --git a/src/views/product/productAdd/newIndex.vue b/src/views/product/productAdd/newIndex.vue index 3bf9a2b..d447d37 100644 --- a/src/views/product/productAdd/newIndex.vue +++ b/src/views/product/productAdd/newIndex.vue @@ -77,7 +77,7 @@ --> - - - + +
@@ -575,7 +576,7 @@ export default { this.$destroy(); }, methods: { - async chenkId() { + async chenkId() { if (this.$route.query && this.$route.query.id) { await this.getproductInfo(this.$route.query.id) } @@ -619,17 +620,17 @@ export default { } else { return null } - }).filter(item => item); + }).filter(item => item); setTimeout(() => { this.ManyAttrValue.forEach((item, index) => { let data = this.formValidate.stockList.find(i => i.attributeJson == JSON.stringify(item.data)); if (data) { Object.assign(item, data,{delect:false}) - }else{ - Object.assign(item, data,{delect:true}) + }else{ + Object.assign(item, data,{delect:true}) } }) - this.ManyAttrValue = this.ManyAttrValue.filter(item=>!item.delect) + this.ManyAttrValue = this.ManyAttrValue.filter(item=>!item.delect) }, 1000) }) }, @@ -645,6 +646,9 @@ export default { }, delectOilStationSelectionList(e, index) { this.OilStationSelectionList.splice(index, 1) + if (this.$refs.selectSites&&this.$refs.selectSites.checkedSites){ + this.$refs.selectSites.checkedSites = this.$refs.selectSites.checkedSites.filter(site => e.siteId !== site.siteId); + } }, oilStationSelectionSubmit(e) { this.OilStationSelectionList = e @@ -1181,6 +1185,10 @@ export default { }, handleSubmitNest(name) { console.log(this.formValidate,"handleSubmitNest") + if (this.formValidate.attr<1){ + this.$message.error('规格属性不能为空') + return + } this.$refs[name].validate(valid => { if (valid) { if (this.currentTab++ > 2) this.currentTab = 0 @@ -1235,7 +1243,7 @@ export default { skuNum, id } - }) + }) this.formValidate[isRecommendOrNewMark] = '1' loadingFn.call( this, @@ -1253,7 +1261,7 @@ export default { if (res.code == 20000) { this.$message.success('操作成功') setTimeout(() => { - this.$router.push({ path: 'productList' }) + this.$router.push({ path: 'productList', query: { refresh: true }}) // this.$destroy() }, 1000) } From 038e6f8669853d5f136d9da6e4a7f37c0723b791 Mon Sep 17 00:00:00 2001 From: huzl <469658678@qq.com> Date: Wed, 7 Feb 2024 16:53:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/auth.js b/src/utils/auth.js index 6a55096..2940a49 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,6 +1,6 @@ import Cookies from 'js-cookie' -const TokenKey = 'Authorization' +const TokenKey = 'mall_Authorization' const NetWorkId = 'networkId' const UserName = 'username' const PassWord = 'password'