diff --git a/src/components/AiCopyFromTemu.vue b/src/components/AiCopyFromTemu.vue index e0b1409..a2ec3fc 100644 --- a/src/components/AiCopyFromTemu.vue +++ b/src/components/AiCopyFromTemu.vue @@ -10,7 +10,7 @@ - + + + + + + + { + return item.mallId == this.form.targetMallId + }) + if (null == tempMall || tempMall.length == 0) { + Message.error("请先选择店铺") + return + } else { + this.form.isSemi = tempMall[0].isSemiManagedMall + } + }, + getSiteList() { + sendChromeAPIMessage({ + url: 'bg-visage-mms/config/common/site/query', + needMallId: true, + mallId: this.$store.state.mallList[0].mallId, + data: {}}).then((res) => { + if (res.success) { + this.siteList = res.result.siteBaseList.filter(item => { + return item.matchSemiManaged + }) + } + }) + }, toAddToDraft() { this.$refs.form.validate((valid) => { if (valid) { @@ -199,9 +241,9 @@ export default { flag = true } }) - if (!flag && (item1.specKeyId != 1001 && item1.specKeyId != 43404162)) { + /*if (!flag && (item1.specKeyId != 1001 && item1.specKeyId != 43404162)) { specIds.push({spec_key_id: item1.spec_key_id, spec_value: item1.spec_value}) - } + }*/ }) }) @@ -265,9 +307,9 @@ export default { flag = true } }) - if (!flag && (item1.specKeyId != 1001 && item1.specKeyId != 43404162)) { + /*if (!flag && (item1.specKeyId != 1001 && item1.specKeyId != 43404162)) { specIds.push({specKeyId: item1.specKeyId, specValue: item1.specValue}) - } + }*/ }) }) @@ -297,19 +339,23 @@ export default { }) }, async createDraft(data) { + let reqData = {} let catId = null; if (this.form.isSameCategory) { - catId = this.catId; + reqData.catId = this.catId; } else { - catId = this.form.targetCatId[this.form.targetCatId.length - 1] + reqData.catId = this.form.targetCatId[this.form.targetCatId.length - 1] + } + if (this.form.isSemi) { + reqData.productSemiManagedReq = { + bindSiteIds: this.form.siteId + } } let res = await sendChromeAPIMessage({ url: 'bg-visage-mms/product/draft/add', needMallId: true, mallId: this.form.targetMallId, - data: { - catId: catId - }}) + data: reqData}) if (res.errorCode == 1000000) { let draftId = res.result.productDraftId @@ -318,7 +364,7 @@ export default { if (this.form.isSameCategory) { let res2 = await this.$http.post('/api/innerCategory/fullById',null , { params: { - id: catId + id: reqData.catId } }) for (; i < res2.data.length; i++) { @@ -330,7 +376,7 @@ export default { needMallId: true, mallId: this.form.targetMallId, data: { - catId: catId, + catId: reqData.catId, productCreateTime: null, langList: [ "en" @@ -384,6 +430,11 @@ export default { } }, createProduct(content) { + if (this.form.isSemi) { + content.productSemiManagedReq = { + bindSiteIds: this.form.siteId + } + } sendChromeAPIMessage({ url: 'bg-visage-mms/product/draft/save', needMallId: true, diff --git a/src/view/Home.vue b/src/view/Home.vue index 8dffb2e..f5862f1 100644 --- a/src/view/Home.vue +++ b/src/view/Home.vue @@ -182,9 +182,9 @@ import AiPayment from "@/components/AiPayment.vue"; return '未激活'; } else if (this.$store.state.userInfo.flag == 1) { if (this.$store.state.userInfo.type != 4) { - return `(${this.$store.state.userInfo.mallName})` + this.vipType[this.$store.state.userInfo.type]; + return `(${this.$store.state.userInfo.mallName})` + this.vipType[this.$store.state.userInfo.type] + '(' + this.$store.state.userInfo.expireTime.substring(0,10) + ')'; } else { - return this.vipType[this.$store.state.userInfo.type] + return this.vipType[this.$store.state.userInfo.type] + '(' + this.$store.state.userInfo.expireTime.substring(0,10) + ')' } } else { diff --git a/src/view/product/CopyProduct.vue b/src/view/product/CopyProduct.vue index cb15b4c..e02a5fa 100644 --- a/src/view/product/CopyProduct.vue +++ b/src/view/product/CopyProduct.vue @@ -287,7 +287,7 @@ import AiLazyCascader from "@/components/AiLazyCascader.vue" sendChromeAPIMessage({ url: 'bg-visage-mms/config/common/site/query', needMallId: true, - mallId: this.productPage.mallId, + mallId: this.$store.state.mallList[0].mallId, data: {}}).then((res) => { if (res.success) { this.siteList = res.result.siteBaseList.filter(item => {