diff --git a/pages/user/my_service/appment_main.js b/pages/user/my_service/appment_main.js
index 5637582..de08c24 100644
--- a/pages/user/my_service/appment_main.js
+++ b/pages/user/my_service/appment_main.js
@@ -25,7 +25,8 @@ Page({
pageSize: 8, //页大小
total: 0,
ismore: 0, //是否加载完毕
- itemId: "", //项目id
+ itemId: "", //服务id
+ project_id: "", //项目id
isScroll: true, //scroll-y是否可以滑动
key_word: "", //是否按门店文字查询
is_service_read: 0, //是否调用过门店接口
@@ -82,19 +83,21 @@ Page({
return false;
} else {
var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径
- var projectID = th.data.itemId; //项目id
+ 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 remarks = th.data.remarks; //用户备注
+ var project_id = th.data.project_id; //项目id
var json = {
- "projectID": projectID,
- "beauticianID": beauticianID,
+ "serviceId": serviceId,
+ "projectId": project_id,
+ "beauticianId": beauticianID,
"buyType": buyType,
"storeId": storeId,
- "storageID": storageId,
+ "storageId": storageId,
"arrangeTime": time,
"userId": userId,
"remark": remarks,
@@ -146,7 +149,7 @@ Page({
th.setData({
fir_pick_index: index_c,
beautician_name: "",
- time: "2019-12-10 18:00:00",
+ time: "2019-12-10 12:00:00",
tment_count: ""
})
}
@@ -176,14 +179,16 @@ Page({
//分页查询门店信息
query_store: function() {
var th = this;
- var itemId = th.data.itemId; //正式使用项目id
+ var itemId = th.data.itemId; //服务id
var url = "/api/weshop/marketing/reservation/storage/page";
var key_word = th.data.key_word;
getApp().request.promiseGet(url, {
data: {
storeId: a.stoid,
userId: d.user_id,
- itemId: itemId,
+ serviceId: itemId,
+ latitude: 1,
+ longitude: 1,
page: th.data.curpage,
pageSize: th.data.pageSize,
KeyWord: key_word
@@ -230,7 +235,7 @@ Page({
data: {
storeId: a.stoid,
userId: d.user_id,
- itemId: itemid,
+ serviceId: itemid,
storageId: storageId
}
}).then(res => {
@@ -252,7 +257,7 @@ Page({
beautician: 0,
bea_index: bea_index,
beauticianID: BeauticianID,
- time: "2019-12-10 19:00:00",
+ time: "2019-12-10 13:00:00",
tment_count: ""
})
@@ -303,8 +308,9 @@ Page({
onLoad: function(options) {
var th = this;
th.setData({
- itemId: options.itemId,
- buyType: options.BuyType
+ itemId: options.service_id,
+ buyType: options.BuyType,
+ project_id: options.ProjectID,
})
},
//查询剩下可预约人数
@@ -319,7 +325,7 @@ Page({
getApp().request.promiseGet(url, {
data: {
beauticianID: beauticianID,
- projectID: projectID,
+ serviceId: projectID,
seekTime: seekTime,
storageId: storageId,
storeId: storeId
diff --git a/pages/user/my_service/beauty_deta.js b/pages/user/my_service/beauty_deta.js
index 45220c6..306a54e 100644
--- a/pages/user/my_service/beauty_deta.js
+++ b/pages/user/my_service/beauty_deta.js
@@ -12,17 +12,17 @@ Page({
iurl: a.imghost,
url: "", //选择选择时间后返回的页面
defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
- seekTime: "", //当前服务预约选择的时间
+ seekTime: "2019-11-24", //当前服务预约选择的时间
time_list: [], //可预约时间
name: "", //美容师姓名
comment: "", //美容师评价
aweeks: [], //七天的预约时间
head_img: "", //美容师头像
- time: ["08:00:00", "09:00:00 ", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00"],
- time_index: 0, //选择预约时间下标
+ 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"],
+ time_index: "", //选择预约时间下标
date_id: 0, //选择日期的id
- beautician_id: "", //美容师id
- itemId: "", //项目id
+ beautician_id: "337C11B8-034B-495D-B360-FC2F6CB29394", //美容师id
+ itemId: "", //服务id
},
/**
@@ -38,7 +38,6 @@ Page({
})
th.query_beatea();
th.query_aweek();
- // th.query_date();
},
/**
* 生命周期函数--监听页面显示
@@ -60,12 +59,15 @@ Page({
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;
- th.setData({
- date_id: id,
- seekTime: seekTime
- })
- th.query_date();
+ if (id != date_id) {
+ th.setData({
+ date_id: id,
+ seekTime: seekTime
+ })
+ th.query_date();
+ }
},
//获取美容师信息
query_beatea: function() {
@@ -74,7 +76,7 @@ Page({
var beautician_id = th.data.beautician_id;
getApp().request.promiseGet(url, {
data: {
- BeauticianID: beautician_id,
+ beauticianId: beautician_id,
storeId: a.stoid,
}
}).then(res => {
@@ -92,9 +94,14 @@ Page({
},
//返回上个页面
navigateBack: function() {
+ var th = this;
+ var seekTime = th.data.seekTime;//选择的日期
+ var time_list = th.data.time_list;
+ var time_index = th.data.time_index;
+ var time = time_list[time_index];
wx.navigateBack({
- changed: true
- }); //返回上一页
+ url: th.data.url + '?' + 'seekTime=' + seekTime+'&'+"time="+time
+ });
},
//选择时间
Selection_time: function(e) {
@@ -102,7 +109,7 @@ Page({
var index = e.currentTarget.dataset.index;
var time_index = th.data.time_index;
if (index == time_index) {
- return;
+ return false;
} else {
th.setData({
time_index: index
@@ -117,8 +124,8 @@ Page({
var url = "/api/weshop/marketing/reservation/staff/seven/time/list"; //接口地址
getApp().request.promiseGet(url, {
data: {
- BeauticianID: beautician_id,
- ProjectID: itemId,
+ beauticianId: beautician_id,
+ serviceId: itemId,
storeId: a.stoid,
}
}).then(res => {
@@ -131,11 +138,11 @@ Page({
"val": data[i]
};
arr.push(em);
- console.log(arr[0].time.length + "1111111111111111111111111" + arr[0].time[0]);
}
th.setData({
aweeks: arr
})
+ th.query_date();
} else {
getApp().my_warnning(res.data.msg, 0, th);
}
@@ -146,37 +153,45 @@ Page({
query_date: function() {
var th = this;
var date_id = th.data.date_id; //日期下标
- var SeekTime = th.data.aweeks[date_id];
+ var SeekTime = th.data.aweeks[date_id].time;
var url = "/api/weshop/marketing/reservation/staff/time/list";
getApp().request.promiseGet(url, {
data: {
- BeauticianID: "337C11B8-034B-495D-B360-FC2F6CB29394",
- ProjectID: "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6",
- SeekTime: SeekTime,
+ beauticianId: th.data.beautician_id,
+ serviceId: th.data.itemId,
+ seekTime: SeekTime,
storeId: a.stoid,
}
}).then(res => {
if (res.data.code == 0) {
- var data = res.data.data;
- // var date_id = th.data.date_id; //选择日期
- // var time = th.data.aweeks[date_id].val; //固定时间
- // var time_list = [];
- // for (var i = 0; i < time.length; i++) {
- // for (var ii = ii; ii < data.length; ii++) {
- // if (time[i] == data[ii].GroupHour) {
- // time_list.push(data[ii].GroupHour);
- // continue;
- // } else {
- // time_list.push("");
- // }
- // }
- // }
+ var time_list = res.data.data;
+ var time = th.data.time;
+ var new_time = [];
+ for (var i = 0; i < time.length; i++) {
+ for (var ii = 0; ii < time_list.length; ii++) {
+ if (time[i] == time_list[ii].GroupHour.substring(0, 5)) {
+ new_time[i] = time_list[ii].GroupHour.substring(0, 5);
+ break;
+ } else {
+ new_time[i] = "";
+ }
+ }
+ }
th.setData({
- time_list: data
+ time_list: new_time
})
} else {
getApp().my_warnning(res.data.msg, 0, th);
}
})
},
+ //预览头像
+ previewImage: function (e) {
+ var th = this;
+ var current = e.currentTarget.dataset.src;
+ wx.previewImage({
+ current: current, // 当前显示图片的http链接
+ urls: [th.data.head_img] // 需要预览的图片http链接列表
+ })
+ },
})
\ 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 5cdb322..9e4a60d 100644
--- a/pages/user/my_service/beauty_deta.wxml
+++ b/pages/user/my_service/beauty_deta.wxml
@@ -5,7 +5,7 @@
{{name}}
-
+
@@ -35,11 +35,11 @@
-
-
+
+
- {{it.GroupHour}}
+ {{it}}
约满
@@ -49,7 +49,7 @@
- {it.GroupHour}}
+ {{it}}
diff --git a/pages/user/my_service/cosmetology_list.js b/pages/user/my_service/cosmetology_list.js
index 1a44c70..b2a3917 100644
--- a/pages/user/my_service/cosmetology_list.js
+++ b/pages/user/my_service/cosmetology_list.js
@@ -16,7 +16,7 @@ Page({
pageSize: 10, //页大小
total: 0, //总数量
ismore: 0, //是否加载完毕
- itemId: 0, //项目id,
+ itemId: 0, //服务id,
storageId: 0, //线下门店id
},
onReachBottom: function() {
@@ -30,13 +30,15 @@ Page({
},
query_cology: function() {
var th = this;
- var url = "/api/weshop/marketing/reservation/staff/page";
+ 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,
- itemId:"08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6",
- storageId: "FD8EC44A-6474-4BA1-A17C-A87306690E59",
+ serviceId: itemId,
+ storageId: storageId,
page: th.data.curpage,
pageSize: th.data.pageSize
}
@@ -55,6 +57,11 @@ Page({
ismore: ismore,
is_service_read: 1,
}), wx.stopPullDownRefresh(); //停止下拉刷新
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ th.setData({
+ is_cosmetology_read:1
+ })
}
})
},
@@ -72,12 +79,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
- // var th = this;
- // var label = "技术好|长得帅|很可爱";
- // var split = label.split("|");//标签通过分割符
- // for (var i = 0; i < split.length; i++) {
- // console.log("成功啦啦啦啦"+split[i]+i);
- // }
var th = this;
th.setData({
itemId: options.itemId,
diff --git a/pages/user/my_service/cosmetology_list.json b/pages/user/my_service/cosmetology_list.json
index 33c4630..90bf58b 100644
--- a/pages/user/my_service/cosmetology_list.json
+++ b/pages/user/my_service/cosmetology_list.json
@@ -1,3 +1,6 @@
{
- "navigationBarTitleText": "美容师列表"
+ "navigationBarTitleText": "美容师列表",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn"
+ }
}
\ No newline at end of file
diff --git a/pages/user/my_service/cosmetology_list.wxml b/pages/user/my_service/cosmetology_list.wxml
index 374aaf1..93d152d 100644
--- a/pages/user/my_service/cosmetology_list.wxml
+++ b/pages/user/my_service/cosmetology_list.wxml
@@ -20,13 +20,13 @@
- {{item.type_a}}
+ {{item}}
- {{item.type_b}}
+ {{item}}
- {{item.type_c}}
+ {{item}}
@@ -34,17 +34,12 @@
-
+
预约
-
-
+
{{item.Remark1}}
@@ -73,4 +68,5 @@
其他项目
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/hist_service.js b/pages/user/my_service/hist_service.js
index 42f6f36..9172d9b 100644
--- a/pages/user/my_service/hist_service.js
+++ b/pages/user/my_service/hist_service.js
@@ -135,7 +135,10 @@ Page({
is_reset:0
}), wx.stopPullDownRefresh(); //停止下拉刷新
} else {
- getApp().my_warnning(res.data.msg, 0, this);
+ th.setData({
+ is_service_read:1,
+ is_screen:0
+ })
}
})
},
diff --git a/pages/user/my_service/i_service.wxml b/pages/user/my_service/i_service.wxml
index 3321812..b62cbb2 100644
--- a/pages/user/my_service/i_service.wxml
+++ b/pages/user/my_service/i_service.wxml
@@ -1,6 +1,6 @@
-
+
历史服务
@@ -49,7 +49,7 @@
立即使用
-
+
预约
diff --git a/pages/user/my_service/i_service.wxss b/pages/user/my_service/i_service.wxss
index ad3dc27..5d2773e 100644
--- a/pages/user/my_service/i_service.wxss
+++ b/pages/user/my_service/i_service.wxss
@@ -26,7 +26,7 @@ page {
.rel {
background-color: rgb(255, 255, 255);
width: 350rpx;
- height: 420rpx;
+ height: 405rpx;
border-radius: 20rpx;
display: inline-block;
margin-right: 15rpx;
diff --git a/pages/user/my_service/tment_details.wxml b/pages/user/my_service/tment_details.wxml
index 044af7d..6beff18 100644
--- a/pages/user/my_service/tment_details.wxml
+++ b/pages/user/my_service/tment_details.wxml
@@ -14,7 +14,7 @@
预约门店:
- {{item.ProjectName}}
+ {{item.StorageName}}
diff --git a/pages/user/my_service/tment_eval.js b/pages/user/my_service/tment_eval.js
index 01b1a5a..44f9fd6 100644
--- a/pages/user/my_service/tment_eval.js
+++ b/pages/user/my_service/tment_eval.js
@@ -19,6 +19,7 @@ Page({
number: "", //订单单号
beautician: "", //美容师信息
fromType: "服务评价", //评价来源
+ arrangeTime:"",//服务日期
},
//点击星级
check_stars: function(e) {
@@ -94,9 +95,10 @@ Page({
}).then(res => {
if (res.data.code == 0) {
var data = res.data.data.pageData;
- data = data[0].ArrangeTime.substring(0, 11);
+ var arrangeTime = data[0].ArrangeTime.substring(0, 11);
th.setData({
- beautician: data[0]
+ beautician: data[0],
+ arrangeTime: arrangeTime
})
} else {
getApp().my_warnning(res.data.msg, 0, th);
diff --git a/pages/user/my_service/tment_eval.wxml b/pages/user/my_service/tment_eval.wxml
index 8e161a0..205d07f 100644
--- a/pages/user/my_service/tment_eval.wxml
+++ b/pages/user/my_service/tment_eval.wxml
@@ -14,13 +14,13 @@
服务项目:
- {{beautician.ProjectName}}
+ {{beautician.StorageName}}
服务时间:
- {{beautician.ArrangeTime}}
+ {{arrangeTime}}
diff --git a/pages/user/my_service/tment_order_list.js b/pages/user/my_service/tment_order_list.js
index b9d0b23..5fb16bc 100644
--- a/pages/user/my_service/tment_order_list.js
+++ b/pages/user/my_service/tment_order_list.js
@@ -39,7 +39,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
-
+ var th = this;
+ th.query_orderList();
},
changeTab: function(e) {
var th = this;
@@ -171,8 +172,7 @@ Page({
* 生命周期函数--监听页面显示
*/
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 8bd0159..9e5c90c 100644
--- a/pages/user/my_service/tment_order_list.wxml
+++ b/pages/user/my_service/tment_order_list.wxml
@@ -18,7 +18,7 @@
已服务
已过期
已取消
- 订单异常
+ 已评价
@@ -63,9 +63,9 @@
查看详情
- 更改时间
+ 更改时间
发表评价
- 重新预约
+ 重新预约