shish 2 лет назад
Родитель
Сommit
6eb664c107
1 измененных файлов с 7 добавлено и 9 удалено
  1. 7 9
      hdApp/src/pagesPurchase/wechatPay.vue

+ 7 - 9
hdApp/src/pagesPurchase/wechatPay.vue

@@ -98,12 +98,17 @@ export default {
     ...mapGetters(["getLoginInfo"]),
     ...mapGetters({ dictInfo:"getDictionariesInfo" }),
   },
-  mounted () {
+  onShow(){
+    // #ifdef APP-PLUS
+    let that = this
+    that.$util.confirmModal({content:'已付款成功?',okText:'是的',cancelText:'没有'},() => {
+      that.pageTo({ url: '/pagesPurchase/particulars?id=' + that.id, type: 2 })
+    })
+    // #endif
   },
   methods: {
     init(){
       let that = this
-
       getDetail({id:this.option.id}).then(res=>{
         if(res.code == 1){
           this.realPrice = res.data.realPrice ? parseFloat(res.data.realPrice) : ''
@@ -122,10 +127,8 @@ export default {
               }
             },1000);
           }
-
         }
       })
-
     },
     debtPay(){
       let that = this
@@ -158,11 +161,6 @@ export default {
           if(res.data.payUrl){
             that.orderSn = res.data.orderSn
             plus.runtime.openWeb(res.data.payUrl)
-            setTimeout(function(){
-              that.$util.confirmModal({content:'已付款成功?',okText:'是的',cancelText:'没有'},() => {
-                that.pageTo({ url: '/pagesPurchase/particulars?id=' + id, type: 2 })
-              })
-            },3000)
           }
         }
       })