MrShi
22 小时以前 825418425a91c4cf95e56c3fbaf06ea9fb5a37d8
mini-program/pagesA/pages/order-details/order-details.vue
@@ -376,6 +376,36 @@
         this.qrCodeUrl=''
      },
      methods:{
         payOrder() {
            var that = this;
            this.$u.api.replayPay({
               orderId: this.id
            }).then(res => {
               if (res.code === 200) {
                  wx.requestPayment({
                     timeStamp: res.data.response.timeStamp,
                     nonceStr: res.data.response.nonceStr,
                     package: res.data.response.packageValue,
                     signType: res.data.response.signType,
                     paySign: res.data.response.paySign,
                     success (pay) {
                        if (pay.errMsg === "requestPayment:ok") {
                           if(that.userType === 1){
                              that.shop  = {}
                              that.checkShopLogin()
                              that.shop = that.shopInfo || {}
                              that.getShopDetail()
                           }else{
                              that.getUserDetail()
                           }
                        } else {
                           uni.showToast({ title: '订单取消支付', icon: 'none' })
                        }
                     }
                  })
               }
            })
         },
         hexiaoOrder(item){
            uni.navigateTo({
               url:'/pagesA/pages/write-off-a/write-off-a?id='+this.id
@@ -386,8 +416,6 @@
         },
         deleteOrder(item){
            this.showDelete = !this.showDelete
         },
         payOrder(item){
         },
         doneOrder(item){
            this.showDone = !this.showDone
@@ -445,8 +473,14 @@
               }) */
            }
         },
         // 打开位置
         jumpMap(){
            uni.openLocation({
               latitude: this.info.shopInfo.latitude,
               longitude: this.info.shopInfo.longitude,
               name: this.info.shopInfo.name,
               address: this.info.shopInfo.addr
            })
         },
          copyText(text) {
             try {
@@ -465,6 +499,7 @@
             }
         },
         async getQrcodeByStr(){
            if (!this.info.exchangeCode) return;
            try { 
                const ocanvas = uni.createOffscreenCanvas({ type: "2d" });
               const qrCodeBase64 = await QRCode.toDataURL(ocanvas,this.info.exchangeCode, {