|
@@ -347,71 +347,72 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
const { item } = this.$route.query
|
|
|
- item = JSON.parse(item)
|
|
|
- this.activityName = item.activityName
|
|
|
- this.objectId = item.objectId
|
|
|
- this.type = item.type
|
|
|
- this.ratio = item.ratio
|
|
|
+ var item1 = JSON.parse(decodeURI(item))
|
|
|
+ console.log(item1)
|
|
|
+ this.activityName = item1.activityName
|
|
|
+ this.objectId = item1.objectId
|
|
|
+ this.type = item1.type
|
|
|
+ this.ratio = item1.ratio
|
|
|
|
|
|
this.companyWechatId = JSON.parse(localStorage.getItem('greemall_user')).companyWechatId
|
|
|
this.useTemplate = JSON.parse(localStorage.getItem('greemall_user')).useTemplate
|
|
|
|
|
|
this.getactivityGoodsDetail()
|
|
|
|
|
|
- if (item.type == 2) {
|
|
|
- this.img1_url = item.popupImage
|
|
|
- this.img2_url = item.popupHeadImage
|
|
|
- this.mainForm.backGroundColor = item.popupBackgroundColor
|
|
|
- } else if (item.type == 3) {
|
|
|
- this.img1_url = item.active1Image
|
|
|
- this.img2_url = item.active1HeadImage
|
|
|
- this.mainForm.backGroundColor = item.active1BackgroundColor
|
|
|
- } else if (item.type == 4) {
|
|
|
- this.img1_url = item.active2LeftImage
|
|
|
- this.img2_url = item.active2LeftHeadImage
|
|
|
- this.mainForm.backGroundColor = item.active2LeftBackgroundColor
|
|
|
- } else if (item.type == 5) {
|
|
|
- this.img1_url = item.active2RightImage
|
|
|
- this.img2_url = item.active2RightHeadImage
|
|
|
- this.mainForm.backGroundColor = item.active2RightBackgroundColor
|
|
|
- } else if (item.type == 6) {
|
|
|
- this.img1_url = item.only1Image
|
|
|
- this.img2_url = item.only1HeadImage
|
|
|
- this.mainForm.backGroundColor = item.only1BackgroundColor
|
|
|
- } else if (item.type == 7) {
|
|
|
- this.img1_url = item.only2Image
|
|
|
- this.img2_url = item.only2HeadImage
|
|
|
- this.mainForm.backGroundColor = item.only2BackgroundColor
|
|
|
- } else if (item.type == 8) {
|
|
|
- this.img1_url = item.only3Image
|
|
|
- this.img2_url = item.only3HeadImage
|
|
|
- this.mainForm.backGroundColor = item.only3BackgroundColor
|
|
|
- } else if (item.type == 9) {
|
|
|
- this.img1_url = item.only4Image
|
|
|
- this.img2_url = item.only4HeadImage
|
|
|
- this.mainForm.backGroundColor = item.only4BackgroundColor
|
|
|
- } else if (item.type == 10) {
|
|
|
- this.img1_url = item.topics1Image
|
|
|
- this.img2_url = item.topics1HeadImage
|
|
|
- this.mainForm.backGroundColor = item.topics1BackgroundColor
|
|
|
- this.mainForm.title1 = item.topics1Title
|
|
|
- this.mainForm.title2 = item.topics1Title2
|
|
|
- } else if (item.type == 11) {
|
|
|
- this.img1_url = item.topics2Image
|
|
|
- this.img2_url = item.topics2HeadImage
|
|
|
- this.mainForm.backGroundColor = item.topics2BackgroundColor
|
|
|
- this.mainForm.title1 = item.topics2Title
|
|
|
- this.mainForm.title2 = item.topics2Title2
|
|
|
- } else if (item.type == 12) {
|
|
|
- this.img1_url = item.topics3Image
|
|
|
- this.img2_url = item.topics3HeadImage
|
|
|
- this.mainForm.backGroundColor = item.topics3BackgroundColor
|
|
|
- this.mainForm.title1 = item.topics3Title
|
|
|
- this.mainForm.title2 = item.topics3Title2
|
|
|
- } else if (item.type == 13) {
|
|
|
- this.img1_url = item.bottomBannerImage
|
|
|
- this.img2_url = item.bottomBannerHeadImage
|
|
|
- this.mainForm.backGroundColor = item.bottomBannerBackgroundColor
|
|
|
+ if (item1.type == 2) {
|
|
|
+ this.img1_url = item1.popupImage
|
|
|
+ this.img2_url = item1.popupHeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.popupBackgroundColor
|
|
|
+ } else if (item1.type == 3) {
|
|
|
+ this.img1_url = item1.active1Image
|
|
|
+ this.img2_url = item1.active1HeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.active1BackgroundColor
|
|
|
+ } else if (item1.type == 4) {
|
|
|
+ this.img1_url = item1.active2LeftImage
|
|
|
+ this.img2_url = item1.active2LeftHeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.active2LeftBackgroundColor
|
|
|
+ } else if (item1.type == 5) {
|
|
|
+ this.img1_url = item1.active2RightImage
|
|
|
+ this.img2_url = item1.active2RightHeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.active2RightBackgroundColor
|
|
|
+ } else if (item1.type == 6) {
|
|
|
+ this.img1_url = item1.only1Image
|
|
|
+ this.img2_url = item1.only1HeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.only1BackgroundColor
|
|
|
+ } else if (item1.type == 7) {
|
|
|
+ this.img1_url = item1.only2Image
|
|
|
+ this.img2_url = item1.only2HeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.only2BackgroundColor
|
|
|
+ } else if (item1.type == 8) {
|
|
|
+ this.img1_url = item1.only3Image
|
|
|
+ this.img2_url = item1.only3HeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.only3BackgroundColor
|
|
|
+ } else if (item1.type == 9) {
|
|
|
+ this.img1_url = item1.only4Image
|
|
|
+ this.img2_url = item1.only4HeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.only4BackgroundColor
|
|
|
+ } else if (item1.type == 10) {
|
|
|
+ this.img1_url = item1.topics1Image
|
|
|
+ this.img2_url = item1.topics1HeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.topics1BackgroundColor
|
|
|
+ this.mainForm.title1 = item1.topics1Title
|
|
|
+ this.mainForm.title2 = item1.topics1Title2
|
|
|
+ } else if (item1.type == 11) {
|
|
|
+ this.img1_url = item1.topics2Image
|
|
|
+ this.img2_url = item1.topics2HeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.topics2BackgroundColor
|
|
|
+ this.mainForm.title1 = item1.topics2Title
|
|
|
+ this.mainForm.title2 = item1.topics2Title2
|
|
|
+ } else if (item1.type == 12) {
|
|
|
+ this.img1_url = item1.topics3Image
|
|
|
+ this.img2_url = item1.topics3HeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.topics3BackgroundColor
|
|
|
+ this.mainForm.title1 = item1.topics3Title
|
|
|
+ this.mainForm.title2 = item1.topics3Title2
|
|
|
+ } else if (item1.type == 13) {
|
|
|
+ this.img1_url = item1.bottomBannerImage
|
|
|
+ this.img2_url = item1.bottomBannerHeadImage
|
|
|
+ this.mainForm.backGroundColor = item1.bottomBannerBackgroundColor
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -440,7 +441,7 @@ export default {
|
|
|
}
|
|
|
getactivityGoodsDetail(params).then(res => {
|
|
|
res.data.activeGoodsList.forEach(item => {
|
|
|
- item.imgUrl = item.goods.imgUrl
|
|
|
+ item.imgUrl = item.goods?.imgUrl || ''
|
|
|
})
|
|
|
|
|
|
this.goodsList = res.data.activeGoodsList
|