优化停车费支付失败风险

This commit is contained in:
java110 2020-07-17 16:08:38 +08:00
parent 8e05cac0f4
commit 20d29d16bd
2 changed files with 37 additions and 16 deletions

View File

@ -202,6 +202,15 @@ class LoginFactory {
requsetHcServerToLogin(loginRes, callback = () => {}) { requsetHcServerToLogin(loginRes, callback = () => {}) {
let defaultRawData = '{"nickName":"","gender":1,"language":"","city":"","province":"","country":"","avatarUrl":""}'; // 请求服务端的登录接口 let defaultRawData = '{"nickName":"","gender":1,"language":"","city":"","province":"","country":"","avatarUrl":""}'; // 请求服务端的登录接口
console.log('返回信息', loginRes); console.log('返回信息', loginRes);
let _appId = '';
// #ifdef MP-WEIXIN
let accountInfo = uni.getAccountInfoSync();
_appId = accountInfo.miniProgram.appId;
// #endif
// #ifdef H5
_appId = uni.getStorageSync(constant.mapping.W_APP_ID)
// #endif
wx.request({ wx.request({
url: constant.url.loginUrl, url: constant.url.loginUrl,
method: 'post', method: 'post',
@ -215,7 +224,8 @@ class LoginFactory {
// 签名 // 签名
encryptedData: '', encryptedData: '',
// 用户敏感信息 // 用户敏感信息
iv: '' // 解密算法的向量 iv: '' ,// 解密算法的向量
appId:_appId
}, },
success: function(res) { success: function(res) {

View File

@ -121,7 +121,8 @@
feePrice: 0.00, feePrice: 0.00,
communityId: '', communityId: '',
communityName: '', communityName: '',
feeId: '' feeId: '',
appId:''
}; };
}, },
@ -130,6 +131,14 @@
*/ */
onLoad: function(options) { onLoad: function(options) {
context.onLoad(options); context.onLoad(options);
// #ifdef MP-WEIXIN
let accountInfo = uni.getAccountInfoSync();
this.appId = accountInfo.miniProgram.appId;
// #endif
// #ifdef H5
this.appId = uni.getStorageSync(constant.mapping.W_APP_ID)
// #endif
let _fee = JSON.parse(options.fee); let _fee = JSON.parse(options.fee);
let _receivableAmount = this.feeMonth * _fee.feePrice; let _receivableAmount = this.feeMonth * _fee.feePrice;
let _communityInfo = context.getCurrentCommunity(); let _communityInfo = context.getCurrentCommunity();
@ -233,7 +242,8 @@
feeId: this.feeId, feeId: this.feeId,
feeName: '停车费', feeName: '停车费',
receivedAmount: _receivedAmount, receivedAmount: _receivedAmount,
tradeType:_tradeType tradeType:_tradeType,
appId: this.appId
}; };
context.request({ context.request({
url: constant.url.preOrder, url: constant.url.preOrder,
@ -303,7 +313,8 @@
feeId: this.feeId, feeId: this.feeId,
feeName: '停车费', feeName: '停车费',
receivedAmount: _receivedAmount, receivedAmount: _receivedAmount,
tradeType:_tradeType tradeType:_tradeType,
appId: this.appId
} }
context.request({ context.request({