|
@@ -4,7 +4,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { strategytemplate } from '../api'
|
|
|
+import { strategytemplate, detMainProduct } from '../api'
|
|
|
export default {
|
|
|
name: "home",
|
|
|
data () {
|
|
@@ -27,106 +27,112 @@ export default {
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
+ getPorduct (productId) {
|
|
|
+ return detMainProduct({
|
|
|
+ productId: productId,
|
|
|
+ });
|
|
|
+ },
|
|
|
pageData (data) {
|
|
|
- console.log(data)
|
|
|
- // this.getStrategytemplate(data.item.recommendStrategyIds[0])
|
|
|
this.$store.commit('setTempName', data.template)
|
|
|
- let mainProduct = {
|
|
|
- activeType: "69",
|
|
|
- bannerPics: [data.productJson.bannerImg, data.productJson.jsonImg, data.productJson.upImg, data.productJson.topImg,],
|
|
|
- bgColor: [data.productJson.pageBgcol, '', data.productJson.orderBgcol, data.productJson.orderBdcol],
|
|
|
- cacheSeatOne: [{
|
|
|
- dongHua: data.productJson.drawVal,
|
|
|
- memberUrl: "",
|
|
|
- proC: {
|
|
|
- e: data.productJson.hideCol,
|
|
|
- s: data.productJson.pageTextcol
|
|
|
+ detMainProduct({
|
|
|
+ productId: data.item.primaryProductId,
|
|
|
+ }).then(res => {
|
|
|
+ let mainProduct = {
|
|
|
+ activeType: res.data.activeType,
|
|
|
+ bannerPics: [data.productJson.bannerImg, data.productJson.jsonImg, data.productJson.upImg, data.productJson.topImg,],
|
|
|
+ bgColor: [data.productJson.pageBgcol, '', data.productJson.orderBgcol, data.productJson.orderBdcol],
|
|
|
+ cacheSeatOne: [{
|
|
|
+ dongHua: data.productJson.drawVal,
|
|
|
+ memberUrl: res.data.cacheSeatOne[0].memberUrl,
|
|
|
+ proC: {
|
|
|
+ e: data.productJson.hideCol,
|
|
|
+ s: data.productJson.pageTextcol
|
|
|
+ },
|
|
|
+ productV: data.productJson.productV,
|
|
|
+ rushC: {
|
|
|
+ e: data.productJson.orderTextcol,
|
|
|
+ s: data.productJson.orderNumcol,
|
|
|
+ },
|
|
|
+ tabC: {
|
|
|
+ e: data.productJson.tabVicecol,
|
|
|
+ s: data.productJson.tabMaincol,
|
|
|
+ },
|
|
|
+ btnUrl: "",
|
|
|
+ }],
|
|
|
+ cpid: res.data.cpid,
|
|
|
+ discountInfo: null,
|
|
|
+ flowJumpUrl: res.data.flowJumpUrl,
|
|
|
+ givePhoneInfo:res.data.givePhoneInfo,
|
|
|
+ guidancePic: {
|
|
|
+ c: data.productJson.orderImg,
|
|
|
+ p: data.productJson.explainImg
|
|
|
},
|
|
|
- productV: data.productJson.productV,
|
|
|
- rushC: {
|
|
|
- e: data.productJson.orderTextcol,
|
|
|
- s: data.productJson.orderNumcol,
|
|
|
- },
|
|
|
- tabC: {
|
|
|
- e: data.productJson.tabVicecol,
|
|
|
- s: data.productJson.tabMaincol,
|
|
|
- },
|
|
|
- btnUrl: "",
|
|
|
- }],
|
|
|
- cpid: "bilibl",
|
|
|
- createTime: "2022-02-23 15:23:34",
|
|
|
- discountInfo: null,
|
|
|
- flowJumpUrl: "https://www.baidu.com",
|
|
|
- givePhoneInfo: "<p><strong>产品</strong> 哔哩哔哩流量会员合约包</p><p><strong>资费</strong> <strong>首月0.01元,次月起25元/月</strong></p><p><strong>内容</strong> 15GB定向流量+哔哩哔哩大会员</p><p><strong>合约</strong> <strong>本产品合约期为6个月,第六个月方可退订,用户在合约期内解除合约时,<s> </s>需补足首月优惠金额,切在原合约期结束后方能再次退订</strong></p>",
|
|
|
- guidancePic: {
|
|
|
- c: data.productJson.orderImg,
|
|
|
- p: data.productJson.explainImg
|
|
|
- },
|
|
|
- id: data.item.primaryProductId,
|
|
|
- isCompositeProduct: 0, //是否复合产品
|
|
|
- logoPic: data.productJson.logoPic,
|
|
|
- manualInfo: "活动说明",
|
|
|
- memberName: "会员信息",
|
|
|
- orderingInfo: "<h2><span style=\"color: rgb(0, 138, 0);\">产品订购说明</span></h2>",
|
|
|
- originalPrice: 25,
|
|
|
- pageTitle: data.productJson.pageTitle,
|
|
|
- productName: "测试产品V2",
|
|
|
- productType: null,
|
|
|
- promotionPic: null,
|
|
|
- pushJumpUrl: null,
|
|
|
- remark: "测试V2",
|
|
|
- remark1: null,
|
|
|
- remark2: null,
|
|
|
- remark3: data.productJson.remark3,
|
|
|
- spid: "979",
|
|
|
- themeColor: [data.productJson.btnTopcol, data.productJson.btnBotcol],
|
|
|
- }
|
|
|
- let recommend = [];
|
|
|
- if (data.item.recommendStrategyIds.length > 0) {
|
|
|
- data.item.recommendStrategyIds.forEach(async val => {
|
|
|
- let list = await strategytemplate(val)
|
|
|
- recommend.push(list.data);
|
|
|
- });
|
|
|
- }
|
|
|
- let pageData = {
|
|
|
- mainProduct: mainProduct,
|
|
|
- channl: {
|
|
|
- channelKey: "464c87375658",
|
|
|
- channelName: "新策略H5整合测试",
|
|
|
- fullCode: "173966823233",
|
|
|
- },
|
|
|
- recommend: recommend,
|
|
|
- remarks: data.extJson, //策略信息
|
|
|
- viceJson: data.viceJson, //副产品json
|
|
|
- otherJson: data.otherJson, //备用json
|
|
|
- strategyInfo: {
|
|
|
- activityLogo: data.item.activityLogo,
|
|
|
- activityType: data.item.activityType,
|
|
|
- directCharge: null,
|
|
|
- extJson: data.extJson,
|
|
|
- id: null,
|
|
|
- linkUrl: data.item.linkUrl,
|
|
|
- maskText: data.item.maskText,
|
|
|
- posterPhoto: data.item.posterPhoto,
|
|
|
- primaryProductId: data.item.primaryProductId,
|
|
|
- primarySpid: "1234",
|
|
|
- productInfo: [],
|
|
|
- promotePhoto: data.item.promotePhoto,
|
|
|
- recommendStrategyList: data.item.recommendStrategyIds,
|
|
|
- strategyName: data.item.strategyName,
|
|
|
- strategyStatus: data.item.strategyStatus,
|
|
|
- strategyType: data.item.strategyType,
|
|
|
- templateCode: data.template,
|
|
|
- templateId: data.item.templateId,
|
|
|
- templateName: "",
|
|
|
- testGroupId: null,
|
|
|
- testId: null,
|
|
|
- unsubscribeStrategyList: data.item.unsubscribeStrategyIds,
|
|
|
- viceProductStrategyList: data.item.viceProductIds,
|
|
|
+ id: data.item.primaryProductId,
|
|
|
+ isCompositeProduct: 0, //是否复合产品
|
|
|
+ logoPic: data.productJson.logoPic,
|
|
|
+ manualInfo: res.data.manualInfo,
|
|
|
+ memberName: res.data.memberName,
|
|
|
+ orderingInfo: res.data.orderingInfo,
|
|
|
+ originalPrice: res.data.originalPrice,
|
|
|
+ pageTitle: data.productJson.pageTitle,
|
|
|
+ productName: res.data.productName,
|
|
|
+ productType:res.data.productType,
|
|
|
+ promotionPic: res.data.promotionPic,
|
|
|
+ pushJumpUrl: res.data.pushJumpUrl,
|
|
|
+ remark: res.data.producremarktName,
|
|
|
+ remark1: res.data.remark1,
|
|
|
+ remark2: res.data.remark2,
|
|
|
+ remark3: data.productJson.remark3,
|
|
|
+ spid: res.data.spid,
|
|
|
+ themeColor: [data.productJson.btnTopcol, data.productJson.btnBotcol],
|
|
|
+ }
|
|
|
+ let recommend = [];
|
|
|
+ if (data.item.recommendStrategyIds.length > 0 && data.item.recommendStrategyIds) {
|
|
|
+ data.item.recommendStrategyIds.forEach(async val => {
|
|
|
+ let list = await strategytemplate(val)
|
|
|
+ recommend.push(list.data);
|
|
|
+ });
|
|
|
}
|
|
|
- };
|
|
|
- console.log(pageData)
|
|
|
- this.$store.commit("setPageData", pageData);
|
|
|
+ let pageData = {
|
|
|
+ mainProduct: mainProduct,
|
|
|
+ channl: {
|
|
|
+ channelKey: "464c87375658",
|
|
|
+ channelName: "新策略H5整合测试",
|
|
|
+ fullCode: "173966823233",
|
|
|
+ },
|
|
|
+ recommend: recommend,
|
|
|
+ remarks: data.extJson, //策略信息
|
|
|
+ viceJson: data.viceJson, //副产品json
|
|
|
+ otherJson: data.otherJson, //备用json
|
|
|
+ strategyInfo: {
|
|
|
+ activityLogo: data.item.activityLogo,
|
|
|
+ activityType: data.item.activityType,
|
|
|
+ directCharge: null,
|
|
|
+ extJson: data.extJson,
|
|
|
+ id: null,
|
|
|
+ linkUrl: data.item.linkUrl,
|
|
|
+ maskText: data.item.maskText,
|
|
|
+ posterPhoto: data.item.posterPhoto,
|
|
|
+ primaryProductId: data.item.primaryProductId,
|
|
|
+ primarySpid: "1234",
|
|
|
+ productInfo: [],
|
|
|
+ promotePhoto: data.item.promotePhoto,
|
|
|
+ recommendStrategyList: data.item.recommendStrategyIds,
|
|
|
+ strategyName: data.item.strategyName,
|
|
|
+ strategyStatus: data.item.strategyStatus,
|
|
|
+ strategyType: data.item.strategyType,
|
|
|
+ templateCode: data.template,
|
|
|
+ templateId: data.item.templateId,
|
|
|
+ templateName: "",
|
|
|
+ testGroupId: null,
|
|
|
+ testId: null,
|
|
|
+ unsubscribeStrategyList: data.item.unsubscribeStrategyIds,
|
|
|
+ viceProductStrategyList: data.item.viceProductIds,
|
|
|
+ }
|
|
|
+ };
|
|
|
+ this.$store.commit("setPageData", pageData);
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
};
|