Ver código fonte

h5不能使用sessionStorage

shish 6 anos atrás
pai
commit
8b06c64241

+ 8 - 5
store/src/admin/home/workbench.vue

@@ -82,11 +82,10 @@
     </div>
     <!-- <fab-module /> -->
     <!-- 续费遮罩层 -->
-    <modal-module :show="renewMask" :custom="true" :maskClosable="false" padding="30rpx 30rpx">
+    <modal-module :show="renewMask" :custom="true" :maskClosable="true" padding="30rpx 30rpx">
       <template>
         <div class="renew-wrap">
           <div class="renew-wrap-text">你的账号已到期</div>
-          <!-- <button class="admin-button-com middle" @click="pageTo('/admin/renew/index')">立即续费</button> -->
           <button class="admin-button-com middle" @click="renewFn()">立即续费</button>
         </div>
       </template>
@@ -308,9 +307,13 @@ export default {
     },
     // 续费
     renewFn() {
-      // #ifdef H5
-      location.href = `${window.location.protocol}//www.${this.$constant.firstHost}.com/#/?merchantId=${this.userInfo.extend.merchantId}&pay=1`;
-      // #endif
+      this.$util.pageTo({
+        url: "/admin/official/index",
+        query: {
+          pay: 1
+        },
+        type: 2
+      });
     },
     goToItem(item) {
       if (item.name == "数据统计") {

+ 0 - 4
store/src/admin/official/index.vue

@@ -146,14 +146,10 @@ export default {
     init() {
       // 续费
       if (this.option.pay == 1) {
-        // #ifdef H5
         this.status = 3;
         sessionStorage.setItem("renewOption", JSON.stringify(this.option));
-        // #endif
       } else {
-        // #ifdef H5
         sessionStorage.removeItem("renewOption");
-        // #endif
       }
 
       //花店分享的页面有邀人,打开页面保存邀请人

+ 0 - 2
store/src/admin/official/pay.vue

@@ -116,8 +116,6 @@ export default {
         type: 2,
         query: {
           pagestatus: 1
-          // orderSn: this.option.orderSn,
-          // payDiscountPrice: res.data.discountAmount
         }
       });
     },