shish 2 vuotta sitten
vanhempi
commit
228a8afbcb
2 muutettua tiedostoa jossa 4 lisäystä ja 16 poistoa
  1. 3 16
      hdApp/src/pagesPurchase/gatherPay.vue
  2. 1 0
      hdApp/src/pagesPurchase/wechatPay.vue

+ 3 - 16
hdApp/src/pagesPurchase/gatherPay.vue

@@ -105,29 +105,16 @@ export default {
       }
     },
     weixinPay(){
+      let that = this
       let currentMiniOpenId = uni.getStorageSync('currentMiniOpenId')
       purchaseClearWxPay({ orderSn: this.orderSn,currentMiniOpenId:currentMiniOpenId }).then(res => {
+        that.orderSn = res.data.orderSn
         wexinPay(res.data, this.getSuccess, this.getError)
-      }).catch(err => { console.log(err) })
+      })
     },
     getSuccess () {
       let that = this
       that.pageTo({ url: '/pagesPurchase/gatherResult', type: 2 })
-      // #ifdef MP-WEIXIN
-      if(this.getDictionariesInfo && this.getDictionariesInfo.subscribeMessage && this.getDictionariesInfo.subscribeMessage == 1 && this.getDictionariesInfo.hdMiniMessage && this.getDictionariesInfo.hdMiniMessage.cgSuccess && this.getDictionariesInfo.hdMiniMessage.remindHdClear && this.getDictionariesInfo.hdMiniMessage.giveCoupon){
-        uni.requestSubscribeMessage({
-          tmplIds: [this.getDictionariesInfo.hdMiniMessage.cgSuccess.msgId,this.getDictionariesInfo.hdMiniMessage.giveCoupon.msgId,this.getDictionariesInfo.hdMiniMessage.remindHdClear.msgId],
-          success(res) {
-            console.log(res)
-          },
-          fail(err) {
-            console.log(err)
-          },
-          complete() {
-          }
-        })
-      }
-      // #endif
     },
     getError () {
     },

+ 1 - 0
hdApp/src/pagesPurchase/wechatPay.vue

@@ -157,6 +157,7 @@ export default {
               })
           }else{
             this.pageId = res.data.id
+            this.orderSn = res.data.orderSn
             wexinPay(res.data, this.getSuccess, this.getError)
           }
         }