|
@@ -48,6 +48,7 @@ function initChart(canvas, width, height, dpr) {
|
|
let log = require('../../utils/log.js');
|
|
let log = require('../../utils/log.js');
|
|
var chargingPng;
|
|
var chargingPng;
|
|
var chargingStatus;
|
|
var chargingStatus;
|
|
|
|
+var chargingStatusFlag = true;
|
|
|
|
|
|
Page({
|
|
Page({
|
|
|
|
|
|
@@ -371,6 +372,9 @@ Page({
|
|
}
|
|
}
|
|
let that = this;
|
|
let that = this;
|
|
chargingStatus = setInterval(function() {
|
|
chargingStatus = setInterval(function() {
|
|
|
|
+ if(!chargingStatusFlag){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
let chargPileIdCache = chargPileId;
|
|
let chargPileIdCache = chargPileId;
|
|
let userIdCache = userId;
|
|
let userIdCache = userId;
|
|
let orderidCache = orderid;
|
|
let orderidCache = orderid;
|
|
@@ -496,7 +500,7 @@ Page({
|
|
let userInfo = wx.getStorageSync('userInfo');
|
|
let userInfo = wx.getStorageSync('userInfo');
|
|
let isLogin = wx.getStorageSync('isLogin');
|
|
let isLogin = wx.getStorageSync('isLogin');
|
|
let that = this;
|
|
let that = this;
|
|
-
|
|
|
|
|
|
+
|
|
wx.showModal({
|
|
wx.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
content: '如果您无法正常结束充电,请提交申诉(一小时内最多提交两次)',
|
|
content: '如果您无法正常结束充电,请提交申诉(一小时内最多提交两次)',
|
|
@@ -508,6 +512,7 @@ Page({
|
|
if(!res1.confirm){
|
|
if(!res1.confirm){
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ chargingStatusFlag = false;
|
|
wx.request({
|
|
wx.request({
|
|
url: getApp().globalData.postHeadAgreement + '/restapi/pileLog/applyDeleteChargPileLog',
|
|
url: getApp().globalData.postHeadAgreement + '/restapi/pileLog/applyDeleteChargPileLog',
|
|
data: {
|
|
data: {
|
|
@@ -518,6 +523,8 @@ Page({
|
|
success: function (res) {
|
|
success: function (res) {
|
|
console.info(res);
|
|
console.info(res);
|
|
if(res.data.code == 200){
|
|
if(res.data.code == 200){
|
|
|
|
+ clearInterval(chargingStatus);
|
|
|
|
+ chargingStatusFlag = false;
|
|
wx.showModal({
|
|
wx.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
content: '申诉成功,异常订单已删除',
|
|
content: '申诉成功,异常订单已删除',
|
|
@@ -535,6 +542,7 @@ Page({
|
|
})
|
|
})
|
|
|
|
|
|
}else{
|
|
}else{
|
|
|
|
+ chargingStatusFlag = true;
|
|
console.info(res.data.msg)
|
|
console.info(res.data.msg)
|
|
wx.showModal({
|
|
wx.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -552,6 +560,7 @@ Page({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
fail(e) {
|
|
fail(e) {
|
|
|
|
+ chargingStatusFlag = true;
|
|
console.log("删除车辆失败");
|
|
console.log("删除车辆失败");
|
|
log.info('[删除车辆]','[fail]', e);
|
|
log.info('[删除车辆]','[fail]', e);
|
|
}
|
|
}
|