Merged
Merge Request #575 · created by 后端研发-苏明海


Dev


From dev into test

Merged by 后端研发-苏明海

1 participants





components/diy_searchbox/diy_searchbox.wxml
@@ -34,14 +34,14 @@ @@ -34,14 +34,14 @@
34 </view> 34 </view>
35 35
36 <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'> 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 </navigator> 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 </navigator> 45 </navigator>
46 </view> 46 </view>
47 47
components/diy_searchbox/diy_searchbox.wxss
@@ -85,4 +85,26 @@ @@ -85,4 +85,26 @@
85 .flex{ display: flex; align-items: center;} 85 .flex{ display: flex; align-items: center;}
86 .find_img{margin: 0 20rpx; } 86 .find_img{margin: 0 20rpx; }
87 .find_inp{text-align: left; width: 620rpx;} 87 .find_inp{text-align: left; width: 620rpx;}
88 -.find_inp2{text-align: left; width: 520rpx;}  
89 \ No newline at end of file 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,10 +56,15 @@ Page({
56 var th=this; 56 var th=this;
57 //接受有没有导购的参数 57 //接受有没有导购的参数
58 var first_leader=options.first_leader; 58 var first_leader=options.first_leader;
  59 + var StaffId=options.StaffId;
  60 + var StorageId=options.StorageId;
59 if(first_leader){ 61 if(first_leader){
60 //-- user_id代过来免登陆 -- 62 //-- user_id代过来免登陆 --
61 getApp().globalData.user_id=first_leader; 63 getApp().globalData.user_id=first_leader;
62 getApp().getUserFir(); 64 getApp().getUserFir();
  65 +
  66 + //设置分享会员和导购id和归属门店ID
  67 + this.setData({first_leader:first_leader,StaffId:StaffId,StorageId:StorageId});
63 } 68 }
64 69
65 this.requestGoodsList(); 70 this.requestGoodsList();
@@ -85,10 +90,9 @@ Page({ @@ -85,10 +90,9 @@ Page({
85 }, 90 },
86 fail: function(res) {} 91 fail: function(res) {}
87 }); 92 });
88 - }  
89 - 93 + }
90 th.setData({poster:json_data}) 94 th.setData({poster:json_data})
91 - 95 +
92 } 96 }
93 } 97 }
94 }) 98 })
@@ -154,45 +158,56 @@ Page({ @@ -154,45 +158,56 @@ Page({
154 path:url, 158 path:url,
155 imageUrl: img, 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 }else{ 164 }else{
161 //---秒杀,拼团,促销--- 165 //---秒杀,拼团,促销---
162 var item=this.data.share_good; 166 var item=this.data.share_good;
163 if(item){ 167 if(item){
164 var price = item.price; 168 var price = item.price;
165 if(!price) price=item.shop_price; 169 if(!price) price=item.shop_price;
166 -  
167 - 170 +
168 var title= item.goods_name; 171 var title= item.goods_name;
169 var img=this.data.url+item.original_img; 172 var img=this.data.url+item.original_img;
170 var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id; 173 var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
171 if(getApp().globalData.user_id){ 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 var ob={ 177 var ob={
175 title: price + "元 " +title, 178 title: price + "元 " +title,
176 path:url, 179 path:url,
177 imageUrl: img, 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 return ob; 192 return ob;
181 }else{ 193 }else{
182 var url="/pages/index/index/index"; 194 var url="/pages/index/index/index";
183 if(getApp().globalData.user_id){ 195 if(getApp().globalData.user_id){
184 url+="?first_leader="+getApp().globalData.user_id; 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 if(!title) title=hui_active.main_goods_name; 202 if(!title) title=hui_active.main_goods_name;
189 if(!title) title=hui_active.giftTitle; 203 if(!title) title=hui_active.giftTitle;
190 204
191 var ob={ 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 return ob; 211 return ob;
197 } 212 }
198 } 213 }
@@ -506,6 +521,13 @@ Page({ @@ -506,6 +521,13 @@ Page({
506 if(user_id>0){ 521 if(user_id>0){
507 scene+="_"+user_id; 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 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + 533 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
@@ -1086,7 +1108,29 @@ Page({ @@ -1086,7 +1108,29 @@ Page({
1086 var lbid=item.lbId; 1108 var lbid=item.lbId;
1087 var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; 1109 var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
1088 getApp().goto(url); 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 \ No newline at end of file 1137 \ No newline at end of file
packageA/pages/goods_share/goods_share.js
@@ -33,10 +33,15 @@ Page({ @@ -33,10 +33,15 @@ Page({
33 var th=this; 33 var th=this;
34 //接受有没有导购的参数 34 //接受有没有导购的参数
35 var first_leader=options.first_leader; 35 var first_leader=options.first_leader;
  36 + var StaffId=options.StaffId;
  37 + var StorageId=options.StorageId;
36 if(first_leader){ 38 if(first_leader){
37 //-- user_id代过来免登陆 -- 39 //-- user_id代过来免登陆 --
38 getApp().globalData.user_id=first_leader; 40 getApp().globalData.user_id=first_leader;
39 getApp().getUserFir(); 41 getApp().getUserFir();
  42 +
  43 + //设置分享会员和导购id和归属门店ID
  44 + this.setData({first_leader:first_leader,StaffId:StaffId,StorageId:StorageId});
40 } 45 }
41 this.requestGoodsList(); 46 this.requestGoodsList();
42 47
@@ -150,6 +155,7 @@ Page({ @@ -150,6 +155,7 @@ Page({
150 imageUrl: img, 155 imageUrl: img,
151 }; 156 };
152 th.setData({share_hidden:1}); 157 th.setData({share_hidden:1});
  158 + th.insert_goods_share();
153 return ob; 159 return ob;
154 160
155 }, 161 },
@@ -326,6 +332,9 @@ Page({ @@ -326,6 +332,9 @@ Page({
326 that.setData({ 332 that.setData({
327 canvasHidden: false,share_hidden:1 333 canvasHidden: false,share_hidden:1
328 }) 334 })
  335 +
  336 + //点击分享
  337 + this.insert_goods_share();
329 338
330 var app = getApp(); 339 var app = getApp();
331 var unit = that.data.screenWidth / 750 * 1.35; //基础单位, 340 var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
@@ -350,10 +359,10 @@ Page({ @@ -350,10 +359,10 @@ Page({
350 //先画背景 359 //先画背景
351 var pg_path = "../../../images/share/share_bg.png"; 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 pg_path=th.data.share_b_img; 364 pg_path=th.data.share_b_img;
356 - } 365 + }
357 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 366 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
358 367
359 //-- 是自定义海报的情况下 -- 368 //-- 是自定义海报的情况下 --
@@ -803,6 +812,30 @@ Page({ @@ -803,6 +812,30 @@ Page({
803 var item=this.data.list[index]; 812 var item=this.data.list[index];
804 var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id; 813 var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
805 getApp().goto(url); 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 <wxs module="g_filter" src="g_filter.wxs"></wxs> 1 <wxs module="g_filter" src="g_filter.wxs"></wxs>
  2 +<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
2 <view class="container"> 3 <view class="container">
3 <!-- 搜索框 --> 4 <!-- 搜索框 -->
4 <view class="search-container"> 5 <view class="search-container">
@@ -59,7 +60,7 @@ @@ -59,7 +60,7 @@
59 <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> 60 <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
60 <text class="card_name">{{card_name}}</text> 61 <text class="card_name">{{card_name}}</text>
61 </view> 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 </block> 65 </block>
65 <!-- 当会员不是等级卡的时候,且卡有钱的时候 --> 66 <!-- 当会员不是等级卡的时候,且卡有钱的时候 -->
packageA/pages/jfbuy/jfbuy.js
@@ -34,6 +34,7 @@ Page({ @@ -34,6 +34,7 @@ Page({
34 is_no_more:0, //没有更多数据 34 is_no_more:0, //没有更多数据
35 key_str:'', 35 key_str:'',
36 pattern:0, //分成的方式 36 pattern:0, //分成的方式
  37 + pageSize:10,
37 currentPage:1, //当前的页码 38 currentPage:1, //当前的页码
38 39
39 // canvasHidden: 1, //-- 隐藏画布 -- 40 // canvasHidden: 1, //-- 隐藏画布 --
@@ -56,17 +57,25 @@ Page({ @@ -56,17 +57,25 @@ Page({
56 57
57 triggered: false, 58 triggered: false,
58 isPullDownRefresh: false, 59 isPullDownRefresh: false,
  60 +
  61 +
59 }, 62 },
60 63
61 /** 64 /**
62 * 生命周期函数--监听页面加载 65 * 生命周期函数--监听页面加载
63 */ 66 */
64 onLoad: function (options) { 67 onLoad: function (options) {
65 - this.request_list({ 68 + var th=this;
  69 + this.data.requestData={
66 store_id:oo.stoid, 70 store_id:oo.stoid,
67 stype:1, 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 // var th=this; 79 // var th=this;
71 // //接受有没有导购的参数 80 // //接受有没有导购的参数
72 // var first_leader=options.first_leader; 81 // var first_leader=options.first_leader;
@@ -216,18 +225,25 @@ Page({ @@ -216,18 +225,25 @@ Page({
216 //-- 点击tab -- 225 //-- 点击tab --
217 clickTab(e) { 226 clickTab(e) {
218 var th=this; 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 this.setData({ 230 this.setData({
225 is_no_data2:0, 231 is_no_data2:0,
226 is_no_more2:0, 232 is_no_more2:0,
227 list2:[], 233 list2:[],
228 is_load2: 0, 234 is_load2: 0,
229 currentPage2:1, 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 if(this.data.currentIndex!=e.target.dataset.index){ 247 if(this.data.currentIndex!=e.target.dataset.index){
232 this.setData({ 248 this.setData({
233 currentIndex: e.target.dataset.index, 249 currentIndex: e.target.dataset.index,
@@ -269,6 +285,8 @@ Page({ @@ -269,6 +285,8 @@ Page({
269 // 开启加载状态 285 // 开启加载状态
270 this.data.is_load2=1; 286 this.data.is_load2=1;
271 287
  288 +
  289 +
272 // var req_data = { 290 // var req_data = {
273 // page:th.data.currentPage2 291 // page:th.data.currentPage2
274 // } 292 // }
@@ -307,7 +325,18 @@ Page({ @@ -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,7 +27,7 @@
27 <scroll-view 27 <scroll-view
28 class="list" 28 class="list"
29 scroll-y="true" 29 scroll-y="true"
30 - bindscrolltolower="request_list" 30 + bindscrolltolower="request_list_lower"
31 scroll-anchoring 31 scroll-anchoring
32 refresher-enabled 32 refresher-enabled
33 refresher-triggered="{{triggered}}" 33 refresher-triggered="{{triggered}}"
packageA/pages/live_share/live_share.js
@@ -28,10 +28,14 @@ Page({ @@ -28,10 +28,14 @@ Page({
28 var th=this; 28 var th=this;
29 //接受有没有导购的参数 29 //接受有没有导购的参数
30 var first_leader=options.first_leader; 30 var first_leader=options.first_leader;
  31 + var StaffId=options.StaffId;
  32 + var StorageId=options.StorageId;
31 if(first_leader){ 33 if(first_leader){
32 //-- user_id代过来免登陆 -- 34 //-- user_id代过来免登陆 --
33 - getApp().globalData.user_id=first_leader; 35 + getApp().globalData.user_id=first_leader;
34 getApp().getUserFir(); 36 getApp().getUserFir();
  37 + //设置分享会员和导购id和归属门店ID
  38 + this.setData({first_leader:first_leader,StaffId:StaffId,StorageId:StorageId});
35 } 39 }
36 this.requestGoodsList(); 40 this.requestGoodsList();
37 41
@@ -81,7 +85,9 @@ Page({ @@ -81,7 +85,9 @@ Page({
81 path:url, 85 path:url,
82 imageUrl: img, 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 return ob; 91 return ob;
86 }, 92 },
87 93
@@ -187,8 +193,31 @@ Page({ @@ -187,8 +193,31 @@ Page({
187 var item=this.data.list[index]; 193 var item=this.data.list[index];
188 var url='/packageA/pages/liveStreamDetails/liveStreamDetails?id=' + item.id + '&live=ing'; 194 var url='/packageA/pages/liveStreamDetails/liveStreamDetails?id=' + item.id + '&live=ing';
189 getApp().goto(url); 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 \ No newline at end of file 224 \ No newline at end of file
packageA/pages/quan/quan.js
@@ -26,10 +26,14 @@ Page({ @@ -26,10 +26,14 @@ Page({
26 var th=this; 26 var th=this;
27 //接受有没有导购的参数 27 //接受有没有导购的参数
28 var first_leader=options.first_leader; 28 var first_leader=options.first_leader;
  29 + var StaffId=options.StaffId;
  30 + var StorageId=options.StorageId;
29 if(first_leader){ 31 if(first_leader){
30 //-- user_id代过来免登陆 -- 32 //-- user_id代过来免登陆 --
31 getApp().globalData.user_id=first_leader; 33 getApp().globalData.user_id=first_leader;
32 getApp().getUserFir(); 34 getApp().getUserFir();
  35 + //设置分享会员和导购id和归属门店ID
  36 + this.setData({first_leader:first_leader,StaffId:StaffId,StorageId:StorageId});
33 } 37 }
34 this.requestGoodsList(); 38 this.requestGoodsList();
35 this.setData({getcurday:ut.gettimestamp()}); 39 this.setData({getcurday:ut.gettimestamp()});
@@ -81,7 +85,9 @@ Page({ @@ -81,7 +85,9 @@ Page({
81 title:title, 85 title:title,
82 path:url, 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 return ob; 91 return ob;
86 }, 92 },
87 93
@@ -169,6 +175,28 @@ Page({ @@ -169,6 +175,28 @@ Page({
169 var item=this.data.list[index]; 175 var item=this.data.list[index];
170 var url="/packageA/pages/quan_pro/quan_pro?id="+item.id; 176 var url="/packageA/pages/quan_pro/quan_pro?id="+item.id;
171 getApp().goto(url); 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,4 +924,5 @@
924 page { 924 page {
925 overflow-x: hidden; 925 overflow-x: hidden;
926 padding-bottom: 120rpx; 926 padding-bottom: 120rpx;
927 -}  
928 \ No newline at end of file 927 \ No newline at end of file
  928 +}
  929 +.container{ overflow: hidden;}
929 \ No newline at end of file 930 \ No newline at end of file
pages/template/index.wxss
@@ -908,4 +908,5 @@ @@ -908,4 +908,5 @@
908 .swiper{ 908 .swiper{
909 height: 250rpx; 909 height: 250rpx;
910 padding-bottom:30rpx; 910 padding-bottom:30rpx;
911 -}  
912 \ No newline at end of file 911 \ No newline at end of file
  912 +}
  913 +.container{ overflow: hidden;}
913 \ No newline at end of file 914 \ No newline at end of file
pages/user/my_service/appment_main.js
@@ -368,11 +368,12 @@ Page({ @@ -368,11 +368,12 @@ Page({
368 is_textea: 0 368 is_textea: 0
369 }) 369 })
370 var itemId = th.data.itemId; //服务id 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 var key_word = th.data.key_word; 372 var key_word = th.data.key_word;
373 key_word = key_word.replace(/\s+/g, ""); 373 key_word = key_word.replace(/\s+/g, "");
374 getApp().request.promiseGet(url, { 374 getApp().request.promiseGet(url, {
375 data: { 375 data: {
  376 + userId:getApp().globalData.user_id,
376 storeId: a.stoid, 377 storeId: a.stoid,
377 serviceId: itemId, 378 serviceId: itemId,
378 latitude: th.data.lat, 379 latitude: th.data.lat,
@@ -422,8 +423,9 @@ Page({ @@ -422,8 +423,9 @@ Page({
422 }) 423 })
423 var itemid = th.data.itemId; //正式使用的项目id 424 var itemid = th.data.itemId; //正式使用的项目id
424 var storageId = th.data.storageId; //正式使用的线下门店id 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 data: { 429 data: {
428 storeId: a.stoid, 430 storeId: a.stoid,
429 userId: d.user_id, 431 userId: d.user_id,
@@ -434,9 +436,9 @@ Page({ @@ -434,9 +436,9 @@ Page({
434 wx.hideLoading(); 436 wx.hideLoading();
435 if (res.data.code == 0) { 437 if (res.data.code == 0) {
436 th.setData({ 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 getApp().my_warnning("暂无美容师", 0, th); 442 getApp().my_warnning("暂无美容师", 0, th);
441 th.settime(); 443 th.settime();
442 } else { 444 } else {
@@ -461,7 +463,9 @@ Page({ @@ -461,7 +463,9 @@ Page({
461 var th = this; 463 var th = this;
462 var bea_index = e.currentTarget.dataset.baaindex; 464 var bea_index = e.currentTarget.dataset.baaindex;
463 var bea_name = th.data.beautician_list[bea_index].StaffName; 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 th.setData({ 469 th.setData({
466 beautician_name: bea_name, 470 beautician_name: bea_name,
467 beautician: 0, 471 beautician: 0,
@@ -469,7 +473,8 @@ Page({ @@ -469,7 +473,8 @@ Page({
469 beauticianID: BeauticianID, 473 beauticianID: BeauticianID,
470 time: "", 474 time: "",
471 tment_count: "", 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,7 +564,7 @@ Page({
559 //查询剩下可预约人数 564 //查询剩下可预约人数
560 query_more: function() { 565 query_more: function() {
561 var th = this; 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 var beauticianID = th.data.beauticianID; //美容师id 568 var beauticianID = th.data.beauticianID; //美容师id
564 var projectID = th.data.itemId; //服务id 569 var projectID = th.data.itemId; //服务id
565 var seekTime = th.data.time; //预约日期 570 var seekTime = th.data.time; //预约日期
pages/user/my_service/appment_main.wxml
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 </view> 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 <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view> 59 <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view>
60 <view class="angle angler">∟</view> 60 <view class="angle angler">∟</view>
61 </view> 61 </view>
pages/user/my_service/beauty_deta.js
@@ -19,7 +19,7 @@ Page({ @@ -19,7 +19,7 @@ Page({
19 comment: "", //美容师评价 19 comment: "", //美容师评价
20 aweeks: [], //七天的预约时间 20 aweeks: [], //七天的预约时间
21 head_img: "", //美容师头像 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 weeks: [], //星期几数组 23 weeks: [], //星期几数组
24 time_index: -1, //选择预约时间下标 24 time_index: -1, //选择预约时间下标
25 date_id: 0, //选择日期的id 25 date_id: 0, //选择日期的id
@@ -42,12 +42,16 @@ Page({ @@ -42,12 +42,16 @@ Page({
42 var minutes = myDate.getMinutes(); //获取当前分钟数(0-59) 42 var minutes = myDate.getMinutes(); //获取当前分钟数(0-59)
43 var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23) 43 var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23)
44 var beautician_id = options.BeauticianID; 44 var beautician_id = options.BeauticianID;
  45 + var storageId = options.StorageId;
  46 +
  47 +
45 th.setData({ 48 th.setData({
46 beautician_id: beautician_id, 49 beautician_id: beautician_id,
47 itemId: options.itemId, 50 itemId: options.itemId,
48 modify: options.modify, 51 modify: options.modify,
49 hours: hours, 52 hours: hours,
50 - projectId: options.projectId 53 + projectId: options.projectId,
  54 + storageId:storageId
51 }) 55 })
52 if (options.url != undefined) { 56 if (options.url != undefined) {
53 th.setData({ 57 th.setData({
@@ -69,8 +73,7 @@ Page({ @@ -69,8 +73,7 @@ Page({
69 StaffName: options.StaffName 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,7 +115,7 @@ Page({
112 } 115 }
113 }, 116 },
114 //获取美容师信息 117 //获取美容师信息
115 - query_beatea: function() { 118 + query_beatea: function(func) {
116 var th = this; 119 var th = this;
117 var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径 120 var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径
118 var beautician_id = th.data.beautician_id; 121 var beautician_id = th.data.beautician_id;
@@ -124,11 +127,16 @@ Page({ @@ -124,11 +127,16 @@ Page({
124 }).then(res => { 127 }).then(res => {
125 if (res.data.code == 0) { 128 if (res.data.code == 0) {
126 var data = res.data.data; 129 var data = res.data.data;
127 - th.setData({ 130 + var ob={
128 name: data.StaffName, 131 name: data.StaffName,
129 comment: data.Remark1, 132 comment: data.Remark1,
130 head_img: data.PhotoUrl 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 } else { 140 } else {
133 getApp().my_warnning(res.data.msg, 0, th); 141 getApp().my_warnning(res.data.msg, 0, th);
134 } 142 }
@@ -226,15 +234,18 @@ Page({ @@ -226,15 +234,18 @@ Page({
226 query_aweek: function() { 234 query_aweek: function() {
227 var th = this; 235 var th = this;
228 var beautician_id = th.data.beautician_id; //美容师id 236 var beautician_id = th.data.beautician_id; //美容师id
  237 + var storageId=th.data.storageId;
  238 +
229 var itemId = th.data.itemId; //服务id 239 var itemId = th.data.itemId; //服务id
230 var projectId = th.data.projectId; //项目id 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 getApp().request.promiseGet(url, { 242 getApp().request.promiseGet(url, {
233 data: { 243 data: {
234 projectId: projectId, 244 projectId: projectId,
235 beauticianId: beautician_id, 245 beauticianId: beautician_id,
236 serviceId: itemId, 246 serviceId: itemId,
237 storeId: a.stoid, 247 storeId: a.stoid,
  248 + storageId:storageId
238 } 249 }
239 }).then(res => { 250 }).then(res => {
240 if (res.data.code == 0) { 251 if (res.data.code == 0) {
@@ -281,11 +292,12 @@ Page({ @@ -281,11 +292,12 @@ Page({
281 var SeekTime = th.data.aweeks[date_id].time; 292 var SeekTime = th.data.aweeks[date_id].time;
282 var val = th.data.aweeks[date_id].val; 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 getApp().request.promiseGet(url, { 296 getApp().request.promiseGet(url, {
286 data: { 297 data: {
287 projectId: projectId, 298 projectId: projectId,
288 - beauticianId: th.data.beautician_id, 299 + staffId: th.data.beautician_id,
  300 + storageId:th.data.storageId,
289 serviceId: th.data.itemId, 301 serviceId: th.data.itemId,
290 seekTime: SeekTime, 302 seekTime: SeekTime,
291 storeId: a.stoid, 303 storeId: a.stoid,
@@ -301,8 +313,8 @@ Page({ @@ -301,8 +313,8 @@ Page({
301 313
302 //不等于空就是有可以预约的时间 314 //不等于空就是有可以预约的时间
303 if (time_list != null) { 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 getApp().my_warnning(res.data.data[0].GroupHour, 0, th); 318 getApp().my_warnning(res.data.data[0].GroupHour, 0, th);
307 } 319 }
308 } 320 }
@@ -310,17 +322,15 @@ Page({ @@ -310,17 +322,15 @@ Page({
310 for (var i = 0; i < time.length; i++) { 322 for (var i = 0; i < time.length; i++) {
311 for (var ii = 0; ii < time_list.length; ii++) { 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 var date_id = th.data.date_id; 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 new_time[i] = ""; 328 new_time[i] = "";
317 break; 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 break; 332 break;
321 } 333 }
322 -  
323 -  
324 } else { 334 } else {
325 new_time[i] = ""; 335 new_time[i] = "";
326 } 336 }
@@ -393,7 +403,17 @@ Page({ @@ -393,7 +403,17 @@ Page({
393 return 1; 403 return 1;
394 } 404 }
395 return 0; 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,7 +32,7 @@ Page({
32 }, 32 },
33 query_cology: function() { 33 query_cology: function() {
34 var th = this; 34 var th = this;
35 - var url = "/api/weshop/marketing/reservation/staff/page"; 35 + var url = "/api/weshop/marketing/reservation/staff/pagenew";
36 var itemId = th.data.itemId; //服务id 36 var itemId = th.data.itemId; //服务id
37 var storageId = th.data.storageId; 37 var storageId = th.data.storageId;
38 getApp().request.promiseGet(url, { 38 getApp().request.promiseGet(url, {
@@ -49,20 +49,20 @@ Page({ @@ -49,20 +49,20 @@ Page({
49 if (res.data.code == 0) { 49 if (res.data.code == 0) {
50 th.data.curpage++; 50 th.data.curpage++;
51 var arr1 = th.data.cosmetology_list; 51 var arr1 = th.data.cosmetology_list;
52 - var arr2 = res.data.data.pageData; 52 + var arr2 = res.data.data;
53 var arr3 = [...arr1, ...arr2]; 53 var arr3 = [...arr1, ...arr2];
54 - var ismore = 0;  
55 - if (arr3.length == res.data.data.total) ismore = 1 54 +
  55 +
56 th.setData({ 56 th.setData({
57 cosmetology_list: arr3, 57 cosmetology_list: arr3,
58 - total: res.data.data.total,  
59 - ismore: ismore, 58 + total: res.data.data.total,
60 is_service_read: 1, 59 is_service_read: 1,
61 is_cosmetology_read:1 60 is_cosmetology_read:1
62 }), wx.stopPullDownRefresh(); //停止下拉刷新 61 }), wx.stopPullDownRefresh(); //停止下拉刷新
63 } else { 62 } else {
64 th.setData({ 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,6 +95,13 @@ Page({
95 */ 95 */
96 onShow: function() { 96 onShow: function() {
97 var th = this; 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 th.query_cology(); 105 th.query_cology();
99 }, 106 },
100 107
pages/user/my_service/cosmetology_list.wxml
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <!-- 个人属性 --> 8 <!-- 个人属性 -->
9 <view class="flex-vertical-between"> 9 <view class="flex-vertical-between">
10 <view class="flex-vertical"> 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 <view> 12 <view>
13 <!-- 用户名 --> 13 <!-- 用户名 -->
14 <view class="UserName ellipsis-1 fs32">{{item.StaffName}}</view> 14 <view class="UserName ellipsis-1 fs32">{{item.StaffName}}</view>
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 </view> 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 <view class="fs24">预约</view> 31 <view class="fs24">预约</view>
32 </navigator> 32 </navigator>
33 </view> 33 </view>