diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index dcaffa9..68c89b6 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -192,7 +192,7 @@ 我的地址 - + 我的服务 diff --git a/pages/user/my_service/appment_main.js b/pages/user/my_service/appment_main.js index eeaa4f3..72f019c 100644 --- a/pages/user/my_service/appment_main.js +++ b/pages/user/my_service/appment_main.js @@ -22,7 +22,7 @@ Page({ pageSize: 8, //页大小 total: 0, ismore: 0, //是否加载完毕 - itemId: "", //项目id + itemId: "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6", //项目id isScroll: true, //scroll-y是否可以滑动 key_word: "", //是否按门店文字查询 is_service_read: 0, //是否调用过门店接口 @@ -30,6 +30,7 @@ Page({ is_success: 0, //是否提交成功 remarks: "", //备注 storageId: "", //线下门店id + url:"/pages/user/my_service/appment_main",//本页面地址路径用于选择时间页面跳转回来 }, onclickstore: function() { var th = this; @@ -75,31 +76,36 @@ Page({ // return false; // } - var url = "/api/weshop/marketing/reservation/reservation/insert"; - getApp().request.post(url, { - data: { - projectID: "", - beauticianID: "", - buyType: "", - storeId: a.stoid, - storageID: "", - arrangeTime: "", - userId: d.user_id, - remark: "", - states: "" - } - }).then(res => { - if (res.data.code == 0) { - th.setData({ - is_success: 1 - }) - wx.navigateTo({ + // var url = "/api/weshop/marketing/reservation/reservation/insert"; + // getApp().request.post(url, { + // data: { + // projectID: "", + // beauticianID: "", + // buyType: "", + // storeId: a.stoid, + // storageID: "", + // arrangeTime: "", + // userId: d.user_id, + // remark: "", + // states: "" + // } + // }).then(res => { + // if (res.data.code == 0) { + // th.setData({ + // is_success: 1 + // }) + // wx.navigateTo({ + // url: "/pages/user/my_service/tment_details" + // }); + // } else { + // getApp().my_warnning(res.data.msg, 0, th); + // } + // }) + + //测试 + wx.navigateTo({ url: "/pages/user/my_service/tment_details" }); - } else { - getApp().my_warnning(res.data.msg, 0, th); - } - }) }, goto: function(e) { var th = this; @@ -260,11 +266,12 @@ Page({ nav_bea: function() { var th = this; var storageId = th.data.storageId; //线下门店id + var itemId = th.data.itemId; if (storageId == "") { getApp().my_warnning("请选择服务门店", 0, th); } else { wx.navigateTo({ - url: "/pages/user/my_service/cosmetology_list" + url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId }); } }, diff --git a/pages/user/my_service/appment_main.wxml b/pages/user/my_service/appment_main.wxml index 67b7095..68cb162 100644 --- a/pages/user/my_service/appment_main.wxml +++ b/pages/user/my_service/appment_main.wxml @@ -54,7 +54,7 @@ - + 选择时间 @@ -108,7 +108,7 @@ - + 搜索 diff --git a/pages/user/my_service/appment_main.wxss b/pages/user/my_service/appment_main.wxss index 8b9ee6f..dc6c03b 100644 --- a/pages/user/my_service/appment_main.wxss +++ b/pages/user/my_service/appment_main.wxss @@ -12,15 +12,18 @@ margin-right: 15rpx; margin-bottom: 10rpx; font-size: 26rpx; - color: rgb(142,142,142); + color: rgb(142, 142, 142); } -.angler{ - transform: rotate(227deg); - margin-bottom: 0rpx; + +.angler { + transform: rotate(227deg); + margin-bottom: 0rpx; } -.users{ - background-color: rgb(255,255,255); + +.users { + background-color: rgb(255, 255, 255); } + .user { width: 40rpx; height: 40rpx; @@ -111,7 +114,7 @@ border-radius: 10rpx; } -.beauticians{ +.beauticians { width: 407rpx; z-index: 3; top: 45rpx; @@ -126,9 +129,11 @@ border-bottom: 2rpx solid rgb(238, 238, 238); padding-left: 25rpx; } -.beaclone{ + +.beaclone { border-bottom: 0rpx; } + .notes { margin-top: 15rpx; margin-bottom: 60rpx; @@ -259,10 +264,12 @@ color: rgb(255, 255, 255); margin: 20rpx 0rpx; } -.value{ + +.value { max-width: 300rpx; } -.notstore{ + +.notstore { height: 80rpx; color: rgb(159, 159, 159); -} \ No newline at end of file +} diff --git a/pages/user/my_service/beauty_deta.js b/pages/user/my_service/beauty_deta.js index a05fad3..a5e470b 100644 --- a/pages/user/my_service/beauty_deta.js +++ b/pages/user/my_service/beauty_deta.js @@ -10,6 +10,7 @@ Page({ */ data: { iurl: a.imghost, + url:"",//选择选择时间后返回的页面 defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg", seekTime: "2019-11-18", //当前服务预约选择的时间 time_list: [], //可预约时间 @@ -18,21 +19,54 @@ Page({ head_img: "", //美容师头像 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"], time_index: 0, //选择预约时间下标 + date: [{ + date_name: "今天", + id: 0, + date_value: "09月10日" + }, { + date_name: "星期四", + id: 1, + date_value: "09月11日" + }, { + date_name: "星期五", + id: 2, + date_value: "09月12日" + }, { + date_name: "星期六", + id: 3, + date_value: "09月13日" + }, { + date_name: "星期天", + id: 4, + date_value: "09月14日" + }, { + date_name: "下礼拜一", + id: 5, + date_value: "09月15日" + }, { + date_name: "下礼拜二", + id: 6, + date_value: "09月16日" + }, ], + date_id: 0, //选择日期的id }, /** * 生命周期函数--监听页面加载 */ onLoad: function(options) { - + var th = this; + th.setData({ + url:options.url + }) + th.query_beatea(); + th.query_date(); }, /** * 生命周期函数--监听页面显示 */ onShow: function() { - var th = this; - th.query_beatea(); - th.query_date(); + }, //图片失败,默认图片 bind_bnerr1: function(e) { @@ -44,6 +78,14 @@ Page({ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; } }, + //选择服务日期 + check_date: function(e) { + var th = this; + var id = e.currentTarget.dataset.dateid; + th.setData({ + date_id: id + }) + }, //获取美容师信息 query_beatea: function() { var th = this; @@ -72,8 +114,10 @@ Page({ }) }, //返回上个页面 - navigateBack:function(){ - wx.navigateBack({ changed: true });//返回上一页 + navigateBack: function() { + wx.navigateBack({ + changed: true + }); //返回上一页 }, //选择时间 Selection_time: function(e) { @@ -86,7 +130,7 @@ Page({ th.setData({ time_index: index }) - } + } }, query_date: function() { @@ -115,7 +159,7 @@ Page({ } } } - console.log("1111111111"+time_list.length); + console.log("1111111111" + time_list.length); th.setData({ time_list: time_list }) diff --git a/pages/user/my_service/beauty_deta.wxml b/pages/user/my_service/beauty_deta.wxml index e5c3465..6084cfe 100644 --- a/pages/user/my_service/beauty_deta.wxml +++ b/pages/user/my_service/beauty_deta.wxml @@ -20,12 +20,12 @@ 服务预约 - - - 今天 - 09月10日 + + + {{item.date_name}} + {{item.date_value}} - + @@ -36,7 +36,7 @@ - + diff --git a/pages/user/my_service/cosmetology_list.js b/pages/user/my_service/cosmetology_list.js index a2dabb0..fc997e0 100644 --- a/pages/user/my_service/cosmetology_list.js +++ b/pages/user/my_service/cosmetology_list.js @@ -1,7 +1,8 @@ var e = getApp(), a = e.globalData.setting, os = a, - t = e.request; + t = e.request, + d = e.globalData; Page({ /** @@ -10,13 +11,15 @@ Page({ data: { iurl: a.imghost, cosmetology_list: [], //美容师列表 - is_cosmetology_read: 0,//是否有读过美容师接口,该属性用在没有美容师列表的排版 + is_cosmetology_read: 0, //是否有读过美容师接口,该属性用在没有美容师列表的排版 curpage: 1, //当前分页数 pageSize: 10, //页大小 - total: 0,//总数量 + total: 0, //总数量 ismore: 0, //是否加载完毕 + itemId: 0, //项目id, + storageId: 0, //线下门店id }, - onReachBottom: function () { + onReachBottom: function() { var th = this; if (this.data.total <= th.data.pageSize) return; if (this.data.ismore) return; @@ -27,52 +30,41 @@ Page({ }, query_cology: function() { var th = this; - var url = "http://localhost:8022/api/weshop/yy_fuwu_meirongshi"; - wx.request({ - url: url, - success: function(res) { - if (res.data.code == 0) { - th.setData({ - cosmetology_list: res.data.data.pageData - }) - } + var url = "/api/weshop/marketing/reservation/staff/page"; + getApp().request.promiseGet(url, { + data: { + storeId: a.stoid, + userId: 5682130, //5682130 d.user_id + itemId:"08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6", + storageId: "FD8EC44A-6474-4BA1-A17C-A87306690E59", + page: th.data.curpage, + pageSize: th.data.pageSize + } + }).then(res => { + if (res.data.code == 0) { + wx.hideLoading(); + th.data.curpage++; + var arr1 = th.data.cosmetology_list; + var arr2 = res.data.data.pageData; + var arr3 = [...arr1, ...arr2]; + var ismore = 0; + if (arr3.length == res.data.data.total) ismore = 1 + th.setData({ + cosmetology_list: arr3, + total: res.data.data.total, + ismore: ismore, + is_service_read: 1, + }), wx.stopPullDownRefresh(); //停止下拉刷新 } }) - - // var th = this; - // var url = "http://localhost:8022/api/weshop/yy_fuwu_meirongshi"; - // getApp().request.promiseGet(url, { - // data: { - // storeId: a.stoid, - // userId: d.user_id, - // page: th.data.curpage, - // pageSize: th.data.pageSize - // } - // }).then(res => { - // if (res.data.code == 0) { - // wx.hideLoading(); - // th.data.curpage++; - // var arr1 = th.data.cosmetology_list; - // var arr2 = res.data.data.pageData; - // var arr3 = [...arr1, ...arr2]; - // var ismore = 0; - // if (arr3.length == res.data.data.total) ismore = 1 - // th.setData({ - // cosmetology_list: arr3, - // total: res.data.data.total, - // ismore: ismore, - // is_service_read: 1, - // }), wx.stopPullDownRefresh(); //停止下拉刷新 - // } - // }) }, //图片失败,默认图片 - bind_bnerr1: function (e) { + bind_bnerr1: function(e) { var _errImg = e.target.dataset.errorimg; var _Img = e.target.dataset.img; if (_Img != undefined) { var _errObj = {}; - _errObj[_errImg] = "/miniapp/images/no_cate_def.png"; + _errObj[_errImg] = "/miniapp/images/no-head.jpg"; this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; } }, @@ -86,6 +78,11 @@ Page({ // for (var i = 0; i < split.length; i++) { // console.log("成功啦啦啦啦"+split[i]+i); // } + var th = this; + th.setData({ + itemId: options.itemId, + storageId: options.storageId + }) }, /** diff --git a/pages/user/my_service/cosmetology_list.wxml b/pages/user/my_service/cosmetology_list.wxml index 2b0f0c6..cf2e68e 100644 --- a/pages/user/my_service/cosmetology_list.wxml +++ b/pages/user/my_service/cosmetology_list.wxml @@ -8,24 +8,24 @@ - + - {{item.name}} + {{item.StaffName}} - + - - + + {{item.type_a}} - + {{item.type_b}} - + {{item.type_c}} @@ -34,20 +34,18 @@ - - - 预约 - - - + + 预约 + + - {{item.remark1}} + {{item.Remark1}} diff --git a/pages/user/my_service/cosmetology_list.wxss b/pages/user/my_service/cosmetology_list.wxss index a772857..f036161 100644 --- a/pages/user/my_service/cosmetology_list.wxss +++ b/pages/user/my_service/cosmetology_list.wxss @@ -1,6 +1,5 @@ page{ height: 100%; - background-color: rgb(238, 238, 238); } .container{ background-color: rgb(255,255,255); @@ -70,11 +69,13 @@ page{ .go { border: 1rpx solid rgb(196, 26, 46); color: rgb(196, 26, 46); + background-color: rgb(255,255,255); } .gofull { border: 1rpx solid rgb(185, 185, 185); color: rgb(185, 185, 185); + background-color: rgb(255,255,255); } .information { diff --git a/pages/user/my_service/hist_service.js b/pages/user/my_service/hist_service.js index 8a67100..aac11f3 100644 --- a/pages/user/my_service/hist_service.js +++ b/pages/user/my_service/hist_service.js @@ -65,22 +65,13 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function() { - + var th = this; + th.query_hist(); }, - /** * 生命周期函数--监听页面显示 */ onShow: function() { - var th = this; - th.query_hist(); }, /** @@ -127,9 +118,12 @@ Page({ is_service_read: 1, }), wx.stopPullDownRefresh(); //停止下拉刷新 } else { - th.setData({ - is_service_read: 1 - }) + getApp().my_warnning(res.data.msg, 0, this); + + // else { + // th.setData({ + // is_service_read: 1 + // }) } }) }, diff --git a/pages/user/my_service/hist_service.wxml b/pages/user/my_service/hist_service.wxml index 9d4fc7f..72d34a8 100644 --- a/pages/user/my_service/hist_service.wxml +++ b/pages/user/my_service/hist_service.wxml @@ -11,9 +11,9 @@ 重置 - + 筛选 - + @@ -57,8 +57,8 @@ 暂无服务记录 - - 前往使用 + + 前往使用 diff --git a/pages/user/my_service/hist_service.wxss b/pages/user/my_service/hist_service.wxss index cbe87b8..2039077 100644 --- a/pages/user/my_service/hist_service.wxss +++ b/pages/user/my_service/hist_service.wxss @@ -85,13 +85,13 @@ page { } .empty_order navigator { - margin-top: 60rpx; + margin-top: 65rpx; border-radius: 40rpx; } .empty_order navigator view { width: 247rpx; - height: 56rpx; + height: 65rpx; background-color: rgb(255, 72, 72); border-radius: 40rpx; } diff --git a/pages/user/my_service/i_service.js b/pages/user/my_service/i_service.js index 49cc587..3294328 100644 --- a/pages/user/my_service/i_service.js +++ b/pages/user/my_service/i_service.js @@ -37,13 +37,14 @@ Page({ this.setData({ userinfo: userinfo }); + var th = this; + th.query_service(); }, /** * 生命周期函数--监听页面显示 */ onShow: function() { - var th = this; - th.query_service(); + }, onReachBottom: function() { var th = this; @@ -81,6 +82,8 @@ Page({ ismore: ismore, is_service_read: 1, }), wx.stopPullDownRefresh(); //停止下拉刷新 + }else{ + getApp().my_warnning(res.data.msg,0,th); } }) }, diff --git a/pages/user/my_service/tment_details.js b/pages/user/my_service/tment_details.js index 6facf10..f89021f 100644 --- a/pages/user/my_service/tment_details.js +++ b/pages/user/my_service/tment_details.js @@ -29,6 +29,22 @@ Page({ } } }) + /* + var url = "/api/weshop/marketing/reservation/reservation/page"; + getApp().request.promiseGet(url, { + data: { + storeId: 1, + userId: 5682130 + } + }).then(res => { + if (res.data.code == 0) { + var data = res.data.data.pageData; + th.setData({ + tment_details: data + }) + } + }) + */ }, /** * 生命周期函数--监听页面显示 diff --git a/pages/user/my_service/tment_details.wxml b/pages/user/my_service/tment_details.wxml index acb5c75..d40550c 100644 --- a/pages/user/my_service/tment_details.wxml +++ b/pages/user/my_service/tment_details.wxml @@ -81,16 +81,24 @@ - - - 取消预约 - 我的服务 - - - 更改时间 - 发表评价 - 重新预约 + + + 取消预约 + + 我的服务 + + + + 更改时间 + + + 发表评价 + + + 重新预约 + + \ No newline at end of file diff --git a/pages/user/my_service/tment_eval.js b/pages/user/my_service/tment_eval.js index 9678987..e8161b2 100644 --- a/pages/user/my_service/tment_eval.js +++ b/pages/user/my_service/tment_eval.js @@ -1,7 +1,8 @@ var e = getApp(), a = e.globalData.setting, os = a, - t = e.request; + t = e.request, + d = e.globalData; Page({ /** @@ -9,8 +10,72 @@ Page({ */ data: { iurl: a.imghost, + stars_index: -1, + labels: [], + sub_evaluate:0 + }, + //点击星级 + check_stars: function(e) { + var th = this; + var index = e.currentTarget.dataset.index; + var stars_index = th.data.stars_index; + if (index != stars_index) { + var url = "/api/weshop/marketing/reservation/star/label/list"; + getApp().request.promiseGet(url, { + data: { + Star: index, + storeId: a.stoid + } + }).then(res => { + if (res.data.code == 0) { + th.setData({ + labels: res.data.data + }) + } else { + getApp().my_warnning(res.data.msg, 0, th); + return; + } + }) + th.setData({ + stars_index: index + }) + } + }, + //提交评价 + Subs: function() { + var th = this; + th.setData({ + sub_evaluate:1 + }) + wx.navigateTo({ + url: "/pages/user/my_service/tment_order_list" + }); + }, + //图片失败,默认图片 + bind_bnerr1: function(e) { + var _errImg = e.target.dataset.errorimg; + var _Img = e.target.dataset.img; + if (_Img != undefined) { + var _errObj = {}; + _errObj[_errImg] = "/miniapp/images/no-head.jpg"; + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; + } + }, + //选择标签 + check_label: function(e) { + var th = this; + var index = e.currentTarget.dataset.index; + var label_id = th.data.labels[index].check; + var labels = 'labels[' + index + '].check'; + if (label_id) { + label_id = 0 + } else { + label_id = 1 + } + th.setData({ + [labels]: label_id + }) }, - /** * 生命周期函数--监听页面加载 */ diff --git a/pages/user/my_service/tment_eval.json b/pages/user/my_service/tment_eval.json index af0d2da..fdac9e4 100644 --- a/pages/user/my_service/tment_eval.json +++ b/pages/user/my_service/tment_eval.json @@ -1,3 +1,6 @@ { - "navigationBarTitleText": "预约评价" + "navigationBarTitleText": "预约评价", + "usingComponents": { + "warn": "/components/long_warn/long_warn" + } } \ No newline at end of file diff --git a/pages/user/my_service/tment_eval.wxml b/pages/user/my_service/tment_eval.wxml index 8c5ed71..164ee4c 100644 --- a/pages/user/my_service/tment_eval.wxml +++ b/pages/user/my_service/tment_eval.wxml @@ -26,26 +26,17 @@ - + - + - - - 衣着整洁 - - - 穿着专业 - - - 准时到达 - - - 服务态度好 + + + {{item.LabelName}} @@ -54,13 +45,13 @@ 满意的话请打五星噢,谢谢您的支持! - + 确认提交 - + @@ -70,4 +61,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/pages/user/my_service/tment_eval.wxss b/pages/user/my_service/tment_eval.wxss index e8abea2..11028fc 100644 --- a/pages/user/my_service/tment_eval.wxss +++ b/pages/user/my_service/tment_eval.wxss @@ -43,18 +43,21 @@ textarea { width: 100%; - height: 280rpx; + height: 240rpx; margin-top: 70rpx; border: 2rpx solid rgb(203, 203, 203); - border-radius: 15rpx; + border-radius: 13rpx; padding-top: 25rpx; padding-left: 30rpx; - margin-bottom: 32rpx; + margin-bottom: 30rpx; padding-right: 15rpx; + padding-bottom: 20rpx; } .labels { - margin-bottom: 55rpx; + margin-bottom: 35rpx; + display: inline-block; + max-height: 240rxp; } .label { @@ -63,26 +66,33 @@ textarea { line-height: 48rpx; border: 2rpx solid rgb(218, 218, 218); color: rgb(152, 152, 152); - margin-right: 22rpx; border-radius: 5rpx; + margin-right: 15rpx; + max-width: 165rpx; + display: inline-block; } /* 选择标签的样式 */ .checklabel { border: 2rpx solid rgb(214, 1, 33); + background-color: rgb(255, 231, 235); color: rgb(214, 1, 33); } .feedback { color: rgb(152, 152, 152); - margin-bottom: 90rpx; + margin-bottom: 70rpx; +} + +.Subs{ + background-color: rgb(255,255,255); } .Submission { width: 400rpx; height: 65rpx; - border-radius: 30rpx; + border-radius: 40rpx; background-color: rgb(214, 1, 33); color: rgb(255, 255, 255); } diff --git a/pages/user/my_service/tment_order_list.wxml b/pages/user/my_service/tment_order_list.wxml index 79671ea..55c63fb 100644 --- a/pages/user/my_service/tment_order_list.wxml +++ b/pages/user/my_service/tment_order_list.wxml @@ -60,7 +60,7 @@ 取消预约 - 查看详情 + 查看详情 更改时间 发表评价 @@ -84,7 +84,7 @@ 暂无预约记录 - 立即预约 + 立即预约 diff --git a/pages/user/my_service/tment_order_list.wxss b/pages/user/my_service/tment_order_list.wxss index 2098984..1d2ed7c 100644 --- a/pages/user/my_service/tment_order_list.wxss +++ b/pages/user/my_service/tment_order_list.wxss @@ -131,7 +131,7 @@ page { .empty_order navigator view { width: 247rpx; - height: 56rpx; + height: 65rpx; background-color: rgb(255, 72, 72); border-radius: 40rpx; }