mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化代码
This commit is contained in:
parent
e10d4c4faf
commit
986608d6a8
@ -546,6 +546,27 @@ export function receiveParkingCoupon(_objData) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询用户优惠卷
|
||||||
|
export function getQrCodeData(_objData) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
requestNoAuth({
|
||||||
|
url: url.getNativeQrcodePayment,
|
||||||
|
method: "GET",
|
||||||
|
data: _objData, //动态数据
|
||||||
|
success: function(res) {
|
||||||
|
if (res.statusCode == 200) {
|
||||||
|
resolve(res.data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
reject();
|
||||||
|
},
|
||||||
|
fail: function(e) {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收银台 支付
|
* 收银台 支付
|
||||||
* @param {Object} _that
|
* @param {Object} _that
|
||||||
|
|||||||
@ -228,7 +228,7 @@ export default {
|
|||||||
deleteInvoiceApply: baseUrl+"app/invoice.deleteInvoiceApply",
|
deleteInvoiceApply: baseUrl+"app/invoice.deleteInvoiceApply",
|
||||||
listInvoiceEvent: baseUrl+"app/invoice.listInvoiceEvent",
|
listInvoiceEvent: baseUrl+"app/invoice.listInvoiceEvent",
|
||||||
saveInvoiceApply: baseUrl+"app/invoice.saveInvoiceApply",
|
saveInvoiceApply: baseUrl+"app/invoice.saveInvoiceApply",
|
||||||
|
getNativeQrcodePayment: baseUrl+"app/payment.getNativeQrcodePayment",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -997,6 +997,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/fee/qrCodeCashier",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "二维码支付",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"color": "#272636",
|
"color": "#272636",
|
||||||
|
|||||||
55
pages/fee/qrCodeCashier.vue
Normal file
55
pages/fee/qrCodeCashier.vue
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<text>{{msg}}</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getQrCodeData} from '@/api/fee/feeApi.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
msg:"正在处理,请稍等!",
|
||||||
|
qrToken:'',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.qrToken = options.qrToken;
|
||||||
|
if(!this.qrToken){
|
||||||
|
this.msg='二维码错误';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
_loadQrcodeData:function(){
|
||||||
|
let _that =this;
|
||||||
|
getQrCodeData({
|
||||||
|
qrToken:this.qrToken
|
||||||
|
}).then(_data =>{
|
||||||
|
if(_data.code !=0){
|
||||||
|
uni.showToast({
|
||||||
|
icon:'none',
|
||||||
|
title:_data.msg
|
||||||
|
})
|
||||||
|
_that.msg = _data.msg;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let _tradeType = 'JSAPI';
|
||||||
|
let _objData = _data.data;
|
||||||
|
_objData.tradeType = _tradeType;
|
||||||
|
|
||||||
|
uni.setStorageSync('doing_cashier',_objData);
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/fee/cashier?money='+_objData.money+"&business="+_objData.business+"&communityId="+_objData.communityId+"&cashierUserId="+_objData.createUserId
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user