hml пре 2 година
родитељ
комит
694837cc1d

+ 6 - 7
purchase_H5/src/templates/templateColor/index.vue

@@ -313,7 +313,6 @@ export default {
           }
         }
       } else if (type === "unBUy") {
-        console.log(this.pageData)
         addR.unBuyClick();
         if (
           this.pageData.strategyInfo.unsubscribeStrategyList !== null &&
@@ -477,6 +476,9 @@ export default {
           pageData.mainJson = JSON.parse(res.data.productJson).product
           this.$store.commit("setPageData", pageData);
           this.getIsBuy()
+          setTimeout(() => {
+            this.callSvg()
+          }, 200)
           this.$store.commit('setTempName', res.data.templateCode)
         })
       } else {
@@ -512,18 +514,15 @@ export default {
             document.title = pageData.mainProduct.productName;
             this.$store.commit("setPageData", pageData);
             this.getIsBuy()
-            if (this.$store.state.tempName === data.templateCode) {
-              setTimeout(() => {
-                this.callSvg()
-              }, 500)
-            }
+            setTimeout(() => {
+              this.callSvg()
+            }, 200)
             this.$store.commit("setTempName", data.templateCode);
           } else {
             this.$toast.fail("当前策略未生效");
           }
         });
       }
-
       this.unBuyDrainage = false;
     },
     // 活动链接跳转

+ 7 - 5
purchase_H5/src/templates/templateCom/index.vue

@@ -463,6 +463,9 @@ export default {
           pageData.mainJson = JSON.parse(res.data.productJson).product
           this.$store.commit("setPageData", pageData);
           this.getIsBuy()
+          setTimeout(() => {
+            this.callSvg()
+          }, 200)
           this.$store.commit('setTempName', res.data.templateCode)
         })
       } else {
@@ -502,17 +505,16 @@ export default {
             document.title = pageData.mainProduct.productName;
             this.$store.commit("setPageData", pageData);
             this.getIsBuy()
-            if (this.$store.state.tempName === data.templateCode) {
-              setTimeout(() => {
-                this.callSvg()
-              }, 500)
-            }
+            setTimeout(() => {
+              this.callSvg()
+            }, 200)
             this.$store.commit("setTempName", data.templateCode);
           } else {
             this.$toast.fail("当前策略未生效");
           }
         });
       }
+
       this.unBuyDrainage = false;
     },
     // 活动链接跳转

+ 11 - 10
purchase_H5/src/templates/templateTogether-Col/index.vue

@@ -322,11 +322,11 @@ export default {
         }
         this.param.cpid = info.data.cpid;
         this.param.spid = info.data.spid;
-          let title = mainProduct.pageTitle !== '' ? mainProduct.pageTitle : mainProduct.productName
-          document.title = title;
-          MgtvApi.setWebviewTitle({
-            title: title,
-          });
+        let title = this.pageData.mainProduct.productName
+        document.title = title;
+        MgtvApi.setWebviewTitle({
+          title: title,
+        });
         this.$store.commit("setPageData", this.pageData);
         this.getIsBuy()
       } else {
@@ -594,6 +594,9 @@ export default {
           pageData.mainJson = JSON.parse(res.data.productJson).product
           this.$store.commit("setPageData", pageData);
           this.getIsBuy()
+          setTimeout(() => {
+            this.callSvg()
+          }, 200)
           this.$store.commit('setTempName', res.data.templateCode)
         })
       } else {
@@ -627,11 +630,9 @@ export default {
             document.title = pageData.mainProduct.productName;
             this.$store.commit("setPageData", pageData);
             this.getIsBuy()
-            if (this.$store.state.tempName === data.templateCode) {
-              setTimeout(() => {
-                this.callSvg()
-              }, 500)
-            }
+            setTimeout(() => {
+              this.callSvg()
+            }, 200)
             this.$store.commit("setTempName", data.templateCode);
           } else {
             this.$toast.fail("当前策略未生效");

+ 9 - 7
purchase_H5/src/templates/templateTogether/index.vue

@@ -520,13 +520,14 @@ export default {
         }
         this.param.cpid = info.data.cpid;
         this.param.spid = info.data.spid;
-        let title = mainProduct.pageTitle !== '' ? mainProduct.pageTitle : mainProduct.productName
+        let title = this.pageData.mainProduct.productName
         document.title = title;
         MgtvApi.setWebviewTitle({
           title: title,
         });
-        this.$store.commit("setPageData", this.pageData);
         this.getIsBuy()
+        this.$store.commit("setPageData", this.pageData);
+
       } else {
         detMainProduct({
           productId: val,
@@ -824,6 +825,9 @@ export default {
           pageData.mainJson = JSON.parse(res.data.productJson).product;
           this.$store.commit("setPageData", pageData);
           this.getIsBuy()
+          setTimeout(() => {
+            this.callSvg()
+          }, 200)
           this.$store.commit("setTempName", res.data.templateCode);
         });
       } else {
@@ -860,11 +864,9 @@ export default {
             document.title = pageData.mainProduct.productName;
             this.$store.commit("setPageData", pageData);
             this.getIsBuy()
-            if (this.$store.state.tempName === data.templateCode) {
-              setTimeout(() => {
-                this.callSvg();
-              }, 500);
-            }
+            setTimeout(() => {
+              this.callSvg()
+            }, 200)
             this.$store.commit("setTempName", data.templateCode);
           } else {
             this.$toast.fail("当前策略未生效");