diff --git a/app.json b/app.json
index a05e645..c9d2eec 100644
--- a/app.json
+++ b/app.json
@@ -1,5 +1,6 @@
{
"pages": [
+
"pages/index/index/index",
"pages/goods/categoryList/categoryList",
"pages/cart/cart/cart",
@@ -46,16 +47,12 @@
"pages/team/team_ping/team_ping",
"pages/cart/cart2_pt/cart2_pt",
"pages/cart/cart_wk/cart_wk",
-
"pages/user/member/menber",
"pages/user/member/bring/bring",
"pages/user/member/bring/msg/msg",
"pages/user/member/account/account",
"pages/user/member/account_unable/account_unable",
"pages/user/member/cash_record/cash_record",
- "pages/user/deposit/deposit",
- "pages/user/deposit/prepaid/prepaid",
- "pages/user/deposit/prepaid/msg/msg",
"pages/user/coupons/coupons",
"pages/user/coupons/qr_code/qr_code",
"pages/user/coupons/query/index",
@@ -63,7 +60,6 @@
"pages/user/integral/integral",
"pages/user/integral/query/index",
"pages/user/integral/msg/msg",
-
"pages/user/userqy/userqy",
"pages/user/user_spsy/user_spsy",
"pages/user/user_fw/user_fw",
@@ -74,15 +70,23 @@
"pages/user/plus/plus",
"pages/user/cardinfo/cardinfo",
"pages/user/Detailed/Detailed",
- "pages/user/Change_phone/Change_phone"
-
+ "pages/user/Change_phone/Change_phone",
+
+ "pages/user/my_service/appment_main",
+ "pages/user/my_service/i_service",
+ "pages/user/my_service/cosmetology_list",
+ "pages/user/my_service/hist_service",
+ "pages/user/my_service/tment_details",
+ "pages/user/my_service/tment_eval",
+ "pages/user/my_service/tment_order_list",
+ "pages/user/my_service/beauty_deta"
],
"permission": {
"scope.userLocation": {
"desc": "获取你的位置信息"
}
},
- "window": {
+ "window": {
"backgroundTextStyle": "light",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "加载中...",
@@ -95,7 +99,6 @@
"selectedColor": "#f23030",
"borderStyle": "white",
"backgroundColor": "#ffffff",
-
"list": [
{
"pagePath": "pages/index/index/index",
diff --git a/app.wxss b/app.wxss
index 486c77d..1c9cadb 100644
--- a/app.wxss
+++ b/app.wxss
@@ -50,6 +50,13 @@ button {
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
}
+.ellipsis-4 {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 4;
+}
.pd-bg-fff {
padding: 0 30rpx;
diff --git a/components/diy_notice/diy_notice.wxml b/components/diy_notice/diy_notice.wxml
index be135f1..7b867a1 100644
--- a/components/diy_notice/diy_notice.wxml
+++ b/components/diy_notice/diy_notice.wxml
@@ -4,9 +4,9 @@
- {{object.noticetxt}}
- {{object.noticetxt}}
- {{object.noticetxt}}
+ {{object.noticetxt}}
+ {{object.noticetxt}}
+ {{object.noticetxt}}
diff --git a/components/diy_notice/diy_notice.wxss b/components/diy_notice/diy_notice.wxss
index 2330b15..194cf39 100644
--- a/components/diy_notice/diy_notice.wxss
+++ b/components/diy_notice/diy_notice.wxss
@@ -47,8 +47,10 @@
display: inline-block;
position: relative;
padding-right: 0px;
- animation: kf-marque-animation 4.5s linear infinite;
+ animation: kf-marque-animation 20s linear infinite;
white-space: nowrap;
+ line-height: 2rpx;font-size: 28rpx;
+
}
.pd_top10{margin: 10rpx 0}
diff --git a/components/my_confirm/my_confirm.js b/components/my_confirm/my_confirm.js
new file mode 100644
index 0000000..de6129e
--- /dev/null
+++ b/components/my_confirm/my_confirm.js
@@ -0,0 +1,44 @@
+var t = getApp();
+Component({
+ /*** 页面的初始数据***/
+ data: {
+ yu_e_show: 0,
+ iurl: t.globalData.setting.imghost,
+ width: 0,
+ success: null, //成功的回调
+ cancle: null, //取消的回调
+ title: null, //标题
+ s_text: null, //确定的提示语
+ c_text: null, //取消的提示语
+ },
+
+ methods: {
+ open: function(title, s_text, c_text, success, cancle) {
+ this.setData({
+ title: title,
+ s_text: s_text,
+ c_text: c_text,
+ yu_e_show: 1
+ })
+ this.data.success = success;
+ this.data.cancle = cancle;
+ },
+ open_cancel: function (yu_e_show){
+ this.setData({
+ yu_e_show: yu_e_show
+ })
+ },
+ go_sure: function() {
+ this.data.success();
+ },
+ go_cancle: function() {
+ this.data.cancle();
+ },
+ close_yu_e: function() {
+ this.setData({
+ yu_e_show: 0
+ })
+ }
+ }
+
+})
\ No newline at end of file
diff --git a/components/my_confirm/my_confirm.json b/components/my_confirm/my_confirm.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/components/my_confirm/my_confirm.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/my_confirm/my_confirm.wxml b/components/my_confirm/my_confirm.wxml
new file mode 100644
index 0000000..00f519b
--- /dev/null
+++ b/components/my_confirm/my_confirm.wxml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ⅹ
+ {{title}}
+
+ {{s_text}}
+ {{c_text}}
+
+
+
+
+
+
diff --git a/components/my_confirm/my_confirm.wxss b/components/my_confirm/my_confirm.wxss
new file mode 100644
index 0000000..aa124ba
--- /dev/null
+++ b/components/my_confirm/my_confirm.wxss
@@ -0,0 +1,66 @@
+
+/* 弹窗样式 */
+.xc-pop-up{
+ width: 100%;
+ height: 100%;
+ position:fixed;
+ z-index:5;
+ display:flex;
+ justify-content:center;
+ align-items:center;
+}
+.xc-obscuration{
+ position: fixed;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 11;
+ background: rgba(0,0,0,0.4);
+ width: 100%;
+ height: 100%;
+}
+
+.shut{
+ display: block;
+ width: 54rpx;
+ height: 54rpx;
+ font-size: 50rpx;
+ line-height:47rpx;
+ border-radius: 50%;
+ -moz-border-radius: 50%;
+ -webkit-border-radius: 50%;
+ color: #fff;
+ text-align: center;
+ position: fixed;
+ margin-top: -23rpx;
+ z-index: 66666;
+ right: 60rpx;
+ background: #c8162c;
+}
+.xc-qr-frame{
+ width:560rpx;
+ height: 280rpx;
+ background: #fff;
+ z-index: 55;
+ position: fixed;
+ top:40%;
+ padding-bottom:20rpx;
+ left:50%;
+ margin-left: -280rpx; border-radius:10rpx
+}
+
+.ck_btn{width:44%;height:52rpx;line-height:60rpx;background:#f35e73;border-radius:10rpx;}
+
+.fs36{ font-size: 36rpx; }
+.fs30{ font-size: 30rpx; }
+
+.Opening_bk image {
+ position: absolute; width: 100%; height: 320rpx;
+}
+.flex {display: flex;}
+.jc-center{ justify-content: center;}
+.ai-center{align-items: center;}
+.color{
+ color: rgb(255,255,255);
+}
\ No newline at end of file
diff --git a/components/nav_b/nav_b.js b/components/nav_b/nav_b.js
new file mode 100644
index 0000000..f6c5c8d
--- /dev/null
+++ b/components/nav_b/nav_b.js
@@ -0,0 +1,36 @@
+var t = getApp(), os = t.globalData.setting;
+Component({
+ properties: {
+ },
+ data: {
+ isopen: 0,
+ iurl: os.imghost,
+ nav_left:"首页",//导航左边
+ nav_center:"预约",//导航中间
+ nav_right: "我的",//导航右边
+ nav_left_url: "/pages/index/index/index",//导航左边地址
+ nav_center_url:"/pages/user/my_service/tment_order_list",//导航中间地址
+ nav_right_url:"/pages/user/index/index",//导航右边地址
+ },
+
+ ready: function () {
+ },
+ methods: {
+ //--点击打开事件--
+ open_box: function () {
+ this.setData({ isopen: 1 });
+ },
+ //--关闭事件--
+ close_box: function () {
+ this.setData({ isopen: 0 });
+ },
+ //--跳转--
+ goto: function (e) {
+ var url = e.currentTarget.dataset.url;
+ getApp().goto(url);
+ this.close_box();
+ }
+
+ }
+
+})
\ No newline at end of file
diff --git a/components/nav_b/nav_b.json b/components/nav_b/nav_b.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/components/nav_b/nav_b.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/nav_b/nav_b.wxml b/components/nav_b/nav_b.wxml
new file mode 100644
index 0000000..9fb82e8
--- /dev/null
+++ b/components/nav_b/nav_b.wxml
@@ -0,0 +1,12 @@
+
+
+
+
+
+ {{nav_left}}
+ {{nav_center}}
+ {{nav_right}}
+ ×
+
+
+
diff --git a/components/nav_b/nav_b.wxss b/components/nav_b/nav_b.wxss
new file mode 100644
index 0000000..b71a95c
--- /dev/null
+++ b/components/nav_b/nav_b.wxss
@@ -0,0 +1,62 @@
+.box_main {
+ width: 80rpx;
+ height: 80rpx;
+ background: #272636;
+ transition: width 0.8s;
+ -moz-transition: width 0.8s; /* Firefox 4 */
+ -webkit-transition: width 0.8s; /* Safari and Chrome */
+ -o-transition: width 0.8s; /* Opera */
+ border-radius: 50rpx;
+ position: fixed;
+ right: 10rpx;
+ bottom: 350rpx;
+ overflow: hidden;
+ z-index: 4;
+}
+
+.box_isopen {
+ width: 420rpx;
+}
+
+.box_main .dian {
+ text-align: center;
+ width: 80rpx;
+ height: 80rpx;
+ color: #ffff;
+ font-size: 50rpx;
+ background: none;
+}
+
+.box_main .dian image {
+ width: 60rpx;
+ height: 20rpx;
+}
+
+.box_main.box_isopen .dian {
+ display: none;
+}
+
+.box_main .cl_list {
+ display: none;
+}
+
+.box_main.box_isopen .cl_list {
+ display: block;
+ margin-left: 20rpx;
+}
+
+.box_main .cl_list .item {
+ display: inline-block;
+ width: 100rpx;
+ height: 80rpx;
+ text-align: center;
+ line-height: 80rpx;
+ color: #fff;
+ vertical-align: top;
+ font-size: 32rpx;
+}
+
+.box_main .cl_list .item.big {
+ font-size: 70rpx;
+ line-height: 70rpx;
+}
diff --git a/images/gt.png b/images/gt.png
deleted file mode 100644
index 354851e..0000000
--- a/images/gt.png
+++ /dev/null
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index 191d706..e0fb47c 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -361,7 +361,7 @@ Page({
}
})
- if(frozenQuan){
+ if (frozenQuan && arr[ind].quan_list){
arr[ind].quan_list=th.check_is_frozenQuan(arr[ind].quan_list,frozenQuan);
}
@@ -446,7 +446,7 @@ Page({
}
})
- if(frozenQuan){
+ if (frozenQuan && quanlist){
quanlist=th.check_is_frozenQuan(quanlist,frozenQuan);
}
@@ -493,7 +493,7 @@ Page({
}
})
- if(frozenQuan){
+ if (frozenQuan && quanlist){
quanlist=th.check_is_frozenQuan(quanlist,frozenQuan);
}
}
diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js
index 95529d2..84fae37 100644
--- a/pages/goods/goodsInfo/goodsInfo.js
+++ b/pages/goods/goodsInfo/goodsInfo.js
@@ -305,7 +305,6 @@ Page({
if (!user) return false;
clearInterval(ti);
-
if(user.card_field ){
var str = user['card_expiredate'].replace(/-/g, '/');
var end = new Date(str);
@@ -1573,7 +1572,7 @@ Page({
}
var goods_list = this.selectComponent("#goods_list"); //组件的id
- goods_list.get_list();
+ if (goods_list) goods_list.get_list();
},
//--------检查是否活动,活动是否开始,或者是否结束-------
diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml
index 86f83c8..b26cc8c 100644
--- a/pages/goods/goodsInfo/goodsInfo.wxml
+++ b/pages/goods/goodsInfo/goodsInfo.wxml
@@ -566,25 +566,8 @@
推荐
-
-
-
-
-
-
-
-
-
- ¥
- {{item.shop_price}}
-
- 原价¥{{item.market_price}}
-
- {{item.goods_name}}
-
-
-
-
+
+
diff --git a/pages/user/cardinfo/cardinfo.wxml b/pages/user/cardinfo/cardinfo.wxml
index 74b8c15..aeeb1af 100644
--- a/pages/user/cardinfo/cardinfo.wxml
+++ b/pages/user/cardinfo/cardinfo.wxml
@@ -131,11 +131,10 @@
ⅹ
- 确定把所有奖励金转入余额
+ 确定把所有奖励金转入余额
- 是的
- 再看看
+ 是的
+ 再看看
diff --git a/pages/user/cardinfo/cardinfo.wxss b/pages/user/cardinfo/cardinfo.wxss
index 267aa13..0f83393 100644
--- a/pages/user/cardinfo/cardinfo.wxss
+++ b/pages/user/cardinfo/cardinfo.wxss
@@ -190,9 +190,7 @@ align-items:center;
display: block;
width: 54rpx;
height: 54rpx;
-
font-size: 50rpx;
-
line-height:47rpx;
border-radius: 50%;
-moz-border-radius: 50%;
@@ -200,24 +198,25 @@ align-items:center;
color: #fff;
text-align: center;
position: fixed;
-margin-top: -23rpx;
-z-index: 66666;
- right: 20rpx;
- background: #c8162c;
+ margin-top: -23rpx;
+ z-index: 66666;
+ right: 60rpx;
+ background: #c8162c;
}
.xc-qr-frame{
- width:90%;
-height: 260rpx;
+ width:560rpx;
+ height: 280rpx;
background: #fff;
z-index: 55;
position: fixed;
top:40%;
-
padding-bottom:20rpx;
- right: 4.5%;
- overflow: hidden;
-
+ left:50%;
+ margin-left: -280rpx; border-radius:10rpx
}
+
+.ck_btn{width:44%;height:52rpx;line-height:60rpx;background:#f35e73;border-radius:10rpx;}
+
.fs36{
font-size: 36rpx;
}
diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml
index 805f12a..95972c0 100644
--- a/pages/user/index/index.wxml
+++ b/pages/user/index/index.wxml
@@ -212,7 +212,10 @@
我的地址
-
+
+
+ 我的服务
+
diff --git a/pages/user/my_service/appment_main.js b/pages/user/my_service/appment_main.js
new file mode 100644
index 0000000..5bc4d53
--- /dev/null
+++ b/pages/user/my_service/appment_main.js
@@ -0,0 +1,632 @@
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ inurl: a.url, //接口网址
+ iurl: a.imghost, //服务器网址
+ store: 0, //是否显示服务门店列表
+ beautician: 0, //是否显示美容师列表
+ beautician_name: "", //选中的美容师名称
+ beauticianID: "", //美容师id
+ bea_index: "", //美容师列表下标
+ placeholder: "填写备注", //备注为空的placeholder
+ store_list: [], //门店列表
+ beautician_list: [], //美容师列表
+ store_name: "", //选择的服务门店
+ fir_pick_index: 0, //选择的门店下标
+ curpage: 1, //当前分页数
+ pageSize: 8, //页大小
+ total: 0,
+ ismore: 0, //是否加载完毕
+ itemId: "", //服务id
+ project_id: "", //项目id
+ isScroll: true, //scroll-y是否可以滑动
+ key_word: "", //是否按门店文字查询
+ is_service_read: 0, //是否调用过门店接口
+ is_search: 0, //是否通过key_word调用接口
+ is_success: 0, //是否提交成功
+ remarks: "", //备注
+ storageId: "", //线下门店id
+ url: "/pages/user/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来
+ buyType: "", //项目类型
+ time: "", //选择预约时间
+ tment_count: "", //可预约人数
+ lat: "", //纬度坐标
+ lon: "", //经度坐标
+ is_gps: 1, //是否开启gps
+ validay: "", //服务项目有效期
+ is_sub: 0, //判断是否重复提交
+ is_textea: 1, //备注是否是可输入
+ },
+ //控制备注输入
+ check_text: function() {
+ var th = this;
+ var is_textea = th.data.is_textea;
+ th.setData({
+ is_textea: 1,
+ beautician: 0
+ })
+ },
+ onclickstore: function() {
+ var th = this;
+ var store = th.data.store;
+ if (store) {
+ th.setData({
+ store: 0,
+ is_textea: 1
+ })
+ } else {
+ th.setData({
+ beautician: 0,
+ store: 1,
+ is_textea: 0
+ })
+ if (th.data.store_list.length < 1) {
+ wx.showLoading({
+ title: '加载中',
+ })
+ th.query_store();
+ }
+ }
+ },
+ //输入的备注
+ input_remarks: function(e) {
+ var remarks = e.detail.value;
+ this.setData({
+ remarks: remarks
+ })
+ },
+ //提交成功及发送模版代码
+ success: function() {
+ var th = this;
+ var store = th.data.store_name; //门店名称
+ var bea_name = th.data.beautician_name; //美容师名称
+ var time = th.data.time; //预约时间
+ var is_sub = th.data.is_sub; //是否重复提交
+ var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径
+ var serviceId = th.data.itemId; //服务id
+ var beauticianID = th.data.beauticianID; //美容师id
+ var buyType = th.data.buyType; //服务项目类型
+ var storeId = a.stoid; //商家id
+ var storageId = th.data.storageId; //门店id
+ var userId = d.user_id; //用户id
+ var remarks = th.data.remarks; //用户备注
+ var project_id = th.data.project_id; //项目id
+ var validay = th.data.validay;
+ var json = {
+ "arrangeTime": time + ":00",
+ "beauticianId": beauticianID,
+ "buyType": buyType,
+ "effectiveDay": "",
+ "number": "",
+ "projectId": project_id,
+ "remark": remarks,
+ "serviceId": serviceId,
+ "states": 0,
+ "storageId": storageId,
+ "storeId": storeId,
+ "userId": userId,
+ "validay": validay
+ }
+ var data = JSON.stringify(json);
+ wx.request({
+ url: url,
+ data: json,
+ method: 'post',
+ header: {
+ 'content-type': 'application/json'
+ }, // 设置请求的 header
+ success: function(res) {
+ th.setData({
+ is_sub: 0
+ })
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ getApp().my_warnning("预约成功", 1, th);
+ var store_name = th.data.store_name; //预约门店
+ var number = res.data.data.Number;
+ var temp_url = "/api/wx/open/app/user/sendSubscribeMsg"; //模版接口
+ var userinfo = getApp().globalData.userInfo;
+ var name = d.userInfo.nickname;
+ var json = {
+ // "formId": formid,
+ "keyWord": [{
+ "keyword": res.data.data.ServiceName
+ },
+ {
+ "keyword": time.substring(0, 16)
+ }, {
+ "keyword": res.data.data.BeauticianName
+ }, {
+ "keyword": res.data.data.StorageName
+ }, {
+ "keyword": res.data.data.Address
+ }
+ ],
+ "page": "/pages/user/my_service/tment_details?number=" + number,
+ "storeId": a.stoid,
+ "typeId": "1011",
+ "userId": d.user_id
+ };
+ var data = JSON.stringify(json);
+ //调用发送预约成功模版接口
+ wx.request({
+ url: th.data.inurl + temp_url,
+ data: data,
+ method: 'post',
+ header: {
+ 'content-type': 'application/json'
+ }, // 设置请求的 header
+ success: function(data) {}
+ })
+ setTimeout(function() {
+ wx.redirectTo({
+ url: "/pages/user/my_service/tment_details?number=" + number
+ });
+ }, 1000);
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ th.settime();
+ }
+ }
+ })
+
+ },
+ //定时显示texteat
+ settime: function() {
+ var th = this;
+ setTimeout(function() {
+ th.setData({
+ is_textea: 1
+ })
+ }, 2000);
+ },
+ //提交预约
+ sub_success: function(e) {
+ var th = this;
+ var temp_url = th.data.inurl + "/api/wx/weappSendlist/page";
+ var template_id = "";
+ if (th.data.is_sub == 1) {
+ return false;
+ }
+ var store = th.data.store_name; //门店名称
+ var bea_name = th.data.beautician_name; //美容师名称
+ var time = th.data.time; //预约时间
+ var is_sub = th.data.is_sub; //是否重复提交
+ th.setData({
+ is_textea: 0,
+ is_sub: 1
+ })
+ //提交预约前的判断
+ if (store == "") {
+ getApp().my_warnning("请选择服务门店", 0, th);
+ th.setData({
+ is_sub: 0
+ })
+ th.settime();
+ return false;
+ } else if (bea_name == "") {
+ getApp().my_warnning("请选择美容师", 0, th);
+ th.setData({
+ is_sub: 0
+ })
+ th.settime();
+ return false;
+ } else if (time == undefined || time == '') {
+ getApp().my_warnning("请选择预约时间", 0, th);
+ th.setData({
+ is_sub: 0
+ })
+ th.settime();
+ return false;
+ } else {
+ var version ="";
+ //判断微信版本是否达到预约成功订阅的要求
+ wx.getSystemInfo({
+ success(res) {
+ version = res.version;
+ }
+ })
+ wx.showLoading({
+ title: '加载中',
+ })
+ if (th.ver(version, '7.0.4') >= 0) {
+ //获取模版id
+ getApp().request.promiseGet(temp_url, {
+ data: {
+ store_id: a.stoid,
+ typeid: "1011"
+ }
+ }).then(res => {
+ if (res.data.code == 0 && res.data.data.pageData.length > 0) {
+ template_id = res.data.data.pageData[0].template_id;
+ // //授权订阅
+ wx.requestSubscribeMessage({
+ tmplIds: [template_id],
+ success(res) {
+ th.success();
+ },
+ fail(res) {
+ th.success();
+ }
+ })
+ } else {
+ th.success();
+ }
+ })
+ } else {
+ // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
+ wx.showModal({
+ title: '提示',
+ content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+ })
+ th.setData({
+ is_sub: 0
+ })
+ }
+
+ }
+ },
+ //版本判断
+ ver:function(v1,v2){
+ v1 = v1.split('.')
+ v2 = v2.split('.')
+ var num1 = "" ;
+ var num2 = "";
+ var len = Math.max(v1.length, v2.length)
+
+ while (v1.length < len) {
+ v1.push('0')
+ }
+ while (v2.length < len) {
+ v2.push('0')
+ }
+
+ for (let i = 0; i < len; i++) {
+ num1 = parseInt(v1[i])
+ num2 = parseInt(v2[i])
+
+ if (num1 > num2) {
+ return 1
+ } else if (num1 < num2) {
+ return -1
+ }
+ }
+ return 0
+ },
+ goto: function(e) {
+ var th = this;
+ th.setData({
+ beautician: 0,
+ is_textea: 0
+ })
+ if (th.data.store_name == "") {
+ getApp().my_warnning("请选择服务门店", 0, th);
+ th.settime();
+ } else if (th.data.beautician_name == "") {
+ getApp().my_warnning("请选择美容师", 0, th);
+ th.settime();
+ } else {
+ th.setData({
+ is_textea: 1
+ })
+ var url = e.currentTarget.dataset.url;
+ getApp().goto(url);
+ }
+ },
+ //点击选择门店
+ choose_for_store: function(e) {
+ var th = this;
+ var index_c = e.currentTarget.dataset.ind;
+ var fir_pick_index = th.data.fir_pick_index;
+ //判断是否点击选中的门店,防止重复点击重复设置选中下标
+ if (index_c == fir_pick_index) {
+ return false;
+ } else {
+ th.setData({
+ fir_pick_index: index_c,
+ beautician_name: "",
+ time: "",
+ tment_count: ""
+ })
+ }
+ },
+ //确认选择门店
+ choice_store: function() {
+ var th = this;
+ var index = th.data.fir_pick_index;
+ var store_name = th.data.store_list[index].StorageName;
+ var Id = th.data.store_list[index].Id;
+ th.setData({
+ store: 0,
+ store_name: store_name,
+ storageId: Id,
+ is_textea: 1
+ })
+ },
+ 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;
+ th.setData({
+ is_textea: 0
+ })
+ var itemId = th.data.itemId; //服务id
+ var url = "/api/weshop/marketing/reservation/storage/page";
+ var key_word = th.data.key_word;
+ key_word = key_word.replace(/\s+/g, "");
+ getApp().request.promiseGet(url, {
+ data: {
+ storeId: a.stoid,
+ serviceId: itemId,
+ latitude: th.data.lat,
+ longitude: th.data.lon,
+ page: th.data.curpage,
+ pageSize: th.data.pageSize,
+ keyWord: key_word
+ }
+ }).then(res => {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ 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(); //停止下拉刷新
+ if (key_word != "" && res.data.data.pageData.length < 1) {
+ th.setData({
+ is_search: 1
+ })
+ }
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ th.settime();
+ }
+ })
+ },
+ //查询
+ query_beautician: function() {
+ var th = this;
+ th.setData({
+ is_textea: 0
+ })
+ if (th.data.store_name == "") {
+ getApp().my_warnning("请选择服务门店", 0, th);
+ th.settime();
+ } else {
+ wx.showLoading({
+ title: '加载中',
+ })
+ var itemid = th.data.itemId; //正式使用的项目id
+ var storageId = th.data.storageId; //正式使用的线下门店id
+ var url = "/api/weshop/marketing/reservation/staff/page"; //接口地址
+ getApp().request.promiseGet(url, {
+ data: {
+ storeId: a.stoid,
+ userId: d.user_id,
+ serviceId: itemid,
+ storageId: storageId
+ }
+ }).then(res => {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ th.setData({
+ beautician_list: res.data.data.pageData
+ })
+ if (res.data.data.pageData.length < 1) {
+ getApp().my_warnning("暂无美容师", 0, th);
+ th.settime();
+ } else {
+ if (th.data.beautician == 0) {
+ th.setData({
+ beautician: 1,
+ })
+ } else {
+ th.setData({
+ beautician: 0,
+ })
+ }
+ }
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ th.settime();
+ }
+ })
+ }
+ },
+ choice_beautician: function(e) {
+ var th = this;
+ var bea_index = e.currentTarget.dataset.baaindex;
+ var bea_name = th.data.beautician_list[bea_index].StaffName;
+ var BeauticianID = th.data.beautician_list[bea_index].Id;
+ th.setData({
+ beautician_name: bea_name,
+ beautician: 0,
+ bea_index: bea_index,
+ beauticianID: BeauticianID,
+ time: "",
+ tment_count: "",
+ is_textea: 1
+ })
+
+ },
+ //获取搜索门店输入的值
+ input_store: function(e) {
+ this.setData({
+ key_word: e.detail.value
+ })
+ },
+ //搜索门店
+ search_store: function() {
+ var th = this;
+ var key_word = th.data.key_word;
+ var store_list = th.data.store_list;
+ th.setData({
+ curpage: 1,
+ is_search: 0,
+ store_list: []
+ })
+ wx.showLoading({
+ title: '加载中',
+ })
+ th.query_store();
+ },
+ //美容师预约跳转页面
+ nav_bea: function() {
+ var th = this;
+ th.setData({
+ beautician: 0
+ })
+ var storageId = th.data.storageId; //线下门店id
+ var itemId = th.data.itemId; //服务id
+ var project_id = th.data.project_id;
+ if (storageId == "") {
+ getApp().my_warnning("请选择服务门店", 0, th);
+ th.settime();
+ } else {
+ th.setData({
+ is_textea: 1
+ })
+ wx.navigateTo({
+ url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id
+ });
+
+ }
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ var th = this;
+ th.setData({
+ itemId: options.service_id,
+ buyType: options.BuyType,
+ project_id: options.ProjectID,
+ validay: options.Validay
+ })
+ wx.getLocation({
+ type: 'wgs84',
+ success: function(res) {
+ th.data.lat = res.latitude;
+ th.data.lon = res.longitude;
+ th.data.is_get_local_ok = 1;
+ th.setData({
+ is_gps: 1
+ });
+ },
+ fail: function(res) {
+ if (res.errCode == 2) {
+ th.setData({
+ is_gps: 0
+ });
+ if (th.data.is_gps == 0) {
+ getApp().confirmBox("请开启GPS定位", null, 25000, !1);
+ th.settime();
+ }
+ } else {
+ th.setData({
+ is_gps: "3"
+ });
+ }
+
+ th.data.is_get_local_ok = 1;
+ }
+ })
+ },
+ //查询剩下可预约人数
+ query_more: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/reservation/can/reservation/count";
+ var beauticianID = th.data.beauticianID; //美容师id
+ var projectID = th.data.itemId; //服务id
+ var seekTime = th.data.time; //预约日期
+ var storageId = th.data.storageId; //门店id
+ var storeId = a.stoid; //商家id
+ getApp().request.promiseGet(url, {
+ data: {
+ beauticianId: beauticianID,
+ seekTime: seekTime,
+ serviceId: projectID,
+ storageId: storageId,
+ storeId: storeId
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var tment_count = res.data.data.CanReservation;
+ th.setData({
+ tment_count: tment_count
+ })
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ th.settime();
+ }
+ })
+
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+ var th = this;
+ var seekTime = th.data.time; //预约日期
+ if (seekTime != "") {
+ th.query_more();
+ }
+ th.setData({
+ time: th.data.time.substring(0, 16),
+ is_textea: 1
+ })
+ th.query_project();
+ },
+ //获取单个服务项目信息
+ query_project: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/reservation/sm/page"; //获取服务项目接口
+ var project_id = th.data.project_id; //服务项目id
+ getApp().request.promiseGet(url, {
+ data: {
+ storeId: a.stoid,
+ userId: d.user_id,
+ projectId: project_id
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ th.setData({
+ validay: res.data.data.pageData[0].Validay
+ })
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ th.settime();
+ }
+ })
+ },
+ //关闭导航
+ close: function() {
+ var th = this;
+ var nav_b = th.selectComponent("#nav_b"); //组件的id
+ nav_b.close_box();
+ }
+})
\ No newline at end of file
diff --git a/pages/user/my_service/appment_main.json b/pages/user/my_service/appment_main.json
new file mode 100644
index 0000000..104895a
--- /dev/null
+++ b/pages/user/my_service/appment_main.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "预约服务",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "nav_b": "/components/nav_b/nav_b"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/my_service/appment_main.wxml b/pages/user/my_service/appment_main.wxml
new file mode 100644
index 0000000..8c16bd2
--- /dev/null
+++ b/pages/user/my_service/appment_main.wxml
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+ 门
+ 店
+
+
+
+
+ {{store_name==""?'选择服务门店':store_name}}
+ ∟
+
+
+
+
+
+
+ 美
+ 容
+ 师
+
+
+
+
+
+ {{beautician_name==''?'选择美容师':beautician_name}}
+ ∟
+
+
+
+
+
+ {{item.StaffName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 预约时间
+
+
+
+
+ {{time==""?'选择时间':time}}
+ ∟
+
+
+
+
+
+
+ 注:剩余可预约人数{{tment_count}}人
+
+
+
+
+ 我的预约
+
+
+
+
+
+
+
+
+
+
+ 选择服务门店
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.StorageName}}
+
+ 距您:{{item.Distance}}km
+
+
+ {{item.Address}}
+
+
+
+
+ 没有找到{{key_word}}门店
+
+
+
+
+ 数据加载完毕
+
+
+
+
+
+ 确定
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/appment_main.wxss b/pages/user/my_service/appment_main.wxss
new file mode 100644
index 0000000..ba5d2c1
--- /dev/null
+++ b/pages/user/my_service/appment_main.wxss
@@ -0,0 +1,288 @@
+.container {
+ border-top: 7rpx solid rgb(245, 245, 245);
+}
+
+.main {
+ width: 100%;
+ height: 305rpx;
+}
+
+.angle {
+ transform: rotate(-45deg);
+ margin-right: 15rpx;
+ margin-bottom: 10rpx;
+ font-size: 26rpx;
+ color: rgb(142, 142, 142);
+}
+.StaffName{
+ max-width: 350rpx;
+}
+.angler {
+ transform: rotate(227deg);
+ margin-bottom: 0rpx;
+}
+
+.users {
+ background-color: rgb(255, 255, 255);
+}
+
+.user {
+ width: 40rpx;
+ height: 40rpx;
+ margin-left: 15rpx;
+}
+
+.Fram {
+ padding: 0rpx 60rpx;
+ margin-top: 60rpx;
+ background-color: rgb(255, 255, 255);
+}
+
+.subSuccess {
+ position: fixed;
+ z-index: 3;
+ top: 420rpx;
+ left: 110rpx;
+ width: 540rpx;
+ height: 315rpx;
+ background-color: rgb(155, 155, 155);
+ text-align: center;
+ border-radius: 20rpx;
+ color: rgb(255, 255, 255);
+ font-weight: bold;
+}
+
+.Success {
+ width: 110rpx;
+ height: 110rpx;
+ margin-top: 70rpx;
+ margin-bottom: 30rpx;
+}
+
+.appment, .sub_appment {
+ width: 270rpx;
+ height: 60rpx;
+ line-height: 55rpx;
+ border-radius: 40rpx;
+}
+
+button {
+ height: 100%;
+ background-color: rgb(214, 1, 33);
+}
+
+.appment {
+ background-color: rgb(238, 238, 238);
+}
+
+.sub_appment {
+ background-color: rgb(214, 1, 33);
+ color: rgb(255, 255, 255);
+}
+
+.head {
+ width: 122rpx;
+ margin-right: 40rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+}
+
+.textarea {
+ width: 420rpx;
+ background-color: rgb(238, 238, 238);
+ border-radius: 6rpx;
+ height: 130rpx;
+ padding-left: 40rpx;
+ padding-right: 15rpx;
+ padding-top: 15rpx;
+ padding-bottom: 15rpx;
+}
+
+.mabot {
+ margin-bottom: 35rpx;
+}
+
+.select {
+ width: 420rpx;
+ height: 55rpx;
+ line-height: 55rpx;
+ background-color: rgb(238, 238, 238);
+ border-radius: 6rpx;
+ padding-left: 40rpx;
+ padding-right: 15rpx;
+}
+
+.Cosmetology {
+ padding-left: 40rpx;
+ padding-right: 15rpx;
+ width: 365rpx;
+ background-color: rgb(238, 238, 238);
+ height: 50rpx;
+ line-height: 50rpx;
+ border-radius: 6rpx;
+}
+
+.beauticians {
+ width: 407rpx;
+ z-index: 3;
+ top: 45rpx;
+ left: -1rpx;
+ padding: 0rpx 5rpx;
+ border: 2rpx solid rgb(238, 238, 238);
+ background-color: rgb(255, 255, 255);
+ padding-bottom: 5rpx;
+ height: 279rpx;
+ overflow-x: scroll;
+ overflow-y: scroll;
+}
+
+.beautician {
+ height: 70rpx;
+ border-bottom: 2rpx solid rgb(238, 238, 238);
+ padding-left: 25rpx;
+}
+
+.beaclone {
+ border-bottom: 0rpx;
+}
+
+.notes {
+ margin-top: 15rpx;
+ margin-bottom: 60rpx;
+ margin-right: 8rpx;
+}
+
+.color {
+ color: rgb(172, 172, 172);
+}
+
+.submitMax {
+ margin-top: 50rpx;
+ padding: 0rpx 15rpx;
+}
+
+.Remarks {
+ margin-top: 15rpx;
+}
+
+/* 蒙尘 */
+
+.disgraceful {
+ position: fixed;
+ z-index: 4;
+ width: 100%;
+ height: 100%;
+ top: 0rpx;
+ left: 0rpx;
+ background-color: rgba(0, 0, 0, 0.4);
+}
+
+.storeList {
+ z-index: 5;
+ left: 0rpx;
+ border-top-left-radius: 25rpx;
+ border-top-right-radius: 25rpx;
+ background-color: rgb(255, 255, 255);
+ width: 100%;
+ padding: 45rpx 0rpx;
+}
+
+.storeListpadd {
+ padding: 0rpx 31rpx;
+}
+
+.choice {
+ margin-bottom: 5rpx;
+}
+
+.inputstore {
+ width: 510rpx;
+ height: 43rpx;
+ line-height: 43rpx;
+ border-radius: 30rpx;
+ border: 2rpx solid rgb(238, 238, 238);
+ padding-left: 30rpx;
+}
+
+.searchbar {
+ height: 95rpx;
+ border-bottom: 2rpx solid rgb(238, 238, 238);
+}
+
+.search {
+ width: 125rpx;
+ height: 45rpx;
+ line-height: 45rpx;
+ background-color: rgb(219, 27, 52);
+ border-radius: 30rpx;
+ color: rgb(255, 255, 255);
+}
+
+.stores {
+ height: 500rpx;
+ overflow-y: scroll;
+}
+
+.store {
+ margin: 0rpx 16rpx;
+ padding-right: 15rpx;
+ border-bottom: 2rpx solid rgb(238, 238, 238);
+ padding: 20rpx 0rpx;
+}
+
+.icon {
+ padding: 0rpx 15rpx;
+}
+
+.circular {
+ width: 37rpx;
+ height: 37rpx;
+ border-radius: 50%;
+ border: 2rpx solid rgb(52, 52, 52);
+ margin: 0rpx 15rpx;
+}
+
+.store_name_dis {
+ width: 90%;
+}
+
+.name_dis {
+ margin-bottom: 5rpx;
+}
+
+.store_name {
+ max-width: 420rpx;
+}
+
+.store_dis {
+ height: 30rpx;
+ line-height: 30rpx;
+ padding: 5rpx 15rpx;
+ background-color: rgb(227, 227, 227);
+ border-radius: 25rpx;
+ margin-right: 20rpx;
+ color: rgb(159, 159, 159);
+ max-width: 200rpx;
+}
+
+.store_address {
+ color: rgb(159, 159, 159);
+}
+
+.determine {
+ background-color: rgb(196, 24, 26);
+ width: 500rpx;
+ border-radius: 35rpx;
+ height: 60rpx;
+ color: rgb(255, 255, 255);
+ margin: 20rpx 0rpx;
+}
+
+.value {
+ max-width: 300rpx;
+}
+
+.notstore {
+ height: 80rpx;
+ color: rgb(159, 159, 159);
+}
diff --git a/pages/user/my_service/beauty_deta.js b/pages/user/my_service/beauty_deta.js
new file mode 100644
index 0000000..b9d08e7
--- /dev/null
+++ b/pages/user/my_service/beauty_deta.js
@@ -0,0 +1,400 @@
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ inurl: a.url, //接口网址
+ iurl: a.imghost,
+ url: "", //选择选择时间后返回的页面
+ defimgurl: "/miniapp/images/no-head.jpg",
+ seekTime: "", //当前服务预约选择的时间
+ time_list: [], //可预约时间
+ name: "", //美容师姓名
+ comment: "", //美容师评价
+ aweeks: [], //七天的预约时间
+ head_img: "", //美容师头像
+ time: ["08:00", "09: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"],
+ weeks: [], //星期几数组
+ time_index: -1, //选择预约时间下标
+ date_id: 0, //选择日期的id
+ beautician_id: "", //美容师id
+ itemId: "", //服务id
+ number: "", //预约单号
+ modify: 0, //是否是修改时间
+ iscos: 0, //是否是从美容师列表过来的
+ hours: "", //获取当前时分秒
+ projectId: "", //项目id
+ StaffName: "", //美容师名称
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ var th = this;
+ var myDate = new Date();
+ var minutes = myDate.getMinutes(); //获取当前分钟数(0-59)
+ var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23)
+ var beautician_id = options.BeauticianID;
+ th.setData({
+ beautician_id: beautician_id,
+ itemId: options.itemId,
+ modify: options.modify,
+ hours: hours,
+ projectId: options.projectId
+ })
+ if (options.url != undefined) {
+ th.setData({
+ url: options.url
+ })
+ }
+ if (options.number != undefined) {
+ th.setData({
+ number: options.number
+ })
+ }
+ if (options.iscos != undefined) {
+ th.setData({
+ iscos: options.iscos
+ })
+ }
+ if (options.StaffName!=undefined){
+ th.setData({
+ StaffName: options.StaffName
+ })
+ }
+ th.query_beatea();
+ th.query_aweek();
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+ var th = this;
+ //获取当前时间
+ var myDate = new Date();
+ // var date = myDate.getHours(); //获取当前小时数(0-23);
+ let str = myDate.toTimeString(); //"10:55:24 GMT+0800 (中国标准时间)"
+ let date = str.substring(0, 8); // '10:55:24'
+ th.setData({
+ hours: date
+ });
+ },
+
+ //图片失败,默认图片
+ 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_date: function(e) {
+ var th = this;
+ var id = e.currentTarget.dataset.dateid;
+ var date_id = th.data.date_id;
+ var seekTime = th.data.aweeks[id].time;
+ if (id != date_id) {
+ th.setData({
+ date_id: id,
+ seekTime: seekTime
+ })
+ th.query_date();
+ }
+ },
+ //获取美容师信息
+ query_beatea: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径
+ var beautician_id = th.data.beautician_id;
+ getApp().request.promiseGet(url, {
+ data: {
+ beauticianId: beautician_id,
+ storeId: a.stoid,
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ th.setData({
+ name: data.StaffName,
+ comment: data.Remark1,
+ head_img: data.PhotoUrl
+ })
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ })
+ },
+ //返回上个页面
+ navigateBack: function() {
+ var th = this;
+ var modify = th.data.modify; //是否是更改时间
+ var seekTime = th.data.seekTime; //选择的日期
+ var time_list = th.data.time_list;
+ var time_index = th.data.time_index;
+ if (time_index == -1) {
+ getApp().my_warnning("请选择预约时间", 0, th);
+ return false;
+ }
+ var date_id = th.data.date_id;
+ var date = th.data.aweeks[date_id].time;
+ var time = date + " " + time_list[time_index] + ":00";
+ if (modify == 1) {
+ var json = {
+ "arrangeTime": time,
+ "number": th.data.number,
+ "remark": "更改时间",
+ "states": 0,
+ "storeId": a.stoid
+ };
+ var data = JSON.stringify(json);
+ var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
+ wx.request({
+ url: url,
+ data: data,
+ method: 'put',
+ header: {
+ 'content-type': 'application/json'
+ }, // 设置请求的 header
+ success: function(res) {
+ if (res.data.code == 0) {
+ getApp().my_warnning(res.data.data, 1, th);
+ setTimeout(function() {
+ wx.navigateBack({
+ //返回
+ delta: 1
+ })
+ }, 1000);
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ }
+ })
+ } else {
+ var pages = getCurrentPages(); //当前页面
+ var iscos = th.data.iscos;
+ var delta = 1;
+ if (Number(iscos) == 1) {
+ delta = delta + Number(iscos); //返回哪个页面
+ var prevPage = pages[pages.length - 2 - Number(iscos)]; //上一页面
+ prevPage.setData({
+ //直接给上一个页面赋值
+ time: time,
+ beautician_name: th.data.StaffName,
+ beauticianID: th.data.beautician_id
+ });
+ wx.navigateBack({
+ //返回
+ delta: 2
+ })
+ } else {
+ var prevPage = pages[pages.length - 2]; //上一页面
+ prevPage.setData({
+ //直接给上一个页面赋值
+ time: time
+ });
+ wx.navigateBack({
+ //返回
+ delta: 1
+ })
+ }
+ }
+ },
+ //选择时间
+ Selection_time: function(e) {
+ var th = this;
+ var index = e.currentTarget.dataset.index;
+ var time_index = th.data.time_index;
+ if (index == time_index) {
+ return false;
+ } else {
+ th.setData({
+ time_index: index
+ })
+ }
+ },
+ //查询七天预约时间
+ query_aweek: function() {
+ var th = this;
+ var beautician_id = th.data.beautician_id; //美容师id
+ var itemId = th.data.itemId; //服务id
+ var projectId = th.data.projectId; //项目id
+ var url = "/api/weshop/marketing/reservation/staff/seven/time/list"; //接口地址
+ getApp().request.promiseGet(url, {
+ data: {
+ projectId: projectId,
+ beauticianId: beautician_id,
+ serviceId: itemId,
+ storeId: a.stoid,
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ var arr = [];
+ for (var i in data) {
+ var em = {
+ "time": i,
+ "val": data[i]
+ };
+ arr.push(em);
+ }
+ arr.sort(th.sort_arr);
+ var weeks = ["今天", "明天", "后天"];
+ var week = "";
+ for (var i = 3; i < arr.length; i++) {
+ var date = new Date(arr[i].time);
+ if (date.getDay() == 0) week = "周日"
+ if (date.getDay() == 1) week = "周一"
+ if (date.getDay() == 2) week = "周二"
+ if (date.getDay() == 3) week = "周三"
+ if (date.getDay() == 4) week = "周四"
+ if (date.getDay() == 5) week = "周五"
+ if (date.getDay() == 6) week = "周六"
+ weeks[i] = week;
+ }
+ th.setData({
+ aweeks: arr,
+ weeks: weeks
+ })
+ th.query_date();
+
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ })
+
+ },
+
+ query_date: function() {
+ var th = this;
+ var projectId = th.data.projectId;
+ var date_id = th.data.date_id; //日期下标
+ var SeekTime = th.data.aweeks[date_id].time;
+ var val = th.data.aweeks[date_id].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 hours = th.data.hours;
+ var time_list = res.data.data;
+ var time = th.data.time;
+ var date_id = th
+ var new_time = [];
+ var date = th.data.hours.substring(0,2);
+
+ //不等于空就是有可以预约的时间
+ if (time_list != null) {
+ if (res.data.data[0].GroupHour != undefined) {
+ if (res.data.data[0].GroupHour.length > 11) {
+ getApp().my_warnning(res.data.data[0].GroupHour, 0, th);
+ }
+ }
+ //循环固定和可预约的时间
+ 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)) {
+ var date_id = th.data.date_id;
+ if (date > time_list[ii].GroupHour.substring(0, 2) && date_id == 0) {
+ new_time[i] = "";
+ break;
+ } else {
+ new_time[i] = time_list[ii].GroupHour.substring(0, 5);
+ break;
+ }
+
+
+ } else {
+ new_time[i] = "";
+ }
+ }
+ }
+ }else{
+ for(var i = 0 ;i b) {
+ return 1;
+ }
+ return 0;
+ }
+
+
+
+})
\ No newline at end of file
diff --git a/pages/user/my_service/beauty_deta.json b/pages/user/my_service/beauty_deta.json
new file mode 100644
index 0000000..710a83b
--- /dev/null
+++ b/pages/user/my_service/beauty_deta.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarTitleText": "美容师详情",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/my_service/beauty_deta.wxml b/pages/user/my_service/beauty_deta.wxml
new file mode 100644
index 0000000..57591e4
--- /dev/null
+++ b/pages/user/my_service/beauty_deta.wxml
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/beauty_deta.wxss b/pages/user/my_service/beauty_deta.wxss
new file mode 100644
index 0000000..09fc465
--- /dev/null
+++ b/pages/user/my_service/beauty_deta.wxss
@@ -0,0 +1,134 @@
+.container {
+ border-top: 7rpx solid rgb(245, 245, 245);
+}
+
+.backcolor {
+ position: absolute;
+ top: 0rpx;
+ left: 0rpx;
+ z-index: 0;
+ width: 100%;
+ height: 270rpx;
+ background-color: rgb(214, 1, 33);
+
+}
+
+.comments {
+ position: absolute;
+ top: 45rpx;
+ left: 0rpx;
+ z-index: 1;
+ padding: 0rpx 23rpx;
+}
+
+.name {
+ font-weight: bold;
+ float: left;
+ width: 250rpx;
+}
+
+.head {
+ width: 130rpx;
+ height: 130rpx;
+ border-radius: 50%;
+ float: right;
+ margin: 0rpx 15rpx;
+ /* border: 2rpx solid red; */
+}
+
+.introduce {
+ margin-top: 90rpx;
+ text-indent: 2em;
+ color: rgb(102, 102, 102);
+}
+
+.Personal {
+ width: 640rpx;
+ height: 300rpx;
+ background-color: rgb(255, 255, 255);
+ border-radius: 5rpx;
+ box-shadow: 0rpx 2rpx 2rpx 2rpx rgb(250, 228, 230);
+ margin-bottom: 65rpx;
+ padding-top: 40rpx;
+ padding-left: 35rpx;
+ padding-right: 35rpx;
+}
+
+.choice {
+ height: 70rpx;
+ background-color: rgb(214, 1, 33);
+ color: rgb(255, 255, 255);
+ margin-top: 30rpx;
+}
+
+.scroll-h {
+ white-space: nowrap;
+ width: 704rpx;
+ overflow: visible;
+ height: 125rpx;
+ color: transparent;
+}
+
+.scroll-item-h {
+ display: inline-block;
+ width: 172rpx;
+ text-align: center;
+ overflow: visible;
+ height: 70rpx;
+ padding: 15rpx 0rpx;
+}
+::-webkit-scrollbar{
+ width: 0;
+ height: 0;
+ color: transparent;
+}
+.box {
+ width: 0px;
+ height: 0px;
+ margin-left: 15rpx;
+ border-top: 21rpx solid transparent;
+ border-right: 21rpx solid transparent;
+ border-left: 21rpx solid transparent;
+ display: inline-block;
+ transform: rotate(180deg);
+ border-bottom: 21rpx solid rgb(214, 1, 33);
+}
+
+.bd {
+ /* border: 2rpx solid rgb(238, 238, 238); */
+ background-color: rgb(255, 255, 255);
+ color: rgb(20, 20, 20);
+}
+
+.chbd {
+ border: 2rpx solid rgb(214, 1, 33);
+ background-color: rgb(214, 1, 33);
+ color: rgb(255, 255, 255);
+}
+
+.Times {
+ background-color: rgb(238, 243, 247);
+ margin-bottom: 30rpx;
+ padding:34rpx 27rpx;
+}
+
+.Time {
+ border: 2rpx solid rgb(238, 238, 238);
+ width: 160rpx;
+ height: 70rpx;
+ background-color: rgb(255, 255, 255);
+ text-align: center;
+ padding-top: 15rpx;
+ padding-bottom: 15rpx;
+}
+.chTime{
+ border-color: rgb(214, 1, 33);
+}
+.nochTime{
+ color: rgb(174,177,177);
+ background-color: rgb(250,250,250);
+}
+.abs {
+ left: 55rpx;
+ bottom: -39rpx;
+}
diff --git a/pages/user/my_service/cosmetology_list.js b/pages/user/my_service/cosmetology_list.js
new file mode 100644
index 0000000..6147a7e
--- /dev/null
+++ b/pages/user/my_service/cosmetology_list.js
@@ -0,0 +1,101 @@
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ defimgurl: "/miniapp/images/no-head.jpg",
+ iurl: a.imghost,
+ cosmetology_list: [], //美容师列表
+ is_cosmetology_read: 0, //是否有读过美容师接口,该属性用在没有美容师列表的排版
+ curpage: 1, //当前分页数
+ pageSize: 10, //页大小
+ total: 0, //总数量
+ ismore: 0, //是否加载完毕
+ itemId: 0, //服务id,
+ storageId: 0, //线下门店id
+ projectId:"",//项目id
+ },
+ onReachBottom: function() {
+ var th = this;
+ if (this.data.total <= th.data.pageSize) return;
+ if (this.data.ismore) return;
+ wx.showLoading({
+ title: '加载中...',
+ })
+ th.query_cology();
+ },
+ query_cology: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/reservation/staff/page";
+ var itemId = th.data.itemId; //服务id
+ var storageId = th.data.storageId;
+ getApp().request.promiseGet(url, {
+ data: {
+ storeId: a.stoid,
+ userId: d.user_id,
+ serviceId: itemId,
+ storageId: storageId,
+ page: th.data.curpage,
+ pageSize: th.data.pageSize
+ }
+ }).then(res => {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ 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,
+ is_cosmetology_read:1
+ }), wx.stopPullDownRefresh(); //停止下拉刷新
+ } else {
+ th.setData({
+ is_cosmetology_read:1
+ })
+ }
+ })
+ },
+ //图片失败,默认图片
+ 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";
+ console.log(_errObj,"zzzzzzz");
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ }
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ var th = this;
+ th.setData({
+ projectId: options.projectId,
+ itemId: options.itemId,
+ storageId: options.storageId
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+ var th = this;
+ th.query_cology();
+ },
+
+})
\ No newline at end of file
diff --git a/pages/user/my_service/cosmetology_list.json b/pages/user/my_service/cosmetology_list.json
new file mode 100644
index 0000000..90bf58b
--- /dev/null
+++ b/pages/user/my_service/cosmetology_list.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarTitleText": "美容师列表",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/my_service/cosmetology_list.wxml b/pages/user/my_service/cosmetology_list.wxml
new file mode 100644
index 0000000..02f99a7
--- /dev/null
+++ b/pages/user/my_service/cosmetology_list.wxml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.StaffName}}
+
+
+
+
+
+
+
+
+ {{it.LabelName}}
+
+
+
+
+
+
+
+ 预约
+
+
+
+
+ {{item.Remark1}}
+
+
+
+ 暂无介绍
+
+
+
+
+
+
+
+ 到底了
+
+
+
+
+
+
+
+
+
+ 暂无美容师
+
+
+ 其他项目
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/cosmetology_list.wxss b/pages/user/my_service/cosmetology_list.wxss
new file mode 100644
index 0000000..4a8fb7b
--- /dev/null
+++ b/pages/user/my_service/cosmetology_list.wxss
@@ -0,0 +1,124 @@
+page{
+ height: 100%;
+}
+.container{
+ background-color: rgb(255,255,255);
+}
+.appointment {
+ width: 100%;
+ height: 305rpx;
+}
+
+.single {
+ margin-left: 10rpx;
+ border-bottom: 1rpx solid rgb(229, 229, 229);
+ padding-bottom: 30rpx;
+ padding-left: 20rpx;
+ padding-right: 35rpx;
+ padding-top: 30rpx;
+}
+
+.portrait {
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 50%;
+ margin-right: 30rpx;
+}
+.UserName{
+ max-width: 250rpx;
+}
+.Stars {
+ width: 25rpx;
+ height: 25rpx;
+ margin-right: 7rpx;
+}
+.Labels{
+ width: 100%;
+ margin-top: 15rpx;
+}
+.Label {
+ margin-top: 25rpx;
+}
+
+.Labelitem {
+ width: 100rpx;
+ height: 30rpx;
+ border-radius: 20rpx;
+ line-height: 30rpx;
+ margin-right: 10rpx;
+ padding:0rpx 9rpx;
+}
+
+.itone {
+ border: 2rpx solid rgb(22, 232, 131);
+ color: rgb(22, 232, 131);
+}
+
+.itwo {
+ border: 2rpx solid rgb(92, 135, 248);
+ color: rgb(92, 135, 248);
+}
+
+.ith {
+ border: 2rpx solid rgb(244, 143, 55);
+ color: rgb(244, 143, 55);
+}
+
+.gofu {
+ width: 120rpx;
+ padding: 5rpx 0rpx;
+ border-radius: 25rpx;
+}
+
+.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 {
+ margin-top: 25rpx;
+ text-indent: 2em;
+ color: rgb(103, 103, 103);
+}
+/* 无订单 */
+.empty_order image {
+ width: 330rpx;
+ height: 280rpx;
+ margin-top: 120rpx;
+}
+
+.empty_order .xc-ash {
+ margin-top: 10rpx;
+ font-weight: 600px;
+}
+
+.empty_order navigator {
+ margin-top: 60rpx;
+ border-radius: 40rpx;
+}
+
+.empty_order navigator view {
+ width: 247rpx;
+ height: 56rpx;
+ 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/hist_service.js b/pages/user/my_service/hist_service.js
new file mode 100644
index 0000000..4365592
--- /dev/null
+++ b/pages/user/my_service/hist_service.js
@@ -0,0 +1,157 @@
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ iurl: a.imghost,
+ isPickerShow: false,
+ isPickerRender: false,
+ startTime: "",
+ endTime: "",
+ pickerConfig: {
+ endDate: true,
+ column: "",
+ dateLimit: true,
+ initStartTime: "2019-01-01 12:32:44",
+ initEndTime: "2019-12-01 12:32:44",
+ limitStartTime: "1917-05-06 12:32:44",
+ limitEndTime: "2055-05-06 12:32:44"
+ },
+ hist_List: [], //服务项目列表
+ is_service_read: 0,
+ curpage: 1, //当前分页数
+ pageSize: 15, //页大小
+ total: 0,
+ ismore: 0, //是否加载完毕
+ is_screen: 0, //是否通过筛选来选择历史服务
+ is_reset: 0, //是否重复点击
+ is_nav: 1, //是否显示导航栏
+ },
+ pickerShow: function() {
+ this.setData({
+ isPickerShow: true,
+ isPickerRender: true,
+ chartHide: true
+ });
+ },
+ pickerHide: function() {
+ var th = this;
+ th.setData({
+ isPickerShow: false,
+ chartHide: false
+ });
+ },
+ //--选择时间--
+ setPickerTime: function(val) {
+ let data = val.detail,
+ gl_data = getApp().globalData,
+ th = this;
+ th.setData({
+ startTime: data.startTime,
+ endTime: data.endTime,
+ val: 0,
+ distance: 0,
+ hist_List: [],
+ curpage: 1,
+ is_screen: 1,
+ is_nav: 1
+ });
+ th.query_hist();
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ var th = this;
+ th.query_hist();
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {},
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function() {
+ var th = this;
+ if (th.data.total <= th.data.pageSize) return false;
+ if (th.data.ismore) return false;
+
+ wx.showLoading({
+ title: '加载中...',
+ })
+ th.query_hist();
+ },
+ //重置历史服务数据
+ his_reset: function() {
+ var th = this;
+ var is_reset = th.data.is_reset;
+ if (is_reset == 0) {
+ th.setData({
+ hist_List: [],
+ curpage: 1,
+ is_service_read: 0,
+ is_screen: 1,
+ is_reset: 1,
+ startTime: "",
+ endTime: "",
+ is_nav: 1
+ })
+ th.query_hist();
+ }
+ },
+ query_hist: function() {
+
+ var th = this;
+ var startTime = th.data.startTime.substring(0, 10); //开始
+ var endTime = th.data.endTime.substring(0, 10); //结束
+ var url = "/api/weshop/marketing/reservation/history/reservation/page";
+ getApp().request.promiseGet(url, {
+ data: {
+ storeId: a.stoid,
+ userId: d.user_id,
+ beginDate: startTime,
+ endDate: endTime,
+ page: th.data.curpage,
+ pageSize: th.data.pageSize
+ }
+ }).then(res => {
+ wx.hideLoading();
+ th.setData({
+ is_reset: 0
+ })
+ if (res.data.code == 0) {
+ th.data.curpage++;
+ var arr1 = th.data.hist_List;
+ var arr2 = res.data.data.pageData;
+ var arr3 = [...arr1, ...arr2];
+ var ismore = 0;
+ if (arr3.length == res.data.total) ismore = 1
+ th.setData({
+ hist_List: arr3,
+ total: res.data.data.total,
+ ismore: ismore,
+ is_service_read: 1,
+ }), wx.stopPullDownRefresh(); //停止下拉刷新
+ } else {
+ th.setData({
+ is_service_read: 1,
+ is_screen: 0,
+ ismore: 1
+ })
+ if (startTime!="") {
+ th.setData({
+ total:0
+ })
+ }
+ }
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/user/my_service/hist_service.json b/pages/user/my_service/hist_service.json
new file mode 100644
index 0000000..b81e3be
--- /dev/null
+++ b/pages/user/my_service/hist_service.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "历史预约",
+ "usingComponents": {
+ "timePicker": "/components/timePicker/timePicker",
+ "warn": "/components/long_warn/long_warn"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/my_service/hist_service.wxml b/pages/user/my_service/hist_service.wxml
new file mode 100644
index 0000000..2e8cb8e
--- /dev/null
+++ b/pages/user/my_service/hist_service.wxml
@@ -0,0 +1,77 @@
+
+
+
+
+ 共使用
+ {{total}}
+ 次服务
+
+
+
+ 重置
+
+
+
+ 筛选
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.ServiceName==''?'匿名':item.ServiceName}}
+
+ (服务美容师:
+
+
+ (预约美容师:
+
+ {{item.BeauticianName}}
+ )
+
+ {{item.ArrangeTime}}
+
+
+
+ 未服务
+ 已服务
+ 已过期
+ 已取消
+ 已评价
+
+
+
+
+
+
+ 到底了
+
+
+
+
+
+ 该时间段无预约记录
+
+
+
+
+
+
+ 暂无服务记录
+
+
+ 前往使用
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/hist_service.wxss b/pages/user/my_service/hist_service.wxss
new file mode 100644
index 0000000..8882a8d
--- /dev/null
+++ b/pages/user/my_service/hist_service.wxss
@@ -0,0 +1,121 @@
+page {
+ height: 100%;
+}
+
+.box {
+ width: 0px;
+ height: 0px;
+ margin-left: 15rpx;
+ border-top: 11rpx solid rgba(0, 0, 0, 0);
+ border-right: 10rpx solid rgba(0, 0, 0, 0);
+ border-left: 10rpx solid rgba(0, 0, 0, 0);
+ display: inline-block;
+ margin-bottom: 10rpx;
+ color: red;
+ transform: rotate(0deg);
+ border-bottom: 18rpx solid rgb(153, 153, 153);
+}
+
+.exption {
+ padding: 0rpx 45rpx;
+ background-color: rgb(238, 238, 238);
+ height: 70rpx;
+ color: rgb(153, 153, 153);
+ position: fixed;
+ top:0rpx;
+ left: 0rpx;
+ width: 660rpx;
+}
+
+.count {
+ margin: 0rpx 5rpx;
+}
+
+.Resetfram {
+ margin-right: 40rpx;
+}
+
+.Reset {
+ margin-right: 5rpx;
+}
+
+.Resetsub {
+ width: 30rpx;
+ height: 30rpx;
+}
+.items{
+ margin-top: 70rpx;
+}
+.item {
+ margin: 0rpx 25rpx;
+ padding: 0rpx 20rpx;
+ height: 100rpx;
+ border-bottom: 1rpx solid rgb(242, 242, 242);
+}
+
+.itemName {
+ margin-right: 10rpx;
+ max-width: 130rpx;
+}
+
+.itemUsna {
+ max-width: 150rpx;
+}
+
+.serState {
+ color: rgb(255, 82, 125);
+}
+
+.container {
+ position: fixed;
+ width: 100%;
+ top: 0rpx;
+}
+
+/* 无历史服务 */
+
+.empty_order {
+ height: 100%;
+ background-color: rgb(238, 238, 238);
+}
+
+.empty_order image {
+ width: 329rpx;
+ height: 229rpx;
+ margin-top: 202rpx;
+}
+
+.empty_order .xc-ash {
+ margin-top: 10rpx;
+ font-weight: 600px;
+}
+
+.empty_order navigator {
+ margin-top: 65rpx;
+ border-radius: 40rpx;
+}
+
+.empty_order navigator view {
+ width: 247rpx;
+ height: 65rpx;
+ 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;
+}
+.slot{
+ color: rgb(153, 153, 153);
+ height:300rpx;
+ width:100%;
+}
\ No newline at end of file
diff --git a/pages/user/my_service/i_service.js b/pages/user/my_service/i_service.js
new file mode 100644
index 0000000..54d868b
--- /dev/null
+++ b/pages/user/my_service/i_service.js
@@ -0,0 +1,256 @@
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ qr_code_object: {
+ val: "12121",
+ content: "请将二维码展示给核销员,服务更快捷!"
+ },
+ iurl: a.imghost,
+ defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
+ service_List: [], //服务项目列表
+ is_service_read: 0,
+ curpage: 1, //当前分页数
+ pageSize: 10, //页大小
+ total: 0,
+ ismore: 0, //是否加载完毕
+ userinfo: null,
+ is_sub: 0, //是否重复提交预约
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ var userinfo = getApp().globalData.userInfo;
+ if (userinfo == null) {
+ //界面必须使用warn 做ID,并调用
+ return false;
+ }
+ this.setData({
+ userinfo: userinfo
+ });
+ var th = this;
+ th.query_service();
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+ var th = this;
+ var my_confirm = th.selectComponent("#my_confirm"); //组件的id
+ my_confirm.open_cancel(0);
+ },
+ onReachBottom: function() {
+ var th = this;
+ if (this.data.total <= th.data.pageSize) return;
+ if (this.data.ismore) return;
+
+ th.query_service();
+ },
+ //查询服务项目列表
+ query_service: function() {
+ wx.showLoading({
+ title: '加载中',
+ })
+ 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 => {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ 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(); //停止下拉刷新
+ } else {
+ th.setData({
+ is_service_read: 1
+ })
+ }
+ })
+ },
+ /*-- 打开服务项目 --*/
+ open_fw: function(e) {
+ wx.showLoading({
+ title: '加载中',
+ })
+ var th = this;
+ var url = e.currentTarget.dataset.url;
+ var service_id = e.currentTarget.dataset.service_id; //服务id
+ var project_id = e.currentTarget.dataset.project_id;
+ var ind = e.currentTarget.dataset.ind;
+ var item = this.data.service_List[ind];
+ var ewm = "^" + th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|TY01|";
+ var tt = th.format_time(1);
+ ewm = ewm + tt;
+ th.data.qr_code_object.val = ewm;
+ th.data.qr_code_object.is_fw = 1;
+ var qc_com = th.selectComponent("#qc_com"); //组件的id
+ getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/check", {
+ data: {
+ serviceId: service_id,
+ storeId: a.stoid,
+ userId: d.user_id
+ }
+ }).then(res => {
+ wx.hideLoading();
+ th.setData({
+ is_sub: 0
+ })
+ if (res.data.data != null) {
+ var my_confirm = th.selectComponent("#my_confirm"); //组件的id
+ my_confirm.open_cancel(1);
+ my_confirm.open(
+ "已有预约记录!",
+ "预约详情",
+ "继续使用",
+ function() {
+ my_confirm.open_cancel(0);
+ var deta_url = "/pages/user/my_service/tment_details?number=" + res.data.data.Number;
+ wx.navigateTo({
+ url: deta_url
+ })
+ },
+ function() {
+ my_confirm.open_cancel(0);
+ qc_com.open(th.data.qr_code_object)
+ }
+
+ )
+
+ } else {
+ qc_com.open(th.data.qr_code_object)
+ }
+ })
+
+ },
+ //图片失败,默认图片
+ 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";
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ }
+ },
+ format_time: function(isFull) {
+ var d = new Date();
+ var m = d.getMonth() + 1;
+ if (m < 10) m = "0" + m;
+ var dd = d.getDate();
+ if (dd < 10) dd = "0" + dd;
+ var fm = [d.getFullYear(), m, dd].join('-');
+ if (isFull == 1)
+ fm = fm + ' ' + [d.getHours(), d.getMinutes(), d.getSeconds()].join(':')
+ return fm;
+ },
+ //跳转到首页
+ goto: function(e) {
+ var url = e.currentTarget.dataset.url;
+ getApp().goto(url);
+ },
+ //校正是否可预约
+ correcting: function(e) {
+ var th = this;
+ wx.showLoading({
+ title: '加载中',
+ })
+ if (th.data.is_sub == 0) {
+ th.setData({
+ is_sub: 1
+ })
+ var url = e.currentTarget.dataset.url;
+ var service_id = e.currentTarget.dataset.service_id; //服务id
+ var project_id = e.currentTarget.dataset.project_id;
+ getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/check", {
+ data: {
+ serviceId: service_id,
+ storeId: a.stoid,
+ userId: d.user_id
+ }
+ }).then(res => {
+ wx.hideLoading();
+ th.setData({
+ is_sub: 0
+ })
+ if (res.data.code == 0) {
+ if (res.data.data != null) {
+
+ var number = res.data.data.Number;
+ var my_confirm = th.selectComponent("#my_confirm"); //组件的id
+ my_confirm.open_cancel(1);
+ my_confirm.open(
+ "已有预约记录!",
+ "预约详情",
+ "继续预约",
+ function() {
+ my_confirm.open_cancel(0);
+ var deta_url = "/pages/user/my_service/tment_details?number=" + number;
+ wx.navigateTo({
+ url: deta_url
+ })
+ },
+ function() {
+ my_confirm.open_cancel(0);
+ getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/sm/check", {
+ data: {
+ projectId: project_id,
+ serviceId: service_id,
+ storeId: a.stoid,
+ userId: d.user_id
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ wx.navigateTo({
+ url: url
+ })
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ })
+ }
+ )
+ } else {
+ wx.navigateTo({
+ url: url,
+ })
+ }
+
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ })
+ }
+ },
+ //关闭导航
+ close: function () {
+ var th = this;
+ var nav_b = th.selectComponent("#nav_b"); //组件的id
+ nav_b.close_box();
+ }
+
+})
\ No newline at end of file
diff --git a/pages/user/my_service/i_service.json b/pages/user/my_service/i_service.json
new file mode 100644
index 0000000..516d6e0
--- /dev/null
+++ b/pages/user/my_service/i_service.json
@@ -0,0 +1,9 @@
+{
+ "navigationBarTitleText": "服务项目",
+ "usingComponents": {
+ "qr_code": "/components/qr_code/qr_code",
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm",
+ "nav_b": "/components/nav_b/nav_b"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/my_service/i_service.wxml b/pages/user/my_service/i_service.wxml
new file mode 100644
index 0000000..5c0be86
--- /dev/null
+++ b/pages/user/my_service/i_service.wxml
@@ -0,0 +1,87 @@
+
+
+
+ 历史预约
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.ServiceName}}
+
+
+
+ 剩余次数:
+ {{item.ObtainTimes}}
+
+
+
+ 有效期至
+ {{item.Validay==""?"长期有效":item.Validay}}
+
+
+
+
+
+
+ 立即使用
+
+
+
+ 预约
+
+
+
+
+
+
+
+ 到底了
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无服务项目
+
+
+ 回到首页
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/i_service.wxss b/pages/user/my_service/i_service.wxss
new file mode 100644
index 0000000..846440b
--- /dev/null
+++ b/pages/user/my_service/i_service.wxss
@@ -0,0 +1,167 @@
+page {
+ overflow-x: scroll;
+}
+
+/* 背景定位 */
+
+.backimage {
+ position: absolute;
+ top: 0rpx;
+ left: 0rpx;
+ z-index: 0;
+ width: 100%;
+ /* height: 100%; */
+}
+
+/* 历史服务定位 */
+
+.History {
+ position: absolute;
+ top: 30rpx;
+ right: 20rpx;
+ z-index: 1;
+ color: rgb(255, 255, 255);
+}
+
+.rel {
+ background-color: rgb(255, 255, 255);
+ width: 350rpx;
+ height: 430rpx;
+ border-radius: 20rpx;
+ display: inline-block;
+ margin-right: 15rpx;
+ margin-bottom: 20rpx;
+ box-shadow: 0rpx 3rpx 3rpx 3rpx rgb(233, 233, 233);
+}
+
+.abs {
+ left: 10rpx;
+ top: 10rpx;
+}
+
+.equity_money {
+ width: 50rpx;
+ height: 55rpx;
+}
+
+.Serviceitems {
+ position: absolute;
+ top: 370rpx;
+ left: 0rpx;
+ z-index: 2;
+ padding-left: 18rpx;
+ padding-bottom: 20rpx;
+}
+
+.itemimage {
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 50%;
+ margin-top: 30rpx;
+ margin-bottom: 20rpx;
+}
+
+.itemName {
+ margin-bottom: 25rpx;
+ color: rgb(48, 48, 48);
+}
+
+.itemName .Name {
+ max-width: 250rpx;
+ text-align: center;
+}
+
+.itemCount {
+ margin-bottom: 5rpx;
+ color: rgb(177, 177, 177);
+ align-items: baseline;
+}
+
+.itemEffective {
+ margin-bottom: 30rpx;
+ color: rgb(177, 177, 177);
+ align-items: baseline;
+}
+
+.functionMax {
+ padding: 0rpx 25rpx;
+ color: rgb(254, 255, 255);
+}
+
+.Use {
+ width: 170rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ border-radius: 25rpx;
+ background-color: red;
+}
+
+.appointment {
+ width: 115rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ border-radius: 25rpx;
+ margin-left: 20rpx;
+}
+
+.Date {
+ margin-left: 10rpx;
+}
+
+/* 无服务项目 */
+
+.cover {
+ position: fixed;
+ z-index: 1;
+ left: 0rpx;
+ top: 390rpx;
+ width: 100%;
+ height: 200rpx;
+ background-color: rgb(255, 255, 255);
+}
+
+/* 无历史服务 */
+
+.empty_order {
+ position: fixed;
+ left: 0rpx;
+ top: 500rpx;
+ z-index: 2;
+ width: 100%;
+}
+
+.empty_order image {
+ width: 329rpx;
+ height: 229rpx;
+ margin-top: 80rpx;
+}
+
+.empty_order .xc-ash {
+ margin-top: 10rpx;
+ font-weight: 600px;
+}
+
+.empty_order navigator {
+ margin-top: 60rpx;
+ border-radius: 40rpx;
+}
+
+.empty_order navigator view {
+ width: 247rpx;
+ height: 56rpx;
+ 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/my_service.js b/pages/user/my_service/my_service.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pages/user/my_service/my_service.js
diff --git a/pages/user/my_service/my_service.wxml b/pages/user/my_service/my_service.wxml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pages/user/my_service/my_service.wxml
diff --git a/pages/user/my_service/tment_details.js b/pages/user/my_service/tment_details.js
new file mode 100644
index 0000000..2802f6e
--- /dev/null
+++ b/pages/user/my_service/tment_details.js
@@ -0,0 +1,137 @@
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ url: a.url,
+ iurl: a.imghost,
+ tment_details: [], //预约详情
+ number: "", //订单号
+ arrangeTime: "", //预约年月日
+ day: "", //判断是上午还是下午
+ states: 3, //3为取消预约
+ },
+ //取消预约
+ cancel_tment: function(e) {
+ var th = this;
+ var my_confirm = th.selectComponent("#my_confirm"); //组件的id
+ my_confirm.open(
+ "确定取消?",
+ "取消",
+ "确定",
+ function() {
+ my_confirm.open_cancel(0);
+ },
+ function() {
+ var index = e.currentTarget.dataset.index;
+ var states = th.data.states;
+ var tment_details = th.data.tment_details;
+ var number = th.data.number;
+ var json = {
+ "number": number,
+ "storeId": a.stoid,
+ "states": states
+ };
+ var data = JSON.stringify(json);
+ var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
+ wx.request({
+ url: url,
+ data: data,
+ method: 'put',
+ header: {
+ 'content-type': 'application/json'
+ }, // 设置请求的 header
+ success: function(res) {
+ my_confirm.open_cancel(0);
+ if (res.data.code == 0) {
+ getApp().my_warnning("取消成功", 1, th);
+ var start = 'tment_details[' + 0 + '].State';
+ th.setData({
+ [start]: 3
+ })
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ }
+ })
+ }
+ );
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ var th = this;
+ th.setData({
+ number: options.number
+ })
+ },
+ //查询美容师详情
+ query_bea: function() {
+ var th = this;
+ var number = th.data.number;
+ var url = "/api/weshop/marketing/reservation/reservation/page";
+ getApp().request.promiseGet(url, {
+ data: {
+ storeId: a.stoid,
+ userId: d.user_id,
+ number: number
+ }
+ }).then(res => {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ var data = res.data.data.pageData;
+ var arrangeTime = data[0].ArrangeTime.substring(0, 11);
+ var day = data[0].ArrangeTime.substring(11, 16);
+ th.setData({
+ tment_details: data,
+ arrangeTime: arrangeTime,
+ day: day
+ })
+
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ })
+ },
+ //显示核销码
+ code_show: function(e) {
+ var th = this;
+ //--获取成功的时候--
+ var no = e.currentTarget.dataset.order_sn;
+ var qc_com = th.selectComponent("#qc_com"); //组件的id
+ var obj = {
+ val: no,
+ content: "请将二维码展示给核销员,使用更快捷"
+ };
+ qc_com.open(obj)
+ },
+ //跳到首页
+ goto: function(e) {
+ var th = this;
+ wx.switchTab({
+ url: '/pages/index/index/index',
+ })
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+ var th = this;
+ th.query_bea();
+ },
+ //关闭导航
+ close: function () {
+ var th = this;
+ var nav_b = th.selectComponent("#nav_b"); //组件的id
+ nav_b.close_box();
+ }
+})
\ No newline at end of file
diff --git a/pages/user/my_service/tment_details.json b/pages/user/my_service/tment_details.json
new file mode 100644
index 0000000..98e6ad7
--- /dev/null
+++ b/pages/user/my_service/tment_details.json
@@ -0,0 +1,9 @@
+{
+ "navigationBarTitleText": "预约详情",
+ "usingComponents": {
+ "qr_code": "/components/qr_code/qr_code",
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm",
+ "nav_b": "/components/nav_b/nav_b"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/my_service/tment_details.wxml b/pages/user/my_service/tment_details.wxml
new file mode 100644
index 0000000..a6c137b
--- /dev/null
+++ b/pages/user/my_service/tment_details.wxml
@@ -0,0 +1,126 @@
+
+
+
+
+
+ 预约状态:
+ 未服务
+ 已服务
+ 已过期
+ 已取消
+ 已评价
+
+
+
+
+
+
+ 预约订单:
+ {{number}}
+
+
+
+
+
+
+ 预约门店:
+ {{item.StorageName}}
+
+
+
+
+ 预约项目:
+ {{item.ServiceName}}
+
+
+
+
+ 预约时间:
+ {{arrangeTime}}
+ {{day}}
+
+
+
+
+
+
+
+
+ 服务美容师:
+
+
+ 预约美容师:
+
+
+ {{item.BeauticianName}}
+
+
+
+
+
+ 预
+ 约
+ 人:
+
+ {{item.VIPName}}
+
+
+
+
+ 手
+ 机
+ 号:
+
+ {{item.MobileTel}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 温馨提示
+
+ 1.预约成功后需在指定时间前到达;
+ 2.如有任何问题可致电咨询;
+ 3.如需退约,需提前取消。
+
+
+
+
+
+ 取消预约
+
+
+ 我的服务
+
+
+
+ 更改时间
+
+
+ 发表评价
+
+
+ 查看评价
+
+
+ 重新预约
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/tment_details.wxss b/pages/user/my_service/tment_details.wxss
new file mode 100644
index 0000000..d525a6a
--- /dev/null
+++ b/pages/user/my_service/tment_details.wxss
@@ -0,0 +1,118 @@
+page {
+ width: 100%;
+ background-color: rgb(238, 238, 238);
+}
+
+/* 公用 */
+
+.lf {
+ padding: 0rpx 40rpx;
+}
+
+.bt {
+ margin: 0rpx 15rpx;
+ padding: 0rpx 25rpx;
+ border-top: 2rpx dashed rgb(238, 238, 238);
+ padding-top: 50rpx;
+ padding-bottom: 50rpx;
+}
+
+.bmt {
+ margin-bottom: 35rpx;
+}
+
+.name {
+ width: 160rpx;
+ margin-right: 25rpx;
+}
+
+.value {
+ max-width: 390rpx;
+}
+
+/* 公用 */
+
+.container {
+ padding-bottom:70rpx;
+}
+
+.padding{
+ margin: 0rpx 20rpx;
+}
+
+.Subscriber {
+ overflow: hidden;
+ margin-top: 25rpx;
+ background-color: rgb(255, 255, 255);
+ border-radius: 10rpx;
+}
+
+.statusBar {
+ height: 80rpx;
+ background-color: rgb(214, 1, 33);
+ color: rgb(255, 255, 255);
+}
+
+.date {
+ margin-right: 25rpx;
+}
+
+.items {
+ margin: 40rpx 0rpx;
+}
+
+.Tips {
+ margin-top: 20rpx;
+ padding-top: 35rpx;
+ height: 255rpx;
+ border-radius: 10rpx;
+ background-color: rgb(255, 255, 255);
+ margin-bottom: 50rpx;
+}
+
+.Cozy {
+ width: 165rpx;
+ height: 43rpx;
+ margin-bottom: 20rpx;
+ color: rgb(255, 255, 255);
+ background-size: 100%;
+}
+
+.subs {
+ width: 710rpx;
+ padding: 15rpx 20rpx;
+ position: fixed;
+ bottom:0rpx;
+ background-color: rgb(255,255,255);
+}
+
+.sub {
+ width: 325rpx;
+ height: 65rpx;
+ border-radius: 30rpx;
+ color: rgb(255, 255, 255);
+}
+.code{
+ margin-left: 10rpx;
+ width: 50rpx;
+ height: 50rpx;
+}
+.rb {
+ background-color: rgb(214, 1, 33);
+}
+
+/* 棒槌 */
+
+.Stickl {
+ width: 39rpx;
+ height: 10rpx;
+ background-color: rgb(153, 153, 153);
+ transform: rotate(270deg);
+ border-radius: 20rpx;
+ left: 95rpx;
+ top: -15rpx;
+}
+
+.Stickr {
+ left: 590rpx;
+}
diff --git a/pages/user/my_service/tment_eval.js b/pages/user/my_service/tment_eval.js
new file mode 100644
index 0000000..46c8c97
--- /dev/null
+++ b/pages/user/my_service/tment_eval.js
@@ -0,0 +1,234 @@
+ var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ url: a.url, //接口网址
+ iurl: a.imghost,
+ defimgurl: "/miniapp/images/no-head.jpg",
+ stars_index: -1, //当前点击的星星下标
+ labels: [], //星级标签数组
+ sub_evaluate: 0, //是否评价成功
+ proposal: "", //用户输入的建议
+ proposal_size: 100, //评价意见和建议限定字数
+ number: "", //订单单号
+ beautician: "", //美容师信息
+ fromType: "服务评价", //评价来源
+ arrangeTime: "", //服务日期
+ is_evaluate: 0, //是否评价
+ EvaluateDatetime: "", //评价时间
+ },
+ //点击星级
+ check_stars: function(e) {
+ var th = this;
+ var is_evaluate = th.data.is_evaluate; //0可点击
+ if (is_evaluate == 0) {
+ 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 + 1,
+ 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
+ })
+ }
+ }
+ },
+ //输入评价意见和建议
+ input_proposal: function(e) {
+ var th = this;
+ var value = e.detail.value;
+ th.setData({
+ proposal: value
+ })
+ },
+ //图片失败,默认图片
+ bind_bnerr1: function (e) {
+ var th = this;
+ var _errImg = e.target.dataset.errorimg;
+ var _Img = e.target.dataset.img;
+ if (_Img != undefined) {
+ var _errObj = {};
+ _errObj[_errImg] = "/miniapp/images/no-head.jpg";
+ th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ }
+ },
+ //选择标签
+ check_label: function(e) {
+ var th = this;
+ var evaluate = th.data.is_evaluate; //0为未评价,未评价才可点击标签
+ if (evaluate == 0) {
+ 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
+ })
+ }
+ },
+ //查询美容师信息
+ query_bea: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/reservation/reservation/page";
+ var number = th.data.number; //订单编号
+ getApp().request.promiseGet(url, {
+ data: {
+ storeId: a.stoid,
+ userId: d.user_id,
+ number: number
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var data = res.data.data.pageData;
+ var arrangeTime = data[0].ArrangeTime;
+ th.setData({
+ beautician: data,
+ arrangeTime: arrangeTime
+ })
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ })
+ },
+ //获取预约评价
+ evaluate_get: function() {
+ var th = this;
+ var url = "/api/weshop/evaluation/evaluate/get";
+ getApp().request.promiseGet(url, {
+ data: {
+ number: th.data.number,
+ storeId: a.stoid
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ th.setData({
+ stars_index: res.data.data.Star-1,
+ labels: res.data.data.EvaluationList,
+ proposal: res.data.data.Remark,
+ EvaluateDatetime: res.data.data.EvaluateDatetime.substring(0, 19)
+ })
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ })
+ },
+ //提交评价
+ evaluate_save: function() {
+ var th = this;
+ var stars = th.data.stars_index; //评价星级
+ var proposal = th.data.proposal;
+ //判断是否评级
+ if (stars < 0) {
+ getApp().my_warnning("请进行评分", 0, th);
+ return false;
+ } else if (proposal == "") {
+ getApp().my_warnning("给点建议呗", 0, th);
+ return false;
+ }
+ wx.showLoading({
+ title: '加载中',
+ })
+ var labels = th.data.labels; //星级标签数组
+ var evaLabList = []; //用户选择的评价标签
+ // 查询评价标签
+ for (var i = 0; i < labels.length; i++) {
+ if (labels[i].check) {
+ evaLabList.push(labels[i].LabelName);
+ }
+ }
+ var url = th.data.url + "/api/weshop/evaluation/evaluate/insert";
+ var posNo = th.data.number; //收银单号
+ var proposal = th.data.proposal; //用户建议内容
+ var fromType = th.data.fromType; //评价来源
+ var json = {
+ "evaLabList": evaLabList,
+ "fromType": 2,
+ "number": posNo,
+ "remark": proposal,
+ "star": stars + 1,
+ "storeId": a.stoid
+ };
+ var data = JSON.stringify(json); //转换成json格式
+ wx.request({
+ url: url,
+ data: data,
+ method: 'POST',
+ header: {
+ 'content-type': 'application/json'
+ }, // 设置请求的 header
+ success: function(res) {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ getApp().my_warnning("评价成功", 1, th);
+ setTimeout(function() {
+ wx.redirectTo({
+ url: "/pages/user/my_service/tment_order_list"
+ });
+ }, 2000);
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ }
+ })
+
+ },
+ //图片失败,默认图片
+ bind_bnerr1: function(e) {
+ var th = this;
+ var _errImg = e.target.dataset.errorimg;
+ var _Img = e.target.dataset.img;
+ if (_Img != undefined) {
+
+ var _errObj = {};
+ _errObj[_errImg] = th.data.iurl+"/miniapp/images/no-head.jpg";
+ th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ }
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ var th = this;
+ th.setData({
+ number: options.Number,
+ is_evaluate: options.evaluate
+ })
+ th.query_bea();
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+ var th = this;
+ var is_evaluate = th.data.is_evaluate;
+ if (is_evaluate == 1) {
+ th.evaluate_get();
+ }
+ },
+})
\ No newline at end of file
diff --git a/pages/user/my_service/tment_eval.json b/pages/user/my_service/tment_eval.json
new file mode 100644
index 0000000..8d44d3f
--- /dev/null
+++ b/pages/user/my_service/tment_eval.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "预约评价",
+ "usingComponents": {
+ "qr_code": "/components/qr_code/qr_code",
+ "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
new file mode 100644
index 0000000..20dd053
--- /dev/null
+++ b/pages/user/my_service/tment_eval.wxml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+ 服务美容师:
+
+ {{it.BeauticianName}}
+
+
+
+
+ 服务项目:
+ {{it.ServiceName}}
+
+
+
+
+ 服务时间:
+ {{it.WriteTime}}
+
+
+
+
+ 评价时间:
+ {{EvaluateDatetime}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{proposal}}
+
+
+
+
+
+
+ {{item.LabelName}}
+
+
+
+
+
+
+ {{item.LabelName}}
+
+
+
+
+
+
+
+
+ 满意的话请打五星噢,谢谢您的支持!
+
+
+
+
+
+
+
+
+ 评价成功
+
+
+
+
+
+
+ 确认提交
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/tment_eval.wxss b/pages/user/my_service/tment_eval.wxss
new file mode 100644
index 0000000..2606dc7
--- /dev/null
+++ b/pages/user/my_service/tment_eval.wxss
@@ -0,0 +1,140 @@
+.container {
+ border-top: 7rpx solid rgb(245, 245, 245);
+ padding-bottom: 100rpx;
+ background-color: rgb(255, 255, 255);
+}
+
+.head {
+ height: 270rpx;
+}
+
+.headimg {
+ width: 190rpx;
+ height: 190rpx;
+ border-radius: 50%;
+}
+
+.item {
+ margin-bottom: 20rpx;
+}
+
+.itemlf {
+ width: 195rpx;
+}
+
+.itemlr {
+ width: 360rpx;
+}
+
+.starss {
+ margin-top: 15rpx;
+ border-top: 3rpx dashed rgb(203, 203, 203);
+ padding-top: 25rpx;
+ padding-left: 15rpx;
+}
+
+.stars {
+ width: 50rpx;
+ height: 50rpx;
+ margin-right: 20rpx;
+}
+
+.datetime {
+ width: 190rpx;
+}
+
+.tea_labs {
+ padding: 0rpx 56rpx;
+ margin-top: 20rpx;
+}
+
+.proposal {
+ right: 20rpx;
+ bottom: 20rpx;
+ color: rgb(152, 152, 152);
+}
+
+.textarea {
+ width: 100%;
+ height: 200rpx;
+ margin-top: 70rpx;
+ border: 2rpx solid rgb(203, 203, 203);
+ border-radius: 13rpx;
+ padding-top: 25rpx;
+ padding-left: 30rpx;
+ margin-bottom: 30rpx;
+ padding-right: 15rpx;
+ padding-bottom: 20rpx;
+}
+
+.labels {
+ display: inline-block;
+ max-height: 240rxp;
+ line-height: 50rpx;
+ padding-left: 15rpx;
+}
+
+.label {
+ padding: 0rpx 10rpx;
+ height: 48rpx;
+ line-height: 48rpx;
+ border: 2rpx solid rgb(218, 218, 218);
+ color: rgb(152, 152, 152);
+ border-radius: 5rpx;
+ margin-right: 20rpx;
+ width: 165rpx;
+ display: inline-block;
+ text-align: center;
+ margin-bottom: 10rpx;
+}
+
+/* 选择标签的样式 */
+
+.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: 70rpx;
+}
+
+.Subs {
+ background-color: rgb(255, 255, 255);
+ position: fixed;
+ width: 100%;
+ bottom: 40rpx;
+}
+
+.Submission {
+ width: 400rpx;
+ height: 65rpx;
+ border-radius: 60rpx;
+ background-color: rgb(214, 1, 33);
+ color: rgb(255, 255, 255);
+}
+
+.clonri {
+ margin: 0rpx;
+}
+
+.subSuccess {
+ position: fixed;
+ z-index: 3;
+ top: 435rpx;
+ left: 66rpx;
+ background-color: #a6a6a6a4;
+ width: 615rpx;
+ height: 315rpx;
+ border-radius: 20rpx;
+ color: rgb(255, 255, 255);
+}
+
+.Success {
+ width: 110rpx;
+ height: 110rpx;
+ margin-top: 50rpx;
+ margin-bottom: 45rpx;
+}
diff --git a/pages/user/my_service/tment_order_list.js b/pages/user/my_service/tment_order_list.js
new file mode 100644
index 0000000..6e0134e
--- /dev/null
+++ b/pages/user/my_service/tment_order_list.js
@@ -0,0 +1,226 @@
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ url: a.url, //接口网址
+ iurl: a.imghost, //图片网址
+ activeCategoryId: 0, //类别选中下标
+ defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
+ categories: [{
+ name: "全部",
+ id: 0
+ }, {
+ name: "未服务",
+ id: 1
+ }, {
+ name: "已服务",
+ id: 2
+ }, {
+ name: "已过期",
+ id: 3
+ }],
+ tm_order_list: [], //我的预约订单列表
+ curpage: 1, //当前分页数
+ pageSize: 10, //页大小
+ total: 0,
+ ismore: 0, //是否加载完毕
+ is_read: 0, //是否加载接口
+ states: 4, //4为取消预约
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+
+ },
+ changeTab: function(e) {
+ var th = this;
+ var id = e.currentTarget.dataset.id;
+ var activeCategoryId = th.data.activeCategoryId;
+ if (id != activeCategoryId) {
+ th.setData({
+ activeCategoryId: id,
+ tm_order_list: [],
+ curpage: 1,
+ ismore: 0,
+ is_read: 0
+ })
+ th.query_orderList();
+ } else {
+ return false;
+ }
+ },
+ //显示核销码
+ code_show: function(e) {
+ var th = this;
+ //--获取成功的时候--
+ var no = e.currentTarget.dataset.order_sn;
+ var qc_com = th.selectComponent("#qc_com"); //组件的id
+ var obj = {
+ val: no,
+ content: "请将二维码展示给核销员,使用更快捷"
+ };
+ qc_com.open(obj)
+ },
+ query_orderList: function() {
+ wx.showLoading({
+ title: '加载中',
+ })
+ var th = this;
+ var url = "/api/weshop/marketing/reservation/reservation/page";
+
+ var state_index = th.data.activeCategoryId;
+ if (state_index == 0) {
+ state_index = "";
+ } else {
+ --state_index;
+ }
+ th.setData({
+ is_read: 0
+ })
+ getApp().request.promiseGet(url, {
+ data: {
+ storeId: a.stoid,
+ userId: d.user_id,
+ state: state_index,
+ page: th.data.curpage,
+ pageSize: th.data.pageSize
+ }
+ }).then(res => {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ th.data.curpage++;
+ var arr1 = th.data.tm_order_list;
+ var arr2 = res.data.data.pageData;
+ var arr3 = [...arr1, ...arr2];
+ for(var i = 0;i
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+ 订单编号:{{item.Number}}
+
+
+ 未服务
+ 已服务
+ 已过期
+ 已取消
+ 已评价
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 预约门店:
+ {{item.StorageName}}
+
+
+ 预约项目:
+ {{item.ServiceName}}
+
+
+
+ 服务美容师:
+
+
+
+ 预约美容师:
+
+
+ {{item.BeauticianName}}
+
+
+ 预约时间:
+ {{item.ArrangeTime}}
+
+
+ 服务时间:
+ {{item.WriteTime}}
+
+
+
+
+
+
+
+
+ 取消预约
+
+
+ 查看详情
+
+ 更改时间
+ 发表评价
+ 重新预约
+ 评价详情
+
+
+
+
+ 到底了
+
+
+
+
+
+
+
+
+
+
+ 无预约记录
+
+
+ 立即预约
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/tment_order_list.wxss b/pages/user/my_service/tment_order_list.wxss
new file mode 100644
index 0000000..2219dee
--- /dev/null
+++ b/pages/user/my_service/tment_order_list.wxss
@@ -0,0 +1,152 @@
+page {
+ height: 100%;
+}
+
+.container {
+ background-color: rgb(255, 255, 255);
+}
+
+.type-navbar {
+ border-top: 3rpx solid rgb(221, 221, 221);
+ display: flex;
+ justify-content: space-between;
+ position: fixed;
+ background-color: rgb(255,255,255);
+ width:696rpx;
+}
+.itemMax{
+ margin-top: 93rpx;
+}
+
+.type-box {
+ height: 88rpx;
+ line-height: 88rpx;
+ padding: 0rpx 15rpx;
+ border-bottom: 5rpx solid rgb(255, 255, 255);
+}
+
+.chtypebox {
+ border-bottom: 5rpx solid rgb(224, 18, 18);
+}
+
+.Commodity_number {
+ height: 80rpx;
+ border-top: 13rpx solid rgb(245, 245, 245);
+}
+
+.Commodity_number image {
+ width: 30rpx;
+ height: 32rpx;
+}
+
+.padding {
+ padding: 0rpx 27rpx;
+}
+
+.lin {
+ border-left: 2rpx solid rgb(211, 29, 54);
+ margin-left: 17rpx;
+ margin-right: 14rpx;
+ height: 40rpx;
+}
+
+.order_number {
+ max-width: 550rpx;
+}
+.state{
+ color: rgb(216,63,82);
+}
+.items {
+ border-top: 4rpx solid rgb(245, 245, 245);
+ border-bottom: 4rpx solid rgb(245, 245, 245);
+ height: 260rpx;
+}
+.code{
+ width: 55rpx;
+ height: 55rpx;
+}
+.itemimage {
+ width: 190rpx;
+ height: 190rpx;
+ margin-right: 20rpx;
+ border-radius: 50%;
+ border: 1px solid #eee;
+}
+
+.details {
+ height: 190rpx;
+}
+
+.itemname {
+ width: 150rpx;
+ margin-right: 20rpx;
+}
+
+.itemvalue {
+ max-width: 300rpx;
+}
+
+.Unimportance {
+ width: 140rpx;
+ height: 40rpx;
+ line-height: 40rpx;
+ border-radius: 8rpx;
+ background-color: rgb(255, 255, 255);
+ margin-left: 20rpx;
+ border: 2rpx solid rgb(191, 191, 191);
+}
+
+.important {
+ background-color: rgb(212, 28, 52);
+ border: 2rpx solid rgb(212, 28, 52);
+ color: rgb(255, 255, 255);
+}
+
+.Unim {
+ height: 110rpx;
+}
+
+.exactly {
+ height: 80rpx;
+ background-color: rgb(245, 245, 245);
+}
+
+.exactly_text {
+ margin: 0rpx 15rpx;
+}
+
+.line {
+ border-top: 2rpx solid rgb(0, 0, 0);
+ width: 130rpx;
+}
+
+/* 无预约 */
+
+.empty_order image {
+ width: 300rpx;
+ height: 280rpx;
+ margin-top: 202rpx;
+}
+
+.empty_order .xc-ash {
+ margin-top: 10rpx;
+ font-weight: 600px;
+}
+
+.empty_order navigator {
+ margin-top: 60rpx;
+ border-radius: 40rpx;
+}
+
+.empty_order navigator view {
+ width: 247rpx;
+ height: 65rpx;
+ background-color: rgb(255, 72, 72);
+ border-radius: 40rpx;
+}
+.base{
+ display: flex;
+ height: 38rpx;
+ line-height: 38rpx;
+ align-items: baseline;
+}
\ No newline at end of file
diff --git a/pages/user/user_fw/user_fw.js b/pages/user/user_fw/user_fw.js
index d4fb82f..d3a057f 100644
--- a/pages/user/user_fw/user_fw.js
+++ b/pages/user/user_fw/user_fw.js
@@ -66,7 +66,7 @@ Page({
return false;
}
- var ewm="^"+this.data.userinfo.erpvipid+"|"+item.Id+"|TY01|";
+ var ewm="^"+this.data.userinfo.erpvipid+"|"+item.Id+"|4|TY01|";
var tt=this.format_time(1);
ewm=ewm+tt;
th.data.qr_code_object.val=ewm;
diff --git a/pages/user/userinfo/userinfo.js b/pages/user/userinfo/userinfo.js
index f0361d6..faa392d 100644
--- a/pages/user/userinfo/userinfo.js
+++ b/pages/user/userinfo/userinfo.js
@@ -741,26 +741,23 @@ Page({
var identity_card = th.data.identity_card;//身份证
console.log("身份证",identity_card);
- if (identity_card == "" || identity_card == null ) {
- getApp().my_warnning("请输入身份证", 0, th);
- return false;
- } else if (!(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))){
+ if (identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))){
getApp().my_warnning("身份证号码错误",0, th);
return false;
}
var address = th.data.address;//地址
- console.log("地址1010101", address)
- if (address == "" || address == null) {
- getApp().my_warnning("请输入地址", 0, th);
- return false;
- }
+ // console.log("地址1010101", address)
+ // if (address == "" || address == null) {
+ // getApp().my_warnning("请输入地址", 0, th);
+ // return false;
+ // }
//保存所属门店的id
var sto_sele_id=th.data.sto_sele_id;
- console.log("请输入所属门店的id", sto_sele_id);
- if (sto_sele_id == null || sto_sele_id==""){
- getApp().my_warnning("请输入所属门店", 0, th);
- return false;
- }
+ // console.log("请输入所属门店的id", sto_sele_id);
+ // if (sto_sele_id == null || sto_sele_id==""){
+ // getApp().my_warnning("请输入所属门店", 0, th);
+ // return false;
+ // }
console.log("要保存的数据", sex, consumption, identity_card, address, user_name);
var datas = {
mobile: phone,//手机号码