| | |
| | | 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 |
| | |
| | | }, |
| | | deleteOrder(item){ |
| | | this.showDelete = !this.showDelete |
| | | }, |
| | | payOrder(item){ |
| | | }, |
| | | doneOrder(item){ |
| | | this.showDone = !this.showDone |
| | |
| | | }) */ |
| | | } |
| | | }, |
| | | // 打开位置 |
| | | 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 { |
| | |
| | | } |
| | | }, |
| | | async getQrcodeByStr(){ |
| | | if (!this.info.exchangeCode) return; |
| | | try { |
| | | const ocanvas = uni.createOffscreenCanvas({ type: "2d" }); |
| | | const qrCodeBase64 = await QRCode.toDataURL(ocanvas,this.info.exchangeCode, { |