|
@@ -16,14 +16,6 @@ export default {
|
|
|
cmdType:'',
|
|
|
myLocation:{},
|
|
|
popupControlShow:false,
|
|
|
- comboDialoginfo: {
|
|
|
- showConfirm: false,
|
|
|
- title: '温馨提示',
|
|
|
- opType: 'combo',
|
|
|
- text: '您还未购买换电套餐,是否前往进行换电套餐?',
|
|
|
- confirmBtnText: '前往购买',
|
|
|
- showCancelButton: false
|
|
|
- },
|
|
|
};
|
|
|
},
|
|
|
onLoad(){
|
|
@@ -200,6 +192,12 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // async loadData() {
|
|
|
+ // return new Promise((resolve) => {
|
|
|
+ // // setTimeout(resolve, 1000); // 模拟 5 秒请求时间
|
|
|
+ // // this.trunOn(resolve)
|
|
|
+ // });
|
|
|
+ // },
|
|
|
trunOn(type){
|
|
|
|
|
|
if (this.carOnline) {
|
|
@@ -261,7 +259,26 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}else if(exchange_need_package==1){
|
|
|
- this.comboDialoginfo.showConfirm = true
|
|
|
+ uni.showModal({
|
|
|
+ title: '温馨提示',
|
|
|
+ content: '您还未购买换电套餐,是否前往进行换电套餐?',
|
|
|
+ showCancel: true,
|
|
|
+ cancelText: '取消',
|
|
|
+ confirmText: '前往购买',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ if(isCarLocation){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/batteryPackage/batteryPackage`
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: function(res) {},
|
|
|
+ complete: function(res) {},
|
|
|
+ })
|
|
|
}else if(exchange_need_package==-1){
|
|
|
this.$msg('当前车辆暂未绑定电池')
|
|
|
}
|
|
@@ -283,11 +300,6 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
},
|
|
|
- dialogConfirm(type) {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/batteryPackage/batteryPackage`
|
|
|
- })
|
|
|
- },
|
|
|
},
|
|
|
|
|
|
|