Commit da1876a7b79f30130566180ded54becf95e70464

Authored by DESKTOP-QHAFKU5\iceling
1 parent 061511a0

提交评价接口提交属性名修改,服务项目预约判断,历史服务bug修复,新增导航组件

components/my_confirm/my_confirm.js
@@ -2,30 +2,43 @@ var t = getApp(); @@ -2,30 +2,43 @@ var t = getApp();
2 Component({ 2 Component({
3 /*** 页面的初始数据***/ 3 /*** 页面的初始数据***/
4 data: { 4 data: {
5 - yu_e_show:0,  
6 - iurl:t.globalData.setting.imghost,  
7 - width:0,  
8 - success:null, //成功的回调  
9 - cancle: null, //取消的回调  
10 - title: null, //标题  
11 - s_text:null, //确定的提示语  
12 - c_text:null, //取消的提示语 5 + yu_e_show: 0,
  6 + iurl: t.globalData.setting.imghost,
  7 + width: 0,
  8 + success: null, //成功的回调
  9 + cancle: null, //取消的回调
  10 + title: null, //标题
  11 + s_text: null, //确定的提示语
  12 + c_text: null, //取消的提示语
13 }, 13 },
14 14
15 methods: { 15 methods: {
16 - open: function (title,s_text,c_text,success,cancle) {  
17 - this.setData({ title: title, s_text: s_text, c_text:c_text, yu_e_show: 1})  
18 - this.data.success=success;this.data.cancle=cancle;  
19 - },  
20 - go_sure:function(){  
21 - this.data.success();  
22 - },  
23 - go_cancle: function () {  
24 - this.data.cancle();  
25 - },  
26 - close_yu_e:function(){  
27 - this.setData({ yu_e_show: 0 })  
28 - } 16 + open: function(title, s_text, c_text, success, cancle) {
  17 + this.setData({
  18 + title: title,
  19 + s_text: s_text,
  20 + c_text: c_text,
  21 + yu_e_show: 1
  22 + })
  23 + this.data.success = success;
  24 + this.data.cancle = cancle;
  25 + },
  26 + open_cancel: function (yu_e_show){
  27 + this.setData({
  28 + yu_e_show: yu_e_show
  29 + })
  30 + },
  31 + go_sure: function() {
  32 + this.data.success();
  33 + },
  34 + go_cancle: function() {
  35 + this.data.cancle();
  36 + },
  37 + close_yu_e: function() {
  38 + this.setData({
  39 + yu_e_show: 0
  40 + })
  41 + }
29 } 42 }
30 - 43 +
31 }) 44 })
32 \ No newline at end of file 45 \ No newline at end of file
components/my_confirm/my_confirm.wxml
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <view class="shut" bindtap="close_yu_e">ⅹ</view> 6 <view class="shut" bindtap="close_yu_e">ⅹ</view>
7 <view class="fs32 xc-black3 flex jc-center ai-center" style="width:100%;height:220rpx;">{{title}}</view> 7 <view class="fs32 xc-black3 flex jc-center ai-center" style="width:100%;height:220rpx;">{{title}}</view>
8 <view class="flex jc-center ai_center" style="width: 100%;height: 75rpx;"> 8 <view class="flex jc-center ai_center" style="width: 100%;height: 75rpx;">
9 - <view bindtap="go_sure" class="fs30 white flex jc-center ai-center ck_btn" style="margin-right: 20rpx;">{{s_text}}</view> 9 + <view bindtap="go_sure" class="fs30 white flex jc-center ai-center ck_btn color color" style="margin-right: 20rpx;">{{s_text}}</view>
10 <view bindtap='go_cancle' class="fs30 xc-ash flex jc-center ai-center ck_btn"style="background:#ececea;">{{c_text}}</view> 10 <view bindtap='go_cancle' class="fs30 xc-ash flex jc-center ai-center ck_btn"style="background:#ececea;">{{c_text}}</view>
11 </view> 11 </view>
12 </view> 12 </view>
components/my_confirm/my_confirm.wxss
@@ -60,4 +60,7 @@ @@ -60,4 +60,7 @@
60 } 60 }
61 .flex {display: flex;} 61 .flex {display: flex;}
62 .jc-center{ justify-content: center;} 62 .jc-center{ justify-content: center;}
63 -.ai-center{align-items: center;}  
64 \ No newline at end of file 63 \ No newline at end of file
  64 +.ai-center{align-items: center;}
  65 +.color{
  66 + color: rgb(255,255,255);
  67 +}
65 \ No newline at end of file 68 \ No newline at end of file
components/nav_b/nav_b.js 0 → 100644
  1 +var t = getApp(), os = t.globalData.setting;
  2 +Component({
  3 + properties: {
  4 + },
  5 + data: {
  6 + isopen: 0,
  7 + iurl: os.imghost,
  8 + nav_left:"首页",//导航左边
  9 + nav_center:"预约",//导航中间
  10 + nav_right: "我的",//导航右边
  11 + nav_left_url: "/pages/index/index/index",//导航左边地址
  12 + nav_center_url:"/pages/user/my_service/tment_order_list",//导航中间地址
  13 + nav_right_url:"/pages/user/index/index",//导航右边地址
  14 + },
  15 +
  16 + ready: function () {
  17 + },
  18 + methods: {
  19 + //--点击打开事件--
  20 + open_box: function () {
  21 + this.setData({ isopen: 1 });
  22 + },
  23 + //--关闭事件--
  24 + close_box: function () {
  25 + this.setData({ isopen: 0 });
  26 + },
  27 + //--跳转--
  28 + goto: function (e) {
  29 + var url = e.currentTarget.dataset.url;
  30 + getApp().goto(url);
  31 + }
  32 +
  33 + }
  34 +
  35 +})
0 \ No newline at end of file 36 \ No newline at end of file
components/nav_b/nav_b.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 \ No newline at end of file 5 \ No newline at end of file
components/nav_b/nav_b.wxml 0 → 100644
  1 +
  2 +<view class="box_main {{isopen==1?'box_isopen':''}}" >
  3 + <view class="dian" bindtap="open_box">
  4 + <image src="{{iurl}}/miniapp/images/sheng_lue.png" ></image>
  5 + </view>
  6 + <view class="cl_list">
  7 + <view class="item" data-url="{{nav_left_url}}" bindtap="goto">{{nav_left}}</view>
  8 + <view class="item" data-url="{{nav_center_url}}" bindtap="goto">{{nav_center}}</view>
  9 + <view class="item" data-url="{{nav_right_url}}" bindtap="goto">{{nav_right}}</view>
  10 + <view class="item big" bindtap="close_box">×</view>
  11 + </view>
  12 +</view>
  13 +
components/nav_b/nav_b.wxss 0 → 100644
  1 +.box_main{
  2 + width:80rpx;
  3 + height:80rpx;
  4 + background:#272636;
  5 + transition:width 0.8s;
  6 + -moz-transition:width 0.8s; /* Firefox 4 */
  7 + -webkit-transition:width 0.8s; /* Safari and Chrome */
  8 + -o-transition:width 0.8s; /* Opera */
  9 + border-radius:50rpx ;
  10 + position: fixed;
  11 + right: 10rpx;
  12 + bottom:300rpx;
  13 + overflow: hidden;
  14 + z-index: 111;
  15 +}
  16 +
  17 +.box_isopen{
  18 + width: 420rpx;
  19 +}
  20 +
  21 +.box_main .dian{
  22 + text-align: center;
  23 +width: 50rpx;
  24 +height: 50rpx;
  25 +color: #ffff;
  26 +font-size: 50rpx;
  27 +background: none;
  28 +
  29 +}
  30 +
  31 +.box_main .dian image{
  32 + width: 60rpx;
  33 +height: 20rpx;
  34 +margin: 30rpx 0 0 10rpx;
  35 +}
  36 +
  37 +.box_main.box_isopen .dian{
  38 + display: none;
  39 +}
  40 +
  41 +.box_main .cl_list{
  42 + display: none;
  43 +}
  44 +
  45 +.box_main.box_isopen .cl_list{
  46 + display: block;
  47 + margin-left: 20rpx;
  48 +}
  49 +
  50 +.box_main .cl_list .item{
  51 + display: inline-block;
  52 + width:100rpx;
  53 + height:80rpx;
  54 + text-align: center;
  55 + line-height: 80rpx;
  56 + color: #fff;
  57 + vertical-align: top;
  58 + font-size: 32rpx;
  59 +
  60 +}
  61 +
  62 +.box_main .cl_list .item.big{
  63 + font-size: 70rpx;
  64 +line-height: 70rpx;
  65 +
  66 +}
  67 +
pages/user/my_service/appment_main.js
@@ -469,5 +469,27 @@ Page({ @@ -469,5 +469,27 @@ Page({
469 if (seekTime != "") { 469 if (seekTime != "") {
470 th.query_more(); 470 th.query_more();
471 } 471 }
  472 + th.query_project();
  473 + },
  474 + //获取单个服务项目信息
  475 + query_project:function(){
  476 + var th = this;
  477 + var url = "/api/weshop/marketing/reservation/sm/page";//获取服务项目接口
  478 + var project_id = th.data.project_id;//服务项目id
  479 + getApp().request.promiseGet(url,{
  480 + data:{
  481 + storeId:a.stoid,
  482 + userId:d.user_id,
  483 + projectId: project_id
  484 + }
  485 + }).then(res=>{
  486 + if(res.data.code==0){
  487 + th.setData({
  488 + validay: res.data.data.pageData[0].Validay
  489 + })
  490 + }else{
  491 + getApp().my_warnning(res.data.msg,0,th);
  492 + }
  493 + })
472 } 494 }
473 }) 495 })
474 \ No newline at end of file 496 \ No newline at end of file
pages/user/my_service/appment_main.wxss
@@ -125,11 +125,14 @@ button { @@ -125,11 +125,14 @@ button {
125 width: 407rpx; 125 width: 407rpx;
126 z-index: 3; 126 z-index: 3;
127 top: 45rpx; 127 top: 45rpx;
128 - left: 0rpx; 128 + left: -1rpx;
129 padding: 0rpx 5rpx; 129 padding: 0rpx 5rpx;
130 border: 2rpx solid rgb(238, 238, 238); 130 border: 2rpx solid rgb(238, 238, 238);
131 background-color: rgb(255, 255, 255); 131 background-color: rgb(255, 255, 255);
132 padding-bottom: 5rpx; 132 padding-bottom: 5rpx;
  133 + height: 279rpx;
  134 + overflow-x: scroll;
  135 + overflow-y: scroll;
133 } 136 }
134 137
135 .beautician { 138 .beautician {
pages/user/my_service/beauty_deta.js
@@ -37,11 +37,14 @@ Page({ @@ -37,11 +37,14 @@ Page({
37 */ 37 */
38 onLoad: function(options) { 38 onLoad: function(options) {
39 var th = this; 39 var th = this;
  40 + var myDate = new Date();
  41 + var date = myDate.getHours() + ":00"; //获取当前小时数(0-23)
40 var beautician_id = options.BeauticianID; 42 var beautician_id = options.BeauticianID;
41 th.setData({ 43 th.setData({
42 beautician_id: beautician_id, 44 beautician_id: beautician_id,
43 itemId: options.itemId, 45 itemId: options.itemId,
44 modify: options.modify, 46 modify: options.modify,
  47 + hours: date,
45 projectId: options.projectId 48 projectId: options.projectId
46 }) 49 })
47 if (options.url != undefined) { 50 if (options.url != undefined) {
@@ -66,13 +69,7 @@ Page({ @@ -66,13 +69,7 @@ Page({
66 * 生命周期函数--监听页面显示 69 * 生命周期函数--监听页面显示
67 */ 70 */
68 onShow: function() { 71 onShow: function() {
69 - var th = this;  
70 - var myDate = new Date();  
71 - var date = myDate.getHours() + ":00"; //获取当前小时数(0-23)  
72 - th.setData({  
73 - hours:date  
74 - })  
75 - th.query_date(); 72 +
76 }, 73 },
77 74
78 //图片失败,默认图片 75 //图片失败,默认图片
@@ -251,9 +248,8 @@ Page({ @@ -251,9 +248,8 @@ Page({
251 aweeks: arr, 248 aweeks: arr,
252 weeks: weeks 249 weeks: weeks
253 }) 250 })
254 - if (data.length > 0) {  
255 - th.query_date();  
256 - } 251 + th.query_date();
  252 +
257 } else { 253 } else {
258 getApp().my_warnning(res.data.msg, 0, th); 254 getApp().my_warnning(res.data.msg, 0, th);
259 } 255 }
@@ -267,7 +263,7 @@ Page({ @@ -267,7 +263,7 @@ Page({
267 var date_id = th.data.date_id; //日期下标 263 var date_id = th.data.date_id; //日期下标
268 var SeekTime = th.data.aweeks[date_id].time; 264 var SeekTime = th.data.aweeks[date_id].time;
269 var val = th.data.aweeks[date_id].val; 265 var val = th.data.aweeks[date_id].val;
270 - if (val != "") { 266 +
271 var url = "/api/weshop/marketing/reservation/staff/time/list"; 267 var url = "/api/weshop/marketing/reservation/staff/time/list";
272 getApp().request.promiseGet(url, { 268 getApp().request.promiseGet(url, {
273 data: { 269 data: {
@@ -279,21 +275,25 @@ Page({ @@ -279,21 +275,25 @@ Page({
279 } 275 }
280 }).then(res => { 276 }).then(res => {
281 if (res.data.code == 0) { 277 if (res.data.code == 0) {
282 - var time_list = res.data.data;  
283 - var time = th.data.time;  
284 - var new_time = [];  
285 - if (time_list != null) {  
286 - for (var i = 0; i < time.length; i++) {  
287 - for (var ii = 0; ii < time_list.length; ii++) {  
288 - if (time[i] == time_list[ii].GroupHour.substring(0, 5)) {  
289 - new_time[i] = time_list[ii].GroupHour.substring(0, 5);  
290 - break;  
291 - } else {  
292 - new_time[i] = ""; 278 + console.log("也饿饿饿饿饿饿" + res.data.data[0].GroupHour);
  279 + if (res.data.data[0].GroupHour.length > 11) {
  280 + getApp().my_warnning(res.data.data[0].GroupHour, 0, th);
  281 + }
  282 + var time_list = res.data.data;
  283 + var time = th.data.time;
  284 + var new_time = [];
  285 + if (time_list != null) {
  286 + for (var i = 0; i < time.length; i++) {
  287 + for (var ii = 0; ii < time_list.length; ii++) {
  288 + if (time[i] == time_list[ii].GroupHour.substring(0, 5)) {
  289 + new_time[i] = time_list[ii].GroupHour.substring(0, 5);
  290 + break;
  291 + } else {
  292 + new_time[i] = "";
  293 + }
293 } 294 }
294 } 295 }
295 } 296 }
296 - }  
297 th.setData({ 297 th.setData({
298 time_list: new_time 298 time_list: new_time
299 }) 299 })
@@ -301,7 +301,7 @@ Page({ @@ -301,7 +301,7 @@ Page({
301 getApp().my_warnning(res.data.msg, 0, th); 301 getApp().my_warnning(res.data.msg, 0, th);
302 } 302 }
303 }) 303 })
304 - } 304 +
305 }, 305 },
306 //更改预约时间 306 //更改预约时间
307 change_time: function() { 307 change_time: function() {
pages/user/my_service/beauty_deta.wxml
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <view class="Times"> 41 <view class="Times">
42 42
43 <view class="flex-center" wx:for="{{time}}" style="display:inline-block;" wx:for-index="key" wx:for-item="it"> 43 <view class="flex-center" wx:for="{{time}}" style="display:inline-block;" wx:for-index="key" wx:for-item="it">
44 - <block wx:if="{{it==time_list[key]}} && time[key]>=hours?true:false}}"> 44 + <block wx:if="{{it==time_list[key]}}">
45 <view class="Time flex-center {{time_index==key?'chTime':''}}" bindtap="Selection_time" data-index="{{key}}"> 45 <view class="Time flex-center {{time_index==key?'chTime':''}}" bindtap="Selection_time" data-index="{{key}}">
46 <view> 46 <view>
47 <view class="fs26">{{it}}</view> 47 <view class="fs26">{{it}}</view>
pages/user/my_service/hist_service.js
@@ -31,6 +31,7 @@ Page({ @@ -31,6 +31,7 @@ Page({
31 ismore: 0, //是否加载完毕 31 ismore: 0, //是否加载完毕
32 is_screen: 0, //是否通过筛选来选择历史服务 32 is_screen: 0, //是否通过筛选来选择历史服务
33 is_reset:0,//是否重复点击 33 is_reset:0,//是否重复点击
  34 + is_nav:1,//是否显示导航栏
34 }, 35 },
35 pickerShow: function() { 36 pickerShow: function() {
36 this.setData({ 37 this.setData({
@@ -97,7 +98,9 @@ Page({ @@ -97,7 +98,9 @@ Page({
97 curpage: 1, 98 curpage: 1,
98 is_service_read: 0, 99 is_service_read: 0,
99 is_screen: 1, 100 is_screen: 1,
100 - is_reset:1 101 + is_reset:1,
  102 + beginDate: "",
  103 + endDate: "",
101 }) 104 })
102 th.query_hist(); 105 th.query_hist();
103 } 106 }
@@ -119,6 +122,9 @@ Page({ @@ -119,6 +122,9 @@ Page({
119 } 122 }
120 }).then(res => { 123 }).then(res => {
121 wx.hideLoading(); 124 wx.hideLoading();
  125 + th.setData({
  126 + is_reset: 0
  127 + })
122 if (res.data.code == 0) { 128 if (res.data.code == 0) {
123 th.data.curpage++; 129 th.data.curpage++;
124 var arr1 = th.data.hist_List; 130 var arr1 = th.data.hist_List;
@@ -131,7 +137,6 @@ Page({ @@ -131,7 +137,6 @@ Page({
131 total: res.data.data.total, 137 total: res.data.data.total,
132 ismore: ismore, 138 ismore: ismore,
133 is_service_read: 1, 139 is_service_read: 1,
134 - is_reset:0  
135 }), wx.stopPullDownRefresh(); //停止下拉刷新 140 }), wx.stopPullDownRefresh(); //停止下拉刷新
136 } else { 141 } else {
137 th.setData({ 142 th.setData({
pages/user/my_service/hist_service.wxml
1 -<view wx:if="{{true}}" class="{{isPickerRender==true?'container':''}}"> 1 +<view class="{{isPickerRender==true?'container':''}}">
2 <!-- 点击方法 --> 2 <!-- 点击方法 -->
3 - <view class="exption flex-vertical-between fs28" wx:if="{{hist_List.length>0 || startTime!=''}}"> 3 + <view class="exption flex-vertical-between fs28" wx:if="{{is_nav ||hist_List.length>0}}">
4 <view class="flex"> 4 <view class="flex">
5 共使用 5 共使用
6 <view class="count">{{total}}</view> 6 <view class="count">{{total}}</view>
pages/user/my_service/i_service.js
@@ -22,6 +22,7 @@ Page({ @@ -22,6 +22,7 @@ Page({
22 total: 0, 22 total: 0,
23 ismore: 0, //是否加载完毕 23 ismore: 0, //是否加载完毕
24 userinfo: null, 24 userinfo: null,
  25 + is_sub: 0, //是否重复提交预约
25 }, 26 },
26 27
27 /** 28 /**
@@ -44,7 +45,7 @@ Page({ @@ -44,7 +45,7 @@ Page({
44 * 生命周期函数--监听页面显示 45 * 生命周期函数--监听页面显示
45 */ 46 */
46 onShow: function() { 47 onShow: function() {
47 - 48 +
48 }, 49 },
49 onReachBottom: function() { 50 onReachBottom: function() {
50 var th = this; 51 var th = this;
@@ -91,6 +92,10 @@ Page({ @@ -91,6 +92,10 @@ Page({
91 /*-- 打开服务项目 --*/ 92 /*-- 打开服务项目 --*/
92 open_fw: function(e) { 93 open_fw: function(e) {
93 var th = this; 94 var th = this;
  95 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  96 + var url = e.currentTarget.dataset.url;
  97 + var service_id = e.currentTarget.dataset.service_id; //服务id
  98 + var project_id = e.currentTarget.dataset.project_id;
94 var ind = e.currentTarget.dataset.ind; 99 var ind = e.currentTarget.dataset.ind;
95 var item = this.data.service_List[ind]; 100 var item = this.data.service_List[ind];
96 var ewm = th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|TY01|"; 101 var ewm = th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|TY01|";
@@ -99,7 +104,43 @@ Page({ @@ -99,7 +104,43 @@ Page({
99 th.data.qr_code_object.val = ewm; 104 th.data.qr_code_object.val = ewm;
100 th.data.qr_code_object.is_fw = 1; 105 th.data.qr_code_object.is_fw = 1;
101 var qc_com = th.selectComponent("#qc_com"); //组件的id 106 var qc_com = th.selectComponent("#qc_com"); //组件的id
102 - qc_com.open(th.data.qr_code_object) 107 + getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/check", {
  108 + data: {
  109 + serviceId: service_id,
  110 + storeId: a.stoid,
  111 + userId: d.user_id
  112 + }
  113 + }).then(res => {
  114 + th.setData({
  115 + is_sub: 0
  116 + })
  117 + if (res.data.data != null) {
  118 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  119 + my_confirm.open_cancel(1);
  120 + my_confirm.open(
  121 + "已有预约记录!",
  122 + "继续使用",
  123 + "预约详情",
  124 + function() {
  125 + nav_b.close_box();
  126 + my_confirm.open_cancel(0);
  127 + qc_com.open(th.data.qr_code_object)
  128 + },
  129 + function() {
  130 + nav_b.close_box();
  131 + my_confirm.open_cancel(0);
  132 + var deta_url = "/pages/user/my_service/tment_details?number=" + res.data.data.Number;
  133 + wx.navigateTo({
  134 + url: deta_url
  135 + })
  136 + }
  137 + )
  138 +
  139 + } else {
  140 + qc_com.open(th.data.qr_code_object)
  141 + }
  142 + })
  143 +
103 }, 144 },
104 //图片失败,默认图片 145 //图片失败,默认图片
105 bind_bnerr1: function(e) { 146 bind_bnerr1: function(e) {
@@ -130,37 +171,78 @@ Page({ @@ -130,37 +171,78 @@ Page({
130 //校正是否可预约 171 //校正是否可预约
131 correcting: function(e) { 172 correcting: function(e) {
132 var th = this; 173 var th = this;
133 - var url = e.currentTarget.dataset.url;  
134 - var service_id = e.currentTarget.dataset.service_id; //服务id  
135 - var project_id = e.currentTarget.dataset.project_id;  
136 - getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/check", {  
137 - data: {  
138 - serviceId: service_id,  
139 - storeId: a.stoid,  
140 - userId: d.user_id  
141 - }  
142 - }).then(res => {  
143 - if (res.data.code == 0) {  
144 - getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/sm/check", {  
145 - data: {  
146 - projectId: project_id,  
147 - serviceId: service_id,  
148 - storeId: a.stoid,  
149 - userId: d.user_id  
150 - }  
151 - }).then(res => {  
152 - if (res.data.code == 0) { 174 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  175 + wx.showLoading({
  176 + title: '加载中',
  177 + })
  178 + if (th.data.is_sub == 0) {
  179 + th.setData({
  180 + is_sub: 1
  181 + })
  182 + var url = e.currentTarget.dataset.url;
  183 + var service_id = e.currentTarget.dataset.service_id; //服务id
  184 + var project_id = e.currentTarget.dataset.project_id;
  185 + getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/check", {
  186 + data: {
  187 + serviceId: service_id,
  188 + storeId: a.stoid,
  189 + userId: d.user_id
  190 + }
  191 + }).then(res => {
  192 + wx.hideLoading();
  193 + th.setData({
  194 + is_sub: 0
  195 + })
  196 + if (res.data.code == 0) {
  197 + if (res.data.data != null) {
  198 +
  199 + var number = res.data.data.Number;
  200 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  201 + my_confirm.open_cancel(1);
  202 + my_confirm.open(
  203 + "已有预约记录!",
  204 + "继续预约",
  205 + "预约详情",
  206 + function() {
  207 + nav_b.close_box();
  208 + my_confirm.open_cancel(0);
  209 + getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/sm/check", {
  210 + data: {
  211 + projectId: project_id,
  212 + serviceId: service_id,
  213 + storeId: a.stoid,
  214 + userId: d.user_id
  215 + }
  216 + }).then(res => {
  217 + if (res.data.code == 0) {
  218 + wx.navigateTo({
  219 + url: url
  220 + })
  221 + } else {
  222 + getApp().my_warnning(res.data.msg, 0, th);
  223 + }
  224 + })
  225 + },
  226 + function() {
  227 + nav_b.close_box();
  228 + my_confirm.open_cancel(0);
  229 + var deta_url = "/pages/user/my_service/tment_details?number=" + number;
  230 + wx.navigateTo({
  231 + url: deta_url
  232 + })
  233 + }
  234 + )
  235 + } else {
153 wx.navigateTo({ 236 wx.navigateTo({
154 - url: url 237 + url: url,
155 }) 238 })
156 - } else {  
157 - getApp().my_warnning(res.data.msg, 0, th);  
158 } 239 }
159 - })  
160 - } else {  
161 - getApp().my_warnning(res.data.msg, 0, th);  
162 - }  
163 - }) 240 +
  241 + } else {
  242 + getApp().my_warnning(res.data.msg, 0, th);
  243 + }
  244 + })
  245 + }
164 } 246 }
165 247
166 }) 248 })
167 \ No newline at end of file 249 \ No newline at end of file
pages/user/my_service/i_service.json
@@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
2 "navigationBarTitleText": "服务项目", 2 "navigationBarTitleText": "服务项目",
3 "usingComponents": { 3 "usingComponents": {
4 "qr_code": "/components/qr_code/qr_code", 4 "qr_code": "/components/qr_code/qr_code",
5 - "warn": "/components/long_warn/long_warn" 5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm",
  7 + "nav_b": "/components/nav_b/nav_b"
6 } 8 }
7 } 9 }
8 \ No newline at end of file 10 \ No newline at end of file
pages/user/my_service/i_service.wxml
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 </view> 45 </view>
46 46
47 <view class="flex-center fs24 functionMax"> 47 <view class="flex-center fs24 functionMax">
48 - <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}"> 48 + <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}">
49 <view>立即使用</view> 49 <view>立即使用</view>
50 </view> 50 </view>
51 <!-- 可预约 --> 51 <!-- 可预约 -->
@@ -79,7 +79,9 @@ @@ -79,7 +79,9 @@
79 </view> 79 </view>
80 </view> 80 </view>
81 </view> 81 </view>
82 - 82 +<!-- 制作一个圆球导航 -->
  83 +<nav_b id="nav_b"></nav_b>
83 <!-- 弹出框扫描 --> 84 <!-- 弹出框扫描 -->
84 <qr_code id="qc_com"></qr_code> 85 <qr_code id="qc_com"></qr_code>
85 -<warn id="warn"></warn>  
86 \ No newline at end of file 86 \ No newline at end of file
  87 +<warn id="warn"></warn>
  88 +<my_confirm id="my_confirm"></my_confirm>
87 \ No newline at end of file 89 \ No newline at end of file
pages/user/my_service/tment_details.js
@@ -85,13 +85,8 @@ Page({ @@ -85,13 +85,8 @@ Page({
85 wx.hideLoading(); 85 wx.hideLoading();
86 if (res.data.code == 0) { 86 if (res.data.code == 0) {
87 var data = res.data.data.pageData; 87 var data = res.data.data.pageData;
88 - var arrangeTime = data[0].ArrangeTime.substring(0, 11);  
89 - var day = data[0].ArrangeTime.substring(12, 13);  
90 - if (day < 12) {  
91 - day = "上午"  
92 - } else {  
93 - day = "下午"  
94 - } 88 + var arrangeTime = data[0].ArrangeTime.substring(0, 11);
  89 + var day = data[0].ArrangeTime.substring(11, 16);
95 th.setData({ 90 th.setData({
96 tment_details: data, 91 tment_details: data,
97 arrangeTime: arrangeTime, 92 arrangeTime: arrangeTime,
pages/user/my_service/tment_details.json
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 "navigationBarTitleText": "预约详情", 2 "navigationBarTitleText": "预约详情",
3 "usingComponents": { 3 "usingComponents": {
4 "qr_code": "/components/qr_code/qr_code", 4 "qr_code": "/components/qr_code/qr_code",
5 - "warn": "/components/long_warn/long_warn" 5 + "warn": "/components/long_warn/long_warn",
  6 + "nav_b": "/components/nav_b/nav_b"
6 } 7 }
7 } 8 }
8 \ No newline at end of file 9 \ No newline at end of file
pages/user/my_service/tment_details.wxml
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 </view> 20 </view>
21 <image wx:if="{{item.State==0}}" src="{{iurl}}miniapp/images/order/code.png" class="code" bindtap="code_show" data-order_sn="{{number}}"></image> 21 <image wx:if="{{item.State==0}}" src="{{iurl}}miniapp/images/order/code.png" class="code" bindtap="code_show" data-order_sn="{{number}}"></image>
22 </view> 22 </view>
23 - 23 +
24 <!-- 预约门店 --> 24 <!-- 预约门店 -->
25 <view class="flex-vertical bmt"> 25 <view class="flex-vertical bmt">
26 <view class="name">预约门店:</view> 26 <view class="name">预约门店:</view>
@@ -114,6 +114,8 @@ @@ -114,6 +114,8 @@
114 114
115 </view> 115 </view>
116 </view> 116 </view>
  117 +<!-- 制作一个圆球导航 -->
  118 +<nav_b></nav_b>
117 <!-- 弹出框扫描 --> 119 <!-- 弹出框扫描 -->
118 <qr_code id="qc_com"></qr_code> 120 <qr_code id="qc_com"></qr_code>
119 <warn id="warn"></warn> 121 <warn id="warn"></warn>
120 \ No newline at end of file 122 \ No newline at end of file
pages/user/my_service/tment_details.wxss
@@ -35,6 +35,7 @@ page { @@ -35,6 +35,7 @@ page {
35 35
36 .container { 36 .container {
37 padding: 0rpx 20rpx; 37 padding: 0rpx 20rpx;
  38 + padding-bottom:85rpx;
38 } 39 }
39 40
40 .Subscriber { 41 .Subscriber {
@@ -79,6 +80,9 @@ page { @@ -79,6 +80,9 @@ page {
79 .subs { 80 .subs {
80 padding: 0rpx 5rpx; 81 padding: 0rpx 5rpx;
81 margin-bottom: 20rpx; 82 margin-bottom: 20rpx;
  83 + position: fixed;
  84 + width: 705rpx;
  85 + bottom:20rpx;
82 } 86 }
83 87
84 .sub { 88 .sub {
pages/user/my_service/tment_eval.js
@@ -11,6 +11,7 @@ Page({ @@ -11,6 +11,7 @@ Page({
11 data: { 11 data: {
12 url: a.url, //接口网址 12 url: a.url, //接口网址
13 iurl: a.imghost, 13 iurl: a.imghost,
  14 + defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
14 stars_index: -1, //当前点击的星星下标 15 stars_index: -1, //当前点击的星星下标
15 labels: [], //星级标签数组 16 labels: [], //星级标签数组
16 sub_evaluate: 0, //是否评价成功 17 sub_evaluate: 0, //是否评价成功
@@ -19,7 +20,7 @@ Page({ @@ -19,7 +20,7 @@ Page({
19 number: "", //订单单号 20 number: "", //订单单号
20 beautician: "", //美容师信息 21 beautician: "", //美容师信息
21 fromType: "服务评价", //评价来源 22 fromType: "服务评价", //评价来源
22 - arrangeTime:"",//服务日期 23 + arrangeTime: "", //服务日期
23 }, 24 },
24 //点击星级 25 //点击星级
25 check_stars: function(e) { 26 check_stars: function(e) {
@@ -127,12 +128,12 @@ Page({ @@ -127,12 +128,12 @@ Page({
127 var proposal = th.data.proposal; //用户建议内容 128 var proposal = th.data.proposal; //用户建议内容
128 var fromType = th.data.fromType; //评价来源 129 var fromType = th.data.fromType; //评价来源
129 var json = { 130 var json = {
130 - "storeId": a.stoid,  
131 "evaLabList": evaLabList, 131 "evaLabList": evaLabList,
132 - "fromType": "预约评价",  
133 - "posNo": posNo, 132 + "fromType": 2,
  133 + "number": posNo,
134 "remark": proposal, 134 "remark": proposal,
135 - "star": stars + 1 135 + "star": stars + 1,
  136 + "storeId": a.stoid
136 }; 137 };
137 var data = JSON.stringify(json); //转换成json格式 138 var data = JSON.stringify(json); //转换成json格式
138 wx.request({ 139 wx.request({
@@ -147,7 +148,7 @@ Page({ @@ -147,7 +148,7 @@ Page({
147 th.setData({ 148 th.setData({
148 sub_evaluate: 1 149 sub_evaluate: 1
149 }) 150 })
150 - setTimeout(function () { 151 + setTimeout(function() {
151 wx.redirectTo({ 152 wx.redirectTo({
152 url: "/pages/user/my_service/tment_order_list" 153 url: "/pages/user/my_service/tment_order_list"
153 }); 154 });
@@ -159,6 +160,16 @@ Page({ @@ -159,6 +160,16 @@ Page({
159 }) 160 })
160 161
161 }, 162 },
  163 + //图片失败,默认图片
  164 + bind_bnerr1: function (e) {
  165 + var _errImg = e.target.dataset.errorimg;
  166 + var _Img = e.target.dataset.img;
  167 + if (_Img != undefined) {
  168 + var _errObj = {};
  169 + _errObj[_errImg] = "/miniapp/images/no_cate_def.png";
  170 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  171 + }
  172 + },
162 /** 173 /**
163 * 生命周期函数--监听页面加载 174 * 生命周期函数--监听页面加载
164 */ 175 */
pages/user/my_service/tment_eval.wxml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 <!-- 头像 --> 3 <!-- 头像 -->
4 <view class="flex-center head"> 4 <view class="flex-center head">
5 - <image class="headimg" src="{{iurl}}/miniapp/images/yyservice/Cosm_appo.png"></image> 5 + <image class="headimg" src="{{beautician.ImageUrl==''?iurl+defimgurl:beautician.ImageUrl}}" lazy-load="true" data-errorimg="beautician.ImageUrl" binderror="bind_bnerr1" data-img="{{beautician.ImageUrl}}"></image>
6 </view> 6 </view>
7 7
8 <!-- 姓名 --> 8 <!-- 姓名 -->
pages/user/my_service/tment_eval.wxss
@@ -62,7 +62,6 @@ textarea { @@ -62,7 +62,6 @@ textarea {
62 } 62 }
63 63
64 .labels { 64 .labels {
65 - margin-bottom: 25rpx;  
66 display: inline-block; 65 display: inline-block;
67 max-height: 240rxp; 66 max-height: 240rxp;
68 line-height: 50rpx; 67 line-height: 50rpx;
pages/user/my_service/tment_order_list.js
@@ -39,8 +39,7 @@ Page({ @@ -39,8 +39,7 @@ Page({
39 * 生命周期函数--监听页面加载 39 * 生命周期函数--监听页面加载
40 */ 40 */
41 onLoad: function(options) { 41 onLoad: function(options) {
42 - var th = this;  
43 - th.query_orderList(); 42 +
44 }, 43 },
45 changeTab: function(e) { 44 changeTab: function(e) {
46 var th = this; 45 var th = this;
@@ -81,9 +80,6 @@ Page({ @@ -81,9 +80,6 @@ Page({
81 } else { 80 } else {
82 --state_index; 81 --state_index;
83 } 82 }
84 - wx.showLoading({  
85 - title: '加载中',  
86 - })  
87 th.setData({ 83 th.setData({
88 is_read: 0 84 is_read: 0
89 }) 85 })
@@ -156,7 +152,7 @@ Page({ @@ -156,7 +152,7 @@ Page({
156 [start]: 3 152 [start]: 3
157 }) 153 })
158 } 154 }
159 - 155 + wx.stopPullDownRefresh(); //停止下拉刷新
160 } else { 156 } else {
161 getApp().my_warnning(res.data.msg, 0, th); 157 getApp().my_warnning(res.data.msg, 0, th);
162 } 158 }
@@ -179,6 +175,13 @@ Page({ @@ -179,6 +175,13 @@ Page({
179 */ 175 */
180 onShow: function() { 176 onShow: function() {
181 var th = this; 177 var th = this;
  178 + th.setData({
  179 + curpage:1,
  180 + total:0,
  181 + ismore:0,
  182 + is_read:0,
  183 + tm_order_list:[]
  184 + })
182 th.query_orderList(); 185 th.query_orderList();
183 }, 186 },
184 187
pages/user/my_service/tment_order_list.wxml
@@ -33,11 +33,11 @@ @@ -33,11 +33,11 @@
33 <view class="details"> 33 <view class="details">
34 <view class="item flex-vertical"> 34 <view class="item flex-vertical">
35 <view class="itemname">预约门店:</view> 35 <view class="itemname">预约门店:</view>
36 - <view class="itemvalue ellipsis-1">{{item.ServiceName}}</view> 36 + <view class="itemvalue ellipsis-1">{{item.StorageName}}</view>
37 </view> 37 </view>
38 <view class="item flex-vertical"> 38 <view class="item flex-vertical">
39 <view class="itemname">预约项目:</view> 39 <view class="itemname">预约项目:</view>
40 - <view class="itemvalue ellipsis-1">{{item.StorageName}}</view> 40 + <view class="itemvalue ellipsis-1">{{item.ServiceName}}</view>
41 </view> 41 </view>
42 <view class="item flex-vertical"> 42 <view class="item flex-vertical">
43 <view class="itemname">美容师:</view> 43 <view class="itemname">美容师:</view>