优化 间歇性缴费bug

This commit is contained in:
java110 2022-07-23 13:26:38 +08:00
parent b24a1e3970
commit 5e9fdc8a5c
3 changed files with 24 additions and 4 deletions

4
app.js
View File

@ -31,8 +31,8 @@ let opts = {
} }
app.use('/callComponent', proxy('http://192.168.100.108:8008', opts)); app.use('/callComponent', proxy('http://47.106.15.126:8088', opts));
app.use('/app', proxy('http://192.168.100.108:8008', opts)); app.use('/app', proxy('http://47.106.15.126:8088', opts));
// app.use('/callComponent', proxy('http://127.0.0.1:8008', opts)); // app.use('/callComponent', proxy('http://127.0.0.1:8008', opts));

View File

@ -639,7 +639,9 @@
} }
}; };
if (_cycles == 0) { if (_cycles == 0) {
param.params.custEndTime = $that.payFeeOrderInfo.custEndTime let _custEndTime = vc.dateAdd($that.payFeeOrderInfo.custEndTime);
//前端选择会默认 少一天 所以 加上一天
param.params.custEndTime = _custEndTime;
} }
//发送get请求 //发送get请求
vc.http.apiGet('/feeApi/listFeeObj', vc.http.apiGet('/feeApi/listFeeObj',
@ -648,6 +650,14 @@
let listRoomData = JSON.parse(json); let listRoomData = JSON.parse(json);
vc.component.payFeeOrderInfo.totalFeePrice = $that._getFixedNum(listRoomData.data.feeTotalPrice); vc.component.payFeeOrderInfo.totalFeePrice = $that._getFixedNum(listRoomData.data.feeTotalPrice);
vc.component.payFeeOrderInfo.receivedAmount = vc.component.payFeeOrderInfo.totalFeePrice; vc.component.payFeeOrderInfo.receivedAmount = vc.component.payFeeOrderInfo.totalFeePrice;
let _deadlineTime = new Date(listRoomData.data.deadlineTime);
let _maxEndTime = new Date(listRoomData.data.maxEndTime);
if (_deadlineTime.getTime() > _maxEndTime.getTime()) {
vc.toast('超过最大计费结束时间,' + vc.dateSub(listRoomData.data.maxEndTime, listRoomData.data.feeFlag) + ",请用更小缴费周期或者自定义结束时间缴费");
return;
}
vc.emit('payFeeDiscount', 'computeFeeDiscount', { vc.emit('payFeeDiscount', 'computeFeeDiscount', {
feeId: $that.payFeeOrderInfo.feeId, feeId: $that.payFeeOrderInfo.feeId,
cycles: _cycles, cycles: _cycles,

View File

@ -1701,6 +1701,16 @@
dateTime = vcFramework.dateFormat(dateTime) dateTime = vcFramework.dateFormat(dateTime)
return dateTime; return dateTime;
} }
vcFramework.dateAdd = function(dateTime) {
if (!dateTime || dateTime == '-') {
return dateTime
}
dateTime = new Date(dateTime);
dateTime = dateTime.setDate(dateTime.getDate() + 1);
dateTime = vcFramework.dateFormat(dateTime)
return dateTime;
}
vcFramework.getDateYYYYMMDDHHMISS = function() { vcFramework.getDateYYYYMMDDHHMISS = function() {
let date = new Date(); let date = new Date();