gcz 3 роки тому
батько
коміт
c368e22f9d

+ 7 - 0
common/apiurl.js

@@ -34,6 +34,13 @@ const apiurl = {
 	//车辆入场信息
 	parkInInfoUrl:'/payee/memberinfo/parkIn/info',
 	
+	//现金支付
+	cashPayUrl:'/payment/cash',
+	//贵州银行扫码支付
+	gzbankSweptUrl:'/payment/gzbank/swept',
+	//贵州银行二维码支付
+	gzbankPolypayUrl:'/payment/gzbank/polypay',
+	
 	//七牛文件上传
 	qiniuUploadUrl:'/file/qiniu/upload',
 	

+ 7 - 1
common/http.api.js

@@ -38,6 +38,10 @@ const install = (Vue, vm) => {
 	let achievement = (params = {}) => vm.$u.post(apiurl.achievementUrl, params);
 	let printIn = (params = {}) => vm.$u.get(apiurl.printIn + params.orderId);
 	
+	let cashPay = (params = {}) => vm.$u.post(apiurl.cashPayUrl, params);
+	let gzbankSwept = (params = {}) => vm.$u.post(apiurl.gzbankSweptUrl, params);
+	let gzbankPolypay = (params = {}) => vm.$u.post(apiurl.gzbankPolypayUrl, params);
+	
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
 	vm.$u.api = {
 		login,
@@ -56,7 +60,9 @@ const install = (Vue, vm) => {
 		parkInInfo,
 		qiniuUpload,
 		achievement,
-		printIn
+		printIn,
+		gzbankSwept,
+		gzbankPolypay
 	};
 }
 

+ 47 - 1
pages/getout/getoutpage/getoutpage.vue

@@ -91,6 +91,7 @@
 <script>
 	//#ifdef APP-PLUS
 	let speak = uni.requireNativePlugin("SpeechPlug");
+	let ALog = uni.requireNativePlugin("AndroidLog")
 	//#endif
 	export default {
 		data() {
@@ -109,6 +110,10 @@
 				vehicleType:0,
 				payStatus:null,
 				showPayway:false,
+				payParams:{
+					orderList:[],
+					code:''
+				}
 				
 			}
 		},
@@ -162,18 +167,59 @@
 			payThis(){
 				this.showOrderDetails = false;
 				this.showPayway = true;
+				this.payParams.orderList.push(this.leaveDetail.orderId);
 			},
 			payAll(){
 				this.showOrderDetails = false;
 				this.showPayway = true;
+				this.payParams.orderList.push(this.leaveDetail.orderId);
+				this.leaveDetail.oweList.forEach(item=>{
+					this.payParams.orderList.push(item.orderId);
+				});
 			},
 			closePayway(){
 				this.showPayway = false;
 			},
 			scanPay(){
-				
+				console.log('this.payParams',this.payParams);
+				ALog('开始扫描');
+				//#ifdef APP-PLUS
+				ALog('开始扫描111');
+				//#endif
+				uni.scanCode({
+				    onlyFromCamera: true,
+				    success: function (res) {
+						//#ifdef APP-PLUS
+						plus.nativeUI.toast(res.result);
+						ALog('条码类型:' + res.scanType);
+						//#endif
+						
+				        console.log('条码类型:' + res.scanType);
+				        console.log('条码内容:' + res.result);
+				    },
+					fail:function(err){
+						//#ifdef APP-PLUS
+						ALog('条码类型:err' + err);
+						//#endif
+					}
+				});
+				this.$u.api.gzbankSwept()
+				.then(res=>{
+					this.$refs.uToast.show({
+						title: res.msg,
+						type: 'success',
+					});
+					console.log('gzbankSwept',res)
+				}).catch(err=>{
+					this.$refs.uToast.show({
+						title: err.msg,
+						type: 'error',
+					});
+					console.log('gzbankSwept ',err)
+				});
 			},
 			qrPay(){
+				console.log('this.payParams',this.payParams);
 				
 			},
 			confirmOut(){

+ 2 - 0
pages/index/index.vue

@@ -150,7 +150,9 @@
 					success : function (res) {
 						var dst = '26.58751,106.78329';
 						var src = res.latitude + ',' + res.longitude;
+						//#ifdef APP-PLUS
 						var locRet = location.distance(src, dst)
+						//#endif
 					},
 					fail: function(res){