Commit ad05616875858b4fd376583300cd5308d02b878b

Authored by 后端研发-苏明海
2 parents 58cdc2c3 b74ba118

Merge branch 'test' into 'qa'

Test

See merge request !576
components/diy_searchbox/diy_searchbox.wxml
... ... @@ -34,14 +34,14 @@
34 34 </view>
35 35  
36 36 <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'>
37   - <navigator wx:if="{{first}}" bindtap='click_sear' class="s1_gk_a2 flex" style="height: 100%;">
38   - <image src='/public/static/images/model/select.png'></image>
39   - <text style='color:{{object.word_color?object.word_color:"#fff"}}'>在店铺内搜索</text>
  37 + <navigator wx:if="{{first}}" bindtap='click_sear' class="s1_gk_a2 flex" style='height: 100%;color:{{object.word_color?object.word_color:"#fff"}}'>
  38 + <text class="iconfont icon-search" style="font-size: 40rpx;"></text>
  39 + <text>在店铺内搜索</text>
40 40 </navigator>
41   - <navigator wx:else class="s1_gk_a2 flex" style="height: 100%;">
42   - <image src='/public/static/images/model/select.png' bindtap='sear'></image>
43   - <input id="find_inp" class="find_inp2" value=""
44   - bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" />
  41 + <navigator wx:else class="s1_gk_a2 flex" style='height: 100%;color:{{object.word_color?object.word_color:"#fff"}}'>
  42 + <text style="font-size: 40rpx;" class="iconfont icon-search" bindtap='sear'></text>
  43 + <input id="find_inp" class="find_inp2" value=""
  44 + bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" />
45 45 </navigator>
46 46 </view>
47 47  
... ...
components/diy_searchbox/diy_searchbox.wxss
... ... @@ -85,4 +85,26 @@
85 85 .flex{ display: flex; align-items: center;}
86 86 .find_img{margin: 0 20rpx; }
87 87 .find_inp{text-align: left; width: 620rpx;}
88   -.find_inp2{text-align: left; width: 520rpx;}
89 88 \ No newline at end of file
  89 +.find_inp2{text-align: left; width: 520rpx;}
  90 +
  91 +
  92 +@font-face {font-family: "iconfont";
  93 + src: url('iconfont.eot?t=1607568098927'); /* IE9 */
  94 + src: url('iconfont.eot?t=1607568098927#iefix') format('embedded-opentype'), /* IE6-IE8 */
  95 + url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALAAAsAAAAABmAAAAJ1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcApsgQwBNgIkAwgLBgAEIAWEbQcwG7IFyC6wbdiTQGyMi0WNir+9Fm8e4RAP/6397pud/aJ4Uk0uWTSRSTRKIkFspMDpGgqN+fZzt/8RazTS0XwWUU8Ta1/um9zuTxpailoSb/A6tG0kPJvEFYB1Rtl89ekqqzifuJ/6V0ADyXe+m0tEUFRyJODApgOMKhrZJjTjDWMXuITjBBpGtXCdDU2EQIXMGheIJ1lkQEXOK8ssURMqNUuzeAOlWnqhrvEafj9+rUQFSVmwSi4fB3nQ83lsp9CTxUkPPgF8BLS6RIFlQCZua6PnaMHotEa0xCSwr8Lg87hY9C1ir0bB/jorvwWGoeiexK7kVvMTyHH3KGBr1C2kvho1nw+v5pbDPZGLXOPI7W04lwtV8CN5NHtN7tJJiwuUQ9cnXjb3PqlBXYtDLSxSjl26sODsxV2ZjMvjTmTScSpBpdM58XQG9LB+VlxQVwLBn+bvdvzWmhl8/HtoyPrZqe3ZFvwhcc+mrEstc8qquNaejI4am9DQwD/s7HM/Vjd4O8lQM3hT9qqRFIWaaVKmLaPUtIaKmkM0LBle3dQPo0WuY9EcQOixj6TjHYUeN6RMu0NpyCsqeoJGw33Ubtk0G3JVP0YMQTxks1DmTENwrKQqKgwg0dEYnJWGjAjCSTkAfW5vMTGMDITnmJFMiX5CBChgU4dD4DSkaSa0sKkgjrglQqw2j0eoe5ObM3VQ5RSGMAiEB7GyIBnHZBD8zkRV6fMBiMihYeCWshpvBIIlyb1DPm7eHqRhldGr7F5eSUoR+RGEABJgJh00BAYhGo0JsuoHKRAO4SaNCFvaeOx2Ql+Ve32N/gGFrApLn8LuV6g8IwZzEgA=') format('woff2'),
  96 + url('iconfont.woff?t=1607568098927') format('woff'),
  97 + url('iconfont.ttf?t=1607568098927') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
  98 + url('iconfont.svg?t=1607568098927#iconfont') format('svg'); /* iOS 4.1- */
  99 +}
  100 +
  101 +.iconfont {
  102 + font-family: "iconfont" !important;
  103 + font-size: 16px;
  104 + font-style: normal;
  105 + -webkit-font-smoothing: antialiased;
  106 + -moz-osx-font-smoothing: grayscale;
  107 +}
  108 +
  109 +.icon-search:before {
  110 + content: "\e7b3";
  111 +}
... ...
packageA/pages/activity_share/activity_share.js
... ... @@ -56,10 +56,15 @@ Page({
56 56 var th=this;
57 57 //接受有没有导购的参数
58 58 var first_leader=options.first_leader;
  59 + var StaffId=options.StaffId;
  60 + var StorageId=options.StorageId;
59 61 if(first_leader){
60 62 //-- user_id代过来免登陆 --
61 63 getApp().globalData.user_id=first_leader;
62 64 getApp().getUserFir();
  65 +
  66 + //设置分享会员和导购id和归属门店ID
  67 + this.setData({first_leader:first_leader,StaffId:StaffId,StorageId:StorageId});
63 68 }
64 69  
65 70 this.requestGoodsList();
... ... @@ -85,10 +90,9 @@ Page({
85 90 },
86 91 fail: function(res) {}
87 92 });
88   - }
89   -
  93 + }
90 94 th.setData({poster:json_data})
91   -
  95 +
92 96 }
93 97 }
94 98 })
... ... @@ -154,45 +158,56 @@ Page({
154 158 path:url,
155 159 imageUrl: img,
156 160 };
157   - th.setData({share_hidden:1});
158   - return ob;
159   -
  161 + th.setData({share_hidden:1});
  162 + th.insert_act_share(title,lbid);
  163 + return ob;
160 164 }else{
161 165 //---秒杀,拼团,促销---
162 166 var item=this.data.share_good;
163 167 if(item){
164 168 var price = item.price;
165 169 if(!price) price=item.shop_price;
166   -
167   -
  170 +
168 171 var title= item.goods_name;
169 172 var img=this.data.url+item.original_img;
170 173 var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
171 174 if(getApp().globalData.user_id){
172   - url+="&first_leader="+getApp().globalData.user_id;
  175 + url+="&first_leader="+getApp().globalData.user_id;
173 176 }
174 177 var ob={
175 178 title: price + "元 " +title,
176 179 path:url,
177 180 imageUrl: img,
178 181 };
179   - th.setData({share_hidden:1,share_good:null});
  182 + th.setData({share_hidden:1,share_good:null});
  183 +
  184 + //插入活动
  185 + if(item.prom_type==3){
  186 + var hui_active=this.data.hui_active;
  187 + th.insert_act_share(hui_active.name,hui_active.id);
  188 + }else{
  189 + th.insert_act_share(item.title,item.id);
  190 + }
  191 +
180 192 return ob;
181 193 }else{
182 194 var url="/pages/index/index/index";
183 195 if(getApp().globalData.user_id){
184 196 url+="?first_leader="+getApp().globalData.user_id;
185 197 }
186   - var hui_active=this.data.hui_active;
187   - var title=hui_active.name;
  198 + var hui_active=this.data.hui_active;
  199 +
  200 + var title=hui_active.title;
  201 + if(!title) title=hui_active.name;
188 202 if(!title) title=hui_active.main_goods_name;
189 203 if(!title) title=hui_active.giftTitle;
190 204  
191 205 var ob={
192   - title: title,
193   - path:url,
  206 + title: title,path:url,
194 207 };
195   - th.setData({share_hidden:1,share_good:null});
  208 + th.setData({share_hidden:1,share_good:null});
  209 + //插入活动
  210 + th.insert_act_share(title,hui_active.id);
196 211 return ob;
197 212 }
198 213 }
... ... @@ -506,6 +521,13 @@ Page({
506 521 if(user_id>0){
507 522 scene+="_"+user_id;
508 523 }
  524 +
  525 + if(th.data.share_good.prom_type==3){
  526 + th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id); //插入分享
  527 + }else{
  528 + th.insert_act_share(th.data.share_good.title,th.data.share_good.id); //插入分享
  529 + }
  530 +
509 531  
510 532 ///二微码
511 533 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
... ... @@ -1086,7 +1108,29 @@ Page({
1086 1108 var lbid=item.lbId;
1087 1109 var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
1088 1110 getApp().goto(url);
  1111 + },
  1112 +
  1113 + //-- 推送活动分享 --
  1114 + insert_act_share:function(title,actid){
  1115 + var th = this;
  1116 + var url="/api/weshop/sharetypeList/save";
  1117 + var req_data={
  1118 + shareActId:actid,
  1119 + shareActName:title,
  1120 + shareType:3,
  1121 + shareUserId:th.data.first_leader,
  1122 + shareStaffId:th.data.StaffId,
  1123 + shareStorageId:th.data.StorageId,
  1124 + shareTime:ut.gettimestamp(),
  1125 + storeId:os.stoid
  1126 + }
  1127 + //插入数据
  1128 + getApp().request.post(url,{
  1129 + data:req_data,
  1130 + success:function(){}
  1131 + })
  1132 +
1089 1133 }
1090   -
  1134 +
1091 1135  
1092 1136 })
1093 1137 \ No newline at end of file
... ...
packageA/pages/goods_share/goods_share.js
... ... @@ -33,10 +33,15 @@ Page({
33 33 var th=this;
34 34 //接受有没有导购的参数
35 35 var first_leader=options.first_leader;
  36 + var StaffId=options.StaffId;
  37 + var StorageId=options.StorageId;
36 38 if(first_leader){
37 39 //-- user_id代过来免登陆 --
38 40 getApp().globalData.user_id=first_leader;
39 41 getApp().getUserFir();
  42 +
  43 + //设置分享会员和导购id和归属门店ID
  44 + this.setData({first_leader:first_leader,StaffId:StaffId,StorageId:StorageId});
40 45 }
41 46 this.requestGoodsList();
42 47  
... ... @@ -150,6 +155,7 @@ Page({
150 155 imageUrl: img,
151 156 };
152 157 th.setData({share_hidden:1});
  158 + th.insert_goods_share();
153 159 return ob;
154 160  
155 161 },
... ... @@ -326,6 +332,9 @@ Page({
326 332 that.setData({
327 333 canvasHidden: false,share_hidden:1
328 334 })
  335 +
  336 + //点击分享
  337 + this.insert_goods_share();
329 338  
330 339 var app = getApp();
331 340 var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
... ... @@ -350,10 +359,10 @@ Page({
350 359 //先画背景
351 360 var pg_path = "../../../images/share/share_bg.png";
352 361  
353   - //-- 如果有自定义海报的时候,判断背景的图片 --
354   - if(th.data.share_b_img){
  362 + //-- 如果有自定义海报的时候,判断背景的图片 --
  363 + if(th.data.share_b_img){
355 364 pg_path=th.data.share_b_img;
356   - }
  365 + }
357 366 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
358 367  
359 368 //-- 是自定义海报的情况下 --
... ... @@ -803,6 +812,30 @@ Page({
803 812 var item=this.data.list[index];
804 813 var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
805 814 getApp().goto(url);
  815 + },
  816 +
  817 + insert_goods_share:function(){
  818 + var th = this;
  819 + var item=this.data.share_good;
  820 + var url="/api/weshop/sharetypeList/save";
  821 + var req_data={
  822 + shareActId:item.goods_id,
  823 + shareActName:item.goods_name,
  824 + shareType:2,
  825 + shareUserId:th.data.first_leader,
  826 + shareStaffId:th.data.StaffId,
  827 + shareStorageId:th.data.StorageId,
  828 + shareTime:ut.gettimestamp(),
  829 + storeId:os.stoid
  830 + }
  831 + //插入数据
  832 + getApp().request.post(url,{
  833 + data:req_data,
  834 + success:function(){
  835 +
  836 + }
  837 + })
  838 +
806 839 }
807 840  
808 841  
... ...
packageA/pages/goods_share/goods_share.wxml
1 1 <wxs module="g_filter" src="g_filter.wxs"></wxs>
  2 +<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
2 3 <view class="container">
3 4 <!-- 搜索框 -->
4 5 <view class="search-container">
... ... @@ -59,7 +60,7 @@
59 60 <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
60 61 <text class="card_name">{{card_name}}</text>
61 62 </view>
62   - <view class="fs28">¥{{filter.toFix(item[card_field],2)}}</view>
  63 + <view class="fs28">¥{{filters.toFix(item[card_field],2)}}</view>
63 64  
64 65 </block>
65 66 <!-- 当会员不是等级卡的时候,且卡有钱的时候 -->
... ...
packageA/pages/jfbuy/jfbuy.js
... ... @@ -34,6 +34,7 @@ Page({
34 34 is_no_more:0, //没有更多数据
35 35 key_str:'',
36 36 pattern:0, //分成的方式
  37 + pageSize:10,
37 38 currentPage:1, //当前的页码
38 39  
39 40 // canvasHidden: 1, //-- 隐藏画布 --
... ... @@ -56,17 +57,25 @@ Page({
56 57  
57 58 triggered: false,
58 59 isPullDownRefresh: false,
  60 +
  61 +
59 62 },
60 63  
61 64 /**
62 65 * 生命周期函数--监听页面加载
63 66 */
64 67 onLoad: function (options) {
65   - this.request_list({
  68 + var th=this;
  69 + this.data.requestData={
66 70 store_id:oo.stoid,
67 71 stype:1,
68   - stypeup:1
69   - });
  72 + stypeup:1,
  73 + page:th.data.currentPage2,
  74 + pageSize:th.data.pageSize
  75 + };
  76 +
  77 +
  78 + this.request_list(this.data.requestData);
70 79 // var th=this;
71 80 // //接受有没有导购的参数
72 81 // var first_leader=options.first_leader;
... ... @@ -216,18 +225,25 @@ Page({
216 225 //-- 点击tab --
217 226 clickTab(e) {
218 227 var th=this;
219   - var data = {
220   - store_id:oo.stoid,
221   - stype:e.target.dataset.index,
222   - stypeup:1,
223   - };
  228 + var psize=th.data.curr
  229 +
224 230 this.setData({
225 231 is_no_data2:0,
226 232 is_no_more2:0,
227 233 list2:[],
228 234 is_load2: 0,
229 235 currentPage2:1,
  236 + pageSize:psize
230 237 });
  238 + var data = {
  239 + store_id:oo.stoid,
  240 + stype:e.target.dataset.index,
  241 + stypeup:1,
  242 + page:th.data.currentPage2,
  243 + pageSize:psize
  244 + };
  245 +
  246 +
231 247 if(this.data.currentIndex!=e.target.dataset.index){
232 248 this.setData({
233 249 currentIndex: e.target.dataset.index,
... ... @@ -269,6 +285,8 @@ Page({
269 285 // 开启加载状态
270 286 this.data.is_load2=1;
271 287  
  288 +
  289 +
272 290 // var req_data = {
273 291 // page:th.data.currentPage2
274 292 // }
... ... @@ -307,7 +325,18 @@ Page({
307 325 })
308 326 },
309 327  
  328 + //-- 滚动到底部 --
  329 + request_list_lower:function(){
  330 + var data=this.data.requestData;
  331 + data.page=this.data.currentPage2;
  332 + this.setData({
  333 + requestData: data
  334 + })
  335 + this.request_list(data);
  336 +
  337 + },
310 338  
  339 +
311 340  
312 341  
313 342 //---图片失败,默认图片---
... ...
packageA/pages/jfbuy/jfbuy.wxml
... ... @@ -27,7 +27,7 @@
27 27 <scroll-view
28 28 class="list"
29 29 scroll-y="true"
30   - bindscrolltolower="request_list"
  30 + bindscrolltolower="request_list_lower"
31 31 scroll-anchoring
32 32 refresher-enabled
33 33 refresher-triggered="{{triggered}}"
... ...
packageA/pages/live_share/live_share.js
... ... @@ -28,10 +28,14 @@ Page({
28 28 var th=this;
29 29 //接受有没有导购的参数
30 30 var first_leader=options.first_leader;
  31 + var StaffId=options.StaffId;
  32 + var StorageId=options.StorageId;
31 33 if(first_leader){
32 34 //-- user_id代过来免登陆 --
33   - getApp().globalData.user_id=first_leader;
  35 + getApp().globalData.user_id=first_leader;
34 36 getApp().getUserFir();
  37 + //设置分享会员和导购id和归属门店ID
  38 + this.setData({first_leader:first_leader,StaffId:StaffId,StorageId:StorageId});
35 39 }
36 40 this.requestGoodsList();
37 41  
... ... @@ -81,7 +85,9 @@ Page({
81 85 path:url,
82 86 imageUrl: img,
83 87 };
84   - th.setData({share_hidden:1});
  88 + th.setData({share_hidden:1});
  89 + th.insert_live_share(title,id);
  90 +
85 91 return ob;
86 92 },
87 93  
... ... @@ -187,8 +193,31 @@ Page({
187 193 var item=this.data.list[index];
188 194 var url='/packageA/pages/liveStreamDetails/liveStreamDetails?id=' + item.id + '&live=ing';
189 195 getApp().goto(url);
  196 + },
  197 +
  198 + //-- 推送活动分享 --
  199 + insert_live_share:function(title,actid){
  200 + var th = this;
  201 + var url="/api/weshop/sharetypeList/save";
  202 + var req_data={
  203 + shareActId:actid,
  204 + shareActName:title,
  205 + shareType:4,
  206 + shareUserId:th.data.first_leader,
  207 + shareStaffId:th.data.StaffId,
  208 + shareStorageId:th.data.StorageId,
  209 + shareTime:ut.gettimestamp(),
  210 + storeId:os.stoid
  211 + }
  212 + //插入数据
  213 + getApp().request.post(url,{
  214 + data:req_data,
  215 + success:function(){}
  216 + })
  217 +
190 218 }
191 219  
192 220  
193 221  
  222 +
194 223 })
195 224 \ No newline at end of file
... ...
packageA/pages/quan/quan.js
... ... @@ -26,10 +26,14 @@ Page({
26 26 var th=this;
27 27 //接受有没有导购的参数
28 28 var first_leader=options.first_leader;
  29 + var StaffId=options.StaffId;
  30 + var StorageId=options.StorageId;
29 31 if(first_leader){
30 32 //-- user_id代过来免登陆 --
31 33 getApp().globalData.user_id=first_leader;
32 34 getApp().getUserFir();
  35 + //设置分享会员和导购id和归属门店ID
  36 + this.setData({first_leader:first_leader,StaffId:StaffId,StorageId:StorageId});
33 37 }
34 38 this.requestGoodsList();
35 39 this.setData({getcurday:ut.gettimestamp()});
... ... @@ -81,7 +85,9 @@ Page({
81 85 title:title,
82 86 path:url,
83 87 };
84   - th.setData({share_hidden:1});
  88 + th.setData({share_hidden:1});
  89 + th.insert_quan_share(title,th.data.hui_active.id);
  90 +
85 91 return ob;
86 92 },
87 93  
... ... @@ -169,6 +175,28 @@ Page({
169 175 var item=this.data.list[index];
170 176 var url="/packageA/pages/quan_pro/quan_pro?id="+item.id;
171 177 getApp().goto(url);
  178 + },
  179 +
  180 + //-- 推送活动分享 --
  181 + insert_quan_share:function(title,actid){
  182 + var th = this;
  183 + var url="/api/weshop/sharetypeList/save";
  184 + var req_data={
  185 + shareActId:actid,
  186 + shareActName:title,
  187 + shareType:1,
  188 + shareUserId:th.data.first_leader,
  189 + shareStaffId:th.data.StaffId,
  190 + shareStorageId:th.data.StorageId,
  191 + shareTime:ut.gettimestamp(),
  192 + storeId:os.stoid
  193 + }
  194 + //插入数据
  195 + getApp().request.post(url,{
  196 + data:req_data,
  197 + success:function(){}
  198 + })
  199 +
172 200 }
173 201  
174 202  
... ...
pages/index/index/index.wxss
... ... @@ -924,4 +924,5 @@
924 924 page {
925 925 overflow-x: hidden;
926 926 padding-bottom: 120rpx;
927   -}
928 927 \ No newline at end of file
  928 +}
  929 +.container{ overflow: hidden;}
929 930 \ No newline at end of file
... ...
pages/template/index.wxss
... ... @@ -908,4 +908,5 @@
908 908 .swiper{
909 909 height: 250rpx;
910 910 padding-bottom:30rpx;
911   -}
912 911 \ No newline at end of file
  912 +}
  913 +.container{ overflow: hidden;}
913 914 \ No newline at end of file
... ...
pages/user/my_service/appment_main.js
... ... @@ -368,11 +368,12 @@ Page({
368 368 is_textea: 0
369 369 })
370 370 var itemId = th.data.itemId; //服务id
371   - var url = "/api/weshop/marketing/reservation/storage/page";
  371 + var url = "/api/weshop/marketing/reservation/storage/pagenew";
372 372 var key_word = th.data.key_word;
373 373 key_word = key_word.replace(/\s+/g, "");
374 374 getApp().request.promiseGet(url, {
375 375 data: {
  376 + userId:getApp().globalData.user_id,
376 377 storeId: a.stoid,
377 378 serviceId: itemId,
378 379 latitude: th.data.lat,
... ... @@ -422,8 +423,9 @@ Page({
422 423 })
423 424 var itemid = th.data.itemId; //正式使用的项目id
424 425 var storageId = th.data.storageId; //正式使用的线下门店id
425   - var url = "/api/weshop/marketing/reservation/staff/page"; //接口地址
426   - getApp().request.promiseGet(url, {
  426 + var url = "/api/weshop/marketing/reservation/staff/pagenew"; //接口地址
  427 +
  428 + getApp().request.promiseGet(url, {
427 429 data: {
428 430 storeId: a.stoid,
429 431 userId: d.user_id,
... ... @@ -434,9 +436,9 @@ Page({
434 436 wx.hideLoading();
435 437 if (res.data.code == 0) {
436 438 th.setData({
437   - beautician_list: res.data.data.pageData
  439 + beautician_list: res.data.data
438 440 })
439   - if (res.data.data.pageData.length < 1) {
  441 + if (res.data.data.length < 1) {
440 442 getApp().my_warnning("暂无美容师", 0, th);
441 443 th.settime();
442 444 } else {
... ... @@ -461,7 +463,9 @@ Page({
461 463 var th = this;
462 464 var bea_index = e.currentTarget.dataset.baaindex;
463 465 var bea_name = th.data.beautician_list[bea_index].StaffName;
464   - var BeauticianID = th.data.beautician_list[bea_index].Id;
  466 + var BeauticianID = th.data.beautician_list[bea_index].staffid;
  467 + var StorageId=th.data.beautician_list[bea_index].StorageId
  468 +
465 469 th.setData({
466 470 beautician_name: bea_name,
467 471 beautician: 0,
... ... @@ -469,7 +473,8 @@ Page({
469 473 beauticianID: BeauticianID,
470 474 time: "",
471 475 tment_count: "",
472   - is_textea: 1
  476 + is_textea: 1,
  477 + StorageId:StorageId
473 478 })
474 479  
475 480 },
... ... @@ -559,7 +564,7 @@ Page({
559 564 //查询剩下可预约人数
560 565 query_more: function() {
561 566 var th = this;
562   - var url = "/api/weshop/marketing/reservation/can/reservation/count";
  567 + var url = "/api/weshop/marketing/reservation/can/reservation/countnew";
563 568 var beauticianID = th.data.beauticianID; //美容师id
564 569 var projectID = th.data.itemId; //服务id
565 570 var seekTime = th.data.time; //预约日期
... ...
pages/user/my_service/appment_main.wxml
... ... @@ -55,7 +55,7 @@
55 55 </view>
56 56  
57 57 <!-- 选择时间 -->
58   - <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta?url+{{url}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto">
  58 + <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto">
59 59 <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view>
60 60 <view class="angle angler">∟</view>
61 61 </view>
... ...
pages/user/my_service/beauty_deta.js
... ... @@ -19,7 +19,7 @@ Page({
19 19 comment: "", //美容师评价
20 20 aweeks: [], //七天的预约时间
21 21 head_img: "", //美容师头像
22   - 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"],
  22 + time:['08:00','08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00','14:30', '15:00', '15:30', '16:00', '16:30', '17:00','17:30', '18:00','18:30', '19:00', '19:30', '20:00', '20:30', '21:00', '21:30', '22:00','22:30'],
23 23 weeks: [], //星期几数组
24 24 time_index: -1, //选择预约时间下标
25 25 date_id: 0, //选择日期的id
... ... @@ -42,12 +42,16 @@ Page({
42 42 var minutes = myDate.getMinutes(); //获取当前分钟数(0-59)
43 43 var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23)
44 44 var beautician_id = options.BeauticianID;
  45 + var storageId = options.StorageId;
  46 +
  47 +
45 48 th.setData({
46 49 beautician_id: beautician_id,
47 50 itemId: options.itemId,
48 51 modify: options.modify,
49 52 hours: hours,
50   - projectId: options.projectId
  53 + projectId: options.projectId,
  54 + storageId:storageId
51 55 })
52 56 if (options.url != undefined) {
53 57 th.setData({
... ... @@ -69,8 +73,7 @@ Page({
69 73 StaffName: options.StaffName
70 74 })
71 75 }
72   - th.query_beatea();
73   - th.query_aweek();
  76 + th.query_beatea(th.query_aweek);
74 77 },
75 78 /**
76 79 * 生命周期函数--监听页面显示
... ... @@ -112,7 +115,7 @@ Page({
112 115 }
113 116 },
114 117 //获取美容师信息
115   - query_beatea: function() {
  118 + query_beatea: function(func) {
116 119 var th = this;
117 120 var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径
118 121 var beautician_id = th.data.beautician_id;
... ... @@ -124,11 +127,16 @@ Page({
124 127 }).then(res => {
125 128 if (res.data.code == 0) {
126 129 var data = res.data.data;
127   - th.setData({
  130 + var ob={
128 131 name: data.StaffName,
129 132 comment: data.Remark1,
130 133 head_img: data.PhotoUrl
131   - })
  134 + };
  135 + if(!th.data.storageId){
  136 + ob.storageId=data.StorageId;
  137 + }
  138 + th.setData(ob);
  139 + func();
132 140 } else {
133 141 getApp().my_warnning(res.data.msg, 0, th);
134 142 }
... ... @@ -226,15 +234,18 @@ Page({
226 234 query_aweek: function() {
227 235 var th = this;
228 236 var beautician_id = th.data.beautician_id; //美容师id
  237 + var storageId=th.data.storageId;
  238 +
229 239 var itemId = th.data.itemId; //服务id
230 240 var projectId = th.data.projectId; //项目id
231   - var url = "/api/weshop/marketing/reservation/staff/seven/time/list"; //接口地址
  241 + var url = "/api/weshop/marketing/reservation/staff/seven/time/listnew"; //接口地址
232 242 getApp().request.promiseGet(url, {
233 243 data: {
234 244 projectId: projectId,
235 245 beauticianId: beautician_id,
236 246 serviceId: itemId,
237 247 storeId: a.stoid,
  248 + storageId:storageId
238 249 }
239 250 }).then(res => {
240 251 if (res.data.code == 0) {
... ... @@ -281,11 +292,12 @@ Page({
281 292 var SeekTime = th.data.aweeks[date_id].time;
282 293 var val = th.data.aweeks[date_id].val;
283 294  
284   - var url = "/api/weshop/marketing/reservation/staff/time/list";
  295 + var url = "/api/weshop/marketing/reservation/staff/time/listnew";
285 296 getApp().request.promiseGet(url, {
286 297 data: {
287 298 projectId: projectId,
288   - beauticianId: th.data.beautician_id,
  299 + staffId: th.data.beautician_id,
  300 + storageId:th.data.storageId,
289 301 serviceId: th.data.itemId,
290 302 seekTime: SeekTime,
291 303 storeId: a.stoid,
... ... @@ -301,8 +313,8 @@ Page({
301 313  
302 314 //不等于空就是有可以预约的时间
303 315 if (time_list != null) {
304   - if (res.data.data[0].GroupHour != undefined) {
305   - if (res.data.data[0].GroupHour.length > 11) {
  316 + if (res.data.data && res.data.data[0]!= undefined) {
  317 + if (res.data.data[0].GroupHour && res.data.data[0].GroupHour.length > 11) {
306 318 getApp().my_warnning(res.data.data[0].GroupHour, 0, th);
307 319 }
308 320 }
... ... @@ -310,17 +322,15 @@ Page({
310 322 for (var i = 0; i < time.length; i++) {
311 323 for (var ii = 0; ii < time_list.length; ii++) {
312 324 //判断固定的时间和可以预约的时间
313   - if (time[i] == time_list[ii].GroupHour.substring(0, 5)) {
  325 + if (time[i] == time_list[ii].begintime.substring(0, 5)) {
314 326 var date_id = th.data.date_id;
315   - if (date > time_list[ii].GroupHour.substring(0, 2) && date_id == 0) {
  327 + if (date > time_list[ii].begintime.substring(0, 2) && date_id == 0) {
316 328 new_time[i] = "";
317 329 break;
318   - } else {
319   - new_time[i] = time_list[ii].GroupHour.substring(0, 5);
  330 + }else{
  331 + new_time[i] = time_list[ii].begintime.substring(0, 5);
320 332 break;
321 333 }
322   -
323   -
324 334 } else {
325 335 new_time[i] = "";
326 336 }
... ... @@ -393,7 +403,17 @@ Page({
393 403 return 1;
394 404 }
395 405 return 0;
396   - }
  406 + },
  407 +
  408 + check_is_in_arr:function(val,pdata) {
  409 + if(!val || !pdata) return false;
  410 + for(var i in pdata){
  411 + if(pdata[i].begintime.indexOf(val)!=-1){
  412 + return true;
  413 + }
  414 + }
  415 + return false;
  416 + }
397 417  
398 418  
399 419  
... ...
pages/user/my_service/cosmetology_list.js
... ... @@ -32,7 +32,7 @@ Page({
32 32 },
33 33 query_cology: function() {
34 34 var th = this;
35   - var url = "/api/weshop/marketing/reservation/staff/page";
  35 + var url = "/api/weshop/marketing/reservation/staff/pagenew";
36 36 var itemId = th.data.itemId; //服务id
37 37 var storageId = th.data.storageId;
38 38 getApp().request.promiseGet(url, {
... ... @@ -49,20 +49,20 @@ Page({
49 49 if (res.data.code == 0) {
50 50 th.data.curpage++;
51 51 var arr1 = th.data.cosmetology_list;
52   - var arr2 = res.data.data.pageData;
  52 + var arr2 = res.data.data;
53 53 var arr3 = [...arr1, ...arr2];
54   - var ismore = 0;
55   - if (arr3.length == res.data.data.total) ismore = 1
  54 +
  55 +
56 56 th.setData({
57 57 cosmetology_list: arr3,
58   - total: res.data.data.total,
59   - ismore: ismore,
  58 + total: res.data.data.total,
60 59 is_service_read: 1,
61 60 is_cosmetology_read:1
62 61 }), wx.stopPullDownRefresh(); //停止下拉刷新
63 62 } else {
64 63 th.setData({
65   - is_cosmetology_read:1
  64 + is_cosmetology_read:1,
  65 + ismore:1
66 66 })
67 67 }
68 68 })
... ... @@ -95,6 +95,13 @@ Page({
95 95 */
96 96 onShow: function() {
97 97 var th = this;
  98 + th.data.curpage++;
  99 + th.setData({
  100 + cosmetology_list: [],
  101 + total: 0,
  102 + is_service_read: 0,
  103 + is_cosmetology_read:0
  104 + })
98 105 th.query_cology();
99 106 },
100 107  
... ...
pages/user/my_service/cosmetology_list.wxml
... ... @@ -8,7 +8,7 @@
8 8 <!-- 个人属性 -->
9 9 <view class="flex-vertical-between">
10 10 <view class="flex-vertical">
11   - <image class="portrait" src="{{item.PhotoUrl==''?iurl+defimgurl:item.PhotoUrl}}" lazy-load="true" data-errorimg="cosmetology_list[{{index}}].PhotoUrl" binderror="bind_bnerr1" data-img="cosmetology_list[{{index}}].PhotoUrl"></image>
  11 + <image class="portrait" src="{{(!item.PhotoUrl || item.PhotoUrl=='')?iurl+defimgurl:item.PhotoUrl}}" lazy-load="true" data-errorimg="cosmetology_list[{{index}}].PhotoUrl" binderror="bind_bnerr1" data-img="cosmetology_list[{{index}}].PhotoUrl"></image>
12 12 <view>
13 13 <!-- 用户名 -->
14 14 <view class="UserName ellipsis-1 fs32">{{item.StaffName}}</view>
... ... @@ -27,7 +27,7 @@
27 27 </view>
28 28  
29 29 <!-- 预约状态 -->
30   - <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.Id}}&itemId={{itemId}}&iscos=1&modify=0&projectId={{projectId}}&StaffName={{item.StaffName}}">
  30 + <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta?StorageId={{item.StorageId}}&BeauticianID={{item.staffid}}&itemId={{itemId}}&iscos=1&modify=0&projectId={{projectId}}&StaffName={{item.StaffName}}">
31 31 <view class="fs24">预约</view>
32 32 </navigator>
33 33 </view>
... ...