diff --git a/pages/user/my_service/appment_main.js b/pages/user/my_service/appment_main.js
index 17d3124..80fd7bb 100644
--- a/pages/user/my_service/appment_main.js
+++ b/pages/user/my_service/appment_main.js
@@ -19,9 +19,14 @@ Page({
store_name: "", //选择的服务门店
fir_pick_index: 0, //选择的门店下标
curpage: 1, //当前分页数
- pageSize: 5, //页大小
+ pageSize: 8, //页大小
total: 0,
ismore: 0, //是否加载完毕
+ itemId: "", //项目id
+ isScroll: true, //scroll-y是否可以滑动
+ key_word: "", //是否按门店文字查询
+ is_service_read: 0, //是否调用过门店接口
+ is_search: 0, //是否通过key_word调用接口
},
onclickstore: function() {
var th = this;
@@ -84,15 +89,18 @@ Page({
//分页查询门店信息
query_store: function() {
var th = this;
- var itemid = "8f503b2e-f35f-4210-ba42-df4345526b93";
+ // var itemId = th.data.itemId;
+ var itemId = "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6";
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,
+ itemId: itemId,
page: th.data.curpage,
- pageSize: th.data.pageSize
+ pageSize: th.data.pageSize,
+ KeyWord: key_word
}
}).then(res => {
if (res.data.code == 0) {
@@ -127,7 +135,7 @@ Page({
beautician: 0
})
}
- var itemid = "8f503b2e-f35f-4210-ba42-df4345526b93";
+ var itemid = "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6";
var storageId = "FD8EC44A-6474-4BA1-A17C-A87306690E59";
var url = "/api/weshop/marketing/reservation/staff/page";
getApp().request.promiseGet(url, {
@@ -150,15 +158,46 @@ Page({
var th = this;
var bea_name = e.currentTarget.dataset.beaname;
th.setData({
- beautician_name:bea_name
+ beautician_name: bea_name,
+ beautician: 0
})
-
+
+ },
+ //获取搜索门店输入的值
+ 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;
+ if (key_word != "") {
+ th.setData({
+ curpage: 1,
+ is_search: 0,
+ store_list: []
+ })
+ th.query_store();
+ if (store_list.length < 1) {
+ th.setData({
+ is_search: 1
+ })
+ }
+ } else {
+ getApp().my_warnning("请输入门店名称",0,th);
+ }
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
-
+ var th = this;
+ th.setData({
+ itemId: options.itemId
+ })
},
/**
diff --git a/pages/user/my_service/appment_main.wxml b/pages/user/my_service/appment_main.wxml
index c13ba69..ce0ffa2 100644
--- a/pages/user/my_service/appment_main.wxml
+++ b/pages/user/my_service/appment_main.wxml
@@ -108,13 +108,13 @@
-
-
+
+
搜索
-
+
@@ -133,10 +133,15 @@
-
- 没有找到这个门店
+
+ 没有找到{{key_word}}门店
-
+
+
+
+ 数据加载完毕
+
+
diff --git a/pages/user/my_service/appment_main.wxss b/pages/user/my_service/appment_main.wxss
index 402c81e..8f41a85 100644
--- a/pages/user/my_service/appment_main.wxss
+++ b/pages/user/my_service/appment_main.wxss
@@ -200,7 +200,7 @@
}
.stores {
- height: 468rpx;
+ height: 520rpx;
overflow-y: scroll;
}
@@ -261,6 +261,6 @@
max-width: 300rpx;
}
.notstore{
- margin-top: 30rpx;
+ height: 80rpx;
color: rgb(159, 159, 159);
}
\ No newline at end of file
diff --git a/pages/user/my_service/beauty_deta.js b/pages/user/my_service/beauty_deta.js
index c6a154c..78e5f2d 100644
--- a/pages/user/my_service/beauty_deta.js
+++ b/pages/user/my_service/beauty_deta.js
@@ -1,4 +1,8 @@
-var e = getApp(), a = e.globalData.setting, os = a, t = e.request;
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
Page({
/**
@@ -6,61 +10,84 @@ Page({
*/
data: {
iurl: a.imghost,
+ seekTime: "2019-11-18", //当前服务预约选择的时间
+ time_list: [], //可预约时间
+ name: "", //美容师姓名
+ comment: "", //美容师评价
+ head_img: "", //美容师头像
},
/**
* 生命周期函数--监听页面加载
*/
- onLoad: function (options) {
+ onLoad: function(options) {
},
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
/**
* 生命周期函数--监听页面显示
*/
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
+ onShow: function() {
+ var th = this;
+ th.query_beatea();
+ th.query_date();
},
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
+ //图片失败,默认图片
+ 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) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ }
},
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
+ //获取美容师信息
+ query_beatea: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/reservation/staff/page"; //接口路径
+ var itemId = "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6",
+ storageId = "FD8EC44A-6474-4BA1-A17C-A87306690E59";
+
+ getApp().request.promiseGet(url, {
+ data: {
+ itemId: itemId,
+ storageId: storageId,
+ storeId: 1,
+ userId: 5682130
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var data = res.data.data.pageData;
+ th.setData({
+ name: data[0].StaffName,
+ comment: data[0].Remark1,
+ head_img: data[0].PhotoUrl
+ })
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ })
},
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
+ query_date: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/reservation/staff/time/list";
+ var SeekTime = th.data.seekTime;
+ getApp().request.promiseGet(url, {
+ data: {
+ BeauticianID: "337C11B8-034B-495D-B360-FC2F6CB29394",
+ ProjectID: "08AD49D5-BAFD-4B5E-ABBA-B180EB64EED6",
+ SeekTime: SeekTime,
+ storeId: a.stoid,
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ th.setData({
+ time_list: data
+ })
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ }
+ })
},
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- }
})
\ No newline at end of file
diff --git a/pages/user/my_service/beauty_deta.json b/pages/user/my_service/beauty_deta.json
index 35448af..710a83b 100644
--- a/pages/user/my_service/beauty_deta.json
+++ b/pages/user/my_service/beauty_deta.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/beauty_deta.wxml b/pages/user/my_service/beauty_deta.wxml
index e76f819..c7f729d 100644
--- a/pages/user/my_service/beauty_deta.wxml
+++ b/pages/user/my_service/beauty_deta.wxml
@@ -5,12 +5,12 @@