From 60bede5b6a9cf0a5fec9258a68d441e1338c6f24 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Thu, 8 Apr 2021 13:38:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96diamante?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/payFeeByQrCode/payFeeByQrCode.vue | 48 ++++++++++++++++++++----- pages/roomPayFee/roomPayFee.vue | 32 ++++------------- 2 files changed, 45 insertions(+), 35 deletions(-) diff --git a/pages/payFeeByQrCode/payFeeByQrCode.vue b/pages/payFeeByQrCode/payFeeByQrCode.vue index fa16b36..ef546a7 100644 --- a/pages/payFeeByQrCode/payFeeByQrCode.vue +++ b/pages/payFeeByQrCode/payFeeByQrCode.vue @@ -15,23 +15,53 @@ export default { data() { return { - + communityId:'', + roomId:'', } }, onLoad(options) { - new qrCode('oweFeeQrcode', { - text: options.url, - width: 150, - height: 150, - colorDark: "#333333", - colorLight: "#FFFFFF", - correctLevel: qrCode.CorrectLevel.H - }) + this.roomId = options.roomId; + this.communityId = options.communityId; + this._payOweFee(); + }, methods: { _closePayModal: function() { this.context.navigateBack(); }, + //roomId: this.roomInfo.roomId, + // communityId: this.java110Context.getCurrentCommunity().communityId + _payOweFee: function() { + let _that = this; + let _data = { + roomId: this.roomId, + communityId: this.communityId + } + + toPayOweFee(this, _data) + .then((res) => { + console.log(res); + + let _data = res.data; + + if (_data.code != 0) { + uni.showToast({ + icon: 'none', + title: _data.msg + }); + return; + } + new qrCode('oweFeeQrcode', { + text: _data.codeUrl, + width: 150, + height: 150, + colorDark: "#333333", + colorLight: "#FFFFFF", + correctLevel: qrCode.CorrectLevel.H + }) + }) + + } } } diff --git a/pages/roomPayFee/roomPayFee.vue b/pages/roomPayFee/roomPayFee.vue index 9e7d563..5d05663 100644 --- a/pages/roomPayFee/roomPayFee.vue +++ b/pages/roomPayFee/roomPayFee.vue @@ -195,32 +195,12 @@ this._loadRoomInfo(); }, - _payOweFee: function() { - let _that = this; - let _data = { - roomId: this.roomInfo.roomId, - communityId: this.java110Context.getCurrentCommunity().communityId - } - - toPayOweFee(this, _data) - .then((res) => { - console.log(res); - - let _data = res.data; - - if (_data.code != 0) { - uni.showToast({ - icon: 'none', - title: _data.msg - }); - return; - } - this.context.navigateTo({ - url:"/pages/payFeeByQrCode/payFeeByQrCode?url="+_data.codeUrl - }) - - }) - + _payOweFee:function(){ + this.context.navigateTo({ + url:"/pages/payFeeByQrCode/payFeeByQrCode?communityId=", + +this.java110Context.getCurrentCommunity().communityId + +"&roomId="+this.roomInfo.roomId; + }) } } }