XWookey 1 year ago
parent
commit
981b04da09

+ 4 - 1
app.json

@@ -46,7 +46,10 @@
     "pages/agreement/userAgreement",
     "pages/agreement/list",
     "pages/ucenter/car/car",
-    "pages/ucenter/car/bindCar"
+    "pages/ucenter/car/bindCar",
+    "pages/reservation/reservation",
+    "pages/reservation/reservationEdit",
+    "pages/ucenter/yuyt/yuyt"
   ],
   "window": {
     "backgroundTextStyle": "light",

BIN
images/yulan.png


BIN
images/yulan_active.png


+ 7 - 0
pages/charginfo/charginfo.js

@@ -390,6 +390,13 @@ console.info('xxxxxxxxxxxxxx')
       });
     }
   },
+
+  seeReservation: function(){
+    let url = `/pages/reservation/reservation`;
+    wx.navigateTo({
+      url
+    });
+  },
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 1 - 1
pages/charginfo/charginfo.wxml

@@ -100,7 +100,7 @@
       </view>
       <view class="chargInfo_v">
       <view class="chargInfo_v_name">{{item.chargPileName}}</view>
-      <view class="chargInfo_v_id">{{item.chargPileId}}</view>
+      <view class="chargInfo_v_id">{{item.chargPileId}}  <text wx:if="{{true}}" class="seeReservation" bindtap="seeReservation">查看预约</text></view>
       </view>
       <view class="iconleft" >
         <view class="icon {{item.pileType=='慢充'?'slowBar':'fastBar'}}">{{item.pileType=='慢充'?'慢':'快'}}</view>

+ 10 - 5
pages/charginfo/charginfo.wxss

@@ -182,7 +182,7 @@ text.price {
   background: #FFFFFF;
   flex-direction: row;
   display: flex;
-  justify-content: space-between;
+  /*justify-content: space-between;*/
 }
 
 .runstatus{
@@ -236,7 +236,7 @@ text.price {
   flex-direction: column;
   justify-content: center;
   display: flex;
-  width: 400rpx;
+  width: 480rpx;
   color: #888888;
   font-size: 28rpx;
   height: 100%;
@@ -247,15 +247,15 @@ text.price {
 }
 
 .iconleft{
-  width: 150rpx;
+  width: 100rpx;
   display: flex;
-  margin: 0 10rpx;
+  margin-right: 20rpx;
   flex-direction: column;
 }
 
 .iconleft .icon{
   margin-top: 20rpx;
-  margin-left: 60rpx;
+  /*margin-left: 60rpx;*/
 }
 
 .startpower{
@@ -311,4 +311,9 @@ text.price {
   font-weight: bold;
   font-size: 28rpx;
   padding-bottom:10rpx;
+}
+
+.seeReservation{
+  color:#039BE5;
+  padding-left: 40rpx;
 }

+ 71 - 0
pages/reservation/reservation.js

@@ -0,0 +1,71 @@
+// pages/reservation/reservation.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    timeList:["22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00","22:00 - 23:00"]
+  },
+  goReservation(){
+    let url = `/pages/reservation/reservationEdit`;
+    wx.navigateTo({
+      url
+    });
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 4 - 0
pages/reservation/reservation.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "预约详情",
+  "usingComponents": {}
+}

+ 43 - 0
pages/reservation/reservation.wxml

@@ -0,0 +1,43 @@
+<!--pages/reservation/reservation.wxml-->
+
+<view class='charging_text_title'>
+    <view class='charging'>
+      <image src='/images/charging2_1.png'></image>
+    </view>
+    <view class='charging_text_title1'><!--
+      <text class='bold'>{{chargPile.chargPileName}}</text>
+      <text class="h1">终端编号:{{chargPile.chargPileId}}</text>-->
+      <text class='bold'>dddddddddddddddd</text>
+      <text class="h1">终端编号:111111111111</text>
+    </view>
+</view>
+<view class="select_card">
+  <view class="card">
+    <view class="title">7.14</view>
+    <image src="/images/yulan.png"/>
+  </view>
+  <view class="card">
+    <view class="title">7.14</view>
+    <image src="/images/yulan.png"/>
+  </view>
+  <view class="card">
+    <view class="title">7.14</view>
+    <image src="/images/yulan.png"/>
+  </view>
+  <view class="card active">
+    <view class="title">7.14</view>
+    <image src="/images/yulan.png"/>
+  </view>
+</view>
+<view class="title2">已预约时段</view>
+<view class="title2_sub">(显示近4天已预约时段,请酌情选择预约时间)</view>
+<view class="title2_line"></view>
+<scroll-view class="scrollView" scroll-y='true' wx:if="{{timeList.length > 0}}">
+  <view wx:for="{{timeList}}" wx:key="unique" data-index="{{index}}" class="card">{{item}}
+  </view>
+</scroll-view>
+
+<view class="scrollView" wx:if="{{timeList.length == 0}}">
+  <view class="noList">暂无已预约时段</view>
+</view>
+<button class='login_button' bindtap="goReservation" >预约充电</button>

+ 203 - 0
pages/reservation/reservation.wxss

@@ -0,0 +1,203 @@
+/* pages/reservation/reservation.wxss */
+
+page{
+  margin: 20rpx;
+  display: flex;
+  flex-direction: column;
+}
+.charging_text_title {
+  height: 105rpx;
+  width: 100%;
+  display: flex;
+  margin-bottom: 20rpx;
+}
+
+.charging_text_title1 {
+  width: 100%;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+.charging {
+  width: 62rpx;
+  height: 62rpx;
+  margin: 30rpx 30rpx 30rpx 0;
+  flex-shrink: 0;
+  overflow: hidden;
+}
+.charging image {
+  width: 62rpx;
+  height: 62rpx;
+}
+
+text {
+  margin: 0 0 18rpx 0;
+  display: block;
+  font-size: 26rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #231400;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  line-height: 30rpx;
+  height: 30rpx;
+  min-height: 30rpx;
+}
+
+
+text.bold {
+  font-weight: bold;
+  line-height: 34rpx;
+  height: 34rpx;
+  min-height: 34rpx;
+  margin-top: 28rpx;
+  margin-bottom: 8rpx;
+  display: block;  
+  font-size: 30rpx;
+}
+
+text.inline {
+  display: inline-block;
+  color: #575757;
+  margin-top:18rpx;
+  margin-bottom: 0;
+}
+
+.h1 {
+  margin: 0rpx 0rpx 24rpx 0rpx;
+  font-size: 24rpx;
+  line-height: 28rpx;
+  height: 28rpx;
+  min-height: 28rpx;
+  color: #a3a3a3;
+}
+
+.select_card{
+  width: calc(100% - 40rpx);
+  height: 200rpx;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+}
+
+.select_card .card{
+  width: 160rpx;
+  height: 200rpx;
+  border-radius: 10rpx;
+  border: 1rpx solid #bbbbbb;
+  color: #bbbbbb;
+
+}
+.select_card .card .title{
+  width: 100%;
+  text-align: center;
+  margin-top: 30rpx;
+}
+
+.select_card .card image{
+  width: 70rpx;
+  height: 70rpx;
+  margin: 0 45rpx;
+  margin-top: 30rpx;
+}
+
+
+.select_card .card.active{
+  background-color: #1990fd ;
+  color: #FFFFFF;
+}
+
+.title2{
+  color: #E99D42;
+  margin-top: 20rpx;
+  font-size: 32rpx;
+}
+
+.title2_sub{
+  color: #F06C6C;
+  margin-top: 10rpx;
+  font-size: 22rpx;
+}
+
+.title2_line{
+  width: calc(100% - 40rpx);
+  height: 4rpx;
+  background-color: #BBBBBB;
+  margin-top: 10rpx;
+}
+
+.scrollView{
+  width: calc(100% - 40rpx);
+  height: calc(100vh - 600rpx);
+}
+
+.scrollView .card{
+  width: 100;
+  border-bottom: #BBBBBB solid 1px;
+  height: 80rpx;
+  font-size: 30rpx;
+  line-height: 80rpx;
+}
+
+.noList{
+  font-size: 32rpx;
+  color: #AAAAAA ;
+  width: calc(100% - 40rpx);
+  margin: 40rpx 0 ;
+  text-align: center;
+  height: calc(100vh - 600rpx);
+}
+
+
+
+.login_button {
+  width: calc(100% - 270rpx);
+  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: #00a8dc;
+  border-radius: 40rpx;
+  height: 80rpx;
+  border: none;
+  margin: 25rpx 135rpx 0 135rpx;
+}
+
+.login_button_disable {
+  width: calc(100% - 270rpx);
+  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;
+  border-radius: 40rpx;
+  height: 80rpx;
+  border: none;
+  margin: 25rpx 135rpx 0 135rpx;
+}
+
+.login_button.button-hover {
+  background-color: #36a9a6;
+}

+ 66 - 0
pages/reservation/reservationEdit.js

@@ -0,0 +1,66 @@
+// pages/reservation/reservationEdit.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
pages/reservation/reservationEdit.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "预约充电",
+  "usingComponents": {
+    "datepicker": "/components/datePicker/datePicker"
+  }
+}

+ 27 - 0
pages/reservation/reservationEdit.wxml

@@ -0,0 +1,27 @@
+
+  <view class="context">
+    <text>场站</text>
+    <view class='input' type='text'>dfdfdfdfdf</view>
+  </view>
+  <view class="context">
+    <text>桩编号</text>
+    <view class='input' type='text'>sfsfsfsfsfs</view>
+  </view>
+  <view class="context">
+    <text>桩名称</text>
+    <view class='input' type='text'>sfsfsfsfsfs</view>
+  </view>
+
+  <view class="context">
+    <text>预约开始充电时间</text>
+    <datepicker wx:if="{{!workstatusFinished}}" params="{{workEndtimeParams}}"  bind:getDateString="bindworkEndtimeParamsChange" style="width: 100%;"/>
+    <input  wx:if="{{workstatusFinished}}"  class='input' type='text' value='{{workEndtimeParams.pText}}' disabled="{{workstatusFinished}}"></input>
+  </view>
+  <view class="context">
+    <text>预约结束充电时间</text>
+    <datepicker wx:if="{{!workstatusFinished}}" params="{{finishparams}}" bind:getDateString="bindFinishparamsChange" style="width: 100%;"/>
+    <input  wx:if="{{workstatusFinished}}"  class='input' type='text' value='{{finishparams.pText}}' disabled="{{workstatusFinished}}"></input>
+  </view>
+
+<view class="tip">点击提交预约即表示同意<text class="link">免责声明</text></view>  
+<button wx:if="{{!workstatusFinished}}" bindtap='bindWorkSheetSubmit' class='submitbutton'>提交预约</button>

+ 184 - 0
pages/reservation/reservationEdit.wxss

@@ -0,0 +1,184 @@
+/* pages/worksheetinfo/worksheetinfo.wxss */
+page {
+  height: 100%;
+  overflow-y: hidden;
+}
+scroll-view{
+  height:calc(100% - 180rpx);
+}
+.context {
+  margin: 0rpx 32rpx;
+  height: 87rpx;
+  border-bottom: 1rpx solid #f7f7f7;
+  line-height: 87rpx;
+  min-height: 87rpx;
+  display: flex;
+}
+
+text {
+  font-size: 28rpx;
+  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;
+  flex-shrink: 0;
+}
+.picker{
+  width: 100%;
+  text-align: right;
+}
+.picker text{
+  color: #959595;
+}
+.picker1{
+  width: 100%;
+  text-align: right;
+}
+.picker1 text{
+  color: #959595;
+}
+.picker2{
+  flex-shrink: 0;
+  margin-left: 10rpx;
+  text-align: right;
+}
+.picker2 text{
+  color: #959595;
+}
+.input{
+  height: 87rpx;
+  line-height: 87rpx;
+  min-height: 87rpx;
+  color: #959595;
+  font-size: 28rpx;
+  text-align: right;
+  margin-right: 0;
+  width: 100%;
+}
+
+
+.input .span_withoutclear{
+  float: left;
+  line-height: 87rpx;
+  min-height: 87rpx;
+  width: 100%;
+}
+
+.input .span_withclear{
+  float: left;
+  line-height: 87rpx;
+  min-height: 87rpx;
+  width: calc(100% - 50rpx);  
+}
+
+.img_clear{
+  float: right;
+  width: 40rpx;
+  height:40rpx;
+ margin: 30rpx -4rpx 30rpx 8rpx;
+}
+
+
+.context_image {
+  margin: 0rpx 32rpx;
+  height: 239rpx;
+  border-bottom: 1rpx solid #f7f7f7;
+  line-height: 87rpx;
+  min-height: 239rpx;
+}
+
+.context_image .add {
+  width: 120rpx;
+  height: 120rpx;
+  border: 1rpx solid #f7f7f7;
+  line-height: 120rpx;
+  min-height: 120rpx;
+}
+
+.add.active {
+  background-color: #ebebeb;
+}
+
+.add text {
+  width: 120rpx;
+  display: block;
+  color: #959595;
+  font-size: 80rpx;
+  font-weight: 100;
+  text-align: center;
+}
+
+.question-images {
+  margin: 0rpx 32rpx;
+  border-bottom: 1rpx solid #f7f7f7;
+}
+
+.q-image-wrap {
+  width: 120rpx;
+  height: 120rpx;
+  display: inline-block;
+  margin: 20rpx;
+}
+
+.q-image-wrap image {
+  width: 120rpx;
+  height: 120rpx;
+}
+
+.q-image-remover {
+  width: 120rpx;
+  height: 30rpx;
+  text-align: center;
+  font-size: 28rpx;
+  line-height: 30rpx;
+  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;
+}
+.tip{
+  position: absolute;
+  bottom: 150rpx;
+  width: calc(100% - 60rpx);
+  text-align: center;
+  font-size: 26rpx;
+}
+.tip .link{
+  font-size: 26rpx;
+  color:#48a0f7;
+}
+.submitbutton{
+  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: #2583c1;
+}
+.submitbutton.button-hover{
+  background-color: #1ca05e;
+}

+ 14 - 0
pages/ucenter/index/index.js

@@ -158,6 +158,20 @@ Page({
       url
     });
   },
+  goyuyt(e){
+    if (!this.data.isLogin) {
+      let url = `/pages/login/phone_login/phone_login`;
+      wx.navigateTo({
+        url
+      });
+      return;
+    }
+    let url = '/pages/ucenter/yuyt/yuyt'
+    wx.navigateTo({
+      url
+    });
+
+  },
   goPurse(e) {
     if (!this.data.isLogin) {
       let url = `/pages/login/phone_login/phone_login`;

+ 12 - 0
pages/ucenter/index/index.wxml

@@ -70,6 +70,18 @@
           <image src='/images/enter.png'></image>
         </view>
       </view>
+      <view class="zan-cell" wx:if='{{!userInfo.flag}}' hover-class="active" bindtap="goyuyt">
+        <view class="zan-icon">
+          <!-- <image src='/images/purse.png'></image> -->
+          <image src='/images/column.png'></image>
+        </view>
+        <view class="zan-text">
+          <text>预约记录</text>
+        </view>
+        <view class="zan-ft">
+          <image src='/images/enter.png'></image>
+        </view>
+      </view>   
       <view class="zan-cell" wx:if='{{!userInfo.flag}}' hover-class="active" bindtap="goPurse">
         <view class="zan-icon">
           <!-- <image src='/images/purse.png'></image> -->

+ 172 - 0
pages/ucenter/yuyt/yuyt.js

@@ -0,0 +1,172 @@
+// pages/ucenter/charginglog/charginglog.js
+let Util = require("../../../utils/util");
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    charginglogs: [],
+    pagesize:10,
+    pagenum:1,
+    total:-1,
+    loadTotal: 0,
+    dataLoading: false,
+    finishedLoadTap: 0,
+    finishedLoadShowTimes: 0,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    let userInfo = wx.getStorageSync('userInfo');
+    let isLogin = wx.getStorageSync('isLogin');
+    let that = this;
+    // 页面显示
+    if (userInfo && isLogin) {
+      this.getPage();
+    }
+  },
+  getPage(){
+    console.info(this.data.charginglogs.length + " MMM " + this.data.total)
+    
+    if(this.data.charginglogs.length == this.data.total){
+      this.setData({
+        finishedLoadTap:this.data.finishedLoadTap+1
+      })
+      if(this.data.finishedLoadTap>0 && this.data.finishedLoadShowTimes==0){
+        this.setData({
+          finishedLoadShowTimes:this.data.finishedLoadShowTimes+1
+        })
+        wx.showToast({
+          title: '全部加载完毕',
+          icon: 'success',
+          duration: 2000
+        })
+      }
+      return
+    }
+
+    if(this.data.dataLoading){
+      return
+    }
+    this.setData({
+      dataLoading: true
+    })
+    wx.showLoading({
+      title: '数据加载中....',
+    })
+
+  let that = this;
+
+    wx.request({
+      url: getApp().globalData.postHeadAgreement +'/restapi/pileLog/wechatuserallcharglog',
+      data: {
+        userId: wx.getStorageSync('userInfo').userId,
+        pagenum: this.data.pagenum++,
+        pagesize: 10,
+      },
+      method: 'POST',
+      success(res) {
+        console.log(res);
+        if (res.data.result.rows) {
+          let {
+            rows: charginglogs
+          } = res.data.result;
+          // that.startTimeOrder(charginglogs);
+          that.formatCharginglogs(charginglogs);
+          wx.hideLoading()
+          that.setData({
+            charginglogs: that.data.charginglogs.concat(charginglogs),
+            total: res.data.result.total,
+            dataLoading: false
+          });
+        }
+      }
+    });
+  },
+
+
+  formatCharginglogs(charginglogs) {
+    charginglogs.forEach((item, index) => {
+      try {
+        var startDate = Util.parseDate(item.chargstarttime);
+        var endDate = Util.parseDate(item.chargendtime)
+        var totalTime = Math.round((endDate.getTime() - startDate.getTime()) / 60000);
+        var totalTimeHour = Math.floor(totalTime / 60);
+        var totalTimeMinute = totalTime % 60;
+        var startTime = startDate.getFullYear() + "年" + Util.formatNumber(startDate.getMonth() + 1) + '月' + Util.formatNumber(startDate.getDate()) + '日  ' + Util.formatNumber(startDate.getHours()) + ':' + Util.formatNumber(startDate.getMinutes()) + ':' + Util.formatNumber(startDate.getSeconds());
+        var endTime = endDate.getFullYear() + "年" + 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) + "分";
+        item.startTime = startTime;
+        item.endTime = endTime;
+        item.totalTime = totalTime;
+        item.chargallmoney = item.chargallmoney.toFixed(2);
+        item.chargservice = item.chargservice.toFixed(2);
+        item.chargmoney = item.chargmoney.toFixed(2);
+        //console.log(item.chargPile);
+      } catch (err) {
+        //在这里处理错误
+      }
+    });
+
+  },
+  startTimeOrder(charginglogs) {
+    if (charginglogs && 0 != charginglogs.length) {
+      charginglogs.sort(function(ma, mb) {
+        return mb.chargstarttime.localeCompare(ma.chargstarttime);
+      });
+    }
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+  bindScrollTolowerEvent: function(){
+    this.getPage();
+  },
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 4 - 0
pages/ucenter/yuyt/yuyt.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "预约充电"
+}

+ 44 - 0
pages/ucenter/yuyt/yuyt.wxml

@@ -0,0 +1,44 @@
+<!--pages/ucenter/charginglog/charginglog.wxml-->
+<scroll-view class='context' scroll-y='true'  bindscrolltolower="bindScrollTolowerEvent" >
+  <view class='context_block'></view>
+  
+  <view class="text_context" wx:for="{{charginglogs}}" wx:key="id" wx:for-item="charginglog" 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_1.png'></image>
+      </view>
+      <view class='charging_text_title1'>
+        <text class='bold'>{{charginglog.chargStation.chargStationName}}</text>
+        <text class="h1">{{charginglog.chargStation.address}}</text>
+      </view>
+    </view>
+    <text>{{charginglog.chargPile.chargPileName}}</text>
+    <view  class="inline-view">
+      <text class='inline' decode='true'>充电时长:{{charginglog.totalTime}}&nbsp;&nbsp;&nbsp;&nbsp;</text>
+      <text class='inline'>充电电量:{{charginglog.chargpower}}度</text>
+    </view>
+    
+    <text class='gray'>{{charginglog.startTime}}-{{charginglog.endTime}}</text>
+    <view style='line-height:0;'>
+      <text class='inline gray1'>总费用:</text>
+      <text class='inline red'>{{charginglog.chargallmoney}}</text>
+      <text class='inline gray1' decode='true'>元&nbsp;&nbsp;&nbsp;&nbsp;服务费:</text>
+      <text class='inline red'>{{charginglog.chargservice}}</text>
+      <text class='inline gray1' decode='true'>元&nbsp;&nbsp;&nbsp;&nbsp;电费:</text>
+      <text class='inline red'>{{charginglog.chargmoney}}</text>
+      <text class='inline gray1'>元</text>
+    </view>
+    <text class='gray' wx:if="{{charginglog.paytype==1}}" decode='true'>支付方式:余额</text>
+    <text class='gray' wx:if="{{charginglog.paytype==2}}" decode='true'>支付方式:信用欠款</text>
+    <text class='gray' wx:if="{{charginglog.paytype==3}}" decode='true'>支付方式:支付宝</text>
+    <text class='gray' wx:if="{{charginglog.paytype==4}}" decode='true'>支付方式:微信支付</text>
+    <text class='gray' wx:if="{{charginglog.paytype==5}}" decode='true'>支付方式:银联卡</text>
+    <text class='gray' wx:if="{{charginglog.paytype==6}}" decode='true'>支付方式:虚拟货币</text>
+  </view>
+
+  
+</scroll-view>

+ 120 - 0
pages/ucenter/yuyt/yuyt.wxss

@@ -0,0 +1,120 @@
+/* pages/ucenter/charginglog/charginglog.wxss */
+
+page {
+  background-color: #f4f4f4;
+  height: 100%;
+  overflow-y: hidden;
+}
+
+.context {
+  height: 100%;
+}
+
+.context_block {
+  width: 100%;
+  height: 24rpx;
+}
+
+.text_context {
+  position: relative;
+  height: 378rpx;
+  background: #fff;
+  padding: 0 30rpx;
+  margin: 0 28rpx 24rpx 28rpx;
+  border-radius: 20rpx;
+  box-shadow: 0rpx 4rpx 4rpx #d5d5d5;
+}
+
+.text_context.active {
+  background-color: #ebebeb;
+}
+
+.charging_text_title {
+  height: 105rpx;
+  width: 100%;
+  display: flex;
+  margin-bottom: 20rpx;
+}
+
+.charging_text_title1 {
+  width: 100%;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+.charging {
+  width: 62rpx;
+  height: 62rpx;
+  margin: 30rpx 30rpx 30rpx 0;
+  flex-shrink: 0;
+  overflow: hidden;
+}
+
+.charging image {
+  width: 62rpx;
+  height: 62rpx;
+}
+
+.text_context text {
+  margin: 0 0 18rpx 0;
+  display: block;
+  font-size: 26rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+                 sans-serif;
+  color: #231400;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  line-height: 30rpx;
+  height: 30rpx;
+  min-height: 30rpx;
+}
+
+.text_context .bold {
+  font-weight: bold;
+  line-height: 34rpx;
+  height: 34rpx;
+  min-height: 34rpx;
+  margin-top: 28rpx;
+  margin-bottom: 8rpx;
+  display: block;  
+  font-size: 30rpx;
+}
+.text_context .h1 {
+  margin: 0rpx 0rpx 24rpx 0rpx;
+  font-size: 24rpx;
+  line-height: 28rpx;
+  height: 28rpx;
+  min-height: 28rpx;
+  color: #a3a3a3;
+}
+.inline-view{
+  height: 42rpx;
+}
+text.gray {
+  color: #a3a3a3;
+  font-size: 24rpx;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  line-height: 28rpx;
+  height: 28rpx;
+  min-height: 28rpx;
+  margin-bottom: 24rpx;
+}
+text.gray1 {
+  color: #575757;
+}
+text.inline {
+  display: inline-block;
+}
+
+text.red {
+  color: red;
+}