Commit 6e196763749c47ef9055e32efe9ebafa8afee5b4

Authored by iceling
1 parent 6fc930c7

数据填充及样式调整

pages/user/index/index.wxml
@@ -192,7 +192,7 @@ @@ -192,7 +192,7 @@
192 <view class="four-level-word">我的地址</view> 192 <view class="four-level-word">我的地址</view>
193 </view> 193 </view>
194 194
195 - <view class="item t-c" data-url="/pages/user/my_service/my_service" bindtap="goto" > 195 + <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto" >
196 <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> 196 <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image>
197 <view class="four-level-word">我的服务</view> 197 <view class="four-level-word">我的服务</view>
198 </view> 198 </view>
pages/user/my_service/appment_main.js
@@ -22,7 +22,7 @@ Page({ @@ -22,7 +22,7 @@ Page({
22 pageSize: 8, //页大小 22 pageSize: 8, //页大小
23 total: 0, 23 total: 0,
24 ismore: 0, //是否加载完毕 24 ismore: 0, //是否加载完毕
25 - itemId: "", //项目id 25 + itemId: "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6", //项目id
26 isScroll: true, //scroll-y是否可以滑动 26 isScroll: true, //scroll-y是否可以滑动
27 key_word: "", //是否按门店文字查询 27 key_word: "", //是否按门店文字查询
28 is_service_read: 0, //是否调用过门店接口 28 is_service_read: 0, //是否调用过门店接口
@@ -30,6 +30,7 @@ Page({ @@ -30,6 +30,7 @@ Page({
30 is_success: 0, //是否提交成功 30 is_success: 0, //是否提交成功
31 remarks: "", //备注 31 remarks: "", //备注
32 storageId: "", //线下门店id 32 storageId: "", //线下门店id
  33 + url:"/pages/user/my_service/appment_main",//本页面地址路径用于选择时间页面跳转回来
33 }, 34 },
34 onclickstore: function() { 35 onclickstore: function() {
35 var th = this; 36 var th = this;
@@ -75,31 +76,36 @@ Page({ @@ -75,31 +76,36 @@ Page({
75 // return false; 76 // return false;
76 // } 77 // }
77 78
78 - var url = "/api/weshop/marketing/reservation/reservation/insert";  
79 - getApp().request.post(url, {  
80 - data: {  
81 - projectID: "",  
82 - beauticianID: "",  
83 - buyType: "",  
84 - storeId: a.stoid,  
85 - storageID: "",  
86 - arrangeTime: "",  
87 - userId: d.user_id,  
88 - remark: "",  
89 - states: ""  
90 - }  
91 - }).then(res => {  
92 - if (res.data.code == 0) {  
93 - th.setData({  
94 - is_success: 1  
95 - })  
96 - wx.navigateTo({ 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({
97 url: "/pages/user/my_service/tment_details" 107 url: "/pages/user/my_service/tment_details"
98 }); 108 });
99 - } else {  
100 - getApp().my_warnning(res.data.msg, 0, th);  
101 - }  
102 - })  
103 }, 109 },
104 goto: function(e) { 110 goto: function(e) {
105 var th = this; 111 var th = this;
@@ -260,11 +266,12 @@ Page({ @@ -260,11 +266,12 @@ Page({
260 nav_bea: function() { 266 nav_bea: function() {
261 var th = this; 267 var th = this;
262 var storageId = th.data.storageId; //线下门店id 268 var storageId = th.data.storageId; //线下门店id
  269 + var itemId = th.data.itemId;
263 if (storageId == "") { 270 if (storageId == "") {
264 getApp().my_warnning("请选择服务门店", 0, th); 271 getApp().my_warnning("请选择服务门店", 0, th);
265 } else { 272 } else {
266 wx.navigateTo({ 273 wx.navigateTo({
267 - url: "/pages/user/my_service/cosmetology_list" 274 + url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId
268 }); 275 });
269 } 276 }
270 }, 277 },
pages/user/my_service/appment_main.wxml
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 </view> 54 </view>
55 55
56 <!-- 选择门店 --> 56 <!-- 选择门店 -->
57 - <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta" bindtap="goto"> 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> 58 <view class="color">选择时间</view>
59 <view class="angle angler">∟</view> 59 <view class="angle angler">∟</view>
60 </view> 60 </view>
@@ -108,7 +108,7 @@ @@ -108,7 +108,7 @@
108 <icon bindtap="onclickstore" color="black" size="22" type="cancel"></icon> 108 <icon bindtap="onclickstore" color="black" size="22" type="cancel"></icon>
109 </view> 109 </view>
110 <view class="searchbar flex-vertical-between storeListpadd"> 110 <view class="searchbar flex-vertical-between storeListpadd">
111 - <input class="inputstore fs28" placeholder="{{key_word==''?'输入要搜索的门店':key_word}}" placeholder-class="fs28" maxlength="16" bindinput="input_store"/> 111 + <input class="inputstore fs28" placeholder="{{key_word==''?'输入要搜索的门店':key_word}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" />
112 <view class="search flex-center" bindtap="search_store"> 112 <view class="search flex-center" bindtap="search_store">
113 <view class="fs28">搜索</view> 113 <view class="fs28">搜索</view>
114 </view> 114 </view>
pages/user/my_service/appment_main.wxss
@@ -12,15 +12,18 @@ @@ -12,15 +12,18 @@
12 margin-right: 15rpx; 12 margin-right: 15rpx;
13 margin-bottom: 10rpx; 13 margin-bottom: 10rpx;
14 font-size: 26rpx; 14 font-size: 26rpx;
15 - color: rgb(142,142,142); 15 + color: rgb(142, 142, 142);
16 } 16 }
17 -.angler{  
18 - transform: rotate(227deg);  
19 - margin-bottom: 0rpx; 17 +
  18 +.angler {
  19 + transform: rotate(227deg);
  20 + margin-bottom: 0rpx;
20 } 21 }
21 -.users{  
22 - background-color: rgb(255,255,255); 22 +
  23 +.users {
  24 + background-color: rgb(255, 255, 255);
23 } 25 }
  26 +
24 .user { 27 .user {
25 width: 40rpx; 28 width: 40rpx;
26 height: 40rpx; 29 height: 40rpx;
@@ -111,7 +114,7 @@ @@ -111,7 +114,7 @@
111 border-radius: 10rpx; 114 border-radius: 10rpx;
112 } 115 }
113 116
114 -.beauticians{ 117 +.beauticians {
115 width: 407rpx; 118 width: 407rpx;
116 z-index: 3; 119 z-index: 3;
117 top: 45rpx; 120 top: 45rpx;
@@ -126,9 +129,11 @@ @@ -126,9 +129,11 @@
126 border-bottom: 2rpx solid rgb(238, 238, 238); 129 border-bottom: 2rpx solid rgb(238, 238, 238);
127 padding-left: 25rpx; 130 padding-left: 25rpx;
128 } 131 }
129 -.beaclone{ 132 +
  133 +.beaclone {
130 border-bottom: 0rpx; 134 border-bottom: 0rpx;
131 } 135 }
  136 +
132 .notes { 137 .notes {
133 margin-top: 15rpx; 138 margin-top: 15rpx;
134 margin-bottom: 60rpx; 139 margin-bottom: 60rpx;
@@ -259,10 +264,12 @@ @@ -259,10 +264,12 @@
259 color: rgb(255, 255, 255); 264 color: rgb(255, 255, 255);
260 margin: 20rpx 0rpx; 265 margin: 20rpx 0rpx;
261 } 266 }
262 -.value{ 267 +
  268 +.value {
263 max-width: 300rpx; 269 max-width: 300rpx;
264 } 270 }
265 -.notstore{ 271 +
  272 +.notstore {
266 height: 80rpx; 273 height: 80rpx;
267 color: rgb(159, 159, 159); 274 color: rgb(159, 159, 159);
268 -}  
269 \ No newline at end of file 275 \ No newline at end of file
  276 +}
pages/user/my_service/beauty_deta.js
@@ -10,6 +10,7 @@ Page({ @@ -10,6 +10,7 @@ Page({
10 */ 10 */
11 data: { 11 data: {
12 iurl: a.imghost, 12 iurl: a.imghost,
  13 + url:"",//选择选择时间后返回的页面
13 defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg", 14 defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
14 seekTime: "2019-11-18", //当前服务预约选择的时间 15 seekTime: "2019-11-18", //当前服务预约选择的时间
15 time_list: [], //可预约时间 16 time_list: [], //可预约时间
@@ -18,21 +19,54 @@ Page({ @@ -18,21 +19,54 @@ Page({
18 head_img: "", //美容师头像 19 head_img: "", //美容师头像
19 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"], 20 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"],
20 time_index: 0, //选择预约时间下标 21 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 + date_id: 0, //选择日期的id
21 }, 52 },
22 53
23 /** 54 /**
24 * 生命周期函数--监听页面加载 55 * 生命周期函数--监听页面加载
25 */ 56 */
26 onLoad: function(options) { 57 onLoad: function(options) {
27 - 58 + var th = this;
  59 + th.setData({
  60 + url:options.url
  61 + })
  62 + th.query_beatea();
  63 + th.query_date();
28 }, 64 },
29 /** 65 /**
30 * 生命周期函数--监听页面显示 66 * 生命周期函数--监听页面显示
31 */ 67 */
32 onShow: function() { 68 onShow: function() {
33 - var th = this;  
34 - th.query_beatea();  
35 - th.query_date(); 69 +
36 }, 70 },
37 //图片失败,默认图片 71 //图片失败,默认图片
38 bind_bnerr1: function(e) { 72 bind_bnerr1: function(e) {
@@ -44,6 +78,14 @@ Page({ @@ -44,6 +78,14 @@ Page({
44 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 78 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
45 } 79 }
46 }, 80 },
  81 + //选择服务日期
  82 + check_date: function(e) {
  83 + var th = this;
  84 + var id = e.currentTarget.dataset.dateid;
  85 + th.setData({
  86 + date_id: id
  87 + })
  88 + },
47 //获取美容师信息 89 //获取美容师信息
48 query_beatea: function() { 90 query_beatea: function() {
49 var th = this; 91 var th = this;
@@ -72,8 +114,10 @@ Page({ @@ -72,8 +114,10 @@ Page({
72 }) 114 })
73 }, 115 },
74 //返回上个页面 116 //返回上个页面
75 - navigateBack:function(){  
76 - wx.navigateBack({ changed: true });//返回上一页 117 + navigateBack: function() {
  118 + wx.navigateBack({
  119 + changed: true
  120 + }); //返回上一页
77 }, 121 },
78 //选择时间 122 //选择时间
79 Selection_time: function(e) { 123 Selection_time: function(e) {
@@ -86,7 +130,7 @@ Page({ @@ -86,7 +130,7 @@ Page({
86 th.setData({ 130 th.setData({
87 time_index: index 131 time_index: index
88 }) 132 })
89 - } 133 + }
90 }, 134 },
91 135
92 query_date: function() { 136 query_date: function() {
@@ -115,7 +159,7 @@ Page({ @@ -115,7 +159,7 @@ Page({
115 } 159 }
116 } 160 }
117 } 161 }
118 - console.log("1111111111"+time_list.length); 162 + console.log("1111111111" + time_list.length);
119 th.setData({ 163 th.setData({
120 time_list: time_list 164 time_list: time_list
121 }) 165 })
pages/user/my_service/beauty_deta.wxml
@@ -20,12 +20,12 @@ @@ -20,12 +20,12 @@
20 <view> 20 <view>
21 <view class="fs36" style="margin-bottom:35rpx;">服务预约</view> 21 <view class="fs36" style="margin-bottom:35rpx;">服务预约</view>
22 <scroll-view class="scroll-h fs26 " scroll-x> 22 <scroll-view class="scroll-h fs26 " scroll-x>
23 - <view class="rel" wx:for="111111" style="display: inline-block;">  
24 - <view class="scroll-item-h bd {{index==0?'chbd':''}}">  
25 - <view>今天</view>  
26 - <view>09月10日</view> 23 + <view class="rel" wx:for="{{date}}" style="display: inline-block;">
  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>
27 </view> 27 </view>
28 - <block wx:if="{{index==0}}"> 28 + <block wx:if="{{index==date_id}}">
29 <view class="abs box"></view> 29 <view class="abs box"></view>
30 </block> 30 </block>
31 </view> 31 </view>
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 <view class="Times"> 36 <view class="Times">
37 37
38 <view class="flex-center" wx:for="{{time}}" style="display:inline-block;"> 38 <view class="flex-center" wx:for="{{time}}" style="display:inline-block;">
39 - <block wx:if="{{item==time_list[index]}}"> 39 + <block wx:if="{{item!=time_list[index]}}">
40 <!-- {{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}}"> 41 <view class="Time flex-center {{time_index==index?'chTime':''}}" bindtap="Selection_time" data-index="{{index}}">
42 <view> 42 <view>
pages/user/my_service/cosmetology_list.js
1 var e = getApp(), 1 var e = getApp(),
2 a = e.globalData.setting, 2 a = e.globalData.setting,
3 os = a, 3 os = a,
4 - t = e.request; 4 + t = e.request,
  5 + d = e.globalData;
5 Page({ 6 Page({
6 7
7 /** 8 /**
@@ -10,13 +11,15 @@ Page({ @@ -10,13 +11,15 @@ Page({
10 data: { 11 data: {
11 iurl: a.imghost, 12 iurl: a.imghost,
12 cosmetology_list: [], //美容师列表 13 cosmetology_list: [], //美容师列表
13 - is_cosmetology_read: 0,//是否有读过美容师接口,该属性用在没有美容师列表的排版 14 + is_cosmetology_read: 0, //是否有读过美容师接口,该属性用在没有美容师列表的排版
14 curpage: 1, //当前分页数 15 curpage: 1, //当前分页数
15 pageSize: 10, //页大小 16 pageSize: 10, //页大小
16 - total: 0,//总数量 17 + total: 0, //总数量
17 ismore: 0, //是否加载完毕 18 ismore: 0, //是否加载完毕
  19 + itemId: 0, //项目id,
  20 + storageId: 0, //线下门店id
18 }, 21 },
19 - onReachBottom: function () { 22 + onReachBottom: function() {
20 var th = this; 23 var th = this;
21 if (this.data.total <= th.data.pageSize) return; 24 if (this.data.total <= th.data.pageSize) return;
22 if (this.data.ismore) return; 25 if (this.data.ismore) return;
@@ -27,52 +30,41 @@ Page({ @@ -27,52 +30,41 @@ Page({
27 }, 30 },
28 query_cology: function() { 31 query_cology: function() {
29 var th = this; 32 var th = this;
30 - var url = "http://localhost:8022/api/weshop/yy_fuwu_meirongshi";  
31 - wx.request({  
32 - url: url,  
33 - success: function(res) {  
34 - if (res.data.code == 0) {  
35 - th.setData({  
36 - cosmetology_list: res.data.data.pageData  
37 - })  
38 - } 33 + var url = "/api/weshop/marketing/reservation/staff/page";
  34 + getApp().request.promiseGet(url, {
  35 + data: {
  36 + storeId: a.stoid,
  37 + userId: 5682130, //5682130 d.user_id
  38 + itemId:"08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6",
  39 + storageId: "FD8EC44A-6474-4BA1-A17C-A87306690E59",
  40 + page: th.data.curpage,
  41 + pageSize: th.data.pageSize
  42 + }
  43 + }).then(res => {
  44 + if (res.data.code == 0) {
  45 + wx.hideLoading();
  46 + th.data.curpage++;
  47 + var arr1 = th.data.cosmetology_list;
  48 + var arr2 = res.data.data.pageData;
  49 + var arr3 = [...arr1, ...arr2];
  50 + var ismore = 0;
  51 + if (arr3.length == res.data.data.total) ismore = 1
  52 + th.setData({
  53 + cosmetology_list: arr3,
  54 + total: res.data.data.total,
  55 + ismore: ismore,
  56 + is_service_read: 1,
  57 + }), wx.stopPullDownRefresh(); //停止下拉刷新
39 } 58 }
40 }) 59 })
41 -  
42 - // var th = this;  
43 - // var url = "http://localhost:8022/api/weshop/yy_fuwu_meirongshi";  
44 - // getApp().request.promiseGet(url, {  
45 - // data: {  
46 - // storeId: a.stoid,  
47 - // userId: d.user_id,  
48 - // page: th.data.curpage,  
49 - // pageSize: th.data.pageSize  
50 - // }  
51 - // }).then(res => {  
52 - // if (res.data.code == 0) {  
53 - // wx.hideLoading();  
54 - // th.data.curpage++;  
55 - // var arr1 = th.data.cosmetology_list;  
56 - // var arr2 = res.data.data.pageData;  
57 - // var arr3 = [...arr1, ...arr2];  
58 - // var ismore = 0;  
59 - // if (arr3.length == res.data.data.total) ismore = 1  
60 - // th.setData({  
61 - // cosmetology_list: arr3,  
62 - // total: res.data.data.total,  
63 - // ismore: ismore,  
64 - // is_service_read: 1,  
65 - // }), wx.stopPullDownRefresh(); //停止下拉刷新  
66 - // }  
67 - // })  
68 }, 60 },
69 //图片失败,默认图片 61 //图片失败,默认图片
70 - bind_bnerr1: function (e) { 62 + bind_bnerr1: function(e) {
71 var _errImg = e.target.dataset.errorimg; 63 var _errImg = e.target.dataset.errorimg;
72 var _Img = e.target.dataset.img; 64 var _Img = e.target.dataset.img;
73 if (_Img != undefined) { 65 if (_Img != undefined) {
74 var _errObj = {}; 66 var _errObj = {};
75 - _errObj[_errImg] = "/miniapp/images/no_cate_def.png"; 67 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
76 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 68 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
77 } 69 }
78 }, 70 },
@@ -86,6 +78,11 @@ Page({ @@ -86,6 +78,11 @@ Page({
86 // for (var i = 0; i < split.length; i++) { 78 // for (var i = 0; i < split.length; i++) {
87 // console.log("成功啦啦啦啦"+split[i]+i); 79 // console.log("成功啦啦啦啦"+split[i]+i);
88 // } 80 // }
  81 + var th = this;
  82 + th.setData({
  83 + itemId: options.itemId,
  84 + storageId: options.storageId
  85 + })
89 }, 86 },
90 87
91 /** 88 /**
pages/user/my_service/cosmetology_list.wxml
@@ -8,24 +8,24 @@ @@ -8,24 +8,24 @@
8 <!-- 个人属性 --> 8 <!-- 个人属性 -->
9 <view class="flex-vertical-between"> 9 <view class="flex-vertical-between">
10 <view class="flex-vertical"> 10 <view class="flex-vertical">
11 - <image class="portrait" src="{{item.img}}" lazy-load="true" data-errorimg="cosmetology_list[{{index}}].img" binderror="bind_bnerr1" data-img="{{item.img}}"></image> 11 + <image class="portrait" src="{{iurl+item.PhotoUrl}}" lazy-load="true" data-errorimg="cosmetology_list[{{index}}].PhotoUrl" binderror="bind_bnerr1" data-img="{{item.PhotoUrl}}"></image>
12 <view> 12 <view>
13 <!-- 用户名 --> 13 <!-- 用户名 -->
14 - <view class="UserName ellipsis-1 fs32">{{item.name}}</view> 14 + <view class="UserName ellipsis-1 fs32">{{item.StaffName}}</view>
15 <!-- 评价星数 --> 15 <!-- 评价星数 -->
16 <view class="flex" style="margin-top:10rpx;"> 16 <view class="flex" style="margin-top:10rpx;">
17 - <image class="Stars" src="{{iurl}}/miniapp/images/StarsredCk.png" wx:for="11111"></image> 17 + <image class="Stars" src="{{iurl}}{{key<item.Star || item.Star==''?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{item.Star==''?5:it.Star}}" wx:for-index="key" wx:for-item="it"></image>
18 <!-- images/StarswhiteUnCk.png//白色星星地址 --> 18 <!-- images/StarswhiteUnCk.png//白色星星地址 -->
19 </view> 19 </view>
20 <!-- 个人标签 --> 20 <!-- 个人标签 -->
21 - <view class="Label fs22 flex" wx:if="{{true}}">  
22 - <view class="flex-center Labelitem itone"> 21 + <view class="Label fs22 flex" wx:if="{{item.EvaluationLabel!=''?true:false}} " wx:for="{{item.EvaluationLabel.split('|')}}">
  22 + <view wx:if="{{index==0}}" class="flex-center Labelitem itone">
23 <view>{{item.type_a}}</view> 23 <view>{{item.type_a}}</view>
24 </view> 24 </view>
25 - <view class="flex-center Labelitem itwo"> 25 + <view wx:if="{{index==1}}" class="flex-center Labelitem itwo">
26 <view>{{item.type_b}}</view> 26 <view>{{item.type_b}}</view>
27 </view> 27 </view>
28 - <view class="flex-center Labelitem ith"> 28 + <view wx:if="{{index==2}}" class="flex-center Labelitem ith">
29 <view>{{item.type_c}}</view> 29 <view>{{item.type_c}}</view>
30 </view> 30 </view>
31 31
@@ -34,20 +34,18 @@ @@ -34,20 +34,18 @@
34 </view> 34 </view>
35 35
36 <!-- 预约状态 --> 36 <!-- 预约状态 -->
37 - <block wx:if="{{item.type}}">  
38 - <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta">  
39 - <view class="fs24">预约</view>  
40 - </navigator>  
41 - </block>  
42 - <block wx:else> 37 + <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta">
  38 + <view class="fs24">预约</view>
  39 + </navigator>
  40 + <!-- <block wx:else>
43 <navigator class="flex-center gofu gofull" url="/pages/user/my_service/beauty_deta"> 41 <navigator class="flex-center gofu gofull" url="/pages/user/my_service/beauty_deta">
44 <view class="fs24">已约满</view> 42 <view class="fs24">已约满</view>
45 </navigator> 43 </navigator>
46 - </block> 44 + </block> -->
47 </view> 45 </view>
48 <view class="fs26 information"> 46 <view class="fs26 information">
49 <block wx:if="{{true}}"> 47 <block wx:if="{{true}}">
50 - <view class="ellipsis-3">{{item.remark1}} 48 + <view class="ellipsis-3">{{item.Remark1}}
51 </view> 49 </view>
52 </block> 50 </block>
53 <block wx:else> 51 <block wx:else>
pages/user/my_service/cosmetology_list.wxss
1 page{ 1 page{
2 height: 100%; 2 height: 100%;
3 - background-color: rgb(238, 238, 238);  
4 } 3 }
5 .container{ 4 .container{
6 background-color: rgb(255,255,255); 5 background-color: rgb(255,255,255);
@@ -70,11 +69,13 @@ page{ @@ -70,11 +69,13 @@ page{
70 .go { 69 .go {
71 border: 1rpx solid rgb(196, 26, 46); 70 border: 1rpx solid rgb(196, 26, 46);
72 color: rgb(196, 26, 46); 71 color: rgb(196, 26, 46);
  72 + background-color: rgb(255,255,255);
73 } 73 }
74 74
75 .gofull { 75 .gofull {
76 border: 1rpx solid rgb(185, 185, 185); 76 border: 1rpx solid rgb(185, 185, 185);
77 color: rgb(185, 185, 185); 77 color: rgb(185, 185, 185);
  78 + background-color: rgb(255,255,255);
78 } 79 }
79 80
80 .information { 81 .information {
pages/user/my_service/hist_service.js
@@ -65,22 +65,13 @@ Page({ @@ -65,22 +65,13 @@ Page({
65 * 生命周期函数--监听页面加载 65 * 生命周期函数--监听页面加载
66 */ 66 */
67 onLoad: function(options) { 67 onLoad: function(options) {
68 -  
69 - },  
70 -  
71 - /**  
72 - * 生命周期函数--监听页面初次渲染完成  
73 - */  
74 - onReady: function() {  
75 - 68 + var th = this;
  69 + th.query_hist();
76 }, 70 },
77 -  
78 /** 71 /**
79 * 生命周期函数--监听页面显示 72 * 生命周期函数--监听页面显示
80 */ 73 */
81 onShow: function() { 74 onShow: function() {
82 - var th = this;  
83 - th.query_hist();  
84 }, 75 },
85 76
86 /** 77 /**
@@ -127,9 +118,12 @@ Page({ @@ -127,9 +118,12 @@ Page({
127 is_service_read: 1, 118 is_service_read: 1,
128 }), wx.stopPullDownRefresh(); //停止下拉刷新 119 }), wx.stopPullDownRefresh(); //停止下拉刷新
129 } else { 120 } else {
130 - th.setData({  
131 - is_service_read: 1  
132 - }) 121 + getApp().my_warnning(res.data.msg, 0, this);
  122 +
  123 + // else {
  124 + // th.setData({
  125 + // is_service_read: 1
  126 + // })
133 } 127 }
134 }) 128 })
135 }, 129 },
pages/user/my_service/hist_service.wxml
@@ -11,9 +11,9 @@ @@ -11,9 +11,9 @@
11 <view class="Reset">重置</view> 11 <view class="Reset">重置</view>
12 <image class="Resetsub" src="{{iurl}}/miniapp/images/reset.png"></image> 12 <image class="Resetsub" src="{{iurl}}/miniapp/images/reset.png"></image>
13 </view> 13 </view>
14 - <view class="flex-center"> 14 + <view class="flex-center" bindtap='pickerShow'>
15 <view>筛选</view> 15 <view>筛选</view>
16 - <view bindtap='pickerShow' wx:if="{{true}}" class="box"></view> 16 + <view wx:if="{{true}}" class="box"></view>
17 <!-- <view bindtap='pickerShow' wx:else class="box"></view> --> 17 <!-- <view bindtap='pickerShow' wx:else class="box"></view> -->
18 </view> 18 </view>
19 </view> 19 </view>
@@ -57,8 +57,8 @@ @@ -57,8 +57,8 @@
57 </view> 57 </view>
58 <view class="flex-level fs30 xc-ash">暂无服务记录</view> 58 <view class="flex-level fs30 xc-ash">暂无服务记录</view>
59 <view class="flex-level"> 59 <view class="flex-level">
60 - <navigator url="/pages/user/my_service/i_service" bindtap="goto">  
61 - <view class="flex-center fs28 white">前往使用</view> 60 + <navigator url="/pages/user/my_service/i_service">
  61 + <view class="flex-center fs32 white">前往使用</view>
62 </navigator> 62 </navigator>
63 </view> 63 </view>
64 </view> 64 </view>
pages/user/my_service/hist_service.wxss
@@ -85,13 +85,13 @@ page { @@ -85,13 +85,13 @@ page {
85 } 85 }
86 86
87 .empty_order navigator { 87 .empty_order navigator {
88 - margin-top: 60rpx; 88 + margin-top: 65rpx;
89 border-radius: 40rpx; 89 border-radius: 40rpx;
90 } 90 }
91 91
92 .empty_order navigator view { 92 .empty_order navigator view {
93 width: 247rpx; 93 width: 247rpx;
94 - height: 56rpx; 94 + height: 65rpx;
95 background-color: rgb(255, 72, 72); 95 background-color: rgb(255, 72, 72);
96 border-radius: 40rpx; 96 border-radius: 40rpx;
97 } 97 }
pages/user/my_service/i_service.js
@@ -37,13 +37,14 @@ Page({ @@ -37,13 +37,14 @@ Page({
37 this.setData({ 37 this.setData({
38 userinfo: userinfo 38 userinfo: userinfo
39 }); 39 });
  40 + var th = this;
  41 + th.query_service();
40 }, 42 },
41 /** 43 /**
42 * 生命周期函数--监听页面显示 44 * 生命周期函数--监听页面显示
43 */ 45 */
44 onShow: function() { 46 onShow: function() {
45 - var th = this;  
46 - th.query_service(); 47 +
47 }, 48 },
48 onReachBottom: function() { 49 onReachBottom: function() {
49 var th = this; 50 var th = this;
@@ -81,6 +82,8 @@ Page({ @@ -81,6 +82,8 @@ Page({
81 ismore: ismore, 82 ismore: ismore,
82 is_service_read: 1, 83 is_service_read: 1,
83 }), wx.stopPullDownRefresh(); //停止下拉刷新 84 }), wx.stopPullDownRefresh(); //停止下拉刷新
  85 + }else{
  86 + getApp().my_warnning(res.data.msg,0,th);
84 } 87 }
85 }) 88 })
86 }, 89 },
pages/user/my_service/tment_details.js
@@ -29,6 +29,22 @@ Page({ @@ -29,6 +29,22 @@ Page({
29 } 29 }
30 } 30 }
31 }) 31 })
  32 + /*
  33 + var url = "/api/weshop/marketing/reservation/reservation/page";
  34 + getApp().request.promiseGet(url, {
  35 + data: {
  36 + storeId: 1,
  37 + userId: 5682130
  38 + }
  39 + }).then(res => {
  40 + if (res.data.code == 0) {
  41 + var data = res.data.data.pageData;
  42 + th.setData({
  43 + tment_details: data
  44 + })
  45 + }
  46 + })
  47 + */
32 }, 48 },
33 /** 49 /**
34 * 生命周期函数--监听页面显示 50 * 生命周期函数--监听页面显示
pages/user/my_service/tment_details.wxml
@@ -81,16 +81,24 @@ @@ -81,16 +81,24 @@
81 81
82 <!-- submit栏 --> 82 <!-- submit栏 -->
83 <view class="subs flex-vertical-between fs32"> 83 <view class="subs flex-vertical-between fs32">
84 -  
85 - <view class="sub flex-center yellow-b">  
86 - <view wx:if="{{tment_details.state==1}}">取消预约</view>  
87 - <navigator wx:if="{{tment_details.state!=1}}" url="/pages/user/my_service/tment_order_list">我的服务</navigator>  
88 - </view>  
89 - <view class="sub rb flex-center">  
90 - <navigator wx:if="{{tment_details.state==1}}" url="/pages/user/my_service/beauty_deta">更改时间</navigator>  
91 - <navigator wx:if="{{tment_details.state==2}}" url="/pages/user/my_service/tment_eval">发表评价</navigator>  
92 - <navigator wx:if="{{tment_details.state==3}}" url="/pages/user/my_service/appment_main">重新预约</navigator> 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>
93 </view> 87 </view>
  88 + <navigator wx:if="{{tment_details.state!=1}}" class="sub flex-center yellow-b" url="/pages/user/my_service/tment_order_list">
  89 + <view class="yellow-b">我的服务</view>
  90 + </navigator>
  91 + <!-- 右边栏 -->
  92 + <navigator wx:if="{{tment_details.state==1}}" class="sub rb flex-center" url="/pages/user/my_service/beauty_deta">
  93 + <view>更改时间</view>
  94 + </navigator>
  95 + <navigator wx:if="{{tment_details.state==2}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval">
  96 + <view>发表评价</view>
  97 + </navigator>
  98 + <navigator wx:if="{{tment_details.state==3}}" class="sub rb flex-center" url="/pages/user/my_service/appment_main">
  99 + <view>重新预约</view>
  100 + </navigator>
  101 +
94 </view> 102 </view>
95 </view> 103 </view>
96 <warn id="warn"></warn> 104 <warn id="warn"></warn>
97 \ No newline at end of file 105 \ No newline at end of file
pages/user/my_service/tment_eval.js
1 var e = getApp(), 1 var e = getApp(),
2 a = e.globalData.setting, 2 a = e.globalData.setting,
3 os = a, 3 os = a,
4 - t = e.request; 4 + t = e.request,
  5 + d = e.globalData;
5 Page({ 6 Page({
6 7
7 /** 8 /**
@@ -9,8 +10,72 @@ Page({ @@ -9,8 +10,72 @@ Page({
9 */ 10 */
10 data: { 11 data: {
11 iurl: a.imghost, 12 iurl: a.imghost,
  13 + stars_index: -1,
  14 + labels: [],
  15 + sub_evaluate:0
  16 + },
  17 + //点击星级
  18 + check_stars: function(e) {
  19 + var th = this;
  20 + var index = e.currentTarget.dataset.index;
  21 + var stars_index = th.data.stars_index;
  22 + if (index != stars_index) {
  23 + var url = "/api/weshop/marketing/reservation/star/label/list";
  24 + getApp().request.promiseGet(url, {
  25 + data: {
  26 + Star: index,
  27 + storeId: a.stoid
  28 + }
  29 + }).then(res => {
  30 + if (res.data.code == 0) {
  31 + th.setData({
  32 + labels: res.data.data
  33 + })
  34 + } else {
  35 + getApp().my_warnning(res.data.msg, 0, th);
  36 + return;
  37 + }
  38 + })
  39 + th.setData({
  40 + stars_index: index
  41 + })
  42 + }
  43 + },
  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 + });
  53 + },
  54 + //图片失败,默认图片
  55 + bind_bnerr1: function(e) {
  56 + var _errImg = e.target.dataset.errorimg;
  57 + var _Img = e.target.dataset.img;
  58 + if (_Img != undefined) {
  59 + var _errObj = {};
  60 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  61 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  62 + }
  63 + },
  64 + //选择标签
  65 + check_label: function(e) {
  66 + var th = this;
  67 + var index = e.currentTarget.dataset.index;
  68 + var label_id = th.data.labels[index].check;
  69 + var labels = 'labels[' + index + '].check';
  70 + if (label_id) {
  71 + label_id = 0
  72 + } else {
  73 + label_id = 1
  74 + }
  75 + th.setData({
  76 + [labels]: label_id
  77 + })
12 }, 78 },
13 -  
14 /** 79 /**
15 * 生命周期函数--监听页面加载 80 * 生命周期函数--监听页面加载
16 */ 81 */
pages/user/my_service/tment_eval.json
1 { 1 {
2 - "navigationBarTitleText": "预约评价" 2 + "navigationBarTitleText": "预约评价",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
3 } 6 }
4 \ No newline at end of file 7 \ No newline at end of file
pages/user/my_service/tment_eval.wxml
@@ -26,26 +26,17 @@ @@ -26,26 +26,17 @@
26 26
27 <view class="flex-center"> 27 <view class="flex-center">
28 <view class="starss"> 28 <view class="starss">
29 - <image class="stars" src="{{iurl}}/miniapp/images/StarsredCk.png" wx:for="11111"></image> 29 + <image class="stars" src="{{iurl}}{{stars_index>=index?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{5}}" bindtap="check_stars" data-index="{{index}}"></image>
30 </view> 30 </view>
31 </view> 31 </view>
32 <view class="tea_labs"> 32 <view class="tea_labs">
33 <view class="flex-center fs26"> 33 <view class="flex-center fs26">
34 - <textarea placeholder="写其他意见和建议" placeholder-class="fs24"></textarea> 34 + <textarea placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="270"></textarea>
35 </view> 35 </view>
36 36
37 - <view class="labels flex fs26">  
38 - <view class="label checklabel">  
39 - <view>衣着整洁</view>  
40 - </view>  
41 - <view class="label">  
42 - <view>穿着专业</view>  
43 - </view>  
44 - <view class="label">  
45 - <view>准时到达</view>  
46 - </view>  
47 - <view class="label clonri">  
48 - <view>服务态度好</view> 37 + <view wx:if="{{labels.length>0}}" class="labels flex fs26 ellipsis-3">
  38 + <view class="label {{item.check==1?'checklabel':''}} flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key">
  39 + <view class="ellipsis-1">{{item.LabelName}}</view>
49 </view> 40 </view>
50 </view> 41 </view>
51 </view> 42 </view>
@@ -54,13 +45,13 @@ @@ -54,13 +45,13 @@
54 <view>满意的话请打五星噢,谢谢您的支持!</view> 45 <view>满意的话请打五星噢,谢谢您的支持!</view>
55 </view> 46 </view>
56 47
57 - <navigator class="fs32 flex-center"> 48 + <navigator class="Subs fs32 flex-center" bindtap="Subs">
58 <view class="Submission flex-center"> 49 <view class="Submission flex-center">
59 <view>确认提交</view> 50 <view>确认提交</view>
60 </view> 51 </view>
61 </navigator> 52 </navigator>
62 53
63 - <block wx:if="{{false}}"> 54 + <block wx:if="{{sub_evaluate}}">
64 <view class="subSuccess"> 55 <view class="subSuccess">
65 <view class="flex-center"> 56 <view class="flex-center">
66 <image class="Success" src="{{iurl}}/miniapp/images/yyservice/Success.png"></image> 57 <image class="Success" src="{{iurl}}/miniapp/images/yyservice/Success.png"></image>
@@ -70,4 +61,5 @@ @@ -70,4 +61,5 @@
70 </view> 61 </view>
71 </view> 62 </view>
72 </block> 63 </block>
73 -</view>  
74 \ No newline at end of file 64 \ No newline at end of file
  65 +</view>
  66 +<warn id="warn"></warn>
75 \ No newline at end of file 67 \ No newline at end of file
pages/user/my_service/tment_eval.wxss
@@ -43,18 +43,21 @@ @@ -43,18 +43,21 @@
43 43
44 textarea { 44 textarea {
45 width: 100%; 45 width: 100%;
46 - height: 280rpx; 46 + height: 240rpx;
47 margin-top: 70rpx; 47 margin-top: 70rpx;
48 border: 2rpx solid rgb(203, 203, 203); 48 border: 2rpx solid rgb(203, 203, 203);
49 - border-radius: 15rpx; 49 + border-radius: 13rpx;
50 padding-top: 25rpx; 50 padding-top: 25rpx;
51 padding-left: 30rpx; 51 padding-left: 30rpx;
52 - margin-bottom: 32rpx; 52 + margin-bottom: 30rpx;
53 padding-right: 15rpx; 53 padding-right: 15rpx;
  54 + padding-bottom: 20rpx;
54 } 55 }
55 56
56 .labels { 57 .labels {
57 - margin-bottom: 55rpx; 58 + margin-bottom: 35rpx;
  59 + display: inline-block;
  60 + max-height: 240rxp;
58 } 61 }
59 62
60 .label { 63 .label {
@@ -63,26 +66,33 @@ textarea { @@ -63,26 +66,33 @@ textarea {
63 line-height: 48rpx; 66 line-height: 48rpx;
64 border: 2rpx solid rgb(218, 218, 218); 67 border: 2rpx solid rgb(218, 218, 218);
65 color: rgb(152, 152, 152); 68 color: rgb(152, 152, 152);
66 - margin-right: 22rpx;  
67 border-radius: 5rpx; 69 border-radius: 5rpx;
  70 + margin-right: 15rpx;
  71 + max-width: 165rpx;
  72 + display: inline-block;
68 } 73 }
69 74
70 /* 选择标签的样式 */ 75 /* 选择标签的样式 */
71 76
72 .checklabel { 77 .checklabel {
73 border: 2rpx solid rgb(214, 1, 33); 78 border: 2rpx solid rgb(214, 1, 33);
  79 + background-color: rgb(255, 231, 235);
74 color: rgb(214, 1, 33); 80 color: rgb(214, 1, 33);
75 } 81 }
76 82
77 .feedback { 83 .feedback {
78 color: rgb(152, 152, 152); 84 color: rgb(152, 152, 152);
79 - margin-bottom: 90rpx; 85 + margin-bottom: 70rpx;
  86 +}
  87 +
  88 +.Subs{
  89 + background-color: rgb(255,255,255);
80 } 90 }
81 91
82 .Submission { 92 .Submission {
83 width: 400rpx; 93 width: 400rpx;
84 height: 65rpx; 94 height: 65rpx;
85 - border-radius: 30rpx; 95 + border-radius: 40rpx;
86 background-color: rgb(214, 1, 33); 96 background-color: rgb(214, 1, 33);
87 color: rgb(255, 255, 255); 97 color: rgb(255, 255, 255);
88 } 98 }
pages/user/my_service/tment_order_list.wxml
@@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
60 <navigator url="/pages/user/my_service/tment_details" class="Unimportance flex-level">取消预约</navigator> 60 <navigator url="/pages/user/my_service/tment_details" class="Unimportance flex-level">取消预约</navigator>
61 </block> 61 </block>
62 <block wx:else> 62 <block wx:else>
63 - <navigator wx:if="{{item.State!=1}}" url="/pages/user/my_service/tment_details" class="Unimportance flex-level">查看详情</navigator> 63 + <navigator url="/pages/user/my_service/tment_details" class="Unimportance flex-level">查看详情</navigator>
64 </block> 64 </block>
65 <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/pages/user/my_service/beauty_deta">更改时间</navigator> 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> 66 <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval" class="important Unimportance flex-level">发表评价</navigator>
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 <view class="flex-level fs30 xc-ash">暂无预约记录</view> 84 <view class="flex-level fs30 xc-ash">暂无预约记录</view>
85 <view class="flex-level"> 85 <view class="flex-level">
86 <navigator url="/pages/user/my_service/i_service" bindtap="goto"> 86 <navigator url="/pages/user/my_service/i_service" bindtap="goto">
87 - <view class="flex-center fs28 white">立即预约</view> 87 + <view class="flex-center fs32 white">立即预约</view>
88 </navigator> 88 </navigator>
89 </view> 89 </view>
90 </view> 90 </view>
pages/user/my_service/tment_order_list.wxss
@@ -131,7 +131,7 @@ page { @@ -131,7 +131,7 @@ page {
131 131
132 .empty_order navigator view { 132 .empty_order navigator view {
133 width: 247rpx; 133 width: 247rpx;
134 - height: 56rpx; 134 + height: 65rpx;
135 background-color: rgb(255, 72, 72); 135 background-color: rgb(255, 72, 72);
136 border-radius: 40rpx; 136 border-radius: 40rpx;
137 } 137 }