XWookey преди 1 година
родител
ревизия
0fda9f53f2

+ 2 - 2
pages/chargemoney/chargemoney.js

@@ -88,7 +88,7 @@ Page({
                     content: '您未绑定手机号,请重新登录后自动刷新绑定信息',
                     confirmText: '去登录',
                     showCancel:false,
-                    confirmColor:'#00aadd',
+                    confirmColor:'#00AADD',
                     success: function (res1) {
                       if (res1.confirm) {
                         wx.removeStorageSync('userInfo');
@@ -191,7 +191,7 @@ Page({
           content: '当前账户未绑定手机号,请您进行手机号绑定操作',
           showCancel:false,
           confirmText: '去绑定',
-          confirmColor:'#00aadd',
+          confirmColor:'#00AADD',
           success: function (res1) {
               let url = `/pages/bindPhone/bindPhone`;
               wx.navigateTo({

+ 50 - 11
pages/charginfo/charginfo.js

@@ -27,6 +27,8 @@ Page({
     dataLoading: false,
     finishedLoadTap: 0,
     chargList: [],
+    userInfo:{},
+    isLogin: false,
   },
 
 
@@ -95,13 +97,13 @@ Page({
         chargList.forEach(key => {
           let chargstatusname = '';
           let chargstatusclass = '';
-          if(key.chargstatus == '2'){
+          if(key.chargstatus == 2){
             chargstatusname='空闲中'
             chargstatusclass = 'chargstatus_kxz'
-          }else if(key.chargstatus == '11'){
+          }else if(key.chargstatus == 11){
             chargstatusname='已插枪'
             chargstatusclass = 'chargstatus_ycq'
-          }else if(key.chargstatus == '3' || key.chargstatus == '10'){
+          }else if(key.chargstatus == 3 || key.chargstatus == 10){
             chargstatusname='充电中'
             chargstatusclass = 'chargstatus_cdz'
           }else{
@@ -119,8 +121,8 @@ Page({
           chargList: that.data.chargList.concat(chargList),
           total: res.data.chargList.total,
           dataLoading: false,
-          fastFree : res.data.fastSum,
-          slowFree : res.data.fastFree,
+          fastFree : res.data.fastFree,
+          slowFree : res.data.slowFree,
           fastSum : res.data.fastSum,
           slowSum : res.data.slowSum
         });
@@ -128,16 +130,38 @@ Page({
     });
 
   },
-  goScanResult(){
+  goScanResult(e){
     // scan_result
 
-    wx.showLoading({
-      title: '努力加载中...',
-    })
+
+    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){
+      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) {
       log.info('[首页]', '[未登陆跳转登录界面]');
       let url = `/pages/login/login`;
@@ -258,7 +282,22 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function(e) {
-
+    let userInfo = wx.getStorageSync('userInfo');
+    let isLogin = wx.getStorageSync('isLogin');
+    //console.log(userInfo);
+    // 页面显示
+    if (userInfo && isLogin) {
+      //userInfo.flag = true;
+      this.setData({
+        userInfo: userInfo,
+        isLogin: isLogin
+      });
+    } else {
+      //未登录信息
+      this.setData({
+        userInfo: {}
+      });
+    }
   },
 
   /**

+ 2 - 2
pages/charginfo/charginfo.wxml

@@ -28,7 +28,7 @@
   <view class="title_list">终端列表</view>
 
   <scroll-view class='context' scroll-y='true' bindscrolltolower="bindScrollTolowerEvent" >
-    <view class="charg"  hover-class='active' data-keywords="{{item}}" wx:key='{{key}}' wx:for="{{chargList}}"   bindtap="{{item.chargstatusname=='空闲中'?'goScanResult':''}}">
+    <view class="charg"  hover-class='active' data-keywords="{{item}}" wx:key='{{key}}' wx:for="{{chargList}}"   bindtap="{{!userInfo.flag && item.chargstatusname=='空闲中'?'goScanResult':''}}">
       <view class="runstatus {{item.chargstatusclass}}">
         <view class="runstatus_inner ">
           {{item.chargstatusname}}
@@ -40,7 +40,7 @@
       </view>
       <view class="iconleft" >
         <view class="icon {{item.pileType=='慢充'?'slowBar':'fastBar'}}">{{item.pileType=='慢充'?'慢':'快'}}</view>
-        <view class="startpower" wx:if="{{item.chargstatusname=='空闲中'}}" >启动充电 ></view>
+        <view class="startpower" wx:if="{{!userInfo.flag && item.chargstatusname=='空闲中'}}" >启动充电 ></view>
       </view>
     </view>
   </scroll-view>

+ 1 - 3
pages/charginfo/charginfo.wxss

@@ -99,10 +99,8 @@ text.price {
 .btn{
   width: 280rpx;
   height: 60rpx;
-  line-height: 60rpx;
   background: #35b2ab;
   border-radius: 60rpx;
-  font-size: 28rpx;
   flex-direction: row;
 }
 
@@ -117,6 +115,7 @@ text.price {
   text-align: center;
   border-radius: 10rpx;
   border: 1rpx solid #BBBBBB;
+  font-size: 26rpx;
 }
 
 .icon.slow{
@@ -140,7 +139,6 @@ text.price {
 .status{
   display: inline-block;
     color: #FFFFFF;
-    line-height: 60rpx;
 }
 
 .title_list{

+ 1 - 1
pages/forget/forget.js

@@ -173,7 +173,7 @@ Page({
             content: '手机号未绑定账户。若您已注册,请检查手机号是否填写正确或联系客服',
             showCancel:false,
             confirmText: '确认',
-            confirmColor:'#36a9a6',
+            confirmColor:'#00AADD',
             success: function (res1) {
             }
           });

+ 1 - 1
pages/index/index.js

@@ -873,7 +873,7 @@ Page({
         content: '当前账户未绑定手机号,请您进行手机号绑定操作',
         showCancel:false,
         confirmText: '去绑定',
-        confirmColor:'#00aadd',
+        confirmColor:'#00AADD',
         success: function (res1) {
             let url = `/pages/bindPhone/bindPhone`;
             wx.navigateTo({

+ 3 - 2
pages/login/phone_login/phone_login.js

@@ -145,9 +145,10 @@ Page({
           wx.showModal({
             title: '提示',
             content: '手机号未绑定账户。若您已注册,请通过账号密码方式登录,登陆后根据系统提示绑定手机号或联系客服处理',
-            confirmText: '账号登录',
+            confirmText: '账号密码登录',
+            cancelText:"确定",
             showCancel:true,
-            confirmColor:'#36a9a6',
+            confirmColor:'#00AADD',
             success: function (res1) {
               if (res1.confirm) {
                 let url = '/pages/login/username_login/username_login';

+ 2 - 1
pages/register/register.js

@@ -309,7 +309,8 @@ Page({
             content: '手机号已绑定账户,请检查手机号是否填写正确或联系客服',
             showCancel:true,
             confirmText: '去登录',
-            confirmColor:'#00aadd',
+            cancelText:"确定",
+            confirmColor:'#00AADD',
             success: function (res1) {
               if (res1.confirm) {
                 let url = '/pages/login/phone_login/phone_login';

+ 2 - 1
pages/scan_result/scan_result.js

@@ -121,7 +121,7 @@ Page({
               content: '您未绑定手机号,请重新登录后自动刷新绑定信息',
               confirmText: '去登录',
               showCancel:false,
-              confirmColor:'#00aadd',
+              confirmColor:'#00AADD',
               success: function (res1) {
                 if (res1.confirm) {
                   wx.removeStorageSync('userInfo');
@@ -153,6 +153,7 @@ Page({
               title: '余额:' + data.repaidbalance + '元',
               showCancel: false,
               confirmText: "去充值",
+              confirmColor:'#00AADD',
               content: '余额过低,请尽快充值!',
               success: function (res) {
                 if (res.confirm) {

+ 1 - 1
pages/ucenter/accountsecurity/checkphonesecuirty/checkphonesecruity.json

@@ -1,3 +1,3 @@
 {
-  "navigationBarTitleText": "账户安全"
+  "navigationBarTitleText": "安全验证"
 }

+ 1 - 1
pages/ucenter/accountsecurity/index/index.js

@@ -50,7 +50,7 @@ Page({
         content: '当前账户未绑定手机号,请您进行手机号绑定操作',
         showCancel:false,
         confirmText: '去绑定',
-        confirmColor:'#00aadd',
+        confirmColor:'#00AADD',
         success: function (res1) {
             let url = `/pages/bindPhone/bindPhone`;
             wx.navigateTo({

+ 1 - 1
pages/ucenter/accountsecurity/index/index.json

@@ -1,3 +1,3 @@
 {
-  "navigationBarTitleText": "账安全"
+  "navigationBarTitleText": "账安全"
 }

+ 1 - 1
pages/ucenter/accountsecurity/mdfpassword/mdfpassword.js

@@ -39,7 +39,7 @@ Page({
             content: '您未绑定手机号,请重新登录后自动刷新绑定信息',
             confirmText: '去登录',
             showCancel:false,
-            confirmColor:'#00aadd',
+            confirmColor:'#00AADD',
             success: function (res1) {
               if (res1.confirm) {
                 wx.removeStorageSync('userInfo');

+ 1 - 1
pages/ucenter/accountsecurity/unbindphone/unbindphone.js

@@ -206,7 +206,7 @@ Page({
             content: '您未绑定手机号,请重新登录后自动刷新绑定信息',
             confirmText: '去登录',
             showCancel:false,
-            confirmColor:'#00aadd',
+            confirmColor:'#00AADD',
             success: function (res1) {
               if (res1.confirm) {
                 wx.removeStorageSync('userInfo');

+ 1 - 1
pages/ucenter/center/center.js

@@ -168,7 +168,7 @@ Page({
             content: '您未绑定手机号,请重新登录后自动刷新绑定信息',
             confirmText: '去登录',
             showCancel:false,
-            confirmColor:'#00aadd',
+            confirmColor:'#00AADD',
             success: function (res1) {
               if (res1.confirm) {
                 wx.removeStorageSync('userInfo');

+ 1 - 1
pages/ucenter/index/index.js

@@ -45,7 +45,7 @@ Page({
         content: '当前账户未绑定手机号,请您进行手机号绑定操作',
         showCancel:false,
         confirmText: '去绑定',
-        confirmColor:'#00aadd',
+        confirmColor:'#00AADD',
         success: function (res1) {
             let url = `/pages/bindPhone/bindPhone`;
             wx.navigateTo({

+ 1 - 1
pages/ucenter/purse/purse.js

@@ -25,7 +25,7 @@ Page({
         content: '当前账户未绑定手机号,请您进行手机号绑定操作',
         showCancel:false,
         confirmText: '去绑定',
-        confirmColor:'#00aadd',
+        confirmColor:'#00AADD',
         success: function (res1) {
             let url = `/pages/bindPhone/bindPhone`;
             wx.navigateTo({