|
@@ -32,9 +32,52 @@ Page({
|
|
|
userInfo:{},
|
|
|
chargfeatureList:[],
|
|
|
isLogin: false,
|
|
|
- resultTable: []
|
|
|
+ resultTable: [],
|
|
|
+ // 是否减免停车费
|
|
|
+ carParkingRate: false,
|
|
|
+ // 停车时间
|
|
|
+ parkTime: 0,
|
|
|
},
|
|
|
+ execParking(that,stationId){
|
|
|
+ wx.request({
|
|
|
+ url: getApp().globalData.postHeadAgreement + '/restapi/wechat/carParkingRate?stationId=' + stationId,
|
|
|
+ // data: {
|
|
|
+ // loginName: userInfo.loginName
|
|
|
+ // },
|
|
|
+ method: 'POST',
|
|
|
+ success: function (res) {
|
|
|
+ // 是否减免停车费
|
|
|
+ // carParkingRate: false,
|
|
|
+ // parkTime: 0,
|
|
|
+ console.info(res)
|
|
|
+ let dataSharePlatform = res.data.dataSharePlatform;
|
|
|
+ if(!dataSharePlatform){
|
|
|
+ that.setData({
|
|
|
+ carParkingRate:false
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ that.setData({
|
|
|
+ carParkingRate:true
|
|
|
+ })
|
|
|
+ try{
|
|
|
+ that.setData({
|
|
|
+ parkTime: parseFloat((dataSharePlatform.chargeUserId/ 3600).toFixed(2))
|
|
|
+ })
|
|
|
+ }catch(e){
|
|
|
+ that.setData({
|
|
|
+ carParkingRate:false
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
+ },
|
|
|
+ fail(e) {
|
|
|
+ console.log("用户数据同步失败");
|
|
|
+ log.info('[扫码]', '[同步用户数据]', '[fail]', e);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
@@ -46,6 +89,9 @@ Page({
|
|
|
success: function (res) {
|
|
|
console.info(res)
|
|
|
var seeInfoChargPile = res.data;
|
|
|
+ // 异步更新
|
|
|
+ console.info(seeInfoChargPile.chargStationId)
|
|
|
+ that.execParking(that,seeInfoChargPile.chargStationId)
|
|
|
let resultTable = seeInfoChargPile.resultList
|
|
|
that.setData({
|
|
|
resultTable
|
|
@@ -61,11 +107,12 @@ Page({
|
|
|
chargfeatureList = [];
|
|
|
}
|
|
|
|
|
|
- seeInfoChargPile.sharpTotalPrice = parseFloat((seeInfoChargPile.sharpChargPrice==null || seeInfoChargPile.sharpServicePrice==null)? null:(seeInfoChargPile.sharpChargPrice + seeInfoChargPile.sharpServicePrice).toFixed(6));
|
|
|
- seeInfoChargPile.peakTotalPrice = parseFloat((seeInfoChargPile.peakChargPrice==null || seeInfoChargPile.peakServicePrice==null)? null:(seeInfoChargPile.peakChargPrice + seeInfoChargPile.peakServicePrice).toFixed(6));
|
|
|
- seeInfoChargPile.flatTotalPrice = parseFloat((seeInfoChargPile.flatChargPrice==null || seeInfoChargPile.flatServicePrice==null)? null:(seeInfoChargPile.flatChargPrice + seeInfoChargPile.flatServicePrice).toFixed(6));
|
|
|
- seeInfoChargPile.valleyTotalPrice = parseFloat((seeInfoChargPile.valleyChargPrice==null || seeInfoChargPile.valleyServicePrice==null)? null:(seeInfoChargPile.valleyChargPrice + seeInfoChargPile.valleyServicePrice).toFixed(6));
|
|
|
- seeInfoChargPile.totalprice = parseFloat((seeInfoChargPile.chargprice==null || seeInfoChargPile.serviceprice==null)? null:(seeInfoChargPile.chargprice + seeInfoChargPile.serviceprice).toFixed(6));
|
|
|
+ seeInfoChargPile.sharpTotalPrice = parseFloat((seeInfoChargPile.sharpChargPrice==null || seeInfoChargPile.sharpServicePrice==null || seeInfoChargPile.sharpChargPrice=='暂无费用' || seeInfoChargPile.sharpServicePrice=='暂无费用')? null:(seeInfoChargPile.sharpChargPrice + seeInfoChargPile.sharpServicePrice).toFixed(6));
|
|
|
+ seeInfoChargPile.peakTotalPrice = parseFloat((seeInfoChargPile.peakChargPrice==null || seeInfoChargPile.peakServicePrice==null || seeInfoChargPile.peakChargPrice=='暂无费用' || seeInfoChargPile.peakServicePrice=='暂无费用' )? null:(seeInfoChargPile.peakChargPrice + seeInfoChargPile.peakServicePrice).toFixed(6));
|
|
|
+ seeInfoChargPile.flatTotalPrice = parseFloat((seeInfoChargPile.flatChargPrice==null || seeInfoChargPile.flatServicePrice==null || seeInfoChargPile.flatChargPrice=='暂无费用' || seeInfoChargPile.flatServicePrice=='暂无费用' )? null:(seeInfoChargPile.flatChargPrice + seeInfoChargPile.flatServicePrice).toFixed(6));
|
|
|
+ seeInfoChargPile.valleyTotalPrice = parseFloat((seeInfoChargPile.valleyChargPrice==null || seeInfoChargPile.valleyServicePrice==null || seeInfoChargPile.valleyChargPrice=='暂无费用' || seeInfoChargPile.valleyServicePrice=='暂无费用' )? null:(seeInfoChargPile.valleyChargPrice + seeInfoChargPile.valleyServicePrice).toFixed(6));
|
|
|
+ seeInfoChargPile.totalprice = parseFloat((seeInfoChargPile.chargprice==null || seeInfoChargPile.serviceprice==null || seeInfoChargPile.chargprice=='暂无费用' || seeInfoChargPile.serviceprice=='暂无费用')? null:(seeInfoChargPile.chargprice + seeInfoChargPile.serviceprice).toFixed(6));
|
|
|
+
|
|
|
that.setData({
|
|
|
seeInfoChargPile,
|
|
|
chargfeatureList
|