Commit 36f8eae31188615784e2a204ea4b5e8500659c91

Authored by iceling
1 parent 6e196763

提交评价,历史服务重置,订单列表数据填充

pages/user/my_service/appment_main.js
... ... @@ -9,10 +9,13 @@ Page({
9 9 * 页面的初始数据
10 10 */
11 11 data: {
  12 + inurl: a.url, //接口网址
12 13 iurl: a.imghost, //服务器网址
13 14 store: 0, //是否显示服务门店列表
14 15 beautician: 0, //是否显示美容师列表
15 16 beautician_name: "", //选中的美容师名称
  17 + beauticianID: "", //美容师id
  18 + bea_index: "", //美容师列表下标
16 19 placeholder: "填写备注", //备注为空的placeholder
17 20 store_list: [], //门店列表
18 21 beautician_list: [], //美容师列表
... ... @@ -22,7 +25,7 @@ Page({
22 25 pageSize: 8, //页大小
23 26 total: 0,
24 27 ismore: 0, //是否加载完毕
25   - itemId: "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6", //项目id
  28 + itemId: "", //项目id
26 29 isScroll: true, //scroll-y是否可以滑动
27 30 key_word: "", //是否按门店文字查询
28 31 is_service_read: 0, //是否调用过门店接口
... ... @@ -30,7 +33,10 @@ Page({
30 33 is_success: 0, //是否提交成功
31 34 remarks: "", //备注
32 35 storageId: "", //线下门店id
33   - url:"/pages/user/my_service/appment_main",//本页面地址路径用于选择时间页面跳转回来
  36 + url: "/pages/user/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来
  37 + buyType: "", //项目类型
  38 + time: "", //选择预约时间
  39 + tment_count: "", //可预约人数
34 40 },
35 41 onclickstore: function() {
36 42 var th = this;
... ... @@ -61,51 +67,61 @@ Page({
61 67 //提交预约
62 68 sub_success: function() {
63 69 var th = this;
64   - var store = th.data.store_name; //门店
65   - var bea_name = th.data.beautician_name; //选择的美容师
66   - // var time = th.data.time; //选择服务的时间
67   - // //提交预约前的判断
68   - // if (store == "") {
69   - // getApp().my_warnning("请选择服务门店", 0, th);
70   - // return false;
71   - // } else if (bea_name == "") {
72   - // getApp().my_warnning("请选择美容师", 0, th);
73   - // return false;
74   - // } else if (time == "") {
75   - // getApp().my_warnning("请选择预约时间", 0, th);
76   - // return false;
77   - // }
78   -
79   - // var url = "/api/weshop/marketing/reservation/reservation/insert";
80   - // getApp().request.post(url, {
81   - // data: {
82   - // projectID: "",
83   - // beauticianID: "",
84   - // buyType: "",
85   - // storeId: a.stoid,
86   - // storageID: "",
87   - // arrangeTime: "",
88   - // userId: d.user_id,
89   - // remark: "",
90   - // states: ""
91   - // }
92   - // }).then(res => {
93   - // if (res.data.code == 0) {
94   - // th.setData({
95   - // is_success: 1
96   - // })
97   - // wx.navigateTo({
98   - // url: "/pages/user/my_service/tment_details"
99   - // });
100   - // } else {
101   - // getApp().my_warnning(res.data.msg, 0, th);
102   - // }
103   - // })
104   -
105   - //测试
106   - wx.navigateTo({
107   - url: "/pages/user/my_service/tment_details"
108   - });
  70 + var store = th.data.store_name; //门店名称
  71 + var bea_name = th.data.beautician_name; //美容师名称
  72 + var time = th.data.time; //预约时间
  73 + //提交预约前的判断
  74 + if (store == "") {
  75 + getApp().my_warnning("请选择服务门店", 0, th);
  76 + return false;
  77 + } else if (bea_name == "") {
  78 + getApp().my_warnning("请选择美容师", 0, th);
  79 + return false;
  80 + } else if (time == "") {
  81 + getApp().my_warnning("请选择预约时间", 0, th);
  82 + return false;
  83 + } else {
  84 + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径
  85 + var projectID = th.data.itemId; //项目id
  86 + var beauticianID = th.data.beauticianID; //美容师id
  87 + var buyType = th.data.buyType; //服务项目类型
  88 + var storeId = a.stoid; //商家id
  89 + var storageId = th.data.storageId; //门店id
  90 + var userId = d.user_id; //用户id
  91 + var remarks = th.data.remarks;
  92 + var json = {
  93 + "projectID": projectID,
  94 + "beauticianID": beauticianID,
  95 + "buyType": buyType,
  96 + "storeId": storeId,
  97 + "storageID": storageId,
  98 + "arrangeTime": time,
  99 + "userId": userId,
  100 + "remark": remarks,
  101 + "states": 0
  102 + }
  103 + var data = JSON.stringify(json);
  104 + wx.request({
  105 + url: url,
  106 + data: json,
  107 + method: 'post',
  108 + header: {
  109 + 'content-type': 'application/json'
  110 + }, // 设置请求的 header
  111 + success: function(res) {
  112 + if (res.data.code == 0) {
  113 + th.setData({
  114 + is_success: 1
  115 + })
  116 + wx.redirectTo({
  117 + url: "/pages/user/my_service/tment_order_list"
  118 + });
  119 + } else {
  120 + getApp().my_warnning(res.data.msg, 0, th);
  121 + }
  122 + }
  123 + })
  124 + }
109 125 },
110 126 goto: function(e) {
111 127 var th = this;
... ... @@ -128,7 +144,10 @@ Page({
128 144 return false;
129 145 } else {
130 146 th.setData({
131   - fir_pick_index: index_c
  147 + fir_pick_index: index_c,
  148 + beautician_name: "",
  149 + time: "2019-12-10 18:00:00",
  150 + tment_count: ""
132 151 })
133 152 }
134 153 },
... ... @@ -157,8 +176,7 @@ Page({
157 176 //分页查询门店信息
158 177 query_store: function() {
159 178 var th = this;
160   - // var itemId = th.data.itemId;//正式使用项目id
161   - var itemId = "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6"; //测试的项目id
  179 + var itemId = th.data.itemId; //正式使用项目id
162 180 var url = "/api/weshop/marketing/reservation/storage/page";
163 181 var key_word = th.data.key_word;
164 182 getApp().request.promiseGet(url, {
... ... @@ -205,11 +223,9 @@ Page({
205 223 beautician: 0
206 224 })
207 225 }
208   - var itemid = "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6"; //测试的项目id
209   - // var itemid = th.data.itemId;//正式使用的项目id
210   - // var storageId = th.data.storageId;//正式使用的线下门店id
211   - var storageId = "FD8EC44A-6474-4BA1-A17C-A87306690E59"; //测试的线下门店id
212   - var url = "/api/weshop/marketing/reservation/staff/page";
  226 + var itemid = th.data.itemId; //正式使用的项目id
  227 + var storageId = th.data.storageId; //正式使用的线下门店id
  228 + var url = "/api/weshop/marketing/reservation/staff/page"; //接口地址
213 229 getApp().request.promiseGet(url, {
214 230 data: {
215 231 storeId: a.stoid,
... ... @@ -228,10 +244,16 @@ Page({
228 244 },
229 245 choice_beautician: function(e) {
230 246 var th = this;
231   - var bea_name = e.currentTarget.dataset.beaname;
  247 + var bea_index = e.currentTarget.dataset.baaindex;
  248 + var bea_name = th.data.beautician_list[bea_index].StaffName;
  249 + var BeauticianID = th.data.beautician_list[bea_index].Id;
232 250 th.setData({
233 251 beautician_name: bea_name,
234   - beautician: 0
  252 + beautician: 0,
  253 + bea_index: bea_index,
  254 + beauticianID: BeauticianID,
  255 + time: "2019-12-10 19:00:00",
  256 + tment_count: ""
235 257 })
236 258  
237 259 },
... ... @@ -281,14 +303,42 @@ Page({
281 303 onLoad: function(options) {
282 304 var th = this;
283 305 th.setData({
284   - itemId: options.itemId
  306 + itemId: options.itemId,
  307 + buyType: options.BuyType
285 308 })
286 309 },
  310 + //查询剩下可预约人数
  311 + query_more: function() {
  312 + var th = this;
  313 + var url = "/api/weshop/marketing/reservation/marketing/can/reservation/count";
  314 + var beauticianID = th.data.beauticianID; //美容师id
  315 + var projectID = th.data.itemId; //项目id
  316 + var seekTime = th.data.time.substring(0, 11); //预约日期
  317 + var storageId = th.data.storageId; //门店id
  318 + var storeId = a.stoid; //商家id
  319 + getApp().request.promiseGet(url, {
  320 + data: {
  321 + beauticianID: beauticianID,
  322 + projectID: projectID,
  323 + seekTime: seekTime,
  324 + storageId: storageId,
  325 + storeId: storeId
  326 + }
  327 + }).then(res => {
  328 + if (res.data.code == 0) {
  329 + var tment_count = res.data.data.CanReservation;
  330 + th.setData({
  331 + tment_count: tment_count
  332 + })
  333 + }
  334 + })
287 335  
  336 + },
288 337 /**
289 338 * 生命周期函数--监听页面显示
290 339 */
291 340 onShow: function() {
292   -
  341 + var th = this;
  342 + th.query_more();
293 343 }
294 344 })
295 345 \ No newline at end of file
... ...
pages/user/my_service/appment_main.wxml
... ... @@ -34,7 +34,7 @@
34 34 <!-- 美容师下拉列表 -->
35 35 <view class="beauticians abs" wx:if="{{beautician}}">
36 36 <!-- 到时候要做判断如果是index==循环的最后一个则把下边线去掉:(beaclone去掉的css) -->
37   - <view class="beautician flex-vertical fs26" wx:for="{{beautician_list}}" bindtap="choice_beautician" data-beaname="{{item.StaffName}}">
  37 + <view class="beautician flex-vertical fs26" wx:for="{{beautician_list}}" bindtap="choice_beautician" data-baaindex="{{key}}" wx:for-index="key">
38 38 <view>{{item.StaffName}}</view>
39 39 </view>
40 40 <view>
... ... @@ -54,8 +54,8 @@
54 54 </view>
55 55  
56 56 <!-- 选择门店 -->
57   - <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta?url+{{url}}" bindtap="goto">
58   - <view class="color">选择时间</view>
  57 + <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta?url+{{url}}&BeauticianID={{beauticianID}}&itemId={{itemId}}" bindtap="goto">
  58 + <view class="color">{{time==""?'选择时间':time}}</view>
59 59 <view class="angle angler">∟</view>
60 60 </view>
61 61 </view>
... ... @@ -78,8 +78,8 @@
78 78 </block>
79 79 </view>
80 80 </view>
81   - <view class="notes flex-level-right fs24 color">
82   - <view>注:剩余可预约人数10人</view>
  81 + <view wx:if="{{tment_count!=''}}" class="notes flex-level-right fs24 color">
  82 + <view>注:剩余可预约人数{{tment_count}}人</view>
83 83 </view>
84 84  
85 85 <view class="submitMax flex-space-between fs30">
... ...
pages/user/my_service/beauty_deta.js
... ... @@ -10,63 +10,41 @@ Page({
10 10 */
11 11 data: {
12 12 iurl: a.imghost,
13   - url:"",//选择选择时间后返回的页面
  13 + url: "", //选择选择时间后返回的页面
14 14 defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
15   - seekTime: "2019-11-18", //当前服务预约选择的时间
  15 + seekTime: "", //当前服务预约选择的时间
16 16 time_list: [], //可预约时间
17 17 name: "", //美容师姓名
18 18 comment: "", //美容师评价
  19 + aweeks: [], //七天的预约时间
19 20 head_img: "", //美容师头像
20 21 time: ["08:00:00", "09:00:00 ", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00"],
21 22 time_index: 0, //选择预约时间下标
22   - date: [{
23   - date_name: "今天",
24   - id: 0,
25   - date_value: "09月10日"
26   - }, {
27   - date_name: "星期四",
28   - id: 1,
29   - date_value: "09月11日"
30   - }, {
31   - date_name: "星期五",
32   - id: 2,
33   - date_value: "09月12日"
34   - }, {
35   - date_name: "星期六",
36   - id: 3,
37   - date_value: "09月13日"
38   - }, {
39   - date_name: "星期天",
40   - id: 4,
41   - date_value: "09月14日"
42   - }, {
43   - date_name: "下礼拜一",
44   - id: 5,
45   - date_value: "09月15日"
46   - }, {
47   - date_name: "下礼拜二",
48   - id: 6,
49   - date_value: "09月16日"
50   - }, ],
51 23 date_id: 0, //选择日期的id
  24 + beautician_id: "", //美容师id
  25 + itemId: "", //项目id
52 26 },
53 27  
54 28 /**
55 29 * 生命周期函数--监听页面加载
56 30 */
57 31 onLoad: function(options) {
58   - var th = this;
59   - th.setData({
60   - url:options.url
61   - })
  32 + var th = this;
  33 + var beautician_id = options.BeauticianID;
  34 + th.setData({
  35 + url: options.url,
  36 + beautician_id: beautician_id,
  37 + itemId: options.itemId
  38 + })
62 39 th.query_beatea();
63   - th.query_date();
  40 + th.query_aweek();
  41 + // th.query_date();
64 42 },
65 43 /**
66 44 * 生命周期函数--监听页面显示
67 45 */
68 46 onShow: function() {
69   -
  47 +
70 48 },
71 49 //图片失败,默认图片
72 50 bind_bnerr1: function(e) {
... ... @@ -82,31 +60,30 @@ Page({
82 60 check_date: function(e) {
83 61 var th = this;
84 62 var id = e.currentTarget.dataset.dateid;
  63 + var seekTime = th.data.aweeks[id].time;
85 64 th.setData({
86   - date_id: id
  65 + date_id: id,
  66 + seekTime: seekTime
87 67 })
  68 + th.query_date();
88 69 },
89 70 //获取美容师信息
90 71 query_beatea: function() {
91 72 var th = this;
92   - var url = "/api/weshop/marketing/reservation/staff/page"; //接口路径
93   - var itemId = "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6",
94   - storageId = "FD8EC44A-6474-4BA1-A17C-A87306690E59";
95   -
  73 + var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径
  74 + var beautician_id = th.data.beautician_id;
96 75 getApp().request.promiseGet(url, {
97 76 data: {
98   - itemId: itemId,
99   - storageId: storageId,
100   - storeId: 1,
101   - userId: 5682130
  77 + BeauticianID: beautician_id,
  78 + storeId: a.stoid,
102 79 }
103 80 }).then(res => {
104 81 if (res.data.code == 0) {
105   - var data = res.data.data.pageData;
  82 + var data = res.data.data;
106 83 th.setData({
107   - name: data[0].StaffName,
108   - comment: data[0].Remark1,
109   - head_img: data[0].PhotoUrl
  84 + name: data.StaffName,
  85 + comment: data.Remark1,
  86 + head_img: data.PhotoUrl
110 87 })
111 88 } else {
112 89 getApp().my_warnning(res.data.msg, 0, th);
... ... @@ -130,13 +107,47 @@ Page({
130 107 th.setData({
131 108 time_index: index
132 109 })
133   - }
  110 + }
  111 + },
  112 + //查询七天预约时间
  113 + query_aweek: function() {
  114 + var th = this;
  115 + var beautician_id = th.data.beautician_id; //美容师id
  116 + var itemId = th.data.itemId; //项目id
  117 + var url = "/api/weshop/marketing/reservation/staff/seven/time/list"; //接口地址
  118 + getApp().request.promiseGet(url, {
  119 + data: {
  120 + BeauticianID: beautician_id,
  121 + ProjectID: itemId,
  122 + storeId: a.stoid,
  123 + }
  124 + }).then(res => {
  125 + if (res.data.code == 0) {
  126 + var data = res.data.data;
  127 + var arr = [];
  128 + for (var i in data) {
  129 + var em = {
  130 + "time": i,
  131 + "val": data[i]
  132 + };
  133 + arr.push(em);
  134 + console.log(arr[0].time.length + "1111111111111111111111111" + arr[0].time[0]);
  135 + }
  136 + th.setData({
  137 + aweeks: arr
  138 + })
  139 + } else {
  140 + getApp().my_warnning(res.data.msg, 0, th);
  141 + }
  142 + })
  143 +
134 144 },
135 145  
136 146 query_date: function() {
137 147 var th = this;
  148 + var date_id = th.data.date_id; //日期下标
  149 + var SeekTime = th.data.aweeks[date_id];
138 150 var url = "/api/weshop/marketing/reservation/staff/time/list";
139   - var SeekTime = th.data.seekTime;
140 151 getApp().request.promiseGet(url, {
141 152 data: {
142 153 BeauticianID: "337C11B8-034B-495D-B360-FC2F6CB29394",
... ... @@ -147,21 +158,21 @@ Page({
147 158 }).then(res => {
148 159 if (res.data.code == 0) {
149 160 var data = res.data.data;
150   - var time = th.data.time; //固定时间
151   - var time_list = [];
152   - for (var i = 0; i < time.length; i++) {
153   - for (var ii = ii; ii < data.length; ii++) {
154   - if (time[i] == data[ii].GroupHour) {
155   - time_list[i] = data[ii].GroupHour;
156   - break;
157   - } else {
158   - time_list[i] = "";
159   - }
160   - }
161   - }
162   - console.log("1111111111" + time_list.length);
  161 + // var date_id = th.data.date_id; //选择日期
  162 + // var time = th.data.aweeks[date_id].val; //固定时间
  163 + // var time_list = [];
  164 + // for (var i = 0; i < time.length; i++) {
  165 + // for (var ii = ii; ii < data.length; ii++) {
  166 + // if (time[i] == data[ii].GroupHour) {
  167 + // time_list.push(data[ii].GroupHour);
  168 + // continue;
  169 + // } else {
  170 + // time_list.push("");
  171 + // }
  172 + // }
  173 + // }
163 174 th.setData({
164   - time_list: time_list
  175 + time_list: data
165 176 })
166 177 } else {
167 178 getApp().my_warnning(res.data.msg, 0, th);
... ...
pages/user/my_service/beauty_deta.wxml
... ... @@ -20,10 +20,10 @@
20 20 <view>
21 21 <view class="fs36" style="margin-bottom:35rpx;">服务预约</view>
22 22 <scroll-view class="scroll-h fs26 " scroll-x>
23   - <view class="rel" wx:for="{{date}}" style="display: inline-block;">
  23 + <view class="rel" wx:for="{{aweeks}}" style="display: inline-block;">
24 24 <view class="scroll-item-h bd {{index==date_id?'chbd':''}}" bindtap="check_date" data-dateid="{{index}}">
25   - <view>{{item.date_name}}</view>
26   - <view>{{item.date_value}}</view>
  25 + <view>{{item.time}}</view>
  26 + <view></view>
27 27 </view>
28 28 <block wx:if="{{index==date_id}}">
29 29 <view class="abs box"></view>
... ... @@ -35,12 +35,11 @@
35 35 <!-- 选择时间 -->
36 36 <view class="Times">
37 37  
38   - <view class="flex-center" wx:for="{{time}}" style="display:inline-block;">
39   - <block wx:if="{{item!=time_list[index]}}">
40   - <!-- {{item==time_list[index]}} -->
41   - <view class="Time flex-center {{time_index==index?'chTime':''}}" bindtap="Selection_time" data-index="{{index}}">
  38 + <view class="flex-center" wx:for="{{aweeks[date_id].time}}" style="display:inline-block;" wx:for-index="key" wx:for="it">
  39 + <block wx:if="{{item.GroupHour==time_list[key].GroupHour}}">
  40 + <view class="Time flex-center {{time_index==key?'chTime':''}}" bindtap="Selection_time" data-index="{{key}}">
42 41 <view>
43   - <view class="fs26">{{item}}</view>
  42 + <view class="fs26">{{it.GroupHour}}</view>
44 43 <block wx:if="{{flase}}">
45 44 <view class="fs24">约满</view>
46 45 </block>
... ... @@ -48,9 +47,9 @@
48 47 </view>
49 48 </block>
50 49 <block wx:else>
51   - <view class="Time flex-center nochTime">
  50 + <view class="Time flex-center nochTime">
52 51 <view>
53   - <view class="fs26">{{item}}</view>
  52 + <view class="fs26">{it.GroupHour}}</view>
54 53 </view>
55 54 </view>
56 55 </block>
... ...
pages/user/my_service/cosmetology_list.js
... ... @@ -34,7 +34,7 @@ Page({
34 34 getApp().request.promiseGet(url, {
35 35 data: {
36 36 storeId: a.stoid,
37   - userId: 5682130, //5682130 d.user_id
  37 + userId: d.user_id,
38 38 itemId:"08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6",
39 39 storageId: "FD8EC44A-6474-4BA1-A17C-A87306690E59",
40 40 page: th.data.curpage,
... ...
pages/user/my_service/cosmetology_list.wxml
... ... @@ -34,7 +34,7 @@
34 34 </view>
35 35  
36 36 <!-- 预约状态 -->
37   - <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta">
  37 + <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.Id}}">
38 38 <view class="fs24">预约</view>
39 39 </navigator>
40 40 <!-- <block wx:else>
... ...
pages/user/my_service/hist_service.js
... ... @@ -30,6 +30,7 @@ Page({
30 30 total: 0,
31 31 ismore: 0, //是否加载完毕
32 32 is_screen: 0, //是否通过筛选来选择历史服务
  33 + is_reset:0,//是否重复点击
33 34 },
34 35 pickerShow: function() {
35 36 this.setData({
... ... @@ -71,8 +72,7 @@ Page({
71 72 /**
72 73 * 生命周期函数--监听页面显示
73 74 */
74   - onShow: function() {
75   - },
  75 + onShow: function() {},
76 76  
77 77 /**
78 78 * 页面上拉触底事件的处理函数
... ... @@ -87,6 +87,22 @@ Page({
87 87 })
88 88 th.query_service();
89 89 },
  90 + //重置历史服务数据
  91 + his_reset: function() {
  92 + var th = this;
  93 + var is_reset = th.data.is_reset;
  94 + if (is_reset==0){
  95 + th.setData({
  96 + hist_List: [],
  97 + curpage: 1,
  98 + is_screen: 0,
  99 + is_service_read: 0,
  100 + is_screen: 1,
  101 + is_reset:1
  102 + })
  103 + th.query_hist();
  104 + }
  105 + },
90 106 query_hist: function() {
91 107  
92 108 var th = this;
... ... @@ -96,7 +112,7 @@ Page({
96 112 getApp().request.promiseGet(url, {
97 113 data: {
98 114 storeId: a.stoid,
99   - userId: 5682130, //5682130 d.user_id
  115 + userId: d.user_id,
100 116 beginDate: startTime,
101 117 endDate: endTime,
102 118 page: th.data.curpage,
... ... @@ -116,14 +132,10 @@ Page({
116 132 total: res.data.data.total,
117 133 ismore: ismore,
118 134 is_service_read: 1,
  135 + is_reset:0
119 136 }), wx.stopPullDownRefresh(); //停止下拉刷新
120 137 } else {
121 138 getApp().my_warnning(res.data.msg, 0, this);
122   -
123   - // else {
124   - // th.setData({
125   - // is_service_read: 1
126   - // })
127 139 }
128 140 })
129 141 },
... ...
pages/user/my_service/hist_service.wxml
... ... @@ -7,7 +7,7 @@
7 7 次服务
8 8 </view>
9 9 <view class="flex">
10   - <view class="Resetfram flex-center">
  10 + <view class="Resetfram flex-center" bindtap="his_reset">
11 11 <view class="Reset">重置</view>
12 12 <image class="Resetsub" src="{{iurl}}/miniapp/images/reset.png"></image>
13 13 </view>
... ... @@ -39,6 +39,7 @@
39 39 <view wx:if="{{item.State==1}}">已服务</view>
40 40 <view wx:if="{{item.State==2}}">已过期</view>
41 41 <view wx:if="{{item.State==3}}">已取消</view>
  42 + <view wx:if="{{item.State==4}}">已评价</view>
42 43 </view>
43 44 </view>
44 45 <!-- 没有数据 -->
... ...
pages/user/my_service/i_service.js
... ... @@ -82,8 +82,8 @@ Page({
82 82 ismore: ismore,
83 83 is_service_read: 1,
84 84 }), wx.stopPullDownRefresh(); //停止下拉刷新
85   - }else{
86   - getApp().my_warnning(res.data.msg,0,th);
  85 + } else {
  86 + getApp().my_warnning(res.data.msg, 0, th);
87 87 }
88 88 })
89 89 },
... ... @@ -92,7 +92,7 @@ Page({
92 92 var th = this;
93 93 var ind = e.currentTarget.dataset.ind;
94 94 var item = this.data.service_List[ind];
95   - var ewm = "^" + th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|" + item.Validay + "|TY01|";
  95 + var ewm = "^" + th.data.userinfo.erpvipid + "|" + item.ID + "|" + item.BuyType + "|" + item.Validay + "|TY01|";
96 96 var tt = th.format_time(1);
97 97 ewm = ewm + tt;
98 98 th.data.qr_code_object.val = ewm;
... ... @@ -106,7 +106,7 @@ Page({
106 106 var _Img = e.target.dataset.img;
107 107 if (_Img != undefined) {
108 108 var _errObj = {};
109   - _errObj[_errImg] = "/miniapp/images/no_cate_def.png";
  109 + _errObj[_errImg] = "/miniapp/images/no_cate_def.png";
110 110 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
111 111 }
112 112 },
... ...
pages/user/my_service/i_service.wxml
... ... @@ -8,7 +8,7 @@
8 8 <!-- 项目框架 -->
9 9 <view class="Serviceitems">
10 10 <!-- 单个项目 -->
11   - <view class="rel" wx:for="{{service_List}}">
  11 + <view class="rel" wx:for="{{service_List}}" wx:if="{{item.State>0}}">
12 12 <view class="abs">
13 13 <!-- 皇冠log -->
14 14 <block wx:if="{{item.BuyType==4}}">
... ... @@ -49,7 +49,7 @@
49 49 <view>立即使用</view>
50 50 </view>
51 51 <!-- 可预约 -->
52   - <navigator class="flex-level appointment yellow-b" url="/pages/user/my_service/appment_main?itemId={{item.ProjectID}}">
  52 + <navigator class="flex-level appointment yellow-b" url="/pages/user/my_service/appment_main?itemId={{item.ProjectID}}&BuyType={{item.BuyType}}">
53 53 <view>预约</view>
54 54 </navigator>
55 55 </view>
... ...
pages/user/my_service/tment_details.js
... ... @@ -11,6 +11,10 @@ Page({
11 11 data: {
12 12 iurl: a.imghost,
13 13 tment_details: [], //预约详情
  14 + number:"",//订单号
  15 + arrangeTime:"",//预约年月日
  16 + day:"",//判断是上午还是下午
  17 +
14 18 },
15 19  
16 20 /**
... ... @@ -18,33 +22,48 @@ Page({
18 22 */
19 23 onLoad: function(options) {
20 24 var th = this;
21   - var url = "http://localhost:8022/api/weshop/yy_fuwu_meirsxiangq";
22   - wx.request({
23   - url: url,
24   - success: function(res) {
25   - if (res.data.code == 0) {
26   - th.setData({
27   - tment_details:res.data.data
28   - })
29   - }
30   - }
  25 + th.setData({
  26 + number: options.number
31 27 })
32   - /*
  28 + th.query_bea();
  29 + },
  30 + //查询美容师详情
  31 + query_bea: function() {
  32 + var th = this;
  33 + var number = th.data.number;
33 34 var url = "/api/weshop/marketing/reservation/reservation/page";
34 35 getApp().request.promiseGet(url, {
35 36 data: {
36   - storeId: 1,
37   - userId: 5682130
  37 + storeId: a.stoid,
  38 + userId: d.user_id,
  39 + number: number
38 40 }
39 41 }).then(res => {
40 42 if (res.data.code == 0) {
41 43 var data = res.data.data.pageData;
  44 + var arrangeTime = data[0].ArrangeTime.substring(0,11);
  45 + var day = data[0].ArrangeTime.substring(12, 13);
  46 + if (day<12){
  47 + day = "上午"
  48 + }else{
  49 + day = "下午"
  50 + }
42 51 th.setData({
43   - tment_details: data
  52 + tment_details: data,
  53 + arrangeTime: arrangeTime,
  54 + day:day
44 55 })
  56 +
  57 + }else{
  58 + getApp().my_warnning(res.data.msg, 0, th);
45 59 }
46 60 })
47   - */
  61 + },
  62 + //跳到首页
  63 + goto: function (e) {
  64 + wx.switchTab({
  65 + url: '/pages/index/index/index',
  66 + })
48 67 },
49 68 /**
50 69 * 生命周期函数--监听页面显示
... ...
pages/user/my_service/tment_details.wxml
1   -<view class="container">
  1 +<view class="container" wx:for="{{tment_details}}" wx:if="{{index<1}}">
2 2 <!-- 预约人的属性 -->
3 3 <view class="Subscriber">
4 4 <!-- 状态栏 -->
5 5 <view class="statusBar fs32 flex-vertical-between lf">
6 6 <view>预约状态:</view>
7   - <view wx:if="{{tment_details.state==1}}">未服务</view>
8   - <view wx:if="{{tment_details.state==2}}">已服务</view>
9   - <view wx:if="{{tment_details.state==3}}">已过期</view>
10   - <view wx:if="{{tment_details.state==4}}">已取消</view>
  7 + <view wx:if="{{item.State==0}}">未服务</view>
  8 + <view wx:if="{{item.State==1}}">已服务</view>
  9 + <view wx:if="{{item.State==2}}">已过期</view>
  10 + <view wx:if="{{item.State==3}}">已取消</view>
11 11 </view>
12 12 <view class="fs30">
13 13 <view class="items lf">
14 14 <!-- 预约门店 -->
15 15 <view class="flex-vertical bmt">
16 16 <view class="name">预约门店:</view>
17   - <view class="ellipsis-1 value">{{tment_details.store_name}}</view>
  17 + <view class="ellipsis-1 value">{{item.ProjectName}}</view>
18 18 </view>
19 19  
20 20 <!-- 预约项目 -->
21 21 <view class="flex-vertical bmt">
22 22 <view class="name">预约项目:</view>
23   - <view class="ellipsis-1 value">{{tment_details.item}}</view>
  23 + <view class="ellipsis-1 value">{{item.StorageName}}</view>
24 24 </view>
25 25  
26 26 <!-- 预约时间 -->
27 27 <view class="flex-vertical bmt">
28 28 <view class="name">预约时间:</view>
29   - <view class="date">{{tment_details.time}}</view>
30   - <view>{{tment_details.time_interval}}</view>
  29 + <view class="date">{{arrangeTime}}</view>
  30 + <view>{{day}}</view>
31 31 </view>
32 32 </view>
33 33 <view class="bt">
... ... @@ -39,7 +39,7 @@
39 39 <view>容</view>
40 40 <view>师:</view>
41 41 </view>
42   - <view class="ellipsis-1 value">{{tment_details.Beautician}}</view>
  42 + <view class="ellipsis-1 value">{{item.BeauticianName}}</view>
43 43 </view>
44 44 <!-- 预约人及联系方式 -->
45 45 <!-- 姓名 -->
... ... @@ -49,7 +49,7 @@
49 49 <view>约</view>
50 50 <view>人:</view>
51 51 </view>
52   - <view class="ellipsis-1 value">{{tment_details.name}}</view>
  52 + <view class="ellipsis-1 value">{{item.VIPName}}</view>
53 53 </view>
54 54 <!-- 号码 -->
55 55 <view class="flex-vertical">
... ... @@ -58,7 +58,7 @@
58 58 <view>机</view>
59 59 <view>人:</view>
60 60 </view>
61   - <view>{{tment_details.phone}}</view>
  61 + <view>{{item.MobileTel}}</view>
62 62 </view>
63 63 </view>
64 64 </view>
... ... @@ -82,22 +82,25 @@
82 82 <!-- submit栏 -->
83 83 <view class="subs flex-vertical-between fs32">
84 84 <!-- 左边栏 -->
85   - <view class="sub flex-center yellow-b" wx:if="{{tment_details.state==1}}">
86   - <view class="yellow-b" wx:if="{{tment_details.state==1}}">取消预约</view>
  85 + <view class="sub flex-center yellow-b" wx:if="{{item.States==1}}">
  86 + <view class="yellow-b" wx:if="{{item.States==1}}">取消预约</view>
87 87 </view>
88   - <navigator wx:if="{{tment_details.state!=1}}" class="sub flex-center yellow-b" url="/pages/user/my_service/tment_order_list">
  88 + <navigator wx:if="{{item.States!=1}}" class="sub flex-center yellow-b" url="/pages/user/my_service/tment_order_list">
89 89 <view class="yellow-b">我的服务</view>
90 90 </navigator>
91 91 <!-- 右边栏 -->
92   - <navigator wx:if="{{tment_details.state==1}}" class="sub rb flex-center" url="/pages/user/my_service/beauty_deta">
  92 + <navigator wx:if="{{item.States==0}}" class="sub rb flex-center" url="/pages/user/my_service/beauty_deta">
93 93 <view>更改时间</view>
94 94 </navigator>
95   - <navigator wx:if="{{tment_details.state==2}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval">
  95 + <navigator wx:if="{{item.States==1}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval">
96 96 <view>发表评价</view>
97 97 </navigator>
98   - <navigator wx:if="{{tment_details.state==3}}" class="sub rb flex-center" url="/pages/user/my_service/appment_main">
  98 + <navigator wx:if="{{item.States==2}}" class="sub rb flex-center" url="/pages/user/my_service/appment_main">
99 99 <view>重新预约</view>
100 100 </navigator>
  101 + <navigator wx:if="{{item.States==3}}" class="sub rb flex-center" bindtap="goto">
  102 + <view>回到首页</view>
  103 + </navigator>
101 104  
102 105 </view>
103 106 </view>
... ...
pages/user/my_service/tment_eval.js
... ... @@ -9,10 +9,16 @@ Page({
9 9 * 页面的初始数据
10 10 */
11 11 data: {
  12 + url: a.url, //接口网址
12 13 iurl: a.imghost,
13   - stars_index: -1,
14   - labels: [],
15   - sub_evaluate:0
  14 + stars_index: -1, //当前点击的星星下标
  15 + labels: [], //星级标签数组
  16 + sub_evaluate: 0, //是否评价成功
  17 + proposal: "", //用户输入的建议
  18 + proposal_size: 100, //评价意见和建议限定字数
  19 + number: "", //订单单号
  20 + beautician: "", //美容师信息
  21 + fromType: "服务评价", //评价来源
16 22 },
17 23 //点击星级
18 24 check_stars: function(e) {
... ... @@ -41,15 +47,13 @@ Page({
41 47 })
42 48 }
43 49 },
44   - //提交评价
45   - Subs: function() {
46   - var th = this;
47   - th.setData({
48   - sub_evaluate:1
49   - })
50   - wx.navigateTo({
51   - url: "/pages/user/my_service/tment_order_list"
52   - });
  50 + //输入评价意见和建议
  51 + input_proposal: function(e) {
  52 + var th = this;
  53 + var value = e.detail.value;
  54 + th.setData({
  55 + proposal: value
  56 + })
53 57 },
54 58 //图片失败,默认图片
55 59 bind_bnerr1: function(e) {
... ... @@ -76,11 +80,90 @@ Page({
76 80 [labels]: label_id
77 81 })
78 82 },
  83 + //查询美容师信息
  84 + query_bea: function() {
  85 + var th = this;
  86 + var url = "/api/weshop/marketing/reservation/reservation/page";
  87 + var number = th.data.number; //订单编号
  88 + getApp().request.promiseGet(url, {
  89 + data: {
  90 + storeId: a.stoid,
  91 + userId: d.user_id,
  92 + number: number
  93 + }
  94 + }).then(res => {
  95 + if (res.data.code == 0) {
  96 + var data = res.data.data.pageData;
  97 + data = data[0].ArrangeTime.substring(0, 11);
  98 + th.setData({
  99 + beautician: data[0]
  100 + })
  101 + } else {
  102 + getApp().my_warnning(res.data.msg, 0, th);
  103 + }
  104 + })
  105 + },
  106 + //提交评价
  107 + evaluate_save: function() {
  108 + var th = this;
  109 + var stars = th.data.stars_index; //评价星级
  110 + //判断是否评级
  111 + if (stars < 0) {
  112 + getApp().my_warnning("请进行评分", 0, th);
  113 + return false;
  114 + }
  115 + var labels = th.data.labels; //星级标签数组
  116 + var evaLabList = []; //用户选择的评价标签
  117 + // 查询评价标签
  118 + for (var i = 0; i < labels.length; i++) {
  119 + if (labels[i].check) {
  120 + evaLabList.push(labels[i].LabelName);
  121 + }
  122 + }
  123 + var url = th.data.url + "/api/weshop/evaluation/evaluate/save";
  124 + var posNo = th.data.number; //收银单号
  125 + var proposal = th.data.proposal; //用户建议内容
  126 + var fromType = th.data.fromType; //评价来源
  127 + var json = {
  128 + "storeId": a.stoid,
  129 + "evaLabList": evaLabList,
  130 + "fromType": "预约评价",
  131 + "posNo": posNo,
  132 + "remark": proposal,
  133 + "star": stars + 1
  134 + };
  135 + var data = JSON.stringify(json); //转换成json格式
  136 + wx.request({
  137 + url: url,
  138 + data: data,
  139 + method: 'POST',
  140 + header: {
  141 + 'content-type': 'application/json'
  142 + }, // 设置请求的 header
  143 + success: function(res) {
  144 + if (res.data.code == 0) {
  145 + th.setData({
  146 + sub_evaluate: 1
  147 + })
  148 + wx.navigateTo({
  149 + url: "/pages/user/my_service/tment_order_list"
  150 + });
  151 + } else {
  152 + getApp().my_warnning(res.data.msg, 0, th);
  153 + }
  154 + }
  155 + })
  156 +
  157 + },
79 158 /**
80 159 * 生命周期函数--监听页面加载
81 160 */
82 161 onLoad: function(options) {
83   -
  162 + var th = this;
  163 + th.setData({
  164 + number: options.Number
  165 + })
  166 + th.query_bea();
84 167 },
85 168  
86 169 /**
... ...
pages/user/my_service/tment_eval.wxml
... ... @@ -8,19 +8,19 @@
8 8 <!-- 姓名 -->
9 9 <view class="flex-level item">
10 10 <view class="itemlf fs32">美容师:</view>
11   - <view class="itemlr fs30 ellipsis-1">钱巧玲</view>
  11 + <view class="itemlr fs30 ellipsis-1">{{beautician.BeauticianName}}</view>
12 12 </view>
13 13  
14 14 <!-- 项目 -->
15 15 <view class="flex-center item">
16 16 <view class="itemlf fs32">服务项目:</view>
17   - <view class="itemlr fs30 ellipsis-1">头部按摩</view>
  17 + <view class="itemlr fs30 ellipsis-1">{{beautician.ProjectName}}</view>
18 18 </view>
19 19  
20 20 <!-- 时间 -->
21 21 <view class="flex-center">
22 22 <view class="itemlf fs32">服务时间:</view>
23   - <view class="itemlr fs30">2019-09-06</view>
  23 + <view class="itemlr fs30">{{beautician.ArrangeTime}}</view>
24 24 </view>
25 25 <!-- 设置虚线 -->
26 26  
... ... @@ -31,13 +31,17 @@
31 31 </view>
32 32 <view class="tea_labs">
33 33 <view class="flex-center fs26">
34   - <textarea placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="270"></textarea>
  34 + <textarea class="rel" placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="{{proposal_size}}" bindinput="input_proposal" value="{{proposal}}">
  35 + <!-- 提示已输入多少数字 -->
  36 + <view class="proposal abs">{{proposal.length}}/{{proposal_size}}</view>
  37 + </textarea>
35 38 </view>
36 39  
37   - <view wx:if="{{labels.length>0}}" class="labels flex fs26 ellipsis-3">
  40 + <view wx:if="{{labels.length>0}}" class="labels flex fs24 ellipsis-3">
38 41 <view class="label {{item.check==1?'checklabel':''}} flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key">
39 42 <view class="ellipsis-1">{{item.LabelName}}</view>
40 43 </view>
  44 +
41 45 </view>
42 46 </view>
43 47  
... ... @@ -45,7 +49,7 @@
45 49 <view>满意的话请打五星噢,谢谢您的支持!</view>
46 50 </view>
47 51  
48   - <navigator class="Subs fs32 flex-center" bindtap="Subs">
  52 + <navigator class="Subs fs32 flex-center" bindtap="evaluate_save">
49 53 <view class="Submission flex-center">
50 54 <view>确认提交</view>
51 55 </view>
... ...
pages/user/my_service/tment_eval.wxss
1 1 .container {
2 2 border-top: 7rpx solid rgb(245, 245, 245);
  3 + padding-bottom: 100rpx;
3 4 }
4 5  
5 6 .head {
... ... @@ -41,9 +42,15 @@
41 42 padding: 0rpx 56rpx;
42 43 }
43 44  
  45 +.proposal {
  46 + right: 20rpx;
  47 + bottom: 20rpx;
  48 + color: rgb(152, 152, 152);
  49 +}
  50 +
44 51 textarea {
45 52 width: 100%;
46   - height: 240rpx;
  53 + height: 200rpx;
47 54 margin-top: 70rpx;
48 55 border: 2rpx solid rgb(203, 203, 203);
49 56 border-radius: 13rpx;
... ... @@ -55,21 +62,25 @@ textarea {
55 62 }
56 63  
57 64 .labels {
58   - margin-bottom: 35rpx;
  65 + margin-bottom: 25rpx;
59 66 display: inline-block;
60 67 max-height: 240rxp;
  68 + line-height: 50rpx;
  69 + padding-left: 15rpx;
61 70 }
62 71  
63 72 .label {
64   - padding: 0rpx 15rpx;
  73 + padding: 0rpx 10rpx;
65 74 height: 48rpx;
66 75 line-height: 48rpx;
67 76 border: 2rpx solid rgb(218, 218, 218);
68 77 color: rgb(152, 152, 152);
69 78 border-radius: 5rpx;
70   - margin-right: 15rpx;
71   - max-width: 165rpx;
  79 + margin-right: 20rpx;
  80 + width: 165rpx;
72 81 display: inline-block;
  82 + text-align: center;
  83 + margin-bottom: 10rpx;
73 84 }
74 85  
75 86 /* 选择标签的样式 */
... ... @@ -85,14 +96,17 @@ textarea {
85 96 margin-bottom: 70rpx;
86 97 }
87 98  
88   -.Subs{
89   - background-color: rgb(255,255,255);
  99 +.Subs {
  100 + background-color: rgb(255, 255, 255);
  101 + position: fixed;
  102 + width: 100%;
  103 + bottom: 40rpx;
90 104 }
91 105  
92 106 .Submission {
93 107 width: 400rpx;
94 108 height: 65rpx;
95   - border-radius: 40rpx;
  109 + border-radius: 60rpx;
96 110 background-color: rgb(214, 1, 33);
97 111 color: rgb(255, 255, 255);
98 112 }
... ...
pages/user/my_service/tment_order_list.js
... ... @@ -9,7 +9,8 @@ Page({
9 9 * 页面的初始数据
10 10 */
11 11 data: {
12   - iurl: a.imghost,
  12 + url: a.url, //接口网址
  13 + iurl: a.imghost, //图片网址
13 14 activeCategoryId: 0, //类别选中下标
14 15 defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
15 16 categories: [{
... ... @@ -26,11 +27,12 @@ Page({
26 27 id: 3
27 28 }],
28 29 tm_order_list: [], //我的预约订单列表
29   - is_service_read: 0,
30 30 curpage: 1, //当前分页数
31 31 pageSize: 10, //页大小
32 32 total: 0,
33 33 ismore: 0, //是否加载完毕
  34 + is_read: 0, //是否加载接口
  35 + states: 4, //4为取消预约
34 36 },
35 37  
36 38 /**
... ... @@ -48,7 +50,8 @@ Page({
48 50 activeCategoryId: id,
49 51 tm_order_list: [],
50 52 curpage: 1,
51   - ismore: 0
  53 + ismore: 0,
  54 + is_read: 0
52 55 })
53 56 th.query_orderList();
54 57 } else {
... ... @@ -80,17 +83,76 @@ Page({
80 83 getApp().request.promiseGet(url, {
81 84 data: {
82 85 storeId: a.stoid,
83   - userId: 5682130,
84   - state: state_index
  86 + userId: d.user_id,
  87 + state: state_index,
  88 + page: th.data.curpage,
  89 + pageSize: th.data.pageSize
85 90 }
86 91 }).then(res => {
  92 +
87 93 if (res.data.code == 0) {
88   - var data = res.data.data.pageData;
  94 + wx.hideLoading();
  95 + th.data.curpage++;
  96 + var arr1 = th.data.tm_order_list;
  97 + var arr2 = res.data.data.pageData;
  98 + var arr3 = [...arr1, ...arr2];
  99 + var ismore = 0;
  100 + if (arr3.length == res.data.data.total) ismore = 1
89 101 th.setData({
90   - tm_order_list: data
91   - })
  102 + tm_order_list: arr3,
  103 + total: res.data.data.total,
  104 + ismore: ismore,
  105 + is_read:1
  106 + }), wx.stopPullDownRefresh(); //停止下拉刷新 {
92 107 } else {
93   - getApp().my_warnning(res.data.msg, 0, this); //调用失败提示
  108 + th.setData({
  109 + tm_order_list: [],
  110 + is_read: 1
  111 + })
  112 + }
  113 + })
  114 +
  115 + },
  116 + //取消预约
  117 + cancel_tment: function(e) {
  118 + var th = this;
  119 + var index = e.currentTarget.dataset.index;
  120 + var states = th.data.states;
  121 + var order_list = th.data.tm_order_list;
  122 + var number = order_list[index].Number;
  123 + var json = {
  124 + "number": number,
  125 + "storeId": a.stoid,
  126 + "states": 3
  127 + };
  128 + var data = JSON.stringify(json);
  129 + var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  130 + wx.request({
  131 + url: url,
  132 + data: data,
  133 + method: 'put',
  134 + header: {
  135 + 'content-type': 'application/json'
  136 + }, // 设置请求的 header
  137 + success: function(res) {
  138 + if (res.data.code == 0) {
  139 + getApp().my_warnning("取消成功", 0, th);
  140 + var id = th.data.activeCategoryId;
  141 + if (id == 1) {
  142 + order_list.splice(index, 1);
  143 + th.setData({
  144 + tm_order_list: order_list
  145 + })
  146 + } else {
  147 + var start = 'tm_order_list[' + index + '].State';
  148 + th.setData({
  149 + [start]: 3
  150 + })
  151 + }
  152 +
  153 + } else {
  154 + getApp().my_warnning(res.data.msg, 0, th);
  155 + }
94 156 }
95 157 })
96 158  
... ... @@ -118,8 +180,8 @@ Page({
118 180 */
119 181 onReachBottom: function() {
120 182 var th = this;
121   - if (this.data.total <= th.data.pageSize) return;
122   - if (this.data.ismore) return;
  183 + if (th.data.total <= th.data.pageSize) return;
  184 + if (th.data.ismore) return;
123 185  
124 186 wx.showLoading({
125 187 title: '加载中...',
... ...
pages/user/my_service/tment_order_list.wxml
... ... @@ -18,6 +18,7 @@
18 18 <view wx:if="{{item.State==1}}">已服务</view>
19 19 <view wx:if="{{item.State==2}}">已过期</view>
20 20 <view wx:if="{{item.State==3}}">已取消</view>
  21 + <view wx:if="{{item.State>3}}">订单异常</view>
21 22 </view>
22 23 </view>
23 24  
... ... @@ -36,7 +37,7 @@
36 37 </view>
37 38 <view class="item flex-vertical">
38 39 <view class="itemname">预约项目:</view>
39   - <view class="itemvalue ellipsis-1">{{item.projectName}}</view>
  40 + <view class="itemvalue ellipsis-1">{{item.ProjectName}}</view>
40 41 </view>
41 42 <view class="item flex-vertical">
42 43 <view class="itemname">美容师:</view>
... ... @@ -44,11 +45,11 @@
44 45 </view>
45 46 <view class="item flex-vertical">
46 47 <view class="itemname">预约时间:</view>
47   - <view>{{item.ArrangeTime}}</view>
  48 + <view>{{item.BillDate}}</view>
48 49 </view>
49   - <view class="item flex-vertical" wx:if="{{item.BillDate==''?false:true}}">
  50 + <view class="item flex-vertical" wx:if="{{item.ArrangeTime==''?false:true}}">
50 51 <view class="itemname">服务时间:</view>
51   - <view>{{item.BillDate}}</view>
  52 + <view>{{item.ArrangeTime}}</view>
52 53 </view>
53 54 </view>
54 55  
... ... @@ -57,18 +58,17 @@
57 58 <view class="Unim flex-right-vertical fs26 padding">
58 59 <image wx:if="{{item.State==0}}" src="{{iurl}}miniapp/images/order/code.png" class="code" bindtap="code_show" data-order_sn="{{item.Number}}"></image>
59 60 <block wx:if="{{item.State==0}}">
60   - <navigator url="/pages/user/my_service/tment_details" class="Unimportance flex-level">取消预约</navigator>
  61 + <view class="Unimportance flex-level" data-index="{{index}}" bindtap="cancel_tment">取消预约</view>
61 62 </block>
62 63 <block wx:else>
63   - <navigator url="/pages/user/my_service/tment_details" class="Unimportance flex-level">查看详情</navigator>
  64 + <navigator url="/pages/user/my_service/tment_details?number={{item.Number}}" class="Unimportance flex-level">查看详情</navigator>
64 65 </block>
65   - <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/pages/user/my_service/beauty_deta">更改时间</navigator>
66   - <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval" class="important Unimportance flex-level">发表评价</navigator>
67   - <navigator wx:if="{{item.State==2}}" url="/pages/user/my_service/appment_main" class="important Unimportance flex-level">重新预约</navigator>
68   -
  66 + <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}">更改时间</navigator>
  67 + <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}" class="important Unimportance flex-level">发表评价</navigator>
  68 + <navigator wx:if="{{item.State==2 || item.State==3}}" url="/pages/user/my_service/appment_main?itemId={{item.ProjectID}}&BuyType={{item.BuyType}}" class="important Unimportance flex-level">重新预约</navigator>
69 69 </view>
70 70 </view>
71   - <view class="exactly flex-center fs26" wx:if="{{ismore && service_List.length>=pageSize}}">
  71 + <view class="exactly flex-center fs26" wx:if="{{ismore & tm_order_list.length>3}}">
72 72 <view class="line"></view>
73 73 <view class="exactly_text">到底了</view>
74 74 <view class="line"></view>
... ... @@ -77,9 +77,9 @@
77 77 </view>
78 78  
79 79 <!-- 无预约订单 -->
80   -<view class="empty_order" wx:if="{{tm_order_list.length<1 && is_service_read }}">
  80 +<view class="empty_order" wx:if="{{tm_order_list.length<1 && is_read}}">
81 81 <view class="flex-level">
82   - <image src="{{iurl}}miniapp/images/order/empty_order.png"></image>
  82 + <image src="{{iurl}}miniapp/images/order/empty_order.png" lazy-load="true"></image>
83 83 </view>
84 84 <view class="flex-level fs30 xc-ash">暂无预约记录</view>
85 85 <view class="flex-level">
... ...
pages/user/my_service/tment_order_list.wxss
... ... @@ -115,7 +115,7 @@ page {
115 115  
116 116 .empty_order image {
117 117 width: 300rpx;
118   - height: 300rpx;
  118 + height: 280rpx;
119 119 margin-top: 202rpx;
120 120 }
121 121  
... ...