bayi преди 1 година
родител
ревизия
a795047a1c
променени са 4 файла, в които са добавени 12 реда и са изтрити 2 реда
  1. 6 0
      pages/commodity/index.js
  2. 1 1
      pages/commodity/index.wxml
  3. 4 0
      pages/my/index.js
  4. 1 1
      pages/my/index.wxml

+ 6 - 0
pages/commodity/index.js

@@ -135,6 +135,12 @@ Page({
         })
         // #endif
     },
+    paySuccess() {
+        this.setUserInfo()
+        this.setData({
+            mask: true
+        })
+    },
     openDonutBuy() {
         let product = this.data.product
         console.log(product);

+ 1 - 1
pages/commodity/index.wxml

@@ -22,5 +22,5 @@
             <view class="goXkx" bindtap="closeMask">确认</view>
         </view>
     </view>
-    <donutBuy id="donutBuy"></donutBuy>
+    <donutBuy id="donutBuy" bind:reload='paySuccess'></donutBuy>
 </view>

+ 4 - 0
pages/my/index.js

@@ -70,6 +70,10 @@ Page({
             vipTime,
         })
     },
+    paySuccess() {
+        this.setUserInfo()
+        this.selectComponent('#vipModal').open()
+    },
     async getProducts() {
         let {
             productList: products,

+ 1 - 1
pages/my/index.wxml

@@ -102,7 +102,7 @@
             <image src="/static/lollipop.png" class="close" catchtap="closeModal" />
         </view>
     </view>
-    <donutBuy id="donutBuy" bind:reload='setUserInfo'></donutBuy>
+    <donutBuy id="donutBuy" bind:reload='paySuccess'></donutBuy>
     <vipModal id="vipModal"></vipModal>
     <gzhModal id="gzh"></gzhModal>
     <canvas id='vip' type="2d"> </canvas>