diff --git a/pages/user/my_service/appment_main.js b/pages/user/my_service/appment_main.js index fb5c99b..17d3124 100644 --- a/pages/user/my_service/appment_main.js +++ b/pages/user/my_service/appment_main.js @@ -1,7 +1,8 @@ var e = getApp(), a = e.globalData.setting, os = a, - t = e.request; + t = e.request, + d = e.globalData; Page({ /** @@ -13,9 +14,14 @@ Page({ beautician: 0, //是否显示美容师列表 beautician_name: null, //选中的美容师名称 placeholder: "填写备注", //备注为空的placeholder - store_list: null, //门店列表 - store_name: null, //选择的服务门店 + store_list: [], //门店列表 + beautician_list: [], //美容师列表 + store_name: "", //选择的服务门店 fir_pick_index: 0, //选择的门店下标 + curpage: 1, //当前分页数 + pageSize: 5, //页大小 + total: 0, + ismore: 0, //是否加载完毕 }, onclickstore: function() { var th = this; @@ -32,37 +38,6 @@ Page({ }) } }, - query_bea: function(e) { - var th = this; - //获取选择美容师字段是不是为null,是的话就提示用户先选择门店 - if (true) { - var beautician = th.data.beautician; - var beaname = e.currentTarget.dataset.beaname; - if (beautician) { - // 判断是否选择美容师没有的话就把美容师列表收起来 - if (beaname != undefined) { - th.setData({ - beautician: 0, - beautician_name: beaname, - placeholder: "填写备注" - }) - } else { - th.setData({ - beautician: 0, - placeholder: "填写备注" - }) - } - } else { - th.setData({ - beautician: 1, - placeholder: "" - }) - } - - } else { - getApp().my_warnning("请先选择服务门店", 0, th); - } - }, goto: function(e) { var th = this; if (th.data.beautician_name != null) { @@ -90,12 +65,95 @@ Page({ choice_store: function() { var th = this; var index = th.data.fir_pick_index; - var pickup_name = th.data.store_list[index].pickup_name; + var pickup_name = th.data.store_list[index].StorageName; th.setData({ store: 0, store_name: pickup_name }) }, + onReachBottom: function() { + var th = this; + if (this.data.total <= th.data.pageSize) return; + if (this.data.ismore) return; + + wx.showLoading({ + title: '加载中...', + }) + th.query_store(); + }, + //分页查询门店信息 + query_store: function() { + var th = this; + var itemid = "8f503b2e-f35f-4210-ba42-df4345526b93"; + var url = "/api/weshop/marketing/reservation/storage/page"; + getApp().request.promiseGet(url, { + data: { + storeId: a.stoid, + userId: d.user_id, + itemId: itemid, + page: th.data.curpage, + pageSize: th.data.pageSize + } + }).then(res => { + if (res.data.code == 0) { + wx.hideLoading(); + th.data.curpage++; + var arr1 = th.data.store_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({ + store_list: arr3, + total: res.data.data.total, + ismore: ismore, + is_service_read: 1, + }), wx.stopPullDownRefresh(); //停止下拉刷新 + } + }) + }, + //查询 + query_beautician: function() { + var th = this; + if (th.data.store_name == "") { + getApp().my_warnning("请先选择服务门店", 0, th); + } else { + if (th.data.beautician == 0) { + th.setData({ + beautician: 1 + }) + } else { + th.setData({ + beautician: 0 + }) + } + var itemid = "8f503b2e-f35f-4210-ba42-df4345526b93"; + var storageId = "FD8EC44A-6474-4BA1-A17C-A87306690E59"; + var url = "/api/weshop/marketing/reservation/staff/page"; + getApp().request.promiseGet(url, { + data: { + storeId: a.stoid, + userId: d.user_id, + itemId: itemid, + storageId: storageId + } + }).then(res => { + if (res.data.code == 0) { + th.setData({ + beautician_list: res.data.data.pageData + }) //停止下拉刷新 + } + }) + } + }, + choice_beautician: function(e) { + var th = this; + var bea_name = e.currentTarget.dataset.beaname; + th.setData({ + beautician_name:bea_name + }) + + }, /** * 生命周期函数--监听页面加载 */ @@ -108,15 +166,6 @@ Page({ */ onShow: function() { var th = this; - wx.request({ - url: 'http://localhost:8022/api/weshop/yy_fuwu_sto', - success: function(e) { - if (e.data.code == 0) { - th.setData({ - store_list: e.data.data.pageData - }) - } - } - }) + th.query_store(); } }) \ No newline at end of file diff --git a/pages/user/my_service/appment_main.wxml b/pages/user/my_service/appment_main.wxml index 84dc68c..c13ba69 100644 --- a/pages/user/my_service/appment_main.wxml +++ b/pages/user/my_service/appment_main.wxml @@ -12,7 +12,7 @@ - {{store_name==null?'选择服务门店':store_name}} + {{store_name==""?'选择服务门店':store_name}} @@ -27,15 +27,15 @@ - + {{beautician_name==null?'选择美容师':beautician_name}} - - 钱巧玲 + + {{item.StaffName}} @@ -69,7 +69,7 @@ - @@ -124,14 +124,18 @@ - {{item.pickup_name}} + {{item.StorageName}} 距您: 728m - 地址:{{item.fulladdress}} + 地址:{{item.Address}} + + + 没有找到这个门店 + diff --git a/pages/user/my_service/appment_main.wxss b/pages/user/my_service/appment_main.wxss index 7f4a1a6..402c81e 100644 --- a/pages/user/my_service/appment_main.wxss +++ b/pages/user/my_service/appment_main.wxss @@ -28,6 +28,7 @@ .Fram { padding: 0rpx 60rpx; margin-top: 60rpx; + background-color: rgb(255, 255, 255); } .subSuccess { @@ -258,4 +259,8 @@ } .value{ max-width: 300rpx; +} +.notstore{ + margin-top: 30rpx; + color: rgb(159, 159, 159); } \ No newline at end of file diff --git a/pages/user/my_service/beauty_deta.wxml b/pages/user/my_service/beauty_deta.wxml index 3b428c6..e76f819 100644 --- a/pages/user/my_service/beauty_deta.wxml +++ b/pages/user/my_service/beauty_deta.wxml @@ -35,28 +35,26 @@ - - + + + - + 09:00 - 约满 + 约满 + + + 确定选择 - - - 确定选择 - - - \ No newline at end of file diff --git a/pages/user/my_service/beauty_deta.wxss b/pages/user/my_service/beauty_deta.wxss index b7c3e88..5261038 100644 --- a/pages/user/my_service/beauty_deta.wxss +++ b/pages/user/my_service/beauty_deta.wxss @@ -54,17 +54,15 @@ } .choice { - width: 704rpx; height: 70rpx; background-color: rgb(214, 1, 33); color: rgb(255, 255, 255); + margin-top: 30rpx; } .scroll-h { white-space: nowrap; width: 704rpx; - /* width: 100%; */ - margin-bottom: 25rpx; overflow: visible; height: 125rpx; color: transparent; @@ -110,12 +108,12 @@ .Times { background-color: rgb(238, 243, 247); margin-bottom: 30rpx; - width: 704rpx; + padding:34rpx 27rpx; } .Time { border: 2rpx solid rgb(238, 238, 238); - width: 172rpx; + width: 160rpx; height: 70rpx; background-color: rgb(255, 255, 255); text-align: center; diff --git a/pages/user/my_service/cosmetology_list.wxml b/pages/user/my_service/cosmetology_list.wxml index 4987464..2b0f0c6 100644 --- a/pages/user/my_service/cosmetology_list.wxml +++ b/pages/user/my_service/cosmetology_list.wxml @@ -34,20 +34,20 @@ - + 预约 - + 已约满 - + - 在职业培训、职业技能鉴定与企业用人要求之间建立一个有效实用的联系,经研究 决定,以《职业技能鉴定国家题库操作技能考试手册》的方式,向全社会公布国家题库 操作技能考核试题库的全部内容。 + {{item.remark1}} @@ -65,7 +65,7 @@ - + diff --git a/pages/user/my_service/hist_service.js b/pages/user/my_service/hist_service.js index f7b56a6..19a0fb4 100644 --- a/pages/user/my_service/hist_service.js +++ b/pages/user/my_service/hist_service.js @@ -1,7 +1,8 @@ var e = getApp(), a = e.globalData.setting, os = a, - t = e.request; + t = e.request, + d = e.globalData; Page({ /** @@ -22,6 +23,12 @@ Page({ limitStartTime: "1917-05-06 12:32:44", limitEndTime: "2055-05-06 12:32:44" }, + hist_List: [], //服务项目列表 + is_service_read: 0, + curpage: 1, //当前分页数 + pageSize: 10, //页大小 + total: 0, + ismore: 0, //是否加载完毕 }, pickerShow: function() { this.setData({ @@ -68,37 +75,65 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function() { - + var th = this; + th.query_hist(); }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function() { + var th = this; + if (th.data.total <= th.data.pageSize) return; + if (th.data.ismore) return; + wx.showLoading({ + title: '加载中...', + }) + th.query_service(); + }, + query_hist: function() { + var th = this; + var url = "http://localhost:8022/api/weshop/yy_fuwu_lishi"; + wx.request({ + url: url, + success: function(res) { + if (res.data.code == 0) { + th.setData({ + hist_List: res.data.data.pageData, + total: res.data.data.total + }) + } + } + }) + + // var th = this; + // var url = "/api/weshop/marketing/reservation/sm/page"; + // 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.service_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({ + // service_List: arr3, + // total: res.data.data.total, + // ismore: ismore, + // is_service_read: 1, + // }), wx.stopPullDownRefresh(); //停止下拉刷新 + // } + // }) }, - /** * 用户点击右上角分享 */ diff --git a/pages/user/my_service/hist_service.wxml b/pages/user/my_service/hist_service.wxml index b5f14ce..e16ff89 100644 --- a/pages/user/my_service/hist_service.wxml +++ b/pages/user/my_service/hist_service.wxml @@ -3,7 +3,7 @@ 共使用 - 36 + {{total}} 次服务 @@ -22,24 +22,35 @@ - + - 头部按摩 + {{item.xm}} (美容师: - 花木兰 + {{item.name}} ) - 2019-07-02 23:25:45 + {{item.type_a}} - 已服务 + + 未服务 + 已服务 + 已过期 + + + + + + + 到底了 + - + diff --git a/pages/user/my_service/hist_service.wxss b/pages/user/my_service/hist_service.wxss index 0611d43..6aad1e0 100644 --- a/pages/user/my_service/hist_service.wxss +++ b/pages/user/my_service/hist_service.wxss @@ -95,3 +95,16 @@ page { background-color: rgb(255, 72, 72); border-radius: 40rpx; } + +.After_all { + height: 80rpx; +} + +.After_all .Line { + border-top: 3rpx solid rgb(0, 0, 0); + width: 130rpx; +} + +.After_all .end { + margin: 0rpx 15rpx; +} diff --git a/pages/user/my_service/i_service.wxml b/pages/user/my_service/i_service.wxml index 44e3019..b72622c 100644 --- a/pages/user/my_service/i_service.wxml +++ b/pages/user/my_service/i_service.wxml @@ -63,7 +63,7 @@ - + diff --git a/pages/user/my_service/tment_order_list.js b/pages/user/my_service/tment_order_list.js index 8f1374a..8a35050 100644 --- a/pages/user/my_service/tment_order_list.js +++ b/pages/user/my_service/tment_order_list.js @@ -23,6 +23,12 @@ Page({ name: "已过期", id: 3 }], + tm_order_list: [], //我的预约订单列表 + is_service_read: 0, + curpage: 1, //当前分页数 + pageSize: 10, //页大小 + total: 0, + ismore: 0, //是否加载完毕 }, /** @@ -34,16 +40,45 @@ Page({ changeTab: function(e) { var th = this; var id = e.currentTarget.dataset.id; + var activeCategoryId = th.data.activeCategoryId; + if (id != activeCategoryId) { + th.setData({ + activeCategoryId: id + }) + } else { + return false; + } + }, + query_orderList: function() { + var th = this; + var url = "http://localhost:8022/api/weshop/yy_order_list"; + wx.request({ + url: url, + success: function(res) { + if (res.data.code == 0) { + th.setData({ + tm_order_list: res.data.data.pageData + }) + } + } + }) + }, + //删除预约记录 + deleteOrderData: function(e) { + var th = this; + var index = e.currentTarget.dataset.order_id; + var arr = th.data.tm_order_list; + arr.splice(index, 1); th.setData({ - activeCategoryId: id + tm_order_list: arr }) }, - /** * 生命周期函数--监听页面显示 */ onShow: function() { - + var th = this; + th.query_orderList(); }, /** diff --git a/pages/user/my_service/tment_order_list.wxml b/pages/user/my_service/tment_order_list.wxml index 901443b..eedf0c8 100644 --- a/pages/user/my_service/tment_order_list.wxml +++ b/pages/user/my_service/tment_order_list.wxml @@ -7,67 +7,71 @@ - + - 订单编号:MDDER2019061454879342468 + 订单编号:{{item.order_sn}} - 已过期 + 未服务 + 已服务 + 已过期 - + - + - + 预约门店: - 王者峡谷中路店 + {{item.store}} 预约项目: - 头部按摩 + {{item.goods_name}} 美容师: - 花木兰 + {{item.meirongshi}} 预约时间: - 2018-08-16 14:00 + {{item.time}} - + 服务时间: - 2018-08-16 10:00 + {{item.endtime}} - - 取消预约 - 查看详情 - - 更改时间 - 发表评价 - 重新预约 + + 取消预约 + + + 查看详情 + + 更改时间 + 发表评价 + 重新预约 - + 到底了 @@ -76,7 +80,7 @@ - + diff --git a/pages/user/my_service/tment_order_list.wxss b/pages/user/my_service/tment_order_list.wxss index 6e15189..7c46cde 100644 --- a/pages/user/my_service/tment_order_list.wxss +++ b/pages/user/my_service/tment_order_list.wxss @@ -46,7 +46,7 @@ page { } .order_number { - width: 500rpx; + max-width: 500rpx; } .items {