diff --git a/pages/user/my_service/appment_main.wxss b/pages/user/my_service/appment_main.wxss index 5fe4d52..cbacb40 100644 --- a/pages/user/my_service/appment_main.wxss +++ b/pages/user/my_service/appment_main.wxss @@ -88,7 +88,7 @@ button { .textarea { width: 420rpx; background-color: rgb(238, 238, 238); - border-radius: 10rpx; + border-radius: 6rpx; height: 130rpx; padding-left: 40rpx; padding-right: 15rpx; @@ -106,7 +106,7 @@ button { height: 55rpx; line-height: 55rpx; background-color: rgb(238, 238, 238); - border-radius: 10rpx; + border-radius: 6rpx; padding-left: 40rpx; padding-right: 15rpx; } @@ -118,7 +118,7 @@ button { background-color: rgb(238, 238, 238); height: 50rpx; line-height: 50rpx; - border-radius: 10rpx; + border-radius: 6rpx; } .beauticians { diff --git a/pages/user/my_service/beauty_deta.js b/pages/user/my_service/beauty_deta.js index 2b11172..7446993 100644 --- a/pages/user/my_service/beauty_deta.js +++ b/pages/user/my_service/beauty_deta.js @@ -37,14 +37,11 @@ Page({ */ onLoad: function(options) { var th = this; - var myDate = new Date(); - var date = myDate.getHours() + ":00"; //获取当前小时数(0-23) var beautician_id = options.BeauticianID; th.setData({ beautician_id: beautician_id, itemId: options.itemId, modify: options.modify, - hours: date, projectId: options.projectId }) if (options.url != undefined) { @@ -69,7 +66,13 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function() { - + var th = this; + var myDate = new Date(); + var date = myDate.getHours() + ":00"; //获取当前小时数(0-23) + th.setData({ + hours:date + }) + th.query_date(); }, //图片失败,默认图片 @@ -248,7 +251,7 @@ Page({ aweeks: arr, weeks: weeks }) - if (arr.length > 0) { + if (data.length > 0) { th.query_date(); } } else { @@ -264,40 +267,40 @@ Page({ var date_id = th.data.date_id; //日期下标 var SeekTime = th.data.aweeks[date_id].time; var val = th.data.aweeks[date_id].val; - if(val!=""){ - var url = "/api/weshop/marketing/reservation/staff/time/list"; - getApp().request.promiseGet(url, { - data: { - projectId: projectId, - beauticianId: th.data.beautician_id, - serviceId: th.data.itemId, - seekTime: SeekTime, - storeId: a.stoid, - } - }).then(res => { - if (res.data.code == 0) { - var time_list = res.data.data; - var time = th.data.time; - var new_time = []; - if (time_list != null) { - for (var i = 0; i < time.length; i++) { - for (var ii = 0; ii < res.data.data.length; ii++) { - if (time[i] == time_list[ii].GroupHour.substring(0, 5)) { - new_time[i] = time_list[ii].GroupHour.substring(0, 5); - break; - } else { - new_time[i] = ""; + if (val != "") { + var url = "/api/weshop/marketing/reservation/staff/time/list"; + getApp().request.promiseGet(url, { + data: { + projectId: projectId, + beauticianId: th.data.beautician_id, + serviceId: th.data.itemId, + seekTime: SeekTime, + storeId: a.stoid, + } + }).then(res => { + if (res.data.code == 0) { + var time_list = res.data.data; + var time = th.data.time; + var new_time = []; + if (time_list != null) { + for (var i = 0; i < time.length; i++) { + for (var ii = 0; ii < time_list.length; ii++) { + if (time[i] == time_list[ii].GroupHour.substring(0, 5)) { + new_time[i] = time_list[ii].GroupHour.substring(0, 5); + break; + } else { + new_time[i] = ""; + } } } } + th.setData({ + time_list: new_time + }) + } else { + getApp().my_warnning(res.data.msg, 0, th); } - th.setData({ - time_list: new_time - }) - } else { - getApp().my_warnning(res.data.msg, 0, th); - } - }) + }) } }, //更改预约时间 diff --git a/pages/user/my_service/beauty_deta.wxml b/pages/user/my_service/beauty_deta.wxml index 3f87332..962bab6 100644 --- a/pages/user/my_service/beauty_deta.wxml +++ b/pages/user/my_service/beauty_deta.wxml @@ -41,7 +41,7 @@ - + {{it}} diff --git a/pages/user/my_service/i_service.wxml b/pages/user/my_service/i_service.wxml index 7b7b799..16eb8c4 100644 --- a/pages/user/my_service/i_service.wxml +++ b/pages/user/my_service/i_service.wxml @@ -49,9 +49,9 @@ 立即使用 - + 预约 - + diff --git a/pages/user/my_service/tment_details.js b/pages/user/my_service/tment_details.js index a93fc19..b79f30b 100644 --- a/pages/user/my_service/tment_details.js +++ b/pages/user/my_service/tment_details.js @@ -9,16 +9,16 @@ Page({ * 页面的初始数据 */ data: { - url:a.url, + url: a.url, iurl: a.imghost, tment_details: [], //预约详情 - number:"",//订单号 - arrangeTime:"",//预约年月日 - day:"",//判断是上午还是下午 - states:3,//3为取消预约 + number: "", //订单号 + arrangeTime: "", //预约年月日 + day: "", //判断是上午还是下午 + states: 3, //3为取消预约 }, //取消预约 - cancel_tment: function (e) { + cancel_tment: function(e) { var th = this; var index = e.currentTarget.dataset.index; var states = th.data.states; @@ -38,7 +38,7 @@ Page({ header: { 'content-type': 'application/json' }, // 设置请求的 header - success: function (res) { + success: function(res) { if (res.data.code == 0) { getApp().my_warnning("取消成功", 0, th); var id = th.data.activeCategoryId; @@ -69,13 +69,9 @@ Page({ th.setData({ number: options.number }) - th.query_bea(); }, //查询美容师详情 query_bea: function() { - wx.showLoading({ - title: '加载中', - }) var th = this; var number = th.data.number; var url = "/api/weshop/marketing/reservation/reservation/page"; @@ -89,26 +85,26 @@ Page({ wx.hideLoading(); if (res.data.code == 0) { var data = res.data.data.pageData; - var arrangeTime = data[0].ArrangeTime.substring(0,11); + var arrangeTime = data[0].ArrangeTime.substring(0, 11); var day = data[0].ArrangeTime.substring(12, 13); - if (day<12){ - day = "上午" - }else{ + if (day < 12) { + day = "上午" + } else { day = "下午" } th.setData({ tment_details: data, arrangeTime: arrangeTime, - day:day + day: day }) - - }else{ + + } else { getApp().my_warnning(res.data.msg, 0, th); } }) }, //显示核销码 - code_show: function (e) { + code_show: function(e) { var th = this; //--获取成功的时候-- var no = e.currentTarget.dataset.order_sn; @@ -120,7 +116,7 @@ Page({ qc_com.open(obj) }, //跳到首页 - goto: function (e) { + goto: function(e) { wx.switchTab({ url: '/pages/index/index/index', }) @@ -129,6 +125,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function() { - + var th = this; + th.query_bea(); }, }) \ No newline at end of file diff --git a/pages/user/my_service/tment_order_list.js b/pages/user/my_service/tment_order_list.js index beae8e4..cc985a8 100644 --- a/pages/user/my_service/tment_order_list.js +++ b/pages/user/my_service/tment_order_list.js @@ -85,7 +85,7 @@ Page({ title: '加载中', }) th.setData({ - is_read:0 + is_read: 0 }) getApp().request.promiseGet(url, { data: { @@ -179,9 +179,6 @@ Page({ */ onShow: function() { var th = this; - th.setData({ - is_read:0 - }) th.query_orderList(); },