Преглед изворни кода

Merge branch 'master' of http://git.liuniu946.com/lhl/myc

lhl пре 3 година
родитељ
комит
bb448caf2a
1 измењених фајлова са 15 додато и 11 уклоњено
  1. 15 11
      pages/received/index.vue

+ 15 - 11
pages/received/index.vue

@@ -207,23 +207,25 @@ export default {
 		// 开启倒计时
 		this.setTimePay();
 	},
-	onHide() {
-		clearInterval(this.setTimeOutPay);
-		clearInterval(this.getMoneyList);
+	onHide() {
+		this.outInterval()
 	},
 	// 监听页面卸载
 	onUnload() {
-		// 关闭倒计时
-		clearInterval(this.setTimeOutPay);
-		clearInterval(this.getMoneyList);
+		// 关闭倒计时
+		this.outInterval()
 	},
 	// 监听页面后退
 	onBackPress() {
 		// 关闭倒计时
-		clearInterval(this.setTimeOutPay);
-		clearInterval(this.getMoneyList);
+		this.outInterval()
 	},
-	methods: {
+	methods: {
+		// 关闭倒计时
+		outInterval(){
+			clearInterval(this.setTimeOutPay);
+			clearInterval(this.getMoneyList);
+		},
 		// 获取收款记录
 		collectionLst() {
 			collectionLst()
@@ -286,7 +288,8 @@ export default {
 			// 输入框的值
 			receivedPaymentCreate({
 				code: this.code,
-				amount: value
+				amount: value,
+				type:this.payType
 			})
 				.then(({ data }) => {
 					uni.showModal({
@@ -376,7 +379,8 @@ export default {
 		clickItem(item) {
 			// 更新付款码
 			if (item === 0) {
-				this.receivedPaymentCode();
+				this.receivedPaymentCode();
+				this.outInterval();
 				this.setTimePay();
 				uni.setNavigationBarColor({
 					backgroundColor:'#4b8fdb',