Browse Source

订购页,点击推荐进入推荐策略后,页面标题没有更新
订购页,点击推荐后。没有以推荐产品重新获取订购状态
新疆模板,新策略中,没适配产品备注文案
随心选模板,页面“订购说明”,改为“产品说明”
三选一会员领取页面,未登录时的“请先登录”文案改为“未登录”

hml 2 years ago
parent
commit
5dce0e4e27

+ 1 - 1
purchase_H5/src/templates/suiXinxuan/index.vue

@@ -2,7 +2,7 @@
   <div class="suiXinXuan" id="temp">
     <div :style="{backgroundImage: `url(${imgUrl}${ pageData.mainProduct.bannerPics[0] })`}"
       class="header-banner bg-cover">
-      <div class="infoBtn" @click="orderClick">订购说明</div>
+      <div class="infoBtn" @click="orderClick">产品说明</div>
       <!-- 轮播条 -->
       <van-notice-bar v-show="showScroll" scrollable :text="pageData.remarks.zoetropeText" />
     </div>

+ 9 - 11
purchase_H5/src/templates/templateColor/index.vue

@@ -159,6 +159,7 @@ import tongRen from "./components/tongRen.vue";
 import duanRen from "./components/duanRen.vue";
 import jianRen from "./components/jianRen.vue";
 import unifyColor from "../../components/unifyColor.vue";
+import MgtvApi from "@/util/mgTvJssdk.js";
 import opOut from "../../components/opOut.vue";
 import { Dialog } from "vant";
 import lottie from 'lottie-web';
@@ -435,7 +436,7 @@ export default {
             productType: info.data.productType,
             promotionPic: info.data.promotionPic,
             pushJumpUrl: info.data.pushJumpUrl,
-            remark: info.data.producremarktName,
+            remark: info.data.remark,
             remark1: info.data.remark1,
             remark2: info.data.remark2,
             remark3: productJson.remark3,
@@ -462,6 +463,11 @@ export default {
             otherJson: JSON.parse(res.data.otherJson), //备用json
             strategyInfo: res.data
           };
+          let title = mainProduct.pageTitle !== '' ? mainProduct.pageTitle : mainProduct.productName
+          document.title = title;
+          MgtvApi.setWebviewTitle({
+            title: title,
+          });
           pageData.strategyInfo.recommendStrategyList = res.data.recommendStrategyIds
           pageData.strategyInfo.unsubscribeStrategyList = res.data.unsubscribeStrategyIds
           pageData.strategyInfo.viceProductStrategyList = res.data.viceProductIds
@@ -470,9 +476,9 @@ export default {
           }
           pageData.mainJson = JSON.parse(res.data.productJson).product
           this.$store.commit("setPageData", pageData);
+          this.getIsBuy()
           this.$store.commit('setTempName', res.data.templateCode)
         })
-
       } else {
         strategyGetID({
           id: val,
@@ -482,9 +488,6 @@ export default {
             let info = await detMainProduct({
               productId: data.primaryProductId,
             });
-            if (this.user.userid) {
-              this.getIsBuy();
-            }
             let recommend = [];
             if (
               data.recommendStrategyList !== null &&
@@ -506,14 +509,9 @@ export default {
               },
               recommend: recommend,
             };
-            let params = {
-              anonymousId: this.$sensors.store._state.$device_id,
-              channleKey: localStorage.getItem("key"),
-              spId: info.data.spid,
-              userId: this.user.userid,
-            };
             document.title = pageData.mainProduct.productName;
             this.$store.commit("setPageData", pageData);
+            this.getIsBuy()
             if (this.$store.state.tempName === data.templateCode) {
               setTimeout(() => {
                 this.callSvg()

+ 14 - 15
purchase_H5/src/templates/templateCom/index.vue

@@ -284,8 +284,8 @@ export default {
           addR.unBuyClick();
           if (this.pageData.strategyInfo.unsubscribeStrategyList !== null && this.pageData.strategyInfo.unsubscribeStrategyList.length > 0) {
             if (this.pageData.channl.edition && this.pageData.channl.edition === 1) {
-              let productId = await strategytemplate( this.pageData.strategyInfo.unsubscribeStrategyList[0]);
-              let drainageRes = await detMainProduct({productId: productId.data.primaryProductId});
+              let productId = await strategytemplate(this.pageData.strategyInfo.unsubscribeStrategyList[0]);
+              let drainageRes = await detMainProduct({ productId: productId.data.primaryProductId });
               this.unBuyDrainageText = drainageRes.data.productName;
             } else {
               let productId = await strategyGetID({
@@ -422,7 +422,7 @@ export default {
             productType: info.data.productType,
             promotionPic: info.data.promotionPic,
             pushJumpUrl: info.data.pushJumpUrl,
-            remark: info.data.producremarktName,
+            remark: info.data.remark,
             remark1: info.data.remark1,
             remark2: info.data.remark2,
             remark3: productJson.remark3,
@@ -446,10 +446,14 @@ export default {
             },
             recommend: recommend,
             remarks: JSON.parse(res.data.extJson), //策略信息
-            // viceJson: JSON.parse(res.data.viceJson), //副产品json
             otherJson: JSON.parse(res.data.otherJson), //备用json
             strategyInfo: res.data
           };
+          let title = mainProduct.pageTitle !== '' ? mainProduct.pageTitle : mainProduct.productName
+          document.title = title;
+          MgtvApi.setWebviewTitle({
+            title: title,
+          });
           pageData.strategyInfo.recommendStrategyList = res.data.recommendStrategyIds
           pageData.strategyInfo.unsubscribeStrategyList = res.data.unsubscribeStrategyIds
           pageData.strategyInfo.viceProductStrategyList = res.data.viceProductIds
@@ -458,9 +462,9 @@ export default {
           }
           pageData.mainJson = JSON.parse(res.data.productJson).product
           this.$store.commit("setPageData", pageData);
+          this.getIsBuy()
           this.$store.commit('setTempName', res.data.templateCode)
         })
-
       } else {
         strategyGetID({ id: val, }).then(async (res) => {
           if (res.data.strategyStatus === 1) {
@@ -495,14 +499,9 @@ export default {
             MgtvApi.setWebviewTitle({
               title: pageData.mainProduct.productName,
             });
-            let params = {
-              anonymousId: this.$sensors.store._state.$device_id,
-              channleKey: localStorage.getItem("key"),
-              spId: info.data.spid,
-              userId: this.user.userid,
-            };
             document.title = pageData.mainProduct.productName;
             this.$store.commit("setPageData", pageData);
+            this.getIsBuy()
             if (this.$store.state.tempName === data.templateCode) {
               setTimeout(() => {
                 this.callSvg()
@@ -531,10 +530,10 @@ export default {
             let url = `${this.pageData.strategyInfo.linkUrl}?userid=${res.data}`;
             window.location.href = url;
           });
-        }else{
-            // 临时调整  为无活动适配跳转
-            let url = this.pageData.strategyInfo.linkUrl;
-            window.location.href = url;
+        } else {
+          // 临时调整  为无活动适配跳转
+          let url = this.pageData.strategyInfo.linkUrl;
+          window.location.href = url;
         }
       } else {
         this.loginType = " 登录 ";

+ 18 - 8
purchase_H5/src/templates/templateTogether-Col/index.vue

@@ -143,6 +143,7 @@ import conceal from "../../components/hideModal.vue";
 import repeatModal from "../../components/repeatModal.vue";
 import unify from "./unify.vue";
 import opOut from "../../components/opOut.vue";
+import MgtvApi from "@/util/mgTvJssdk.js";
 import {
   Dialog
 } from "vant";
@@ -257,7 +258,7 @@ export default {
             productType: info.data.productType,
             promotionPic: info.data.promotionPic,
             pushJumpUrl: info.data.pushJumpUrl,
-            remark: info.data.producremarktName,
+            remark: info.data.remark,
             remark1: info.data.remark1,
             remark2: info.data.remark2,
             remark3: mainJson.remark3,
@@ -309,7 +310,7 @@ export default {
             productType: info.data.productType,
             promotionPic: info.data.promotionPic,
             pushJumpUrl: info.data.pushJumpUrl,
-            remark: info.data.producremarktName,
+            remark: info.data.remark,
             remark1: info.data.remark1,
             remark2: info.data.remark2,
             remark3: mainJson.remark3,
@@ -321,8 +322,13 @@ export default {
         }
         this.param.cpid = info.data.cpid;
         this.param.spid = info.data.spid;
-        document.title = info.data.remark;
+          let title = mainProduct.pageTitle !== '' ? mainProduct.pageTitle : mainProduct.productName
+          document.title = title;
+          MgtvApi.setWebviewTitle({
+            title: title,
+          });
         this.$store.commit("setPageData", this.pageData);
+        this.getIsBuy()
       } else {
         detMainProduct({
           productId: id,
@@ -333,6 +339,7 @@ export default {
           document.title = res.data.remark;
           this.productJson = res.data.cacheSeatOne;
           this.$store.commit("setPageData", this.pageData);
+          this.getIsBuy()
         });
       }
       this.callSvg()
@@ -545,7 +552,7 @@ export default {
             productType: info.data.productType,
             promotionPic: info.data.promotionPic,
             pushJumpUrl: info.data.pushJumpUrl,
-            remark: info.data.producremarktName,
+            remark: info.data.remark,
             remark1: info.data.remark1,
             remark2: info.data.remark2,
             remark3: productJson.remark3,
@@ -579,11 +586,16 @@ export default {
           if (JSON.parse(res.data.productJson).viceProduct) {
             pageData.viceJson = JSON.parse(res.data.productJson).viceProduct
           }
+          let title = mainProduct.pageTitle !== '' ? mainProduct.pageTitle : mainProduct.productName
+          document.title = title;
+          MgtvApi.setWebviewTitle({
+            title: title,
+          });
           pageData.mainJson = JSON.parse(res.data.productJson).product
           this.$store.commit("setPageData", pageData);
+          this.getIsBuy()
           this.$store.commit('setTempName', res.data.templateCode)
         })
-
       } else {
         strategyGetID({ id: val, }).then(async (res) => {
           if (res.data.strategyStatus === 1) {
@@ -591,9 +603,6 @@ export default {
             let info = await detMainProduct({
               productId: data.primaryProductId,
             });
-            if (this.user.userid) {
-              this.getIsBuy();
-            }
             let recommend = [];
             if (
               data.recommendStrategyList !== null &&
@@ -617,6 +626,7 @@ export default {
             };
             document.title = pageData.mainProduct.productName;
             this.$store.commit("setPageData", pageData);
+            this.getIsBuy()
             if (this.$store.state.tempName === data.templateCode) {
               setTimeout(() => {
                 this.callSvg()

+ 18 - 47
purchase_H5/src/templates/templateTogether/index.vue

@@ -443,7 +443,7 @@ export default {
             productType: info.data.productType,
             promotionPic: info.data.promotionPic,
             pushJumpUrl: info.data.pushJumpUrl,
-            remark: info.data.producremarktName,
+            remark: info.data.remark,
             remark1: info.data.remark1,
             remark2: info.data.remark2,
             remark3: mainJson.remark3,
@@ -507,40 +507,26 @@ export default {
             productType: info.data.productType,
             promotionPic: info.data.promotionPic,
             pushJumpUrl: info.data.pushJumpUrl,
-            remark: info.data.producremarktName,
+            remark: info.data.remark,
             remark1: info.data.remark1,
             remark2: info.data.remark2,
             remark3: mainJson.remark3,
             spid: info.data.spid,
             themeColor: [mainJson.btnTopcol, mainJson.btnBotcol],
           };
+
           this.productJson = mainProduct.cacheSeatOne;
           this.pageData.mainProduct = mainProduct;
         }
         this.param.cpid = info.data.cpid;
         this.param.spid = info.data.spid;
-        document.title = info.data.remark;
+        let title = mainProduct.pageTitle !== '' ? mainProduct.pageTitle : mainProduct.productName
+        document.title = title;
+        MgtvApi.setWebviewTitle({
+          title: title,
+        });
         this.$store.commit("setPageData", this.pageData);
-        if (this.user.userid) {
-          await orderList({
-            userid: this.user.userid,
-            cpid: this.param.cpid,
-            spid: this.param.spid,
-          }).then((res) => {
-            let data = res.data;
-            if (data.length === 0) {
-              this.isBuy = "未订购";
-            } else {
-              for (let i = 0; i < data.length; i++) {
-                if (data[i].STATUS === "0") {
-                  this.isBuy = "已订购";
-                } else {
-                  this.isBuy = "已退订";
-                }
-              }
-            }
-          });
-        }
+        this.getIsBuy()
       } else {
         detMainProduct({
           productId: val,
@@ -553,26 +539,7 @@ export default {
           this.param.spid = res.data.spid;
           document.title = res.data.remark;
           this.$store.commit("setPageData", this.pageData);
-          if (this.user.userid) {
-            await orderList({
-              userid: this.user.userid,
-              cpid: this.param.cpid,
-              spid: this.param.spid,
-            }).then((res) => {
-              let data = res.data;
-              if (data.length === 0) {
-                this.isBuy = "未订购";
-              } else {
-                for (let i = 0; i < data.length; i++) {
-                  if (data[i].STATUS === "0") {
-                    this.isBuy = "已订购";
-                  } else {
-                    this.isBuy = "已退订";
-                  }
-                }
-              }
-            });
-          }
+          this.getIsBuy()
         });
       }
 
@@ -809,7 +776,7 @@ export default {
             productType: info.data.productType,
             promotionPic: info.data.promotionPic,
             pushJumpUrl: info.data.pushJumpUrl,
-            remark: info.data.producremarktName,
+            remark: info.data.remark,
             remark1: info.data.remark1,
             remark2: info.data.remark2,
             remark3: productJson.remark3,
@@ -849,8 +816,14 @@ export default {
           if (JSON.parse(res.data.productJson).viceProduct) {
             pageData.viceJson = JSON.parse(res.data.productJson).viceProduct;
           }
+          let title = mainProduct.pageTitle !== '' ? mainProduct.pageTitle : mainProduct.productName
+          document.title = title;
+          MgtvApi.setWebviewTitle({
+            title: title,
+          });
           pageData.mainJson = JSON.parse(res.data.productJson).product;
           this.$store.commit("setPageData", pageData);
+          this.getIsBuy()
           this.$store.commit("setTempName", res.data.templateCode);
         });
       } else {
@@ -860,9 +833,6 @@ export default {
             let info = await detMainProduct({
               productId: data.primaryProductId,
             });
-            if (this.user.userid) {
-              this.getIsBuy();
-            }
             let recommend = [];
             if (
               data.recommendStrategyList !== null &&
@@ -889,6 +859,7 @@ export default {
             });
             document.title = pageData.mainProduct.productName;
             this.$store.commit("setPageData", pageData);
+            this.getIsBuy()
             if (this.$store.state.tempName === data.templateCode) {
               setTimeout(() => {
                 this.callSvg();

+ 3 - 4
purchase_H5/src/templates/xinJiangNew/index.vue

@@ -7,10 +7,10 @@
     <!--主体-->
     <div class="content">
       <!--订购窗-->
-      <div class="box">
+      <div class="box" v-if="pageData.remarks.isBuy === '1'">
         <div class="title">{{ pageData.mainProduct.originalPrice }}元/月</div>
         <div class="spName">{{ pageData.mainProduct.remark }}</div>
-        <div class="spBtn" v-if="pageData.remarks.isBuy === '1'" @click="btnClick">
+        <div class="spBtn"  @click="btnClick">
           {{ pageData.remarks.btnText ? pageData.remarks.btnText : "点我领取" }}
         </div>
         <div class="privacyBox">
@@ -76,8 +76,7 @@
     <!-- 遮罩 -->
     <newZheZhao v-if="showZhezhao" isZheZhao="1"></newZheZhao>
     <!-- 退订挽留 -->
-    <van-overlay :show="unBuyDrainage" :duration="0.1" @click="unBuyDrainage = false"
-      pageData.strategyInfo.unsubscribeStrategyList.length>0 > 0 >
+    <van-overlay :show="unBuyDrainage" :duration="0.1" @click="unBuyDrainage = false">
       <div class="other-modal modal" @click.stop>
         <img src="../../assets/img/close.png" class="close" @click="unBuyDrainage = false" />
         <div class="text-box">确定要放弃本服务吗?</div>

+ 4 - 4
purchase_H5/src/views/index.vue

@@ -152,7 +152,6 @@ export default {
           attr3: "订购页",
         });
         let info = await detMainProduct({ productId: data.primaryProductId })
-        console.log(info)
         let productJson = JSON.parse(data.productJson)
         let mainJson = productJson.product;
         let viceJson = productJson.viceProduct ? productJson.viceProduct : ''
@@ -198,7 +197,7 @@ export default {
           productType: info.data.productType,
           promotionPic: info.data.promotionPic,
           pushJumpUrl: info.data.pushJumpUrl,
-          remark: info.data.producremarktName,
+          remark: info.data.remark,
           remark1: info.data.remark1,
           remark2: info.data.remark2,
           remark3: mainJson.remark3,
@@ -261,10 +260,11 @@ export default {
             : "联通畅视流量包";
           getWxCode(pageData.mainProduct.productName, img, url, desc);
         }
-        document.title = mainProduct.pageTitle;
+        let title = mainProduct.pageTitle!==''?mainProduct.pageTitle:mainProduct.productName
+        document.title =title;
         if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
           MgtvApi.setWebviewTitle({
-            title: mainProduct.pageTitle,
+            title:title,
           });
         }
         this.$store.commit("setTempName", data.templateCode);

+ 1 - 1
purchase_H5/src/views/indexMobile.vue

@@ -78,7 +78,7 @@ export default {
           productType: res.data.productType,
           promotionPic: res.data.promotionPic,
           pushJumpUrl: res.data.pushJumpUrl,
-          remark: res.data.producremarktName,
+          remark: res.data.remark,
           remark1: res.data.remark1,
           remark2: res.data.remark2,
           remark3: data.productJson.remark3,

+ 1 - 1
purchase_H5/src/views/members/member.vue

@@ -7,7 +7,7 @@
           <img src="./memberImg/user.png" alt="" />
         </div>
         <div class="user">
-          {{ phone === "" ? "请先登录" : formatPhone(phone) }}
+          {{ phone === "" ? "" : formatPhone(phone) }}
         </div>
       </div>
     </div>

+ 3 - 3
purchase_ao/src/views/strategy/add.vue

@@ -923,7 +923,7 @@ export default {
     if (this.$route.query.editId) {
       this.editId = this.$route.query.editId
     }
-    if(this.$route.query.copy){
+    if (this.$route.query.copy) {
       this.copy = this.$route.query.copy
     }
 
@@ -977,7 +977,7 @@ export default {
           let imgUrl = this.imgUrl + this.viceJson.jsonImg
           this.svgClick('副', imgUrl)
         }
-        if (this.copy==='1') {
+        if (this.copy === '1') {
           this.form.strategyName = this.form.strategyName + '-复制'
         }
         setTimeout(() => {
@@ -1259,10 +1259,10 @@ export default {
     box-sizing: border-box;
     box-shadow: 0 8px 10px -5px rgb(0 0 0 / 20%),
       0 16px 24px 2px rgb(0 0 0 / 14%), 0 6px 30px 5px rgb(0 0 0 / 12%);
+    overflow-y: scroll;
     .main {
       width: 100%;
       height: 100vh;
-      overflow-y: scroll;
     }
     ::-webkit-scrollbar {
       display: none;