mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
41d608ac37
commit
29332e0453
20
app.js
20
app.js
@ -40,20 +40,20 @@ let opts = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo 测试环境 测试使用,生产环境请用nginx带来
|
// todo 测试环境 测试使用,生产环境请用nginx带来
|
||||||
app.use('/callComponent', proxy('http://192.168.100.108:8088', opts));
|
// app.use('/callComponent', proxy('http://192.168.100.108:8088', opts));
|
||||||
app.use('/app', proxy('http://192.168.100.108:8088', opts));
|
// app.use('/app', proxy('http://192.168.100.108:8088', opts));
|
||||||
app.use('/ws', createProxyMiddleware({
|
// app.use('/ws', createProxyMiddleware({
|
||||||
target: 'http://192.168.100.108:8008',
|
// target: 'http://192.168.100.108:8008',
|
||||||
changeOrigin: true,
|
// changeOrigin: true,
|
||||||
ws: true
|
// ws: true
|
||||||
}));
|
// }));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// todo 本机 开发用,生产环境请用nginx带来
|
// todo 本机 开发用,生产环境请用nginx带来
|
||||||
// app.use('/ws', proxy('http://127.0.0.1:8008', opts));
|
app.use('/ws', proxy('http://127.0.0.1:8008', opts));
|
||||||
// app.use('/callComponent', proxy('http://127.0.0.1:8008', opts));
|
app.use('/callComponent', proxy('http://127.0.0.1:8008', opts));
|
||||||
// app.use('/app', proxy('http://127.0.0.1:8008', opts));
|
app.use('/app', proxy('http://127.0.0.1:8008', opts));
|
||||||
|
|
||||||
//app.listen(3000);
|
//app.listen(3000);
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
|
|||||||
@ -45,6 +45,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$that._listFeeDiscounts(DEFAULT_PAGE, DEFAULT_ROWS);
|
$that._listFeeDiscounts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -59,13 +60,13 @@
|
|||||||
|
|
||||||
let _cycles = $that.payFeeDiscountInfo.cycles;
|
let _cycles = $that.payFeeDiscountInfo.cycles;
|
||||||
//todo 自定义缴费周期
|
//todo 自定义缴费周期
|
||||||
if (_cycles == '103' && $that.payFeeDiscountInfo.custEndTime) {
|
// if (_cycles == '103' && $that.payFeeDiscountInfo.custEndTime) {
|
||||||
let _customEndTime = vc.dateAdd($that.payFeeDiscountInfo.custEndTime);
|
// let _customEndTime = vc.dateAdd($that.payFeeDiscountInfo.custEndTime);
|
||||||
|
|
||||||
const timeDiff = Math.abs(new Date(_customEndTime) - new Date($that.payFeeDiscountInfo.endTime));
|
// const timeDiff = Math.abs(new Date(_customEndTime) - new Date($that.payFeeDiscountInfo.endTime));
|
||||||
_cycles =timeDiff / (1000 * 3600 * 24 * 30);
|
// _cycles =timeDiff / (1000 * 3600 * 24 * 30);
|
||||||
_cycles = _cycles.toFixed(2)
|
// _cycles = _cycles.toFixed(2)
|
||||||
}
|
// }
|
||||||
|
|
||||||
let param = {
|
let param = {
|
||||||
params: {
|
params: {
|
||||||
@ -76,7 +77,8 @@
|
|||||||
cycles: _cycles,
|
cycles: _cycles,
|
||||||
payerObjId: $that.payFeeDiscountInfo.payerObjId,
|
payerObjId: $that.payFeeDiscountInfo.payerObjId,
|
||||||
payerObjType: $that.payFeeDiscountInfo.payerObjType,
|
payerObjType: $that.payFeeDiscountInfo.payerObjType,
|
||||||
endTime: $that.payFeeDiscountInfo.endTime
|
endTime: $that.payFeeDiscountInfo.endTime,
|
||||||
|
custEndTime:vc.dateAdd($that.payFeeDiscountInfo.custEndTime)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//发送get请求
|
//发送get请求
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user