hmp 4 lat temu
rodzic
commit
67689dc732
2 zmienionych plików z 16 dodań i 1 usunięć
  1. 6 0
      pages/login/account-login.vue
  2. 10 1
      pages/pay/pay.vue

+ 6 - 0
pages/login/account-login.vue

@@ -129,6 +129,12 @@
 	}
 	}
 </script>
 </script>
 
 
+<style>
+	page{
+		background-color: #FFFFFF;
+	}
+</style>
+
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 	$color:#d18c42;
 	$color:#d18c42;
 	
 	

+ 10 - 1
pages/pay/pay.vue

@@ -40,6 +40,7 @@
 				const _this = this;
 				const _this = this;
 				uni.scanCode({
 				uni.scanCode({
 				    success: function (res) {
 				    success: function (res) {
+						console.log(res.result);
 						_this.payBefore(res.result)
 						_this.payBefore(res.result)
 				    },
 				    },
 					fail: (res) => {
 					fail: (res) => {
@@ -61,7 +62,15 @@
 					type:2
 					type:2
 				}
 				}
 				let resp=await this.$api.shop.payBefore(params)
 				let resp=await this.$api.shop.payBefore(params)
-				console.log(resp);
+				if (!resp.success) {
+					this.$u.toast(resp.msg)
+					return
+				}
+				this.$dialog.showModal('扫描成功,等待用户付款').then(()=>{
+					uni.reLaunch({
+						url:"/pages/index/index"
+					})
+				})
 			},
 			},
 			show(){
 			show(){
 				this.$refs.amountInput.show()
 				this.$refs.amountInput.show()