|
@@ -501,6 +501,46 @@ Page({
|
|
|
async goScanResult(e){
|
|
|
// scan_result
|
|
|
|
|
|
+ console.info('xxxxxxxxxxxxxx')
|
|
|
+ let {
|
|
|
+ keywords
|
|
|
+ } = e.currentTarget.dataset;
|
|
|
+ let userInfo = wx.getStorageSync('userInfo');
|
|
|
+ let isLogin = wx.getStorageSync('isLogin');
|
|
|
+ let chargid = keywords.chargPileId;
|
|
|
+ let that = this;
|
|
|
+
|
|
|
+ if(isLogin && userInfo.bindingPhone==0){
|
|
|
+ console.info('xxxxxxxxxxxxxx1')
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '当前账户未绑定手机号,请您进行手机号绑定操作',
|
|
|
+ showCancel:false,
|
|
|
+ confirmText: '去绑定',
|
|
|
+ confirmColor:'#00AADD',
|
|
|
+ success: function (res1) {
|
|
|
+ let url = `/pages/bindPhone/bindPhone`;
|
|
|
+ wx.navigateTo({
|
|
|
+ url
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ wx.showLoading({
|
|
|
+ title: '努力加载中...',
|
|
|
+ })
|
|
|
+
|
|
|
+ if (!isLogin) {
|
|
|
+ console.info('xxxxxxxxxxxxxx2')
|
|
|
+ log.info('[首页]', '[未登陆跳转登录界面]');
|
|
|
+ let url = `/pages/login/phone_login/phone_login`;
|
|
|
+ wx.hideLoading();
|
|
|
+ wx.navigateTo({
|
|
|
+ url
|
|
|
+ });
|
|
|
+ // return;
|
|
|
+ } else {
|
|
|
let api = getApp().globalData.postHeadAgreement
|
|
|
let path = 'restapi/wechat/queryOccupyFeeOrder'
|
|
|
let params = {
|
|
@@ -518,6 +558,7 @@ Page({
|
|
|
try{
|
|
|
const resultOrder = await wechat.request(api, path, paramsNew);
|
|
|
if (resultOrder.data.code == 200) {
|
|
|
+ wx.hideLoading();
|
|
|
if (resultOrder.data.result.total > 0) {
|
|
|
wx.showModal({
|
|
|
showCancel: false,
|
|
@@ -539,6 +580,7 @@ Page({
|
|
|
}
|
|
|
const result = await wechat.request(api, path, params);
|
|
|
if (result.data.code == 200) {
|
|
|
+ wx.hideLoading();
|
|
|
if (result.data.result.total > 0) { // 有占位费订单不启动扫码充电
|
|
|
this.setData({
|
|
|
showPopup:true
|
|
@@ -559,46 +601,6 @@ Page({
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- console.info('xxxxxxxxxxxxxx')
|
|
|
- let {
|
|
|
- keywords
|
|
|
- } = e.currentTarget.dataset;
|
|
|
- let userInfo = wx.getStorageSync('userInfo');
|
|
|
- let isLogin = wx.getStorageSync('isLogin');
|
|
|
- let chargid = keywords.chargPileId;
|
|
|
- let that = this;
|
|
|
-
|
|
|
- if(isLogin && userInfo.bindingPhone==0){
|
|
|
- console.info('xxxxxxxxxxxxxx1')
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '当前账户未绑定手机号,请您进行手机号绑定操作',
|
|
|
- showCancel:false,
|
|
|
- confirmText: '去绑定',
|
|
|
- confirmColor:'#00AADD',
|
|
|
- success: function (res1) {
|
|
|
- let url = `/pages/bindPhone/bindPhone`;
|
|
|
- wx.navigateTo({
|
|
|
- url
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- wx.showLoading({
|
|
|
- title: '努力加载中...',
|
|
|
- })
|
|
|
-
|
|
|
- if (!isLogin) {
|
|
|
- console.info('xxxxxxxxxxxxxx2')
|
|
|
- log.info('[首页]', '[未登陆跳转登录界面]');
|
|
|
- let url = `/pages/login/phone_login/phone_login`;
|
|
|
- wx.hideLoading();
|
|
|
- wx.navigateTo({
|
|
|
- url
|
|
|
- });
|
|
|
- // return;
|
|
|
- } else {
|
|
|
log.info('[首页]', '[获取用户是否有未支付订单]', '[请求]', { userId: userInfo.userId });
|
|
|
wx.request({
|
|
|
url: getApp().globalData.postHeadAgreement + '/restapi/pileLog/wechatsettlement',
|