Bladeren bron

分享落地页:打开微信小程序

panyong 3 jaren geleden
bovenliggende
commit
43e512e862
1 gewijzigde bestanden met toevoegingen van 8 en 1 verwijderingen
  1. 8 1
      htmldev/cps/src/views/common/openWxMiniProgram/index.vue

+ 8 - 1
htmldev/cps/src/views/common/openWxMiniProgram/index.vue

@@ -30,6 +30,7 @@
                 line-height: 100%;
                 text-align: center;
                 font-size: 12px;
+                opacity: 0;
               }
             </style>
             <div class="jump-btn">打开小程序</div>
@@ -91,8 +92,14 @@ export default {
         if (status) {
           // type 类型:1-h5 2-小程序
           const { type, url } = data
+          let pagePath = data.page_path
           this.accountId = data.app_id
-          this.appPath = data.page_path
+          if (pagePath.indexOf('.html?') === -1) {
+            pagePath = pagePath.replace('?', '.html?')
+          } else if (pagePath.indexOf('?') === -1) {
+            pagePath += '.html'
+          }
+          this.appPath = pagePath
           if (type === 2 && isSupportJumpWXmini()) {
             this.showFlag = true
           } else {