Browse Source

Initial Commit

yinzhipeng 5 years ago
commit
7553a2da58
100 changed files with 4308 additions and 0 deletions
  1. 14 0
      .gitignore
  2. 9 0
      app.js
  3. 45 0
      app.json
  4. 9 0
      app.wxss
  5. 36 0
      back_temp.json
  6. BIN
      images/account.png
  7. BIN
      images/asc.png
  8. BIN
      images/asc_active.png
  9. BIN
      images/back.png
  10. BIN
      images/balance.png
  11. BIN
      images/car.png
  12. BIN
      images/card.png
  13. BIN
      images/cashcoupon.png
  14. BIN
      images/cashcoupon1.png
  15. BIN
      images/cashcoupon2.png
  16. BIN
      images/cashcoupon3.png
  17. BIN
      images/chargemoney.png
  18. BIN
      images/chargemoney1.png
  19. BIN
      images/chargemoney2.png
  20. BIN
      images/chargemoneycard.png
  21. BIN
      images/chargemoneycard_b.png
  22. BIN
      images/chargemoneylog.png
  23. BIN
      images/chargeover_1.png
  24. BIN
      images/charging1.png
  25. BIN
      images/charging2.png
  26. BIN
      images/charging3.png
  27. BIN
      images/charginglog.png
  28. BIN
      images/circle1.png
  29. BIN
      images/circle2.png
  30. BIN
      images/desc.png
  31. BIN
      images/desc_active.png
  32. BIN
      images/detail.png
  33. BIN
      images/email.png
  34. BIN
      images/enter.png
  35. BIN
      images/exchange.png
  36. BIN
      images/help.png
  37. BIN
      images/jt.png
  38. BIN
      images/login.png
  39. BIN
      images/man.png
  40. BIN
      images/map1.png
  41. BIN
      images/map2.png
  42. BIN
      images/mapicon_navi_e.png
  43. BIN
      images/mapicon_navi_s.png
  44. BIN
      images/marker.png
  45. BIN
      images/marker1.png
  46. BIN
      images/marker_checked.png
  47. BIN
      images/myworksheet.png
  48. BIN
      images/navigation.png
  49. BIN
      images/out.png
  50. BIN
      images/password.png
  51. BIN
      images/phone.png
  52. BIN
      images/purse.png
  53. BIN
      images/register.png
  54. BIN
      images/relevance.png
  55. BIN
      images/scan.png
  56. BIN
      images/search.png
  57. BIN
      images/user.png
  58. BIN
      images/user_backup.png
  59. BIN
      images/userhead.png
  60. BIN
      images/worksheet.png
  61. 170 0
      pages/chargemoney/chargemoney.js
  62. 4 0
      pages/chargemoney/chargemoney.json
  63. 43 0
      pages/chargemoney/chargemoney.wxml
  64. 124 0
      pages/chargemoney/chargemoney.wxss
  65. 375 0
      pages/charging/charging.js
  66. 5 0
      pages/charging/charging.json
  67. 56 0
      pages/charging/charging.wxml
  68. 227 0
      pages/charging/charging.wxss
  69. 175 0
      pages/forget/forget.js
  70. 4 0
      pages/forget/forget.json
  71. 25 0
      pages/forget/forget.wxml
  72. 138 0
      pages/forget/forget.wxss
  73. 569 0
      pages/index/index.js
  74. 3 0
      pages/index/index.json
  75. 52 0
      pages/index/index.wxml
  76. 230 0
      pages/index/index.wxss
  77. 13 0
      pages/info/info.js
  78. 3 0
      pages/info/info.json
  79. 3 0
      pages/info/info.wxml
  80. 24 0
      pages/info/info.wxss
  81. 137 0
      pages/inputtip/inputtip.js
  82. 3 0
      pages/inputtip/inputtip.json
  83. 21 0
      pages/inputtip/inputtip.wxml
  84. 157 0
      pages/inputtip/inputtip.wxss
  85. 144 0
      pages/login/login.js
  86. 4 0
      pages/login/login.json
  87. 20 0
      pages/login/login.wxml
  88. 172 0
      pages/login/login.wxss
  89. 259 0
      pages/order/order.js
  90. 6 0
      pages/order/order.json
  91. 68 0
      pages/order/order.wxml
  92. 222 0
      pages/order/order.wxss
  93. 167 0
      pages/outmoney/outmoney.js
  94. 4 0
      pages/outmoney/outmoney.json
  95. 7 0
      pages/outmoney/outmoney.wxml
  96. 105 0
      pages/outmoney/outmoney.wxss
  97. 274 0
      pages/register/register.js
  98. 4 0
      pages/register/register.json
  99. 40 0
      pages/register/register.wxml
  100. 138 0
      pages/register/register.wxss

+ 14 - 0
.gitignore

@@ -0,0 +1,14 @@
+# Windows
+[Dd]esktop.ini
+Thumbs.db
+$RECYCLE.BIN/
+
+# macOS
+.DS_Store
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+
+# Node.js
+node_modules/

+ 9 - 0
app.js

@@ -0,0 +1,9 @@
+//app.js
+let wechat = require('./utils/wechat.js');
+App({
+  globalData: {
+    postHeadAgreement:'https',
+    helpPhoneNum:'18211188302'
+  },
+  onLaunch() {}
+})

+ 45 - 0
app.json

@@ -0,0 +1,45 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/routes/routes",
+    "pages/info/info",
+    "pages/inputtip/inputtip",
+    "pages/ucenter/index/index",
+    "pages/search_result/search_result",
+    "pages/ucenter/charginglog/charginglog",
+    "pages/ucenter/chargemoneylog/chargemoneylog",
+    "pages/ucenter/purse/purse",
+    "pages/ucenter/chargemoneycard/chargemoneycard",
+    "pages/ucenter/cashcoupon/cashcoupon",
+    "pages/scan_result/scan_result",
+    "pages/charging/charging",
+    "pages/chargemoney/chargemoney",
+    "pages/login/login",
+    "pages/register/register",
+    "pages/order/order",
+    "pages/ucenter/mychargestation/mychargestation",
+    "pages/ucenter/myworksheet/myworksheet",
+    "pages/outmoney/outmoney",
+    "pages/worksheetinfo/worksheetinfo",
+    "pages/worksheetinfo/accendant",
+    "pages/forget/forget",
+    "pages/reset_password/reset_password",
+    "pages/ucenter/center/center"
+  ],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#27a6bf",
+    "navigationBarTitleText": "派捷充电",
+    "navigationBarTextStyle": "white"
+  },
+  "permission": {
+    "scope.userLocation": {
+      "desc": "你的位置信息将用于充电桩小程序位置效果展示"
+    }
+  },
+  "networkTimeout": {
+    "request": 300000,
+    "connectSocket": 300000
+  },
+  "debug": false
+}

+ 9 - 0
app.wxss

@@ -0,0 +1,9 @@
+/**app.wxss**/
+.container {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  box-sizing: border-box;
+} 

+ 36 - 0
back_temp.json

@@ -0,0 +1,36 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/routes/routes",
+    "pages/info/info",
+    "pages/weather/weather",
+    "pages/inputtip/inputtip"
+  ],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#4D8AD7",
+    "navigationBarTitleText": "WeChat",
+    "navigationBarTextStyle": "white"
+  },
+  "tabBar": {
+    "color": "#000000",
+    "selectedColor": "#4D8AD7",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "text": "地图",
+        "iconPath": "/images/map2.png",
+        "selectedIconPath": "/images/map1.png"
+      },
+      {
+        "pagePath": "pages/weather/weather",
+        "text": "天气",
+        "iconPath": "/images/weather2.png",
+        "selectedIconPath": "/images/weather1.png"
+      }
+    ]
+  },
+  "networkTimeout": {
+    "request": 15000
+  }
+}

BIN
images/account.png


BIN
images/asc.png


BIN
images/asc_active.png


BIN
images/back.png


BIN
images/balance.png


BIN
images/car.png


BIN
images/card.png


BIN
images/cashcoupon.png


BIN
images/cashcoupon1.png


BIN
images/cashcoupon2.png


BIN
images/cashcoupon3.png


BIN
images/chargemoney.png


BIN
images/chargemoney1.png


BIN
images/chargemoney2.png


BIN
images/chargemoneycard.png


BIN
images/chargemoneycard_b.png


BIN
images/chargemoneylog.png


BIN
images/chargeover_1.png


BIN
images/charging1.png


BIN
images/charging2.png


BIN
images/charging3.png


BIN
images/charginglog.png


BIN
images/circle1.png


BIN
images/circle2.png


BIN
images/desc.png


BIN
images/desc_active.png


BIN
images/detail.png


BIN
images/email.png


BIN
images/enter.png


BIN
images/exchange.png


BIN
images/help.png


BIN
images/jt.png


BIN
images/login.png


BIN
images/man.png


BIN
images/map1.png


BIN
images/map2.png


BIN
images/mapicon_navi_e.png


BIN
images/mapicon_navi_s.png


BIN
images/marker.png


BIN
images/marker1.png


BIN
images/marker_checked.png


BIN
images/myworksheet.png


BIN
images/navigation.png


BIN
images/out.png


BIN
images/password.png


BIN
images/phone.png


BIN
images/purse.png


BIN
images/register.png


BIN
images/relevance.png


BIN
images/scan.png


BIN
images/search.png


BIN
images/user.png


BIN
images/user_backup.png


BIN
images/userhead.png


BIN
images/worksheet.png


+ 170 - 0
pages/chargemoney/chargemoney.js

@@ -0,0 +1,170 @@
+// pages/chargemoney/chargemoney.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    chargemoney_select: null,
+    userInfo: {},
+    isLogin: false
+  },
+  bindMoneyTap(e) {
+    let chargemoney_select = e.currentTarget.id;
+    this.setData({
+      chargemoney_select
+    });
+  },
+  saveMoney(e) {
+    //console.log(e);
+    let chargemoney_select = e.detail.value;
+    this.setData({
+      chargemoney_select
+    });
+  },
+  beginChargemoney(e) {
+    //console.log(this.data.chargemoney_select);
+    let that = this;
+    if (this.data.chargemoney_select) {
+      wx.showLoading({
+        title: '充值中...',
+        mask: true
+      });
+      wx.login({
+        success(res) {
+          console.log(res);
+          if (res.code) {
+            // 发起网络请求
+            wx.request({
+              url: getApp().globalData.postHeadAgreement +'://cdgl.xinyhy.cn/restapi/wechatpay/dopaychargmoney',
+              data: {
+                //outTradeNo: new Date().getTime(), //订单号
+                totalFee: that.data.chargemoney_select, //钱
+                //totalFee:0.01,
+                code: res.code
+              },
+              header: {
+                'content-type': 'application/x-www-form-urlencoded;charset=utf-8',
+              },
+              method: 'POST',
+              success(res1) {
+                //console.log(res1);
+                wx.requestPayment({
+                  timeStamp: res1.data.timeStamp,
+                  nonceStr: res1.data.nonceStr,
+                  package: res1.data.package,
+                  signType: res1.data.signType,
+                  paySign: res1.data.paySign,
+                  success(res2) {
+                    console.log(res2);
+                    wx.request({
+                      url: getApp().globalData.postHeadAgreement +'://cdgl.xinyhy.cn/restapi/pileLog/wechatrechargeback',
+                      data: {
+                        userId: that.data.userInfo.userId,
+                        rechargeMoney: that.data.chargemoney_select
+                        //rechargeMoney: 0.01,
+                      },
+                      method: 'POST',
+                      success(res3) {
+                        wx.hideLoading();
+                        let {
+                          data
+                        } = res3;
+                        if (data && data.code == 200) {
+                          wx.showModal({
+                            showCancel: false,
+                            content: '充值成功'
+                          });
+                        } else {
+                          wx.showModal({
+                            showCancel: false,
+                            content: '充值失败'
+                          });
+                        }
+                      }
+                    });
+                  },
+                  fail(res3) {
+                    wx.hideLoading();
+                    console.log(res3);
+                  }
+                });
+              }
+            });
+          } else {
+            wx.hideLoading();
+            console.log('登录失败!' + res.errMsg)
+          }
+        }
+      })
+
+
+    }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    let userInfo = wx.getStorageSync('userInfo');
+    let isLogin = wx.getStorageSync('isLogin');
+
+    // 页面显示
+    if (userInfo && isLogin) {
+      //console.log(userInfo);
+      //userInfo.flag = true;
+      this.setData({
+        userInfo: userInfo,
+        isLogin: isLogin
+      });
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 4 - 0
pages/chargemoney/chargemoney.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "充值"
+}

+ 43 - 0
pages/chargemoney/chargemoney.wxml

@@ -0,0 +1,43 @@
+<!--pages/chargemoney/chargemoney.wxml-->
+<view id='50' class="{{chargemoney_select==50?'chargemoney_select':'chargemoney'}}" bindtap='bindMoneyTap' hover-class='active'>
+  <image src='/images/chargemoney{{chargemoney_select==50?2:1}}.png'></image>
+  <view>
+    <text>50元</text>
+  </view>
+</view>
+<view id='100' class="{{chargemoney_select==100?'chargemoney_select':'chargemoney'}}" bindtap='bindMoneyTap' hover-class='active'>
+  <image src='/images/chargemoney{{chargemoney_select==100?2:1}}.png'></image>
+  <view>
+    <text>100元</text>
+  </view>
+</view>
+<view id='200' class="{{chargemoney_select==200?'chargemoney_select':'chargemoney'}}" bindtap='bindMoneyTap' hover-class='active'>
+  <image src='/images/chargemoney{{chargemoney_select==200?2:1}}.png'></image>
+  <view>
+    <text>200元</text>
+  </view>
+</view>
+<view id='500' class="{{chargemoney_select==500?'chargemoney_select':'chargemoney'}}" bindtap='bindMoneyTap' hover-class='active'>
+  <image src='/images/chargemoney{{chargemoney_select==500?2:1}}.png'></image>
+  <view>
+    <text>500元</text>
+  </view>
+</view>
+<view id='800' class="{{chargemoney_select==800?'chargemoney_select':'chargemoney'}}" bindtap='bindMoneyTap' hover-class='active'>
+  <image src='/images/chargemoney{{chargemoney_select==800?2:1}}.png'></image>
+  <view>
+    <text>800元</text>
+  </view>
+</view>
+<view id='1000' class="{{chargemoney_select==1000?'chargemoney_select':'chargemoney'}}" bindtap='bindMoneyTap' hover-class='active'>
+  <image src='/images/chargemoney{{chargemoney_select==1000?2:1}}.png'></image>
+  <view>
+    <text>1000元</text>
+  </view>
+</view>
+
+<view class='money_input'>
+  <text>金额(元)</text>
+  <input value='{{chargemoney_select}}' placeholder-class="section_phcolor" bindinput='saveMoney' type='number' placeholder="请输入充值金额" />
+</view>
+<button class='chargemoney_button' bindtap="beginChargemoney">立即充值(跳转微信支付)</button>

+ 124 - 0
pages/chargemoney/chargemoney.wxss

@@ -0,0 +1,124 @@
+/* pages/chargemoney/chargemoney.wxss */
+
+.chargemoney {
+  display: inline-block;
+  position: relative;
+  width: 148rpx;
+  height: 77rpx;
+  margin: 50rpx 51rpx 0 51rpx;
+  flex-shrink: 0;
+  overflow: hidden;
+}
+
+.chargemoney_select {
+  display: inline-block;
+  position: relative;
+  width: 148rpx;
+  height: 77rpx;
+  margin: 50rpx 51rpx 0 51rpx;
+  flex-shrink: 0;
+  overflow: hidden;
+}
+
+.chargemoney image, .chargemoney_select image {
+  width: 147rpx;
+  height: 77rpx;
+}
+
+.chargemoney view, .chargemoney_select view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 148rpx;
+  height: 77rpx;
+  flex-shrink: 0;
+  overflow: hidden;
+  text-align: center;
+}
+
+text {
+  font-size: 32rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #959595;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  line-height: 77rpx;
+  height: 77rpx;
+  min-height: 77rpx;
+}
+
+.chargemoney_select text {
+  color: red;
+}
+
+.active {
+  background-color: #ebebeb;
+}
+
+.money_input {
+  margin: 51rpx 30rpx;
+  padding: 0 21rpx;
+  border-top: 1rpx solid #f7f7f7;
+  border-bottom: 1rpx solid #f7f7f7;
+}
+
+.section_phcolor {
+  font-size: 28rpx;
+  line-height: 100rpx;
+  height: 100rpx;
+  min-height: 100rpx;
+  color: #aaaaaa;
+}
+
+.money_input {
+  line-height: 100rpx;
+  height: 100rpx;
+  min-height: 100rpx;
+}
+
+.money_input text {
+  display: inline-block;
+  color: #434343;
+  line-height: 100rpx;
+  height: 100rpx;
+  min-height: 100rpx;
+}
+
+.money_input input {
+  padding: 0 20rpx;
+  display: inline-block;
+  width: 450rpx;
+  height: 100rpx;
+  line-height: 100rpx;
+  min-height: 100rpx;
+  color: #aaaaaa;
+  font-size: 28rpx;
+}
+.chargemoney_button{
+  position: absolute;
+  bottom: 0;
+  width: calc(100% - 60rpx);
+  font-size: 32rpx;
+  margin: 50rpx 30rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #ffffff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #1cb03f;
+}
+.chargemoney_button.button-hover{
+  background-color: #1ca05e;
+}

+ 375 - 0
pages/charging/charging.js

@@ -0,0 +1,375 @@
+// pages/charging/charging.js
+var chargingPng;
+var chargingStatus;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    orderid: null,
+    userId: null,
+    chargPileId: null,
+    chargingRate: 0,
+    chargingTime: '',
+    chargingOrder: null,
+    chargPile: null
+  },
+  drawCircle: function(step) {
+    var context = wx.createCanvasContext('canvasProgress');
+    context.setLineWidth(4); // 设置圆环的宽度
+
+    // 设置渐变
+    //var gradient = context.createLinearGradient(200, 100, 100, 200);
+    //gradient.addColorStop("0", "#2661DD");
+    //gradient.addColorStop("0.5", "#40ED94");
+    //gradient.addColorStop("1.0", "#5956CC");
+
+    context.setLineWidth(this.getSize(20));
+    context.setStrokeStyle('#24e383');
+    context.setLineCap('round')
+    context.beginPath();
+
+    // 参数step 为绘制的圆环周长,从0到2为一周 。 -Math.PI / 2 将起始角设在12点钟位置 ,结束角 通过改变 step 的值确定
+    context.arc(this.getSize(100) - 1, this.getSize(100) - 1, this.getSize(90) - 1, -Math.PI / 2, step / (100 / 2) * Math.PI - Math.PI / 2, false);
+    context.stroke();
+    context.draw()
+  },
+  getSize: function(v) {
+    //console.log(wx.getSystemInfoSync().windowWidth);
+    //console.log(v * (wx.getSystemInfoSync().windowWidth / 375));
+    return v * (wx.getSystemInfoSync().windowWidth / 375)
+  },
+  stopCharging(e) {
+    wx.showLoading({
+      title: '结束充电中...',
+      mask: true
+    });
+    clearInterval(chargingStatus);
+    let {
+      orderid,
+      userId,
+      chargPileId
+    } = this.data;
+    wx.request({
+      url: getApp().globalData.postHeadAgreement + '://cdgl.xinyhy.cn/restapi/pileLog/chargstop',
+      data: {
+        chargPileId,
+        userId,
+        orderid
+      },
+      method: 'POST',
+      success(res) {
+        wx.hideLoading();
+        let {
+          data
+        } = res;
+        if (data && data.code == 200) {
+          //wx.showModal({
+          //showCancel: false,
+          //content: '结束充电成功'
+          //});
+          let url = `/pages/order/order?orderid=${orderid}&userId=${userId}&chargPileId=${chargPileId}`;
+          wx.redirectTo({
+            url
+          });
+        } else {
+          wx.showModal({
+            showCancel: false,
+            content: '结束充电失败'
+          });
+
+        }
+      },
+      fail(err){
+       wx.hideLoading();
+       wx.showModal({
+         showCancel: false,
+         content: '结束充电失败'
+       });
+      }
+    });
+  },
+  showChargingPng() {
+    var i = 0;
+    let that = this;
+    if (that.data.chargingOrder && that.data.chargingOrder.soc && that.data.chargingOrder.soc != 0) {
+      chargingPng = setInterval(function() {
+        if (i <= that.data.chargingOrder.soc) {
+          that.drawCircle(i);
+          that.setData({
+            chargingRate: i
+          });
+          i++;
+        } else {
+          //console.log(chargingPng);
+          clearInterval(chargingPng);
+        }
+      }, 20);
+    }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    //console.log(options);
+    let {
+      orderid,
+      userId,
+      chargPileId
+    } = options;
+    this.setData({
+      orderid,
+      userId,
+      chargPileId
+    });
+    if (!orderid||orderid=="null"){
+      orderid="";
+    }
+    let that = this;
+    wx.request({
+      url: getApp().globalData.postHeadAgreement + '://cdgl.xinyhy.cn/restapi/pileLog/wechatchargstatus',
+      data: {
+        chargPileId,
+        userId,
+        orderid
+      },
+      method: 'POST',
+      success(res) {
+        let {
+          data
+        } = res;
+
+        if (data && data.code == 200) {
+          let {
+            result: chargingOrder
+          } = data;
+          let {
+            chargPileId,
+            soc: chargingRate
+          } = chargingOrder;
+          let orderid_r = chargingOrder.orderid;
+          console.log(chargingOrder);
+          wx.request({
+            url: getApp().globalData.postHeadAgreement + '://cdgl.xinyhy.cn/restapi/wechat/chargPile',
+            data: chargPileId,
+            method: 'POST',
+            success(res1) {
+              console.log(res1.data);
+              if (res1.data) {
+                let {
+                  data: chargPile
+                } = res1;
+                that.setData({
+                  chargPile
+                });
+              }
+            }
+          });
+          console.log(chargingOrder.chargPileStatus);
+          if (chargingOrder.chargPileStatus == 1) { //启动中,继续轮训
+            that.setData({
+              chargingOrder,
+              chargPileId,
+              orderid: orderid_r
+            });
+          } else if (chargingOrder.chargPileStatus == 2) { //充电中,继续轮训
+            console.log(chargingOrder.chargPileStatus == 2);
+            if (chargingOrder.ljcdsj || chargingOrder.ljcdsj == 0) {
+              var chargingTimeHour = Math.floor(chargingOrder.ljcdsj / 60);
+              if (chargingTimeHour <= 9) {
+                chargingTimeHour = '0' + chargingTimeHour;
+              }
+              var chargingTimeMinute = chargingOrder.ljcdsj % 60;
+              if (chargingTimeMinute <= 9) {
+                chargingTimeMinute = '0' + chargingTimeMinute
+              }
+              var chargingTime = chargingTimeHour + ":" + chargingTimeMinute + ":00";
+            }
+            that.setData({
+              chargingOrder,
+              chargPileId,
+              chargingTime,
+              orderid: orderid_r
+            });
+            that.showChargingPng();
+          } else if (chargingOrder.chargPileStatus == 3) { //充电完成,适用于主动拔枪
+            clearInterval(chargingStatus);
+            let {
+              orderid,
+              userId,
+              chargPileId
+            } = that.data;
+            let url = `/pages/order/order?orderid=${orderid_r}&userId=${userId}&chargPileId=${chargPileId}`;
+            wx.redirectTo({
+              url
+            });
+          } else if (chargingOrder.chargPileStatus == 4) { //启动异常,回退界面
+            clearInterval(chargingStatus);
+            wx.showModal({
+              showCancel: false,
+              content: '开启充电失败'
+            });
+            that.delOrder(orderid_r);
+            console.log(orderid_r);
+          }
+        } else {
+          console.log(res);
+        }
+      },
+      fail(err) {
+        // var chargingOrder = {chargStatus:1};
+        //   that.setData({
+        //     chargingOrder
+        //   });
+      }
+    });
+  },
+  delOrder(orderId){
+    if (orderId){
+      wx.request({
+        url: getApp().globalData.postHeadAgreement + '://cdgl.xinyhy.cn/restapi/pileLog/exceptOrder',
+        data: {"orderid":orderId},
+        method: 'POST',
+        success(res1) {
+          console.log(res1.data);
+          //if (res1.data ) {
+            
+          //}
+          wx.navigateBack();
+        }
+      });
+    } 
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {},
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function(e) {
+    clearInterval(chargingStatus);
+    this.showChargingPng();
+    let {
+      orderid,
+      userId,
+      chargPileId
+    } = this.data;
+    if (!orderid || orderid == "null") {
+      orderid = "";
+    }
+    let that = this;
+    chargingStatus = setInterval(function() {
+      wx.request({
+        url: getApp().globalData.postHeadAgreement + '://cdgl.xinyhy.cn/restapi/pileLog/wechatchargstatus',
+        data: {
+          chargPileId,
+          userId,
+          orderid
+        },
+        method: 'POST',
+        success(res) {
+          let {
+            data
+          } = res;
+
+          if (data && data.code == 200) {
+            let {
+              result: chargingOrder
+            } = data;
+            let {
+              chargPileId,
+              soc: chargingRate
+            } = chargingOrder;
+            let orderid_r = chargingOrder.orderid;
+            if (chargingOrder.chargPileStatus == 1) { //启动中,继续轮训
+              that.setData({
+                chargingOrder,
+                chargPileId,
+                orderid: orderid_r
+              });
+            } else if (chargingOrder.chargPileStatus == 2) { //充电中,继续轮训
+              if (chargingOrder.ljcdsj || chargingOrder.ljcdsj == 0) {
+                var chargingTimeHour = Math.floor(chargingOrder.ljcdsj / 60);
+                if (chargingTimeHour <= 9) {
+                  chargingTimeHour = '0' + chargingTimeHour;
+                }
+                var chargingTimeMinute = chargingOrder.ljcdsj % 60;
+                if (chargingTimeMinute <= 9) {
+                  chargingTimeMinute = '0' + chargingTimeMinute
+                }
+                var chargingTime = chargingTimeHour + ":" + chargingTimeMinute + ":00";
+              }
+              that.setData({
+                chargingOrder,
+                chargPileId,
+                chargingTime,
+                chargingRate,
+                orderid: orderid_r
+              });
+              that.drawCircle(chargingRate);
+            } else if (chargingOrder.chargPileStatus == 3) { //充电完成,适用于主动拔枪
+              clearInterval(chargingStatus);
+              let {
+                orderid,
+                userId,
+                chargPileId
+              } = that.data;
+              let url = `/pages/order/order?orderid=${orderid_r}&userId=${userId}&chargPileId=${chargPileId}`;
+              wx.redirectTo({
+                url
+              });
+            } else if (chargingOrder.chargPileStatus == 4) { //启动异常,回退界面
+              clearInterval(chargingStatus);
+              wx.showModal({
+                showCancel: false,
+                content: '开启充电失败'
+              });
+              console.log(orderid_r);
+              that.delOrder(orderid_r);
+            }
+          } else {
+            console.log(res);
+          }
+        }
+      });
+    }, 20000);
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+    clearInterval(chargingStatus);
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+    clearInterval(chargingStatus);
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 5 - 0
pages/charging/charging.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "充电中",
+  "navigationBarBackgroundColor": "#0a181a"
+}

+ 56 - 0
pages/charging/charging.wxml

@@ -0,0 +1,56 @@
+<!--pages/charging/charging.wxml-->
+<view class="map_text" hover-class='active'>
+  <view class='charging_text_title'>
+    <view class='charging'>
+      <image src='/images/charging2.png'></image>
+    </view>
+    <view class='charging_text_title1'>
+      <text class='bold'>{{chargPile.address}}</text>
+      <text class="h1">{{chargPile.chargPileName}}</text>
+    </view>
+  </view>
+  <text class="left">终端编号:{{chargPileId}}</text>
+  <text class="right">数据每分钟自动刷新</text>
+  <view class='chargeover'>
+    <image src='/images/chargeover_1.png'></image>
+    <canvas class="progress_canvas" canvas-id="canvasProgress"> </canvas>
+    <view class='chargeover_text_view' wx:if="{{chargingOrder.chargPileStatus==2}}">
+      <text class="text2">{{chargingOrder.yczds}}</text>
+      <text class="text1">已充电量(度)</text>
+      <!-- <text class="text2">01小时04分</text>
+      <text class="text1">剩余充满时间</text> -->
+      <text class="text2">{{chargingRate}}%</text>
+      <text class="text1">电池电量</text>
+    </view>
+    <view class='chargeover_text_view' wx:if="{{chargingOrder.chargPileStatus==1}}">
+      <text class="text4">充电桩启动中</text>
+    </view>
+  </view>
+
+
+
+
+
+  <!--<view class='chargeover'>
+    <image src='/images/chargeover_1.png'></image>
+    <image src='/images/chargeover{{chargingRate}}.png'></image>
+    <view class='chargeover_text_view'>
+      <text class="text2">17.15</text>
+      <text class="text1">已充电量(度)</text>-->
+      <!-- <text class="text2">01小时04分</text>
+      <text class="text1">剩余充满时间</text> -->
+      <!--<text class="text2">{{chargingRate}}%</text>
+      <text class="text1">电池电量</text>
+    </view>
+  </view> -->
+  <view class='text_context' >
+    <text class="text1">已充时长</text>
+    <text class="text3">{{chargingTime}}</text>
+    <text class="text1">充电费用</text>
+    <text class="text3 inline">{{chargingOrder.ycdfje}}</text>
+    <text class="inline">元</text>
+  </view>
+  <text class="help" decode='true'>客服电话:18211188302&nbsp;&nbsp;&nbsp;&nbsp;工作时间:工作日 08:00-17:00</text>
+</view>
+
+<button class='{{chargingOrder.chargPileStatus==2?"charg_button":"charg_button_disable"}}' bindtap='{{chargingOrder.chargPileStatus==2?"stopCharging":""}}'>停止充电</button>

+ 227 - 0
pages/charging/charging.wxss

@@ -0,0 +1,227 @@
+/* pages/charging/charging.wxss */
+
+page {
+  background-color: #0a181a;
+  height: 100%;
+  overflow-y: hidden;
+}
+
+.map_text {
+  position: relative;
+  height: calc(100% - 210rpx);
+  background: #0a181a;
+  padding: 0 30rpx;
+  margin: 30rpx 20rpx 50rpx 20rpx;
+  border-radius: 20rpx;
+}
+
+.map_text.active {
+  /*background-color: #ebebeb;*/
+}
+
+.charging_text_title {
+  height: 105rpx;
+  width: 100%;
+  display: flex;
+}
+
+.charging_text_title1 {
+  width: 100%;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+.charging {
+  width: 45rpx;
+  height: 45rpx;
+  margin: 30rpx 30rpx 30rpx 0;
+  flex-shrink: 0;
+  overflow: hidden;
+}
+
+.charging image {
+  width: 45rpx;
+  height: 45rpx;
+}
+
+.chargeover {
+  width: 400rpx;
+  height: 400rpx;
+  margin: 50rpx 125rpx;
+  position: relative;
+  flex-shrink: 0;
+  overflow: hidden;
+}
+
+.chargeover image {
+  width: 400rpx;
+  height: 400rpx;
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.chargeover_text_view {
+  width: 200rpx;
+  height: 200rpx;
+  position: absolute;
+  left: 100rpx;
+  top: 100rpx;
+  vertical-align: middle;
+  text-align: center;
+}
+
+text {
+  margin: 0 0 20rpx 0;
+  display: block;
+  font-size: 24rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #24e383;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  line-height: 24rpx;
+  height: 24rpx;
+  min-height: 24rpx;
+}
+
+text.bold {
+  font-weight: bold;
+  line-height: 24rpx;
+  height: 24rpx;
+  min-height: 24rpx;
+  margin-top: 30rpx;
+  margin-bottom: 1rpx;
+  display: block;
+}
+
+text.inline {
+  display: inline-block;
+  color: #959595;
+  margin: 0rpx 0rpx 80rpx 0rpx;
+  line-height: 48rpx;
+  height: 48rpx;
+  min-height: 48rpx;
+}
+text.left {
+  float: left;
+  padding-bottom: 50rpx;
+  margin: 0;
+}
+text.right {
+  text-align: right;
+  float: right;
+  padding-bottom: 50rpx;
+  margin: 0;
+}
+text.fast {
+  color: #2483c0;
+}
+
+text.slow {
+  color: #42b9b4;
+}
+
+.h1 {
+  margin: 0rpx 0rpx 30rpx 0rpx;
+  font-size: 20rpx;
+  line-height: 20rpx;
+  height: 20rpx;
+  min-height: 20rpx;
+  color: #959595;
+}
+
+.charg_button {
+  font-size: 32rpx;
+  margin: 50rpx 30rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #1eb368;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #041008;
+}
+
+.charg_button.button-hover {
+  background-color: #1eb368;
+  color: #041008;
+}
+
+.charg_button_disable {
+  font-size: 32rpx;
+  margin: 50rpx 30rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  color: #fff;
+  background-color: #c9c9c9;
+}
+
+.text1 {
+  margin: 0rpx 0rpx 30rpx 0rpx;
+  color: #959595;
+}
+
+.text2 {
+  margin: 0rpx 0rpx 20rpx 0rpx;
+  font-size: 32rpx;
+  line-height: 32rpx;
+  height: 32rpx;
+  min-height: 32rpx;
+}
+
+.text3 {
+  margin: 0rpx 0rpx 80rpx 0rpx;
+  font-size: 48rpx;
+  line-height: 48rpx;
+  height: 48rpx;
+  min-height: 48rpx;
+  color: #959595;
+}
+
+.text4 {
+  font-size: 32rpx;
+  line-height: 200rpx;
+  height: 200rpx;
+  min-height: 200rpx;
+}
+
+.text_context {
+  text-align: center;
+}
+
+.progress_canvas {
+  width: 400rpx;
+  height: 400rpx;
+}
+
+.help {
+  width: 100%;
+  text-align: center;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  margin: 0rpx 0rpx 30rpx 0rpx;
+  font-size: 22rpx;
+  line-height: 22rpx;
+  height: 22rpx;
+  min-height: 22rpx;
+  color: #959595;
+}

+ 175 - 0
pages/forget/forget.js

@@ -0,0 +1,175 @@
+// pages/forget/forget.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    userName: null,
+    phone: null,
+    email: null,
+    checkPass: false,
+    errorMsg: ''
+  },
+  goNext(e){
+    let that = this;
+    let {
+      userName: loginName,
+      phone,
+      email
+    } = this.data;
+    wx.request({
+      url: getApp().globalData.postHeadAgreement + '://cdgl.xinyhy.cn/restapi/wechat/forget',
+      data: {
+        loginName,
+        phonenumber: phone,
+        email
+      },
+      method: 'POST',
+      success(res) {
+        //console.log(res);
+        //console.log(res.data.code == 1);
+        if (res.data.code == 1) {
+          that.setData({
+            errorMsg: res.data.msg
+          });
+        } else {
+          //跳转到下一步
+          let url = `/pages/reset_password/reset_password?loginName=${loginName}`;
+          wx.redirectTo({
+            url
+          });
+        }
+      }
+    });
+  },
+  inputAccount(e) {
+    this.setData({
+      userName: e.detail.value
+    });
+    this.checkAll();
+  },
+  inputPhone(e) {
+    this.setData({
+      phone: e.detail.value
+    });
+    this.checkAll();
+  },
+  inputEmail(e) {
+    this.setData({
+      email: e.detail.value
+    });
+    this.checkAll();
+  },
+  checkPhone() {
+    if (!(/^1[3456789]\d{9}$/.test(this.data.phone))) {
+      return false;
+    }
+    return true;
+  },
+  checkMail() {
+    if (!(/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(this.data.email))) {
+      return false;
+    }
+    return true;
+  },
+  checkAll() {
+    if (!this.data.userName || !this.data.userName.replace(/(^\s*)|(\s*$)/g, "")) {
+      this.setData({
+        errorMsg: '账号不能为空'
+      });
+      this.setData({
+        checkPass: false
+      });
+      return;
+    } else {
+      this.setData({
+        errorMsg: ''
+      });
+    }
+    if (!this.checkPhone()) {
+      this.setData({
+        errorMsg: '手机号输入有误,请重新输入'
+      });
+      this.setData({
+        checkPass: false
+      });
+      return;
+    } else {
+      this.setData({
+        errorMsg: ''
+      });
+    }
+    if (!this.checkMail()) {
+      this.setData({
+        errorMsg: '邮箱输入有误,请重新输入'
+      });
+      this.setData({
+        checkPass: false
+      });
+      return;
+    } else {
+      this.setData({
+        errorMsg: ''
+      });
+    }
+    this.setData({
+      checkPass: true
+    });
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 4 - 0
pages/forget/forget.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "忘记密码"
+}

+ 25 - 0
pages/forget/forget.wxml

@@ -0,0 +1,25 @@
+<!--pages/forget/forget.wxml-->
+<view class='main'>
+  <image class='main_image' src='/images/register.png'></image>
+  <view class='context'>
+    <view class='context_input'>
+      <view class='input_view'>
+        <image class='account_img' src='/images/account.png'></image>
+        <input placeholder='请设置账号' bindinput='inputAccount' focus='true' placeholder-class='placeholder'></input>
+      </view>
+      <view class='input_view'>
+        <image class='phone_img' src='/images/phone.png'></image>
+        <input placeholder='请输入电话' maxlength='11' bindinput='inputPhone' type='number' placeholder-class='placeholder'></input>
+      </view>  
+       <view class='input_view'>
+        <image class='email_img' src='/images/email.png'></image>
+        <input placeholder='请输入邮箱' maxlength='48' bindinput='inputEmail' type='text' placeholder-class='placeholder'></input>
+      </view>
+    </view>
+    <view class="errorMsg"><text>{{errorMsg}}</text></view>
+    <button class='{{checkPass?"login_button":"login_button_disable"}}' bindtap="{{checkPass?'goNext':''}}">
+      下一步
+    </button>
+
+  </view>
+</view>

+ 138 - 0
pages/forget/forget.wxss

@@ -0,0 +1,138 @@
+/* pages/forget/forget.wxss */
+.main {
+  height: 100%;
+  width: 100%;
+  position: relative;
+}
+
+.main_image {
+  height: 1344rpx;
+  width: 750rpx;
+  margin-top: -128rpx;
+}
+
+.main .context {
+  height: 100%;
+  width: 100%;
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.context_input {
+  margin: 30rpx 32rpx;
+}
+
+.account_img {
+  width: 26rpx;
+  height: 32rpx;
+  margin: 28rpx 32rpx 28rpx 0;
+}
+
+.password_img {
+  width: 24rpx;
+  height: 30rpx;
+  margin: 29rpx 34rpx 29rpx 0;
+}
+
+.phone_img {
+  width: 24rpx;
+  height: 24rpx;
+  margin: 32rpx 34rpx 32rpx 0;
+}
+.email_img {
+  width: 26rpx;
+  height: 20rpx;
+  margin: 34rpx 32rpx 34rpx 0;
+}
+.man_img {
+  width: 28rpx;
+  height: 24rpx;
+  margin: 32rpx 30rpx 32rpx 0;
+}
+
+.context_input .input_view {
+  border-bottom: 1rpx solid #f1f1f1;
+}
+
+.context_input input {
+  width: calc(100% - 58rpx);
+  display: inline-block;
+  font-size: 32rpx;
+  height: 88rppx;
+  line-height: 88rpx;
+  min-height: 88rpx;
+  color: #434343;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+
+.context_input .placeholder {
+  color: #c9c9c9;
+  font-size: 32rpx;
+  height: 88rppx;
+  line-height: 88rpx;
+  min-height: 88rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+.errorMsg{
+  height: 28rpx;
+  margin: 0rpx 32rpx 32rpx 30rpx;
+  font-size: 28rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: red;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.login_button {
+  width: calc(100% - 62rpx);
+  font-size: 32rpx;
+  margin: 0rpx 32rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #fff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #3cb8b6;
+}
+.login_button_disable{
+  width: calc(100% - 62rpx);
+  font-size: 32rpx;
+  margin: 0rpx 32rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #fff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #c9c9c9;
+}
+.login_button.button-hover {
+  background-color: #36a9a6;
+}

+ 569 - 0
pages/index/index.js

@@ -0,0 +1,569 @@
+//index.js
+//获取应用实例
+let app = getApp();
+let wechat = require("../../utils/wechat");
+let amap = require("../../utils/amap");
+let Util = require("../../utils/util");
+let mapregionchange_makertap = false;
+
+Page({
+  data: {
+    markers: [],
+    latitude: 39.9088120620532,
+    longitude: 116.39747668717192,
+    user_lat: 39.9088120620532,
+    user_lon: 116.39747668717192,
+    textData: null,
+    city: null,
+    markerId: null,
+    keywords: "搜索充电桩",
+    userInfo: {},
+    isLogin: false,
+    myChargeStationsIds: '',
+    polygon: [{
+      points: [{
+        latitude: 31,
+        longitude: 131
+      }, {
+        latitude: 31,
+        longitude: 131.1
+      }, {
+        latitude: 31.1,
+        longitude: 131.1
+      }, , {
+        latitude: 31.1,
+        longitude: 131
+      }]
+
+    }]
+  },
+  onLoad(e) {
+    amap.getRegeo(function() {
+        var fail = function(obj) {
+          wx.showModal({
+            title: '请求失败',
+            content: obj.errMsg,
+          });
+        }
+      })
+      .then(d => {
+        //console.log(d);
+        let {
+          latitude,
+          longitude,
+          latitude: user_lat,
+          longitude: user_lon
+        } = d[0];
+        //console.log(d[0].regeocodeData.addressComponent);
+        var {
+          city
+        } = d[0].regeocodeData.addressComponent;
+        if (d[0].regeocodeData.addressComponent.city.length == 0) {
+          var {
+            province: city
+          } = d[0].regeocodeData.addressComponent;
+        }
+
+        let that = this;
+        let userInfo = wx.getStorageSync('userInfo');
+        let isLogin = wx.getStorageSync('isLogin');
+
+        this.setData({
+          city,
+          latitude,
+          longitude,
+          user_lat,
+          user_lon,
+          userInfo,
+          isLogin
+        });
+
+        //开始请求充电站信息
+        var chargStationType;
+        if (!userInfo.flag) {
+          //用户是普通用户
+          chargStationType = '2';
+        }
+        wx.request({
+          url: getApp().globalData.postHeadAgreement+'://cdgl.xinyhy.cn/restapi/wechat/chargStations',
+          data: {
+            lon: longitude,
+            lat: latitude,
+            distance: 10000,
+            chargStationType
+          },
+          method: 'POST',
+          success(res) {
+
+            //userInfo.flag = true;
+            if (isLogin && userInfo.flag) {
+              wx.request({
+                url: getApp().globalData.postHeadAgreement+'://cdgl.xinyhy.cn/restapi/wechat/userChargStations',
+                data: {
+                  userId: userInfo.userId,
+                  lat: latitude,
+                  lon: longitude
+                },
+                method: 'POST',
+                success(res1) {
+                  //console.log(res1);
+                  var myChargeStationsIds = '';
+                  res1.data.forEach((item, index) => {
+                    myChargeStationsIds += item.id + ",";
+                  });
+                  console.log(myChargeStationsIds);
+                  let {
+                    data
+                  } = res;
+                  let markers = [];
+                  data.forEach((item, index) => {
+                    //item.callout = {
+                    // content: item.name, //文本	String	1.2.0
+                    //  display: 'BYCLICK', //'BYCLICK': 点击显示; 'ALWAYS': 常显	String	1.2.0
+                    // textAlign: 'center' //文本对齐方式。有效值: left, right, center	String	1.6.0
+                    // };
+                    var iconPath = "/images/marker.png";
+                    if (myChargeStationsIds.indexOf(item.id + ',') != -1) {
+                      iconPath = "/images/marker1.png";
+                    }
+                    var marker = {
+                      name: item.chargStationName,
+                      address: item.address,
+                      width: "88rpx",
+                      height: "112rpx",
+                      iconPath: iconPath,
+                      id: item.id,
+                      callout: {},
+                      latitude: item.lat,
+                      longitude: item.lon,
+                      //distance: item.distance / 1000,
+                      distance: Util.distance(that.data.user_lat, that.data.user_lon, item.lat, item.lon),
+                      chargPileNum: item.fastCharg + item.slowCharg,
+                      fastCharg: item.fastCharg,
+                      slowCharg: item.slowCharg,
+                      freenum: item.freenum,
+                      fastfreenum: item.fastfreenum,
+                      slowfreenum: item.slowfreenum,
+                      breaknum: item.breaknum,
+                      /** 电费 */
+                      chargprice: item.chargprice,
+                      /** 服务费 */
+                      serviceprice: item.serviceprice,
+                      /** 停车费 */
+                      stopprice: item.stopprice
+                    };
+                    markers[index] = marker;
+                  });
+                  that.setData({
+                    markers,
+                    myChargeStationsIds
+                  });
+                }
+              });
+            } else {
+              let {
+                data
+              } = res;
+              let markers = [];
+              data.forEach((item, index) => {
+                //item.callout = {
+                // content: item.name, //文本	String	1.2.0
+                //  display: 'BYCLICK', //'BYCLICK': 点击显示; 'ALWAYS': 常显	String	1.2.0
+                // textAlign: 'center' //文本对齐方式。有效值: left, right, center	String	1.6.0
+                // };
+                var iconPath = "/images/marker.png";
+                var marker = {
+                  name: item.chargStationName,
+                  address: item.address,
+                  width: "88rpx",
+                  height: "112rpx",
+                  iconPath: iconPath,
+                  id: item.id,
+                  callout: {},
+                  latitude: item.lat,
+                  longitude: item.lon,
+                  //distance: item.distance / 1000,
+                  distance: Util.distance(that.data.user_lat, that.data.user_lon, item.lat, item.lon),
+                  chargPileNum: item.fastCharg + item.slowCharg,
+                  fastCharg: item.fastCharg,
+                  slowCharg: item.slowCharg,
+                  freenum: item.freenum,
+                  fastfreenum: item.fastfreenum,
+                  slowfreenum: item.slowfreenum,
+                  breaknum: item.breaknum,
+                  /** 电费 */
+                  chargprice: item.chargprice,
+                  /** 服务费 */
+                  serviceprice: item.serviceprice,
+                  /** 停车费 */
+                  stopprice: item.stopprice
+                };
+                markers[index] = marker;
+              });
+              that.setData({
+                markers
+              });
+            }
+          }
+        });
+      })
+      .catch(e => {
+        console.log(e);
+      });
+  },
+  //跳转个人中心
+  bindUserAvatarUrl() {
+    let url = `/pages/ucenter/index/index`;
+    wx.navigateTo({
+      url
+    });
+  },
+  //搜索
+  bindInput() {
+    var {
+      user_lat: latitude,
+      user_lon: longitude,
+      city
+    } = this.data;
+    //console.log(this.data.city);
+    let url = `/pages/inputtip/inputtip?city=${city}&lonlat=${longitude},${latitude}`;
+    wx.navigateTo({
+      url
+    });
+  },
+  //单击地图mark
+  makertap(e) {
+    mapregionchange_makertap = true;
+    //console.log(e);
+    let {
+      markerId
+    } = e;
+    //console.log({
+    //  markerId
+    //});
+    let {
+      markers
+    } = this.data;
+
+    markers.forEach((item, index) => {
+      item.iconPath = "/images/marker.png";
+      if (this.data.myChargeStationsIds.indexOf(item.id + ',') != -1) {
+        item.iconPath = "/images/marker1.png";
+      }
+      if (item.id == markerId) {
+        item.iconPath = "/images/marker_checked.png";
+        this.showMarkerInfo(item);
+      }
+    });
+    this.setData({
+      markers,
+      markerId
+    });
+  },
+  //将mark呈现在地图中心点,并弹出详细信息框
+  showMarkerInfo(data) {
+    let {
+      latitude,
+      longitude
+    } = data;
+    this.setData({
+      textData: data,
+      latitude: latitude,
+      longitude: longitude
+    })
+  },
+  //改变选中mark的颜色
+  changeMarkerColor(markerId) {
+    let {
+      markers
+    } = this.data;
+    markers.forEach((item, index) => {
+      item.iconPath = "/images/marker.png";
+      if (this.data.myChargeStationsIds.indexOf(item.id + ',') != -1) {
+        item.iconPath = "/images/marker1.png";
+      }
+      if (item.id == markerId) {
+        item.iconPath = "/images/marker_checked.png";
+      }
+    })
+    this.setData({
+      markers,
+      markerId
+    });
+  },
+  //导航
+  getRoute(e) {
+    //console.log(e);
+    // 起点
+    let {
+      user_lat: latitude,
+      user_lon: longitude,
+      markers,
+      markerId,
+      city,
+      textData
+    } = this.data;
+    let {
+      name,
+      address
+    } = textData;
+    if (!markers.length) return;
+    // 终点
+    markers.forEach((item, index) => {
+      if (markerId && markerId == item.id) {
+        let {
+          latitude: latitude2,
+          longitude: longitude2
+        } = item;
+        let url = `/pages/routes/routes?longitude=${longitude}&latitude=${latitude}&longitude2=${longitude2}&latitude2=${latitude2}&city=${city}&name=${name}&desc=${address}`;
+        //console.log(url);
+        wx.navigateTo({
+          url
+        });
+      }
+    });
+
+  },
+  //回到当前位置
+  click_location_control(e) {
+    //console.log("回到用户当前定位点");
+    let {
+      controlId
+    } = e;
+    let mpCtx = wx.createMapContext("map");
+    mpCtx.moveToLocation();
+  },
+  //打开扫一扫
+  click_scan_control(e) {
+    console.log("打开扫一扫");
+    if (!this.data.isLogin) {
+      let url = `/pages/login/login`;
+      wx.navigateTo({
+        url
+      });
+      return;
+    } else {
+      wx.request({
+        url: getApp().globalData.postHeadAgreement+'://cdgl.xinyhy.cn/restapi/pileLog/wechatsettlement',
+        data: {
+          userId: this.data.userInfo.userId
+        },
+        method: 'POST',
+        success(res) {
+          let {
+            data
+          } = res;
+          let {
+            result: order
+          } = data;
+          if (data && order && data.code == 200) {
+            wx.showModal({
+              showCancel: false,
+              content: '你有未支付的订单,请先支付',
+              success: function(res) {
+                console.log(res);
+                if (!res.cancel) {
+                  //点击确定
+                  let url = `/pages/order/order?orderid=${order.orderid}&userId=${order.userId}&chargPileId=${order.chargPileId}`;
+                  wx.navigateTo({
+                    url
+                  });
+                }
+              }
+            });
+            //console.log(that.data.result);
+          } else {
+            console.log('无订单');
+            //console.log("打开扫一扫");
+            wx.scanCode({
+              success: function(d) {
+                //console.log("完成扫一扫");
+                //console.log(d);
+                wx.request({
+                  url: getApp().globalData.postHeadAgreement+'://cdgl.xinyhy.cn/restapi/wechat/chargPile',
+                  data: d.result,
+                  method: 'POST',
+                  success(res) {
+                    console.log(res.data);
+                    if (!res.data) {
+                      //没有该充电桩信息
+                      wx.showModal({
+                        showCancel: false,
+                        content: '无效的终端编号'
+                      });
+                    } else {
+                      //充电状态0:离线、1:故障、2:空闲中、3:充电中、4:欠压故障、5:过压故障、6:过电流故障、8:预约、9:在线升级、10:操作中等
+                      if (!res.data.chargstatus || res.data.chargstatus == 0 || res.data.chargstatus == 1 || res.data.chargstatus == 4 || res.data.chargstatus == 5 || res.data.chargstatus == 6 || res.data.chargstatus == 9) {
+                        //充电桩故障
+                        wx.showModal({
+                          showCancel: false,
+                          content: '终端故障,维修中'
+                        });
+                      } else if (res.data.chargstatus == 3 || res.data.chargstatus == 8 || res.data.chargstatus == 10) {
+                        wx.showModal({
+                          showCancel: false,
+                          content: '正在充电中'
+                        });
+                      } else if (res.data.chargstatus == 2) {
+                        wx.setStorage({
+                          key: "scan_chargpile",
+                          data: res.data
+                        });
+                        let url = `/pages/scan_result/scan_result`;
+                        wx.navigateTo({
+                          url
+                        });
+                      }
+                    }
+                  }
+                });
+              }
+            });
+          }
+        }
+      });
+    }
+
+  },
+  //地图位移
+  mapchange(e) {
+    if (e.type == 'end') {
+      if (!mapregionchange_makertap) {
+        //console.log("移动地图");
+        let that = this;
+        let wMap = wx.createMapContext('map');
+        wMap.getCenterLocation({
+          type: 'gcj02',
+          success: function(res) {
+            let {
+              latitude,
+              longitude
+            } = res;
+            let userInfo = wx.getStorageSync('userInfo');
+            let isLogin = wx.getStorageSync('isLogin');
+            var chargStationType;
+            if (!userInfo.flag) {
+              //用户是普通用户
+              chargStationType = '2';
+            }
+            wx.request({
+              url: getApp().globalData.postHeadAgreement+'://cdgl.xinyhy.cn/restapi/wechat/chargStations',
+              data: {
+                lon: longitude,
+                lat: latitude,
+                distance: 10000,
+                chargStationType
+              },
+              method: 'POST',
+              success(res) {
+                let {
+                  data
+                } = res;
+                let markers = [];
+                var flag = false;
+                data.forEach((item, index) => {
+                  var iconPath;
+                  if (that.data.markerId && that.data.markerId == item.id) {
+                    iconPath = "/images/marker_checked.png";
+                    flag = true;
+                  } else {
+                    iconPath = "/images/marker.png";
+                    if (that.data.myChargeStationsIds.indexOf(item.id + ',') != -1) {
+                      iconPath = "/images/marker1.png";
+                    }
+                  }
+                  //console.log(Util.distance(that.data.user_lat, that.data.user_lon, item.lat, item.lon));
+                  var marker = {
+                    name: item.chargStationName,
+                    address: item.address,
+                    width: "88rpx",
+                    height: "112rpx",
+                    iconPath: iconPath,
+                    id: item.id,
+                    callout: {},
+                    latitude: item.lat,
+                    longitude: item.lon,
+                    //distance: item.distance / 1000,
+                    distance: Util.distance(that.data.user_lat, that.data.user_lon, item.lat, item.lon),
+                    chargPileNum: item.fastCharg + item.slowCharg,
+                    fastCharg: item.fastCharg,
+                    slowCharg: item.slowCharg,
+                    freenum: item.freenum,
+                    fastfreenum: item.fastfreenum,
+                    slowfreenum: item.slowfreenum,
+                    breaknum: item.breaknum,
+                    /** 电费 */
+                    chargprice: item.chargprice,
+                    /** 服务费 */
+                    serviceprice: item.serviceprice,
+                    /** 停车费 */
+                    stopprice: item.stopprice
+                  };
+                  markers[index] = marker;
+                });
+                if (!flag) {
+                  that.setData({
+                    textData: null,
+                    markerId: null,
+                  });
+                }
+                that.setData({
+                  markers: markers
+                });
+              }
+            });
+          }
+        });
+      } else {
+        //点击marker的情况下
+        //console.log("点击marker");
+        mapregionchange_makertap = false;
+      }
+    }
+  },
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+    let userInfo = wx.getStorageSync('userInfo');
+    let isLogin = wx.getStorageSync('isLogin');
+
+    // 页面显示
+    if (userInfo && isLogin) {
+      //console.log(userInfo);
+      //userInfo.flag = true;
+      this.setData({
+        userInfo: userInfo,
+        isLogin: isLogin
+      });
+
+      wx.request({
+        url: getApp().globalData.postHeadAgreement +'://cdgl.xinyhy.cn/restapi/pileLog/wechatchargstatus',
+        data: {
+          userId: userInfo.userId
+        },
+        method: 'POST',
+        success(res) {
+          let {
+            data
+          } = res;
+          if (data && data.code == 200) {
+            //获取用户正在充电的订单,并跳转到该页面
+            let url = `/pages/charging/charging?orderid=${data.result.orderid}&userId=${userInfo.userId}&chargPileId=${data.result.chargPileId}`;
+            //let url = `/pages/charging/charging?userId=${userInfo.userId}`;
+            wx.navigateTo({
+              url
+            });
+          } else {
+            console.log(res);
+          }
+        }
+      });
+    } else {
+      //未登录信息
+      this.setData({
+        userInfo: {}
+      });
+    }
+  }
+})

+ 3 - 0
pages/index/index.json

@@ -0,0 +1,3 @@
+{
+    "navigationBarTitleText": "派捷充电"
+}

+ 52 - 0
pages/index/index.wxml

@@ -0,0 +1,52 @@
+<view class='container'>
+  <view class="section">
+    <view class="userAvatarUrl" bindtap="bindUserAvatarUrl">
+      <!-- <open-data type='userAvatarUrl'></open-data> -->
+      <image src='{{isLogin?userInfo.avatar:"/images/user.png"}}'></image>
+    </view>
+    <!-- <input bindtouchstart="bindInput" placeholder="搜索位置查找附近的充电桩" value="{{keywords.name}}" /> -->
+    <!-- <input bindtouchstart="bindInput" placeholder="搜索充电桩" value="{{keywords}}" /> -->
+    <view class='input' bindtap="bindInput">{{keywords}}</view>
+  </view>
+  <view class="{{textData.name?userInfo.flag?'map_container1':'map_container':'map_container_big'}}">
+    <map class="map" id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="16" show-location="true" markers="{{markers}}" bindmarkertap="makertap" bindregionchange="mapchange" polygon="{{polygon}}">
+      <cover-view class='map_location' bindtap='click_location_control' hover-class='map_location_hover'>
+        <cover-image src='/images/circle1.png'></cover-image>
+      </cover-view>
+      <cover-view class='map_scan' wx:if="{{!userInfo.flag}}" bindtap='click_scan_control'  hover-class='map_scan_hover'>
+        <cover-image src='/images/scan.png' ></cover-image>
+      </cover-view>
+    </map>
+  </view>
+
+  <view class="{{userInfo.flag?'map_text1':'map_text'}}" hover-class='active' wx:if="{{textData}}">
+    <!-- <view class="map-1" bindtap="getRoute">
+      <image src="/images/jt.png"></image>
+      <view>路线</view>
+    </view> -->
+    <view class='charging_text_title'>
+      <view class='charging'>
+        <image src='/images/charging1.png'></image>
+      </view>
+      <view class='charging_text_title1'>
+        <text class='bold'>{{textData.name}}</text>
+        <text class="h1">{{textData.address}}</text>
+      </view>
+      <text class="h1 right">{{textData.distance}}km</text>
+    </view>
+    <view style='line-height:0;'>
+      <text decode='true' class='inline' wx:if="{{userInfo.flag}}">电桩数:{{textData.chargPileNum}}</text>
+      <text decode='true' class='inline' wx:if="{{!userInfo.flag}}">电桩数:{{textData.chargPileNum}}&nbsp;&nbsp;&nbsp;&nbsp;空闲数:</text>
+      <text class='fast inline' wx:if="{{!userInfo.flag}}" decode='true'>快{{textData.fastfreenum==null?0:textData.fastfreenum}}&nbsp;&nbsp;</text>
+      <text class='slow inline' wx:if="{{!userInfo.flag}}">慢{{textData.slowfreenum==null?0:textData.slowfreenum}}</text>
+    </view>
+    <text class='fast'>快桩数:{{textData.fastCharg==null?0:textData.fastCharg}}</text>
+    <text class='slow'>慢桩数:{{textData.slowCharg==null?0:textData.slowCharg}}</text>
+    <text class='inline' wx:if="{{userInfo.flag}}">当前故障桩:</text><text class='red inline' wx:if="{{userInfo.flag}}">{{textData.breaknum==null?0:textData.breaknum}}</text>
+    <text  wx:if="{{!userInfo.flag}}">参考电价:{{textData.chargprice}}元/度</text>
+    <text decode='true'  wx:if="{{!userInfo.flag}}">服务费:{{textData.serviceprice}}元/次&nbsp;&nbsp;&nbsp;&nbsp;停车费:{{textData.stopprice}}元/小时</text>
+    <view class='navigation' bindtap="getRoute">
+      <image src='/images/navigation.png'></image>
+    </view>
+  </view>
+</view>

+ 230 - 0
pages/index/index.wxss

@@ -0,0 +1,230 @@
+.section {
+  height: 89rpx;
+  width: 100%;
+  display: flex;
+}
+
+.userAvatarUrl {
+  flex-shrink: 0;
+  height: 66rpx;
+  width: 66rpx;
+  border-radius: 50%;
+  margin: 11rpx;
+  overflow: hidden;
+}
+
+.userAvatarUrl image {
+  height: 66rpx;
+  width: 66rpx;
+}
+
+.section .input {
+  width: 100%;
+  margin: 24rpx auto;
+  height: 40rpx;
+  min-height: 40rpx;
+  line-height: 40rpx;
+  font-size: 28rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #a0a0a0;
+  padding: 0 30rpx;
+  border-left: 1rpx solid #dfdfdf;
+}
+
+.map_container {
+  position: absolute;
+  top: 89rpx;
+  bottom: 325rpx;
+  left: 0;
+  right: 0;
+}
+.map_container1 {
+  position: absolute;
+  top: 89rpx;
+  bottom: 290rpx;
+  left: 0;
+  right: 0;
+}
+
+.map_container_big {
+  position: absolute;
+  top: 89rpx;
+  bottom: 0;
+  left: 0;
+  right: 0;
+}
+
+.map {
+  width: 100%;
+  height: 100%;
+}
+
+.map_location {
+  position: absolute;
+  left: 30rpx;
+  bottom: 110rpx;
+  width: 80rpx;
+  height: 80rpx;
+}
+
+.map_location_hover{
+  transform: scale(0.8, 0.8);
+}
+.map_scan {
+  position: absolute;
+  width: 210rpx;
+  height: 80rpx;
+  bottom: 110rpx;
+  left: 270rpx;
+}
+/*
+.map_scan_hover{
+  margin: 8rpx 21rpx;
+  width: 168rpx;
+  height: 64rpx;
+}*/
+.map_text {
+  position: absolute;
+  left: 0;
+  right: 0;
+  bottom: 0px;
+  height: 325rpx;
+  background: #fff;
+  padding: 0 30rpx;
+}
+.map_text1 {
+  position: absolute;
+  left: 0;
+  right: 0;
+  bottom: 0px;
+  height: 290rpx;
+  background: #fff;
+  padding: 0 30rpx;
+}
+.map_text.active,map_text1.active{
+  background-color: #ebebeb;
+}
+
+.charging_text_title {
+  height: 105rpx;
+  width: 100%;
+  display: flex;
+}
+.charging_text_title1 {
+  width: 100%;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+.charging {
+  width: 45rpx;
+  height: 45rpx;
+  margin: 30rpx 30rpx 30rpx 0;
+  flex-shrink: 0;
+  overflow: hidden;
+}
+
+.charging image {
+  width: 45rpx;
+  height: 45rpx;
+}
+
+.navigation {
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  margin: 30rpx;
+  width: 64rpx;
+  height: 64rpx;
+}
+
+.navigation image {
+  width: 64rpx;
+  height: 64rpx;
+}
+
+text {
+  margin: 0 0 20rpx 0;
+  display: block;
+  font-size: 24rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #545253;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  line-height: 24rpx;
+  height: 24rpx;
+  min-height: 24rpx;
+}
+
+text.bold {
+  font-weight: bold;
+  line-height: 24rpx;
+  height: 24rpx;
+  min-height: 24rpx;
+  margin-top: 30rpx;
+  margin-bottom: 1rpx;
+  display: block;
+}
+text.inline{
+ display: inline-block;
+}
+text.fast {
+  color: #2483c0;
+}
+text.slow {
+  color: #42b9b4;
+}
+text.red {
+  color: red;
+}
+
+.h1 {
+  margin: 0rpx 0rpx 30rpx 0rpx;
+  font-size: 20rpx;
+  line-height: 20rpx;
+  height: 20rpx;
+  min-height: 20rpx;
+  color: #959595;
+}
+.h1.right {
+  margin:55rpx 0rpx 30rpx 30rpx;
+  flex-shrink: 0;
+  float: right;
+}
+
+/*
+.map-1 {
+  width: 60px;
+  height: 60px;
+  border-radius: 30px;
+  background-color: #4d8ad7;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  color: #fff;
+  font-size: 15px;
+  position: absolute;
+  top: 10px;
+  right: 10px;
+}
+
+.map-1 image {
+  width: 24px;
+  height: 32px;
+}
+*/

+ 13 - 0
pages/info/info.js

@@ -0,0 +1,13 @@
+//logs.js
+let util = require('../../utils/util.js');
+let wechat = require("../../utils/wechat");
+let amap = require("../../utils/amap");
+Page({
+  data: {
+    steps: [],
+  },
+  onLoad() {
+    let steps = wx.getStorageSync("steps");
+    this.setData({ steps })
+  },
+});

+ 3 - 0
pages/info/info.json

@@ -0,0 +1,3 @@
+{
+    "navigationBarTitleText": "详情"
+}

+ 3 - 0
pages/info/info.wxml

@@ -0,0 +1,3 @@
+<view class="text_box" wx:for="{{steps}}" wx:key="key">
+  {{item.instruction}}
+</view>

+ 24 - 0
pages/info/info.wxss

@@ -0,0 +1,24 @@
+.flex-style{
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+}
+.flex-item{
+  height: 35px; 
+  line-height: 35px;
+  text-align: center;
+  -webkit-box-flex: 1;
+  -webkit-flex: 1;
+  flex: 1
+}
+.flex-item.active{
+  color:#0091ff;
+}
+.text_box{
+  margin: 0 15px;
+  padding: 15px 0;
+  border-bottom: 1px solid #c3c3c3;
+  font-size: 13px;
+}
+.text_box .text_item{display:inline-block;line-height: 8px;}
+

+ 137 - 0
pages/inputtip/inputtip.js

@@ -0,0 +1,137 @@
+//logs.js
+let util = require('../../utils/util.js');
+let wechat = require("../../utils/wechat");
+let amap = require("../../utils/amap");
+Page({
+  data: {
+    lonlat: "",
+    city: "",
+    longitude: null,
+    latitude: null,
+    tips: [],
+    searchString: null
+  },
+  onLoad(e) {
+    let {
+      lonlat,
+      city
+    } = e;
+    var longitude = lonlat.split(",")[0];
+    var latitude = lonlat.split(",")[1];
+    console.log({
+      lonlat,
+      longitude,
+      latitude,
+      city
+    });
+    this.setData({
+      lonlat,
+      longitude,
+      latitude,
+      city
+    })
+  },
+  bindInput2(e) {
+
+    let {
+      value
+    } = e.detail;
+    let {
+      lonlat,
+      city
+    } = this.data;
+    amap.getInputtips(city, lonlat, value)
+      .then(d => {
+        //console.log(d);
+        if (d && d.tips) {
+          this.setData({
+            tips: d.tips
+          });
+        }
+      })
+      .catch(e => {
+        console.log(e);
+      })
+  },
+  bindInput(e) {
+    this.setData({
+      searchString: e.detail.value
+    });
+  },
+  bindSearch2(e) {
+    let {
+      keywords
+    } = e.currentTarget.dataset;
+    let pages = getCurrentPages();
+    let prevPage = pages[0]; //首页
+    //console.log(pages);
+    //console.log(e);
+    console.log(keywords);
+    if (keywords) {
+      prevPage.setData({
+        keywords
+      });
+      console.log(keywords.name, keywords.location);
+      //amap.getPoiAround(keywords.name, keywords.location)
+      //.then(d => {
+      //  console.log(d);
+      //  let {
+      //    markers
+      //  } = d;
+      //  markers.forEach((item, index) => {
+      //    item.callout = {}; //marker绑定点击事件后,导致气泡一闪一闪,不想显示
+      //    item.iconPath = "/images/marker.png";
+      //    item.width = '88rpx';
+      //    item.height = '112rpx';
+      //    item.address = d.poisData[index].cityname + d.poisData[index].adname + d.poisData[index].address;
+      //  })
+      //  prevPage.setData({
+      //    markers
+      //  });
+      //  prevPage.showMarkerInfo(markers[0]);
+      //  prevPage.changeMarkerColor(0);
+      //})
+      //.catch(e => {
+      //  console.log(e);
+      //})
+    }
+    //let url = `/pages/index/index`;
+    //wx.navigateBack({
+    //  url
+    // });
+    let {
+      city,
+      longitude,
+      latitude
+    } = this.data;
+    let url = `/pages/search_result/search_result?city=${city}&longitude=${longitude}&latitude=${latitude}&name=${keywords.name}&location=${keywords.location}`;
+    wx.navigateTo({
+      url
+    });
+  },
+  bindSearch(e) {
+    let {
+      searchString: keywords
+    } = this.data;
+    let pages = getCurrentPages();
+    let prevPage = pages[0]; //首页
+    if (keywords) {
+      prevPage.setData({
+        keywords
+      });
+      let {
+        city,
+        longitude,
+        latitude
+      } = this.data;
+      let url = `/pages/search_result/search_result?city=${city}&longitude=${longitude}&latitude=${latitude}&searchString=${keywords}`;
+      wx.navigateTo({
+        url
+      });
+    }
+  },
+  cancel(e) {
+    console.log(e);
+    wx.navigateBack();
+  }
+});

+ 3 - 0
pages/inputtip/inputtip.json

@@ -0,0 +1,3 @@
+{
+    "navigationBarTitleText": "搜索"
+}

+ 21 - 0
pages/inputtip/inputtip.wxml

@@ -0,0 +1,21 @@
+<view class="section">
+  <view class='search_icon' hover-class='active' bindtap='bindSearch'>
+    <!-- <icon type="search" size="20" /> -->
+    <image src='/images/search.png'></image>
+  </view>
+  <input type='text' placeholder-class="section_phcolor" placeholder="请输入搜索内容" focus="true" confirm-type='search' bindinput="bindInput" bindconfirm="bindSearch" />
+  <view class='cancel' bindtap='cancel'>取消</view>
+</view>
+<scroll-view class='context' scroll-y='true' wx:if="{{tips.length!=0}}">
+  <view bindtap="bindSearch2" data-keywords="{{item}}" class="text_box" hover-class='active' wx:for="{{tips}}" wx:key="key" wx:if="{{item.location.length!=0}}">
+    <view class='search'>
+      <image src='/images/search.png'></image>
+    </view>
+    <view class='text_context'>
+      <text class='bold'>{{item.name}}</text>
+      <text class="h1">{{item.district}}{{item.address}}</text>
+    </view>
+    <text class="right">附近的充电站</text>
+  </view>
+</scroll-view>
+<view class='no_result' bindtap='bindSearch' wx:if="{{tips.length==0}}">没有搜索结果</view>

+ 157 - 0
pages/inputtip/inputtip.wxss

@@ -0,0 +1,157 @@
+page {
+  height: 100%;
+  overflow-y: hidden;
+}
+
+.section {
+  height: 89rpx;
+  width: 100%;
+  display: flex;
+  border-bottom: 1px solid #eee;
+}
+
+.search_icon {
+  flex-shrink: 0;
+  padding: 24rpx;
+}
+
+.search_icon.active {
+  background-color: #f4f4f4;
+}
+
+.search_icon image {
+  width: 40rpx;
+  height: 40rpx;
+}
+
+.section input {
+  width: 100%;
+  margin: 20rpx auto;
+  background-color: #f4f4f4;
+  color: #545253;
+  height: 48rpx;
+  line-height: 48rpx;
+  min-height: 48rpx;
+  border-radius: 24rpx;
+  padding: 0 24rpx;
+  font-size: 24rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+
+.section_phcolor {
+  color: #b5b5b5;
+}
+
+.cancel {
+  flex-shrink: 0;
+  width: 56rpx;
+  height: 28rpx;
+  line-height: 28rpx;
+  min-height: 28rpx;
+  padding: 30rpx 24rpx;
+  font-size: 28rpx;
+  color: #b4b4b4;
+}
+
+.no_result {
+  width: 100%;
+  height: 100%;
+  padding-top: 60%;
+  color: #dcdcdc;
+  text-align: center;
+  vertical-align: center;
+  font-size: 24rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+
+.context {
+  height: calc(100% - 90rpx);
+}
+
+.text_box {
+  width: 100%;
+  border-bottom: 1px solid #eee;
+  display: flex;
+}
+
+.text_box.active {
+  background-color: #ebebeb;
+}
+
+.text_box .search {
+  width: 40rpx;
+  height: 40rpx;
+  margin: 24rpx;
+  flex-shrink: 0;
+}
+
+.text_box .search image {
+  width: 40rpx;
+  height: 40rpx;
+}
+
+.text_context {
+  width: 100%;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+text {
+  margin: 0 0 20rpx 0;
+  display: block;
+  font-size: 24rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #545253;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  line-height: 24rpx;
+  height: 24rpx;
+  min-height: 24rpx;
+  min-width: 0;
+}
+
+text.bold {
+  font-weight: bold;
+  line-height: 24rpx;
+  height: 24rpx;
+  min-height: 24rpx;
+  margin-top: 30rpx;
+  margin-bottom: 10rpx;
+}
+
+text.h1 {
+  margin: 0rpx 0rpx 30rpx 0rpx;
+  font-size: 20rpx;
+  line-height: 20rpx;
+  height: 20rpx;
+  min-height: 20rpx;
+  color: #959595;
+}
+
+.right {
+  margin: 30rpx;
+  width: 144rpx;
+  flex-shrink: 0;
+  float: right;
+  color: #b5b5b5;
+}

+ 144 - 0
pages/login/login.js

@@ -0,0 +1,144 @@
+// pages/login/login.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    loginName: null,
+    password: null,
+    checkPass: false,
+    errorMsg: ''
+  },
+  inputAccount(e) {
+    this.setData({
+      loginName: e.detail.value
+    });
+    //console.log(e);
+    if (this.data.loginName && this.data.password) {
+      this.setData({
+        checkPass: true
+      });
+    } else {
+      this.setData({
+        checkPass: false
+      });
+    }
+
+  },
+  inputPassword(e) {
+    this.setData({
+      password: e.detail.value
+    });
+    //console.log(e);
+    if (this.data.loginName && this.data.password) {
+      this.setData({
+        checkPass: true
+      });
+    } else {
+      this.setData({
+        checkPass: false
+      });
+    }
+  },
+  loginUser(e) {
+    let that = this;
+    let { loginName, password } = this.data;
+    wx.request({
+      url: getApp().globalData.postHeadAgreement +'://cdgl.xinyhy.cn/restapi/wechat/login',
+      data: {
+        loginName,
+        password
+      },
+      method: 'POST',
+      success(res) {
+        //console.log(res1);
+        //console.log(res1.data.code == 1);
+        if (res.data.code == 1) {
+          that.setData({
+            errorMsg: res.data.msg
+          })
+        } else {
+          //返回该用户
+          //跳转到上一页
+          wx.setStorageSync("userInfo", res.data);
+          wx.setStorageSync("isLogin", true);
+          //let url = `/pages/ucenter/index/index`;
+          wx.navigateBack();
+          //wx.redirectTo({
+          // url
+          //});
+        }
+      }
+    });
+  },
+  goToRegister(e) {
+    console.log(e);
+    let url = '/pages/register/register';
+    wx.redirectTo({
+      url
+    })
+  },
+  goToForget(e){
+    console.log(e);
+    let url = '/pages/forget/forget';
+    wx.redirectTo({
+      url
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 4 - 0
pages/login/login.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "登录"
+}

+ 20 - 0
pages/login/login.wxml

@@ -0,0 +1,20 @@
+<!--pages/login/login.wxml-->
+<view class='main'>
+  <image class='main_image' src='/images/login.png'></image>
+  <view class='context'>
+    <view class='context_input'>
+      <view class='input_view'>
+        <image class='account_img' src='/images/account.png'></image>
+        <input placeholder='请输入您的账号' bindinput='inputAccount' maxlength='16' focus='true' placeholder-class='placeholder'></input>
+      </view>
+      <view class='input_view'>
+        <image class='password_img' src='/images/password.png'></image>
+        <input placeholder='请输入您的密码' maxlength='16' bindinput='inputPassword'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?'loginUser':''}}" >登录</button>
+    <text class='forget_view'  bindtap='goToForget'>忘记密码</text>
+    <view class='register_view' hover-class='active' bindtap='goToRegister'><text>注册账户</text></view>
+  </view>
+</view>

+ 172 - 0
pages/login/login.wxss

@@ -0,0 +1,172 @@
+/* pages/login/login.wxss */
+
+.main {
+  height: 100%;
+  width: 100%;
+  position: relative;
+}
+
+.main_image {
+  height: 1344rpx;
+  width: 750rpx;
+  margin-top: -128rpx;
+}
+
+.main .context {
+  height: 100%;
+  width: 100%;
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.context_input {
+  margin-top: 450rpx;
+  margin-right: 32rpx;
+  margin-left: 32rpx;
+  margin-bottom: 30rpx;
+}
+
+.account_img {
+  width: 26rpx;
+  height: 32rpx;
+  margin: 28rpx 32rpx 28rpx 0;
+}
+
+.password_img {
+  width: 24rpx;
+  height: 30rpx;
+  margin: 27rpx 34rpx 27rpx 0;
+}
+
+.context_input .input_view {
+  border-bottom: 1rpx solid #f1f1f1;
+}
+
+.context_input input {
+  width: calc(100% - 58rpx);
+  display: inline-block;
+  font-size: 32rpx;
+  height: 88rppx;
+  line-height: 88rpx;
+  min-height: 88rpx;
+  color: #434343;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+
+.context_input .placeholder {
+  color: #c9c9c9;
+  font-size: 32rpx;
+  height: 88rppx;
+  line-height: 88rpx;
+  min-height: 88rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+
+.errorMsg {
+  height: 28rpx;
+  margin: 0rpx 32rpx 32rpx 30rpx;
+  font-size: 28rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: red;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.login_button {
+  width: calc(100% - 62rpx);
+  font-size: 32rpx;
+  margin: 0rpx 32rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #fff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #83c4ee;
+}
+
+.login_button_disable {
+  width: calc(100% - 62rpx);
+  font-size: 32rpx;
+  margin: 0rpx 32rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #fff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #c9c9c9;
+}
+
+.login_button.button-hover {
+  background-color: #76b1d8;
+}
+.forget_view {
+  margin: 0rpx 32rpx;
+  width: 240rpx;
+  height: 48rpx;
+  color: #2483c0;
+  font-size: 24rpx;
+  line-height: 48rpx;
+  text-align: left;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+.register_view {
+  width: 240rpx;
+  height: 48rpx;
+  position: absolute;
+  bottom: 88rpx;
+  left: 375rpx;
+  margin-left: -120rpx;
+  border-radius: 24rpx;
+  border: 1rpx solid #83c4ee;
+  color: #2483c0;
+  font-size: 24rpx;
+  line-height: 48rpx;
+  text-align: center;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+
+.register_view.active {
+  color: #fff;
+  background-color: #83c4ee;
+}

+ 259 - 0
pages/order/order.js

@@ -0,0 +1,259 @@
+// pages/order/order.js
+let Util = require("../../utils/util");
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    orderid: null,
+    userId: null,
+    chargPileId: null,
+    order: null,
+    startTime: null,
+    endTime: null,
+    totalTime: null,
+    orderFlag:false
+  },
+
+  payOrder(e) {
+    console.log('去支付');
+    console.log(this.order);
+    let that = this;
+    let {
+      order,
+      userId
+    } = this.data;
+    wx.login({
+      success(res) {
+        console.log(res);
+        if (res.code) {
+          // 发起网络请求
+          wx.request({
+            url: getApp().globalData.postHeadAgreement +'://cdgl.xinyhy.cn/restapi/wechatpay/chargpayfor',
+            data: {
+              outTradeNo: order.orderid, //订单号
+              totalFee: order.chargallmoney, //钱
+              code: res.code,
+              user_id: userId
+            },
+            method: 'POST',
+            header: {
+              'content-type': 'application/x-www-form-urlencoded;charset=utf-8',
+            },
+            success(res1) {
+              let {
+                data
+              } = res1;
+              console.log(res1);
+              if (data && data.code == 200) {
+                if (data.result) {
+                  //wx.showModal({
+                  //  showCancel: false,
+                  //  content: '请微信支付'
+                  // });
+                  wx.requestPayment({
+                    timeStamp: data.result.timeStamp,
+                    nonceStr: data.result.nonceStr,
+                    package: data.result.package,
+                    signType: data.result.signType,
+                    paySign: data.result.paySign,
+                    success(res2) {
+                      wx.request({
+                        url: getApp().globalData.postHeadAgreement +'://cdgl.xinyhy.cn/restapi/pileLog/wechatpayback',
+                        data: {
+                          //chargPileId,
+                          //userId,
+                          orderid: order.orderid
+                        },
+                        method: 'POST',
+                        success(res3) {
+                          let {
+                            data
+                          } = res3;
+                          if (data && data.code == 200) {
+                            that.setData({
+                              orderFlag:true 
+                            });
+                            wx.showModal({
+                              showCancel: false,
+                              content: '支付订单成功'
+                            });
+                          } else {
+                            wx.showModal({
+                              showCancel: false,
+                              content: '支付订单失败'
+                            });
+                          }
+                        }
+                      });
+                    },
+                    fail(res3) {
+                      console.log(res3);
+                    }
+                  });
+                } else {
+                  that.setData({
+                    orderFlag: true
+                  });
+                  wx.showModal({
+                    showCancel: false,
+                    content: '支付订单成功'
+                  });
+                }
+              } else {
+                wx.showModal({
+                  showCancel: false,
+                  content: '支付订单失败'
+                });
+              }
+            }
+          });
+        } else {
+          console.log('登录失败!' + res.errMsg)
+        }
+      }
+    });
+
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    let i = 0;
+    let {
+      orderid,
+      userId,
+      chargPileId
+    } = options;
+    this.setData({
+      orderid,
+      userId,
+      chargPileId
+    });
+    var that = this;
+    wx.showLoading({
+      title: '订单生成中...',
+      mask:true
+    });
+    var timeoutflag = setInterval(function() {
+        i++;
+        wx.request({
+          url: getApp().globalData.postHeadAgreement +'://cdgl.xinyhy.cn/restapi/pileLog/wechatsettlement',
+          data: {
+            chargPileId,
+            userId,
+            orderid
+          },
+          method: 'POST',
+          success(res) {
+            let {
+              data
+            } = res;
+            let {
+              result: order
+            } = data;
+            if (data && data.code == 200) {
+              if (order.transstatus==3){
+                wx.hideLoading();
+                clearInterval(timeoutflag);
+              }
+              // if (order.chargallmoney && order.chargpower) {
+              //   wx.hideLoading();
+              //   clearInterval(timeoutflag);
+              // }
+              //wx.showModal({
+              //showCancel: false,
+              //content: '获取订单成功'
+              //});
+              var startDate = new Date(order.chargstarttime);
+              var endDate = new Date(order.chargendtime);
+              var totalTime = Math.floor((endDate.getTime() - startDate.getTime()) / 60000);
+              var totalTimeHour = Math.floor(totalTime / 60);
+              var totalTimeMinute = totalTime % 60;
+              var startTime = Util.formatNumber(startDate.getMonth() + 1) + '月' + Util.formatNumber(startDate.getDate()) + '日  ' + Util.formatNumber(startDate.getHours()) + ':' + Util.formatNumber(startDate.getMinutes()) + ':' + Util.formatNumber(startDate.getSeconds());
+              var endTime = Util.formatNumber(endDate.getMonth() + 1) + '月' + Util.formatNumber(endDate.getDate()) + '日  ' + Util.formatNumber(endDate.getHours()) + ':' + Util.formatNumber(endDate.getMinutes()) + ':' + Util.formatNumber(endDate.getSeconds());
+              totalTime = Util.formatNumber(totalTimeHour) + "时" + Util.formatNumber(totalTimeMinute) + "分";
+              that.setData({
+                order,
+                startTime,
+                endTime,
+                totalTime
+              });
+
+              //console.log(that.data.result);
+
+            } else {
+              //wx.hideLoading();
+              if (i>=60){
+                clearInterval(timeoutflag);
+                wx.showModal({
+                  showCancel: false,
+                  content: '获取订单失败'
+                });
+              }
+            }
+          },
+          fail(err) {
+            wx.hideLoading();
+            clearInterval(timeoutflag);
+            wx.showModal({
+              showCancel: false,
+              content: '获取订单失败'
+            });
+          }
+        });
+      },
+      1000);
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 6 - 0
pages/order/order.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "充电详情",
+  "navigationBarBackgroundColor": "#31d197"
+  
+}

+ 68 - 0
pages/order/order.wxml

@@ -0,0 +1,68 @@
+<!--pages/order/order.wxml-->
+<view class="map_text" wx:if="{{order}}" hover-class='active'>
+  <!-- <view class="map-1" bindtap="getRoute">
+      <image src="/images/jt.png"></image>
+      <view>路线</view>
+    </view> -->
+  <view class='charging_text_title'>
+    <view class='charging'>
+      <image src='/images/charging2.png'></image>
+    </view>
+    <view class='charging_text_title1'>
+      <text class='bold'>{{order.chargStation.chargStationName}}</text>
+      <text class="h1">{{order.chargPile.chargPileName}}</text>
+    </view>
+  </view>
+  <text>终端编号:{{chargPileId}}</text>
+  <view class="table">
+    <view class="tr title">
+      <view class="th">
+        <text>{{startTime}}</text>
+        <text>开始充电</text>
+      </view>
+      <view class="th center">
+        <text>——</text>
+      </view>
+      <view class="th">
+        <text>{{endTime}}</text>
+        <text>结束充电</text>
+      </view>
+    </view>
+    <view class="tr">
+      <view class="td">
+        <text>{{order.chargallmoney}}元</text>
+        <text>总费用</text>
+      </view>
+      <view class="td center">
+        <text>{{order.chargpower}}度</text>
+        <text>总电量</text>
+      </view>
+      <view class="td">
+        <text>{{totalTime}}</text>
+        <text>总时长</text>
+      </view>
+    </view>
+  </view>
+  <!--<text class="info_title">费用明细</text>
+  <view class="info">
+    <text>21:00-24:00充电15.98度</text>
+    <text>电费:20.66元(1.3元/度)</text>
+    <text>服务费:9.53元(0.06元/度)</text>
+  </view>
+  <view class="info">
+    <text>21:00-24:00充电15.98度</text>
+    <text>电费:20.66元(1.3元/度)</text>
+    <text>服务费:9.53元(0.06元/度)</text>
+  </view>
+  <text class="info_title">代金券</text>
+  <view class="info_view" hover-class='active'>
+
+    <view class="zan-text">
+      <text>2张(可用)</text>
+    </view>
+    <view class="zan-ft">
+      <image src='/images/enter.png'></image>
+    </view>
+  </view>-->
+</view>
+<button class='{{orderFlag?"pay_button1":"pay_button"}}' wx:if="{{order}}" bindtap="{{orderFlag?'':'payOrder'}}">去支付</button>

+ 222 - 0
pages/order/order.wxss

@@ -0,0 +1,222 @@
+/* pages/order/order.wxss */
+
+page {
+  background-color: #f4f4f4;
+  height: 100%;
+  overflow-y: hidden;
+}
+
+view.inline {
+  display: inline-block;
+  vertical-align: middle;
+  line-height: 28rpx;
+  height: 28rpx;
+  min-height: 28rpx;
+}
+
+.map_text {
+  position: relative;
+  height: calc(100% - 210rpx);
+  background: #fff;
+  padding: 0 30rpx;
+  margin: 30rpx 20rpx 50rpx 20rpx;
+  border-radius: 20rpx;
+  box-shadow: 0rpx 4rpx 4rpx #d5d5d5;
+}
+/*
+.map_text.active {
+  background-color: #ebebeb;
+}
+*/
+.charging_text_title {
+  height: 105rpx;
+  width: 100%;
+  display: flex;
+}
+
+.charging_text_title1 {
+  width: 100%;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+.charging {
+  width: 45rpx;
+  height: 45rpx;
+  margin: 30rpx 30rpx 30rpx 0;
+  flex-shrink: 0;
+  overflow: hidden;
+}
+
+.charging image {
+  width: 45rpx;
+  height: 45rpx;
+}
+
+text {
+  margin: 0 0 20rpx 0;
+  display: block;
+  font-size: 24rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #545253;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  line-height: 24rpx;
+  height: 24rpx;
+  min-height: 24rpx;
+}
+
+text.bold {
+  font-weight: bold;
+  line-height: 24rpx;
+  height: 24rpx;
+  min-height: 24rpx;
+  margin-top: 30rpx;
+  margin-bottom: 1rpx;
+  display: block;
+}
+
+text.inline {
+  display: inline-block;
+  color: #959595;
+}
+
+.h1 {
+  margin: 0rpx 0rpx 30rpx 0rpx;
+  font-size: 20rpx;
+  line-height: 20rpx;
+  height: 20rpx;
+  min-height: 20rpx;
+  color: #959595;
+}
+
+.pay_button {
+  font-size: 32rpx;
+  margin: 50rpx 30rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #fff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #f18e19;
+}
+
+.pay_button.button-hover {
+  background-color: #31d197;
+}
+
+.pay_button1 {
+  font-size: 32rpx;
+  margin: 50rpx 30rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #fff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #c9c9c9;
+}
+
+.table {
+  border-bottom: 1rpx solid #f2f2f2;
+  margin-bottom: 20rpx;
+}
+
+.tr {
+  display: flex;
+  width: calc(100% - 40rpx);
+  justify-content: center;
+  align-items: center;
+  padding: 20rpx 20rpx 0 20rpx;
+}
+
+.tr.title {
+  background-color: #f8f8f8;
+}
+
+.td {
+  width: 40%;
+  justify-content: center;
+  text-align: center;
+  margin-bottom: 20rpx;
+}
+
+.td.center {
+  border-right: 1rpx solid #f2f2f2;
+  border-left: 1rpx solid #f2f2f2;
+}
+
+.td text {
+  color: #959595;
+}
+
+.th {
+  width: 40%;
+  justify-content: center;
+  text-align: center;
+}
+
+.th.center text {
+  font-weight: bold;
+  color: #d0d0d0;
+}
+
+.info_title {
+  color: #646263;
+  font-weight: bold;
+}
+
+.info {
+  margin-bottom: 20rpx;
+  border-bottom: 1rpx solid #f2f2f2;
+}
+
+.info text {
+  color: #959595;
+}
+
+.info_view {
+  border-top: 1rpx solid #f2f2f2;
+  border-bottom: 1rpx solid #f2f2f2;
+  display: flex;
+}
+
+.info_view.active {
+  background-color: #f8f8f8;
+}
+
+.info_view text {
+  margin-top: 20rpx;
+  color: #959595;
+}
+.zan-text{
+  width:100%;
+}
+.zan-ft{
+  margin: 20rpx 0;
+  width: 14rpx;
+  height: 24rpx;
+}
+.zan-ft image{
+  display: block;
+  width: 14rpx;
+  height: 24rpx;
+  /*transform:rotate(180deg);*/
+}

+ 167 - 0
pages/outmoney/outmoney.js

@@ -0,0 +1,167 @@
+// pages/outmoney/outmoney.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    outMoney: null,
+    checkPass: false,
+    userInfo: {},
+    isLogin: false
+  },
+  outMoney(e) {
+    console.log(e);
+    let outMoney = e.detail.value;
+    this.setData({
+      outMoney
+    });
+    if (this.data.userInfo.repaidbalance && outMoney && outMoney >= 0.3 && outMoney <= this.data.userInfo.repaidbalance) {
+      this.setData({
+        checkPass: true
+      });
+    } else {
+      this.setData({
+        checkPass: false
+      });
+    }
+  },
+  beginOutMoney(e) {
+    wx.showLoading({
+      title: '提现中...',
+      mask: true
+    });
+    
+    let that = this;
+    wx.login({
+      success(res) {
+        console.log(res);
+        if (res.code) {
+          // 发起网络请求
+          wx.request({
+            url: getApp().globalData.postHeadAgreement +'://cdgl.xinyhy.cn/restapi/wechatpay/dopayTransfers',
+            data: {
+              //outTradeNo: new Date().getTime(), //订单号
+              //totalFee: that.data.chargemoney_select, //钱
+              totalFee: that.data.outMoney,
+              userId: that.data.userInfo.userId,
+              code: res.code
+            },
+            header: {
+              'content-type': 'application/x-www-form-urlencoded;charset=utf-8',
+            },
+            method: 'POST',
+            success(res1) {
+              wx.hideLoading();
+              let {
+                data
+              } = res1;
+              if (data && data.code == 200) {
+                wx.navigateBack();
+                wx.showModal({
+                  showCancel: false,
+                  content: '提现成功'
+                });
+              } else {
+                wx.showModal({
+                  showCancel: false,
+                  content: data.msg
+                });
+              }
+            }
+          });
+        } else {
+          wx.hideLoading();
+          console.log('登录失败!' + res.errMsg)
+        }
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+    let userInfo = wx.getStorageSync('userInfo');
+    let isLogin = wx.getStorageSync('isLogin');
+    let that = this;
+    wx.request({
+      url: getApp().globalData.postHeadAgreement +'://cdgl.xinyhy.cn/restapi/wechat/syncUser',
+      data: {
+        loginName: userInfo.loginName
+      },
+      method: 'POST',
+      success: function(res) {
+        let {
+          data
+        } = res;
+        if (data.code && data.code != 200) {
+          wx.removeStorageSync('userInfo');
+          wx.removeStorageSync('isLogin');
+          let url = '/pages/login/login';
+          wx.redirectTo({
+            url,
+          });
+        } else {
+          that.setData({
+            userInfo: data,
+            isLogin: true
+          });
+          wx.setStorageSync('userInfo', data);
+          wx.setStorageSync('isLogin', true);
+        }
+      },
+      fail(e) {
+        console.log("用户数据同步失败");
+      }
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 4 - 0
pages/outmoney/outmoney.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "余额转出"
+}

+ 7 - 0
pages/outmoney/outmoney.wxml

@@ -0,0 +1,7 @@
+<!--pages/outmoney/outmoney.wxml-->
+<view class='money_input'>
+  <text>提现金额(元)</text>
+  <input placeholder-class="section_phcolor" bindinput='outMoney' focus="true" type='digit' placeholder="请输入转出金额,不低于0.3元" />
+</view>
+<view class="outmoney"><text>可用余额{{userInfo.repaidbalance}}元</text></view>
+<button class='{{checkPass?"outmoney_button":"outmoney_button_disable"}}' bindtap="{{checkPass?'beginOutMoney':''}}" >立即提现(转入微信账户)</button>

+ 105 - 0
pages/outmoney/outmoney.wxss

@@ -0,0 +1,105 @@
+/* pages/outmoney/outmoney.wxss */
+
+text {
+  font-size: 32rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #959595;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  line-height: 32rpx;
+  height: 32rpx;
+  min-height: 32rpx;
+}
+
+
+.money_input {
+  margin: 50rpx 30rpx 10rpx 30rpx;
+  padding: 0 21rpx;
+  border-top: 1rpx solid #f7f7f7;
+  border-bottom: 1rpx solid #f7f7f7;
+  line-height: 100rpx;
+  height: 100rpx;
+  min-height: 100rpx;
+}
+
+.section_phcolor {
+  font-size: 28rpx;
+  line-height: 100rpx;
+  height: 100rpx;
+  min-height: 100rpx;
+  color: #aaaaaa;
+}
+
+
+.money_input text {
+  display: inline-block;
+  color: #434343;
+  line-height: 100rpx;
+  height: 100rpx;
+  min-height: 100rpx;
+}
+
+.money_input input {
+  padding: 0 20rpx;
+  display: inline-block;
+  width: 380rpx;
+  height: 100rpx;
+  line-height: 100rpx;
+  min-height: 100rpx;
+  color: #aaaaaa;
+  font-size: 28rpx;
+}
+.outmoney{
+  margin: 0 30rpx;
+  padding: 0 20rpx;
+}
+.outmoney text{
+  color: #aaaaaa;
+  font-size: 28rpx;
+}
+.outmoney_button{
+  position: absolute;
+  bottom: 0;
+  width: calc(100% - 60rpx);
+  font-size: 32rpx;
+  margin: 50rpx 30rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #ffffff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #1cb03f;
+}
+.outmoney_button_disable{
+  position: absolute;
+  bottom: 0;
+  width: calc(100% - 60rpx);
+  font-size: 32rpx;
+  margin: 50rpx 30rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #ffffff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #c9c9c9;
+}
+.outmoney_button.button-hover{
+  background-color: #1ca05e;
+}

+ 274 - 0
pages/register/register.js

@@ -0,0 +1,274 @@
+// pages/register/register.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    userName: null,
+    phone: null,
+    email: null,
+    password: null,
+    rePassword: null,
+    checkPass: false,
+    errorMsg: ''
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    //var that = this;
+    //查看是否授权
+    //wx.getSetting({
+    //success(res) {
+    //console.log(res);
+    //if (res.authSetting['scope.userInfo']) {
+    //that.setData({
+    //authSet: true
+    //});
+    //已经授权,可以直接调用 getUserInfo 获取头像昵称
+    //wx.getUserInfo({
+    //success(res) {
+    //console.log(res)
+    //that.setData({
+    //userInfo: res.userInfo
+    //});
+    //}
+    //});
+    //}
+    //}
+    //});
+  },
+  bindGetUserInfo(e) {
+    //console.log(e);
+    //console.log(e.detail.userInfo)
+    let that = this;
+    if (e.detail.userInfo) {
+      let {
+        nickName: userName,
+        gender: sex,
+        avatarUrl: avatar
+      } = e.detail.userInfo;
+      let {
+        userName: loginName,
+        password,
+        phone,
+        email
+      } = this.data;
+      wx.login({
+        success(res) {
+          //console.log(res);
+          if (res.code) {
+            wx.request({
+              url: getApp().globalData.postHeadAgreement + '://cdgl.xinyhy.cn/restapi/wechat/register',
+              data: {
+                userName,
+                sex,
+                avatar,
+                loginName,
+                password,
+                phonenumber: phone,
+                email,
+                code: res.code
+              },
+              method: 'POST',
+              success(res1) {
+                //console.log(res1);
+                //console.log(res1.data.code == 1);
+                if (res1.data.code == 1) {
+                  that.setData({
+                    errorMsg: res1.data.msg
+                  })
+                } else {
+                  //返回该用户
+                  //跳转到上一页
+                  wx.setStorageSync("userInfo", res1.data);
+                  wx.setStorageSync("isLogin", true);
+                  wx.navigateBack();
+                  //let url = `/pages/ucenter/index/index`;
+                  //wx.redirectTo({
+                  //url
+                  //});
+                }
+              }
+            });
+          } else {
+            console.log('登录失败!' + res.errMsg)
+          }
+        }
+      });
+
+    }
+  },
+  inputAccount(e) {
+    this.setData({
+      userName: e.detail.value
+    });
+    this.checkAll();
+  },
+  inputPassword(e) {
+    this.setData({
+      password: e.detail.value
+    });
+    this.checkAll();
+  },
+  inputRepassword(e) {
+    this.setData({
+      rePassword: e.detail.value
+    });
+    this.checkAll();
+  },
+  inputPhone(e) {
+    this.setData({
+      phone: e.detail.value
+    });
+    this.checkAll();
+  },
+  inputEmail(e) {
+    this.setData({
+      email: e.detail.value
+    });
+    this.checkAll();
+  },
+  checkPassword() {
+    if (!this.data.password || !this.data.rePassword || this.data.password != this.data.rePassword) {
+      return false;
+    }
+    return true;
+  },
+  checkPhone() {
+    if (!(/^1[3456789]\d{9}$/.test(this.data.phone))) {
+      return false;
+    }
+    return true;
+  },
+  checkMail() {
+    if (!(/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(this.data.email))) {
+      return false;
+    }
+    return true;
+  },
+  checkAll() {
+    if (!this.data.userName || !this.data.userName.replace(/(^\s*)|(\s*$)/g,"")) {
+      this.setData({
+        errorMsg: '账号不能为空'
+      });
+      this.setData({
+        checkPass: false
+      });
+      return;
+    } else if (this.data.userName.length < 2 || this.data.userName.length > 20) {
+      this.setData({
+        errorMsg: '账号长度应为2-20'
+      });
+      this.setData({
+        checkPass: false
+      });
+      return;
+    }else{
+      this.setData({
+        errorMsg: ''
+      }); 
+    }
+    if (!this.checkPhone()) {
+      this.setData({
+        errorMsg: '手机号输入有误,请重新输入'
+      });
+      this.setData({
+        checkPass: false
+      });
+      return;
+    } else {
+      this.setData({
+        errorMsg: ''
+      });
+    }
+    if (!this.checkMail()) {
+      this.setData({
+        errorMsg: '邮箱输入有误,请重新输入'
+      });
+      this.setData({
+        checkPass: false
+      });
+      return;
+    } else {
+      this.setData({
+        errorMsg: ''
+      });
+    }
+    if (this.data.password && (this.data.password.length < 5 || this.data.password.length > 20)) {
+      this.setData({
+        errorMsg: '密码长度应为5-20'
+      });
+      this.setData({
+        checkPass: false
+      });
+      return;
+    }
+    if (!this.checkPassword()) {
+      this.setData({
+        errorMsg: '两次密码输入不一致,请重新输入'
+      });
+      this.setData({
+        checkPass: false
+      });
+      return;
+    } else {
+      this.setData({
+        errorMsg: ''
+      });
+    }
+    this.setData({
+      checkPass: true
+    });
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 4 - 0
pages/register/register.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "注册"
+}

+ 40 - 0
pages/register/register.wxml

@@ -0,0 +1,40 @@
+<!--pages/register/register.wxml-->
+<view class='main'>
+  <image class='main_image' src='/images/register.png'></image>
+  <view class='context'>
+    <view class='context_input'>
+      <view class='input_view'>
+        <image class='account_img' src='/images/account.png'></image>
+        <input placeholder='请设置账号' bindinput='inputAccount' focus='true' placeholder-class='placeholder'></input>
+      </view>
+
+      <view class='input_view'>
+        <image class='phone_img' src='/images/phone.png'></image>
+        <input placeholder='请输入电话' maxlength='11' bindinput='inputPhone' type='number' placeholder-class='placeholder'></input>
+      </view>  
+       <view class='input_view'>
+        <image class='email_img' src='/images/email.png'></image>
+        <input placeholder='请输入邮箱' maxlength='48' bindinput='inputEmail' type='text' placeholder-class='placeholder'></input>
+      </view>
+      <!-- 
+        <view class='input_view'>
+          <image class='man_img' src='/images/man.png'></image>
+          <input placeholder='请选择性别' maxlength='16' bindinput='checkPassword' type='password' placeholder-class='placeholder'></input>
+        </view> 
+      -->  
+      <view class='input_view'>
+        <image class='password_img' src='/images/password.png'></image>
+        <input placeholder='请设置密码' maxlength='16' bindinput='inputPassword' type='password' placeholder-class='placeholder'></input>
+      </view>
+      <view class='input_view'>
+        <image class='password_img' src='/images/password.png'></image>
+        <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"}}' open-type="getUserInfo" bindgetuserinfo="{{checkPass?'bindGetUserInfo':''}}">
+      注册
+    </button>
+
+  </view>
+</view>

+ 138 - 0
pages/register/register.wxss

@@ -0,0 +1,138 @@
+/* pages/register/register.wxss */
+.main {
+  height: 100%;
+  width: 100%;
+  position: relative;
+}
+
+.main_image {
+  height: 1344rpx;
+  width: 750rpx;
+  margin-top: -128rpx;
+}
+
+.main .context {
+  height: 100%;
+  width: 100%;
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.context_input {
+  margin: 30rpx 32rpx;
+}
+
+.account_img {
+  width: 26rpx;
+  height: 32rpx;
+  margin: 28rpx 32rpx 28rpx 0;
+}
+
+.password_img {
+  width: 24rpx;
+  height: 30rpx;
+  margin: 29rpx 34rpx 29rpx 0;
+}
+
+.phone_img {
+  width: 24rpx;
+  height: 24rpx;
+  margin: 32rpx 34rpx 32rpx 0;
+}
+.email_img {
+  width: 26rpx;
+  height: 20rpx;
+  margin: 34rpx 32rpx 34rpx 0;
+}
+.man_img {
+  width: 28rpx;
+  height: 24rpx;
+  margin: 32rpx 30rpx 32rpx 0;
+}
+
+.context_input .input_view {
+  border-bottom: 1rpx solid #f1f1f1;
+}
+
+.context_input input {
+  width: calc(100% - 58rpx);
+  display: inline-block;
+  font-size: 32rpx;
+  height: 88rppx;
+  line-height: 88rpx;
+  min-height: 88rpx;
+  color: #434343;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+
+.context_input .placeholder {
+  color: #c9c9c9;
+  font-size: 32rpx;
+  height: 88rppx;
+  line-height: 88rpx;
+  min-height: 88rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+}
+.errorMsg{
+  height: 28rpx;
+  margin: 0rpx 32rpx 32rpx 30rpx;
+  font-size: 28rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: red;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.login_button {
+  width: calc(100% - 62rpx);
+  font-size: 32rpx;
+  margin: 0rpx 32rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #fff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #3cb8b6;
+}
+.login_button_disable{
+  width: calc(100% - 62rpx);
+  font-size: 32rpx;
+  margin: 0rpx 32rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #fff;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  background-color: #c9c9c9;
+}
+.login_button.button-hover {
+  background-color: #36a9a6;
+}

Some files were not shown because too many files changed in this diff