Browse Source

小程序用户绑定手机开发

XWookey 2 years ago
parent
commit
cb86e46c8e
51 changed files with 935 additions and 292 deletions
  1. 4 3
      app.js
  2. 1 0
      app.json
  3. BIN
      images/enter.png
  4. BIN
      images/enter1.png
  5. 54 19
      pages/bindPhone/bindPhone.js
  6. 4 4
      pages/bindPhone/bindPhone.wxml
  7. 6 1
      pages/bindPhone/bindPhone.wxss
  8. 41 5
      pages/charginfo/charginfo.js
  9. 47 5
      pages/charginfo/charginfo.wxml
  10. 18 11
      pages/charginfo/charginfo.wxss
  11. 63 23
      pages/forget/forget.js
  12. 7 5
      pages/forget/forget.wxml
  13. 12 0
      pages/forget/forget.wxss
  14. 29 3
      pages/index/index.js
  15. 83 23
      pages/login/phone_login/phone_login.js
  16. 4 4
      pages/login/phone_login/phone_login.wxml
  17. 10 3
      pages/login/phone_login/phone_login.wxss
  18. 36 3
      pages/login/username_login/username_login.js
  19. 1 1
      pages/login/username_login/username_login.wxml
  20. 3 2
      pages/login/username_login/username_login.wxss
  21. 75 26
      pages/register/register.js
  22. 5 4
      pages/register/register.wxml
  23. 4 0
      pages/register/register.wxss
  24. 26 8
      pages/reset_password/reset_password.js
  25. 2 2
      pages/reset_password/reset_password.wxml
  26. 5 5
      pages/scan_result/scan_result.js
  27. 21 3
      pages/search_result/search_result.js
  28. 75 21
      pages/ucenter/accountsecurity/checkphonesecuirty/checkphonesecruity.js
  29. 4 4
      pages/ucenter/accountsecurity/checkphonesecuirty/checkphonesecruity.wxml
  30. 6 1
      pages/ucenter/accountsecurity/checkphonesecuirty/checkphonesecruity.wxss
  31. 24 8
      pages/ucenter/accountsecurity/mdfpassword/mdfpassword.js
  32. 2 2
      pages/ucenter/accountsecurity/mdfpassword/mdfpassword.wxml
  33. 54 20
      pages/ucenter/accountsecurity/unbindphone/unbindphone.js
  34. 4 4
      pages/ucenter/accountsecurity/unbindphone/unbindphone.wxml
  35. 6 1
      pages/ucenter/accountsecurity/unbindphone/unbindphone.wxss
  36. 9 6
      pages/ucenter/center/center.js
  37. 12 5
      pages/ucenter/center/center.wxml
  38. 26 9
      pages/ucenter/center/center.wxss
  39. 6 2
      pages/ucenter/chargemoneylog/chargemoneylog.js
  40. 6 2
      pages/ucenter/charginglog/charginglog.js
  41. 9 2
      pages/ucenter/index/index.wxml
  42. 15 6
      pages/ucenter/index/index.wxss
  43. 5 5
      pages/ucenter/myworksheet/myworksheet.wxml
  44. 9 6
      pages/ucenter/myworksheet/myworksheet.wxss
  45. 14 13
      pages/worksheetinfo/addworksheetinfo.js
  46. 2 2
      pages/worksheetinfo/addworksheetinfo.wxml
  47. 6 1
      pages/worksheetinfo/findstation.js
  48. 51 7
      pages/worksheetinfo/worksheetinfo.js
  49. 13 1
      pages/worksheetinfo/worksheetinfo.wxml
  50. 1 1
      project.private.config.json
  51. 15 0
      utils/util.js

+ 4 - 3
app.js

@@ -3,9 +3,9 @@ let wechat = require('./utils/wechat.js');
 let log = require('./utils/log.js');
 App({
   globalData: {
-
+   // postHeadAgreement: 'http://127.0.0.1:10301',
     // 测试
-    postHeadAgreement: 'https://jqcs.pjnes.com/cloud/chargapi',
+   postHeadAgreement: 'https://jqcs.pjnes.com/cloud/chargapi',
 
     // 正式
     // postHeadAgreement: 'https://cdglyy.pjnes.com/cloud/chargapi',
@@ -35,6 +35,7 @@ App({
     wx.showModal({
       title: '温馨提示',
       content: '当前网络环境较差,无法连接服务器,请稍后重试。有问题请联系客服电话4009608068,接听时段08:30-17:00。',
+      confirmColor:'#00AADD',
       showCancel: false
     });
   },
@@ -45,7 +46,7 @@ App({
     if (userInfo && isLogin) {
       if ((!userInfo.userId && userInfo.userId != 0)) {
         log.info('[全局]', '[已登陆未有用户ID跳转登录界面]');
-        let url = `/pages/login/login`;
+        let url = `/pages/login/phone_login/phone_login`;
         wx.navigateTo({
           url
         });

+ 1 - 0
app.json

@@ -1,4 +1,5 @@
 {
+  "lazyCodeLoading": "requiredComponents",
   "pages": [
     "pages/index/index",
     "pages/routes/routes",

BIN
images/enter.png


BIN
images/enter1.png


+ 54 - 19
pages/bindPhone/bindPhone.js

@@ -9,14 +9,16 @@ Page({
       isLogin: false,
       phone: null,
       errorMsg: '',
-      vcodeFlag: true,
+      vcodeFlag: false,
       vcodeTimeOut: 0,
       vcodeTimeOutDefault: 0,
       scene: "LN_PHONE",
-      vcodeLen:2,
+      vcodeLen:6,
       vcodeInterval:null,
       vcode_button_text:'获取验证码',
-      servicetel: '4009608068'
+      servicetel: '4009608068',
+      showMsg: false,
+      timeing: true
   },
 
   onError(e) {
@@ -30,47 +32,62 @@ Page({
 
   inputPhone(e) {
     this.setData({
-      phone: e.detail.value
+      phone: e.detail.value,
+      showMsg: false,
     });
     this.checkAll();
   },
 
   inputVerificatrCode(e) {
     this.setData({
-      vcode: e.detail.value
+      vcode: e.detail.value,
+      showMsg: false,
     });
+    if(!this.msgVcode()){
+      return;
+    }
     this.checkAll();
   },
 
-  checkAll() {
-    if (!this.checkPhoneNumber()) {
+  msgVcode(){
+    if (!this.checkVcode()) {
+      this.setData({
+        // errorMsg: '验证码格式不正确'
+        errorMsg: '验证码格式不正确'
+      });
       this.setData({
-        errorMsg: '手机号输入有误,请重新输入',
-        checkPhone: false,
         checkCode: false
       });
-      return;
+      return false;
     } else {
       this.setData({
-        checkPhone: true,
         errorMsg: ''
       });
     }
+    return true;
+  },
 
-    if (!this.checkVcode()) {
-      this.setData({
-        errorMsg: '验证码格式不正确'
-      });
+  checkAll() {
+    if (!this.checkPhoneNumber()) {
       this.setData({
-        checkCode: false
+        errorMsg: '手机号输入有误,请重新输入',
+        checkPhone: false,
+        checkCode: false,
+        vcodeFlag: false
       });
       return;
     } else {
       this.setData({
-        errorMsg: ''
+        checkPhone: true,
+        errorMsg: '',
+        vcodeFlag: true
       });
     }
 
+    if(!this.msgVcode()){
+      return;
+    }
+
     if (this.data.phone && this.data.vcode) {
       this.setData({
         checkCode: true
@@ -136,6 +153,10 @@ Page({
       success(res) {
         console.info(res)
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
           wx.showModal({
             title: '提示',
             content:res.data.msg,
@@ -160,7 +181,8 @@ Page({
             if (that.data.vcodeTimeOut <= 0) {
               that.setData({
                 vcodeFlag: true,
-                vcode_button_text: '获取验证码'
+                vcode_button_text: '获取验证码',
+                timeing:true
               })
               clearInterval(vcodeInterval);
             }else{
@@ -168,7 +190,8 @@ Page({
               that.setData({
                 vcodeTimeOut:that.data.vcodeTimeOut-1,
                 vcodeFlag: false,
-                vcode_button_text: str
+                vcode_button_text: str,
+                timeing:false
               })
             }
           }, 1000);
@@ -180,6 +203,14 @@ Page({
 
   bindPhone(e) {
     let that = this;
+    
+    this.checkAll();
+    this.setData({
+      showMsg:true
+    })
+    if(!this.data.checkCode){
+      return;
+    }
     let loginName = this.data.userInfo.loginName;
     let { phone, vcode } = this.data;
     log.info('[绑定手机]', '[绑定手机]', '[请求]', { phone, vcode });
@@ -193,6 +224,10 @@ Page({
       method: 'POST',
       success(res) {
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
            that.setData({
              vcode: null,
            });

+ 4 - 4
pages/bindPhone/bindPhone.wxml

@@ -9,13 +9,13 @@
 
       <view class='input_view'>
         <image class='phone_img' src='/images/vcode.png'></image><div class="line"></div>
-        <input placeholder='请输入验证码' bindinput='inputVerificatrCode' type='number' placeholder-class='placeholder'></input>
-        <view bindtap='{{vcodeFlag?"getVerificateCode":""}}' class='varification_button {{vcodeFlag?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
+        <input class="vcode_input" placeholder='请输入验证码' maxlength='6' bindblur='inputVerificatrCode' type='number' placeholder-class='placeholder'></input>
+        <view bindtap='{{vcodeFlag&&timeing?"getVerificateCode":""}}' class='varification_button {{vcodeFlag&&timeing?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
       </view>  
     </view>
-     <view class="errorMsg"><text>{{errorMsg}}</text></view>
+    <view class="errorMsg"><text wx:if="{{showMsg}}">{{errorMsg}}</text></view>
     
-    <button class='{{checkCode?"confirm_button":"confirm_button_disable"}}' bindtap="{{checkCode?'bindPhone':''}}">
+    <button class='confirm_button' bindtap="bindPhone">
       确认
     </button>
 

+ 6 - 1
pages/bindPhone/bindPhone.wxss

@@ -171,4 +171,9 @@
  }
  .getCode_disable {
   background-color: #c9c9c9;
- }
+ }
+
+ 
+.context_input input.vcode_input{
+  width:  calc(100% - 322rpx);
+}

+ 41 - 5
pages/charginfo/charginfo.js

@@ -26,7 +26,9 @@ Page({
     loadTotal: 0,
     dataLoading: false,
     finishedLoadTap: 0,
+    finishedLoadShowTimes: 0,
     chargList: [],
+    seeInfoChargPile:{},
     userInfo:{},
     isLogin: false,
   },
@@ -36,6 +38,31 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function(e) {
+    let that = this;
+    
+    wx.getStorage({
+      key: 'index_seeInfo_chargpile',
+      success: function (res) {
+        var seeInfoChargPile = res.data;
+        seeInfoChargPile.sharpTotalPrice = (seeInfoChargPile.sharpChargPrice==null || seeInfoChargPile.sharpServicePrice==null)? null:(seeInfoChargPile.sharpChargPrice + seeInfoChargPile.sharpServicePrice).toFixed(6);
+        seeInfoChargPile.peakTotalPrice = (seeInfoChargPile.peakChargPrice==null || seeInfoChargPile.peakServicePrice==null)? null:(seeInfoChargPile.peakChargPrice + seeInfoChargPile.peakServicePrice).toFixed(6);
+        seeInfoChargPile.flatTotalPrice = (seeInfoChargPile.flatChargPrice==null || seeInfoChargPile.flatServicePrice==null)? null:(seeInfoChargPile.flatChargPrice + seeInfoChargPile.flatServicePrice).toFixed(6);
+        seeInfoChargPile.valleyTotalPrice = (seeInfoChargPile.valleyChargPrice==null || seeInfoChargPile.valleyServicePrice==null)? null:(seeInfoChargPile.valleyChargPrice + seeInfoChargPile.valleyServicePrice).toFixed(6);
+        seeInfoChargPile.totalprice =  (seeInfoChargPile.chargprice==null || seeInfoChargPile.serviceprice==null)? null:(seeInfoChargPile.chargprice + seeInfoChargPile.serviceprice).toFixed(6);
+        that.setData({
+          seeInfoChargPile
+        });
+        console.info(seeInfoChargPile)
+        wx.removeStorage({
+          key: 'index_seeInfo_chargpile',
+          success(res) {
+          }
+        });
+      }
+    });
+
+
+
     let { name, address, chargprice, serviceprice, chargid } = e;
 
     name =  name=='null'?null:name;
@@ -43,6 +70,7 @@ Page({
     chargprice =  chargprice=='null'?null:chargprice;
     serviceprice =  serviceprice=='null'?null:serviceprice;
     chargid =  chargid=='null'?null:chargid;
+    // let sumprice = (chargprice==null || serviceprice==null)? null:chargprice+serviceprice;
     let sumprice = (chargprice==null || serviceprice==null)? null:chargprice+serviceprice;
     this.setData({
       name,
@@ -52,7 +80,7 @@ Page({
       chargid,
       sumprice
     });
-    let that = this;
+ 
     this.getPage();
   },
   getPage(){
@@ -61,7 +89,10 @@ Page({
       this.setData({
         finishedLoadTap:this.data.finishedLoadTap+1
       })
-      if(this.data.finishedLoadTap>0){
+      if(this.data.finishedLoadTap>0 && this.data.finishedLoadShowTimes==0){
+        this.setData({
+          finishedLoadShowTimes:this.data.finishedLoadShowTimes+1
+        })
         wx.showToast({
           title: '全部加载完毕',
           icon: 'success',
@@ -106,6 +137,9 @@ Page({
           }else if(key.chargstatus == 3 || key.chargstatus == 10){
             chargstatusname='充电中'
             chargstatusclass = 'chargstatus_cdz'
+          }else if(key.chargstatus == 0){
+            chargstatusname='离线'
+            chargstatusclass = 'chargstatus_lx'
           }else{
             chargstatusname='故障'
             chargstatusclass = 'chargstatus_gz'
@@ -133,7 +167,7 @@ Page({
   goScanResult(e){
     // scan_result
 
-
+console.info('xxxxxxxxxxxxxx')
     let {
       keywords
     } = e.currentTarget.dataset;
@@ -143,6 +177,7 @@ Page({
     let that = this;
 
     if(isLogin && userInfo.bindingPhone==0){
+      console.info('xxxxxxxxxxxxxx1')
       wx.showModal({
         title: '提示',
         content: '当前账户未绑定手机号,请您进行手机号绑定操作',
@@ -163,13 +198,14 @@ Page({
     })
 
     if (!isLogin) {
+      console.info('xxxxxxxxxxxxxx2')
       log.info('[首页]', '[未登陆跳转登录界面]');
-      let url = `/pages/login/login`;
+      let url = `/pages/login/phone_login/phone_login`;
       wx.hideLoading();
       wx.navigateTo({
         url
       });
-      return;
+      // return;
     } else {
       log.info('[首页]', '[获取用户是否有未支付订单]', '[请求]', { userId: userInfo.userId });
       wx.request({

+ 47 - 5
pages/charginfo/charginfo.wxml

@@ -9,9 +9,51 @@
           <text class="grey">{{address}}</text>
         </view>
       </view>
-      <text class='inline yellow'>{{sumprice == null? '暂无电费' : ' ¥ ' + sumprice}}</text>
-      <text class='inline grey'>{{chargprice == null? '暂无实时电费' : '实时电费' + chargprice + ' 元/度'}} {{serviceprice == null? '暂无服务费': '服务费' + serviceprice + ' 元/度'}}</text>
-      <text class='inline red'>电费收费标准详见启动充电页面</text>
+
+
+    <text class='inline yellow'>{{seeInfoChargPile.totalprice == null? '暂无费用' : ' ¥ ' + seeInfoChargPile.totalprice}}</text>
+    <view style='line-height:0;margin: 5rpx 0;'>
+      <rich-text space='nbsp' nodes="{{seeInfoChargPile.chargprice == null? '暂无实时电费' : '实时电费 ' + seeInfoChargPile.chargprice + ' 元/度'}}  {{seeInfoChargPile.serviceprice == null? '暂无实时服务费' : '实时服务费 ' + seeInfoChargPile.serviceprice + ' 元/度'}}" style='line-height:30rpx;font-size:20rpx;word-wrap: break-word;color:#AAAAAA' ></rich-text>
+    </view>
+    <text class='inline yellow' style="margin: 5rpx 0;">全天时段费用</text>
+    <view style='line-height:0;margin: 5rpx 0;'>
+      <rich-text space="nbsp" nodes="电 费:尖峰 {{seeInfoChargPile.sharpChargPrice == null? '暂无费用':seeInfoChargPile.sharpChargPrice + ' 元'}}  高峰 {{seeInfoChargPile.peakChargPrice== null? '暂无费用':seeInfoChargPile.peakChargPrice + ' 元'}}  平段 {{seeInfoChargPile.flatChargPrice == null? '暂无费用':seeInfoChargPile.flatChargPrice + ' 元'}}  低谷 {{seeInfoChargPile.valleyChargPrice == null? '暂无费用':seeInfoChargPile.valleyChargPrice + ' 元'}}  " style='line-height:30rpx;font-size:20rpx;word-wrap: break-word;color:#AAAAAA;'></rich-text>
+    </view>
+    <view style='line-height:0;margin: 5rpx 0;'>
+      <rich-text space='nbsp' nodes="服务费:尖峰 {{seeInfoChargPile.sharpServicePrice == null? '暂无费用':seeInfoChargPile.sharpServicePrice + ' 元'}}  高峰 {{seeInfoChargPile.peakServicePrice== null? '暂无费用':seeInfoChargPile.peakServicePrice + ' 元'}}  平段 {{seeInfoChargPile.flatServicePrice== null? '暂无费用':seeInfoChargPile.flatServicePrice + ' 元'}}  低谷 {{seeInfoChargPile.valleyServicePrice== null? '暂无费用':seeInfoChargPile.valleyServicePrice + ' 元'}}  " style='line-height:30rpx;font-size:20rpx;color:#AAAAAA;word-wrap: break-word;'></rich-text>
+    </view>
+    <view style='line-height:0;margin: 5rpx 0;'>
+      <rich-text space='nbsp' nodes="总费用:尖峰 {{seeInfoChargPile.sharpTotalPrice == null? '暂无费用':seeInfoChargPile.sharpTotalPrice + ' 元'}}  高峰 {{seeInfoChargPile.peakTotalPrice == null? '暂无费用':seeInfoChargPile.peakTotalPrice + ' 元'}}  平段 {{seeInfoChargPile.flatTotalPrice == null? '暂无费用':seeInfoChargPile.flatTotalPrice + ' 元'}}  低谷 {{seeInfoChargPile.valleyTotalPrice == null? '暂无费用':seeInfoChargPile.valleyTotalPrice + ' 元'}}  " style='line-height:30rpx;font-size:20rpx;color:#c13e32;word-wrap: break-word;'></rich-text>
+    </view>
+    <!-- <view style='line-height:0;'>
+      <text decode='true' class='inline'>费用:&nbsp;&nbsp;</text>
+      <text decode='true' class='slow inline'>{{seeInfoChargPile.sharpChargPrice}}</text>
+      <text decode='true' class='inline'>元尖&nbsp;&nbsp;</text>
+      <text decode='true' class='slow inline'>{{seeInfoChargPile.peakChargPrice}}</text>
+      <text decode='true' class='inline'>元峰&nbsp;&nbsp;</text>
+      <text decode='true' class='slow inline'>{{seeInfoChargPile.flatChargPrice}}</text>
+      <text decode='true' class='inline'>元平&nbsp;&nbsp;</text>
+      <text decode='true' class='slow inline'>{{seeInfoChargPile.valleyChargPrice}}</text>
+      <text decode='true' class='inline'>元谷&nbsp;&nbsp;</text>
+    </view> -->
+    <!-- <text class="inline"></text> -->
+    <view>
+    <!-- <rich-text style='line-height:30rpx;word-break:break-all;color: #575757;font-size:26rpx;'><span style="font-weight:bold;color:#000">北京地区</span>峰谷时段划分如下所示(如有峰谷差异电价,详情请咨询场站现场负责人):</rich-text> -->
+  </view>
+  <text class='inline yellow'>尖峰平谷时段</text>
+    <view style='line-height: 30rpx'>
+      <text decode='true' style='font-size:20rpx;color:#aaaaaa;line-height: 0rpx;'>高峰:10:00-15:00&nbsp;&nbsp;18:00-21:00</text>
+    </view>
+    <view style='line-height: 30rpx'>
+      <text decode='true' style='font-size:20rpx;color:#aaaaaa;line-height: 0rpx;'>平段:07:00-10:00&nbsp;&nbsp;15:00-18:00&nbsp;&nbsp;21:00-23:00</text>
+    </view>
+    <view style='line-height: 30rpx'>
+      <text decode='true' style='font-size:20rpx;color:#aaaaaa;line-height: 0rpx;'>低谷:23:00至次日07:00</text>
+    </view>
+    <view style='line-height: 30rpx'>
+      <text decode='true' style='font-size:20rpx;color:#aaaaaa;'>尖峰:7\8月11:00-13:00&nbsp;&nbsp;16:00-17:00</text>
+    </view>
+
 	  <view class="btn_list">
 		  <view class="btn">
 			  <view class="icon">快</view>
@@ -28,7 +70,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="{{!userInfo.flag && 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 +82,7 @@
       </view>
       <view class="iconleft" >
         <view class="icon {{item.pileType=='慢充'?'slowBar':'fastBar'}}">{{item.pileType=='慢充'?'慢':'快'}}</view>
-        <view class="startpower" wx:if="{{!userInfo.flag && item.chargstatusname=='空闲中'}}" >启动充电 ></view>
+        <view class="startpower" wx:if="{{!userInfo.flag && item.chargstatusname=='已插枪'}}" >启动充电 ></view>
       </view>
     </view>
   </scroll-view>

+ 18 - 11
pages/charginfo/charginfo.wxss

@@ -13,7 +13,7 @@ page {
 
 .map_text{
   background:#FFFFFF;
-  height: 280rpx;
+  height: 560rpx;
   margin: 12rpx 0;
   padding:20rpx 40rpx;
 }
@@ -54,6 +54,7 @@ text.inline{
   color: #9d9d9d;
   margin: 0;
 }
+
 text.border{
  line-height: 40rpx;
  height: 40rpx;
@@ -62,7 +63,8 @@ text.border{
 }
 text.yellow {
   color: #da8527;
-  font-size: 24rpx;
+  font-size: 22rpx;
+  line-height: 30rpx;
   /* font-weight: bold; */
 }
 
@@ -76,7 +78,7 @@ text.price {
   color: #9d9d9d;
 }
 .context {
-  height: calc(100% - 480rpx);
+  height: calc(100% - 720rpx);
 }
 
 .chargprice {
@@ -162,25 +164,25 @@ text.price {
 }
 
 .runstatus{
-  width: 100rpx;
-  height: 100rpx;
+  width: 50px;
+  height: 50px;
   background-color: #35B2AB;
   border-radius: 50%;
-  margin: 20rpx;
+  margin: 28rpx 20rpx; 
   color: #35B2AB;
 }
 
 
 .runstatus_inner{
-  width: 80rpx;
-  height: 80rpx;
+  width: 40px;
+  height: 40px;
   border-radius: 50%;
   background-color: #ffff;
   position: relative;
-  top: 10rpx;
-  left: 10rpx;
+  top: 5px;
+  left: 5px;
   text-align: center;
-  line-height: 80rpx;
+  line-height: 70rpx;
   font-size: 22rpx;
 
 }
@@ -198,6 +200,11 @@ text.price {
   color: #00AADD;
 }
 
+.runstatus.chargstatus_lx{
+  background-color: #8F8E94;
+  color: #8F8E94;
+}
+
 .runstatus.chargstatus_gz{
   background-color: #E29E53;
   color: #E29E53;

+ 63 - 23
pages/forget/forget.js

@@ -12,18 +12,28 @@ Page({
     vcode: null,
     checkCode: false,
     checkPhone: false,
-    vcodeFlag: true,
+    vcodeFlag: false,
     errorMsg: '',
     varificatCodeFocus:false,
     vcode_button_text: '获取验证码',
     scene: "FORGET_PWD",
     vcodeTimeOut: 0,
     vcodeTimeOutDefault: 0,
-    vcodeLen: 2,
-    errorMsg: ''
+    vcodeLen:6,
+    errorMsg: '',
+    servicetel: '4009608068',
+    showMsg: false,
+    timeing: true
   },
   goNext(e){
     let that = this;
+    this.checkAll();
+    this.setData({
+      showMsg:true
+    })
+    if(!this.data.checkCode){
+      return;
+    }
     let { phone, vcode } = this.data;
     //跳转到下一步
     wx.request({
@@ -35,6 +45,10 @@ Page({
       method: 'POST',
       success(res) {
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
           wx.showModal({
             title: '提示',
             content: res.data.msg,
@@ -54,47 +68,63 @@ Page({
   
   inputPhone(e) {
     this.setData({
-      phone: e.detail.value
+      phone: e.detail.value,
+      showMsg: false,
     });
     this.checkAll();
   },
 
   inputVerificatrCode(e) {
     this.setData({
-      vcode: e.detail.value
+      vcode: e.detail.value,
+      showMsg: false,
     });
+    if(!this.msgVcode()){
+      return;
+    }
     this.checkAll();
   },
 
-  checkAll() {
-    if (!this.checkPhoneNumber()) {
+  msgVcode(){
+    if (!this.checkVcode()) {
+      this.setData({
+        // errorMsg: '验证码格式不正确'
+        errorMsg: '验证码格式不正确'
+      });
       this.setData({
-        errorMsg: '手机号输入有误,请重新输入',
-        checkPhone: false,
         checkCode: false
       });
-      return;
+      return false;
     } else {
       this.setData({
-        checkPhone: true,
         errorMsg: ''
       });
     }
+    return true;
+  },
 
-    if (!this.checkVcode()) {
-      this.setData({
-        errorMsg: '验证码格式不正确'
-      });
+  checkAll() {
+    if (!this.checkPhoneNumber()) {
       this.setData({
-        checkCode: false
+        errorMsg: '手机号输入有误,请重新输入',
+        checkPhone: false,
+        checkCode: false,
+        vcodeFlag: false
       });
       return;
     } else {
       this.setData({
-        errorMsg: ''
+        checkPhone: true,
+        errorMsg: '',
+        vcodeFlag: true
+
       });
     }
 
+    if(!this.msgVcode()){
+      return;
+    }
+
     if (this.data.phone && this.data.vcode) {
       this.setData({
         checkCode: true
@@ -122,7 +152,11 @@ Page({
     }
     return false;
   },
-
+  phoneCall(){
+    wx.makePhoneCall({
+      phoneNumber: this.data.servicetel,
+    })
+  },
   getVerificateCode(){
     let vcodeFlag = this.data.vcodeFlag;
     let checkPhone = this.data.checkPhone;
@@ -155,20 +189,24 @@ Page({
       },
       method: 'POST',
       success(res) {
-        if (res.data.code == 1) {
+        if (res.data.code == 2) {
           wx.showModal({
             title: '提示',
             content:res.data.msg,
             showCancel:false,
             confirmColor:'#00AADD',
           });
-        }else if (res.data.code == 2) {
+        }else if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
           // 跳转
           wx.showModal({
             title: '提示',
             content: '手机号未绑定账户。若您已注册,请检查手机号是否填写正确或联系客服',
             showCancel:false,
-            confirmText: '确',
+            confirmText: '确',
             confirmColor:'#00AADD',
             success: function (res1) {
             }
@@ -183,7 +221,8 @@ Page({
             if (that.data.vcodeTimeOut <= 0) {
               that.setData({
                 vcodeFlag: true,
-                vcode_button_text: '获取验证码'
+                vcode_button_text: '获取验证码',
+                timeing:true
               })
               clearInterval(vcodeInterval);
             }else{
@@ -191,7 +230,8 @@ Page({
               that.setData({
                 vcodeTimeOut:that.data.vcodeTimeOut-1,
                 vcodeFlag: false,
-                vcode_button_text: str
+                vcode_button_text: str,
+                timeing:false
               })
             }
           }, 1000);

+ 7 - 5
pages/forget/forget.wxml

@@ -11,8 +11,8 @@
       </view>
       <view class='input_view'>
         <image class='password_img' src='/images/password.png'></image>
-        <input name="phoneCode" placeholder="请输入验证码" focus="{{varificatCodeFocus}}"  placeholder-class='placeholder' bindinput="inputVerificatrCode" />
-        <view bindtap='{{vcodeFlag?"getVerificateCode":""}}' class='varification_button {{vcodeFlag?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
+        <input name="phoneCode" class="vcode_input" class="vcode_input" placeholder="请输入验证码" maxlength='6' bindinput="{{varificatCodeFocus}}"  placeholder-class='placeholder' bindblur="inputVerificatrCode" />
+        <view bindtap='{{vcodeFlag&&timeing?"getVerificateCode":""}}' class='varification_button {{vcodeFlag&&timeing?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
       </view>
 
       <!-- <view class='input_view'>
@@ -28,14 +28,16 @@
         <input placeholder='请输入邮箱' maxlength='48' bindinput='inputEmail' type='text' placeholder-class='placeholder'></input>
       </view> -->
     </view>
-    <view class="errorMsg"><text>{{errorMsg}}</text></view>
-    <button class='{{checkCode?"login_button":"login_button_disable"}}' bindtap="{{checkCode?'goNext':''}}">
+    <view class="errorMsg"><text wx:if="{{showMsg}}">{{errorMsg}}</text></view>
+    <button class='login_button' bindtap="goNext">
       下一步
     </button>
 
     <!-- <view style="width: 100%;margin-top:50rpx">
       <ad unit-id="adunit-8eb13875bcf592b0" ad-intervals="30"></ad>
     </view> -->
-
+    <view class='phone_call_class' bindtap="phoneCall">
+          <span>联系客服:  {{servicetel}}</span>
+   </view>
   </view>
 </view>

+ 12 - 0
pages/forget/forget.wxss

@@ -193,3 +193,15 @@
  .getCode_disable {
   background-color: #c9c9c9;
  }
+
+ .phone_call_class{
+  text-align: center;
+  margin: 280rpx 0rpx;
+  color: #c9c9c9;
+  font-size: 28rpx;
+}
+
+
+.context_input input.vcode_input{
+  width:  calc(100% - 322rpx);
+}

+ 29 - 3
pages/index/index.js

@@ -362,9 +362,18 @@ Page({
                   serviceprice: item.serviceprice,
                   /** 停车费 */
                   stopprice: item.stopprice,
-                  operationState: item.operationState
+                  operationState: item.operationState,
+                  sharpChargPrice : item.sharpChargPrice,
+                  sharpServicePrice : item.sharpServicePrice,
+                  peakChargPrice : item.peakChargPrice,
+                  peakServicePrice : item.peakServicePrice,
+                  flatChargPrice : item.flatChargPrice,
+                  flatServicePrice : item.flatServicePrice,
+                  valleyChargPrice : item.valleyChargPrice,
+                  valleyServicePrice : item.valleyServicePrice,
                 };
                 markers[index] = marker;
+
               });
             }
               that.setData({
@@ -530,7 +539,7 @@ Page({
     });
   },
   seeInfo(e){
-    //console.log(e);
+    console.log("11111");
     // 起点
     let {
       user_lat: latitude,
@@ -546,7 +555,10 @@ Page({
       chargprice,
       serviceprice,
     } = textData;
+    console.log("222222");
+    console.log(markers);
     if (!markers.length) return;
+    console.log("3333333");
     // 终点
     markers.forEach((item, index) => {
       if (markerId && markerId == item.id) {
@@ -554,6 +566,11 @@ Page({
           name: latitude2,
           longitude: longitude2
         } = item;
+        wx.setStorage({
+          key: "index_seeInfo_chargpile",
+          data: item
+        });
+
         let url = `/pages/charginfo/charginfo?name=${name}&address=${address}&chargprice=${chargprice}&serviceprice=${serviceprice}&chargid=${markerId}`;
         //console.log(url);
         wx.navigateTo({
@@ -845,7 +862,16 @@ Page({
                     serviceprice: item.serviceprice,
                     /** 停车费 */
                     stopprice: item.stopprice,
-                    operationState: item.operationState
+  
+                    operationState: item.operationState,
+                    sharpChargPrice : item.sharpChargPrice,
+                    sharpServicePrice : item.sharpServicePrice,
+                    peakChargPrice : item.peakChargPrice,
+                    peakServicePrice : item.peakServicePrice,
+                    flatChargPrice : item.flatChargPrice,
+                    flatServicePrice : item.flatServicePrice,
+                    valleyChargPrice : item.valleyChargPrice,
+                    valleyServicePrice : item.valleyServicePrice,
                   };
                   markers[index] = marker;
                 });

+ 83 - 23
pages/login/phone_login/phone_login.js

@@ -1,5 +1,6 @@
 // pages/login/phone_login/phone_login.js
 let log = require('../../../utils/log.js');
+let Util = require("../../../utils/util");
 Page({
 
   /**
@@ -10,15 +11,18 @@ Page({
     vcode: null,
     checkCode: false,
     checkPhone: false,
-    vcodeFlag: true,
+    vcodeFlag: false,
     errorMsg: '',
     varificatCodeFocus:false,
     vcode_button_text: '获取验证码',
     scene: "LOGIN",
     vcodeTimeOut: 0,
     vcodeTimeOutDefault: 0,
-    vcodeLen: 2,
-    servicetel: getApp().globalData.helpPhoneNum
+    vcodeLen:6,
+    servicetel: getApp().globalData.helpPhoneNum,
+    queryip: '',
+    showMsg: false,
+    timeing: true,
   },
   onError(e) {
     wx.showModal({
@@ -30,47 +34,62 @@ Page({
   },
   inputPhone(e) {
     this.setData({
-      phone: e.detail.value
+      phone: e.detail.value,
+      showMsg: false
     });
     this.checkAll();
   },
 
   inputVerificatrCode(e) {
     this.setData({
-      vcode: e.detail.value
+      vcode: e.detail.value,
+      showMsg: false
     });
+    if(!this.msgVcode()){
+      return;
+    }
     this.checkAll();
   },
 
-  checkAll() {
-    if (!this.checkPhoneNumber()) {
+  msgVcode(){
+    if (!this.checkVcode()) {
+      this.setData({
+        // errorMsg: '验证码格式不正确'
+        errorMsg: '验证码格式不正确'
+      });
       this.setData({
-        errorMsg: '手机号输入有误,请重新输入',
-        checkPhone: false,
         checkCode: false
       });
-      return;
+      return false;
     } else {
       this.setData({
-        checkPhone: true,
         errorMsg: ''
       });
     }
+    return true;
+  },
 
-    if (!this.checkVcode()) {
-      this.setData({
-        errorMsg: '验证码格式不正确'
-      });
+  checkAll() {
+    if (!this.checkPhoneNumber()) {
       this.setData({
-        checkCode: false
+        errorMsg: '手机号输入有误,请重新输入',
+        checkPhone: false,
+        checkCode: false,
+        vcodeFlag: false
       });
       return;
     } else {
       this.setData({
-        errorMsg: ''
+        checkPhone: true,
+        errorMsg: '',
+        vcodeFlag: true
       });
     }
 
+    if(!this.msgVcode()){
+      return;
+    }
+
     if (this.data.phone && this.data.vcode) {
       this.setData({
         checkCode: true
@@ -134,14 +153,18 @@ Page({
       method: 'POST',
       success(res) {
         console.info(res.data.code);
-        if (res.data.code == 1) {
+        if (res.data.code == 2) {
           wx.showModal({
             title: '提示',
             content:res.data.msg,
             showCancel:false,
             confirmColor:'#00AADD',
           });
-        }else if (res.data.code == 2) {
+        }else if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
           // 跳转
           wx.showModal({
             title: '提示',
@@ -169,7 +192,8 @@ Page({
             if (that.data.vcodeTimeOut <= 0) {
               that.setData({
                 vcodeFlag: true,
-                vcode_button_text: '获取验证码'
+                vcode_button_text: '获取验证码',
+                timeing:true
               })
               clearInterval(vcodeInterval);
             }else{
@@ -177,7 +201,8 @@ Page({
               that.setData({
                 vcodeTimeOut:that.data.vcodeTimeOut-1,
                 vcodeFlag: false,
-                vcode_button_text: str
+                vcode_button_text: str,
+                timeing:false
               })
             }
           }, 1000);
@@ -189,12 +214,24 @@ Page({
 
   loginUser(e) {
     let that = this;
-    let { phone, vcode } = this.data;
+    that.loginUserInner(e,that,that.data.queryip)
+  },
+
+  loginUserInner(e,that,ip) {
+    let { phone, vcode } = that.data;
+    that.checkAll();
+    that.setData({
+      showMsg:true
+    })
+    if(!that.data.checkCode){
+      return;
+    }
     log.info('[登录]', '[登录]', '[请求]', { phone, vcode });
     wx.request({
       url: getApp().globalData.postHeadAgreement +'/restapi/wechat/phoneLogin',
       data: {
         phonenumber: phone,
+        // ip:ip,
         vcode
       },
       method: 'POST',
@@ -202,6 +239,10 @@ Page({
         console.log(res);
         log.info('[登录]', '[登录]', '[响应]', res.data);
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
            that.setData({
              vcode: null,
              passwordFocus:true//,
@@ -232,6 +273,7 @@ Page({
       }
     });
   },
+  
 
   phoneCall(){
     wx.makePhoneCall({
@@ -261,9 +303,10 @@ Page({
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function (options) {
+  async onLoad(options) {
     let scene = this.data.scene;
     let that = this
+
     wx.request({
       url: getApp().globalData.postHeadAgreement + '/restapi/wechat/vcodeInfo',
       data: {
@@ -277,6 +320,23 @@ Page({
           vcodeTimeOutDefault:res.data.result.expire,
           vcodeLen:res.data.result.len
         })
+        wx.request({
+          url: 'https://ipv4.icanhazip.com/',
+          method: 'POST',
+          success(rrr){
+            console.info(rrr);
+            var query = (rrr == null?'':rrr==null?'':rrr);
+            let queryip = query.data==null? '':query.data.replace("\n","");
+            that.setData({
+              queryip
+            })
+          },
+          fail(rrr){
+            that.setData({
+              queryip: ''
+            })
+          }
+        })
       }
     });
   },

+ 4 - 4
pages/login/phone_login/phone_login.wxml

@@ -11,12 +11,12 @@
       </view>
       <view class='input_view'>
         <image class='password_img' src='/images/password.png'></image>
-        <input name="phoneCode" placeholder="请输入验证码" type='number' focus="{{varificatCodeFocus}}"  placeholder-class='placeholder' bindinput="inputVerificatrCode" />
-        <view bindtap='{{vcodeFlag?"getVerificateCode":""}}' class='varification_button {{vcodeFlag?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
-        <view class="errorMsg"><text>{{errorMsg}}</text></view>
+        <input name="phoneCode" class="vcode_input" placeholder="请输入验证码" maxlength='6' type='number' bindinput="{{varificatCodeFocus}}"  placeholder-class='placeholder' bindinput="inputVerificatrCode"/>
+        <view bindtap='{{vcodeFlag&&timeing?"getVerificateCode":""}}' class='varification_button {{vcodeFlag&&timeing?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
+        <view class="errorMsg"><text wx:if="{{showMsg}}">{{errorMsg}}</text></view>
       </view>
     </view>
-    <button class='{{checkCode?"login_button":"login_button_disable"}}' bindtap="{{checkCode?'loginUser':''}}" >登录</button>
+    <button class='login_button' bindtap="loginUser" >登录</button>
     <view class="other_button">
       <text class='account_login'  bindtap='goToAccountLogin'>账户密码登录</text>
       <text class='register_view'  bindtap='goToRegister'>注册账户</text>

+ 10 - 3
pages/login/phone_login/phone_login.wxss

@@ -40,8 +40,10 @@
   margin-right: 32rpx;
   margin-left: 32rpx;
   margin-bottom: 30rpx;
+
 }
 
+
 .account_img {
   width: 30rpx;
   height: 32rpx;
@@ -165,12 +167,13 @@
 }
 
 .account_login {
-  display: inline-block;
+  position: absolute;
+  right: 480rpx;
   height: 48rpx;
   color: #999999;
   font-size: 24rpx;
   line-height: 48rpx;
-  text-align: left;
+  text-align: center;
   font-family: 'Lucida Sans',
                  'Lucida Sans Regular',
                  'Lucida Grande',
@@ -198,7 +201,7 @@
 }
 .forget_view {
   position: absolute;
-  right: 145rpx;
+  right: 135rpx;
   display: inline-block;
   height: 48rpx;
   color: #999999;
@@ -249,4 +252,8 @@
   margin: 160rpx;
   color: #c9c9c9;
   font-size: 28rpx;
+}
+
+.context_input input.vcode_input{
+  width:  calc(100% - 322rpx);
 }

+ 36 - 3
pages/login/username_login/username_login.js

@@ -1,5 +1,6 @@
 // pages/username_login/username_login.js
 let log = require('../../../utils/log.js');
+let Util = require("../../../utils/util");
 Page({
 
   /**
@@ -11,7 +12,8 @@ Page({
     checkPass: false,
     errorMsg: '',
     passwordFocus:false,
-    servicetel: getApp().globalData.helpPhoneNum
+    servicetel: getApp().globalData.helpPhoneNum,
+    queryip: ''
   },
   onError(e) {
     wx.showModal({
@@ -54,12 +56,19 @@ Page({
   },
   loginUser(e) {
     let that = this;
-    let { loginName, password } = this.data;
+    that.loginUserInner(e,that,that.data.queryip)
+  },
+  loginUserInner(e,that,ip) {
+    console.info("fff")
+    console.info(ip)
+    let { loginName, password } = that.data;
     log.info('[登录]', '[登录]', '[请求]', { loginName, password });
+    let ipp = ip;
     wx.request({
       url: getApp().globalData.postHeadAgreement +'/restapi/wechat/login',
       data: {
         loginName,
+        // ip:ipp,
         password
       },
       method: 'POST',
@@ -68,6 +77,10 @@ Page({
         //console.log(res1.data.code == 1);
         log.info('[登录]', '[登录]', '[响应]', res.data);
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
            that.setData({
              password: null,
              passwordFocus:true//,
@@ -98,7 +111,6 @@ Page({
       }
     });
   },
-
   phoneCall(){
     wx.makePhoneCall({
       phoneNumber: this.data.servicetel
@@ -131,7 +143,28 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    let that = this
     log.info('[登录]', '[加载完成]');
+    wx.request({
+      url: 'https://ipv4.icanhazip.com/',
+      method: 'POST',
+      success(rrr){
+        console.info(rrr);
+        var query = (rrr == null?'':rrr==null?'':rrr);
+        var query = (rrr == null?'':rrr==null?'':rrr);
+        let queryip = query.data==null? '':query.data.replace("\n","");
+        that.setData({
+          queryip
+        })
+      },
+      fail(rrr){
+        that.setData({
+          queryip: ''
+        })
+      }
+    })
+
+
   },
 
   /**

+ 1 - 1
pages/login/username_login/username_login.wxml

@@ -15,7 +15,7 @@
       </view>
     </view>
     <!-- <view class="errorMsg"><text>{{errorMsg}}</text></view> -->
-    <button class='{{checkPass?"login_button":"login_button_disable"}}' bindtap="{{checkPass?'loginUser':''}}" >登录</button>
+    <button class='login_button' bindtap="loginUser" >登录</button>
     <view class="other_button">
       <text class='vcode_login'  bindtap='goToVcodeLogin'>验证码登录</text>
       <text class='register_view'  bindtap='goToRegister'>注册账户</text>

+ 3 - 2
pages/login/username_login/username_login.wxss

@@ -144,12 +144,13 @@
 }
 
 .vcode_login {
-  display: inline-block;
+  position: absolute;
+  right: 500rpx;
   height: 48rpx;
   color: #999999;
   font-size: 24rpx;
   line-height: 48rpx;
-  text-align: left;
+  text-align: center;
   font-family: 'Lucida Sans',
                  'Lucida Sans Regular',
                  'Lucida Grande',

+ 75 - 26
pages/register/register.js

@@ -20,10 +20,12 @@ Page({
     vcodeTimeOut: 0,
     vcodeTimeOutDefault: 0,
     scene: "REGIST",
-    vcodeLen:2,
+    vcodeLen:6,
     vcodeInterval:null,
     vcode_button_text:'获取验证码',
-    servicetel: '4009608068'
+    servicetel: '4009608068',
+    showMsg: false,
+    timeing: true
   },
 
   /**
@@ -80,10 +82,19 @@ Page({
   getUserProfile(e) {
     // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
     // 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
+    this.checkAll();
+    this.setData({
+      showMsg:true
+    })
+    if(!this.data.checkPass){
+      return;
+    }
     let that=this
     wx.getUserProfile({
       desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
       success: (res) => {
+
+
         that.setData({
           userInfo: res.userInfo,
           hasUserInfo: true
@@ -113,14 +124,14 @@ Page({
       } = this.data;
       wx.login({
         success(res) {
-          //console.log(res);
+          console.log(res);
           if (res.code) {
             wx.request({
               url: getApp().globalData.postHeadAgreement + '/restapi/wechat/register',
               data: {
                 userName,
-                sex,
-                avatar,
+                sex:"0",
+                avatar:'http://jqcs.pjnes.com/web/profile/avatar/c134f314cbbe985a8aae1787b45e6d6a.jpg',
                 loginName,
                 password,
                 phonenumber: phone,
@@ -134,7 +145,13 @@ Page({
               success(res1) {
                 //console.log(res1);
                 //console.log(res1.data.code == 1);
-                if (res1.data.code == 1) {
+                if (res1.data.code == 1 || res1.data.code == 2) {
+
+                  if(res1.data.msg!=null && res1.data.msg.startsWith("503")){
+                    getApp().showNetworkError();
+                    return;
+                  }
+
                   // that.setData({
                   //   errorMsg: res1.data.msg
                   // })
@@ -173,26 +190,33 @@ Page({
   },
   inputPassword(e) {
     this.setData({
-      password: e.detail.value
+      password: e.detail.value,
+      showMsg: false
     });
     this.checkAll();
   },
   inputRepassword(e) {
     this.setData({
-      rePassword: e.detail.value
+      rePassword: e.detail.value,
+      showMsg: false
     });
     this.checkAll();
   },
   inputPhone(e) {
     this.setData({
-      phone: e.detail.value
+      phone: e.detail.value,
+      showMsg: false
     });
     this.checkAll();
   },
   inputVcode(e) {
     this.setData({
-      vcode: e.detail.value
+      vcode: e.detail.value,
+      showMsg: false
     });
+    if(!this.msgVcode()){
+      return;
+    }
     this.checkAll();
   },
   inputEmail(e) {
@@ -289,9 +313,15 @@ Page({
       },
       method: 'POST',
       success(res) {
+
+
         //console.log(res1);
         //console.log(res1.data.code == 1);
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
             that.setData({
               vcodeTimeOut:0,
               vcodeFlag:true,
@@ -328,7 +358,11 @@ Page({
       
           });
         }else{
-
+          wx.showToast({
+            title: '验证码已发送',
+            icon: 'success',
+            duration: 1000 //持续的时间
+          })
         }
       }
     });
@@ -340,18 +374,40 @@ Page({
       if(this.data.vcodeTimeOut<=0){
         this.setData({
           vcodeFlag:true,
-          vcode_button_text:'获取验证码'
+          vcode_button_text:'获取验证码',
+          timeing:true
         })
         clearInterval(this.data.vcodeInterval)
       }else{
         this.setData({
           vcodeTimeOut:this.data.vcodeTimeOut-1,
           vcodeFlag:false,
-          vcode_button_text:'获取验证码(' + this.data.vcodeTimeOut+'s)'
+          vcode_button_text:'获取验证码(' + this.data.vcodeTimeOut+'s)',
+          timeing:false
         })
       }
 
   },
+
+  msgVcode(){
+    if (!this.checkVcode()) {
+      this.setData({
+        // errorMsg: '验证码格式不正确'
+        errorMsg: '验证码格式不正确'
+      });
+      this.setData({
+        checkCode: false
+      });
+      return false;
+    } else {
+      this.setData({
+        errorMsg: ''
+      });
+    }
+    return true;
+  },
+
+
   checkAll() {
     // if (!this.data.userName || !this.data.userName.replace(/(^\s*)|(\s*$)/g,"")) {
     //   this.setData({
@@ -387,28 +443,21 @@ Page({
         errorMsg: '手机号输入有误,请重新输入'
       });
       this.setData({
-        checkPass: false
+        checkPass: false,
+        vcodeFlag: false
       });
 
       return;
     } else {
       this.setData({
-        errorMsg: ''
+        errorMsg: '',
+        vcodeFlag: true
       });
 
     }
-    if (!this.checkVcode()) {
-      this.setData({
-        errorMsg: '验证码格式不正确'
-      });
-      this.setData({
-        checkPass: false
-      });
+
+    if(!this.msgVcode()){
       return;
-    } else {
-      this.setData({
-        errorMsg: ''
-      });
     }
     // if (!this.checkMail()) {
     //   this.setData({

+ 5 - 4
pages/register/register.wxml

@@ -17,8 +17,8 @@
 
       <view class='input_view'>
         <image class='phone_img' src='/images/vcode.png'></image><div class="line"></div>
-        <input placeholder='请输入验证码' maxlength='6' bindinput='inputVcode' type='number' placeholder-class='placeholder'></input>
-        <view class='{{vcodeFlag?"vcode_button":"vcode_button_disable"}}' bindtap="{{vcodeFlag?'sendVcode':''}}">{{vcode_button_text}}</view>
+        <input class="vcode_input" placeholder='请输入验证码' maxlength='6' bindinput='inputVcode' type='number' placeholder-class='placeholder'></input>
+        <view class='{{vcodeFlag&&timeing?"vcode_button":"vcode_button_disable"}}' bindtap="{{vcodeFlag&&timeing?'sendVcode':''}}">{{vcode_button_text}}</view>
       </view>  
 
       <!-- <view class='input_view'>
@@ -44,8 +44,9 @@
         <input placeholder='请确认密码' maxlength='16' bindinput='inputRepassword' type='password' placeholder-class='placeholder'></input>
       </view>
     </view>
-    <view class="errorMsg"><text>{{errorMsg}}</text></view>
-    <button class='{{checkPass?"login_button":"login_button_disable"}}' bindtap="{{checkPass?'getUserProfile':''}}">
+    <view class="errorMsg"><text wx:if="{{showMsg}}">{{errorMsg}}</text></view>
+    <!--<button class='{{checkPass?"login_button":"login_button_disable"}}' bindtap="{{checkPass?'getUserProfile':''}}">-->
+      <button class='login_button' bindtap="getUserProfile">
       注册
     </button>
     

+ 4 - 0
pages/register/register.wxss

@@ -208,4 +208,8 @@
   margin: 100rpx 0rpx;
   color: #c9c9c9;
   font-size: 28rpx;
+}
+
+.context_input input.vcode_input{
+  width:  calc(100% - 322rpx);
 }

+ 26 - 8
pages/reset_password/reset_password.js

@@ -6,13 +6,22 @@ Page({
    */
   data: {
     phone: null,
-    password: null,
-    rePassword: null,
+    password: '',
+    rePassword: '',
     checkPass: false,
-    errorMsg: ''
+    errorMsg: '',
+    showMsg: false,
   },
   resetPassword(e) {
     let that = this;
+    this.checkAll();
+    this.setData({
+      showMsg:true
+    })
+    if(!this.data.checkPass){
+      return;
+    }
+
     let{
       phone : phonenumber,
       password
@@ -26,6 +35,10 @@ Page({
       method: 'POST',
       success(res) {
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
           wx.showModal({
             title: '提示',
             content: res.data.msg,
@@ -40,13 +53,15 @@ Page({
   },
   inputPassword(e) {
     this.setData({
-      password: e.detail.value
+      password: e.detail.value,
+      showMsg: false,
     });
     this.checkAll();
   },
   inputRepassword(e) {
     this.setData({
-      rePassword: e.detail.value
+      rePassword: e.detail.value,
+      showMsg: false,
     });
     this.checkAll();
   },
@@ -57,9 +72,11 @@ Page({
     return true;
   },
   checkAll() {
-    if (this.data.password && (this.data.password.length < 5 || this.data.password.length > 20)) {
+
+    if ( (this.data.password.length < 5 || this.data.password.length > 20)) {
       this.setData({
-        errorMsg: '密码长度应为5-20'
+        errorMsg: '密码长度应为5-20',
+        showMsg: false,
       });
       this.setData({
         checkPass: false
@@ -68,7 +85,8 @@ Page({
     }
     if (!this.checkPassword()) {
       this.setData({
-        errorMsg: '两次密码输入不一致,请重新输入'
+        errorMsg: '两次密码输入不一致,请重新输入',
+        showMsg: false,
       });
       this.setData({
         checkPass: false

+ 2 - 2
pages/reset_password/reset_password.wxml

@@ -15,13 +15,13 @@
         <input placeholder='确认新密码' maxlength='16' bindinput='inputRepassword' type='password' placeholder-class='placeholder'></input>
       </view>
     </view>
-    <view class="errorMsg"><text>{{errorMsg}}</text></view>
+    <view class="errorMsg"><text wx:if="{{showMsg}}">{{errorMsg}}</text></view>
 
 <!-- <view style="width: 100%;margin-top:50rpx">
   <ad unit-id="adunit-8eb13875bcf592b0" ad-intervals="30"></ad>
 </view> -->
     
-    <button class='{{checkPass?"login_button":"login_button_disable"}}' bindtap="{{checkPass?'resetPassword':''}}">
+    <button class='login_button' bindtap="resetPassword">
       确认
     </button>
 

+ 5 - 5
pages/scan_result/scan_result.js

@@ -23,11 +23,11 @@ Page({
         //console.log(res);
         //console.log(res.data);
         var chargPile = res.data;
-        chargPile.sharpTotalPrice = (chargPile.sharpChargPrice + chargPile.sharpServicePrice).toFixed(4);
-        chargPile.peakTotalPrice = (chargPile.peakChargPrice + chargPile.peakServicePrice).toFixed(4);
-        chargPile.flatTotalPrice = (chargPile.flatChargPrice + chargPile.flatServicePrice).toFixed(4);
-        chargPile.valleyTotalPrice = (chargPile.valleyChargPrice + chargPile.valleyServicePrice).toFixed(4);
-        chargPile.totalprice = (chargPile.chargprice + chargPile.serviceprice).toFixed(4);
+        chargPile.sharpTotalPrice = (chargPile.sharpChargPrice + chargPile.sharpServicePrice).toFixed(6);
+        chargPile.peakTotalPrice = (chargPile.peakChargPrice + chargPile.peakServicePrice).toFixed(6);
+        chargPile.flatTotalPrice = (chargPile.flatChargPrice + chargPile.flatServicePrice).toFixed(6);
+        chargPile.valleyTotalPrice = (chargPile.valleyChargPrice + chargPile.valleyServicePrice).toFixed(6);
+        chargPile.totalprice = (chargPile.chargprice + chargPile.serviceprice).toFixed(6);
         that.setData({
           chargPile
         });

+ 21 - 3
pages/search_result/search_result.js

@@ -283,7 +283,15 @@ Page({
                   serviceprice: item.serviceprice,
                   /** 停车费 */
                   stopprice: item.stopprice,
-                  operationState: item.operationState
+                  operationState: item.operationState,
+                  sharpChargPrice : item.sharpChargPrice,
+                  sharpServicePrice : item.sharpServicePrice,
+                  peakChargPrice : item.peakChargPrice,
+                  peakServicePrice : item.peakServicePrice,
+                  flatChargPrice : item.flatChargPrice,
+                  flatServicePrice : item.flatServicePrice,
+                  valleyChargPrice : item.valleyChargPrice,
+                  valleyServicePrice : item.valleyServicePrice
                 };
                 if (myChargeStationsIds.indexOf(item.id + ',') != -1) {
                   marker.userFlag = true;
@@ -340,7 +348,15 @@ Page({
               serviceprice: item.serviceprice,
               /** 停车费 */
               stopprice: item.stopprice,
-              operationState: item.operationState
+              operationState: item.operationState,
+              sharpChargPrice : item.sharpChargPrice,
+              sharpServicePrice : item.sharpServicePrice,
+              peakChargPrice : item.peakChargPrice,
+              peakServicePrice : item.peakServicePrice,
+              flatChargPrice : item.flatChargPrice,
+              flatServicePrice : item.flatServicePrice,
+              valleyChargPrice : item.valleyChargPrice,
+              valleyServicePrice : item.valleyServicePrice
             };
             markers[index] = marker;
           });
@@ -388,6 +404,7 @@ Page({
     let markerId = e.currentTarget.id;
     let pages = getCurrentPages();
     let prevPage = pages[0]; //首页
+    let markers =  this.data.markers; //首页
     this.data.markers.forEach((item, index) => {
       if (markerId && markerId == item.id) {
         let {
@@ -395,10 +412,11 @@ Page({
           longitude
         } = item;
         prevPage.setData({
+          markers,
           markerId,
           latitude,
           longitude,
-          keywords:this.data.keywords,
+          keywords: this.data.keywords,
           textData: item
         });
 

+ 75 - 21
pages/ucenter/accountsecurity/checkphonesecuirty/checkphonesecruity.js

@@ -5,7 +5,7 @@ Page({
    * 页面的初始数据
    */
   data: {
-    vcode: null,
+    vcode: '',
     scene: '',
     userInfo: {},
     hidePhone: null,
@@ -13,11 +13,13 @@ Page({
     vcodeFlag: true,
     vcodeTimeOut: 0,
     vcodeTimeOutDefault: 0,
-    vcodeLen:2,
+    vcodeLen:6,
     vcodeInterval:null,
     vcode_button_text:'获取验证码',
     reviserPasswordScene: 'MDF_PWD',
-    unbindPhoneScene: 'UN_PHONE'
+    unbindPhoneScene: 'UN_PHONE',
+    showMsg: false,
+    timeing: true
   },
 
   onError(e) {
@@ -31,39 +33,53 @@ Page({
   
   inputVerificatrCode(e) {
     this.setData({
-      vcode: e.detail.value
+      vcode: e.detail.value,
+      showMsg: false,
     });
+    if(!this.msgVcode()){
+      return;
+    }
     this.checkAll();
   },
-
-  checkAll() {
+  msgVcode(){
     if (!this.checkVcode()) {
       this.setData({
+        // errorMsg: '验证码格式不正确'
         errorMsg: '验证码格式不正确'
       });
       this.setData({
         checkCode: false
       });
-      return;
+      return false;
     } else {
       this.setData({
         errorMsg: ''
       });
     }
+    return true;
+  },
+
+  checkAll() {
+    if(!this.msgVcode()){
+      return;
+    }
 
     if (this.data.vcode) {
       this.setData({
-        checkCode: true
+        checkCode: true,
+        // vcodeFlag: false
       });
     } else {
       this.setData({
-        checkCode: false
+        checkCode: false,
+        // vcodeFlag: true
       });
     }
   },
 
   checkVcode() {
-    if (this.data.vcode==undefined || this.data.vcode=="") {
+
+    if (this.data.vcode==undefined || this.data.vcode==""  || this.data.vcode==null) {
       return false;
     }
     if(this.data.vcode.length==this.data.vcodeLen){
@@ -103,7 +119,8 @@ Page({
             if (that.data.vcodeTimeOut <= 0) {
               that.setData({
                 vcodeFlag: true,
-                vcode_button_text: '获取验证码'
+                vcode_button_text: '获取验证码',
+                timeing:true
               })
               clearInterval(vcodeInterval);
             }else{
@@ -111,17 +128,40 @@ Page({
               that.setData({
                 vcodeTimeOut:that.data.vcodeTimeOut-1,
                 vcodeFlag: false,
-                vcode_button_text: str
+                vcode_button_text: str,
+                timeing:false
               })
             }
           }, 1000);
         }else{
-          wx.showModal({
-            title: '提示',
-            content: res.data.msg,
-            showCancel:false,
-            confirmColor:'#00AADD',
-          });
+            if (res.data.code == 1) {
+              if(res.data.msg!=null && res.data.msg.startsWith("503")){
+                getApp().showNetworkError();
+                return;
+              }
+              wx.showModal({
+                title: '提示',
+                content: '您未绑定手机号,请重新登录后自动刷新绑定信息',
+                showCancel:false,
+                confirmText: '去登录',
+                confirmColor:'#00AADD',
+                success: function (res1) {
+                  if (res1.confirm) {
+                    let url = '/pages/login/phone_login/phone_login';
+                    wx.redirectTo({
+                      url
+                    })
+                  }
+                }
+              });
+          }else{
+            wx.showModal({
+              title: '提示',
+              content:res.data.msg,
+              showCancel:false,
+              confirmColor:'#00AADD',
+            });
+          }
         }
       }
     });
@@ -130,6 +170,15 @@ Page({
 
   nextConfirm(e){
     let that = this;
+
+    this.checkAll();
+    this.setData({
+      showMsg:true
+    })
+    if(!this.data.checkCode){
+      return;
+    }
+
     wx.request({
       url: getApp().globalData.postHeadAgreement +'/restapi/wechat/checkPhoneSecruity',
       data: {
@@ -140,9 +189,14 @@ Page({
       method: 'POST',
       success(res) {
         if (res.data.code == 1) {
-           that.setData({
-             vcode: null,
-           });
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
+          //  that.setData({
+          //    vcode: null,
+          //  });
+          // that.checkAll();
           wx.showModal({
             title: '提示',
             content:res.data.msg,

+ 4 - 4
pages/ucenter/accountsecurity/checkphonesecuirty/checkphonesecruity.wxml

@@ -12,13 +12,13 @@
 
       <view class='input_view'>
         <image class='phone_img' src='/images/vcode.png'></image><div class="line"></div>
-        <input placeholder='请输入验证码' bindinput='inputVerificatrCode' type='number' placeholder-class='placeholder' value='{{vcode}}'></input>
-        <view bindtap='{{vcodeFlag?"getVerificateCode":""}}' class='varification_button {{vcodeFlag?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
+        <input class="vcode_input"  placeholder='请输入验证码' maxlength='6' bindinput='inputVerificatrCode' type='number' placeholder-class='placeholder' value='{{vcode}}'></input>
+        <view bindtap='{{vcodeFlag&&timeing?"getVerificateCode":""}}' class='varification_button {{vcodeFlag&&timeing?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
       </view>  
     </view>
-    <view class="errorMsg"><text>{{errorMsg}}</text></view>
+    <view class="errorMsg"><text wx:if="{{showMsg}}">{{errorMsg}}</text></view>
     
-    <button class='{{checkCode?"confirm_button":"confirm_button_disable"}}' bindtap="{{checkCode?'nextConfirm':''}}">
+    <button class='confirm_button' bindtap="nextConfirm">
       下一步
     </button>
   </view>

+ 6 - 1
pages/ucenter/accountsecurity/checkphonesecuirty/checkphonesecruity.wxss

@@ -178,4 +178,9 @@
  }
  .getCode_disable {
   background-color: #c9c9c9;
- }
+ }
+
+ 
+.context_input input.vcode_input{
+  width:  calc(100% - 322rpx);
+}

+ 24 - 8
pages/ucenter/accountsecurity/mdfpassword/mdfpassword.js

@@ -6,14 +6,22 @@ Page({
    */
   data: {
     phone: null,
-    password: null,
-    rePassword: null,
+    password: '',
+    rePassword: '',
     checkPass: false,
-    errorMsg: ''
+    errorMsg: '',
+    showMsg: false
   },
 
   resetPassword(e) {
     let that = this;
+    this.checkAll();
+    this.setData({
+      showMsg:true
+    })
+    if(!this.data.checkPass){
+      return;
+    }
     let{
       phone : phonenumber,
       password
@@ -27,6 +35,10 @@ Page({
       method: 'POST',
       success(res) {
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
           wx.showModal({
             title: '提示',
             content: res.data.msg,
@@ -62,13 +74,15 @@ Page({
   },
   inputPassword(e) {
     this.setData({
-      password: e.detail.value
+      password: e.detail.value,
+      showMsg: false
     });
     this.checkAll();
   },
   inputRepassword(e) {
     this.setData({
-      rePassword: e.detail.value
+      rePassword: e.detail.value,
+      showMsg: false
     });
     this.checkAll();
   },
@@ -79,9 +93,10 @@ Page({
     return true;
   },
   checkAll() {
-    if (this.data.password && (this.data.password.length < 5 || this.data.password.length > 20)) {
+    if ((this.data.password.length < 5 || this.data.password.length > 20)) {
       this.setData({
-        errorMsg: '密码长度应为5-20'
+        errorMsg: '密码长度应为5-20',
+        showMsg: false
       });
       this.setData({
         checkPass: false
@@ -90,7 +105,8 @@ Page({
     }
     if (!this.checkPassword()) {
       this.setData({
-        errorMsg: '两次密码输入不一致,请重新输入'
+        errorMsg: '两次密码输入不一致,请重新输入',
+        showMsg: false
       });
       this.setData({
         checkPass: false

+ 2 - 2
pages/ucenter/accountsecurity/mdfpassword/mdfpassword.wxml

@@ -12,9 +12,9 @@
         <input placeholder='确认新密码' maxlength='16' bindinput='inputRepassword' type='password' placeholder-class='placeholder'></input>
       </view>
     </view>
-    <view class="errorMsg"><text>{{errorMsg}}</text></view>
+    <view class="errorMsg"><text wx:if="{{showMsg}}">{{errorMsg}}</text></view>
     
-    <button class='{{checkPass?"login_button":"login_button_disable"}}' bindtap="{{checkPass?'resetPassword':''}}">
+    <button class='login_button' bindtap="resetPassword">
       确认
     </button>
 

+ 54 - 20
pages/ucenter/accountsecurity/unbindphone/unbindphone.js

@@ -10,14 +10,16 @@ Page({
       isLogin: false,
       phone: null,
       errorMsg: '',
-      vcodeFlag: true,
+      vcodeFlag: false,
       vcodeTimeOut: 0,
       vcodeTimeOutDefault: 0,
       scene: "UN_PHONE",
-      vcodeLen:2,
+      vcodeLen:6,
       vcodeInterval:null,
       vcode_button_text:'获取验证码',
-      servicetel: '4009608068'
+      servicetel: '4009608068',
+      showMsg: false,
+      timeing: true
   },
 
   onError(e) {
@@ -31,47 +33,62 @@ Page({
 
   inputPhone(e) {
     this.setData({
-      phone: e.detail.value
+      phone: e.detail.value,
+      showMsg: false,
     });
     this.checkAll();
   },
 
   inputVerificatrCode(e) {
     this.setData({
-      vcode: e.detail.value
+      vcode: e.detail.value,
+      showMsg: false,
     });
+    if(!this.msgVcode()){
+      return;
+    }
     this.checkAll();
   },
-
-  checkAll() {
-    if (!this.checkPhoneNumber()) {
+  msgVcode(){
+    if (!this.checkVcode()) {
+      this.setData({
+        // errorMsg: '验证码格式不正确'
+        errorMsg: '验证码格式不正确'
+      });
       this.setData({
-        errorMsg: '手机号输入有误,请重新输入',
-        checkPhone: false,
         checkCode: false
       });
-      return;
+      return false;
     } else {
       this.setData({
-        checkPhone: true,
         errorMsg: ''
       });
     }
+    return true;
+  },
 
-    if (!this.checkVcode()) {
-      this.setData({
-        errorMsg: '验证码格式不正确'
-      });
+
+  checkAll() {
+    if (!this.checkPhoneNumber()) {
       this.setData({
-        checkCode: false
+        errorMsg: '手机号输入有误,请重新输入',
+        checkPhone: false,
+        checkCode: false,
+        vcodeFlag: false
       });
       return;
     } else {
       this.setData({
-        errorMsg: ''
+        checkPhone: true,
+        errorMsg: '',
+        vcodeFlag: true
       });
     }
 
+    if(!this.msgVcode()){
+      return;
+    }
+
     if (this.data.phone && this.data.vcode) {
       this.setData({
         checkCode: true
@@ -136,6 +153,10 @@ Page({
       method: 'POST',
       success(res) {
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
           wx.showModal({
             title: '提示',
             content:res.data.msg,
@@ -160,7 +181,8 @@ Page({
             if (that.data.vcodeTimeOut <= 0) {
               that.setData({
                 vcodeFlag: true,
-                vcode_button_text: '获取验证码'
+                vcode_button_text: '获取验证码',
+                timeing:true
               })
               clearInterval(vcodeInterval);
             }else{
@@ -168,7 +190,8 @@ Page({
               that.setData({
                 vcodeTimeOut:that.data.vcodeTimeOut-1,
                 vcodeFlag: false,
-                vcode_button_text: str
+                vcode_button_text: str,
+                timeing:false
               })
             }
           }, 1000);
@@ -180,6 +203,13 @@ Page({
 
   bindPhone(e) {
     let that = this;
+    this.checkAll();
+    this.setData({
+      showMsg:true
+    })
+    if(!this.data.checkCode){
+      return;
+    }
     let loginName = this.data.userInfo.loginName;
     let { phone, vcode } = this.data;
     log.info('[绑定手机]', '[绑定手机]', '[请求]', { phone, vcode });
@@ -193,6 +223,10 @@ Page({
       method: 'POST',
       success(res) {
         if (res.data.code == 1) {
+          if(res.data.msg!=null && res.data.msg.startsWith("503")){
+            getApp().showNetworkError();
+            return;
+          }
           that.setData({
             vcode: null,
           });

+ 4 - 4
pages/ucenter/accountsecurity/unbindphone/unbindphone.wxml

@@ -10,13 +10,13 @@
 
       <view class='input_view'>
         <image class='phone_img' src='/images/vcode.png'></image><div class="line"></div>
-        <input placeholder='请输入验证码' bindinput='inputVerificatrCode' type='number' placeholder-class='placeholder'></input>
-        <view bindtap='{{vcodeFlag?"getVerificateCode":""}}' class='varification_button {{vcodeFlag?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
+        <input class="vcode_input"  placeholder='请输入验证码' maxlength='6' bindinput='inputVerificatrCode' type='number' placeholder-class='placeholder'></input>
+        <view bindtap='{{vcodeFlag&&timeing?"getVerificateCode":""}}' class='varification_button {{vcodeFlag&&timeing?"getCode":"getCode_disable"}}'>{{vcode_button_text}}</view>
       </view>  
     </view>
-     <view class="errorMsg"><text>{{errorMsg}}</text></view>
+    <view class="errorMsg"><text wx:if="{{showMsg}}">{{errorMsg}}</text></view>
     
-    <button class='{{checkCode?"confirm_button":"confirm_button_disable"}}' bindtap="{{checkCode?'bindPhone':''}}">
+    <button class='confirm_button' bindtap="bindPhone">
       确认
     </button>
 

+ 6 - 1
pages/ucenter/accountsecurity/unbindphone/unbindphone.wxss

@@ -171,4 +171,9 @@
  }
  .getCode_disable {
   background-color: #c9c9c9;
- }
+ }
+
+ 
+.context_input input.vcode_input{
+  width:  calc(100% - 322rpx);
+}

+ 9 - 6
pages/ucenter/center/center.js

@@ -8,17 +8,18 @@ Page({
     userInfo: {},
     isLogin: false,
     isBindPhone:0,
-    sexType: [{
+    sexType: [
+      {
+        value: 0,
+        text: '保密'
+      },{
       value: 1,
       text: '男'
     }, {
       value: 2,
       text: '女'
-    }, {
-      value: 3,
-      text: '保密'
     }],
-    sexIndex: null,
+    sexIndex: 0,
     carNum: null,
     email: null,
     checkPass: false,
@@ -27,7 +28,7 @@ Page({
 
   inputSex(e) {
     this.setData({
-      sexIndex: parseInt(e.detail.value)+1
+      sexIndex: parseInt(e.detail.value)
     });
     let userdata= {
       sexIndex: e.detail.value,
@@ -184,6 +185,8 @@ Page({
           wx.setStorageSync("userInfo", res1.data);
           wx.setStorageSync("isLogin", true);
           let userInfo = wx.getStorageSync('userInfo');
+          console.info("fffffffffffff")
+          console.info(userInfo)
           that.setData({
             userInfo: userInfo
           });

+ 12 - 5
pages/ucenter/center/center.wxml

@@ -8,7 +8,7 @@
     <view class="userAvatarUrl" bindtap="">
       <image src='{{isLogin&&!userInfo.flag?userInfo.avatar:"/images/userhead.png"}}'></image>
     </view>
-    <text class='bold'>{{userInfo.userName}}</text>
+    <text class='bold'>{{userInfo.phonenumber}}</text>
   </view>
 </view>
 
@@ -18,12 +18,19 @@
       <view class='input_view'>
         <view class="input_text_view">
           <!-- <image class='account_img' src='/images/account.png'></image> -->
-          <text class="input_text">用户名</text>
+          <text class="input_text">账号</text>
         </view>
         <input disabled='true' value='{{userInfo.loginName}}'></input>
       </view>
       <view class='input_view'>
         <view class="input_text_view">
+          <!-- <image class='account_img' src='/images/account.png'></image> -->
+          <text class="input_text">绑定手机号</text>
+        </view>
+        <input disabled='true' value='{{userInfo.bindingPhone==1?userInfo.phonenumber:"未绑定"}}'></input>
+      </view>
+      <view class='input_view' style="display: flex;flex-direction: row;">
+        <view class="input_text_view">
           <!-- <image class='man_img' src='/images/man.png'></image> -->
           <text class="input_text">性别</text>
         </view>
@@ -31,10 +38,10 @@
         <input wx:if='{{userInfo.sex==2}}' disabled='true' type='text' placeholder-class='placeholder' value='女'></input>
         <input wx:if='{{userInfo.sex==3}}' disabled='true' type='text' placeholder-class='placeholder' value='保密'></input> -->
         <picker class="picker" bindchange="inputSex" range-key="text" range="{{sexType}}">
-          <text wx:if='{{ sexIndex==null}}'>请选择性别</text>
-          <text wx:if='{{ sexIndex!=null}}'>{{sexType[sexIndex-1].text}}</text>
+          <view wx:if='{{ sexIndex==null }}'>去填写</view>
+          <view wx:if='{{ sexIndex!=null}}'>{{sexType[sexIndex].text}}</view>
         </picker>
-        <view class="zan-ft">
+        <view class="zan-ft" style="position:relative ;display: inline ;">
           <image src='/images/enter.png'></image>
         </view>
       </view>

+ 26 - 9
pages/ucenter/center/center.wxss

@@ -62,10 +62,22 @@ text {
 text.bold {
   width: calc(100% - 172rpx);
   font-weight:600;
-  font-size: 32rpx;
-  line-height: 120rpx;
-  height: 120rpx;
-  min-height: 120rpx;
+  font-size: 28rpx;
+  line-height: 80rpx;
+  height: 80rpx;
+  min-height: 80rpx;
+  color:#000000;
+  margin-top: 20rpx;
+  /* margin: 0rpx 0rpx 0rpx 30rpx; */
+}
+
+text.thin {
+  width: calc(100% - 172rpx);
+  font-size: 22rpx;
+  line-height: 40rpx;
+  height: 40rpx;
+  min-height: 40rpx;
+  color:#8f8e94;
   /* margin: 0rpx 0rpx 0rpx 30rpx; */
 }
 
@@ -125,7 +137,7 @@ text.bold {
 }
 
 .context_input input {
-  width: calc(100% - 180rpx);
+  width: calc(100% - 190rpx);
   text-align: right;
   display: inline-block;
   font-size: 24rpx;
@@ -142,7 +154,7 @@ text.bold {
                  sans-serif;
 }
 .context_input picker {
-  width: calc(100% - 180rpx);
+  width: calc(100% - 190rpx);
   text-align: right;
   display: inline-block;
   font-size: 24rpx;
@@ -158,10 +170,13 @@ text.bold {
                  Verdana,
                  sans-serif;
 }
-.context_input picker text {
+
+
+
+.context_input picker view {
   font-size: 24rpx;
   height: 90rppx;
-  line-height: 90rpx;
+  line-height: 85rpx;
   min-height: 90rpx;
   color: #999999;
   font-family: 'Lucida Sans',
@@ -172,7 +187,9 @@ text.bold {
                  Verdana,
                  sans-serif;
 }
+.input_view  .zan-ft {
 
+}
 .context_input .placeholder {
   font-size: 24rpx;
   height: 90rppx;
@@ -252,7 +269,7 @@ text.bold {
 }
 
 .zan-ft{
-  margin-left: 10rpx;
+  margin-left: 20rpx;
   width: 14rpx;
   height: 90rppx;
   line-height: 90rpx;

+ 6 - 2
pages/ucenter/chargemoneylog/chargemoneylog.js

@@ -13,7 +13,8 @@ Page({
     total:-1,
     loadTotal: 0,
     dataLoading: false,
-    finishedLoadTap: 0
+    finishedLoadTap: 0,
+    finishedLoadShowTimes: 0,
   },
 
   /**
@@ -39,7 +40,10 @@ Page({
       this.setData({
         finishedLoadTap:this.data.finishedLoadTap+1
       })
-      if(this.data.finishedLoadTap>0){
+      if(this.data.finishedLoadTap>0 && this.data.finishedLoadShowTimes==0){
+        this.setData({
+          finishedLoadShowTimes:this.data.finishedLoadShowTimes+1
+        })
         wx.showToast({
           title: '全部加载完毕',
           icon: 'success',

+ 6 - 2
pages/ucenter/charginglog/charginglog.js

@@ -12,7 +12,8 @@ Page({
     total:-1,
     loadTotal: 0,
     dataLoading: false,
-    finishedLoadTap: 0
+    finishedLoadTap: 0,
+    finishedLoadShowTimes: 0,
   },
 
   /**
@@ -34,7 +35,10 @@ Page({
       this.setData({
         finishedLoadTap:this.data.finishedLoadTap+1
       })
-      if(this.data.finishedLoadTap>0){
+      if(this.data.finishedLoadTap>0 && this.data.finishedLoadShowTimes==0){
+        this.setData({
+          finishedLoadShowTimes:this.data.finishedLoadShowTimes+1
+        })
         wx.showToast({
           title: '全部加载完毕',
           icon: 'success',

+ 9 - 2
pages/ucenter/index/index.wxml

@@ -6,8 +6,15 @@
       <image src='{{isLogin&&!userInfo.flag?userInfo.avatar:"/images/userhead.png"}}'></image>
     </view>
 
-    <text class='bold'>{{isLogin?userInfo.userName:'点击登录'}}</text>
-    <text class="h1">{{isLogin?userInfo.loginName:'工作人员登录后进行操作'}}</text>
+    <text class="bold" wx:if="{{userInfo.bindingPhone==1}}">{{isLogin?userInfo.phonenumber:'手机号未绑定'}}</text>
+    <text class='bold' wx:if="{{userInfo.bindingPhone==0}}">{{isLogin?userInfo.userName:'点击登录'}}</text>
+    <text class="h1" wx:if="{{userInfo.bindingPhone==0}}">{{isLogin?userInfo.loginName:'工作人员登录后进行操作'}}</text>
+    <text class='bold' wx:if="{{!isLogin}}">点击登录</text>
+    <text class="h1" wx:if="{{!isLogin}}">工作人员登录后进行操作</text>
+
+    <view wx:if="{{isLogin}}" class="user_text_edit">
+      编辑个人信息
+    </view>
     <view class="user_text_zan-ft">
       <image src='/images/enter.png'></image>
     </view>

+ 15 - 6
pages/ucenter/index/index.wxss

@@ -61,12 +61,11 @@ text {
 text.bold {
   width: calc(100% - 216rpx);
   font-weight:600;
-  font-size: 32rpx;
-  line-height: 32rpx;
-  height: 32rpx;
-  min-height: 32rpx;
+  font-size: 28rpx;
+  line-height: 28rpx;
+  height: 28rpx;
+  min-height: 28rpx;
   margin: 20rpx 0 20rpx 30rpx;
-  
 }
 
 .h1 {
@@ -78,7 +77,17 @@ text.bold {
   min-height: 24rpx;
   color: #959595;
 }
-
+.user_text_edit{
+  margin: 0;
+  width: 220rpx;
+  height: 30rpx;
+  display: inline-block;
+  right: -20rpx;
+  top: 88rpx;
+  font-size: 24rpx;
+  color:#8F8E94;
+  position: absolute;
+}
 .user_text_zan-ft{
   margin: 0;
   width: 14rpx;

+ 5 - 5
pages/ucenter/myworksheet/myworksheet.wxml

@@ -8,8 +8,8 @@
           <image src='/images/myworksheet.png'></image>
         </view>
         <view class='worksheet_text_title1'>
-          <text class='bold inline'>{{item.chargStationName}}</text>
-          <text class="h1 inline">{{item.mainLocation==null?'':item.mainLocation}}</text>
+          <view class='bold inline'>{{item.chargStationName}}</view>
+          <view class="h1 inline">{{item.mainLocation==null?'':item.mainLocation}}</view>
         </view>
       </view>
       <text wx:if="{{item.workStatus==null}}">工作状态:未知</text>
@@ -20,9 +20,9 @@
       <text wx:if="{{item.workStatus==5}}">工作状态:进行中</text>
       <text wx:if="{{item.workStatus==6}}">工作状态:已完成</text>
       <text wx:if="{{item.workStatus==7}}">工作状态:完成确认</text>
-      <text wx:if="{{item.workBigclass==null}}">工单类:未知</text>
-      <text wx:if="{{item.workBigclass==1}}">工单类:售后服务</text>
-      <text wx:if="{{item.workBigclass==2}}">工单类:工程实施</text>
+      <text wx:if="{{item.workBigclass==null}}">工单类:未知</text>
+      <text wx:if="{{item.workBigclass==1}}">工单类:售后服务</text>
+      <text wx:if="{{item.workBigclass==2}}">工单类:工程实施</text>
       <text>预计完成时间:{{item.exceptTime}}</text>
       <text>工单创建时间:{{item.workCreatetime}}</text>
       <view id="{{item.id}}" class='detail' bindtap="getRoute">详情

+ 9 - 6
pages/ucenter/myworksheet/myworksheet.wxss

@@ -35,6 +35,7 @@ page {
   text-overflow: ellipsis;
   white-space: nowrap;
   overflow: hidden;
+  padding-top: 20rpx;
 }
 
 .worksheet {
@@ -72,15 +73,17 @@ text {
 .bold{
   font-weight: bold;
 }
-.worksheet_text_title1 .bold, .worksheet_text_title1 .h1 {
-  font-size: 28rpx;
-  line-height: 45rpx;
-  height: 45rpx;
-  min-height: 45rpx;
-  margin-top: 30rpx;
+.worksheet_text_title1 .inline {
+  font-size: 30rpx;
+  line-height: 32rpx;
+  height: 36rpx;
+  min-height: 36rpx;
   margin-right: 10rpx;
 }
 
+.worksheet_text_title1 .h1{
+  font-size: 20rpx;
+}
 text.inline {
   display: inline-block;
 }

+ 14 - 13
pages/worksheetinfo/addworksheetinfo.js

@@ -36,7 +36,7 @@ Page({
       value: 7,
       text: '完成确认'
     }],
-    workstatusindex: 0,
+    workstatusindex: 1,
     
     workBigclass: [{
       value: 1,
@@ -45,8 +45,8 @@ Page({
       value: 2,
       text: '工程实施'
     }],
-    workBigclassindex: 0,
-    workSmallclass:[{
+    workBigclassindex: 1,
+    wokSmallclass:[{
       value: 1,
       text: '日常巡站'
       }, {
@@ -68,7 +68,7 @@ Page({
       value: 7,
       text: '工程验收'
       }],
-    workSmallclassIndex: 0,
+    wokSmallclassIndex: 1,
     breakdownType: [{
       value: 1,
       text: '车辆导致'
@@ -85,7 +85,7 @@ Page({
       value: 5,
       text: '其他'
     }],
-    breakdownTypeindex: null,
+    breakdownTypeindex: 0,
     exceptdate: null,
     excepttime: '00:00',
     finishdate: null,
@@ -129,13 +129,13 @@ Page({
       worksheetinfo
     });
   },
-  bindWorkSmallclassChange: function(e) {
+  bindwokSmallclassChange: function(e) {
     //console.log('picker发送选择改变,携带值为', e.detail.value)
-    let workSmallclass = this.data.workSmallclass[e.detail.value].value;
+    let wokSmallclass = this.data.wokSmallclass[e.detail.value].value;
     let worksheetinfo = this.data.worksheetinfo;
-    worksheetinfo.workSmallclass = workSmallclass;
+    worksheetinfo.wokSmallclass = wokSmallclass;
     this.setData({
-      workSmallclassindex: e.detail.value,
+      wokSmallclassindex: e.detail.value,
       worksheetinfo
     });
   },
@@ -436,9 +436,10 @@ Page({
     //   worksheetinfo
     // });z
     let worksheetinfo = {
-      workStatus: 0,
-      workBigclass: 0,
-      workSmallclass: 0,
+      workStatus: 1,
+      workBigclass: 1,
+      wokSmallclass: 1,
+      breakdownType: 1,
       chargStationId: 0,
     }
     this.setData({
@@ -447,7 +448,7 @@ Page({
     this.setData({
       workstatusindex: 0,
       workBigclassindex: 0,
-      workSmallclassindex: 0,
+      wokSmallclassindex: 0,
       chargstationsindex: 0,
     });
 

+ 2 - 2
pages/worksheetinfo/addworksheetinfo.wxml

@@ -32,8 +32,8 @@
   </view>
   <view class="context">
     <text>工单小类</text>
-    <picker class="picker" disabled="{{worksheetinfo.workStatus==6}}" bindchange="bindWorkSmallclassChange" value="{{workSmallclassindex}}" range-key="text" range="{{workSmallclass}}">
-      <text>{{workSmallclass[workSmallclassindex].text}}</text>
+    <picker class="picker" disabled="{{worksheetinfo.workStatus==6}}" bindchange="bindwokSmallclassChange" value="{{wokSmallclassindex}}" range-key="text" range="{{wokSmallclass}}">
+      <text>{{wokSmallclass[wokSmallclassindex].text}}</text>
     </picker>
   </view>
   <!-- breakdownType故障原因:1车辆导致,2桩体导致,3人为导致,4基础设施问题,5其他 -->

+ 6 - 1
pages/worksheetinfo/findstation.js

@@ -17,6 +17,7 @@ Page({
     loadTotal: 0,
     dataLoading: false,
     finishedLoadTap: 0,
+    finishedLoadShowTimes: 0,
     chargList: [],
   },
   onLoad(e) {
@@ -68,6 +69,7 @@ Page({
       let worksheetinfo = prevPage.data.worksheetinfo;
       let chargStationName = keywords.chargStationName
       worksheetinfo.chargStationId =  keywords.id;
+      worksheetinfo.mainLocation =  keywords.address;
       prevPage.setData({
         chargStationName,
         worksheetinfo
@@ -107,7 +109,10 @@ Page({
       this.setData({
         finishedLoadTap:this.data.finishedLoadTap+1
       })
-      if(this.data.finishedLoadTap>0){
+      if(this.data.finishedLoadTap>0 && this.data.finishedLoadShowTimes==0){
+        this.setData({
+          finishedLoadShowTimes:this.data.finishedLoadShowTimes+1
+        })
         wx.showToast({
           title: '全部加载完毕',
           icon: 'success',

+ 51 - 7
pages/worksheetinfo/worksheetinfo.js

@@ -44,6 +44,29 @@ Page({
       text: '工程实施'
     }],
     workBigclassindex: 0,
+    wokSmallclass:[{
+      value: 1,
+      text: '日常巡站'
+      }, {
+      value: 2,
+      text: '紧急维修'
+      }, {
+      value: 3,
+      text: '施工准备'
+      }, {
+      value: 4,
+      text: '工程进程'
+      }, {
+      value: 5,
+      text: '施工过程'
+      }, {
+      value: 6,
+      text: '工程竣工'
+      }, {
+      value: 7,
+      text: '工程验收'
+      }],
+    wokSmallclassIndex: 1,
     breakdownType: [{
       value: 1,
       text: '车辆导致'
@@ -60,11 +83,11 @@ Page({
       value: 5,
       text: '其他'
     }],
-    breakdownTypeindex: null,
+    breakdownTypeindex: 1,
     exceptdate: null,
-    excepttime: null,
+    excepttime: '00:00',
     finishdate: null,
-    finishtime: null,
+    finishtime: '00:00',
     accendantids: [],
     userNames:[],
     chargStationName:'',
@@ -113,6 +136,16 @@ Page({
       worksheetinfo
     });
   },
+  bindwokSmallclassChange: function(e) {
+    //console.log('picker发送选择改变,携带值为', e.detail.value)
+    let wokSmallclass = this.data.wokSmallclass[e.detail.value].value;
+    let worksheetinfo = this.data.worksheetinfo;
+    worksheetinfo.wokSmallclass = wokSmallclass;
+    this.setData({
+      wokSmallclassindex: e.detail.value,
+      worksheetinfo
+    });
+  },
   bindBreakdownType(e) {
     //console.log('picker发送选择改变,携带值为', e.detail.value)
     let breakdownType = this.data.breakdownType[e.detail.value].value;
@@ -210,7 +243,8 @@ Page({
             if (result.code == 500) {
               wx.showModal({
                 showCancel: false,
-                content: result.msg
+                content: result.msg,
+                confirmColor:'#00AADD',
               });
             } else {
               signString.push(result.msg);
@@ -239,7 +273,8 @@ Page({
               if (res.data.code == 500) {
                 wx.showModal({
                   showCancel: false,
-                  content: res.data.msg
+                  content: res.data.msg,
+                  confirmColor:'#00AADD',
                 });
               } else {
                 wx.navigateBack();
@@ -258,7 +293,8 @@ Page({
                 if (result.code == 500) {
                   wx.showModal({
                     showCancel: false,
-                    content: result.msg
+                    content: result.msg,
+                    confirmColor:'#00AADD',
                   });
                 } else {
                   imgString.push(result.msg);
@@ -279,7 +315,8 @@ Page({
                             if (res.data.code == 500) {
                               wx.showModal({
                                 showCancel: false,
-                                content: res.data.msg
+                                content: res.data.msg,
+                                confirmColor:'#00AADD',
                               });
                             } else {
                               wx.navigateBack();
@@ -409,6 +446,13 @@ Page({
         });
       }
     });
+    this.data.wokSmallclass.forEach((item, index) => {
+      if (item.value == worksheetinfo.wokSmallclass) {
+        this.setData({
+          wokSmallclassindex: index
+        });
+      }
+    });
     if (worksheetinfo.exceptTime) {
       let datetime = worksheetinfo.exceptTime.split(" ");
       this.setData({

+ 13 - 1
pages/worksheetinfo/worksheetinfo.wxml

@@ -21,11 +21,23 @@
     </picker>
   </view>
   <view class="context">
-    <text>工单类</text>
+    <text>工单类</text>
     <picker class="picker" disabled="{{worksheetinfo.workStatus==6}}" bindchange="bindWorkBigclassChange" value="{{workBigclassindex}}" range-key="text" range="{{workBigclass}}">
       <text>{{workBigclass[workBigclassindex].text}}</text>
     </picker>
   </view>
+  <view class="context">
+    <text>工单小类</text>
+    <picker class="picker" disabled="{{worksheetinfo.workStatus==6}}" bindchange="bindwokSmallclassChange" value="{{wokSmallclassindex}}" range-key="text" range="{{wokSmallclass}}">
+      <text>{{wokSmallclass[wokSmallclassindex].text}}</text>
+    </picker>
+  </view>
+  <!-- <view class="context">
+    <text>工单类型</text>
+    <picker class="picker" disabled="{{worksheetinfo.workStatus==6}}" bindchange="bindWorkBigclassChange" value="{{workBigclassindex}}" range-key="text" range="{{workBigclass}}">
+      <text>{{workBigclass[workBigclassindex].text}}</text>
+    </picker>
+  </view> -->
   <!-- breakdownType故障原因:1车辆导致,2桩体导致,3人为导致,4基础设施问题,5其他 -->
   <view class="context">
     <text>故障原因</text>

+ 1 - 1
project.private.config.json

@@ -1,6 +1,6 @@
 {
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "libVersion": "2.25.3",
+  "libVersion": "2.29.1",
   "projectname": "wechat-pilelog",
   "setting": {
     "compileHotReLoad": true

+ 15 - 0
utils/util.js

@@ -35,6 +35,21 @@ class Util {
     // console.log("计算结果",s)
     return s
   }
+
+  static getIp(){
+    wx.request({
+      url: 'https://ipv4.icanhazip.com/',
+      method: 'POST',
+      success(rrr){
+        console.info(rrr);
+        var query = (rrr == null?'':rrr==null?'':rrr);
+        return query.data;
+      },
+      fail(rrr){
+        return '';
+      }
+    })
+  }
 };
 
 module.exports = Util;