优化代码

This commit is contained in:
wuxw 2023-10-27 12:30:17 +08:00
parent e10d4c4faf
commit 986608d6a8
4 changed files with 86 additions and 1 deletions

View File

@ -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

View File

@ -228,7 +228,7 @@ export default {
deleteInvoiceApply: baseUrl+"app/invoice.deleteInvoiceApply",
listInvoiceEvent: baseUrl+"app/invoice.listInvoiceEvent",
saveInvoiceApply: baseUrl+"app/invoice.saveInvoiceApply",
getNativeQrcodePayment: baseUrl+"app/payment.getNativeQrcodePayment",

View File

@ -997,6 +997,15 @@
}
}
,{
"path" : "pages/fee/qrCodeCashier",
"style" :
{
"navigationBarTitleText": "二维码支付",
"enablePullDownRefresh": false
}
}
],
"tabBar": {
"color": "#272636",

View 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>