Commit 49a66726af953eecba17f3297a4c558a0d37c14c

Authored by 前端开发-罗建龙
1 parent 9b073ad1

oa单

Showing 87 changed files with 542 additions and 6810 deletions
@@ -291,6 +291,31 @@ App({ @@ -291,6 +291,31 @@ App({
291 291
292 }, 292 },
293 293
  294 + //获取订阅消息模板id
  295 + async get_template_id(id){
  296 + if (!id) { return ''}
  297 + let os = this.globalData.setting;
  298 + let res = await this.promiseGet("/api/wx/weappSendlist/page", {
  299 + data: {
  300 + store_id: os.stoid,
  301 + typeids: id
  302 + }
  303 + })
  304 + let resdata = res.data.data.pageData
  305 + if (res.data.code == 0 && resdata.length > 0) {
  306 + let template_id = []
  307 + // let template_id = res.data.data.pageData[0].template_id;
  308 + try {
  309 + resdata.map(item=>{
  310 + template_id.push(item.template_id)
  311 + })
  312 + } catch (error) {}
  313 + return template_id
  314 + }else{
  315 + return []
  316 + }
  317 + },
  318 +
294 //---初始化第三方---- 319 //---初始化第三方----
295 initExt: function () { 320 initExt: function () {
296 var tt = t; 321 var tt = t;
app.json
@@ -6,13 +6,13 @@ @@ -6,13 +6,13 @@
6 "pages/cart/cart4/cart4", 6 "pages/cart/cart4/cart4",
7 "pages/goods/goodsInfo/goodsInfo", 7 "pages/goods/goodsInfo/goodsInfo",
8 "pages/goods/goodsList/goodsList", 8 "pages/goods/goodsList/goodsList",
9 - "pages/goods/search/search", 9 +
10 "pages/order/refund_order/refund_order", 10 "pages/order/refund_order/refund_order",
11 "pages/payment/payment/payment", 11 "pages/payment/payment/payment",
12 "pages/user/index/index", 12 "pages/user/index/index",
13 "pages/user/order_list/order_list", 13 "pages/user/order_list/order_list",
14 "pages/user/order_detail/order_detail", 14 "pages/user/order_detail/order_detail",
15 - "pages/user/userinfo/userinfo", 15 +
16 "pages/user/coupon/coupon", 16 "pages/user/coupon/coupon",
17 "pages/user/checkcoupon/checkcoupon", 17 "pages/user/checkcoupon/checkcoupon",
18 18
@@ -23,16 +23,16 @@ @@ -23,16 +23,16 @@
23 23
24 "pages/user/userqy/userqy", 24 "pages/user/userqy/userqy",
25 "pages/user/user_spsy/user_spsy", 25 "pages/user/user_spsy/user_spsy",
26 - "pages/payment/pay_success/pay_success", 26 +
27 "pages/user/plus/plus", 27 "pages/user/plus/plus",
28 - "pages/user/my_service/appment_main", 28 +
29 "pages/user/my_service/i_service", 29 "pages/user/my_service/i_service",
30 - "pages/user/my_service/cosmetology_list", 30 +
31 "pages/user/my_service/hist_service", 31 "pages/user/my_service/hist_service",
32 "pages/user/my_service/tment_details", 32 "pages/user/my_service/tment_details",
33 "pages/user/my_service/tment_eval", 33 "pages/user/my_service/tment_eval",
34 - "pages/user/my_service/tment_order_list",  
35 - "pages/user/my_service/beauty_deta", 34 +
  35 +
36 "pages/giftpack/birthdaygift/birthdaygift", 36 "pages/giftpack/birthdaygift/birthdaygift",
37 "pages/giftpack/evaluategift/evaluategift", 37 "pages/giftpack/evaluategift/evaluategift",
38 "pages/giftpack/newvipgift/newvipgift", 38 "pages/giftpack/newvipgift/newvipgift",
@@ -243,7 +243,14 @@ @@ -243,7 +243,14 @@
243 "pages/store/index", 243 "pages/store/index",
244 "pages/user/express/express", 244 "pages/user/express/express",
245 "pages/team/team_success/team_success", 245 "pages/team/team_success/team_success",
246 - "pages/plus_agreement/plus_agreement" 246 + "pages/plus_agreement/plus_agreement",
  247 + "pages/goods/search/search",
  248 + "pages/payment/pay_success/pay_success",
  249 + "pages/user/userinfo/userinfo",
  250 + "pages/user/my_service/appment_main",
  251 + "pages/user/my_service/cosmetology_list",
  252 + "pages/user/my_service/beauty_deta",
  253 + "pages/user/my_service/tment_order_list"
247 ] 254 ]
248 } 255 }
249 ], 256 ],
components/diy_goodsGroup/diy_goodsGroup.js
@@ -62,8 +62,9 @@ Component({ @@ -62,8 +62,9 @@ Component({
62 is_get:0, 62 is_get:0,
63 63
64 is_retail_price:0, //是否显示零售价 64 is_retail_price:0, //是否显示零售价
65 - swiperHeight:0 65 + swiperHeight:0,
66 // action_index:0, //选中的tab项 66 // action_index:0, //选中的tab项
  67 + add_purchase:false,
67 }, 68 },
68 69
69 lifetimes: { 70 lifetimes: {
@@ -626,7 +627,29 @@ Component({ @@ -626,7 +627,29 @@ Component({
626 if (this.data.object.goodscount * this.data.page < this.data.total) { 627 if (this.data.object.goodscount * this.data.page < this.data.total) {
627 this.setLoading() 628 this.setLoading()
628 } 629 }
629 - } 630 + },
  631 + // 加购方法show
  632 + addPurchase(even){
  633 + this.setData({
  634 + add_purchase:true
  635 + })
  636 + let gid = even.currentTarget.dataset.gid
  637 + let prom_id = even.currentTarget.dataset.prom_id
  638 + let prom_type = even.currentTarget.dataset.prom_type
  639 + let add_purchase = this.selectComponent("#add_purchase");
  640 + if (add_purchase) {
  641 + add_purchase.init(gid,prom_type,prom_id)
  642 + }
  643 + },
  644 + // 加购方法 hide
  645 + hide_add_purchase(){
  646 + console.error('隐藏加购方法。。。。');
  647 + setTimeout(()=>{
  648 + this.setData({
  649 + add_purchase:false
  650 + })
  651 + },1000)
  652 + }
630 653
631 654
632 655
components/diy_goodsGroup/diy_goodsGroup.json
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 "component": true, 2 "component": true,
3 "usingComponents": { 3 "usingComponents": {
4 "mp-loading": "weui-miniprogram/loading/loading", 4 "mp-loading": "weui-miniprogram/loading/loading",
5 - "mp-sticky": "../mp-sticky/mp-sticky" 5 + "mp-sticky": "../mp-sticky/mp-sticky",
  6 + "add_purchase": "/components/add_purchase/add_purchase"
6 } 7 }
7 } 8 }
8 \ No newline at end of file 9 \ No newline at end of file
components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -448,7 +448,7 @@ @@ -448,7 +448,7 @@
448 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> 448 <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
449 </view> 449 </view>
450 </view> 450 </view>
451 - <view> 451 + <view catchtap="addPurchase" wx:if="{{filter.has_add_goods(aitem.prom_type)}}" data-gid="{{aitem.goods_id}}" data-prom_id="{{aitem.prom_id}}" data-prom_type="{{aitem.prom_type}}">
452 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image> 452 <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png?v=1'}}" style="width: 50rpx;height: 50rpx;"></image>
453 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> --> 453 <!-- <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view> -->
454 </view> 454 </view>
@@ -1360,4 +1360,8 @@ @@ -1360,4 +1360,8 @@
1360 <image style="width: 40rpx; height: 40rpx; " src="{{url}}/miniapp/images/loader.gif"></image> 1360 <image style="width: 40rpx; height: 40rpx; " src="{{url}}/miniapp/images/loader.gif"></image>
1361 </view> 1361 </view>
1362 </block> 1362 </block>
1363 -</view>  
1364 \ No newline at end of file 1363 \ No newline at end of file
  1364 +</view>
  1365 +
  1366 +
  1367 +<!-- 加购 -->
  1368 +<add_purchase id="add_purchase" bindhide_add_purchase="hide_add_purchase" wx:if="{{add_purchase}}"></add_purchase>
1365 \ No newline at end of file 1369 \ No newline at end of file
components/diy_scan/diy_scan.js
@@ -32,7 +32,7 @@ Component({ @@ -32,7 +32,7 @@ Component({
32 success: (res) => { 32 success: (res) => {
33 var result = res.result; 33 var result = res.result;
34 wx.navigateTo({ 34 wx.navigateTo({
35 - url: "/pages/goods/search/search?s_key=" + result, 35 + url: "/packageG/pages/goods/search/search?s_key=" + result,
36 }); 36 });
37 } 37 }
38 }) 38 })
components/diy_searchbox/diy_searchbox.js
@@ -67,7 +67,7 @@ Component({ @@ -67,7 +67,7 @@ Component({
67 click_sear:function(){ 67 click_sear:function(){
68 //如果搜索的单词为空的时候,就要跳到搜索页 68 //如果搜索的单词为空的时候,就要跳到搜索页
69 if(this.data.keyword!=''){ 69 if(this.data.keyword!=''){
70 - getApp().goto("/pages/goods/search/search"); 70 + getApp().goto("/packageG/pages/goods/search/search");
71 return false; 71 return false;
72 } 72 }
73 this.setData({first:0,inputShowed:1,inputval:''}); 73 this.setData({first:0,inputShowed:1,inputval:''});
@@ -94,7 +94,7 @@ Component({ @@ -94,7 +94,7 @@ Component({
94 this.setData({inputval:val}); 94 this.setData({inputval:val});
95 }, 95 },
96 sear:function(){ 96 sear:function(){
97 - var url="/pages/goods/search/search?s_key="+this.data.inputval; 97 + var url="/packageG/pages/goods/search/search?s_key="+this.data.inputval;
98 getApp().goto(url); 98 getApp().goto(url);
99 }, 99 },
100 100
@@ -108,7 +108,7 @@ Component({ @@ -108,7 +108,7 @@ Component({
108 sear_key:function(e){ 108 sear_key:function(e){
109 this.data.click_sear=1; 109 this.data.click_sear=1;
110 var str=e.currentTarget.dataset.item; 110 var str=e.currentTarget.dataset.item;
111 - var url="/pages/goods/search/search?s_key="+str; 111 + var url="/packageG/pages/goods/search/search?s_key="+str;
112 this.data.click_sear=0; 112 this.data.click_sear=0;
113 getApp().goto(url); 113 getApp().goto(url);
114 114
components/nav_b/nav_b.js
@@ -9,7 +9,7 @@ Component({ @@ -9,7 +9,7 @@ Component({
9 nav_center: "预约", //导航中间 9 nav_center: "预约", //导航中间
10 nav_right: "我的", //导航右边 10 nav_right: "我的", //导航右边
11 nav_left_url: "/pages/index/index/index", //导航左边地址 11 nav_left_url: "/pages/index/index/index", //导航左边地址
12 - nav_center_url: "/pages/user/my_service/tment_order_list", //导航中间地址 12 + nav_center_url: "/packageG/pages/user/my_service/tment_order_list", //导航中间地址
13 nav_right_url: "/pages/user/index/index", //导航右边地址 13 nav_right_url: "/pages/user/index/index", //导航右边地址
14 }, 14 },
15 15
packageA/pages/cart2_ser/cart2_ser.js
@@ -46,9 +46,10 @@ Page({ @@ -46,9 +46,10 @@ Page({
46 46
47 /*------------------------*/ 47 /*------------------------*/
48 yuer: 0, 48 yuer: 0,
49 - is_cart: 0, //是不是购物车进来的购买 49 + is_cart: 0, //是不是购物车进来的购买
  50 + template_id:[],//订阅消息
50 }, 51 },
51 - onLoad: function(t) { 52 + onLoad: async function(t) {
52 53
53 //定义第一次进入 54 //定义第一次进入
54 this.data.fir_in=1; 55 this.data.fir_in=1;
@@ -68,19 +69,25 @@ Page({ @@ -68,19 +69,25 @@ Page({
68 69
69 var th = this; 70 var th = this;
70 71
71 - getApp().promiseGet("/api/wx/weappSendlist/page", {  
72 - data: {  
73 - store_id: os.stoid,  
74 - typeid: "1001"  
75 - }  
76 - }).then(res => {  
77 - if (res.data.code == 0 && res.data.data.pageData.length > 0) {  
78 - var template_id = res.data.data.pageData[0].template_id;  
79 - th.setData({  
80 - template_id: template_id  
81 - });  
82 - }  
83 - }) 72 + // getApp().promiseGet("/api/wx/weappSendlist/page", {
  73 + // data: {
  74 + // store_id: os.stoid,
  75 + // typeid: "1001"
  76 + // }
  77 + // }).then(res => {
  78 + // if (res.data.code == 0 && res.data.data.pageData.length > 0) {
  79 + // var template_id = res.data.data.pageData[0].template_id;
  80 + // th.setData({
  81 + // template_id: template_id
  82 + // });
  83 + // }
  84 + // })
  85 + try {
  86 + let template_id =await getApp().get_template_id('1001,1012,1027')
  87 + this.setData({
  88 + template_id
  89 + })
  90 + } catch (error) {}
84 91
85 }, 92 },
86 onUnload: function() { 93 onUnload: function() {
@@ -289,7 +296,7 @@ Page({ @@ -289,7 +296,7 @@ Page({
289 if(fy) return false; 296 if(fy) return false;
290 t_pay.set_fir(); 297 t_pay.set_fir();
291 298
292 - var back_url="/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id; 299 + var back_url="/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id;
293 //-- 通联的第三方支付的返回优化 -- 300 //-- 通联的第三方支付的返回优化 --
294 ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ 301 ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
295 302
@@ -682,7 +689,7 @@ Page({ @@ -682,7 +689,7 @@ Page({
682 }); 689 });
683 setTimeout(function () { 690 setTimeout(function () {
684 wx.reLaunch({ 691 wx.reLaunch({
685 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id, 692 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id,
686 }) 693 })
687 }, 1000) 694 }, 1000)
688 695
@@ -728,7 +735,7 @@ Page({ @@ -728,7 +735,7 @@ Page({
728 // }); 735 // });
729 // setTimeout(function () { 736 // setTimeout(function () {
730 // wx.reLaunch({ 737 // wx.reLaunch({
731 - // url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, 738 + // url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id,
732 // }) 739 // })
733 // }, 1000) 740 // }, 1000)
734 // }, 741 // },
@@ -799,7 +806,7 @@ Page({ @@ -799,7 +806,7 @@ Page({
799 }); 806 });
800 "function" == typeof success && success(); 807 "function" == typeof success && success();
801 wx.redirectTo({ 808 wx.redirectTo({
802 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id, 809 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id,
803 }); 810 });
804 }, 811 },
805 fail: function(n) { 812 fail: function(n) {
@@ -816,7 +823,7 @@ Page({ @@ -816,7 +823,7 @@ Page({
816 var template_id = this.data.template_id; 823 var template_id = this.data.template_id;
817 // //授权订阅 824 // //授权订阅
818 wx.requestSubscribeMessage({ 825 wx.requestSubscribeMessage({
819 - tmplIds: [template_id], 826 + tmplIds: template_id,
820 success(res) { 827 success(res) {
821 func(); 828 func();
822 }, 829 },
packageA/pages/details_serviceCard/details_serviceCard.js
@@ -966,7 +966,7 @@ Page({ @@ -966,7 +966,7 @@ Page({
966 } 966 }
967 else{ 967 else{
968 wx.reLaunch({ 968 wx.reLaunch({
969 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, 969 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id,
970 }) 970 })
971 } 971 }
972 972
@@ -1009,7 +1009,7 @@ Page({ @@ -1009,7 +1009,7 @@ Page({
1009 console.log(n), getApp().showSuccess("支付成功!"); 1009 console.log(n), getApp().showSuccess("支付成功!");
1010 "function" == typeof success && success(); 1010 "function" == typeof success && success();
1011 wx.redirectTo({ 1011 wx.redirectTo({
1012 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, 1012 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id,
1013 }); 1013 });
1014 }, 1014 },
1015 fail: function(n) { 1015 fail: function(n) {
packageA/pages/my_service/appment_main.js
@@ -532,7 +532,7 @@ Page({ @@ -532,7 +532,7 @@ Page({
532 is_textea: 1 532 is_textea: 1
533 }) 533 })
534 console.log('optionsxxx===>', this.data.options); 534 console.log('optionsxxx===>', this.data.options);
535 - // console.log('1-->', "/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id); 535 + // console.log('1-->', "/packageG/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id);
536 wx.navigateTo({ 536 wx.navigateTo({
537 url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id 537 url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id
538 }); 538 });
packageA/pages/my_service/appment_main.wxml
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 </view> 84 </view>
85 85
86 <view class="submitMax flex-space-center fs32"> 86 <view class="submitMax flex-space-center fs32">
87 - <!-- <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> 87 + <!-- <navigator class="appment flex-center" url="/packageG/pages/user/my_service/tment_order_list">
88 <view>我的预约</view> 88 <view>我的预约</view>
89 </navigator> --> 89 </navigator> -->
90 <form report-submit='true' bindtap="sub_success"> 90 <form report-submit='true' bindtap="sub_success">
packageA/pages/my_service/i_service.wxml
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}"> 63 <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}">
64 <view>立即使用</view> 64 <view>立即使用</view>
65 </view> 65 </view>
66 - <view wx:if="{{item.State>0}}" class="flex-level appointment yellow-b" data-url="/pages/user/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}"> 66 + <view wx:if="{{item.State>0}}" class="flex-level appointment yellow-b" data-url="/packageG/pages/user/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}">
67 <view>预约</view> 67 <view>预约</view>
68 </view> 68 </view>
69 </view> --> 69 </view> -->
packageA/pages/my_service/tment_eval.js
@@ -242,7 +242,7 @@ Page({ @@ -242,7 +242,7 @@ Page({
242 evaluate_qt:function(){ 242 evaluate_qt:function(){
243 243
244 wx.redirectTo({ 244 wx.redirectTo({
245 - url: "/pages/user/my_service/tment_order_list?state="+2 245 + url: "/packageG/pages/user/my_service/tment_order_list?state="+2
246 }); 246 });
247 }, 247 },
248 //点击领取礼包 248 //点击领取礼包
packageA/pages/my_service2/appment_main.js
@@ -479,7 +479,7 @@ Page({ @@ -479,7 +479,7 @@ Page({
479 }) 479 })
480 480
481 console.log('optionsxxx===>', this.data.options); 481 console.log('optionsxxx===>', this.data.options);
482 - // console.log('1-->', "/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id); 482 + // console.log('1-->', "/packageG/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id);
483 wx.navigateTo({ 483 wx.navigateTo({
484 url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id 484 url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id
485 }); 485 });
packageA/pages/my_service2/appment_main.wxml
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 </view> 88 </view>
89 89
90 <view class="btn-box fs32"> 90 <view class="btn-box fs32">
91 - <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> 91 + <navigator class="appment flex-center" url="/packageG/pages/user/my_service/tment_order_list">
92 <view>我的预约</view> 92 <view>我的预约</view>
93 </navigator> 93 </navigator>
94 <form report-submit='true' bindtap="sub_success"> 94 <form report-submit='true' bindtap="sub_success">
packageA/pages/my_service2/tment_eval.js
@@ -242,7 +242,7 @@ Page({ @@ -242,7 +242,7 @@ Page({
242 evaluate_qt:function(){ 242 evaluate_qt:function(){
243 243
244 wx.redirectTo({ 244 wx.redirectTo({
245 - url: "/pages/user/my_service/tment_order_list?state="+2 245 + url: "/packageG/pages/user/my_service/tment_order_list?state="+2
246 }); 246 });
247 }, 247 },
248 //点击领取礼包 248 //点击领取礼包
packageA/pages/serviceCard_pd/cart/cart.js
@@ -5,7 +5,7 @@ var regeneratorRuntime = require(&#39;../../../../utils/runtime.js&#39;); @@ -5,7 +5,7 @@ var regeneratorRuntime = require(&#39;../../../../utils/runtime.js&#39;);
5 var util_pay = require("../../../../utils/pay.js"); 5 var util_pay = require("../../../../utils/pay.js");
6 var t_pay = require("../../../../utils/pay2.js"); 6 var t_pay = require("../../../../utils/pay2.js");
7 7
8 -Page({ 8 +Page({
9 data: { 9 data: {
10 url: t.globalData.setting.url, 10 url: t.globalData.setting.url,
11 resourceUrl: t.globalData.setting.resourceUrl, 11 resourceUrl: t.globalData.setting.resourceUrl,
@@ -65,11 +65,11 @@ Page({ @@ -65,11 +65,11 @@ Page({
65 card_name: '', //显示的卡的名称 65 card_name: '', //显示的卡的名称
66 66
67 card_cut_price: null,//减价多少钱 67 card_cut_price: null,//减价多少钱
68 - 68 + template_id:[],
69 //dis_config:null, //因为拼团有佣金抵扣 69 //dis_config:null, //因为拼团有佣金抵扣
70 //bn_use_commission: 0, //是不是使用佣金 70 //bn_use_commission: 0, //是不是使用佣金
71 }, 71 },
72 - onLoad: function (t) { 72 + onLoad: async function (t) {
73 console.log("onLoad_pt_cart"); 73 console.log("onLoad_pt_cart");
74 //定义第一次进入 74 //定义第一次进入
75 this.data.fir_in=1; 75 this.data.fir_in=1;
@@ -94,6 +94,12 @@ Page({ @@ -94,6 +94,12 @@ Page({
94 //先获取物流,再获取用户信息,再展示页面 94 //先获取物流,再获取用户信息,再展示页面
95 //th.get_wuliu(th.get_info(th.show_page)); 95 //th.get_wuliu(th.get_info(th.show_page));
96 //getApp().is_distribut(this); 96 //getApp().is_distribut(this);
  97 + try {
  98 + let template_id =await getApp().get_template_id('1001,1012,1027')
  99 + this.setData({
  100 + template_id
  101 + })
  102 + } catch (error) {}
97 103
98 }, 104 },
99 onUnload: function () { this.setData({ isclose: 1 }) }, 105 onUnload: function () { this.setData({ isclose: 1 }) },
@@ -536,7 +542,7 @@ Page({ @@ -536,7 +542,7 @@ Page({
536 var template_id = this.data.template_id; 542 var template_id = this.data.template_id;
537 // //授权订阅 543 // //授权订阅
538 wx.requestSubscribeMessage({ 544 wx.requestSubscribeMessage({
539 - tmplIds: [template_id], 545 + tmplIds: template_id,
540 success(res) { 546 success(res) {
541 func(); 547 func();
542 }, 548 },
packageA/pages/serviceCard_pd/cart_wk/cart_wk.js
@@ -107,7 +107,7 @@ Page({ @@ -107,7 +107,7 @@ Page({
107 util_pay.set_fir(); 107 util_pay.set_fir();
108 108
109 109
110 - var back_url="/pages/payment/pay_success/pay_success?order_id=" + th.data.order.order_id + "&type=1&card=1"; 110 + var back_url="/packageG/pages/payment/pay_success/pay_success?order_id=" + th.data.order.order_id + "&type=1&card=1";
111 //-- 通联的第三方支付的返回优化 -- 111 //-- 通联的第三方支付的返回优化 --
112 ut.is_pay_ok(th.data.wk_pyed,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ 112 ut.is_pay_ok(th.data.wk_pyed,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
113 if(!th.data.wk_pyed) return false; 113 if(!th.data.wk_pyed) return false;
@@ -737,7 +737,7 @@ Page({ @@ -737,7 +737,7 @@ Page({
737 //------支付成功页面-------- 737 //------支付成功页面--------
738 jumpPaymentPage: function (order_id, order_amount) { 738 jumpPaymentPage: function (order_id, order_amount) {
739 wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({ 739 wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({
740 - url: "/pages/payment/pay_success/pay_success?order_id=" + order_id + "&type=1&card=1", 740 + url: "/packageG/pages/payment/pay_success/pay_success?order_id=" + order_id + "&type=1&card=1",
741 }); 741 });
742 }, 742 },
743 743
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
@@ -4,7 +4,7 @@ var ut = require(&quot;../../../../utils/util.js&quot;), @@ -4,7 +4,7 @@ var ut = require(&quot;../../../../utils/util.js&quot;),
4 oo = getApp().globalData, 4 oo = getApp().globalData,
5 os = oo.setting; 5 os = oo.setting;
6 var s=getApp(); 6 var s=getApp();
7 -//评价加载更多 7 +//评价加载更多
8 var more = function (e) { 8 var more = function (e) {
9 return e && e.__esModule ? e : { 9 return e && e.__esModule ? e : {
10 default: e 10 default: e
@@ -197,10 +197,11 @@ Page({ @@ -197,10 +197,11 @@ Page({
197 user_order_pt_state: 0, 197 user_order_pt_state: 0,
198 198
199 is_retail_price: 0, 199 is_retail_price: 0,
  200 + template_id:[],//订阅消息id
200 }, 201 },
201 202
202 //------初始化加载---------- 203 //------初始化加载----------
203 - onLoad: function (t) { 204 + onLoad: async function (t) {
204 self = this; 205 self = this;
205 this.setData({options: t,}); 206 this.setData({options: t,});
206 var ee = this, that = ee, th = ee, 207 var ee = this, that = ee, th = ee,
@@ -441,6 +442,12 @@ Page({ @@ -441,6 +442,12 @@ Page({
441 442
442 }); 443 });
443 444
  445 + try {
  446 + let template_id =await getApp().get_template_id('1023')
  447 + this.setData({
  448 + template_id
  449 + })
  450 + } catch (error) {}
444 451
445 }, 452 },
446 453
@@ -3357,6 +3364,21 @@ Page({ @@ -3357,6 +3364,21 @@ Page({
3357 }); 3364 });
3358 }, 3365 },
3359 3366
  3367 + //天天拼团订阅消息提醒
  3368 + sendsm: function (ee) {
  3369 + let th = this;
  3370 + var template_id = this.data.template_id;
  3371 + // //授权订阅
  3372 + wx.requestSubscribeMessage({
  3373 + tmplIds: template_id,
  3374 + success(res) {
  3375 + th.openSpecModel_pt(ee);
  3376 + },
  3377 + fail(res) {
  3378 + th.openSpecModel_pt(ee);
  3379 + }
  3380 + })
  3381 + },
3360 //--点击弹起拼单-- 3382 //--点击弹起拼单--
3361 openSpecModel_pt: function (e) { 3383 openSpecModel_pt: function (e) {
3362 3384
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
@@ -588,12 +588,12 @@ @@ -588,12 +588,12 @@
588 </view> 588 </view>
589 <block wx:if="{{user_order_pt_state==0}}"> 589 <block wx:if="{{user_order_pt_state==0}}">
590 <!-- --商家团-- --> 590 <!-- --商家团-- -->
591 - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==1}}" class="buy-btn cart-btn line-h"> 591 + <view bindtap="sendsm" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==1}}" class="buy-btn cart-btn line-h">
592 <view class="fir-v">¥{{prom_act.price}}</view> 592 <view class="fir-v">¥{{prom_act.price}}</view>
593 <view>去参团</view> 593 <view>去参团</view>
594 </view> 594 </view>
595 <!-- --会员团-- --> 595 <!-- --会员团-- -->
596 - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==2}}" class="buy-btn cart-btn line-h"> 596 + <view bindtap="sendsm" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==2}}" class="buy-btn cart-btn line-h">
597 597
598 <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}"> 598 <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}">
599 <view>一键开团</view> 599 <view>一键开团</view>
@@ -610,7 +610,7 @@ @@ -610,7 +610,7 @@
610 </view> 610 </view>
611 </view> 611 </view>
612 <!-- -阶梯团-- --> 612 <!-- -阶梯团-- -->
613 - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h"> 613 + <view bindtap="sendsm" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h">
614 <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view> 614 <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view>
615 <view>支付定金</view> 615 <view>支付定金</view>
616 </view> 616 </view>
packageB/pages/user/Change_phone/Change_phone.js
@@ -143,7 +143,7 @@ Page({ @@ -143,7 +143,7 @@ Page({
143 getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, { 143 getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, {
144 success: function(res) { 144 success: function(res) {
145 if (res.data.code == 0) { 145 if (res.data.code == 0) {
146 - var url = "/pages/user/userinfo/userinfo?change_phone" + change_phone 146 + var url = "/packageG/pages/user/userinfo/userinfo?change_phone" + change_phone
147 getApp().globalData.userInfo.mobile = mobile; 147 getApp().globalData.userInfo.mobile = mobile;
148 getApp().my_warnning("更换成功", 0, th); 148 getApp().my_warnning("更换成功", 0, th);
149 getApp().goto(url); 149 getApp().goto(url);
packageB/pages/user/choice_guide/choice_guide.js
@@ -107,7 +107,7 @@ Page({ @@ -107,7 +107,7 @@ Page({
107 if( this.data.is_back) 107 if( this.data.is_back)
108 wx.navigateBack({ delta: 1 }) 108 wx.navigateBack({ delta: 1 })
109 else 109 else
110 - getApp().goto("/pages/user/userinfo/userinfo"); 110 + getApp().goto("/packageG/pages/user/userinfo/userinfo");
111 }, 111 },
112 112
113 img_err:function (e) { 113 img_err:function (e) {
packageC/pages/goods/goodsList/goodsList.wxml
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 </view> 50 </view>
51 </navigator> --> 51 </navigator> -->
52 52
53 - <!-- <navigator class="nav-item search" url="/pages/goods/search/search"> 53 + <!-- <navigator class="nav-item search" url="/packageG/pages/goods/search/search">
54 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image> 54 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image>
55 </navigator> --> 55 </navigator> -->
56 </view> 56 </view>
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
@@ -2873,7 +2873,7 @@ Page({ @@ -2873,7 +2873,7 @@ Page({
2873 //app.my_warnning("支付成功",1,th); 2873 //app.my_warnning("支付成功",1,th);
2874 //setTimeout(function () { 2874 //setTimeout(function () {
2875 wx.redirectTo({ 2875 wx.redirectTo({
2876 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 2876 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
2877 }) 2877 })
2878 //},1000) 2878 //},1000)
2879 2879
@@ -2905,7 +2905,7 @@ Page({ @@ -2905,7 +2905,7 @@ Page({
2905 //setTimeout(function () { 2905 //setTimeout(function () {
2906 th.setData({ isclose: 0 }); 2906 th.setData({ isclose: 0 });
2907 wx.redirectTo({ 2907 wx.redirectTo({
2908 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 2908 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
2909 }) 2909 })
2910 //}, 1000) 2910 //}, 1000)
2911 } 2911 }
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -79,6 +79,7 @@ Page({ @@ -79,6 +79,7 @@ Page({
79 same_ok:1, //同城配送的控制,默认ok 79 same_ok:1, //同城配送的控制,默认ok
80 bconfig: null, 80 bconfig: null,
81 showFold:true, 81 showFold:true,
  82 + template_id:[],
82 }, 83 },
83 84
84 85
@@ -126,7 +127,7 @@ Page({ @@ -126,7 +127,7 @@ Page({
126 flag: !this.data.flag, 127 flag: !this.data.flag,
127 }) 128 })
128 }, 129 },
129 - onLoad: function (t) { 130 + onLoad: async function (t) {
130 131
131 //定义第一次进入 132 //定义第一次进入
132 this.data.fir_in=1; 133 this.data.fir_in=1;
@@ -181,6 +182,12 @@ Page({ @@ -181,6 +182,12 @@ Page({
181 182
182 //判断是不是佣金抵扣 183 //判断是不是佣金抵扣
183 getApp().is_distribut(this); 184 getApp().is_distribut(this);
  185 + try {
  186 + let template_id =await getApp().get_template_id('1001,1012,1027')
  187 + this.setData({
  188 + template_id
  189 + })
  190 + } catch (error) {}
184 }, 191 },
185 192
186 onUnload: function () { 193 onUnload: function () {
@@ -1260,7 +1267,22 @@ Page({ @@ -1260,7 +1267,22 @@ Page({
1260 //}); 1267 //});
1261 1268
1262 }, 1269 },
1263 - 1270 + //订阅消息提醒
  1271 + sendsm: function (t) {
  1272 + let that = this;
  1273 + let template_id = this.data.template_id;
  1274 + // //授权订阅
  1275 + wx.requestSubscribeMessage({
  1276 + tmplIds: template_id,
  1277 + success(res) {
  1278 + that.submitConfirm(t)
  1279 + },
  1280 + fail(res) {
  1281 + that.submitConfirm(t)
  1282 + }
  1283 + })
  1284 +
  1285 + },
1264 1286
1265 // 提交订单前弹出确认对话框 1287 // 提交订单前弹出确认对话框
1266 submitConfirm(e) { 1288 submitConfirm(e) {
@@ -1534,7 +1556,7 @@ Page({ @@ -1534,7 +1556,7 @@ Page({
1534 util_pay.pay(data.data, function () { 1556 util_pay.pay(data.data, function () {
1535 setTimeout(function () { 1557 setTimeout(function () {
1536 // wx.reLaunch({ 1558 // wx.reLaunch({
1537 - // //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data, 1559 + // //url: "/packageG/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
1538 // url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data, 1560 // url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data,
1539 // }) 1561 // })
1540 1562
@@ -1604,7 +1626,7 @@ Page({ @@ -1604,7 +1626,7 @@ Page({
1604 // url: "/pages/user/order_list/order_list", 1626 // url: "/pages/user/order_list/order_list",
1605 // })--*/ 1627 // })--*/
1606 1628
1607 - // // var url="/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data; 1629 + // // var url="/packageG/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data;
1608 // // wx.reLaunch({ 1630 // // wx.reLaunch({
1609 // // url: url 1631 // // url: url
1610 // // }) 1632 // // })
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 -<form bindsubmit="submitConfirm"> 2 +<form bindsubmit="sendsm">
3 <view class="container"> 3 <view class="container">
4 4
5 <block wx:if="{{is_show_sub}}"> 5 <block wx:if="{{is_show_sub}}">
packageC/pages/payForAnother/payForAnother.js
@@ -2549,7 +2549,7 @@ Page({ @@ -2549,7 +2549,7 @@ Page({
2549 //app.my_warnning("支付成功",1,th); 2549 //app.my_warnning("支付成功",1,th);
2550 //setTimeout(function () { 2550 //setTimeout(function () {
2551 wx.redirectTo({ 2551 wx.redirectTo({
2552 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 2552 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
2553 }) 2553 })
2554 //},1000) 2554 //},1000)
2555 2555
@@ -2581,7 +2581,7 @@ Page({ @@ -2581,7 +2581,7 @@ Page({
2581 //setTimeout(function () { 2581 //setTimeout(function () {
2582 th.setData({isclose: 0}); 2582 th.setData({isclose: 0});
2583 wx.redirectTo({ 2583 wx.redirectTo({
2584 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 2584 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
2585 }) 2585 })
2586 //}, 1000) 2586 //}, 1000)
2587 } 2587 }
packageC/pages/presell/cart/cart2.js
@@ -223,11 +223,11 @@ Page({ @@ -223,11 +223,11 @@ Page({
223 t_pay.set_fir(); 223 t_pay.set_fir();
224 224
225 let err_url="/pages/user/order_list/order_list"; 225 let err_url="/pages/user/order_list/order_list";
226 - let ok_url="/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn; 226 + let ok_url="/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn;
227 227
228 if(th.data.is_fwk){ 228 if(th.data.is_fwk){
229 err_url='/pages/user/order_list/order_list?index=2&tabindex=1'; 229 err_url='/pages/user/order_list/order_list?index=2&tabindex=1';
230 - ok_url="/pages/payment/pay_success/pay_success?card=1&order_id=" + this.data.order_id; 230 + ok_url="/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + this.data.order_id;
231 } 231 }
232 232
233 //-- 通联的第三方支付的返回优化 -- 233 //-- 通联的第三方支付的返回优化 --
@@ -1375,7 +1375,7 @@ Page({ @@ -1375,7 +1375,7 @@ Page({
1375 }); 1375 });
1376 setTimeout(function () { 1376 setTimeout(function () {
1377 wx.reLaunch({ 1377 wx.reLaunch({
1378 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id, 1378 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id,
1379 }) 1379 })
1380 }, 1000) 1380 }, 1000)
1381 1381
@@ -1963,7 +1963,7 @@ Page({ @@ -1963,7 +1963,7 @@ Page({
1963 //app.my_warnning("支付成功",1,th); 1963 //app.my_warnning("支付成功",1,th);
1964 //setTimeout(function () { 1964 //setTimeout(function () {
1965 wx.redirectTo({ 1965 wx.redirectTo({
1966 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 1966 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
1967 }) 1967 })
1968 //},1000) 1968 //},1000)
1969 1969
@@ -1995,7 +1995,7 @@ Page({ @@ -1995,7 +1995,7 @@ Page({
1995 //setTimeout(function () { 1995 //setTimeout(function () {
1996 th.setData({ isclose: 0 }); 1996 th.setData({ isclose: 0 });
1997 wx.redirectTo({ 1997 wx.redirectTo({
1998 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 1998 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
1999 }) 1999 })
2000 //}, 1000) 2000 //}, 1000)
2001 } 2001 }
packageC/pages/presell/cart/cart2_pre.js
@@ -60,6 +60,7 @@ Page({ @@ -60,6 +60,7 @@ Page({
60 showFold:true, 60 showFold:true,
61 61
62 is_fwk:0, //判断服务卡项的类型 62 is_fwk:0, //判断服务卡项的类型
  63 + template_id:[],
63 }, 64 },
64 onReady() { 65 onReady() {
65 setTimeout(() => { 66 setTimeout(() => {
@@ -80,7 +81,7 @@ Page({ @@ -80,7 +81,7 @@ Page({
80 flag: !this.data.flag, 81 flag: !this.data.flag,
81 }) 82 })
82 }, 83 },
83 - onLoad: function (t) { 84 + onLoad: async function (t) {
84 //定义第一次进入 85 //定义第一次进入
85 this.data.fir_in=1; 86 this.data.fir_in=1;
86 87
@@ -97,11 +98,16 @@ Page({ @@ -97,11 +98,16 @@ Page({
97 }, 1); 98 }, 1);
98 99
99 var gg = getApp().get_b_now(); 100 var gg = getApp().get_b_now();
100 - debugger; 101 +
101 if(gg.fwk){ 102 if(gg.fwk){
102 this.setData({is_fwk: 1}); 103 this.setData({is_fwk: 1});
103 } 104 }
104 - 105 + try {
  106 + let template_id =await getApp().get_template_id('1001,1012,1027')
  107 + this.setData({
  108 + template_id
  109 + })
  110 + } catch (error) {}
105 }, 111 },
106 onUnload: function () { this.setData({ isclose: 1 }) }, 112 onUnload: function () { this.setData({ isclose: 1 }) },
107 113
@@ -1248,7 +1254,22 @@ Page({ @@ -1248,7 +1254,22 @@ Page({
1248 complete: function () { } 1254 complete: function () { }
1249 }) 1255 })
1250 }, 1256 },
  1257 + //订阅消息提醒
  1258 + sendsm: function (t) {
  1259 + let that = this;
  1260 + let template_id = this.data.template_id;
  1261 + // //授权订阅
  1262 + wx.requestSubscribeMessage({
  1263 + tmplIds: template_id,
  1264 + success(res) {
  1265 + that.submitForm(t)
  1266 + },
  1267 + fail(res) {
  1268 + that.submitForm(t)
  1269 + }
  1270 + })
1251 1271
  1272 + },
1252 //--------------------提交订单----------------------- 1273 //--------------------提交订单-----------------------
1253 submitForm: function (t) { 1274 submitForm: function (t) {
1254 var th = this; 1275 var th = this;
packageC/pages/presell/cart/cart2_pre.wxml
1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 -<form bindsubmit="submitForm">  
3 - <view class="container"> 2 +<form bindsubmit="sendsm">
  3 + <view class="container">
4 <view class="tab-container" wx:if="{{act.presell_type==1}}"> 4 <view class="tab-container" wx:if="{{act.presell_type==1}}">
5 <view class="tab-wrapper"> 5 <view class="tab-wrapper">
6 <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" 6 <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}"
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view> 10 data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view>
11 11
12 </view> 12 </view>
13 - </view> 13 + </view>
14 14
15 <block wx:if="{{act.presell_type==1}}"> 15 <block wx:if="{{act.presell_type==1}}">
16 <!--要进行判断地址是否显示----> 16 <!--要进行判断地址是否显示---->
packageD/pages/user/deposit/prepaid/msg/msg.js
@@ -57,7 +57,7 @@ Page({ @@ -57,7 +57,7 @@ Page({
57 my_confirm.open_cancel(0); 57 my_confirm.open_cancel(0);
58 }, 58 },
59 function () { 59 function () {
60 - let url = '/pages/user/userinfo/userinfo?isstcsp=1'; 60 + let url = '/packageG/pages/user/userinfo/userinfo?isstcsp=1';
61 wx.redirectTo({url: url,}) //跳到非tabbar页 61 wx.redirectTo({url: url,}) //跳到非tabbar页
62 } 62 }
63 ); 63 );
packageE/pages/cart/cart2/cart2.js
@@ -169,7 +169,8 @@ Page({ @@ -169,7 +169,8 @@ Page({
169 bconfig: null, 169 bconfig: null,
170 showFold:true, 170 showFold:true,
171 171
172 - ly_map:{} 172 + ly_map:{},
  173 + template_id:[]
173 }, 174 },
174 175
175 176
@@ -194,7 +195,7 @@ Page({ @@ -194,7 +195,7 @@ Page({
194 }) 195 })
195 }, 196 },
196 197
197 - onLoad: function (t) { 198 + onLoad:async function (t) {
198 199
199 this.data.fir_in=1; 200 this.data.fir_in=1;
200 201
@@ -219,18 +220,23 @@ Page({ @@ -219,18 +220,23 @@ Page({
219 if (t.state) { 220 if (t.state) {
220 th.data.state = 1; 221 th.data.state = 1;
221 } 222 }
222 - getApp().promiseGet("/api/wx/weappSendlist/page", {  
223 - data: {  
224 - store_id: os.stoid,  
225 - typeid: "1001"  
226 - }  
227 - }).then(res => {  
228 - if (res.data.code == 0 && res.data.data.pageData.length > 0) {  
229 - var template_id = res.data.data.pageData[0].template_id;  
230 - th.setData({ template_id: template_id });  
231 - }  
232 - })  
233 - 223 + // getApp().promiseGet("/api/wx/weappSendlist/page", {
  224 + // data: {
  225 + // store_id: os.stoid,
  226 + // typeid: "1001"
  227 + // }
  228 + // }).then(res => {
  229 + // if (res.data.code == 0 && res.data.data.pageData.length > 0) {
  230 + // var template_id = res.data.data.pageData[0].template_id;
  231 + // th.setData({ template_id: template_id });
  232 + // }
  233 + // })
  234 + try {
  235 + let template_id =await getApp().get_template_id('1001,1012,1027')
  236 + this.setData({
  237 + template_id
  238 + })
  239 + } catch (error) {}
234 //判断是不是佣金抵扣 240 //判断是不是佣金抵扣
235 getApp().is_distribut(this); 241 getApp().is_distribut(this);
236 242
@@ -285,7 +291,7 @@ Page({ @@ -285,7 +291,7 @@ Page({
285 util_pay.set_fir(); 291 util_pay.set_fir();
286 292
287 //-- 通联的第三方支付的返回优化 -- 293 //-- 通联的第三方支付的返回优化 --
288 - ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn, 294 + ut.is_pay_ok(th.data.ok_order_sn,"/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn,
289 "/pages/user/order_list/order_list",function (){ 295 "/pages/user/order_list/order_list",function (){
290 //支付信息会先记录着 296 //支付信息会先记录着
291 if(!th.data.ok_order_sn) return false; 297 if(!th.data.ok_order_sn) return false;
@@ -297,7 +303,7 @@ Page({ @@ -297,7 +303,7 @@ Page({
297 //支付支付,返回首页 303 //支付支付,返回首页
298 ut.m_toast('支付成功'); 304 ut.m_toast('支付成功');
299 setTimeout(()=>{ 305 setTimeout(()=>{
300 - getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn); 306 + getApp().re_to("/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn);
301 },1000) 307 },1000)
302 308
303 }else{ 309 }else{
@@ -4332,26 +4338,32 @@ Page({ @@ -4332,26 +4338,32 @@ Page({
4332 requestSubscribe() { 4338 requestSubscribe() {
4333 const th = this; 4339 const th = this;
4334 const template_id = this.data.template_id; 4340 const template_id = this.data.template_id;
4335 - wx.getSetting({  
4336 - withSubscriptions: true,  
4337 - success(res) {  
4338 - let itemSettings = res.subscriptionsSetting.itemSettings;  
4339 - if (itemSettings && itemSettings[template_id] == "accept") {  
4340 - //要检查一下赠品有可以足够  
4341 - th.sub_check_gift(function () {  
4342 - th.submit_func();  
4343 - })  
4344 -  
4345 - } else {  
4346 - th.sendsm(function () {  
4347 - //要检查一下赠品有可以足够  
4348 - th.sub_check_gift(function () {  
4349 - th.submit_func();  
4350 - })  
4351 - })  
4352 - }  
4353 - } 4341 + th.sendsm(function () {
  4342 + //要检查一下赠品有可以足够
  4343 + th.sub_check_gift(function () {
  4344 + th.submit_func();
  4345 + })
4354 }) 4346 })
  4347 + // wx.getSetting({
  4348 + // withSubscriptions: true,
  4349 + // success(res) {
  4350 + // let itemSettings = res.subscriptionsSetting.itemSettings;
  4351 + // if (itemSettings && itemSettings[template_id] == "accept") {
  4352 + // //要检查一下赠品有可以足够
  4353 + // th.sub_check_gift(function () {
  4354 + // th.submit_func();
  4355 + // })
  4356 +
  4357 + // } else {
  4358 + // th.sendsm(function () {
  4359 + // //要检查一下赠品有可以足够
  4360 + // th.sub_check_gift(function () {
  4361 + // th.submit_func();
  4362 + // })
  4363 + // })
  4364 + // }
  4365 + // }
  4366 + // })
4355 this.setData({ 4367 this.setData({
4356 submit: 1, 4368 submit: 1,
4357 }) 4369 })
@@ -5416,15 +5428,15 @@ Page({ @@ -5416,15 +5428,15 @@ Page({
5416 // } 5428 // }
5417 // wx.hideLoading() 5429 // wx.hideLoading()
5418 // wx.redirectTo({ 5430 // wx.redirectTo({
5419 - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 5431 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
5420 // }) 5432 // })
5421 // } else { 5433 // } else {
5422 // wx.redirectTo({ 5434 // wx.redirectTo({
5423 - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 5435 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
5424 // }) 5436 // })
5425 // } 5437 // }
5426 wx.redirectTo({ 5438 wx.redirectTo({
5427 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 5439 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
5428 }) 5440 })
5429 //},1000) 5441 //},1000)
5430 5442
@@ -5459,17 +5471,17 @@ Page({ @@ -5459,17 +5471,17 @@ Page({
5459 // wx.hideLoading() 5471 // wx.hideLoading()
5460 // th.setData({ isclose: 0 }); 5472 // th.setData({ isclose: 0 });
5461 // wx.redirectTo({ 5473 // wx.redirectTo({
5462 - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 5474 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
5463 // }) 5475 // })
5464 // } else { 5476 // } else {
5465 // th.setData({ isclose: 0 }); 5477 // th.setData({ isclose: 0 });
5466 // wx.redirectTo({ 5478 // wx.redirectTo({
5467 - // url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 5479 + // url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
5468 // }) 5480 // })
5469 // } 5481 // }
5470 th.setData({ isclose: 0 }); 5482 th.setData({ isclose: 0 });
5471 wx.redirectTo({ 5483 wx.redirectTo({
5472 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 5484 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
5473 }) 5485 })
5474 //}, 1000) 5486 //}, 1000)
5475 } 5487 }
@@ -7248,7 +7260,7 @@ Page({ @@ -7248,7 +7260,7 @@ Page({
7248 var template_id = this.data.template_id; 7260 var template_id = this.data.template_id;
7249 // //授权订阅 7261 // //授权订阅
7250 wx.requestSubscribeMessage({ 7262 wx.requestSubscribeMessage({
7251 - tmplIds: [template_id], 7263 + tmplIds: template_id,
7252 success(res) { 7264 success(res) {
7253 func(); 7265 func();
7254 }, 7266 },
packageE/pages/cart/cart2_inte/cart2_inte.js
@@ -85,6 +85,7 @@ Page({ @@ -85,6 +85,7 @@ Page({
85 same_ok:1, //同城配送的控制,默认ok 85 same_ok:1, //同城配送的控制,默认ok
86 bconfig: null, 86 bconfig: null,
87 showFold:true, 87 showFold:true,
  88 + template_id:[]
88 }, 89 },
89 90
90 91
@@ -109,7 +110,7 @@ Page({ @@ -109,7 +110,7 @@ Page({
109 flag: !this.data.flag, 110 flag: !this.data.flag,
110 }) 111 })
111 }, 112 },
112 - onLoad: function (t) { 113 + onLoad: async function (t) {
113 114
114 this.data.fir_in=1; 115 this.data.fir_in=1;
115 wx.setNavigationBarTitle({ title: "填写订单", }) 116 wx.setNavigationBarTitle({ title: "填写订单", })
@@ -193,7 +194,12 @@ Page({ @@ -193,7 +194,12 @@ Page({
193 //判断是不是佣金抵扣 194 //判断是不是佣金抵扣
194 getApp().is_distribut(this); 195 getApp().is_distribut(this);
195 196
196 - 197 + try {
  198 + let template_id =await getApp().get_template_id('1001,1012,1027')
  199 + this.setData({
  200 + template_id
  201 + })
  202 + } catch (error) {}
197 }, 203 },
198 onUnload: function () { this.setData({ isclose: 1 }) }, 204 onUnload: function () { this.setData({ isclose: 1 }) },
199 onHide: function () { 205 onHide: function () {
@@ -225,7 +231,7 @@ Page({ @@ -225,7 +231,7 @@ Page({
225 util_pay.set_fir(); 231 util_pay.set_fir();
226 232
227 //-- 通联的第三方支付的返回优化 -- 233 //-- 通联的第三方支付的返回优化 --
228 - ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn, 234 + ut.is_pay_ok(th.data.ok_order_sn,"/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn,
229 "/pages/user/order_list/order_list",function (){ 235 "/pages/user/order_list/order_list",function (){
230 if(!th.data.ok_order_sn) return false; 236 if(!th.data.ok_order_sn) return false;
231 getApp().request.promiseGet("/api/weshop/order/page", 237 getApp().request.promiseGet("/api/weshop/order/page",
@@ -236,7 +242,7 @@ Page({ @@ -236,7 +242,7 @@ Page({
236 //支付支付,返回首页 242 //支付支付,返回首页
237 ut.m_toast('支付成功'); 243 ut.m_toast('支付成功');
238 setTimeout(()=>{ 244 setTimeout(()=>{
239 - getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn); 245 + getApp().re_to("/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn);
240 },1000) 246 },1000)
241 247
242 }else{ 248 }else{
@@ -1150,7 +1156,22 @@ Page({ @@ -1150,7 +1156,22 @@ Page({
1150 //}); 1156 //});
1151 1157
1152 }, 1158 },
  1159 + //订阅消息提醒
  1160 + sendsm: function (t) {
  1161 + let that = this;
  1162 + let template_id = this.data.template_id;
  1163 + // //授权订阅
  1164 + wx.requestSubscribeMessage({
  1165 + tmplIds: template_id,
  1166 + success(res) {
  1167 + that.submitForm(t)
  1168 + },
  1169 + fail(res) {
  1170 + that.submitForm(t)
  1171 + }
  1172 + })
1153 1173
  1174 + },
1154 //--------------------提交订单----------------------- 1175 //--------------------提交订单-----------------------
1155 async submitForm(t) { 1176 async submitForm(t) {
1156 var sub_value = t; 1177 var sub_value = t;
@@ -1382,7 +1403,7 @@ Page({ @@ -1382,7 +1403,7 @@ Page({
1382 //app.my_warnning("支付成功",1,th); 1403 //app.my_warnning("支付成功",1,th);
1383 //setTimeout(function () { 1404 //setTimeout(function () {
1384 wx.redirectTo({ 1405 wx.redirectTo({
1385 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data 1406 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data
1386 }) 1407 })
1387 //},1000) 1408 //},1000)
1388 1409
@@ -1408,7 +1429,7 @@ Page({ @@ -1408,7 +1429,7 @@ Page({
1408 //setTimeout(function () { 1429 //setTimeout(function () {
1409 th.setData({ isclose: 0 }); 1430 th.setData({ isclose: 0 });
1410 wx.redirectTo({ 1431 wx.redirectTo({
1411 - url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, 1432 + url: "/packageG/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data,
1412 }) 1433 })
1413 //}, 1000) 1434 //}, 1000)
1414 } 1435 }
packageE/pages/cart/cart2_inte/cart2_inte.wxml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <wxs src="filter.wxs" module="util"></wxs> 2 <wxs src="filter.wxs" module="util"></wxs>
3 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 3 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
4 4
5 -<form bindsubmit="submitForm"> 5 +<form bindsubmit="sendsm">
6 <view class="container"> 6 <view class="container">
7 7
8 <view class="tab-container" wx:if="{{show_submit}}"> 8 <view class="tab-container" wx:if="{{show_submit}}">
packageE/pages/cart/cart2_pt/cart2_pt.js
@@ -6,7 +6,7 @@ var util_pay = require(&quot;../../../../utils/pay.js&quot;); @@ -6,7 +6,7 @@ var util_pay = require(&quot;../../../../utils/pay.js&quot;);
6 6
7 Page({ 7 Page({
8 8
9 - data: { 9 + data: {
10 url: t.globalData.setting.url, 10 url: t.globalData.setting.url,
11 resourceUrl: t.globalData.setting.resourceUrl, 11 resourceUrl: t.globalData.setting.resourceUrl,
12 imgUrl: t.globalData.setting.imghost, 12 imgUrl: t.globalData.setting.imghost,
@@ -76,6 +76,7 @@ Page({ @@ -76,6 +76,7 @@ Page({
76 same_ok:1, //同城配送的控制,默认ok 76 same_ok:1, //同城配送的控制,默认ok
77 bconfig:null, 77 bconfig:null,
78 showFold:true, 78 showFold:true,
  79 + template_id:[],
79 }, 80 },
80 81
81 82
@@ -100,7 +101,7 @@ Page({ @@ -100,7 +101,7 @@ Page({
100 flag: !this.data.flag, 101 flag: !this.data.flag,
101 }) 102 })
102 }, 103 },
103 - onLoad: function (t) { 104 + onLoad: async function (t) {
104 this.data.fir_in=1; 105 this.data.fir_in=1;
105 wx.setNavigationBarTitle({ title: "填写订单", }) 106 wx.setNavigationBarTitle({ title: "填写订单", })
106 var th = this; 107 var th = this;
@@ -132,6 +133,12 @@ Page({ @@ -132,6 +133,12 @@ Page({
132 //th.get_wuliu(th.get_info(th.show_page)); 133 //th.get_wuliu(th.get_info(th.show_page));
133 //判断是不是佣金抵扣 134 //判断是不是佣金抵扣
134 getApp().is_distribut(this); 135 getApp().is_distribut(this);
  136 + try {
  137 + let template_id =await getApp().get_template_id('1001,1012,1027')
  138 + this.setData({
  139 + template_id
  140 + })
  141 + } catch (error) {}
135 }, 142 },
136 onUnload: function () { 143 onUnload: function () {
137 this.setData({ isclose: 1 }) 144 this.setData({ isclose: 1 })
@@ -1154,6 +1161,22 @@ Page({ @@ -1154,6 +1161,22 @@ Page({
1154 //}); 1161 //});
1155 1162
1156 }, 1163 },
  1164 + //订阅消息提醒
  1165 + sendsm: function (t) {
  1166 + let that = this;
  1167 + let template_id = this.data.template_id;
  1168 + // //授权订阅
  1169 + wx.requestSubscribeMessage({
  1170 + tmplIds: template_id,
  1171 + success(res) {
  1172 + that.submitForm(t)
  1173 + },
  1174 + fail(res) {
  1175 + that.submitForm(t)
  1176 + }
  1177 + })
  1178 +
  1179 + },
1157 //--------------------提交订单----------------------- 1180 //--------------------提交订单-----------------------
1158 submitForm: async function (t) { 1181 submitForm: async function (t) {
1159 if (this.data.is_summit_ing == 1) return false; //--提交中退出-- 1182 if (this.data.is_summit_ing == 1) return false; //--提交中退出--
@@ -1388,7 +1411,7 @@ Page({ @@ -1388,7 +1411,7 @@ Page({
1388 util_pay.pay(data.data, function () { 1411 util_pay.pay(data.data, function () {
1389 setTimeout(function () { 1412 setTimeout(function () {
1390 wx.reLaunch({ 1413 wx.reLaunch({
1391 - //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data, 1414 + //url: "/packageG/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
1392 url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data, 1415 url: "/packageG/pages/team/team_success/team_success?ordersn=" + data.data,
1393 }) 1416 })
1394 }, 1000) 1417 }, 1000)
@@ -1428,7 +1451,7 @@ Page({ @@ -1428,7 +1451,7 @@ Page({
1428 wx.navigateTo({ 1451 wx.navigateTo({
1429 url: "/pages/user/order_list/order_list", 1452 url: "/pages/user/order_list/order_list",
1430 })--*/ 1453 })--*/
1431 - var url = "/pages/payment/pay_success/pay_success?type=1&order_sn=" + data.data; 1454 + var url = "/packageG/pages/payment/pay_success/pay_success?type=1&order_sn=" + data.data;
1432 wx.reLaunch({ 1455 wx.reLaunch({
1433 url: url 1456 url: url
1434 }) 1457 })
packageE/pages/cart/cart2_pt/cart2_pt.wxml
1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 -<form bindsubmit="submitForm"> 2 +<form bindsubmit="sendsm">
3 <view class="container"> 3 <view class="container">
4 4
5 <block wx:if="{{show_btn}}"> 5 <block wx:if="{{show_btn}}">
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 9
10 <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">快递邮寄</view> 10 <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">快递邮寄</view>
11 11
12 - <!-- 同城配送 --> 12 + <!-- 同城配送 -->
13 <block wx:if="{{show_same_city}}"> 13 <block wx:if="{{show_same_city}}">
14 <view bindtap='setexptype' data-t='2' class="tab {{bn_exp_type== 2 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">同城配送</view> 14 <view bindtap='setexptype' data-t='2' class="tab {{bn_exp_type== 2 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">同城配送</view>
15 </block> 15 </block>
packageE/pages/cart/cart_wk/cart_wk.js
@@ -111,7 +111,7 @@ Page({ @@ -111,7 +111,7 @@ Page({
111 util_pay.set_fir(); 111 util_pay.set_fir();
112 112
113 //-- 通联的第三方支付的返回优化 -- 113 //-- 通联的第三方支付的返回优化 --
114 - ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=1&order_sn=" + this.data.ok_order_sn,'back',function (){ 114 + ut.is_pay_ok(th.data.ok_order_sn,"/packageG/pages/payment/pay_success/pay_success?type=1&order_sn=" + this.data.ok_order_sn,'back',function (){
115 if(!th.data.ok_order_sn) return false; 115 if(!th.data.ok_order_sn) return false;
116 getApp().request.promiseGet("/api/weshop/order/page", 116 getApp().request.promiseGet("/api/weshop/order/page",
117 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ 117 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
@@ -123,7 +123,7 @@ Page({ @@ -123,7 +123,7 @@ Page({
123 //支付支付,返回首页 123 //支付支付,返回首页
124 ut.m_toast('支付成功'); 124 ut.m_toast('支付成功');
125 setTimeout(()=>{ 125 setTimeout(()=>{
126 - getApp().re_to("/pages/payment/pay_success/pay_success?type=1&order_sn=" + th.data.ok_order_sn); 126 + getApp().re_to("/packageG/pages/payment/pay_success/pay_success?type=1&order_sn=" + th.data.ok_order_sn);
127 },1000) 127 },1000)
128 128
129 }else{ 129 }else{
@@ -1240,7 +1240,7 @@ Page({ @@ -1240,7 +1240,7 @@ Page({
1240 //------支付成功页面-------- 1240 //------支付成功页面--------
1241 jumpPaymentPage: function (order_sn, order_amount) { 1241 jumpPaymentPage: function (order_sn, order_amount) {
1242 wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({ 1242 wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({
1243 - url: "/pages/payment/pay_success/pay_success?order_sn=" + order_sn + "&type=1", 1243 + url: "/packageG/pages/payment/pay_success/pay_success?order_sn=" + order_sn + "&type=1",
1244 }); 1244 });
1245 }, 1245 },
1246 1246
packageE/pages/togoin/togoin.js
@@ -96,6 +96,50 @@ Page({ @@ -96,6 +96,50 @@ Page({
96 this.save_the_data(r, e, sessionKey, openid) 96 this.save_the_data(r, e, sessionKey, openid)
97 }, 97 },
98 98
  99 + //订阅消息提醒
  100 + newsendsm: function (ee) {
  101 + if (!this.data.isAgree) {
  102 + wx.showToast({
  103 + title: '请您先阅读和勾选指定的内容',
  104 + icon: 'none',
  105 + });
  106 + return false;
  107 + }
  108 + let th = this;
  109 + var template_id = this.data.template_id;
  110 + // //授权订阅
  111 + wx.requestSubscribeMessage({
  112 + tmplIds: [template_id],
  113 + success(res) {
  114 + th.bindGetUserInfo(ee);
  115 + },
  116 + fail(res) {
  117 + th.bindGetUserInfo(ee);
  118 + }
  119 + })
  120 + },
  121 + //订阅消息提醒
  122 + oldsendsm: function (ee) {
  123 + if (!this.data.isAgree) {
  124 + wx.showToast({
  125 + title: '请您先阅读和勾选指定的内容',
  126 + icon: 'none',
  127 + });
  128 + return false;
  129 + }
  130 + let th = this;
  131 + var template_id = this.data.template_id;
  132 + // //授权订阅
  133 + wx.requestSubscribeMessage({
  134 + tmplIds: [template_id],
  135 + success(res) {
  136 + th.bindUserInfo(ee);
  137 + },
  138 + fail(res) {
  139 + th.bindUserInfo(ee);
  140 + }
  141 + })
  142 + },
99 143
100 //-- 会员授权 -- 144 //-- 会员授权 --
101 bindGetUserInfo: function (ee) { 145 bindGetUserInfo: function (ee) {
@@ -485,16 +529,51 @@ Page({ @@ -485,16 +529,51 @@ Page({
485 529
486 // 是否同意协议 530 // 是否同意协议
487 isAgree(e) { 531 isAgree(e) {
488 - let isAgree = null;  
489 - if (e.detail.value[0]) {  
490 - isAgree = true;  
491 - } else {  
492 - isAgree = false;  
493 - };  
494 - // this.data.isAgree = isAgree;  
495 - this.setData({  
496 - isAgree,  
497 - }); 532 + let template_id = this.data.template_id;
  533 + let that = this
  534 + let userinfo=getApp().globalData.userInfo;
  535 +
  536 + if (userinfo) {
  537 + let isAgree = null;
  538 + if (e.detail.value[0]) {
  539 + isAgree = true;
  540 + } else {
  541 + isAgree = false;
  542 + };
  543 + // this.data.isAgree = isAgree;
  544 + this.setData({
  545 + isAgree,
  546 + });
  547 + }else{
  548 + // //授权订阅
  549 + wx.requestSubscribeMessage({
  550 + tmplIds: [template_id],
  551 + success(res) {
  552 + let isAgree = null;
  553 + if (e.detail.value[0]) {
  554 + isAgree = true;
  555 + } else {
  556 + isAgree = false;
  557 + };
  558 + // this.data.isAgree = isAgree;
  559 + that.setData({
  560 + isAgree,
  561 + });
  562 + },
  563 + fail(res) {
  564 + let isAgree = null;
  565 + if (e.detail.value[0]) {
  566 + isAgree = true;
  567 + } else {
  568 + isAgree = false;
  569 + };
  570 + // this.data.isAgree = isAgree;
  571 + that.setData({
  572 + isAgree,
  573 + });
  574 + }
  575 + })
  576 + }
498 }, 577 },
499 578
500 //弹出框的同意的优化 579 //弹出框的同意的优化
packageE/pages/user/labels/labels.js
@@ -333,7 +333,7 @@ Page({ @@ -333,7 +333,7 @@ Page({
333 }) 333 })
334 334
335 var url = "/api/weshop/marketing/holiday/vip/interest/label/update"; //更新标签接口地址 335 var url = "/api/weshop/marketing/holiday/vip/interest/label/update"; //更新标签接口地址
336 - var nav_url = "/pages/user/userinfo/userinfo"; //领取成功之后跳转页面 336 + var nav_url = "/packageG/pages/user/userinfo/userinfo"; //领取成功之后跳转页面
337 337
338 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 338 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
339 remark = "兴趣标签赠送"; 339 remark = "兴趣标签赠送";
packageE/pages/user/labels/labels.wxml
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <!-- 兴趣标签标题 --> 4 <!-- 兴趣标签标题 -->
5 <view class="flex-vertical-between labels_head"> 5 <view class="flex-vertical-between labels_head">
6 <view class="fs36">兴趣标签</view> 6 <view class="fs36">兴趣标签</view>
7 - <view class="skip flex-center fs28" data-url="/pages/user/userinfo/userinfo" bindtap="goto"> 7 + <view class="skip flex-center fs28" data-url="/packageG/pages/user/userinfo/userinfo" bindtap="goto">
8 <view>关闭</view> 8 <view>关闭</view>
9 </view> 9 </view>
10 10
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 34
35 <!-- 领取选择标签的奖励按钮 --> 35 <!-- 领取选择标签的奖励按钮 -->
36 <block wx:if="{{is_modify==0}}"> 36 <block wx:if="{{is_modify==0}}">
37 - <view class="receive flex-center fs36 {{is_check==1?'backcolor':''}}" bindtap="update_label" data-url="/pages/user/userinfo/userinfo"> 37 + <view class="receive flex-center fs36 {{is_check==1?'backcolor':''}}" bindtap="update_label" data-url="/packageG/pages/user/userinfo/userinfo">
38 <block> 38 <block>
39 <view>保存</view> 39 <view>保存</view>
40 </block> 40 </block>
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 </view> 58 </view>
59 </block> 59 </block>
60 <block wx:if="{{is_modify==1}}"> 60 <block wx:if="{{is_modify==1}}">
61 - <view class="receive flex-center fs36 {{is_check==1?'backcolor':''}}" bindtap="update_label" data-url="/pages/user/userinfo/userinfo"> 61 + <view class="receive flex-center fs36 {{is_check==1?'backcolor':''}}" bindtap="update_label" data-url="/packageG/pages/user/userinfo/userinfo">
62 <view>提交修改</view> 62 <view>提交修改</view>
63 </view> 63 </view>
64 </block> 64 </block>
pages/goods/categoryList/categoryList.js
@@ -729,7 +729,7 @@ Page({ @@ -729,7 +729,7 @@ Page({
729 729
730 goseach: function () { 730 goseach: function () {
731 wx.navigateTo({ 731 wx.navigateTo({
732 - url: "/pages/goods/search/search" 732 + url: "/packageG/pages/goods/search/search"
733 }); 733 });
734 }, 734 },
735 735
@@ -876,7 +876,7 @@ Page({ @@ -876,7 +876,7 @@ Page({
876 success: (res) => { 876 success: (res) => {
877 var result = res.result; 877 var result = res.result;
878 wx.navigateTo({ 878 wx.navigateTo({
879 - url: "/pages/goods/search/search?s_key=" + result, 879 + url: "/packageG/pages/goods/search/search?s_key=" + result,
880 }); 880 });
881 } 881 }
882 }) 882 })
pages/goods/goodsInfo/goodsInfo.js
@@ -13,7 +13,7 @@ var t = require(&quot;../../../utils/util.js&quot;), @@ -13,7 +13,7 @@ var t = require(&quot;../../../utils/util.js&quot;),
13 var wxlog = require("../../../utils/wxlog.js"); 13 var wxlog = require("../../../utils/wxlog.js");
14 let self = null; 14 let self = null;
15 15
16 -//评价加载更多 16 +//评价加载更多
17 var more = function (e) { 17 var more = function (e) {
18 return e && e.__esModule ? e : { 18 return e && e.__esModule ? e : {
19 default: e 19 default: e
@@ -278,10 +278,11 @@ Page({ @@ -278,10 +278,11 @@ Page({
278 278
279 adding:0 , //加入购物车的避免重复 279 adding:0 , //加入购物车的避免重复
280 goodInfo_ad:"",//商品详情广告 280 goodInfo_ad:"",//商品详情广告
  281 + template_id:[],//订阅消息id
281 }, 282 },
282 283
283 //------初始化加载---------- 284 //------初始化加载----------
284 - onLoad: function (t) { 285 + onLoad: async function (t) {
285 var ee = this, 286 var ee = this,
286 that = ee, 287 that = ee,
287 th = ee, 288 th = ee,
@@ -546,6 +547,12 @@ Page({ @@ -546,6 +547,12 @@ Page({
546 } 547 }
547 }); 548 });
548 549
  550 + try {
  551 + let template_id =await getApp().get_template_id('1023')
  552 + this.setData({
  553 + template_id
  554 + })
  555 + } catch (error) {}
549 556
550 }, 557 },
551 558
@@ -3887,6 +3894,7 @@ Page({ @@ -3887,6 +3894,7 @@ Page({
3887 }, 800) 3894 }, 800)
3888 } else { 3895 } else {
3889 setTimeout(function () { 3896 setTimeout(function () {
  3897 +
3890 th.deal_pickup(e); //--普通门店排版-- 3898 th.deal_pickup(e); //--普通门店排版--
3891 }, 800) 3899 }, 800)
3892 } 3900 }
@@ -4242,6 +4250,7 @@ Page({ @@ -4242,6 +4250,7 @@ Page({
4242 4250
4243 //------------处理线下门店库存-------- 4251 //------------处理线下门店库存--------
4244 deal_pickup_dline(e) { 4252 deal_pickup_dline(e) {
  4253 +
4245 var pkno = [], 4254 var pkno = [],
4246 th = this; 4255 th = this;
4247 if (!th.data.sele_g){ 4256 if (!th.data.sele_g){
@@ -4435,7 +4444,7 @@ Page({ @@ -4435,7 +4444,7 @@ Page({
4435 if (iu.CanOutQty <= 0) iu.is_no_qyt = 1; 4444 if (iu.CanOutQty <= 0) iu.is_no_qyt = 1;
4436 4445
4437 } 4446 }
4438 - 4447 +
4439 //---把数组组装进去--- 4448 //---把数组组装进去---
4440 th.deal_pickup(em); 4449 th.deal_pickup(em);
4441 4450
@@ -5356,7 +5365,21 @@ Page({ @@ -5356,7 +5365,21 @@ Page({
5356 pd_xx: 0, 5365 pd_xx: 0,
5357 }) 5366 })
5358 }, 5367 },
5359 - 5368 + //天天拼团订阅消息提醒
  5369 + sendsm: function (ee) {
  5370 + let th = this;
  5371 + var template_id = this.data.template_id;
  5372 + // //授权订阅
  5373 + wx.requestSubscribeMessage({
  5374 + tmplIds: template_id,
  5375 + success(res) {
  5376 + th.openSpecModel_pt(ee);
  5377 + },
  5378 + fail(res) {
  5379 + th.openSpecModel_pt(ee);
  5380 + }
  5381 + })
  5382 + },
5360 //--点击弹起拼单-- 5383 //--点击弹起拼单--
5361 openSpecModel_pt:function (e) { 5384 openSpecModel_pt:function (e) {
5362 5385
@@ -8411,7 +8434,7 @@ Page({ @@ -8411,7 +8434,7 @@ Page({
8411 img = th.data.iurl + th.data.prom_act.share_imgurl; 8434 img = th.data.iurl + th.data.prom_act.share_imgurl;
8412 } 8435 }
8413 let user_id = getApp().globalData.user_id 8436 let user_id = getApp().globalData.user_id
8414 - console.error(img); 8437 +
8415 return { 8438 return {
8416 title: this.data.data.goods_name + '-' + store_name, 8439 title: this.data.data.goods_name + '-' + store_name,
8417 // imageUrl: this.data.gallery[0].image_url, 8440 // imageUrl: this.data.gallery[0].image_url,
pages/goods/goodsInfo/goodsInfo.wxml
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <wxs module="g_filters" src="g_filter.wxs"></wxs> 10 <wxs module="g_filters" src="g_filter.wxs"></wxs>
11 <wxs module="tool" src="filter.wxs"></wxs> 11 <wxs module="tool" src="filter.wxs"></wxs>
12 12
13 -<!-- 商品内容区域,普通商品,秒杀,拼团 --> 13 +<!-- 商品内容区域,普通商品,秒杀,拼团 -->
14 <block wx:if="{{isshow}}"> 14 <block wx:if="{{isshow}}">
15 <view class="container"> 15 <view class="container">
16 <!-- 拼单规则规则 --> 16 <!-- 拼单规则规则 -->
@@ -1178,12 +1178,12 @@ @@ -1178,12 +1178,12 @@
1178 </view> 1178 </view>
1179 <block wx:if="{{user_order_pt_state==0}}"> 1179 <block wx:if="{{user_order_pt_state==0}}">
1180 <!-- --商家团-- --> 1180 <!-- --商家团-- -->
1181 - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==1}}" class="buy-btn cart-btn line-h"> 1181 + <view bindtap="sendsm" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==1}}" class="buy-btn cart-btn line-h">
1182 <view class="fir-v">¥{{prom_act.price}}</view> 1182 <view class="fir-v">¥{{prom_act.price}}</view>
1183 <view>去参团</view> 1183 <view>去参团</view>
1184 </view> 1184 </view>
1185 <!-- --会员团-- --> 1185 <!-- --会员团-- -->
1186 - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==2}}" class="buy-btn cart-btn line-h"> 1186 + <view bindtap="sendsm" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==2}}" class="buy-btn cart-btn line-h">
1187 <!-- <view class="fir-v">¥{{prom_act.price}}</view> --> 1187 <!-- <view class="fir-v">¥{{prom_act.price}}</view> -->
1188 <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}"> 1188 <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}">
1189 <view>一键开团</view> 1189 <view>一键开团</view>
@@ -1201,7 +1201,7 @@ @@ -1201,7 +1201,7 @@
1201 </view> 1201 </view>
1202 </view> 1202 </view>
1203 <!-- -阶梯团-- --> 1203 <!-- -阶梯团-- -->
1204 - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h"> 1204 + <view bindtap="sendsm" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h">
1205 <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view> 1205 <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view>
1206 <view>支付定金</view> 1206 <view>支付定金</view>
1207 </view> 1207 </view>
pages/goods/goodsInfo/goodsInfo.wxss
1 -@import "../../../utils/wxParse/wxParse.wxss"; 1 +@import "../../../utils/wxParse/wxParse.wxss";
2 2
3 .container { 3 .container {
4 margin-bottom: 100rpx; 4 margin-bottom: 100rpx;
pages/goods/goodsList/goodsList.wxml
1 -<wxs module="g_filter" src="../search/g_filter.wxs"></wxs> 1 +<wxs module="g_filter" src="../g_filter.wxs"></wxs>
2 <view class="container" wx:if="{{show_all}}"> 2 <view class="container" wx:if="{{show_all}}">
3 <view> 3 <view>
4 4
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 <view class="pd20 flex ai-center jc_sb search_fixed"> 25 <view class="pd20 flex ai-center jc_sb search_fixed">
26 <!-- 搜索框 --> 26 <!-- 搜索框 -->
27 <view class="search-box f1"> 27 <view class="search-box f1">
28 - <view hover-class="none" data-url="/pages/goods/search/search?ladder_id={{ladder_id}}" bindtap="go_url"><text class="iconfont icon-sousuo pdr10"></text>请输入商品关键字</view> 28 + <view hover-class="none" data-url="/packageG/pages/goods/search/search?ladder_id={{ladder_id}}" bindtap="go_url"><text class="iconfont icon-sousuo pdr10"></text>请输入商品关键字</view>
29 </view> 29 </view>
30 <!-- 单列/双列 显示切换 --> 30 <!-- 单列/双列 显示切换 -->
31 <text class="iconfont {{isToggle ? 'icon-fenlie':'icon-fenxiang'}} pdl30 fs36" bindtap="bindToggleDisplay"></text> 31 <text class="iconfont {{isToggle ? 'icon-fenlie':'icon-fenxiang'}} pdl30 fs36" bindtap="bindToggleDisplay"></text>
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 </view> 74 </view>
75 </navigator> 75 </navigator>
76 76
77 - <!-- <navigator class="nav-item search" url="/pages/goods/search/search"> 77 + <!-- <navigator class="nav-item search" url="/packageG/pages/goods/search/search">
78 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image> 78 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image>
79 </navigator> --> 79 </navigator> -->
80 </view> 80 </view>
pages/goods/search/g_filter.wxs deleted
1 -var g_filters = {  
2 - //-- 判断是不是有等级价 --  
3 - is_has_rank: function (rank_switch, item) {  
4 - if (!rank_switch) return false;  
5 - if (item.cardprice1 || item.cardprice2 || item.cardprice3) { return true }  
6 - return false;  
7 - },  
8 -  
9 - //-- 判断,不是等级会员时候,要显示的最低等级价和名称 --  
10 - get_card_price: function (goods, all_card, type) {  
11 - var price1 = parseFloat(goods['cardprice1']);  
12 - var price2 = parseFloat(goods['cardprice2']);  
13 - var price3 = parseFloat(goods['cardprice3']);  
14 - if (!all_card) {  
15 - if (type == 0) return 0;  
16 - return "";  
17 - }  
18 -  
19 - var arr = [];  
20 - var min_price = 0;  
21 - var min_name = "";  
22 -  
23 - var min_price = null;  
24 - var min_name = null;  
25 - //---设置对应的价格名字----  
26 - for (var i = 0; i < 3; i++) {  
27 - var vl = all_card[i];  
28 - if (!vl) continue;  
29 - if (vl['CorrPrice'] == "Price1" && price1 > 0) {  
30 - if (min_price == null) {  
31 - min_price = price1; min_name = vl['CardName'];  
32 - }  
33 - else if (price1 < min_price) {  
34 - min_price = price1; min_name = vl['CardName'];  
35 - }  
36 - }  
37 - if (vl['CorrPrice'] == "Price2" && price2 > 0) {  
38 - if (min_price == null) {  
39 - min_price = price2; min_name = vl['CardName'];  
40 - }  
41 - else if (price2 < min_price) {  
42 - min_price = price2; min_name = vl['CardName'];  
43 - }  
44 - }  
45 -  
46 - if (vl['CorrPrice'] == "Price3" && price3 > 0) {  
47 - if (min_price == null) {  
48 - min_price = price3; min_name = vl['CardName'];  
49 - }  
50 - else if (price3 < min_price) {  
51 - min_price = price3; min_name = vl['CardName'];  
52 - }  
53 - }  
54 -  
55 - }  
56 - if (min_price == null) {  
57 - if (type == 0) return 0;  
58 - return "";  
59 - }  
60 -  
61 - //if(type==0) return arr.length;  
62 - //--进行排序,升序---  
63 - /*---  
64 - arr.sort(function(a,b){  
65 - if (a.price < b.price) {  
66 - return -1;  
67 - } else if (a.fee == b.fee) {  
68 - return 0;  
69 - } else {  
70 - return 1;  
71 - }  
72 - })--*/  
73 - //-- 获取最下价钱,和相应的卡的名称 --  
74 - //min_price=min.price;  
75 - //min_name=min.name;  
76 - if (type == 0) return min_price.toFixed(2);  
77 - if (min_name.length > 7) min_name = min_name.substring(0, 8);  
78 - return min_name;  
79 - },  
80 -  
81 -  
82 - get_goods_url: function (item) {  
83 -  
84 - var url1 = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id + "&prom_id=" + item.prom_id + "&prom_type="+item.prom_type  
85 - // 预售活动  
86 - if (item.prom_type == 8) {  
87 - url1 = "/packageC/pages/presell/goodsInfo/goodsInfo?goods_id=" + item.goods_id + "&prom_id=" + item.prom_id  
88 - }  
89 - // 如果是幸运购活动商品  
90 - if (item.prom_type == 9) {  
91 - url1 = "/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=" + item.goods_id + "&group_id=" + item.prom_id  
92 - }  
93 -  
94 - if ([1,2,6].indexOf(item.prom_type)>-1 && item.prom_id > 0) {  
95 - url1 = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id + "&prom_id=" + item.prom_id + "&prom_type="+item.prom_type;  
96 - }  
97 -  
98 -  
99 - return url1;  
100 - }  
101 -}  
102 -  
103 -module.exports = {  
104 - is_has_rank: g_filters.is_has_rank,  
105 - get_card_price: g_filters.get_card_price,  
106 - get_goods_url: g_filters.get_goods_url  
107 -}  
108 \ No newline at end of file 0 \ No newline at end of file
pages/goods/search/search.js deleted
1 -var t = function (t) {  
2 - return t && t.__esModule ? t : {  
3 - default: t  
4 - };  
5 -}(require("../../../utils/LoadMore.js")), ut = require("../../../utils/util.js"),  
6 - a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting;  
7 -const com_fil = require("../com_screen.js");  
8 -  
9 -Page({  
10 - data: {  
11 - url: a.globalData.setting.imghost,  
12 - resourceUrl: a.globalData.setting.resourceUrl,  
13 - currentPage: 1,  
14 - requestData: null,  
15 - allData: null,  
16 - openFilterModal: !1,  
17 - openSearchModal: !1,  
18 - baseUrl: "/api/weshop/goods/page?isnewwhere=1",  
19 - requestUrl: "",  
20 - old_req_url:'',  
21 - //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ]  
22 - hotWords: null,  
23 - is_no_plus: 1,  
24 - tabname: "sort", //排序的字段  
25 - adname: "asc", //升降的字段  
26 - rq_data: null,  
27 - searchRecord: [],  
28 - keyword: '',  
29 - is_his: 0,  
30 - hiddenClear: true,  
31 - fliter_flag: false,  
32 -  
33 - more_sort_arr:[  
34 - {name:'综合',value:'sort'},  
35 - {name:'新品',value:'on_time'},  
36 - {name:'评论',value:'comment_count'},  
37 - ],  
38 -  
39 - fil_cate_state:0,  
40 - fil_nation_state:0,  
41 - fil_brand_state:0,  
42 - fil_price_state:0,  
43 - },  
44 -  
45 - onLoad: function (t) {  
46 - this.data.rq_data = t;  
47 - //群id  
48 - if(t && t.groupchat_id){  
49 - getApp().globalData.groupchat_id=t.groupchat_id  
50 - }  
51 - if (t.o) {  
52 - this.data.rq_data.o = JSON.parse(t.o);  
53 - };  
54 - if(t.o) {  
55 - var req = t.o;  
56 - if(req.cat_id){  
57 - var baseUrl= "/api/weshop/goods/page?isnewwhere=1&cat_id="+req.cat_id  
58 - this.setData({ baseUrl: baseUrl });  
59 - }  
60 - if(req.nation_id){  
61 - var baseUrl= "/api/weshop/goods/page?isnewwhere=1&nation_id="+req.nation_id  
62 - this.setData({ baseUrl: baseUrl });  
63 - }  
64 - if(req.brand_id){  
65 - var baseUrl= "/api/weshop/goods/page?isnewwhere=1&brand_id="+req.brand_id  
66 - this.setData({ baseUrl: baseUrl });  
67 - }  
68 - }else{  
69 - var baseUrl= "/api/weshop/goods/page?isnewwhere=1"  
70 - this.setData({ baseUrl: baseUrl });  
71 - }  
72 -  
73 -  
74 -  
75 - //接受有没有导购的参数  
76 - var first_leader = t.first_leader;  
77 - if (first_leader) {  
78 - getApp().globalData.first_leader = first_leader;  
79 - //调用接口判断是不是会员  
80 - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + oo.stoid + "/" + first_leader, {}).then(res => {  
81 - if (res.data.code == 0) {  
82 - getApp().globalData.guide_id = res.data.data.id;  
83 - getApp().globalData.guide_pick_id= res.data.data.pickup_id  
84 - }  
85 - })  
86 - }  
87 -  
88 - //调用接口判断商家plus有没有过期  
89 - rq.promiseGet("/store/storemoduleendtime/page?store_id=" + oo.stoid + "&type=3", {}).then(res => {  
90 - if (res.data.code == 0) {  
91 - var arr = res.data.data.pageData;  
92 - if (arr.length > 0) {  
93 - var item = arr[0];  
94 - if (item.is_sy == 0) {  
95 - var now = Date.parse(new Date()); now = now / 1000;  
96 - if (item.end_time < now) {  
97 - th.setData({ is_no_plus: 0 })  
98 - }  
99 - }  
100 - }  
101 - }  
102 - })  
103 -  
104 - var th = this;  
105 - a.getConfig2(function (rs) {  
106 - var arr = new Array(), arr2 = new Array();  
107 - if (rs.hot_keywords != null && ut.trim(rs.hot_keywords) != "") {  
108 - var arr1 = rs.hot_keywords.split('|');  
109 - for (var i = 0; i < arr1.length; i++) {  
110 - if (i % 5 == 0 && i != 0) {  
111 - arr.push(arr2);  
112 - arr2 = [];  
113 - } else {  
114 - arr2.push(arr1[i]);  
115 - }  
116 - }  
117 - if (arr2.length > 0) arr.push(arr2);  
118 - th.setData({ hotWords: arr });  
119 - }  
120 -  
121 -  
122 - //计算等级价相关  
123 - var swithc_list = rs.switch_list;  
124 - var sw_arr = JSON.parse(swithc_list);  
125 - //---如果后台又开等级卡的开关---  
126 - ut.get_plus_name_price(sw_arr,th);  
127 - if(sw_arr.is_retail_price){  
128 - th.setData({is_retail_price:1});  
129 - }  
130 -  
131 - })  
132 - //e.init(this, "", "requestData");  
133 - var url = this.data.baseUrl;  
134 -  
135 - //扫一扫过来,显示搜索的内容  
136 - var s_key = t.s_key;  
137 - if (s_key) {  
138 - s_key = s_key.trim();  
139 - this.search(s_key); this.openSearchModal();  
140 - return;  
141 - }  
142 -  
143 - if (0 != t.brand_id && t.brand_id != undefined) { url += "&brand_id=" + t.brand_id; }  
144 - if (0 != t.nation_id && t.nation_id != undefined) { url += "&nation_id=" + t.nation_id; }  
145 - if (0 != t.max_price && t.max_price != undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price; }  
146 - if (0 != t.ladder_id && t.ladder_id != undefined) {  
147 - url += "&ladder_id=" + t.ladder_id;  
148 - this.setData({  
149 - baseUrl: url,  
150 - })  
151 - }  
152 - if (url != this.data.baseUrl) return this.requestSearch(url);  
153 - this.openSearchModal();  
154 - // 获取历史搜索记录  
155 - this.getHistorySearch();  
156 - },  
157 -  
158 - onShow: function () {  
159 - getApp().check_can_share();  
160 - },  
161 -  
162 - changeTab: function (t) {  
163 - var ord = t.currentTarget.dataset.href;  
164 - var ad = t.currentTarget.dataset.ad;  
165 -  
166 - var url = this.data.requestUrl;  
167 -  
168 - if (this.data.tabname != ord) {  
169 - this.setData({ tabname: ord, adname: "desc" });  
170 - } else {  
171 - ad = ad == "desc" ? "asc" : "desc";  
172 - this.setData({ adname: ad });  
173 - }  
174 - this.resetData(), this.requestSearch(url);  
175 -  
176 - },  
177 -  
178 - //-----------真的调用地址进行搜索------------  
179 - requestSearch: function (t) {  
180 - // console.log('t===>', t);  
181 - if (this.data.loading) return false;  
182 - this.data.loading = 1;  
183 - var e = this, th = e;  
184 - if (getApp().globalData.userInfo) {  
185 - t += "&user_id=" + getApp().globalData.userInfo.user_id;  
186 - }  
187 - this.data.requestUrl = t;  
188 -  
189 - var user_id = getApp().globalData.user_id;  
190 - if (!user_id) user_id = 0;  
191 - let data = {  
192 - is_mainshow: 1,  
193 - isonsale: 1,  
194 - store_id: oo.stoid,  
195 - orderField: e.data.tabname,  
196 - orderType: e.data.adname,  
197 - page: e.data.currentPage,  
198 - };  
199 -  
200 - let o = this.data.rq_data.o;  
201 - if (o) {  
202 - if (o.cat_id) data.cat_id = o.cat_id;  
203 - if (o.pid && o.pid != 'three') data.parent_id = o.pid;  
204 - if (o.nation_id) data.nation_id = o.nation_id;  
205 - if (o.brand_id) data.brand_id = o.brand_id;  
206 - };  
207 -  
208 -  
209 - getApp().request.promiseGet(t, { data: data }).then(async res => {  
210 - th.data.loading = 0;  
211 - if (ut.ajax_ok(res)) {  
212 - if (!e.data.requestData) {  
213 - // e.data.requestData=[];  
214 - e.setData({  
215 - requestData: [],  
216 - });  
217 - };  
218 - for (let i in res.data.data.pageData) {  
219 - let item = res.data.data.pageData[i];  
220 - item.original_img = th.data.url + item.original_img;  
221 -  
222 - /*--  
223 - var url="/api/weshop/activitylist/getGoodActInfo";  
224 - var req_data={  
225 - store_id:oo.stoid,goodsidlist:item.goods_id,is_detail:1,user_id:user_id  
226 - };  
227 - //获取商品的实际活动  
228 - await getApp().request.promiseGet(url, {data:req_data}).then(res=>{  
229 - if(res.data.code==0 && res.data.data && res.data.data.length==1){  
230 - item.prom_type=res.data.data[0].prom_type;  
231 - item.prom_id=res.data.data[0].act_id;  
232 - }  
233 - })--*/  
234 -  
235 - var prom_type = item.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购  
236 - var prom_id = item.prom_id;  
237 - var now = ut.gettimestamp();  
238 - var url = "";  
239 - switch (prom_type) {  
240 - case 1:  
241 - url = "/api/ms/flash_sale/getNew/" + oo.stoid + "/" + user_id + "/" + prom_id;  
242 - break;  
243 - case 2:  
244 - url = "/api/weshop/goods/groupBuy/getActInfo/" + oo.stoid + "/" + item.goods_id + "/" + prom_id  
245 - break;  
246 - case 4:  
247 - url = "/api/weshop/integralbuy/get/" + oo.stoid + "/" + prom_id;  
248 - break;  
249 - case 6:  
250 - url = "/api/weshop/teamlist/get/" + oo.stoid + "/" + prom_id;  
251 - await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1", {  
252 - data: {  
253 - store_id: oo.stoid,  
254 - is_end: 0,  
255 - is_show: 1,  
256 - user_id: getApp().globalData.user_id,  
257 - pageSize: 1000,  
258 - }  
259 - }).then(pd => {  
260 - let pd_list = pd.data.data.pageData;  
261 - if (res.data.code == 0 && pd_list.length > 0) {  
262 - var flag = pd_list.some(pd => {  
263 - return pd.goods_id == item.goods_id  
264 - })  
265 -  
266 - if (!flag) {  
267 - item.prom_type = 0;  
268 - item.prom_id = 0;  
269 - item.prom_price = null;  
270 - }  
271 - }  
272 - })  
273 - break;  
274 - case 8:  
275 - var presell_id = prom_id;  
276 - var url1 = "/api/weshop/marketing/marketingPresellList/list";  
277 - var rd = {  
278 - store_id: oo.stoid,  
279 - presell_id: presell_id,  
280 - goods_id: item.goods_id  
281 - }  
282 - //------获取预售从表----------  
283 - await getApp().request.promiseGet(url1, {  
284 - data: rd  
285 - }).then(res => {  
286 - if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {  
287 - var arr = res.data.data[0];  
288 - item.prom_price = arr.presell_price;  
289 - item.sales_sum = arr.buy_goodnum + (arr.virtual_qty ? arr.virtual_qty : 0);  
290 - }  
291 - })  
292 - break;  
293 - default:  
294 - break;  
295 - };  
296 - if (url != null && url != '') {  
297 - await getApp().request.promiseGet(url, {}).then(async res => {  
298 - var prom = null;  
299 - if (res.data.code == 0 && res.data.data) {  
300 - prom = res.data.data;  
301 -  
302 - if (prom != null && prom.is_end == 0 && prom.end_time > now && (prom.start_time < now || (prom_type!=2 && prom.show_time && prom.show_time < now))) {  
303 - item.prom_price = res.data.data.price;  
304 - if(prom_type==4){  
305 - item.prom_price= res.data.data.addmoney;  
306 - }  
307 -  
308 - if (res.data.data.user_price) item.prom_price = res.data.data.user_price;  
309 - var vNum = prom.virtual_num ? prom.virtual_num : 0;  
310 - var vNum1 = prom.virtualNum ? prom.virtualNum : 0;  
311 - var vNum2 = prom.virtual ? prom.virtual : 0;  
312 - item.sales_sum = prom.buy_num + (vNum + vNum1 + vNum2);  
313 - } else {  
314 - item.prom_type = 0;  
315 - item.prom_id = 0;  
316 - item.prom_price = null;  
317 - }  
318 - }  
319 - })  
320 - };  
321 - if (!th.data.requestData) th.data.requestData = [];  
322 - th.data.requestData.push(item);  
323 - e.setData({ requestData: e.data.requestData });  
324 - }  
325 - }  
326 - e.closeSearchModal();  
327 - })  
328 - },  
329 - onReachBottom: function () {  
330 - console.log('触发上滑加载事件');  
331 - this.data.currentPage++  
332 - console.log('触发上滑加载事件currentPage', this.data.currentPage);  
333 - this.data.openSearchModal || e.canloadMore() && this.requestSearch(this.data.requestUrl);  
334 - },  
335 -  
336 -  
337 - openFilterModal: function () {  
338 - this.setData({  
339 - openFilterModal: !0  
340 - });  
341 - },  
342 - closeFilterModal: function () {  
343 - this.setData({  
344 - openFilterModal: !1  
345 - });  
346 - },  
347 - filterGoods: function (t) {  
348 - this.resetData(), this.requestSearch(t.currentTarget.dataset.href), this.closeFilterModal();  
349 - },  
350 -  
351 -  
352 -  
353 - resetData: function () {  
354 - e.resetConfig(),  
355 - // this.data.requestData = null,  
356 - this.data.currentPage = 1;  
357 - this.setData({  
358 - requestData: null,  
359 - });  
360 - },  
361 -  
362 - //---回复最初的设置---显示全部分类--  
363 - restoreData: function () {  
364 - this.setData({  
365 - requestData: this.data.allData,  
366 - });  
367 - this.data.currentPage = 2;  
368 - },  
369 - openSearchModal: function () {  
370 - this.setData({  
371 - openSearchModal: !0  
372 - });  
373 - },  
374 - closeSearchModal: function () {  
375 - this.setData({  
376 - openSearchModal: !1  
377 - });  
378 - },  
379 -  
380 - submitSearch: function (t) {  
381 - var val = t.detail.value.word;  
382 - if (val == undefined) val = t.detail.value;  
383 - val = val ? val.trim() : '';  
384 - if (!val) {  
385 - a.showWarning("请输入关键词");  
386 - }  
387 - this.search(val);  
388 - },  
389 -  
390 - //热搜关键字  
391 - searchHotWord: function (t) {  
392 - var word = t.currentTarget.dataset.word;  
393 - if (word) {  
394 - this.setData({  
395 - keyword: word,  
396 - hiddenClear: false,  
397 - });  
398 - };  
399 - this.historyRecord(word);  
400 - this.search(word);  
401 - },  
402 -  
403 - //-----点击搜索按钮----  
404 - search: function (t) {  
405 - if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词");  
406 - this.data.key_str = t;  
407 - this.resetData();  
408 -  
409 - this.data.old_req_url=this.data.baseUrl + "&key_str=" + encodeURIComponent(t);  
410 -  
411 - this.set_screen(this.data.baseUrl + "&key_str=" + encodeURIComponent(t))  
412 - this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));  
413 - this.historyRecord();  
414 - },  
415 -  
416 - //---------分享配置--------  
417 - onShareAppMessage: function (e) {  
418 - getApp().globalData.no_clear = 1;  
419 - var curPage = this;  
420 - var pagePath = curPage.route; //当前页面url  
421 - if (pagePath.indexOf('/') != 0) {  
422 - pagePath = '/' + pagePath;  
423 - }  
424 -  
425 - if (this.data.key_str) {  
426 - pagePath += "?s_key=" + this.data.key_str;  
427 - }  
428 -  
429 - if (getApp().globalData.user_id) {  
430 -  
431 - if (pagePath.indexOf("?") > 0) {  
432 - pagePath += "&first_leader=" + getApp().globalData.user_id;  
433 - } else {  
434 - pagePath += "?first_leader=" + getApp().globalData.user_id;  
435 - }  
436 - }  
437 - //群id分享  
438 - if (getApp().globalData.groupchat_id) {  
439 - pagePath+="&groupchat_id="+getApp().globalData.groupchat_id  
440 - }  
441 -  
442 - // console.log("11-11"+pagePath);  
443 - return {  
444 - title: "商品搜索",  
445 - path: pagePath,  
446 - }  
447 - },  
448 -  
449 -  
450 - //---------图片失败,默认图片--------  
451 - bind_bnerr: function (e) {  
452 - var _errImg = e.target.dataset.errorimg;  
453 - var _errObj = {};  
454 - _errObj[_errImg] = this.data.url + "/miniapp/images/default_g_img.gif";  
455 - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;  
456 - },  
457 -  
458 - //--- 获取卡类列表 ---  
459 - getPlusCardType: function (func) {  
460 - var storid = oo.stoid;  
461 - var th = this;  
462 - getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {  
463 - var plusCard = res.data.data;  
464 - var arr = [1219, 2089, 3031];  
465 - var new_arr = new Array();  
466 - var card_name_map = new Map();  
467 - var user = getApp().globalData.userInfo;  
468 -  
469 - for (var i = 0; i < plusCard.length; i++) {  
470 - if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) {  
471 - continue;  
472 - }  
473 - var name = "card" + plusCard[i].CorrPrice.toLowerCase();  
474 - card_name_map.set(name, plusCard[i].CardName);  
475 - new_arr.push(plusCard[i]);  
476 -  
477 - }  
478 -  
479 - var ob = { "card_list": new_arr, "name_map": card_name_map };  
480 - func(ob);  
481 - })  
482 - },  
483 -  
484 -  
485 - getInput(e) {  
486 - let val = e.detail.value;  
487 - if (val) {  
488 - this.setData({  
489 - keyword: e.detail.value,  
490 - hiddenClear: false,  
491 - });  
492 - } else {  
493 - this.setData({  
494 - hiddenClear: true,  
495 - });  
496 - }  
497 -  
498 - },  
499 -  
500 - historyRecord(w) {  
501 - let keyword = w;  
502 - let self = this;  
503 - if (!keyword) {  
504 - keyword = this.data.key_str.trim();  
505 - }  
506 - let searchRecord = this.data.searchRecord;  
507 - if (!searchRecord || searchRecord.length == 0) searchRecord = wx.getStorageSync('searchRecord') || [];  
508 -  
509 - if (keyword) {  
510 -  
511 - var index = searchRecord.indexOf(keyword);  
512 - if (index > -1) {  
513 - // 已经存在该值  
514 - searchRecord.splice(index, 1);  
515 - searchRecord.unshift(keyword);  
516 -  
517 - // 将历史记录添加到缓存中  
518 - wx.setStorage({  
519 - key: 'searchRecord',  
520 - data: searchRecord,  
521 - success: function (res) {  
522 - self.setData({  
523 - searchRecord,  
524 - })  
525 - }  
526 - })  
527 -  
528 - return;  
529 - } else {  
530 - if (searchRecord.length >= 10) {  
531 - searchRecord.pop(); // 删除最早的一条记录  
532 - };  
533 - searchRecord.unshift(keyword);  
534 -  
535 - // // 将历史记录添加到缓存中  
536 - wx.setStorage({  
537 - key: 'searchRecord',  
538 - data: searchRecord,  
539 - success: function (res) {  
540 - self.setData({  
541 - searchRecord,  
542 - })  
543 - }  
544 - })  
545 - };  
546 - };  
547 - },  
548 -  
549 - closePoster() {  
550 - this.setData({  
551 - fliter_flag: false,  
552 - });  
553 - },  
554 -  
555 - show_fliter() {  
556 - this.setData({  
557 - fliter_flag: true  
558 - })  
559 - },  
560 - fliter_close() {  
561 - this.setData({  
562 - fliter_flag: false,  
563 - })  
564 - },  
565 -  
566 -  
567 - // 获取历史搜索记录  
568 - getHistorySearch() {  
569 - this.setData({  
570 - searchRecord: wx.getStorageSync('searchRecord') || [] //若无存储则为空  
571 - });  
572 - },  
573 -  
574 - // 清除历史搜素记录  
575 - clearSearchRecord() {  
576 - wx.clearStorageSync('searchRecord');  
577 - this.setData({  
578 - searchRecord: []  
579 - });  
580 - },  
581 -  
582 - go_url: function (e) {  
583 - var url = e.currentTarget.dataset.url;  
584 - getApp().goto(url);  
585 - },  
586 -  
587 - clearInput() {  
588 - this.setData({  
589 - keyword: '',  
590 - hiddenClear: true,  
591 - openSearchModal: true,  
592 - });  
593 - },  
594 -  
595 - inputFocus(e) {  
596 - this.setData({  
597 - openSearchModal: true,  
598 - });  
599 - },  
600 -  
601 - /*-- 和筛选相关的 --*/  
602 - bind_pk_sort(e){ com_fil.bind_pk_sort(e,this); },  
603 - set_screen(url){ com_fil.set_screen(url,this); },  
604 - filterGoods(e){ com_fil.filterGoods(e,this); },  
605 - open_more(e){ com_fil.open_more(e,this); },  
606 - clear_fil(){ com_fil.clear_fil(this); }  
607 -  
608 -  
609 -});  
610 \ No newline at end of file 0 \ No newline at end of file
pages/goods/search/search.json deleted
1 -{  
2 - "navigationBarTitleText": "商品搜索",  
3 - "enablePullDownRefresh": false,  
4 - "usingComponents": {  
5 - "share_box": "/components/share_box/share_box"  
6 - },  
7 - "componentPlaceholder": {  
8 - "van-popup": "view"  
9 - }  
10 -}  
11 \ No newline at end of file 0 \ No newline at end of file
pages/goods/search/search.wxml deleted
1 -<wxs module="g_filter" src="g_filter.wxs"></wxs>  
2 -  
3 -<view class="container">  
4 - <!-- 搜索框 -->  
5 - <view class="search-bar">  
6 - <form bindsubmit="submitSearch">  
7 - <view class="pdh20 pdv10 flex ai_c jc_sb">  
8 - <view class="input-box">  
9 - <input class="input-search" name="word" placeholder="请输入商品关键字" bindconfirm="submitSearch" bindinput="getInput" bindfocus="inputFocus" value="{{keyword}}"/>  
10 - <text class="iconfont icon-guan" hidden="{{hiddenClear}}" catchtap="clearInput"></text>  
11 - </view>  
12 - <button class="btn" formType="submit" hover-class="none">搜索</button>  
13 - </view>  
14 - </form>  
15 - </view>  
16 -  
17 -  
18 - <view wx:if="{{openSearchModal}}">  
19 - <view class="pd20">  
20 - <view class="" wx:if="{{searchRecord.length != 0}}">  
21 - <view class="flex jc_sb ai_c">  
22 - <text class="fs28 bold">历史搜索</text>  
23 - <text class="iconfont icon-shanchu c-6" bindtap="clearSearchRecord" wx:if="{{searchRecord.length != 0}}"></text>  
24 - </view>  
25 - <block wx:if="{{searchRecord.length>0}}">  
26 - <view class="hot-row flex flex-wrap" wx:key="{{index}}">  
27 - <view class="hot-item history ellipsis-1" bindtap="searchHotWord" data-word="{{item}}" wx:for="{{searchRecord}}" wx:key="{{index}}">{{item}}</view>  
28 - </view>  
29 - </block>  
30 - <view wx:else class="fs24">暂无历史搜索记录</view>  
31 - </view>  
32 -  
33 - <view class="" wx:if="{{hotWords.length>0}}">  
34 - <view class="fs28 bold">热门搜索</view>  
35 - <block wx:if="{{hotWords.length>0}}">  
36 - <view class="hot-row" wx:for="{{hotWords}}" wx:key="{{index}}">  
37 - <view bindtap="searchHotWord" class="hot-item" data-word="{{item}}" wx:for="{{item}}" wx:key="{{index}}">{{item}}</view>  
38 - </view>  
39 - </block>  
40 - </view>  
41 - </view>  
42 - </view>  
43 -  
44 -  
45 -  
46 - <block wx:if="{{!openSearchModal}}">  
47 -  
48 - <view class="nav flex">  
49 - <navigator class="nav-item f1" >  
50 - <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name">  
51 - <text wx:if="{{tabname=='on_time'}}">新品</text>  
52 - <text wx:elif="{{tabname=='comment_count'}}">评论</text>  
53 - <text wx:else>综合</text>  
54 - </picker>  
55 - <view class="arrow_down"></view>  
56 - </navigator>  
57 -  
58 -  
59 - <navigator bindtap="changeTab" class="nav-item f1" data-href="sales_sum" data-ad="{{adname}}">销量  
60 - <view>  
61 - <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view>  
62 - <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view>  
63 - </view>  
64 - </navigator>  
65 - <navigator bindtap="changeTab" class="nav-item f1" data-href="final_price" data-ad="{{adname}}">价格  
66 - <view>  
67 - <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view>  
68 - <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view>  
69 - </view>  
70 - </navigator>  
71 - <navigator bindtap="openFilterModal" class="nav-item f1">筛选<view class="ico-filter">  
72 - <image class="wh100" src="{{url}}/miniapp/images/xx.png"></image>  
73 - </view>  
74 - </navigator>  
75 - <!-- <navigator bindtap="openSearchModal" class="nav-item nav-search">  
76 - <image class="wh100 search-img" src="{{url}}/miniapp/images/search.png"></image>  
77 - </navigator> -->  
78 - </view>  
79 -  
80 -  
81 -  
82 - <view class="choice_list">  
83 - <navigator class="choice_item flex ai-center" url="{{g_filter.get_goods_url(item)}}" wx:for="{{requestData}}" wx:key="{{index}}">  
84 - <view class="img-wrap">  
85 - <image src="{{item.original_img}}" lazy-load="true" binderror="bind_bnerr" data-errorimg="requestData[{{index}}].original_img"></image>  
86 - </view>  
87 - <view class="item-cont">  
88 - <view class="title ellipsis-2">{{item.goods_name}}</view>  
89 - <!-- 判断是否有活动价,小程序没有有团购和拼单 -->  
90 - <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10}}">  
91 - <!-- 活动价 -->  
92 - <view class="price">  
93 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
94 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
95 - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>  
96 - </view>  
97 - <view class="comment flex jc_sb">  
98 -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->  
99 - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>  
100 - </view>  
101 - </block>  
102 - <block wx:else>  
103 - <!-- 商品价格,先判断下是后又等级价-->  
104 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">  
105 - <!-- 当会员是等级卡的时候 -->  
106 - <block wx:if="{{card_field}}">  
107 - <!-- 等级价>0 -->  
108 - <block wx:if="{{item[card_field]>0}}">  
109 - <view class="flex ai_center">  
110 - <view class="price">¥{{item[card_field]}}</view>  
111 - <view class="card_bg flex ai-center">  
112 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
113 - <!-- <view class="card_name ellipsis-1">{{card_name}}</view> -->  
114 - <text class="ellipsis-1">{{card_name}}</text>  
115 - </view>  
116 - </view>  
117 - <view class="comment flex jc_sb">  
118 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash no_line_x">¥{{item.market_price}}</view>  
119 - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>  
120 - </view>  
121 - </block>  
122 - <block wx:else>  
123 - <view class="price">¥{{item.shop_price}}</view>  
124 - <view class="comment flex jc_sb">  
125 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash no_line_x">¥{{item.market_price}}</view>  
126 - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>  
127 - </view>  
128 - </block>  
129 - </block>  
130 - <block wx:else>  
131 - <block wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">  
132 - <view class="flex ai-center">  
133 - <view class="price">¥{{item.shop_price}}</view>  
134 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price no_line_x">¥{{item.market_price}}</view>  
135 - </view>  
136 - <view class="comment flex jc_sb">  
137 - <view class="flex ai_center">  
138 - <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view>  
139 - <view class="card_bg flex">  
140 - <view class="flex ai-center">  
141 - <image src="{{url}}/miniapp/images/plus/dj_icon.png" class=""></image>  
142 - <text class="ellipsis-1">{{g_filter.get_card_price(item,card_list,1)}}</text>  
143 - </view>  
144 - </view>  
145 - </view>  
146 - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>  
147 - </view>  
148 - </block>  
149 - <block wx:else>  
150 - <view class="price">¥{{item.shop_price}}</view>  
151 - <view class="comment flex jc_sb">  
152 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash no_line_x">¥{{item.market_price}}</view>  
153 - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>  
154 - </view>  
155 - </block>  
156 - </block>  
157 - </block>  
158 - <block wx:else>  
159 - <view class="price">¥{{item.shop_price}}</view>  
160 - <view class="comment flex jc_sb">  
161 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash no_line_x">¥{{item.market_price}}</view>  
162 - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>  
163 - </view>  
164 - </block>  
165 - </block>  
166 - </view>  
167 - </navigator>  
168 - <!-- 有商品列表的时候,要有分享攻击 -->  
169 - <share_box id="share"></share_box>  
170 - </view>  
171 - <!-- 无数据提示 -->  
172 - <view class="no-data" wx:if="{{!requestData||requestData.length==0}}">  
173 - <image class="cart-image" src="{{url}}/miniapp/images/cart-null.png"></image>  
174 - <view class="no-data-title">没有相关的数据</view>  
175 - <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index"> 去逛逛 </navigator>  
176 - </view>  
177 -  
178 - </block>  
179 -</view>  
180 -  
181 -<include src="../com_screen.wxml" />  
182 \ No newline at end of file 0 \ No newline at end of file
pages/goods/search/search.wxss deleted
1 -.container {  
2 - color: #666;  
3 - overflow: visible;  
4 -}  
5 -  
6 -.nav {  
7 - position: sticky;  
8 - top: 90rpx;  
9 - background-color: white;  
10 - z-index: 99;  
11 -}  
12 -  
13 -.nav-item {  
14 - /* float: left;  
15 - width: 30%;  
16 - height: 90rpx;  
17 - line-height: 90rpx; */  
18 - padding: 14rpx 10rpx;  
19 - display: flex;  
20 - align-items: center;  
21 - justify-content: center;  
22 - font-size: 28rpx;  
23 - border-bottom: 2rpx solid #E6E6E6;  
24 - background-color: #fff;  
25 -}  
26 -  
27 -.nav-item .ico-dg {  
28 - width: 18rpx;  
29 - height: 12rpx;  
30 - margin-left: 10rpx;  
31 - line-height: 0;  
32 -}  
33 -  
34 -.nav-item .ico-filter {  
35 - width: 20rpx;  
36 - height: 20rpx;  
37 - margin-left: 10rpx;  
38 - line-height: 0;  
39 -}  
40 -  
41 -.ico-dir {  
42 - width: 16rpx;  
43 - height: 22rpx;  
44 - margin-left: 10rpx;  
45 - background-repeat: no-repeat;  
46 - background-size: cover;  
47 - background-position-x: 0;  
48 -}  
49 -  
50 -.ico-dir-dn {  
51 - background-position-x: -16rpx;  
52 -}  
53 -  
54 -.ico-dir-up {  
55 - background-position-x: -32rpx;  
56 -}  
57 -  
58 -.nav-search {  
59 - width: 10%;  
60 -}  
61 -  
62 -.nav-item .search-img {  
63 - width: 30rpx;  
64 - height: 30rpx;  
65 -}  
66 -  
67 -.choice_list {  
68 - background-color: #fff;  
69 -}  
70 -  
71 -.choice_item {  
72 - position: relative;  
73 - width: 100%;  
74 - min-height: 200rpx;  
75 - padding: 10rpx 0;  
76 - border-bottom: 2rpx solid #E6E6E6;  
77 - font-size: 30rpx;  
78 -}  
79 -  
80 -.img-wrap {  
81 - /* float: left; */  
82 - width: 180rpx;  
83 - height: 180rpx;  
84 - padding: 0 10rpx 0 30rpx;  
85 - flex-shrink: 0;  
86 - /* padding: 10rpx; */  
87 -}  
88 -  
89 -.img-wrap image {  
90 - width: 100%;  
91 - height: 100%;  
92 -}  
93 -  
94 -.item-cont .title {  
95 - height: 72rpx;  
96 - margin: 16rpx 0;  
97 - padding-right: 30rpx;  
98 - line-height: 36rpx;  
99 - color: #333;  
100 - overflow: hidden;  
101 - text-align: justify;  
102 -}  
103 -  
104 -.price {  
105 - display: inline-block;  
106 - color: #f23030;  
107 - /* line-height: 24rpx; */  
108 - /* padding-bottom: 20rpx; */  
109 -}  
110 -  
111 -.comment {  
112 - font-size: 25rpx;  
113 - padding-right: 30rpx;  
114 - margin-top: 4rpx;  
115 -}  
116 -  
117 -  
118 -.viewall-btn {  
119 - margin-top: 20rpx;  
120 - width: 300rpx;  
121 -}  
122 -  
123 -.search-modal {  
124 - /* position: fixed;  
125 - top: 0;  
126 - right: 0;  
127 - left: 0;  
128 - bottom: 0;  
129 - z-index: 20;  
130 - background-color: white;  
131 - overflow-x: hidden;  
132 - padding: 80rpx 30rpx;  
133 - font-size: 30rpx;  
134 - color: #555; */  
135 -}  
136 -  
137 -.search-bar {  
138 - /* width: 100%;  
139 - box-sizing: border-box; */  
140 - background-color: white;  
141 - position: sticky;  
142 - top: 0;  
143 - z-index: 1;  
144 -}  
145 -  
146 -.search-input {  
147 - width: 80%;  
148 - float: left;  
149 - border: 1rpx solid #e0e0e0;  
150 - box-sizing: border-box;  
151 - height: 80rpx;  
152 - padding-left: 20rpx;  
153 - border-top-left-radius: 10rpx;  
154 - border-bottom-left-radius: 10rpx;  
155 -}  
156 -  
157 -.search-btn {  
158 - width: 20%;  
159 - height: 80rpx;  
160 - background-color: #f23030;  
161 - display: inline-block;  
162 - text-align: center;  
163 - border-top-right-radius: 10rpx;  
164 - border-bottom-right-radius: 10rpx;  
165 -}  
166 -  
167 -.search-btn .search-img {  
168 - height: 45rpx;  
169 - width: 45rpx;  
170 - padding: 20rpx;  
171 -}  
172 -  
173 -.search-hot {  
174 - margin-top: 40rpx;  
175 -}  
176 -  
177 -.hot-title {  
178 - font-size: 35rpx;  
179 - color: black;  
180 - /* margin-bottom: 30rpx; */  
181 -}  
182 -  
183 -.hot-row {  
184 - display: flex;  
185 - /*--justify-content: space-between---*/  
186 - padding: 10rpx 0;  
187 -}  
188 -  
189 -.hot-item {  
190 - padding: 6rpx 20rpx;  
191 - border: 2rpx solid #e0e0e0;  
192 - border-radius: 40rpx;  
193 - font-size: 28rpx;  
194 - margin-right: 16rpx;  
195 -}  
196 -  
197 -/* .card_bg {  
198 - display: flex;  
199 - max-width: 110rpx;  
200 - height: 25rpx;  
201 - align-items: center;  
202 - border-radius: 26rpx;  
203 - font-size: 19rpx;  
204 - padding: 2rpx 10rpx;  
205 - background: #333;  
206 - color: #fff;  
207 - justify-content: center;  
208 - margin-left: 8rpx;  
209 - margin-top: 7rpx;  
210 - line-height: 25rpx;  
211 - width: auto;  
212 -} */  
213 -  
214 -.card_bg {  
215 - box-sizing: border-box;  
216 - padding: 2rpx 10rpx;  
217 - /* height: 28rpx; */  
218 - border-radius: 26rpx;  
219 - font-size: 18rpx;  
220 - /* line-height: 28rpx; */  
221 - max-width: 210rpx;  
222 - background: #333;  
223 - color: #fff;  
224 - margin-left: 8rpx;  
225 -}  
226 -  
227 -.card_bg image {  
228 - width: 19rpx;  
229 - height: 19rpx;  
230 - margin-right: 8rpx;  
231 - flex-shrink: 0;  
232 -}  
233 -  
234 -.card_name {  
235 - position: relative;  
236 - top: -4rpx;  
237 -}  
238 -  
239 -/* .card_bg image {  
240 - width: 19rpx;  
241 - height: 19rpx;  
242 - margin-right: 1rpx;  
243 - vertical-align: middle;  
244 -}  
245 -  
246 -.card_bg .card_name {  
247 - max-width: 76rpx;  
248 - width: auto;  
249 - overflow: hidden;  
250 - white-space: nowrap;  
251 -} */  
252 -  
253 -.navigator-hover {  
254 - opacity: 1;  
255 -}  
256 -  
257 -.mk_price {  
258 - margin-left: 10rpx;  
259 - font-size: 25rpx;  
260 -}  
261 -  
262 -.item-cont {  
263 - /* line-height: 38rpx; */  
264 - flex-grow: 1;  
265 -}  
266 -  
267 -.history {  
268 - background-color: #f0f0f0;  
269 - color: #7b7b7b;  
270 - border: none;  
271 - margin-bottom: 16rpx;  
272 -}  
273 -  
274 -.history:first-of-type {  
275 - /* margin-left: 0; */  
276 -}  
277 -  
278 -.input-box {  
279 - position: relative;  
280 - flex: 1;  
281 - padding-left: 50rpx;  
282 - padding-right: 70rpx;  
283 - background-color: #f0f0f0;  
284 - border-radius: 60rpx;  
285 -}  
286 -  
287 -.input-box::before {  
288 - font-family: iconfont;  
289 - position: absolute;  
290 - left: 20rpx;  
291 - top: 50%;  
292 - transform: translateY(-50%);  
293 - content: '\e618';  
294 -}  
295 -  
296 -.input-search {  
297 - position: relative;  
298 - padding: 10rpx;  
299 - font-size: 28rpx;  
300 -}  
301 -  
302 -  
303 -.btn {  
304 - margin-left: 0;  
305 - margin-right: 0;  
306 - line-height: 1;  
307 - padding: 20rpx;  
308 - font-size: 30rpx;  
309 -}  
310 -  
311 -.btn::after {  
312 - border: none;  
313 -}  
314 -  
315 -.icon-guan {  
316 - font-size: 20rpx;  
317 - padding: 10rpx;  
318 - position: absolute;  
319 - right: 20rpx;  
320 - top: 50%;  
321 - transform: translateY(-50%);  
322 -}  
323 -  
324 -.lookat {  
325 - display: inline-block;  
326 - color: #FF6768;  
327 - border: 2rpx solid #FF6768;  
328 - border-radius: 80rpx;  
329 - font-size: 30rpx;  
330 -}  
331 -  
332 -.no-data .no-data-title {  
333 - font-size: 28rpx;  
334 - color: #999;  
335 -}  
336 -  
337 -.mt30 {  
338 - margin-top: 30rpx;  
339 -}  
340 -  
341 -.popup_item {  
342 - display: flex;  
343 - justify-content: space-between;  
344 - margin-top: 30rpx;  
345 -}  
346 -  
347 -.popup_input {  
348 - border-radius: 20rpx;  
349 - width: 40%;  
350 - font-size: 24rpx;  
351 - padding: 10rpx;  
352 - background: #f9f9f9;  
353 -}  
354 -.popup_price1 {  
355 - text-align: center;  
356 - padding: 0 30rpx;  
357 - margin-top: 30rpx;  
358 - background: red;  
359 - border-radius: 20rpx;  
360 -}  
361 -  
362 -.popup_price {  
363 - text-align: center;  
364 - padding: 10rpx 30rpx;  
365 - margin-top: 30rpx;  
366 - background: red;  
367 - border-radius: 35rpx;  
368 -}  
369 -.mask {  
370 - position: fixed;  
371 - top: 0;  
372 - left: 0;  
373 - width: 100%;  
374 - height: 100%;  
375 - z-index: 999;  
376 - background-color: rgba(0,0,0,.4);  
377 - }  
378 -  
379 -.popup_brand {  
380 - display: flex;  
381 - flex-wrap: wrap;  
382 - justify-content: space-between;  
383 -}  
384 -  
385 -.filter {  
386 - height: 100%;  
387 - position: absolute;  
388 - right: 0;  
389 - top: 0;  
390 - background: pink;  
391 - width: 80%;  
392 - z-index: 1000;  
393 - transition: all .5s;  
394 -}  
395 -  
396 -  
397 -@import '../com_screen.wxss';  
398 \ No newline at end of file 0 \ No newline at end of file
pages/index/index/index.js
@@ -932,7 +932,7 @@ Page({ @@ -932,7 +932,7 @@ Page({
932 }, 932 },
933 jumpSearch: function () { 933 jumpSearch: function () {
934 wx.navigateTo({ 934 wx.navigateTo({
935 - url: "/pages/goods/search/search" 935 + url: "/packageG/pages/goods/search/search"
936 }); 936 });
937 }, 937 },
938 onShareAppMessage: function (e) { 938 onShareAppMessage: function (e) {
@@ -1149,7 +1149,7 @@ Page({ @@ -1149,7 +1149,7 @@ Page({
1149 success: (res) => { 1149 success: (res) => {
1150 var result = res.result; 1150 var result = res.result;
1151 wx.navigateTo({ 1151 wx.navigateTo({
1152 - url: "/pages/goods/search/search?s_key=" + result, 1152 + url: "/packageG/pages/goods/search/search?s_key=" + result,
1153 }); 1153 });
1154 } 1154 }
1155 }) 1155 })
pages/order/refund_order/refund_order.js
@@ -15,9 +15,10 @@ Page({ @@ -15,9 +15,10 @@ Page({
15 reasonSelect: 0, 15 reasonSelect: 0,
16 reasonList: [ "没有收到货", "不喜欢/不想要", "个人原因拍错/漏拍", "空包裹", "未按照约定时间发货", "快递/物流未送达", "快递/物流无跟踪记录", "发错快递", "商品破损", "商品尺寸规格不符", "商品质量差,与网上描述不符", "其他原因" ], 16 reasonList: [ "没有收到货", "不喜欢/不想要", "个人原因拍错/漏拍", "空包裹", "未按照约定时间发货", "快递/物流未送达", "快递/物流无跟踪记录", "发错快递", "商品破损", "商品尺寸规格不符", "商品质量差,与网上描述不符", "其他原因" ],
17 refund_type:0, 17 refund_type:0,
18 - isloading:0, 18 + isloading:0,
  19 + template_id:[],
19 }, 20 },
20 - onLoad: function(t) { 21 + onLoad: async function(t) {
21 var th=this; 22 var th=this;
22 getApp().getConfig2(function (em) { 23 getApp().getConfig2(function (em) {
23 24
@@ -53,8 +54,30 @@ Page({ @@ -53,8 +54,30 @@ Page({
53 }) 54 })
54 }); 55 });
55 }) 56 })
  57 + try {
  58 + let template_id =await getApp().get_template_id('1025')
  59 + this.setData({
  60 + template_id
  61 + })
  62 + } catch (error) {}
56 }, 63 },
57 - 64 + //订阅消息提醒
  65 + sendsm: function (ee) {
  66 + let th = this;
  67 + var template_id = this.data.template_id;
  68 + console.error('退款');
  69 + console.error(template_id);
  70 + // //授权订阅
  71 + wx.requestSubscribeMessage({
  72 + tmplIds: template_id,
  73 + success(res) {
  74 + th.refundOrder(ee);
  75 + },
  76 + fail(res) {
  77 + th.refundOrder(ee);
  78 + }
  79 + })
  80 + },
58 //------提交退款申请------- 81 //------提交退款申请-------
59 refundOrder: function(e) { 82 refundOrder: function(e) {
60 //if(!this.data.back_money){ 83 //if(!this.data.back_money){
pages/order/refund_order/refund_order.wxml
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <view>3.支付金额,抵扣余额积分都按原路退款</view> 8 <view>3.支付金额,抵扣余额积分都按原路退款</view>
9 <view>4.订单一旦取消,无法恢复</view> 9 <view>4.订单一旦取消,无法恢复</view>
10 </view> 10 </view>
11 - <form bindsubmit="refundOrder"> 11 + <form bindsubmit="sendsm">
12 <view bindtap="openReasonModal" class="item" data-id="0"> 12 <view bindtap="openReasonModal" class="item" data-id="0">
13 <view class="item-name">退款原因:</view> 13 <view class="item-name">退款原因:</view>
14 <view class="item-input">{{reasonList[reasonSelect]}}</view> 14 <view class="item-input">{{reasonList[reasonSelect]}}</view>
pages/payment/pay_success/pay_success.js deleted
1 -var e = getApp();  
2 -var regeneratorRuntime = require('../../../utils/runtime.js');  
3 -var ut = require("../../../utils/util.js");  
4 -Page({  
5 - /**  
6 - * 页面的初始数据  
7 - */  
8 - data: {  
9 - url: e.globalData.setting.imghost,  
10 - resourceUrl: e.globalData.setting.resourceUrl,  
11 - iurl: e.globalData.setting.imghost,  
12 - order:null,  
13 - type:1,  
14 - allmoney:0,  
15 - user_money:0,  
16 - order_sn:"",  
17 - pick:null,  
18 - pre_cut:0,//预存金额  
19 - },  
20 -  
21 - /**  
22 - * 生命周期函数--监听页面加载  
23 - */  
24 - onLoad:async function(options) {  
25 - wx.setNavigationBarTitle({  
26 - title: '支付成功',  
27 - });  
28 - this.setData({  
29 - options,  
30 - });  
31 - var type=options.type,order_sn=options.order_sn;  
32 - var th=this,order=null;  
33 -  
34 - getApp().request.promiseGet("/api/weshop/ad/page?pid=1211&store_id=" + getApp().globalData.setting.stoid, {  
35 - data: {  
36 - enabled: 1  
37 - }  
38 - }).then(res => {  
39 - if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) {  
40 - var a = res.data.data.pageData;  
41 - var arr = new Array();  
42 - for (var i = 0; i < a.length; i++) {  
43 - var tt = {  
44 - 'ad_code': getApp().globalData.setting.imghost + a[i].ad_code,  
45 - 'media_link': '',  
46 - 'ad_weapplink': a[i].ad_weapplink  
47 - };  
48 - arr.push(tt);  
49 - }  
50 - if (arr.length > 0) th.setData({  
51 - banner: arr,  
52 - });  
53 - }  
54 - })  
55 -  
56 -  
57 -  
58 - // 卡项订单  
59 - if(options.card == 1) {  
60 - let url = '/api/weshop/recharge/user/page'  
61 - let data = {  
62 - store_id: getApp().globalData.setting.stoid,  
63 - user_id: getApp().globalData.userInfo.user_id,  
64 - order_id: this.data.options.order_id,  
65 - };  
66 -  
67 - // 请求数据  
68 - getApp().promiseGet(url, {  
69 - data: data,  
70 - }).then(res => {  
71 - if (res.data.code == 0) {  
72 - console.log('请求成功', res);  
73 - this.setData({  
74 - order: res.data.data.pageData[0],  
75 - order_sn: res.data.data.pageData[0].order_sn,  
76 - });  
77 - } else {  
78 - throw (res);  
79 - };  
80 - }).catch(err => {  
81 - wx.showToast({  
82 - title: err.data.data,  
83 - icon: 'error',  
84 - });  
85 - });  
86 - } else {  
87 -  
88 - //如果是等1,就是单个订单的订单号  
89 - if(type==1){  
90 - await getApp().request.promiseGet("/api/weshop/order/page",  
91 - {data:{store_id:e.globalData.setting.stoid,order_sn:order_sn}}).then(res=>{  
92 - if(ut.ajax_ok(res)){  
93 - order=res.data.data.pageData[0];  
94 - th.setData({order:order,order_sn:order_sn})  
95 - }  
96 -  
97 - })  
98 - }else{  
99 - await getApp().request.promiseGet("/api/weshop/order/page",  
100 - {data:{store_id:e.globalData.setting.stoid,parent_sn:order_sn}}).then(res=>{  
101 -  
102 - if(ut.ajax_ok(res)){  
103 - var allmoney=0,user_money=0;  
104 - for(var i in res.data.data.pageData){  
105 - var item=res.data.data.pageData[i];  
106 - allmoney+=item.order_amount;  
107 - user_money += item.user_money?item.user_money:0;  
108 - }  
109 - order=res.data.data.pageData[0];  
110 - th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money})  
111 - }  
112 -  
113 -  
114 - })  
115 - }  
116 - //--获取门店--  
117 - if(order.exp_type==1) {  
118 - await getApp().request.promiseGet("/api/weshop/pickup/get/"+ e.globalData.setting.stoid+"/"+order.pickup_id,  
119 - {1:1}).then(res => {  
120 - th.setData({pick:res.data.data})  
121 - });  
122 - };  
123 - //--只使用预存支付,达到免单时要请求预存使用额度----  
124 - if(order.order_amount==0 && order.user_money==0){  
125 - await getApp().request.promiseGet("/api/weshop/orderMore/get/"+ e.globalData.setting.stoid+"/"+order_sn,{1:1}).then(res => {  
126 - if(res.data && res.data.code==0 && res.data.data){  
127 - let pre_cut=res.data.data.pre_cut  
128 - th.setData({pre_cut})  
129 - }  
130 - });  
131 - }  
132 -  
133 - };  
134 -  
135 -  
136 -  
137 - },  
138 -  
139 - goto: function() {  
140 - var url= '/pages/index/index/index';  
141 - getApp().goto(url)  
142 - },  
143 -  
144 - gotoshequn:function(e){  
145 - getApp().goto(e.currentTarget.dataset.url);  
146 - },  
147 -  
148 -  
149 -})  
150 \ No newline at end of file 0 \ No newline at end of file
pages/payment/pay_success/pay_success.json deleted
1 -{  
2 - "navigationBarTitleText": "支付成功"  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/payment/pay_success/pay_success.wxml deleted
1 -<wxs module="filters" src="../../../utils/filter.wxs"></wxs>  
2 -<view>  
3 - <!-- 支付成功提示 -->  
4 - <view class="payradio">  
5 - <!-- 提示框 -->  
6 - <view class="Success_box flex-center">  
7 - <view>  
8 - <view class="flex-center">  
9 - <image src="{{url}}miniapp/images/pay/paysuccess.png"></image>  
10 - </view>  
11 - <view class="Success_box_title fs32">订单支付成功!</view>  
12 - </view>  
13 - </view>  
14 -  
15 -  
16 - <!-- 链接 -->  
17 - <view class="fs28 pd20" style="padding-top: 0;">  
18 - <view class="flex-center">  
19 -  
20 - <block wx:if="{{options.card == 1}}">  
21 - <!-- <view class="flex-center"> -->  
22 - <navigator class="btn border c-6" url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{order.order_id}}">  
23 - <view>订单详情</view>  
24 - </navigator>  
25 - <!-- </view> -->  
26 - <!-- <view class="flex-center"> -->  
27 - <navigator class="btn bg-red white mgl20" url="/pages/user/my_service/i_service">  
28 - <view>立即预约</view>  
29 - </navigator>  
30 - <!-- </view> -->  
31 - </block>  
32 -  
33 - <block wx:else>  
34 -  
35 - <navigator class="btn border c-6" bindtap="goto">  
36 - <view>回到首页</view>  
37 - </navigator>  
38 - <navigator class="btn bg-yellow white mgl20" url="/pages/user/order_list/order_list">  
39 - <view>查看订单</view>  
40 - </navigator>  
41 - </block>  
42 -  
43 - </view>  
44 -  
45 - </view>  
46 -  
47 -  
48 - <!-- 支付信息 -->  
49 - <view class="payitem_max fs28">  
50 - <!-- 订单编号 -->  
51 - <view class="payitem flex">  
52 - <view>订单编号 :</view>  
53 - <text selectable="true">{{order_sn}}</text>  
54 - </view>  
55 -  
56 - <!-- 实付金额 -->  
57 -  
58 - <view class="payitem flex">  
59 - <view>实付金额 :</view>  
60 - <!-- {{filters.toFix()}} -->  
61 - <!-- 卡项订单 -->  
62 - <view class="pay_money" wx:if="{{options.card == 1}}">{{filters.toFix(order.account,2) }}元</view>  
63 -  
64 - <block wx:else>  
65 - <view class="pay_money" wx:if="{{type==1}}">  
66 - <view wx:if="{{order.order_amount==0 && order.user_money==0 && pre_cut>0}}">{{filters.toFix(pre_cut,2)}}元</view>  
67 - <view wx:else>{{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元</view>  
68 - </view>  
69 - <view class="pay_money" wx:else>  
70 - <view wx:if="{{order.order_amount==0 && order.user_money==0 && pre_cut>0}}">{{filters.toFix(pre_cut,2)}}元</view>  
71 - <view wx:else>{{filters.toFix(allmoney+user_money,2) }}元</view>  
72 - </view>  
73 - </block>  
74 - </view>  
75 -  
76 - <!-- 支付方式 -->  
77 - <view class="payitem flex" wx:if="{{options.card == 1}}">  
78 - <view>支付方式 :</view>  
79 - <view>微信支付</view>  
80 - </view>  
81 -  
82 - <block wx:else>  
83 - <view class="payitem flex" wx:if="{{type==1}}">  
84 - <view>支付方式 :</view>  
85 - <view wx:if="{{order.order_amount>0 && order.user_money>0 }}">微信支付,余额支付</view>  
86 - <view wx:elif="{{order.order_amount>0}}">微信支付</view>  
87 - <view wx:elif="{{order.user_money>0}}">余额支付</view>  
88 - <view wx:else>  
89 - <view wx:if="{{pre_cut>0}}">预存抵扣</view>  
90 - <view wx:else>免单</view>  
91 - </view>  
92 - </view>  
93 - <view class="payitem flex" wx:else>  
94 - <view>支付方式 :</view>  
95 - <view wx:if="{{allmoney>0 && user_money>0 }}">微信支付,余额支付</view>  
96 - <view wx:elif="{{allmoney>0}}">微信支付</view>  
97 - <view wx:elif="{{user_money>0}}">余额支付</view>  
98 - <view wx:else>  
99 - <view wx:if="{{pre_cut>0}}">预存抵扣</view>  
100 - <view wx:else>免单</view>  
101 - </view>  
102 - </view>  
103 - </block>  
104 -  
105 -  
106 -  
107 -  
108 - </view>  
109 - </view>  
110 - <view class="flex-level">  
111 - <view class="line"></view>  
112 - </view>  
113 -  
114 -  
115 -  
116 - <!-- 跳转链接 -->  
117 - <view>  
118 - <!-- 个人收货信息 -->  
119 - <view class="pay_User fs28" wx:if="{{order.exp_type==0 || order.exp_type==2 }}">  
120 - <view class="payitem flex">  
121 - <view class="pay_Receiving">收货人 :</view>  
122 - <view class="pay_name ellipsis-1">{{order.consignee}}</view>  
123 - <view>{{order.mobile}}</view>  
124 - </view>  
125 - <view class="payitem flex">  
126 - <view class="pay_Receiving">收货地址 :</view>  
127 - <view class="address ellipsis-2">{{order.more_address+order.address}}</view>  
128 - </view>  
129 - </view>  
130 -  
131 - <!-- 收货门店信息 -->  
132 - <view class="pay_User fs28" wx:else>  
133 - <view class="payitem flex">  
134 - <view class="pay_Receiving">门店 :</view>  
135 - <view class="pay_name ellipsis-1" wx:if="{{options.card == 1}}">{{order.list[0].pickup_name}}</view>  
136 - <view class="pay_name ellipsis-1" wx:else>{{pick.pickup_name}}</view>  
137 - </view>  
138 - <view class="payitem flex">  
139 - <view class="pay_Receiving">门店地址 :</view>  
140 - <view class="pay_name" wx:if="{{options.card == 1}}">{{order.list[0].fulladdress}}</view>  
141 - <view class="address ellipsis-2" wx:else>{{pick.fulladdress}}</view>  
142 - </view>  
143 - </view>  
144 -  
145 - </view>  
146 -</view>  
147 -  
148 -  
149 -<view class="shequn" style="margin-top:20rpx;" bindtap="gotoshequn" wx:if="{{banner}}" data-url="{{banner[0].ad_weapplink}}">  
150 - <image src="{{banner[0].ad_code}}" mode="scaleToFill" style="width: 100%;border-radius: 15rpx;" />  
151 -</view>  
152 \ No newline at end of file 0 \ No newline at end of file
pages/payment/pay_success/pay_success.wxss deleted
1 -page {  
2 - border-top: 2rpx solid rgb(245, 245, 245);  
3 -}  
4 -.line {  
5 - border-top: 2rpx solid rgb(245, 245, 245);  
6 - width: 700rpx;  
7 -}  
8 -  
9 -.payradio .Success_box {  
10 - padding-top: 45rpx;  
11 - padding-bottom: 45rpx;  
12 -}  
13 -  
14 -.payradio .Success_box .Success_box_title {  
15 - margin-top: 45rpx;  
16 - color: rgb(8, 8, 8);  
17 -}  
18 -  
19 -.payradio image {  
20 - width: 140rpx;  
21 - height: 140rpx;  
22 - display: flex;  
23 -}  
24 -  
25 -.payitem_max {  
26 - padding: 0rpx 55rpx;  
27 - color: rgb(104, 104, 104);  
28 - padding-bottom: 30rpx;  
29 -}  
30 -  
31 -.payitem_max .payitem {  
32 - margin-top: 30rpx;  
33 -}  
34 -  
35 -.payitem_max .payitem .pay_nam {  
36 - width: 200rpx;  
37 -}  
38 -  
39 -.payitem_max .payitem view {  
40 - margin-right: 50rpx;  
41 -}  
42 -.pay_money{  
43 - color: rgb(219, 27, 52);  
44 -}  
45 -  
46 -.pay_User {  
47 - padding-left: 55rpx;  
48 - color: rgb(104, 104, 104);  
49 -}  
50 -  
51 -.pay_User .payitem {  
52 - margin-top: 30rpx;  
53 -}  
54 -  
55 -.pay_User .payitem .pay_Receiving {  
56 - width: 128rpx;  
57 - margin-right: 50rpx;  
58 -}  
59 -  
60 -.pay_User .payitem .pay_name {  
61 - margin-right: 38rpx;  
62 - /* max-width: 250rpx; */  
63 -}  
64 -  
65 -.btn {  
66 - box-sizing: border-box;  
67 - height: 75rpx;  
68 - line-height: 75rpx;  
69 - /* padding: 10rpx; */  
70 - text-align: center;  
71 - border-radius: 20rpx;  
72 - padding: 0 40rpx;  
73 -}  
74 -  
75 -.pay_home {  
76 - /* margin-top: 35rpx; */  
77 - color: rgb(255, 255, 255);  
78 - /* width: 566rpx;  
79 - height: 68rpx; */  
80 - border-radius: 30rpx;  
81 - background-color: rgb(219, 27, 52);  
82 -}  
83 -.address{  
84 - width: 470rpx;  
85 -}  
86 -  
87 -.bg-red {  
88 - background-color: rgb(219, 27, 52);  
89 -}  
90 -  
91 -.bg-yellow {  
92 - background-color: #feca53;  
93 -}  
94 -  
95 -.border {  
96 - border: 2rpx solid #ccc;  
97 -}  
98 -  
99 -  
100 -.shequn{  
101 - width: 94%;  
102 - margin:0 23rpx 23rpx 23rpx;  
103 - min-height: 260rpx;  
104 - background: white;  
105 - border-radius: 15rpx;  
106 - display: flex;  
107 -}  
108 -  
109 -.shequnleft{  
110 - display: block;  
111 - width: 60%;  
112 - margin: 30rpx;  
113 -}  
114 -.shequnleft .one1{  
115 - display: flex;  
116 - width: 100%;  
117 - height: 110rpx;  
118 - line-height: 110rpx;  
119 - margin-top: -15rpx;  
120 - font-size: 30rpx;  
121 - color: #313131;  
122 - font-weight: bold;  
123 -}  
124 -.shequnleft .one2{  
125 - display: flex;  
126 - width: 100%;  
127 - color: #f39700;  
128 - font-size: 24rpx;  
129 -}  
130 -.shequnleft .one3{  
131 - display: flex;  
132 - width: 100%;  
133 - color: #313131;  
134 - font-size: 24rpx;  
135 -}  
136 -.shequnright{  
137 - display: flex;  
138 - width: 40%;  
139 - justify-content: center;  
140 - align-items: center;  
141 -}  
142 -  
143 -.shequnright image{  
144 - width: 150rpx;  
145 - height: 150rpx;  
146 -}  
pages/team/team_show/team_show.js
@@ -91,9 +91,9 @@ Page({ @@ -91,9 +91,9 @@ Page({
91 91
92 sort_store: 0, //门店分类 92 sort_store: 0, //门店分类
93 choice_sort_store: 0, //选择分类门店 93 choice_sort_store: 0, //选择分类门店
94 - 94 + template_id:[],//订阅消息id
95 }, 95 },
96 - onLoad: function(options) { 96 + onLoad: async function(options) {
97 wx.setNavigationBarTitle({ title: "拼团订单",}) 97 wx.setNavigationBarTitle({ title: "拼团订单",})
98 //var postdata=getApp().globalData.to_group; 98 //var postdata=getApp().globalData.to_group;
99 var postdata=options; 99 var postdata=options;
@@ -139,7 +139,13 @@ Page({ @@ -139,7 +139,13 @@ Page({
139 th.setData({ bconfig: e,sys_switch:json_d}); 139 th.setData({ bconfig: e,sys_switch:json_d});
140 th.wait_for_store_config(); //获取默认的门店 140 th.wait_for_store_config(); //获取默认的门店
141 }) 141 })
142 - 142 + try {
  143 + let template_id =await getApp().get_template_id('1023')
  144 + this.setData({
  145 + template_id
  146 + })
  147 + } catch (error) {}
  148 +
143 }, 149 },
144 150
145 //显示加载 151 //显示加载
@@ -164,7 +170,21 @@ Page({ @@ -164,7 +170,21 @@ Page({
164 close_pt_xx: function() { 170 close_pt_xx: function() {
165 this.setData({ pd_xx: false, }) 171 this.setData({ pd_xx: false, })
166 }, 172 },
167 - 173 + //天天拼团订阅消息提醒
  174 + sendsm: function (ee) {
  175 + let th = this;
  176 + var template_id = this.data.template_id;
  177 + // //授权订阅
  178 + wx.requestSubscribeMessage({
  179 + tmplIds: template_id,
  180 + success(res) {
  181 + th.cyijian(ee);
  182 + },
  183 + fail(res) {
  184 + th.cyijian(ee);
  185 + }
  186 + })
  187 + },
168 //按钮点击一键参加团按钮 188 //按钮点击一键参加团按钮
169 cyijian: function(e) { 189 cyijian: function(e) {
170 //--先判断会员状态-- 190 //--先判断会员状态--
pages/team/team_show/team_show.wxml
@@ -105,14 +105,14 @@ @@ -105,14 +105,14 @@
105 <block wx:if="{{tg_arr==null}}"> 105 <block wx:if="{{tg_arr==null}}">
106 <!--按钮--> 106 <!--按钮-->
107 <view wx:if="{{is_group_end==0}}" class='bodybutton white fs32'> 107 <view wx:if="{{is_group_end==0}}" class='bodybutton white fs32'>
108 - <view class="xc-good-friend" bindtap='cyijian' data-isct="0">去参团</view> 108 + <view class="xc-good-friend" bindtap='sendsm' data-isct="0">去参团</view>
109 <view class="xc-home-page" bindtap='gohome'>返回首页</view> 109 <view class="xc-home-page" bindtap='gohome'>返回首页</view>
110 </view> 110 </view>
111 - <view wx:elif="{{teamlist.kttype>1}}" class='bodybutton' bindtap='cyijian' data-isct="1"> 111 + <view wx:elif="{{teamlist.kttype>1}}" class='bodybutton' bindtap='sendsm' data-isct="1">
112 <view class="xc-good-friend">一键参团</view> 112 <view class="xc-good-friend">一键参团</view>
113 <view class="xc-home-page" bindtap='gohome'>返回首页</view> 113 <view class="xc-home-page" bindtap='gohome'>返回首页</view>
114 </view> 114 </view>
115 - <view wx:else class='bodybutton' bindtap='cyijian' data-isct="1"> 115 + <view wx:else class='bodybutton' bindtap='sendsm' data-isct="1">
116 <view class="xc-good-friend">一键参团</view> 116 <view class="xc-good-friend">一键参团</view>
117 <view class="xc-home-page" bindtap='gohome'>返回首页</view> 117 <view class="xc-home-page" bindtap='gohome'>返回首页</view>
118 </view> 118 </view>
pages/user/index/index.js
@@ -916,7 +916,7 @@ Page({ @@ -916,7 +916,7 @@ Page({
916 916
917 917
918 go_info: function () { 918 go_info: function () {
919 - getApp().goto("/pages/user/userinfo/userinfo"); 919 + getApp().goto("/packageG/pages/user/userinfo/userinfo");
920 }, 920 },
921 921
922 jump: function () { 922 jump: function () {
pages/user/my_service/appment_main.js deleted
1 -var e = getApp(),  
2 - a = e.globalData.setting,  
3 - os = a,  
4 - t = e.request,  
5 - d = e.globalData;  
6 -Page({  
7 -  
8 - /**  
9 - * 页面的初始数据  
10 - */  
11 - data: {  
12 - inurl: a.url, //接口网址  
13 - iurl: a.imghost, //服务器网址  
14 - store: 0, //是否显示服务门店列表  
15 - beautician: 0, //是否显示美容师列表  
16 - beautician_name: "", //选中的美容师名称  
17 - beauticianID: "", //美容师id  
18 - bea_index: "", //美容师列表下标  
19 - placeholder: "填写备注", //备注为空的placeholder  
20 - store_list: [], //门店列表  
21 - beautician_list: [], //美容师列表  
22 - store_name: "", //选择的服务门店  
23 - fir_pick_index: 0, //选择的门店下标  
24 - curpage: 1, //当前分页数  
25 - pageSize: 8, //页大小  
26 - total: 0,  
27 - ismore: 0, //是否加载完毕  
28 - itemId: "", //服务id  
29 - project_id: "", //项目id  
30 - isScroll: true, //scroll-y是否可以滑动  
31 - key_word: "", //是否按门店文字查询  
32 - is_service_read: 0, //是否调用过门店接口  
33 - is_search: 0, //是否通过key_word调用接口  
34 - is_success: 0, //是否提交成功  
35 - remarks: "", //备注  
36 - storageId: "", //线下门店id  
37 - url: "/pages/user/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来  
38 - buyType: "", //项目类型  
39 - time: "", //选择预约时间  
40 - tment_count: "", //可预约人数  
41 - lat: "", //纬度坐标  
42 - lon: "", //经度坐标  
43 - is_gps: 1, //是否开启gps  
44 - validay: "", //服务项目有效期  
45 - is_sub: 0, //判断是否重复提交  
46 - is_textea: 1, //备注是否是可输入  
47 - },  
48 - //控制备注输入  
49 - check_text: function() {  
50 - var th = this;  
51 - var is_textea = th.data.is_textea;  
52 - th.setData({  
53 - is_textea: 1,  
54 - beautician: 0  
55 - })  
56 - },  
57 - onclickstore: function() {  
58 - var th = this;  
59 - var store = th.data.store;  
60 - if (store) {  
61 - th.setData({  
62 - store: 0,  
63 - is_textea: 1  
64 - })  
65 - } else {  
66 - th.setData({  
67 - beautician: 0,  
68 - store: 1,  
69 - is_textea: 0  
70 - })  
71 - if (th.data.store_list.length < 1) {  
72 - wx.showLoading({  
73 - title: '加载中',  
74 - })  
75 - th.query_store();  
76 - }  
77 - }  
78 - },  
79 - //输入的备注  
80 - input_remarks: function(e) {  
81 - var remarks = e.detail.value;  
82 - this.setData({  
83 - remarks: remarks  
84 - })  
85 - },  
86 - //提交成功及发送模版代码  
87 - success: function() {  
88 - var th = this;  
89 - var store = th.data.store_name; //门店名称  
90 - var bea_name = th.data.beautician_name; //美容师名称  
91 - var time = th.data.time; //预约时间  
92 - var is_sub = th.data.is_sub; //是否重复提交  
93 - var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径  
94 - var serviceId = th.data.itemId; //服务id  
95 - var beauticianID = th.data.beauticianID; //美容师id  
96 - var buyType = th.data.buyType; //服务项目类型  
97 - var storeId = a.stoid; //商家id  
98 - var storageId = th.data.storageId; //门店id  
99 - var userId = d.user_id; //用户id  
100 - var remarks = th.data.remarks; //用户备注  
101 - var project_id = th.data.project_id; //项目id  
102 - var validay = th.data.validay;  
103 - var json = {  
104 - "arrangeTime": time + ":00",  
105 - "beauticianId": beauticianID,  
106 - "buyType": buyType,  
107 - "effectiveDay": "",  
108 - "number": "",  
109 - "projectId": project_id,  
110 - "remark": remarks,  
111 - "serviceId": serviceId,  
112 - "states": 0,  
113 - "storageId": storageId,  
114 - "storeId": storeId,  
115 - "userId": userId,  
116 - "validay": validay  
117 - }  
118 - var data = JSON.stringify(json);  
119 - wx.request({  
120 - url: url,  
121 - data: json,  
122 - method: 'post',  
123 - header: {  
124 - 'content-type': 'application/json'  
125 - }, // 设置请求的 header  
126 - success: function(res) {  
127 - th.setData({  
128 - is_sub: 0  
129 - })  
130 - wx.hideLoading();  
131 - if (res.data.code == 0) {  
132 - getApp().my_warnning("预约成功", 1, th);  
133 - var store_name = th.data.store_name; //预约门店  
134 - var number = res.data.data.Number;  
135 - var temp_url = "/api/wx/open/app/user/sendSubscribeMsg"; //模版接口  
136 - var userinfo = getApp().globalData.userInfo;  
137 - var name = d.userInfo.nickname;  
138 - var json = {  
139 - // "formId": formid,  
140 - "keyWord": [{  
141 - "keyword": res.data.data.ServiceName  
142 - },  
143 - {  
144 - "keyword": time.substring(0, 16)  
145 - }, {  
146 - "keyword": res.data.data.BeauticianName  
147 - }, {  
148 - "keyword": res.data.data.StorageName  
149 - }, {  
150 - "keyword": res.data.data.Address  
151 - }  
152 - ],  
153 - "page": "/pages/user/my_service/tment_details?number=" + number,  
154 - "storeId": a.stoid,  
155 - "typeId": "1011",  
156 - "userId": d.user_id  
157 - };  
158 - var data = JSON.stringify(json);  
159 - //调用发送预约成功模版接口  
160 - wx.request({  
161 - url: th.data.inurl + temp_url,  
162 - data: data,  
163 - method: 'post',  
164 - header: {  
165 - 'content-type': 'application/json'  
166 - }, // 设置请求的 header  
167 - success: function(data) {}  
168 - })  
169 - setTimeout(function() {  
170 - wx.redirectTo({  
171 - url: "/pages/user/my_service/tment_details?number=" + number  
172 - });  
173 - }, 1000);  
174 - } else {  
175 - getApp().my_warnning(res.data.msg, 0, th);  
176 - th.settime();  
177 - }  
178 - }  
179 - })  
180 -  
181 - },  
182 - //定时显示texteat  
183 - settime: function() {  
184 - var th = this;  
185 - setTimeout(function() {  
186 - th.setData({  
187 - is_textea: 1  
188 - })  
189 - }, 2000);  
190 - },  
191 - //提交预约  
192 - sub_success: function(e) {  
193 - var th = this;  
194 - var temp_url = th.data.inurl + "/api/wx/weappSendlist/page";  
195 - var template_id = "";  
196 - if (th.data.is_sub == 1) {  
197 - return false;  
198 - }  
199 - var store = th.data.store_name; //门店名称  
200 - var bea_name = th.data.beautician_name; //美容师名称  
201 - var time = th.data.time; //预约时间  
202 - var is_sub = th.data.is_sub; //是否重复提交  
203 - th.setData({  
204 - is_textea: 0,  
205 - is_sub: 1  
206 - })  
207 - //提交预约前的判断  
208 - if (store == "") {  
209 - getApp().my_warnning("请选择服务门店", 0, th);  
210 - th.setData({  
211 - is_sub: 0  
212 - })  
213 - th.settime();  
214 - return false;  
215 - } else if (bea_name == "") {  
216 - getApp().my_warnning("请选择美容师", 0, th);  
217 - th.setData({  
218 - is_sub: 0  
219 - })  
220 - th.settime();  
221 - return false;  
222 - } else if (time == undefined || time == '') {  
223 - getApp().my_warnning("请选择预约时间", 0, th);  
224 - th.setData({  
225 - is_sub: 0  
226 - })  
227 - th.settime();  
228 - return false;  
229 - } else {  
230 - var version ="";  
231 - //判断微信版本是否达到预约成功订阅的要求  
232 - wx.getSystemInfo({  
233 - success(res) {  
234 - version = res.version;  
235 - }  
236 - })  
237 - wx.showLoading({  
238 - title: '加载中',  
239 - })  
240 - if (th.ver(version, '7.0.4') >= 0) {  
241 - //获取模版id  
242 - getApp().request.promiseGet(temp_url, {  
243 - data: {  
244 - store_id: a.stoid,  
245 - typeid: "1011"  
246 - }  
247 - }).then(res => {  
248 - if (res.data.code == 0 && res.data.data.pageData.length > 0) {  
249 - template_id = res.data.data.pageData[0].template_id;  
250 - // //授权订阅  
251 - wx.requestSubscribeMessage({  
252 - tmplIds: [template_id],  
253 - success(res) {  
254 - th.success();  
255 - },  
256 - fail(res) {  
257 - th.success();  
258 - }  
259 - })  
260 - } else {  
261 - th.success();  
262 - }  
263 - })  
264 - } else {  
265 - // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示  
266 - wx.showModal({  
267 - title: '提示',  
268 - content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'  
269 - })  
270 - th.setData({  
271 - is_sub: 0  
272 - })  
273 - }  
274 -  
275 - }  
276 - },  
277 - //版本判断  
278 - ver:function(v1,v2){  
279 - v1 = v1.split('.')  
280 - v2 = v2.split('.')  
281 - var num1 = "" ;  
282 - var num2 = "";  
283 - var len = Math.max(v1.length, v2.length)  
284 -  
285 - while (v1.length < len) {  
286 - v1.push('0')  
287 - }  
288 - while (v2.length < len) {  
289 - v2.push('0')  
290 - }  
291 -  
292 - for (let i = 0; i < len; i++) {  
293 - num1 = parseInt(v1[i])  
294 - num2 = parseInt(v2[i])  
295 -  
296 - if (num1 > num2) {  
297 - return 1  
298 - } else if (num1 < num2) {  
299 - return -1  
300 - }  
301 - }  
302 - return 0  
303 - },  
304 - goto: function(e) {  
305 - var th = this;  
306 - th.setData({  
307 - beautician: 0,  
308 - is_textea: 0  
309 - })  
310 - if (th.data.store_name == "") {  
311 - getApp().my_warnning("请选择服务门店", 0, th);  
312 - th.settime();  
313 - } else if (th.data.beautician_name == "") {  
314 - getApp().my_warnning("请选择美容师", 0, th);  
315 - th.settime();  
316 - } else {  
317 - th.setData({  
318 - is_textea: 1  
319 - })  
320 - var url = e.currentTarget.dataset.url;  
321 - getApp().goto(url);  
322 - }  
323 - },  
324 - //点击选择门店  
325 - choose_for_store: function(e) {  
326 - var th = this;  
327 - var index_c = e.currentTarget.dataset.ind;  
328 - var fir_pick_index = th.data.fir_pick_index;  
329 - //判断是否点击选中的门店,防止重复点击重复设置选中下标  
330 - if (index_c == fir_pick_index) {  
331 - return false;  
332 - } else {  
333 - th.setData({  
334 - fir_pick_index: index_c,  
335 - beautician_name: "",  
336 - time: "",  
337 - tment_count: ""  
338 - })  
339 - }  
340 - },  
341 - //确认选择门店  
342 - choice_store: function() {  
343 - var th = this;  
344 - var index = th.data.fir_pick_index;  
345 - var store_name = th.data.store_list[index].StorageName;  
346 - var Id = th.data.store_list[index].Id;  
347 - th.setData({  
348 - store: 0,  
349 - store_name: store_name,  
350 - storageId: Id,  
351 - is_textea: 1  
352 - })  
353 - },  
354 - onReachBottom: function() {  
355 - var th = this;  
356 - if (this.data.total <= th.data.pageSize) return;  
357 - if (this.data.ismore) return;  
358 -  
359 - wx.showLoading({  
360 - title: '加载中...',  
361 - })  
362 - th.query_store();  
363 - },  
364 - //分页查询门店信息  
365 - query_store: function() {  
366 - var th = this;  
367 - th.setData({  
368 - is_textea: 0  
369 - })  
370 - var itemId = th.data.itemId; //服务id  
371 - var url = "/api/weshop/marketing/reservation/storage/pagenew";  
372 - var key_word = th.data.key_word;  
373 - key_word = key_word.replace(/\s+/g, "");  
374 - getApp().request.promiseGet(url, {  
375 - data: {  
376 - userId:getApp().globalData.user_id,  
377 - storeId: a.stoid,  
378 - serviceId: itemId,  
379 - latitude: th.data.lat,  
380 - longitude: th.data.lon,  
381 - page: th.data.curpage,  
382 - pageSize: th.data.pageSize,  
383 - keyWord: key_word  
384 - }  
385 - }).then(res => {  
386 - wx.hideLoading();  
387 - if (res.data.code == 0) {  
388 - th.data.curpage++;  
389 - var arr1 = th.data.store_list;  
390 - var arr2 = res.data.data.pageData;  
391 - var arr3 = [...arr1, ...arr2];  
392 - var ismore = 0;  
393 - if (arr3.length == res.data.data.total) ismore = 1  
394 - th.setData({  
395 - store_list: arr3,  
396 - total: res.data.data.total,  
397 - ismore: ismore,  
398 - is_service_read: 1,  
399 - }), wx.stopPullDownRefresh(); //停止下拉刷新  
400 - if (key_word != "" && res.data.data.pageData.length < 1) {  
401 - th.setData({  
402 - is_search: 1  
403 - })  
404 - }  
405 - } else {  
406 - getApp().my_warnning(res.data.msg, 0, th);  
407 - th.settime();  
408 - }  
409 - })  
410 - },  
411 - //查询  
412 - query_beautician: function() {  
413 - var th = this;  
414 - th.setData({  
415 - is_textea: 0  
416 - })  
417 - if (th.data.store_name == "") {  
418 - getApp().my_warnning("请选择服务门店", 0, th);  
419 - th.settime();  
420 - } else {  
421 - wx.showLoading({  
422 - title: '加载中',  
423 - })  
424 - var itemid = th.data.itemId; //正式使用的项目id  
425 - var storageId = th.data.storageId; //正式使用的线下门店id  
426 - var url = "/api/weshop/marketing/reservation/staff/pagenew"; //接口地址  
427 -  
428 - getApp().request.promiseGet(url, {  
429 - data: {  
430 - storeId: a.stoid,  
431 - userId: d.user_id,  
432 - serviceId: itemid,  
433 - storageId: storageId,  
434 - VipId:getApp().globalData.userInfo.erpvipid,  
435 - }  
436 - }).then(res => {  
437 - wx.hideLoading();  
438 - if (res.data.code == 0) {  
439 - th.setData({  
440 - beautician_list: res.data.data  
441 - })  
442 - if (res.data.data.length < 1) {  
443 - getApp().my_warnning("暂无美容师", 0, th);  
444 - th.settime();  
445 - } else {  
446 - if (th.data.beautician == 0) {  
447 - th.setData({  
448 - beautician: 1,  
449 - })  
450 - } else {  
451 - th.setData({  
452 - beautician: 0,  
453 - })  
454 - }  
455 - }  
456 - } else {  
457 - getApp().my_warnning(res.data.msg, 0, th);  
458 - th.settime();  
459 - }  
460 - })  
461 - }  
462 - },  
463 - choice_beautician: function(e) {  
464 - var th = this;  
465 - var bea_index = e.currentTarget.dataset.baaindex;  
466 - var bea_name = th.data.beautician_list[bea_index].StaffName;  
467 - var BeauticianID = th.data.beautician_list[bea_index].staffid;  
468 - var StorageId=th.data.beautician_list[bea_index].StorageId  
469 -  
470 - th.setData({  
471 - beautician_name: bea_name,  
472 - beautician: 0,  
473 - bea_index: bea_index,  
474 - beauticianID: BeauticianID,  
475 - time: "",  
476 - tment_count: "",  
477 - is_textea: 1,  
478 - StorageId:StorageId  
479 - })  
480 -  
481 - },  
482 - //获取搜索门店输入的值  
483 - input_store: function(e) {  
484 - this.setData({  
485 - key_word: e.detail.value  
486 - })  
487 - },  
488 - //搜索门店  
489 - search_store: function() {  
490 - var th = this;  
491 - var key_word = th.data.key_word;  
492 - var store_list = th.data.store_list;  
493 - th.setData({  
494 - curpage: 1,  
495 - is_search: 0,  
496 - store_list: []  
497 - })  
498 - wx.showLoading({  
499 - title: '加载中',  
500 - })  
501 - th.query_store();  
502 - },  
503 - //美容师预约跳转页面  
504 - nav_bea: function() {  
505 - var th = this;  
506 - th.setData({  
507 - beautician: 0  
508 - })  
509 - var storageId = th.data.storageId; //线下门店id  
510 - var itemId = th.data.itemId; //服务id  
511 - var project_id = th.data.project_id;  
512 - if (storageId == "") {  
513 - getApp().my_warnning("请选择服务门店", 0, th);  
514 - th.settime();  
515 - } else {  
516 - th.setData({  
517 - is_textea: 1  
518 - })  
519 - wx.navigateTo({  
520 - url: "/pages/user/my_service/cosmetology_list?" + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id  
521 - });  
522 -  
523 - }  
524 - },  
525 - /**  
526 - * 生命周期函数--监听页面加载  
527 - */  
528 - onLoad: function(options) {  
529 - var th = this;  
530 - th.setData({  
531 - itemId: options.service_id,  
532 - buyType: options.BuyType,  
533 - project_id: options.ProjectID,  
534 - validay: options.Validay  
535 - })  
536 - wx.getLocation({  
537 - type: 'gcj02',  
538 - success: function(res) {  
539 - th.data.lat = res.latitude;  
540 - th.data.lon = res.longitude;  
541 - th.data.is_get_local_ok = 1;  
542 - th.setData({  
543 - is_gps: 1  
544 - });  
545 - },  
546 - fail: function(res) {  
547 - if (res.errCode == 2) {  
548 - th.setData({  
549 - is_gps: 0  
550 - });  
551 - if (th.data.is_gps == 0) {  
552 - getApp().confirmBox("请开启GPS定位", null, 25000, !1);  
553 - th.settime();  
554 - }  
555 - } else {  
556 - th.setData({  
557 - is_gps: "3"  
558 - });  
559 - }  
560 -  
561 - th.data.is_get_local_ok = 1;  
562 - }  
563 - })  
564 - //获取上一次的预约  
565 - this.get_fir_service();  
566 -  
567 - },  
568 - //查询剩下可预约人数  
569 - query_more: function() {  
570 - var th = this;  
571 - var url = "/api/weshop/marketing/reservation/can/reservation/countnew";  
572 - var beauticianID = th.data.beauticianID; //美容师id  
573 - var projectID = th.data.itemId; //服务id  
574 - var seekTime = th.data.time; //预约日期  
575 - var storageId = th.data.storageId; //门店id  
576 - var storeId = a.stoid; //商家id  
577 - getApp().request.promiseGet(url, {  
578 - data: {  
579 - beauticianId: beauticianID,  
580 - seekTime: seekTime,  
581 - serviceId: projectID,  
582 - storageId: storageId,  
583 - storeId: storeId  
584 - }  
585 - }).then(res => {  
586 - if (res.data.code == 0) {  
587 - var tment_count = res.data.data.CanReservation;  
588 - th.setData({  
589 - tment_count: tment_count  
590 - })  
591 - } else {  
592 - getApp().my_warnning(res.data.msg, 0, th);  
593 - th.settime();  
594 - }  
595 - })  
596 -  
597 - },  
598 - /**  
599 - * 生命周期函数--监听页面显示  
600 - */  
601 - onShow: function() {  
602 - var th = this;  
603 - var seekTime = th.data.time; //预约日期  
604 - if (seekTime != "") {  
605 - th.query_more();  
606 - }  
607 - th.setData({  
608 - time: th.data.time.substring(0, 16),  
609 - is_textea: 1  
610 - })  
611 - th.query_project();  
612 - },  
613 - //获取单个服务项目信息  
614 - query_project: function() {  
615 - var th = this;  
616 - var url = "/api/weshop/marketing/reservation/sm/page"; //获取服务项目接口  
617 - var project_id = th.data.project_id; //服务项目id  
618 - getApp().request.promiseGet(url, {  
619 - data: {  
620 - storeId: a.stoid,  
621 - userId: d.user_id,  
622 - projectId: project_id  
623 - }  
624 - }).then(res => {  
625 - if (res.data.code == 0) {  
626 - th.setData({  
627 - validay: res.data.data.pageData[0].Validay  
628 - })  
629 - } else {  
630 - getApp().my_warnning(res.data.msg, 0, th);  
631 - th.settime();  
632 - }  
633 - })  
634 - },  
635 - //关闭导航  
636 - close: function() {  
637 - var th = this;  
638 - var nav_b = th.selectComponent("#nav_b"); //组件的id  
639 - nav_b.close_box();  
640 - },  
641 -  
642 - //判断分享的导购是不是有门店,是不是该门店下又该会员  
643 - check_firleader(data){  
644 - var th=this;  
645 - var itemId = this.data.itemId; //服务id  
646 - var url = "/api/weshop/marketing/reservation/storage/pagenew";  
647 - var key_word = data.store_name;  
648 - key_word = key_word.replace(/\s+/g, "");  
649 - var usr=getApp().globalData.userInfo;  
650 - getApp().request.promiseGet(url, {  
651 - data: {  
652 - userId: usr.user_id,  
653 - storeId: os.stoid,  
654 - serviceId: itemId,  
655 - page: 1,  
656 - pageSize: 1000,  
657 - keyWord: key_word  
658 - }  
659 - }).then(res => {  
660 - //-- 如果是门店的话 --  
661 - if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) {  
662 - var store_data=null;  
663 - for(var i in res.data.data.pageData){  
664 - var it=res.data.data.pageData[i];  
665 - if(it.Id==data.StorageId){  
666 - store_data={  
667 - store_name: data.store_name,  
668 - storageId: data.StorageId,  
669 - };  
670 - break;  
671 - }  
672 - }  
673 - if(!store_data) return false;  
674 - th.setData(store_data)  
675 -  
676 - }else{  
677 - return false;  
678 - }  
679 -  
680 - //导购接口地址  
681 - var url = "/api/weshop/marketing/reservation/staff/pagenew";  
682 - return getApp().request.promiseGet(url, {  
683 - isShowLoading:1,  
684 - data: {  
685 - storeId: os.stoid,  
686 - userId: usr.user_id,  
687 - serviceId: itemId,  
688 - storageId: data.StorageId  
689 - }  
690 - })  
691 - }).then(res=>{  
692 - if (res && res.data && res.data.code == 0) {  
693 - var beautician_list=res.data.data;  
694 - for(var i in beautician_list){  
695 - var item=beautician_list[i];  
696 - if(item.staffid==data.beauticianID){  
697 - th.setData({  
698 - beautician_name:data.beautician_name,  
699 - beauticianID:data.beauticianID,  
700 - })  
701 - break;  
702 - }  
703 - }  
704 -  
705 - }  
706 - })  
707 - },  
708 -  
709 - //获取上一次预约的信息  
710 - get_fir_service:function (){  
711 - var th=this;  
712 - var usr=getApp().globalData.userInfo;  
713 - if(!usr) return false;  
714 -  
715 - getApp().promiseGet("/api/weshop/marketing/reservation/reservation/page",{  
716 - data:{storeId:os.stoid,userId:usr.user_id,projectId:th.data.project_id}  
717 - }).then(res=>{  
718 - if(res.data.code==0 && res.data.data && res.data.data.pageData ){  
719 - var ppdata= res.data.data.pageData[0];  
720 - var data={  
721 - store_name:ppdata.StorageName,  
722 - beautician_name:ppdata.BeauticianName,  
723 - beauticianID:ppdata.BeauticianID,  
724 - StorageId:ppdata.StorageID,  
725 - }  
726 - //检查门店和导购能不能默认使用  
727 - th.check_firleader(data);  
728 - };  
729 - })  
730 - }  
731 -  
732 -  
733 -  
734 -})  
735 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/appment_main.json deleted
1 -{  
2 - "navigationBarTitleText": "预约服务",  
3 - "usingComponents": {  
4 - "warn": "/components/long_warn/long_warn",  
5 - "nav_b": "/components/nav_b/nav_b"  
6 - }  
7 -}  
8 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/appment_main.wxml deleted
1 -<wxs module="filters" src="../../../utils/filter.wxs"></wxs>  
2 -<view class="container" catchtap="close">  
3 - <image class="main" src="{{iurl}}/miniapp/images/yyservice/main.png"></image>  
4 -  
5 - <view class="Fram">  
6 - <!-- 选择门店 -->  
7 - <view class="flex-vertical mabot">  
8 - <!-- 门店 -->  
9 - <view class="flex-vertical-between head fs30">  
10 - <view>门</view>  
11 - <view>店</view>  
12 - </view>  
13 -  
14 - <!-- 选择门店 -->  
15 - <view class="flex-vertical-between fs26 select" bindtap="onclickstore">  
16 - <view class="{{store_name==''?'color':''}} value ellipsis-1">{{store_name==""?'选择服务门店':store_name}}</view>  
17 - <view class="angle">∟</view>  
18 - </view>  
19 - </view>  
20 - <!-- 选择美容师 -->  
21 - <view class="flex-vertical mabot">  
22 - <!-- 门店 -->  
23 - <view class="flex-vertical-between head fs30">  
24 - <view>美</view>  
25 - <view>容</view>  
26 - <view>师</view>  
27 - </view>  
28 -  
29 - <!-- 选择美容师 -->  
30 - <view class="rel fs26">  
31 - <view class="flex-vertical-between Cosmetology" bindtap="query_beautician">  
32 - <view class="{{beautician_name==''?'color':''}} value ellipsis-1">{{beautician_name==''?'选择美容师':beautician_name}}</view>  
33 - <view class="angle">∟</view>  
34 - </view>  
35 - <!-- 美容师下拉列表 -->  
36 - <view class="beauticians abs" wx:if="{{beautician}}">  
37 - <!-- 到时候要做判断如果是index==循环的最后一个则把下边线去掉:(beaclone去掉的css) -->  
38 - <view class="beautician flex-vertical fs26" wx:for="{{beautician_list}}" bindtap="choice_beautician" data-baaindex="{{key}}" wx:for-index="key">  
39 - <view class="StaffName ellipsis-1">{{item.StaffName}}</view>  
40 - </view>  
41 - <view>  
42 - </view>  
43 - </view>  
44 - </view>  
45 - <view class="flex-center users" bindtap="nav_bea">  
46 - <image class="user" src="{{iurl}}/miniapp/images/yyservice/user.png"></image>  
47 - </view>  
48 - </view>  
49 -  
50 - <!-- 选择时间 -->  
51 - <view class="flex-vertical mabot">  
52 - <!-- 门店 -->  
53 - <view class="head fs30">  
54 - <view>预约时间</view>  
55 - </view>  
56 -  
57 - <!-- 选择时间 -->  
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>  
60 - <view class="angle angler">∟</view>  
61 - </view>  
62 - </view>  
63 -  
64 - <!-- 备注 -->  
65 - <view class="flex Remarks">  
66 - <!-- 门店 -->  
67 - <view class="flex-space-between head fs30">  
68 - <view>备</view>  
69 - <view>注</view>  
70 - </view>  
71 - <view class="flex fs26">  
72 - <block wx:if="{{is_textea==1}}">  
73 - <textarea class="textarea" placeholder="{{remarks==''?'填写备注':remarks}}" placeholder-class="fs26 color" value="{{remarks}}" bindinput="input_remarks" maxlength="100">  
74 - </textarea>  
75 - </block>  
76 - <block wx:else>  
77 - <view class="textarea {{remarks==''?'color':''}}" bindtap="check_text">{{remarks==''?'填写备注':remarks}}  
78 - </view>  
79 - </block>  
80 - </view>  
81 - </view>  
82 - <view wx:if="{{tment_count!=''}}" class="notes flex-level-right fs24 color">  
83 - <view>注:剩余可预约人数{{tment_count}}人</view>  
84 - </view>  
85 -  
86 - <view class="submitMax flex-space-between fs32">  
87 - <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list">  
88 - <view>我的预约</view>  
89 - </navigator>  
90 - <form report-submit='true' bindtap="sub_success">  
91 - <button form-type="submit" class="sub_appment flex-center">  
92 - <view>提交预约</view>  
93 - </button>  
94 - </form>  
95 - </view>  
96 - </view>  
97 -  
98 -</view>  
99 -  
100 -<!-- 门店列表显示 -->  
101 -<view wx:if="{{store}}" class="storeList fixed">  
102 - <view class="choice flex-vertical-between fs32 storeListpadd">  
103 - <view>选择服务门店</view>  
104 - <icon bindtap="onclickstore" color="black" size="22" type="cancel"></icon>  
105 - </view>  
106 - <view class="searchbar flex-vertical-between storeListpadd">  
107 - <input class="inputstore fs28" placeholder="{{key_word==''?'输入要搜索的门店':key_word}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="search_store" />  
108 - <view class="search flex-center" bindtap="search_store">  
109 - <view class="fs28">搜索</view>  
110 - </view>  
111 - </view>  
112 - <!-- 选择门店 -->  
113 - <scroll-view class="stores" scroll-y="{{isScroll}}" enable-back-to-top="true" bindscrolltolower="onReachBottom">  
114 - <view class="store flex-vertical" wx:for="{{store_list}}" bindtap="choose_for_store" data-ind="{{index}}">  
115 - <block wx:if="{{index==fir_pick_index}}">  
116 - <icon class="icon" type="success" color="red" size="20"></icon>  
117 - </block>  
118 - <block wx:else>  
119 - <view class="circular"></view>  
120 - </block>  
121 - <view class="store_name_dis">  
122 - <view class="name_dis flex-vertical-between">  
123 - <view class="store_name fs28 ellipsis-1">{{item.StorageName}}</view>  
124 - <view wx:if="{{item.Distance!=1000000}}" class="store_dis flex fs22">  
125 - <view class="ellipsis-1">距您:{{item.Distance}}km</view>  
126 - </view>  
127 - </view>  
128 - <view class="store_address fs24 ellipsis-2">{{item.Address}}</view>  
129 - </view>  
130 - </view>  
131 - <!-- 通过搜索的时候没有找到的提示语 -->  
132 - <view wx:if="{{store_list.length<1 && is_search==1}}" class="flex-center fs28 notstore">  
133 - <view>没有找到{{key_word}}门店</view>  
134 - </view>  
135 -  
136 - <!-- 数据加载完毕 -->  
137 - <view wx:if="{{ismore && store_list.length>1}}" class="flex-center fs28 notstore">  
138 - <view>数据加载完毕</view>  
139 - </view>  
140 - </scroll-view>  
141 - <!-- sub -->  
142 - <view class="flex-center fs32" bindtap="choice_store">  
143 - <view class="determine flex-center">  
144 - <view>确定</view>  
145 - </view>  
146 - </view>  
147 -</view>  
148 -<!-- 蒙尘 -->  
149 -<view wx:if="{{store}}" class="disgraceful" bindtap="onclickstore"></view>  
150 -<warn id="warn"></warn>  
151 -<!-- 制作一个圆球导航 -->  
152 -<nav_b id="nav_b"></nav_b>  
153 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/appment_main.wxss deleted
1 -.container {  
2 - border-top: 7rpx solid rgb(245, 245, 245);  
3 -}  
4 -  
5 -.main {  
6 - width: 100%;  
7 - height: 305rpx;  
8 -}  
9 -  
10 -.angle {  
11 - transform: rotate(-45deg);  
12 - margin-right: 15rpx;  
13 - margin-bottom: 10rpx;  
14 - font-size: 26rpx;  
15 - color: rgb(142, 142, 142);  
16 -}  
17 -.StaffName{  
18 - max-width: 350rpx;  
19 -}  
20 -.angler {  
21 - transform: rotate(227deg);  
22 - margin-bottom: 0rpx;  
23 -}  
24 -  
25 -.users {  
26 - background-color: rgb(255, 255, 255);  
27 -}  
28 -  
29 -.user {  
30 - width: 40rpx;  
31 - height: 40rpx;  
32 - margin-left: 15rpx;  
33 -}  
34 -  
35 -.Fram {  
36 - padding: 0rpx 60rpx;  
37 - margin-top: 60rpx;  
38 - background-color: rgb(255, 255, 255);  
39 -}  
40 -  
41 -.subSuccess {  
42 - position: fixed;  
43 - z-index: 3;  
44 - top: 420rpx;  
45 - left: 110rpx;  
46 - width: 540rpx;  
47 - height: 315rpx;  
48 - background-color: rgb(155, 155, 155);  
49 - text-align: center;  
50 - border-radius: 20rpx;  
51 - color: rgb(255, 255, 255);  
52 - font-weight: bold;  
53 -}  
54 -  
55 -.Success {  
56 - width: 110rpx;  
57 - height: 110rpx;  
58 - margin-top: 70rpx;  
59 - margin-bottom: 30rpx;  
60 -}  
61 -  
62 -.appment, .sub_appment {  
63 - width: 270rpx;  
64 - height: 60rpx;  
65 - line-height: 55rpx;  
66 - border-radius: 40rpx;  
67 -}  
68 -  
69 -button {  
70 - height: 100%;  
71 - background-color: rgb(214, 1, 33);  
72 -}  
73 -  
74 -.appment {  
75 - background-color: rgb(238, 238, 238);  
76 -}  
77 -  
78 -.sub_appment {  
79 - background-color: rgb(214, 1, 33);  
80 - color: rgb(255, 255, 255);  
81 -}  
82 -  
83 -.head {  
84 - width: 122rpx;  
85 - margin-right: 40rpx;  
86 - height: 50rpx;  
87 - line-height: 50rpx;  
88 -}  
89 -  
90 -.textarea {  
91 - width: 420rpx;  
92 - background-color: rgb(238, 238, 238);  
93 - border-radius: 6rpx;  
94 - height: 130rpx;  
95 - padding-left: 40rpx;  
96 - padding-right: 15rpx;  
97 - padding-top: 15rpx;  
98 - padding-bottom: 15rpx;  
99 -}  
100 -  
101 -.mabot {  
102 - margin-bottom: 35rpx;  
103 -}  
104 -  
105 -.select {  
106 - width: 420rpx;  
107 - height: 55rpx;  
108 - line-height: 55rpx;  
109 - background-color: rgb(238, 238, 238);  
110 - border-radius: 6rpx;  
111 - padding-left: 40rpx;  
112 - padding-right: 15rpx;  
113 -}  
114 -  
115 -.Cosmetology {  
116 - padding-left: 40rpx;  
117 - padding-right: 15rpx;  
118 - width: 365rpx;  
119 - background-color: rgb(238, 238, 238);  
120 - height: 50rpx;  
121 - line-height: 50rpx;  
122 - border-radius: 6rpx;  
123 -}  
124 -  
125 -.beauticians {  
126 - width: 407rpx;  
127 - z-index: 3;  
128 - top: 45rpx;  
129 - left: -1rpx;  
130 - padding: 0rpx 5rpx;  
131 - border: 2rpx solid rgb(238, 238, 238);  
132 - background-color: rgb(255, 255, 255);  
133 - padding-bottom: 5rpx;  
134 - height: 279rpx;  
135 - overflow-x: scroll;  
136 - overflow-y: scroll;  
137 -}  
138 -  
139 -.beautician {  
140 - height: 70rpx;  
141 - border-bottom: 2rpx solid rgb(238, 238, 238);  
142 - padding-left: 25rpx;  
143 -}  
144 -  
145 -.beaclone {  
146 - border-bottom: 0rpx;  
147 -}  
148 -  
149 -.notes {  
150 - margin-top: 15rpx;  
151 - margin-bottom: 60rpx;  
152 - margin-right: 8rpx;  
153 -}  
154 -  
155 -.color {  
156 - color: rgb(172, 172, 172);  
157 -}  
158 -  
159 -.submitMax {  
160 - margin-top: 50rpx;  
161 - padding: 0rpx 15rpx;  
162 -}  
163 -  
164 -.Remarks {  
165 - margin-top: 15rpx;  
166 -}  
167 -  
168 -/* 蒙尘 */  
169 -  
170 -.disgraceful {  
171 - position: fixed;  
172 - z-index: 4;  
173 - width: 100%;  
174 - height: 100%;  
175 - top: 0rpx;  
176 - left: 0rpx;  
177 - background-color: rgba(0, 0, 0, 0.4);  
178 -}  
179 -  
180 -.storeList {  
181 - z-index: 5;  
182 - left: 0rpx;  
183 - border-top-left-radius: 25rpx;  
184 - border-top-right-radius: 25rpx;  
185 - background-color: rgb(255, 255, 255);  
186 - width: 100%;  
187 - padding: 45rpx 0rpx;  
188 -}  
189 -  
190 -.storeListpadd {  
191 - padding: 0rpx 31rpx;  
192 -}  
193 -  
194 -.choice {  
195 - margin-bottom: 5rpx;  
196 -}  
197 -  
198 -.inputstore {  
199 - width: 510rpx;  
200 - height: 43rpx;  
201 - line-height: 43rpx;  
202 - border-radius: 30rpx;  
203 - border: 2rpx solid rgb(238, 238, 238);  
204 - padding-left: 30rpx;  
205 -}  
206 -  
207 -.searchbar {  
208 - height: 95rpx;  
209 - border-bottom: 2rpx solid rgb(238, 238, 238);  
210 -}  
211 -  
212 -.search {  
213 - width: 125rpx;  
214 - height: 45rpx;  
215 - line-height: 45rpx;  
216 - background-color: rgb(219, 27, 52);  
217 - border-radius: 30rpx;  
218 - color: rgb(255, 255, 255);  
219 -}  
220 -  
221 -.stores {  
222 - height: 500rpx;  
223 - overflow-y: scroll;  
224 -}  
225 -  
226 -.store {  
227 - margin: 0rpx 16rpx;  
228 - padding-right: 15rpx;  
229 - border-bottom: 2rpx solid rgb(238, 238, 238);  
230 - padding: 20rpx 0rpx;  
231 -}  
232 -  
233 -.icon {  
234 - padding: 0rpx 15rpx;  
235 -}  
236 -  
237 -.circular {  
238 - width: 37rpx;  
239 - height: 37rpx;  
240 - border-radius: 50%;  
241 - border: 2rpx solid rgb(52, 52, 52);  
242 - margin: 0rpx 15rpx;  
243 -}  
244 -  
245 -.store_name_dis {  
246 - width: 90%;  
247 -}  
248 -  
249 -.name_dis {  
250 - margin-bottom: 5rpx;  
251 -}  
252 -  
253 -.store_name {  
254 - max-width: 420rpx;  
255 -}  
256 -  
257 -.store_dis {  
258 - height: 30rpx;  
259 - line-height: 30rpx;  
260 - padding: 5rpx 15rpx;  
261 - background-color: rgb(227, 227, 227);  
262 - border-radius: 25rpx;  
263 - margin-right: 20rpx;  
264 - color: rgb(159, 159, 159);  
265 - max-width: 200rpx;  
266 -}  
267 -  
268 -.store_address {  
269 - color: rgb(159, 159, 159);  
270 -}  
271 -  
272 -.determine {  
273 - background-color: rgb(196, 24, 26);  
274 - width: 500rpx;  
275 - border-radius: 35rpx;  
276 - height: 60rpx;  
277 - color: rgb(255, 255, 255);  
278 - margin: 20rpx 0rpx;  
279 -}  
280 -  
281 -.value {  
282 - max-width: 300rpx;  
283 -}  
284 -  
285 -.notstore {  
286 - height: 80rpx;  
287 - color: rgb(159, 159, 159);  
288 -}  
pages/user/my_service/beauty_deta.js deleted
1 -var e = getApp(),  
2 - a = e.globalData.setting,  
3 - os = a,  
4 - t = e.request,  
5 - d = e.globalData;  
6 -Page({  
7 -  
8 - /**  
9 - * 页面的初始数据  
10 - */  
11 - data: {  
12 - inurl: a.url, //接口网址  
13 - iurl: a.imghost,  
14 - url: "", //选择选择时间后返回的页面  
15 - defimgurl: "/miniapp/images/no-head.jpg",  
16 - seekTime: "", //当前服务预约选择的时间  
17 - time_list: [], //可预约时间  
18 - name: "", //美容师姓名  
19 - comment: "", //美容师评价  
20 - aweeks: [], //七天的预约时间  
21 - head_img: "", //美容师头像  
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: [], //星期几数组  
24 - time_index: -1, //选择预约时间下标  
25 - date_id: 0, //选择日期的id  
26 - beautician_id: "", //美容师id  
27 - itemId: "", //服务id  
28 - number: "", //预约单号  
29 - modify: 0, //是否是修改时间  
30 - iscos: 0, //是否是从美容师列表过来的  
31 - hours: "", //获取当前时分秒  
32 - projectId: "", //项目id  
33 - StaffName: "", //美容师名称  
34 - },  
35 -  
36 - /**  
37 - * 生命周期函数--监听页面加载  
38 - */  
39 - onLoad: function (options) {  
40 - var th = this;  
41 - var myDate = new Date();  
42 - var minutes = myDate.getMinutes(); //获取当前分钟数(0-59)  
43 - var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23)  
44 - var beautician_id = options.BeauticianID;  
45 - var storageId = options.StorageId;  
46 -  
47 -  
48 - th.setData({  
49 - beautician_id: beautician_id,  
50 - itemId: options.itemId,  
51 - modify: options.modify,  
52 - hours: hours,  
53 - projectId: options.projectId,  
54 - storageId: storageId,  
55 - VipId:options.VipId,  
56 - })  
57 - if (options.url != undefined) {  
58 - th.setData({  
59 - url: options.url  
60 - })  
61 - }  
62 - if (options.number != undefined) {  
63 - th.setData({  
64 - number: options.number  
65 - })  
66 - }  
67 - if (options.iscos != undefined) {  
68 - th.setData({  
69 - iscos: options.iscos  
70 - })  
71 - }  
72 - if (options.StaffName != undefined) {  
73 - th.setData({  
74 - StaffName: options.StaffName  
75 - })  
76 - }  
77 - th.query_beatea(th.query_aweek);  
78 - },  
79 - /**  
80 - * 生命周期函数--监听页面显示  
81 - */  
82 - onShow: function () {  
83 - var th = this;  
84 - //获取当前时间  
85 - var myDate = new Date();  
86 - // var date = myDate.getHours(); //获取当前小时数(0-23);  
87 - let str = myDate.toTimeString(); //"10:55:24 GMT+0800 (中国标准时间)"  
88 - let date = str.substring(0, 8); // '10:55:24'  
89 - th.setData({  
90 - hours: date  
91 - });  
92 - },  
93 -  
94 - //图片失败,默认图片  
95 - bind_bnerr1: function (e) {  
96 - var _errImg = e.target.dataset.errorimg;  
97 - var _Img = e.target.dataset.img;  
98 - if (_Img != undefined) {  
99 - var _errObj = {};  
100 - _errObj[_errImg] = "/miniapp/images/no-head.jpg";  
101 - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;  
102 - }  
103 - },  
104 - //选择服务日期  
105 - check_date: function (e) {  
106 - var th = this;  
107 - var id = e.currentTarget.dataset.dateid;  
108 - var date_id = th.data.date_id;  
109 - var seekTime = th.data.aweeks[id].time;  
110 - if (id != date_id) {  
111 - th.setData({  
112 - date_id: id,  
113 - seekTime: seekTime  
114 - })  
115 - th.query_date();  
116 - }  
117 - },  
118 - //获取美容师信息  
119 - query_beatea: function (func) {  
120 - var th = this;  
121 - var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径  
122 - var beautician_id = th.data.beautician_id;  
123 - getApp().request.promiseGet(url, {  
124 - data: {  
125 - beauticianId: beautician_id,  
126 - storeId: a.stoid,  
127 - }  
128 - }).then(res => {  
129 - if (res.data.code == 0) {  
130 - var data = res.data.data;  
131 - var ob = {  
132 - name: data.StaffName,  
133 - comment: data.Remark1,  
134 - head_img: data.PhotoUrl  
135 - };  
136 - if (!th.data.storageId) {  
137 - ob.storageId = data.StorageId;  
138 - }  
139 - th.setData(ob);  
140 - func();  
141 - } else {  
142 - getApp().my_warnning(res.data.msg, 0, th);  
143 - }  
144 - })  
145 - },  
146 - //返回上个页面  
147 - navigateBack: function () {  
148 - var th = this;  
149 - var modify = th.data.modify; //是否是更改时间  
150 - var seekTime = th.data.seekTime; //选择的日期  
151 - var time_list = th.data.time_list;  
152 - var time_index = th.data.time_index;  
153 - if (time_index == -1) {  
154 - getApp().my_warnning("请选择预约时间", 0, th);  
155 - return false;  
156 - }  
157 - var date_id = th.data.date_id;  
158 - var date = th.data.aweeks[date_id].time;  
159 - var time = date + " " + time_list[time_index] + ":00";  
160 - if (modify == 1) {  
161 - var json = {  
162 - "arrangeTime": time,  
163 - "number": th.data.number,  
164 - "remark": "更改时间",  
165 - "states": 0,  
166 - "storeId": a.stoid,  
167 - };  
168 - var data = JSON.stringify(json);  
169 - var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址  
170 - wx.request({  
171 - url: url,  
172 - data: data,  
173 - method: 'put',  
174 - header: {  
175 - 'content-type': 'application/json'  
176 - }, // 设置请求的 header  
177 - success: function (res) {  
178 - if (res.data.code == 0) {  
179 - getApp().my_warnning(res.data.data, 1, th);  
180 - setTimeout(function () {  
181 - wx.navigateBack({  
182 - //返回  
183 - delta: 1  
184 - })  
185 - }, 1000);  
186 - } else {  
187 - getApp().my_warnning(res.data.msg, 0, th);  
188 - }  
189 - }  
190 - })  
191 - } else {  
192 - var pages = getCurrentPages(); //当前页面  
193 - var iscos = th.data.iscos;  
194 - var delta = 1;  
195 - if (Number(iscos) == 1) {  
196 - delta = delta + Number(iscos); //返回哪个页面  
197 - var prevPage = pages[pages.length - 2 - Number(iscos)]; //上一页面  
198 - prevPage.setData({  
199 - //直接给上一个页面赋值  
200 - time: time,  
201 - beautician_name: th.data.StaffName,  
202 - beauticianID: th.data.beautician_id  
203 - });  
204 - wx.navigateBack({  
205 - //返回  
206 - delta: 2  
207 - })  
208 - } else {  
209 - var prevPage = pages[pages.length - 2]; //上一页面  
210 - prevPage.setData({  
211 - //直接给上一个页面赋值  
212 - time: time  
213 - });  
214 - wx.navigateBack({  
215 - //返回  
216 - delta: 1  
217 - })  
218 - }  
219 - }  
220 - },  
221 - //选择时间  
222 - Selection_time: function (e) {  
223 - var th = this;  
224 - var index = e.currentTarget.dataset.index;  
225 - var time_index = th.data.time_index;  
226 - if (index == time_index) {  
227 - return false;  
228 - } else {  
229 - th.setData({  
230 - time_index: index  
231 - })  
232 - }  
233 - },  
234 - //查询七天预约时间  
235 - query_aweek: function () {  
236 - var th = this;  
237 - var beautician_id = th.data.beautician_id; //美容师id  
238 - var storageId = th.data.storageId;  
239 -  
240 - var itemId = th.data.itemId; //服务id  
241 - var projectId = th.data.projectId; //项目id  
242 - var number = th.data.number; //预约单号  
243 - var url = "/api/weshop/marketing/reservation/staff/seven/time/listnew"; //接口地址  
244 - getApp().request.promiseGet(url, {  
245 - data: {  
246 - projectId: projectId,  
247 - beauticianId: beautician_id,  
248 - serviceId: itemId,  
249 - storeId: a.stoid,  
250 - storageId: storageId,  
251 - number: number,  
252 - VipId: getApp().globalData.userInfo.erpvipid,  
253 - }  
254 - }).then(res => {  
255 - if (res.data.code == 0) {  
256 - var data = res.data.data;  
257 - var arr = [];  
258 - for (var i in data) {  
259 - var em = {  
260 - "time": i,  
261 - "val": data[i]  
262 - };  
263 - arr.push(em);  
264 - }  
265 - arr.sort(th.sort_arr);  
266 - var weeks = ["今天", "明天", "后天"];  
267 - var week = "";  
268 - for (var i = 3; i < arr.length; i++) {  
269 - var date = new Date(arr[i].time);  
270 - if (date.getDay() == 0) week = "周日"  
271 - if (date.getDay() == 1) week = "周一"  
272 - if (date.getDay() == 2) week = "周二"  
273 - if (date.getDay() == 3) week = "周三"  
274 - if (date.getDay() == 4) week = "周四"  
275 - if (date.getDay() == 5) week = "周五"  
276 - if (date.getDay() == 6) week = "周六"  
277 - weeks[i] = week;  
278 - }  
279 - th.setData({  
280 - aweeks: arr,  
281 - weeks: weeks  
282 - })  
283 - th.query_date();  
284 -  
285 - } else {  
286 - getApp().my_warnning(res.data.msg, 0, th);  
287 - }  
288 - })  
289 -  
290 - },  
291 -  
292 - query_date: function () {  
293 - var th = this;  
294 - var projectId = th.data.projectId;  
295 - var date_id = th.data.date_id; //日期下标  
296 - var SeekTime = th.data.aweeks[date_id].time;  
297 - var val = th.data.aweeks[date_id].val;  
298 - var number = th.data.number; //预约单号  
299 - var url = "/api/weshop/marketing/reservation/staff/time/listnew";  
300 - getApp().request.promiseGet(url, {  
301 - data: {  
302 - projectId: projectId,  
303 - staffId: th.data.beautician_id,  
304 - storageId: th.data.storageId,  
305 - serviceId: th.data.itemId,  
306 - seekTime: SeekTime,  
307 - storeId: a.stoid,  
308 - number: number,  
309 - VipId: getApp().globalData.userInfo.erpvipid,  
310 - }  
311 - }).then(res => {  
312 - if (res.data.code == 0) {  
313 - var hours = th.data.hours;  
314 - var time_list = res.data.data;  
315 - var time = th.data.time;  
316 - var date_id = th  
317 - var new_time = [];  
318 - var date = th.data.hours.substring(0, 2);  
319 -  
320 - //不等于空就是有可以预约的时间  
321 - if (time_list != null) {  
322 - if (res.data.data && res.data.data[0] != undefined) {  
323 - if (res.data.data[0].GroupHour && res.data.data[0].GroupHour.length > 11) {  
324 - getApp().my_warnning(res.data.data[0].GroupHour, 0, th);  
325 - }  
326 - }  
327 - //循环固定和可预约的时间  
328 - for (var i = 0; i < time.length; i++) {  
329 - for (var ii = 0; ii < time_list.length; ii++) {  
330 - //判断固定的时间和可以预约的时间  
331 - if (time[i] == time_list[ii].begintime.substring(0, 5)) {  
332 - var date_id = th.data.date_id;  
333 - if (date > time_list[ii].begintime.substring(0, 2) && date_id == 0) {  
334 - new_time[i] = "";  
335 - break;  
336 - } else {  
337 - new_time[i] = time_list[ii].begintime.substring(0, 5);  
338 - break;  
339 - }  
340 - } else {  
341 - new_time[i] = "";  
342 - }  
343 - }  
344 - }  
345 - } else {  
346 - for (var i = 0; i < time.length; i++) {  
347 - new_time[i] = "";  
348 - }  
349 - }  
350 - th.setData({  
351 - time_list: new_time,  
352 - })  
353 - } else {  
354 - getApp().my_warnning(res.data.msg, 0, th);  
355 - }  
356 - })  
357 -  
358 - },  
359 - //更改预约时间  
360 - change_time: function () {  
361 - var th = this;  
362 - var seekTime = th.data.seekTime; //选择的日期  
363 - var time_list = th.data.time_list;  
364 - var time_index = th.data.time_index;  
365 - var time = time_list[time_index];  
366 - var number = th.data.number; //预约单号  
367 - var json = {  
368 - "arrangeTime": seekTime + " " + time,  
369 - "number": number,  
370 - "remark": "更改预约时间",  
371 - "states": 0,  
372 - "storeId": a.stoid  
373 - };  
374 - var data = JSON.stringify(json);  
375 - var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址  
376 - wx.request({  
377 - url: url,  
378 - data: data,  
379 - method: 'put',  
380 - header: {  
381 - 'content-type': 'application/json'  
382 - }, // 设置请求的 header  
383 - success: function (res) {  
384 - if (res.data.code == 0) {  
385 - getApp().my_warnning("更改成功", 0, th);  
386 - } else {  
387 - getApp().my_warnning(res.data.msg, 0, th);  
388 - }  
389 - }  
390 - })  
391 - },  
392 - //预览头像  
393 - previewImage: function (e) {  
394 - var th = this;  
395 - var current = e.currentTarget.dataset.src;  
396 - getApp().globalData.no_clear=1;  
397 - wx.previewImage({  
398 - current: current, // 当前显示图片的http链接  
399 - urls: [th.data.head_img] // 需要预览的图片http链接列表  
400 - })  
401 - },  
402 -  
403 - sort_arr: function (a, b) {  
404 - a = a['time'];  
405 - b = b['time'];  
406 - if (a < b) {  
407 - return -1;  
408 - }  
409 - if (a > b) {  
410 - return 1;  
411 - }  
412 - return 0;  
413 - },  
414 -  
415 - check_is_in_arr: function (val, pdata) {  
416 - if (!val || !pdata) return false;  
417 - for (var i in pdata) {  
418 - if (pdata[i].begintime.indexOf(val) != -1) {  
419 - return true;  
420 - }  
421 - }  
422 - return false;  
423 - }  
424 -  
425 -  
426 -  
427 -})  
428 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/beauty_deta.json deleted
1 -{  
2 - "navigationBarTitleText": "美容师详情",  
3 - "usingComponents": {  
4 - "warn": "/components/long_warn/long_warn"  
5 - }  
6 -}  
7 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/beauty_deta.wxml deleted
1 -<view class="container">  
2 - <view class="backcolor"></view>  
3 -  
4 - <view class="comments">  
5 - <!-- 个人信息 -->  
6 - <view class="Personal">  
7 -  
8 - <view class="name fs36 ellipsis-1">{{name}}</view>  
9 -  
10 - <view class="ellipsis-4" style="width:100%">  
11 - <view style="overflow:hidden;">  
12 - <image class="head" src="{{head_img==''?iurl+defimgurl:head_img}}" data-errorimg="{{head_img}}" binderror="bind_bnerr1" data-img="{{head_img}}" data-src="{{head_img}}"></image>  
13 - <view class="introduce fs26">  
14 - <block wx:if="{{comment!=''}}">  
15 - {{comment}}  
16 - </block>  
17 - <block wx:else>  
18 - 暂无介绍  
19 - </block>  
20 - </view>  
21 - <view style="clear:both"></view>  
22 - </view>  
23 - </view>  
24 -  
25 - </view>  
26 -  
27 - <view>  
28 - <view class="fs36" style="margin-bottom:35rpx;">服务预约</view>  
29 - <scroll-view class="scroll-h fs26 " scroll-x>  
30 - <view class="rel" wx:for="{{aweeks}}" style="display: inline-block;">  
31 - <block wx:if="{{aweeks[index].val!=''}}">  
32 - <view class="scroll-item-h bd {{index==date_id?'chbd':''}}" bindtap="check_date" data-dateid="{{index}}">  
33 - <view>{{weeks[index]}}</view>  
34 - <view>{{item.time}}</view>  
35 - </view>  
36 - </block>  
37 - <block wx:else>  
38 - <view class="scroll-item-h bd {{index==date_id?'chbd':''}}" bindtap="check_date" data-dateid="{{index}}">  
39 - <view>{{weeks[index]}}(约满)</view>  
40 - <view>{{item.time}}</view>  
41 - </view>  
42 - </block>  
43 - </view>  
44 -  
45 - </scroll-view>  
46 -  
47 - <!-- 选择时间 -->  
48 - <view class="Times">  
49 -  
50 - <view class="flex-center" wx:for="{{time}}" style="display:inline-block;" wx:for-index="key" wx:for-item="it">  
51 - <block wx:if="{{it==time_list[key]}}">  
52 - <view class="Time flex-center {{time_index==key?'chTime':''}}" bindtap="Selection_time" data-index="{{key}}">  
53 - <view>  
54 - <view class="fs26">{{it}}</view>  
55 - </view>  
56 - </view>  
57 - </block>  
58 - <block wx:else>  
59 - <view class="Time flex-center nochTime">  
60 - <view>  
61 - <view class="fs26">{{it}}</view>  
62 - </view>  
63 - </view>  
64 - </block>  
65 - </view>  
66 - <view class="choice flex-center fs32" bindtap="navigateBack">  
67 - <view>确定选择</view>  
68 - </view>  
69 -  
70 - </view>  
71 -  
72 - </view>  
73 -  
74 - </view>  
75 -  
76 -</view>  
77 -<warn id="warn"></warn>  
78 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/beauty_deta.wxss deleted
1 -.container {  
2 - border-top: 7rpx solid rgb(245, 245, 245);  
3 -}  
4 -  
5 -.backcolor {  
6 - position: absolute;  
7 - top: 0rpx;  
8 - left: 0rpx;  
9 - z-index: 0;  
10 - width: 100%;  
11 - height: 270rpx;  
12 - background-color: rgb(214, 1, 33);  
13 -  
14 -}  
15 -  
16 -.comments {  
17 - position: absolute;  
18 - top: 45rpx;  
19 - left: 0rpx;  
20 - z-index: 1;  
21 - padding: 0rpx 23rpx;  
22 -}  
23 -  
24 -.name {  
25 - font-weight: bold;  
26 - float: left;  
27 - width: 250rpx;  
28 -}  
29 -  
30 -.head {  
31 - width: 130rpx;  
32 - height: 130rpx;  
33 - border-radius: 50%;  
34 - float: right;  
35 - margin: 0rpx 15rpx;  
36 - /* border: 2rpx solid red; */  
37 -}  
38 -  
39 -.introduce {  
40 - margin-top: 90rpx;  
41 - text-indent: 2em;  
42 - color: rgb(102, 102, 102);  
43 -}  
44 -  
45 -.Personal {  
46 - width: 640rpx;  
47 - height: 300rpx;  
48 - background-color: rgb(255, 255, 255);  
49 - border-radius: 5rpx;  
50 - box-shadow: 0rpx 2rpx 2rpx 2rpx rgb(250, 228, 230);  
51 - margin-bottom: 65rpx;  
52 - padding-top: 40rpx;  
53 - padding-left: 35rpx;  
54 - padding-right: 35rpx;  
55 -}  
56 -  
57 -.choice {  
58 - height: 70rpx;  
59 - background-color: rgb(214, 1, 33);  
60 - color: rgb(255, 255, 255);  
61 - margin-top: 30rpx;  
62 -}  
63 -  
64 -.scroll-h {  
65 - white-space: nowrap;  
66 - width: 704rpx;  
67 - overflow: visible;  
68 - height: 125rpx;  
69 - color: transparent;  
70 -}  
71 -  
72 -.scroll-item-h {  
73 - display: inline-block;  
74 - width: 172rpx;  
75 - text-align: center;  
76 - overflow: visible;  
77 - height: 70rpx;  
78 - padding: 15rpx 0rpx;  
79 -}  
80 -::-webkit-scrollbar{  
81 - width: 0;  
82 - height: 0;  
83 - color: transparent;  
84 -}  
85 -.box {  
86 - width: 0px;  
87 - height: 0px;  
88 - margin-left: 15rpx;  
89 - border-top: 21rpx solid transparent;  
90 - border-right: 21rpx solid transparent;  
91 - border-left: 21rpx solid transparent;  
92 - display: inline-block;  
93 - transform: rotate(180deg);  
94 - border-bottom: 21rpx solid rgb(214, 1, 33);  
95 -}  
96 -  
97 -.bd {  
98 - /* border: 2rpx solid rgb(238, 238, 238); */  
99 - background-color: rgb(255, 255, 255);  
100 - color: rgb(20, 20, 20);  
101 -}  
102 -  
103 -.chbd {  
104 - border: 2rpx solid rgb(214, 1, 33);  
105 - background-color: rgb(214, 1, 33);  
106 - color: rgb(255, 255, 255);  
107 -}  
108 -  
109 -.Times {  
110 - background-color: rgb(238, 243, 247);  
111 - margin-bottom: 30rpx;  
112 - padding:34rpx 27rpx;  
113 -}  
114 -  
115 -.Time {  
116 - border: 2rpx solid rgb(238, 238, 238);  
117 - width: 160rpx;  
118 - height: 70rpx;  
119 - background-color: rgb(255, 255, 255);  
120 - text-align: center;  
121 - padding-top: 15rpx;  
122 - padding-bottom: 15rpx;  
123 -}  
124 -.chTime{  
125 - border-color: rgb(214, 1, 33);  
126 -}  
127 -.nochTime{  
128 - color: rgb(174,177,177);  
129 - background-color: rgb(250,250,250);  
130 -}  
131 -.abs {  
132 - left: 55rpx;  
133 - bottom: -39rpx;  
134 -}  
pages/user/my_service/cosmetology_list.js deleted
1 -var e = getApp(),  
2 - a = e.globalData.setting,  
3 - os = a,  
4 - t = e.request,  
5 - d = e.globalData;  
6 -Page({  
7 -  
8 - /**  
9 - * 页面的初始数据  
10 - */  
11 - data: {  
12 - defimgurl: "/miniapp/images/no-head.jpg",  
13 - iurl: a.imghost,  
14 - cosmetology_list: [], //美容师列表  
15 - is_cosmetology_read: 0, //是否有读过美容师接口,该属性用在没有美容师列表的排版  
16 - curpage: 1, //当前分页数  
17 - pageSize: 10, //页大小  
18 - total: 0, //总数量  
19 - ismore: 0, //是否加载完毕  
20 - itemId: 0, //服务id,  
21 - storageId: 0, //线下门店id  
22 - projectId:"",//项目id  
23 - },  
24 - onReachBottom: function() {  
25 - var th = this;  
26 - if (this.data.total <= th.data.pageSize) return;  
27 - if (this.data.ismore) return;  
28 - wx.showLoading({  
29 - title: '加载中...',  
30 - })  
31 - th.query_cology();  
32 - },  
33 - query_cology: function() {  
34 - var th = this;  
35 - var url = "/api/weshop/marketing/reservation/staff/pagenew";  
36 - var itemId = th.data.itemId; //服务id  
37 - var storageId = th.data.storageId;  
38 - getApp().request.promiseGet(url, {  
39 - data: {  
40 - storeId: a.stoid,  
41 - userId: d.user_id,  
42 - serviceId: itemId,  
43 - storageId: storageId,  
44 - page: th.data.curpage,  
45 - pageSize: th.data.pageSize  
46 - }  
47 - }).then(res => {  
48 - wx.hideLoading();  
49 - if (res.data.code == 0) {  
50 - th.data.curpage++;  
51 - var arr1 = th.data.cosmetology_list;  
52 - var arr2 = res.data.data;  
53 - var arr3 = [...arr1, ...arr2];  
54 -  
55 -  
56 - th.setData({  
57 - cosmetology_list: arr3,  
58 - total: res.data.data.total,  
59 - is_service_read: 1,  
60 - is_cosmetology_read:1  
61 - }), wx.stopPullDownRefresh(); //停止下拉刷新  
62 - } else {  
63 - th.setData({  
64 - is_cosmetology_read:1,  
65 - ismore:1  
66 - })  
67 - }  
68 - })  
69 - },  
70 - //图片失败,默认图片  
71 - bind_bnerr1: function(e) {  
72 - var _errImg = e.target.dataset.errorimg;  
73 - var _Img = e.target.dataset.img;  
74 - if (_Img != undefined) {  
75 - var _errObj = {};  
76 - _errObj[_errImg] = "/miniapp/images/no-head.jpg";  
77 - console.log(_errObj,"zzzzzzz");  
78 - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;  
79 - }  
80 - },  
81 - /**  
82 - * 生命周期函数--监听页面加载  
83 - */  
84 - onLoad: function(options) {  
85 - var th = this;  
86 - th.setData({  
87 - projectId: options.projectId,  
88 - itemId: options.itemId,  
89 - storageId: options.storageId  
90 - })  
91 - },  
92 -  
93 - /**  
94 - * 生命周期函数--监听页面显示  
95 - */  
96 - onShow: function() {  
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 - })  
105 - th.query_cology();  
106 - },  
107 -  
108 -})  
109 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/cosmetology_list.json deleted
1 -{  
2 - "navigationBarTitleText": "美容师列表",  
3 - "usingComponents": {  
4 - "warn": "/components/long_warn/long_warn"  
5 - }  
6 -}  
7 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/cosmetology_list.wxml deleted
1 -<view class="container">  
2 - <image class="appointment" src="{{iurl}}/miniapp/images/yyservice/Cosm_appo.png"></image>  
3 -  
4 - <!-- 总预约 -->  
5 - <view wx:if="{{cosmetology_list.length>0}}">  
6 - <!-- 当个预约 -->  
7 - <view class="single" wx:for="{{cosmetology_list}}" wx:for-item="item">  
8 - <!-- 个人属性 -->  
9 - <view class="flex-vertical-between">  
10 - <view class="flex-vertical">  
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>  
13 - <!-- 用户名 -->  
14 - <view class="UserName ellipsis-1 fs32">{{item.StaffName}}</view>  
15 - <!-- 评价星数 -->  
16 - <view class="flex" style="margin-top:10rpx;">  
17 - <image class="Stars" src="{{iurl}}{{key<item.Star || item.Star==''?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{item.Star==''?5:5}}" wx:for-index="key" wx:for-item="it"></image>  
18 - <!-- images/StarswhiteUnCk.png//白色星星地址 -->  
19 - </view>  
20 - <!-- 个人标签 -->  
21 - <view class="Labels fs22 flex" wx:if="{{item.EvaluationLabel!=''?true:false}} ">  
22 - <view wx:if="{{lab<3}}" class="flex-center Labelitem itone {{lab==1?'itwo':''}} {{lab==2?'ith':''}}" wx:for="{{item.EvaluationLabel}}" wx:for-item="it" wx:for-index="lab">  
23 - <view class="ellipsis-1">{{it.LabelName}}</view>  
24 - </view>  
25 - </view>  
26 - </view>  
27 - </view>  
28 -  
29 - <!-- 预约状态 -->  
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>  
32 - </navigator>  
33 - </view>  
34 - <view class="fs26 information">  
35 - <block wx:if="{{item.Remark1!=''}}">  
36 - <view class="ellipsis-3">{{item.Remark1}}  
37 - </view>  
38 - </block>  
39 - <block wx:else>  
40 - <view>暂无介绍</view>  
41 - </block>  
42 - </view>  
43 - </view>  
44 - <!-- 没有数据 -->  
45 - <!-- 加载完毕并且数据大于=页大小 -->  
46 - <view class="After_all flex-center" wx:if="{{ismore && cosmetology_list.length>=4}}">  
47 - <view class="Line"></view>  
48 - <view class="end fs26 xc-black">到底了</view>  
49 - <view class="Line"></view>  
50 - </view>  
51 - </view>  
52 -</view>  
53 -<!-- 无美容师 -->  
54 -<view class="empty_order" wx:if="{{cosmetology_list.length<1 && is_cosmetology_read}}">  
55 - <view class="flex-level">  
56 - <image src="{{iurl}}miniapp/images/yyservice/no_beauty.png"></image>  
57 - </view>  
58 - <view class="flex-level fs30 xc-ash">暂无美容师</view>  
59 - <view class="flex-level">  
60 - <navigator url="/pages/user/my_service/i_service" bindtap="goto">  
61 - <view class="flex-center fs28 white">其他项目</view>  
62 - </navigator>  
63 - </view>  
64 -</view>  
65 -<warn id="warn"></warn>  
66 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/cosmetology_list.wxss deleted
1 -page{  
2 - height: 100%;  
3 -}  
4 -.container{  
5 - background-color: rgb(255,255,255);  
6 -}  
7 -.appointment {  
8 - width: 100%;  
9 - height: 305rpx;  
10 -}  
11 -  
12 -.single {  
13 - margin-left: 10rpx;  
14 - border-bottom: 1rpx solid rgb(229, 229, 229);  
15 - padding-bottom: 30rpx;  
16 - padding-left: 20rpx;  
17 - padding-right: 35rpx;  
18 - padding-top: 30rpx;  
19 -}  
20 -  
21 -.portrait {  
22 - width: 140rpx;  
23 - height: 140rpx;  
24 - border-radius: 50%;  
25 - margin-right: 30rpx;  
26 -}  
27 -.UserName{  
28 - max-width: 250rpx;  
29 -}  
30 -.Stars {  
31 - width: 25rpx;  
32 - height: 25rpx;  
33 - margin-right: 7rpx;  
34 -}  
35 -.Labels{  
36 - width: 100%;  
37 - margin-top: 15rpx;  
38 -}  
39 -.Label {  
40 - margin-top: 25rpx;  
41 -}  
42 -  
43 -.Labelitem {  
44 - width: 100rpx;  
45 - height: 30rpx;  
46 - border-radius: 20rpx;  
47 - line-height: 30rpx;  
48 - margin-right: 10rpx;  
49 - padding:0rpx 9rpx;  
50 -}  
51 -  
52 -.itone {  
53 - border: 2rpx solid rgb(22, 232, 131);  
54 - color: rgb(22, 232, 131);  
55 -}  
56 -  
57 -.itwo {  
58 - border: 2rpx solid rgb(92, 135, 248);  
59 - color: rgb(92, 135, 248);  
60 -}  
61 -  
62 -.ith {  
63 - border: 2rpx solid rgb(244, 143, 55);  
64 - color: rgb(244, 143, 55);  
65 -}  
66 -  
67 -.gofu {  
68 - width: 120rpx;  
69 - padding: 5rpx 0rpx;  
70 - border-radius: 25rpx;  
71 -}  
72 -  
73 -.go {  
74 - border: 1rpx solid rgb(196, 26, 46);  
75 - color: rgb(196, 26, 46);  
76 - background-color: rgb(255,255,255);  
77 -}  
78 -  
79 -.gofull {  
80 - border: 1rpx solid rgb(185, 185, 185);  
81 - color: rgb(185, 185, 185);  
82 - background-color: rgb(255,255,255);  
83 -}  
84 -  
85 -.information {  
86 - margin-top: 25rpx;  
87 - text-indent: 2em;  
88 - color: rgb(103, 103, 103);  
89 -}  
90 -/* 无订单 */  
91 -.empty_order image {  
92 - width: 330rpx;  
93 - height: 280rpx;  
94 - margin-top: 120rpx;  
95 -}  
96 -  
97 -.empty_order .xc-ash {  
98 - margin-top: 10rpx;  
99 - font-weight: 600px;  
100 -}  
101 -  
102 -.empty_order navigator {  
103 - margin-top: 60rpx;  
104 - border-radius: 40rpx;  
105 -}  
106 -  
107 -.empty_order navigator view {  
108 - width: 247rpx;  
109 - height: 56rpx;  
110 - background-color: rgb(255, 72, 72);  
111 - border-radius: 40rpx;  
112 -}  
113 -.After_all {  
114 - height: 80rpx;  
115 -}  
116 -  
117 -.After_all .Line {  
118 - border-top: 3rpx solid rgb(0, 0, 0);  
119 - width: 130rpx;  
120 -}  
121 -  
122 -.After_all .end {  
123 - margin: 0rpx 15rpx;  
124 -}  
pages/user/my_service/hist_service.wxml
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <!-- right --> 40 <!-- right -->
41 <view class="serState fs32"> 41 <view class="serState fs32">
42 <view wx:if="{{item.State==0}}" > 42 <view wx:if="{{item.State==0}}" >
43 - <navigator url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}"> 43 + <navigator url="/packageG/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">
44 <view>未服务</view> 44 <view>未服务</view>
45 <view>更改时间</view> 45 <view>更改时间</view>
46 </navigator> 46 </navigator>
pages/user/my_service/i_service.wxml
@@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
56 <view>立即使用</view> 56 <view>立即使用</view>
57 </view> 57 </view>
58 <!-- 可预约 --> 58 <!-- 可预约 -->
59 - <view wx:if="{{item.State>0}}" class="flex-level appointment yellow-b" data-url="/pages/user/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}"> 59 + <view wx:if="{{item.State>0}}" class="flex-level appointment yellow-b" data-url="/packageG/pages/user/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}">
60 <view>预约</view> 60 <view>预约</view>
61 </view> 61 </view>
62 </view> 62 </view>
pages/user/my_service/tment_details.wxml
@@ -97,11 +97,11 @@ @@ -97,11 +97,11 @@
97 <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}" bindtap="cancel_tment"> 97 <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}" bindtap="cancel_tment">
98 <view class="yellow-b" data-index="{{index}}">取消预约</view> 98 <view class="yellow-b" data-index="{{index}}">取消预约</view>
99 </view> 99 </view>
100 - <navigator wx:if="{{item.State>0}}" class="sub flex-center yellow-b" url="/pages/user/my_service/tment_order_list"> 100 + <navigator wx:if="{{item.State>0}}" class="sub flex-center yellow-b" url="/packageG/pages/user/my_service/tment_order_list">
101 <view class="yellow-b">我的服务</view> 101 <view class="yellow-b">我的服务</view>
102 </navigator> 102 </navigator>
103 <!-- 右边栏 --> 103 <!-- 右边栏 -->
104 - <navigator wx:if="{{item.State==0}}" class="sub rb flex-center" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}&VipId={{item.VipID}}"> 104 + <navigator wx:if="{{item.State==0}}" class="sub rb flex-center" url="/packageG/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}&VipId={{item.VipID}}">
105 <view>更改时间</view> 105 <view>更改时间</view>
106 </navigator> 106 </navigator>
107 <navigator wx:if="{{item.State==1}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}"> 107 <navigator wx:if="{{item.State==1}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}">
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
110 <navigator wx:if="{{item.State==4}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}"> 110 <navigator wx:if="{{item.State==4}}" class="sub rb flex-center" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}">
111 <view>查看评价</view> 111 <view>查看评价</view>
112 </navigator> 112 </navigator>
113 - <navigator wx:if="{{item.State==2 || item.State==3}}" class="sub rb flex-center" url="/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}"> 113 + <navigator wx:if="{{item.State==2 || item.State==3}}" class="sub rb flex-center" url="/packageG/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}">
114 <view>重新预约</view> 114 <view>重新预约</view>
115 </navigator> 115 </navigator>
116 116
pages/user/my_service/tment_eval.js
@@ -241,7 +241,7 @@ Page({ @@ -241,7 +241,7 @@ Page({
241 evaluate_qt:function(){ 241 evaluate_qt:function(){
242 242
243 wx.redirectTo({ 243 wx.redirectTo({
244 - url: "/pages/user/my_service/tment_order_list?state="+2 244 + url: "/packageG/pages/user/my_service/tment_order_list?state="+2
245 }); 245 });
246 }, 246 },
247 //点击领取礼包 247 //点击领取礼包
pages/user/my_service/tment_order_list.js deleted
1 -var e = getApp(),  
2 - a = e.globalData.setting,  
3 - os = a,  
4 - t = e.request,  
5 - d = e.globalData;  
6 -Page({  
7 -  
8 - /**  
9 - * 页面的初始数据  
10 - */  
11 - data: {  
12 - url: a.url, //接口网址  
13 - iurl: a.imghost, //图片网址  
14 - activeCategoryId: 0, //类别选中下标  
15 - defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",  
16 - categories: [{  
17 - name: "全部",  
18 - id: 0  
19 - }, {  
20 - name: "未服务",  
21 - id: 1  
22 - }, {  
23 - name: "已服务",  
24 - id: 2  
25 - }, {  
26 - name: "已过期",  
27 - id: 3  
28 - }],  
29 - tm_order_list: [], //我的预约订单列表  
30 - curpage: 1, //当前分页数  
31 - pageSize: 10, //页大小  
32 - total: 0,  
33 - ismore: 0, //是否加载完毕  
34 - is_read: 0, //是否加载接口  
35 - states: 4, //4为取消预约  
36 - },  
37 -  
38 - /**  
39 - * 生命周期函数--监听页面加载  
40 - */  
41 - onLoad: function(options) {  
42 - var state=options.state;  
43 - if (state != null && state != undefined && state!=""){  
44 - this.setData({ activeCategoryId: state });  
45 - }  
46 -  
47 - },  
48 - changeTab: function(e) {  
49 - var th = this;  
50 - var id = e.currentTarget.dataset.id;  
51 - var activeCategoryId = th.data.activeCategoryId;  
52 - if (id != activeCategoryId) {  
53 - th.setData({  
54 - activeCategoryId: id,  
55 - tm_order_list: [],  
56 - curpage: 1,  
57 - ismore: 0,  
58 - is_read: 0  
59 - })  
60 - th.query_orderList();  
61 - } else {  
62 - return false;  
63 - }  
64 - },  
65 - //显示核销码  
66 - code_show: function(e) {  
67 - var th = this;  
68 - //--获取成功的时候--  
69 - var no = e.currentTarget.dataset.order_sn;  
70 - var qc_com = th.selectComponent("#qc_com"); //组件的id  
71 - var obj = {  
72 - val: no,  
73 - content: "请将二维码展示给核销员,使用更快捷"  
74 - };  
75 - qc_com.open(obj)  
76 - },  
77 - query_orderList: function() {  
78 - wx.showLoading({  
79 - title: '加载中',  
80 - })  
81 - var th = this;  
82 - var url = "/api/weshop/marketing/reservation/reservation/page";  
83 -  
84 - var state_index = th.data.activeCategoryId;  
85 - if (state_index == 0) {  
86 - state_index = "";  
87 - } else {  
88 - --state_index;  
89 - }  
90 - th.setData({  
91 - is_read: 0  
92 - })  
93 - getApp().request.promiseGet(url, {  
94 - data: {  
95 - storeId: a.stoid,  
96 - userId: d.user_id,  
97 - state: state_index,  
98 - page: th.data.curpage,  
99 - pageSize: th.data.pageSize  
100 - }  
101 - }).then(res => {  
102 - wx.hideLoading();  
103 - if (res.data.code == 0) {  
104 - th.data.curpage++;  
105 - var arr1 = th.data.tm_order_list;  
106 - var arr2 = res.data.data.pageData;  
107 - var arr3 = [...arr1, ...arr2];  
108 - for(var i = 0;i<arr3.length;i++){  
109 - arr3[i].ArrangeTime = arr3[i].ArrangeTime.substring(0, 16);  
110 - }  
111 - var ismore = 0;  
112 - if (arr3.length == res.data.data.total) ismore = 1  
113 - th.setData({  
114 - tm_order_list: arr3,  
115 - total: res.data.data.total,  
116 - ismore: ismore,  
117 - is_read: 1  
118 - }), wx.stopPullDownRefresh(); //停止下拉刷新 {  
119 - } else {  
120 - wx.hideLoading();  
121 - th.setData({  
122 - tm_order_list: [],  
123 - is_read: 1  
124 - })  
125 - }  
126 - })  
127 -  
128 - },  
129 - //取消预约  
130 - cancel_tment: function(e) {  
131 - var th = this;  
132 - var th = this;  
133 - var my_confirm = th.selectComponent("#my_confirm"); //组件的id  
134 - my_confirm.open(  
135 - "确定取消?",  
136 - "取消",  
137 - "确定",  
138 - function() {  
139 - my_confirm.open_cancel(0);  
140 - },  
141 - function() {  
142 - my_confirm.open_cancel(0);  
143 - var index = e.currentTarget.dataset.index;  
144 - var states = th.data.states;  
145 - var order_list = th.data.tm_order_list;  
146 - var number = order_list[index].Number;  
147 - var json = {  
148 - "number": number,  
149 - "storeId": a.stoid,  
150 - "states": 3  
151 - };  
152 - var data = JSON.stringify(json);  
153 - var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址  
154 - wx.request({  
155 - url: url,  
156 - data: data,  
157 - method: 'put',  
158 - header: {  
159 - 'content-type': 'application/json'  
160 - }, // 设置请求的 header  
161 - success: function(res) {  
162 - if (res.data.code == 0) {  
163 - getApp().my_warnning("取消成功", 1, th);  
164 - var id = th.data.activeCategoryId;  
165 - if (id == 1) {  
166 - order_list.splice(index, 1);  
167 - th.setData({  
168 - tm_order_list: order_list  
169 - })  
170 - } else {  
171 - var start = 'tm_order_list[' + index + '].State';  
172 - th.setData({  
173 - [start]: 3  
174 - })  
175 - }  
176 - wx.stopPullDownRefresh(); //停止下拉刷新  
177 - } else {  
178 - getApp().my_warnning(res.data.msg, 0, th);  
179 - }  
180 - }  
181 - })  
182 - })  
183 -  
184 - },  
185 - //图片失败,默认图片  
186 - bind_bnerr1: function(e) {  
187 - var _errImg = e.target.dataset.errorimg;  
188 - var _Img = e.target.dataset.img;  
189 - if (_Img != undefined) {  
190 - var _errObj = {};  
191 - _errObj[_errImg] = "/miniapp/images/no_cate_def.png";  
192 - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;  
193 - }  
194 - },  
195 - /**  
196 - * 生命周期函数--监听页面显示  
197 - */  
198 - onShow: function() {  
199 - var th = this;  
200 - th.setData({  
201 - curpage: 1,  
202 - total: 0,  
203 - ismore: 0,  
204 - is_read: 0,  
205 - tm_order_list: []  
206 - })  
207 - th.query_orderList();  
208 - },  
209 -  
210 - /**  
211 - * 页面上拉触底事件的处理函数  
212 - */  
213 - onReachBottom: function() {  
214 - var th = this;  
215 - if (th.data.total <= th.data.pageSize) return;  
216 - if (th.data.ismore) return;  
217 -  
218 - wx.showLoading({  
219 - title: '加载中...',  
220 - })  
221 - th.query_orderList();  
222 - },  
223 - //关闭导航  
224 - close: function() {  
225 - var th = this;  
226 - var nav_b = th.selectComponent("#nav_b"); //组件的id  
227 - nav_b.close_box();  
228 - }  
229 -  
230 -})  
231 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/tment_order_list.json deleted
1 -{  
2 - "navigationBarTitleText": "我的预约",  
3 - "usingComponents": {  
4 - "qr_code": "/components/qr_code/qr_code",  
5 - "warn": "/components/long_warn/long_warn",  
6 - "my_confirm": "/components/my_confirm/my_confirm",  
7 - "nav_b": "/components/nav_b/nav_b"  
8 - }  
9 -}  
10 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/tment_order_list.wxml deleted
1 -<view class="container" catchtap="close">  
2 - <!-- 导航栏 -->  
3 - <view class="type-navbar padding flex-vertical fs30">  
4 - <view class="type-box flex-center {{activeCategoryId==item.id?'chtypebox':''}}" wx:for="{{categories}}" bindtap="changeTab" data-id="{{item.id}}">  
5 - <view>{{item.name}}</view>  
6 - </view>  
7 - </view>  
8 - <view class="itemMax">  
9 - <!-- 预约项目 -->  
10 - <view wx:for="{{tm_order_list}}">  
11 - <!-- 商品编号和状态 -->  
12 - <view class="Commodity_number flex-vertical-between fs26 padding">  
13 - <!--商品编号 -->  
14 - <text class="order_number ellipsis-1" selectable='true'>订单编号:{{item.Number}}</text>  
15 - <!-- 订单状态 -->  
16 - <view class="flex-center state">  
17 - <view wx:if="{{item.State==0}}">未服务</view>  
18 - <view wx:if="{{item.State==1}}">已服务</view>  
19 - <view wx:if="{{item.State==2}}">已过期</view>  
20 - <view wx:if="{{item.State==3}}">已取消</view>  
21 - <view wx:if="{{item.State==4}}">已评价</view>  
22 - </view>  
23 - </view>  
24 -  
25 - <!-- 项目属性 -->  
26 - <navigator class="items padding flex-vertical" url="/pages/user/my_service/tment_details?number={{item.Number}}">  
27 -  
28 - <view class="flex-center fs26">  
29 - <view class="itemimage">  
30 - <image class="itemimage" src="{{item.ImageUrl==''?iurl+defimgurl:item.ImageUrl}}" lazy-load="true" data-errorimg="tm_order_list[{{index}}].ImageUrl" binderror="bind_bnerr1" data-img="{{item.ImageUrl}}"></image>  
31 - </view>  
32 - <!-- 项目内容 -->  
33 - <view class="details">  
34 - <view class="item flex-vertical base">  
35 - <view class="itemname flex-level-right">预约门店:</view>  
36 - <view class="itemvalue ellipsis-1">{{item.StorageName}}</view>  
37 - </view>  
38 - <view class="item flex-vertical base">  
39 - <view class="itemname flex-level-right">预约项目:</view>  
40 - <view class="itemvalue ellipsis-1">{{item.ServiceName}}</view>  
41 - </view>  
42 - <view class="item flex-vertical base">  
43 - <block wx:if="{{item.State==1 || item.State==4}}">  
44 - <view class="itemname flex-level-right">服务美容师:  
45 - </view>  
46 - </block>  
47 - <block wx:else>  
48 - <view class="itemname flex-level-right">预约美容师:  
49 - </view>  
50 - </block>  
51 - <view class="itemvalue ellipsis-1">{{item.BeauticianName}}</view>  
52 - </view>  
53 - <view class="item flex-vertical base">  
54 - <view class="itemname flex-level-right">预约时间:</view>  
55 - <view>{{item.ArrangeTime}}</view>  
56 - </view>  
57 - <view class="item flex-vertical base" wx:if="{{item.WriteTime==''?false:true}}">  
58 - <view class="itemname flex-level-right">服务时间:</view>  
59 - <view>{{item.WriteTime}}</view>  
60 - </view>  
61 - </view>  
62 -  
63 - </view>  
64 - </navigator>  
65 - <view class="Unim flex-right-vertical fs26 padding">  
66 - <image wx:if="{{item.State==0}}" src="{{iurl}}miniapp/images/order/code.png" class="code" bindtap="code_show" data-order_sn="{{item.Number}}"></image>  
67 - <block wx:if="{{item.State==0}}">  
68 - <view class="Unimportance flex-level" data-index="{{index}}" bindtap="cancel_tment">取消预约</view>  
69 - </block>  
70 - <block wx:else>  
71 - <navigator url="/pages/user/my_service/tment_details?number={{item.Number}}" class="Unimportance flex-level">查看详情</navigator>  
72 - </block>  
73 - <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">更改时间</navigator>  
74 - <navigator wx:if="{{item.State==1}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}" class="important Unimportance flex-level">发表评价</navigator>  
75 - <navigator wx:if="{{item.State==2 || item.State==3}}" url="/pages/user/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}" class="important Unimportance flex-level">重新预约</navigator>  
76 - <navigator wx:if="{{item.State==4}}" url="/pages/user/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}" class="important Unimportance flex-level">评价详情</navigator>  
77 - </view>  
78 - </view>  
79 - <view class="exactly flex-center fs26" wx:if="{{ismore && tm_order_list.length>=3}}">  
80 - <view class="line"></view>  
81 - <view class="exactly_text">到底了</view>  
82 - <view class="line"></view>  
83 - </view>  
84 - </view>  
85 -</view>  
86 -  
87 -<!-- 无预约订单 -->  
88 -<view class="empty_order" wx:if="{{tm_order_list.length<1 && is_read}}" catchtap="close">  
89 - <view class="flex-level">  
90 - <image src="{{iurl}}miniapp/images/order/empty_order.png" lazy-load="true"></image>  
91 - </view>  
92 - <view class="flex-level fs30 xc-ash">无预约记录</view>  
93 - <view class="flex-level">  
94 - <navigator url="/pages/user/my_service/i_service" bindtap="goto">  
95 - <view class="flex-center fs32 white">立即预约</view>  
96 - </navigator>  
97 - </view>  
98 -</view>  
99 -<my_confirm id="my_confirm"></my_confirm>  
100 -<!-- 制作一个圆球导航 -->  
101 -<nav_b id="nav_b"></nav_b>  
102 -<!-- 弹出框扫描 -->  
103 -<qr_code id="qc_com"></qr_code>  
104 -<warn id="warn"></warn>  
105 \ No newline at end of file 0 \ No newline at end of file
pages/user/my_service/tment_order_list.wxss deleted
1 -page {  
2 - height: 100%;  
3 -}  
4 -  
5 -.container {  
6 - background-color: rgb(255, 255, 255);  
7 -}  
8 -  
9 -.type-navbar {  
10 - border-top: 3rpx solid rgb(221, 221, 221);  
11 - display: flex;  
12 - justify-content: space-between;  
13 - position: fixed;  
14 - background-color: rgb(255,255,255);  
15 - width:696rpx;  
16 -}  
17 -.itemMax{  
18 - margin-top: 93rpx;  
19 -}  
20 -  
21 -.type-box {  
22 - height: 88rpx;  
23 - line-height: 88rpx;  
24 - padding: 0rpx 15rpx;  
25 - border-bottom: 5rpx solid rgb(255, 255, 255);  
26 -}  
27 -  
28 -.chtypebox {  
29 - border-bottom: 5rpx solid rgb(224, 18, 18);  
30 -}  
31 -  
32 -.Commodity_number {  
33 - height: 80rpx;  
34 - border-top: 13rpx solid rgb(245, 245, 245);  
35 -}  
36 -  
37 -.Commodity_number image {  
38 - width: 30rpx;  
39 - height: 32rpx;  
40 -}  
41 -  
42 -.padding {  
43 - padding: 0rpx 27rpx;  
44 -}  
45 -  
46 -.lin {  
47 - border-left: 2rpx solid rgb(211, 29, 54);  
48 - margin-left: 17rpx;  
49 - margin-right: 14rpx;  
50 - height: 40rpx;  
51 -}  
52 -  
53 -.order_number {  
54 - max-width: 550rpx;  
55 -}  
56 -.state{  
57 - color: rgb(216,63,82);  
58 -}  
59 -.items {  
60 - border-top: 4rpx solid rgb(245, 245, 245);  
61 - border-bottom: 4rpx solid rgb(245, 245, 245);  
62 - height: 260rpx;  
63 -}  
64 -.code{  
65 - width: 55rpx;  
66 - height: 55rpx;  
67 -}  
68 -.itemimage {  
69 - width: 190rpx;  
70 - height: 190rpx;  
71 - margin-right: 20rpx;  
72 - border-radius: 50%;  
73 - border: 1px solid #eee;  
74 -}  
75 -  
76 -.details {  
77 - height: 190rpx;  
78 -}  
79 -  
80 -.itemname {  
81 - width: 150rpx;  
82 - margin-right: 20rpx;  
83 -}  
84 -  
85 -.itemvalue {  
86 - max-width: 300rpx;  
87 -}  
88 -  
89 -.Unimportance {  
90 - width: 140rpx;  
91 - height: 40rpx;  
92 - line-height: 40rpx;  
93 - border-radius: 8rpx;  
94 - background-color: rgb(255, 255, 255);  
95 - margin-left: 20rpx;  
96 - border: 2rpx solid rgb(191, 191, 191);  
97 -}  
98 -  
99 -.important {  
100 - background-color: rgb(212, 28, 52);  
101 - border: 2rpx solid rgb(212, 28, 52);  
102 - color: rgb(255, 255, 255);  
103 -}  
104 -  
105 -.Unim {  
106 - height: 110rpx;  
107 -}  
108 -  
109 -.exactly {  
110 - height: 80rpx;  
111 - background-color: rgb(245, 245, 245);  
112 -}  
113 -  
114 -.exactly_text {  
115 - margin: 0rpx 15rpx;  
116 -}  
117 -  
118 -.line {  
119 - border-top: 2rpx solid rgb(0, 0, 0);  
120 - width: 130rpx;  
121 -}  
122 -  
123 -/* 无预约 */  
124 -  
125 -.empty_order image {  
126 - width: 300rpx;  
127 - height: 280rpx;  
128 - margin-top: 202rpx;  
129 -}  
130 -  
131 -.empty_order .xc-ash {  
132 - margin-top: 10rpx;  
133 - font-weight: 600px;  
134 -}  
135 -  
136 -.empty_order navigator {  
137 - margin-top: 60rpx;  
138 - border-radius: 40rpx;  
139 -}  
140 -  
141 -.empty_order navigator view {  
142 - width: 247rpx;  
143 - height: 65rpx;  
144 - background-color: rgb(255, 72, 72);  
145 - border-radius: 40rpx;  
146 -}  
147 -.base{  
148 - display: flex;  
149 - height: 38rpx;  
150 - line-height: 38rpx;  
151 - align-items: baseline;  
152 -}  
153 \ No newline at end of file 0 \ No newline at end of file
pages/user/order_list/order_list.js
@@ -3269,7 +3269,7 @@ Page({ @@ -3269,7 +3269,7 @@ Page({
3269 console.log(n), getApp().showSuccess("支付成功!"); 3269 console.log(n), getApp().showSuccess("支付成功!");
3270 "function" == typeof success && success(); 3270 "function" == typeof success && success();
3271 wx.redirectTo({ 3271 wx.redirectTo({
3272 - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, 3272 + url: "/packageG/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id,
3273 }); 3273 });
3274 }, 3274 },
3275 fail: function (n) { 3275 fail: function (n) {
pages/user/userinfo/userinfo.js deleted
1 -function e(e, a, r) {  
2 - return a in e ? Object.defineProperty(e, a, {  
3 - value: r,  
4 - enumerable: !0,  
5 - configurable: !0,  
6 - writable: !0  
7 - }) : e[a] = r, e;  
8 -}  
9 -  
10 -var a = getApp(),  
11 - r = a.globalData.setting,  
12 - t = a.request,  
13 - s = require("../../../utils/common.js"),  
14 - util = require("../../../utils/util.js"),  
15 - ut = util,  
16 - d = getApp().globalData;  
17 -  
18 -var timestamp = Date.parse(new Date());  
19 -var date = new Date(timestamp);  
20 -const {  
21 - barcode,  
22 - qrcode  
23 -} = require('../../../utils/index.js');  
24 -  
25 -Page({  
26 - data: {  
27 - phone: "",  
28 - url: r.url,  
29 - resourceUrl: r.resourceUrl,  
30 - iurl: r.imghost,  
31 - defaultAvatar: r.resourceUrl + "/static/images/user68.jpg",  
32 - user: null,  
33 - tc_hide: true,  
34 - stoname: "",  
35 - checkDate: false,  
36 - datet: "",  
37 - year: date.getFullYear(),  
38 - store: 0,  
39 - all_sto: "",  
40 - region_name: "",  
41 - def_pick_store: "",  
42 - sort_store: 0, //门店分类  
43 - sec_sto: "",  
44 - more_store: 0, //选择门店  
45 - choice_sort_store: 0, //选择分类门店  
46 - more_store: 0, //选择门店  
47 - lat: null, //维度  
48 - lon: null, //经度  
49 - fir_pick_index: 0,  
50 - sec_pick_index: 0,  
51 - is_gps: 1,  
52 - is_no_plus:1,  
53 - lon: 0,  
54 - only_pk: 0,  
55 - open_ind_store: 0, //哪里打开的门店列表的控制属性  
56 - ispwhid: 1, //是否隐藏密码显示  
57 - isstcsp: 0, //是否启用密码消费  
58 - isGender: 1, //什么性别  
59 - iscalendar: 0, //是否是农历  
60 - consumption: "", //消费密码  
61 - identity_card: "", //身份证值  
62 - address: "", //地址  
63 - openid: "", //openid  
64 - pulscardname: "", //PLUS会员的卡  
65 - gradename: "", //会员权益的卡  
66 - isBool: "",  
67 - sto_sele_id: "", //所属门店id  
68 - is_zy: 0, //是否执行onshow  
69 - is_lable_set: "", //是否启用我的兴趣标签  
70 - check_label: [], //我选择的兴趣标签  
71 - fir_guide_id:null, //存储会员详情接口出来的美导ID  
72 -  
73 - userInfo: {},  
74 - hasUserInfo: false,  
75 - canIUseGetUserProfile: false,  
76 - getusercode_vailtime:10,//会员二维码时效  
77 -  
78 - sele_ing:0,  
79 - set_isstcsp:0  
80 -  
81 - },  
82 - //通过路径跳转到其他页面  
83 - goto: function(e) {  
84 - this.data.is_zy=1; //避免页面重新加载  
85 - var url = e.currentTarget.dataset.url;  
86 - getApp().goto(url);  
87 - },  
88 - //获取配置信息  
89 - get_config: function() {  
90 - var th = this;  
91 - getApp().getConfig2(function(ee) {  
92 - console.log('ee',ee);  
93 - var sms_conf = ee.switch_list;  
94 - sms_conf = JSON.parse(sms_conf);  
95 - let reg_type = ee.reg_type;  
96 - let reg_info = ee.reg_info;  
97 - var con_f={  
98 - rank_switch:sms_conf.rank_switch,  
99 - is_lable_set: sms_conf.user_label_set, //是不是会员标签设置  
100 - guide_title:sms_conf.guide_consultant, //系统参数 导购标题  
101 - guide_change_time:sms_conf.guide_change_time, //每月能修改几次  
102 - }  
103 - if(reg_type) con_f.reg_info= JSON.parse(reg_info);  
104 - th.setData(con_f)  
105 -  
106 - if (sms_conf.usercode_vailtime!=null && parseInt(sms_conf.usercode_vailtime)>0)  
107 - {  
108 - th.setData({ getusercode_vailtime: sms_conf.usercode_vailtime });  
109 - }  
110 - if (sms_conf.user_label_set) {  
111 - th.query_checklabels();  
112 - }  
113 - },1)  
114 - },  
115 - //查找会员选择的兴趣标签  
116 - query_checklabels: function() {  
117 - var th = this;  
118 - var url = "/api/weshop/marketing/holiday/vip/interest/label/get";  
119 - var interest_lables = th.data.interest_lables; //兴趣标签  
120 - getApp().request.promiseGet(url, {  
121 - data: {  
122 - userId: d.user_id,  
123 - storeId: r.stoid  
124 - }  
125 - }).then(res => {  
126 - if (res.data.code == 0) {  
127 - var data = res.data.data;  
128 - var VipLabel = th.data.check_label; //通过id标签找到已选择的标签  
129 - var dateList = data.VipLabel.split(",");  
130 - for (var i in dateList) {  
131 - if (dateList[i] != "") {  
132 - VipLabel.push(dateList[i]);  
133 - }  
134 - }  
135 - th.setData({  
136 - check_label: VipLabel  
137 - })  
138 - } else {  
139 - getApp().my_warnning("系统繁忙,请稍后再试", 0, th);  
140 - }  
141 - })  
142 - },  
143 - //是否启动密码消费  
144 - isstcsp: function() {  
145 - var th = this;  
146 - var isstcsp = th.data.isstcsp;  
147 - if (isstcsp == 0) {  
148 - th.setData({  
149 - isstcsp: 1  
150 - })  
151 - } else {  
152 -  
153 - if(this.data.user.isVerification) {  
154 - getApp().my_warnning("已设置消费需启用密码,无法取消", 0, th);  
155 - return false;  
156 - }  
157 -  
158 - th.setData({  
159 - isstcsp: 0  
160 - })  
161 - }  
162 - },  
163 - //出生日期是否是农历  
164 - iscalendar: function() {  
165 -  
166 - if(this.data.user.birthday) return false;  
167 - var th = this;  
168 - var iscalendar = th.data.iscalendar;  
169 - if (iscalendar == 0) {  
170 - th.setData({  
171 - iscalendar: 1  
172 - })  
173 - } else {  
174 - th.setData({  
175 - iscalendar: 0  
176 - })  
177 - }  
178 - },  
179 - //性别  
180 - isGender: function(e) {  
181 - var th = this;  
182 - var sex = e.currentTarget.dataset.sex;  
183 - th.setData({  
184 - isGender: sex  
185 - })  
186 - },  
187 - //密码是否隐藏显示  
188 - ispwhid: function() {  
189 - var th = this;  
190 - var ispwhid = th.data.ispwhid;  
191 -  
192 - if (ispwhid == 0) {  
193 - th.setData({  
194 - ispwhid: 1  
195 - })  
196 - } else {  
197 - th.setData({  
198 - ispwhid: 0  
199 - })  
200 - }  
201 - },  
202 - checkDate: function() {  
203 - var th = this;  
204 - if (th.data.checkDate) {  
205 - th.setData({  
206 - checkDate: false  
207 - })  
208 - } else {  
209 - th.setData({  
210 - checkDate: true  
211 - })  
212 - }  
213 - },  
214 - bindChange: function(e) {  
215 - this.setData({  
216 - datet: e.detail.value,  
217 - });  
218 - },  
219 - //---点击二级之后的选择---  
220 - choose_for_store: function(e) {  
221 - var index_c = e.currentTarget.dataset.ind;  
222 -  
223 - this.setData({  
224 - sec_pick_index: index_c,  
225 - fir_pick_index: index_c  
226 - })  
227 - },  
228 - //确定def_pick为选择的门店  
229 - sure_pick: function(e) {  
230 - var th = this;  
231 - var item = null;  
232 - var openindstore = th.data.open_ind_store;  
233 - if (th.data.choice_sort_store == 0) {  
234 - var index = th.data.fir_pick_index;  
235 - if (th.data.is_show_sto_cat == 1) {  
236 - item = th.data.def_pickpu_list[index];  
237 - } else {  
238 - item = th.data.only_pk?th.data.only_pk[index]:null; //当没有门店分类的时候  
239 - }  
240 -  
241 - } else {  
242 - var index = th.data.sec_pick_index;  
243 - item = th.data.sec_sto.s_arr[index];  
244 - }  
245 - if(!item) return false;  
246 - th.setData({  
247 - def_pick_store: item,  
248 - stoname: item.pickup_name,  
249 - sto_sele_name: item.pickup_name,  
250 - sto_sele_id: item.pickup_id,  
251 - sto_sele_distr: item.distr_type,  
252 - store: 0,  
253 - choice_sort_store: 0,  
254 - fir_pick_index: 0  
255 - });  
256 -  
257 - if (openindstore == 1) {  
258 - th.setData({  
259 - openSpecModal: !0,  
260 - openSpecModal_ind: openindstore,  
261 - });  
262 - } else if (openindstore == 2) {  
263 - th.setData({  
264 - openSpecModal: !0,  
265 - openSpecModal_ind: openindstore,  
266 - openSpecModal_pt: 1  
267 - });  
268 - }  
269 - },  
270 - choose_for_store_fir: function(e) {  
271 - var index_c = e.currentTarget.dataset.ind;  
272 - this.setData({  
273 - fir_pick_index: index_c  
274 - })  
275 - },  
276 - wait_for_store_config: function() {  
277 - var th = this;  
278 - wx.getLocation({  
279 - type: 'gcj02',  
280 - success: function(res) {  
281 - th.data.lat = res.latitude;  
282 - th.data.lon = res.longitude;  
283 - th.data.is_get_local_ok = 1;  
284 - },  
285 - fail: function(res) {  
286 - if (res.errCode == 2) {  
287 - th.setData({  
288 - is_gps: 0  
289 - });  
290 - if (th.data.is_gps == 0) {  
291 - getApp().confirmBox("请开启GPS定位", null, 10000, !1);  
292 - }  
293 - } else {  
294 - th.setData({  
295 - is_gps: "3"  
296 - });  
297 - }  
298 - th.data.is_get_local_ok = 1;  
299 - }  
300 - })  
301 - },  
302 - onclickstore: function() {  
303 - var th = this;  
304 - //检验门店的点击,看下次数是不是到了  
305 - this.check_click_ok(function(){  
306 - if (th.data.store == 0) {  
307 - th.setData({  
308 - store: 1  
309 - })  
310 - } else {  
311 - th.setData({  
312 - store: 0  
313 - })  
314 - }  
315 - var dd = {  
316 - store_id: r.stoid,  
317 - isstop: 0,  
318 - pageSize: 2000  
319 - }  
320 - th.setData({  
321 - sort_store: 0  
322 - });  
323 - var i = getApp().request;  
324 - //如果有距离的话  
325 - if (th.data.lat != null) {  
326 - dd.lat = th.data.lat;  
327 - dd.lon = th.data.lon;  
328 - }  
329 - //----------获取门店----------------  
330 - getApp().request.get("/api/weshop/pickup/list", {  
331 - data: dd,  
332 - success:function(res){  
333 - var e = res;  
334 - if (e.data.code == 0) {  
335 - //-- 如果有默认选择门店的时候,要把默认门店放在第一位 --  
336 - if (th.data.def_pick_store) {  
337 - for (var k = 0; k < e.data.data.pageData.length; k++) {  
338 - if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {  
339 - e.data.data.pageData.splice(k, 1); //删除  
340 - break;  
341 - }  
342 - }  
343 - e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加  
344 - }  
345 -  
346 - //单总量超出5个的时候  
347 - if (e.data.data.total > 10) {  
348 - i.get("/api/weshop/storagecategory/page", {  
349 - data: {  
350 - store_id: r.stoid,  
351 - pageSize: 1000,  
352 - orderField:"sort",  
353 - orderType:'asc',  
354 - },  
355 - success: function(ee) {  
356 - if (ee.data.code == 0) {  
357 -  
358 - var check_all_cate=0;  
359 - if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){  
360 - for(let i in ee.data.data.pageData){  
361 - let item=ee.data.data.pageData[i];  
362 - if(item.is_show==1){  
363 - check_all_cate=1;break  
364 - }  
365 - }  
366 - }  
367 -  
368 -  
369 - if (check_all_cate) {  
370 -  
371 - var sto_cate = ee.data.data.pageData;  
372 - var sto_arr = e.data.data.pageData;  
373 - var newarr = new Array();  
374 - var qita = new Array();  
375 -  
376 - var is_del_pk=0;  
377 - //----要进行门店分组--------  
378 - for (var i = 0; i < sto_arr.length; i++) {  
379 - //找一下这个门店有没有在分类数组内  
380 - var find2 = 0, find2name = "",sort=0;  
381 - is_del_pk=0;  
382 - for (var m = 0; m < sto_cate.length; m++) {  
383 - if (sto_arr[i].category_id == sto_cate[m].cat_id) {  
384 - if(sto_cate[m].is_show!=1){  
385 - is_del_pk=1; sto_arr.splice(i,1);  
386 - i--;  
387 - }else {  
388 - find2 = sto_cate[m].cat_id;  
389 - find2name = sto_cate[m].cat_name;  
390 - sort = sto_cate[m].sort;  
391 - is_del_pk=0;  
392 - }  
393 - break;  
394 - }  
395 - }  
396 -  
397 - if(is_del_pk) continue;  
398 - if (newarr.length > 0) {  
399 - var find = 0;  
400 - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他  
401 - if (find2 != 0) {  
402 - for (var ii = 0; ii < newarr.length; ii++) {  
403 - if (sto_arr[i].category_id == newarr[ii].cat_id) {  
404 - newarr[ii].s_arr.push(sto_arr[i]);  
405 - find = 1;  
406 - break;  
407 - }  
408 - }  
409 - if (find == 0) {  
410 - var arr0 = new Array();  
411 - arr0.push(sto_arr[i]);  
412 - var item = {  
413 - cat_id: find2,  
414 - name: find2name,  
415 - sort:sort,  
416 - s_arr: arr0  
417 - };  
418 - newarr.push(item);  
419 - }  
420 - } else {  
421 - qita.push(sto_arr[i]);  
422 - }  
423 - } else {  
424 - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他  
425 - if (find2 != 0) {  
426 - var arr0 = new Array();  
427 - arr0.push(sto_arr[i]);  
428 - var item = {  
429 - cat_id: find2,  
430 - name: find2name,  
431 - sort:sort,  
432 - s_arr: arr0  
433 - };  
434 - newarr.push(item);  
435 - } else {  
436 - qita.push(sto_arr[i]);  
437 - }  
438 - }  
439 - }  
440 -  
441 - var def_arr = new Array();  
442 - //-- 开始就看10个门店 --  
443 - for (var k = 0; k < 10; k++) {  
444 - if (k == e.data.data.pageData.length) break;  
445 - def_arr.push(e.data.data.pageData[k]);  
446 - }  
447 -  
448 - th.setData({  
449 - def_pickpu_list: def_arr,  
450 - pickpu_list: ee.data.data.pageData  
451 - });  
452 -  
453 - //门店分类要排序下  
454 - function compare(property){  
455 - return function(a,b){  
456 - var value1 = a[property];  
457 - var value2 = b[property];  
458 - return value1 - value2;  
459 - }  
460 - }  
461 - if(newarr.length>0)  
462 - newarr.sort(compare("sort"));  
463 -  
464 - //----安排其他的分类-----  
465 - if (qita.length > 0) {  
466 - var item = {  
467 - cat_id: -1,  
468 - name: "其他",  
469 - s_arr: qita  
470 - };  
471 - newarr.push(item);  
472 - }  
473 - th.setData({  
474 - is_show_sto_cat: 1,  
475 - all_sto: newarr  
476 - });  
477 -  
478 - } else {  
479 - th.setData({  
480 - is_show_sto_cat: -1,  
481 - only_pk: e.data.data.pageData  
482 - });  
483 - }  
484 - } else {  
485 - th.setData({  
486 - is_show_sto_cat: -1,  
487 - only_pk: e.data.data.pageData  
488 - });  
489 - }  
490 - }  
491 - });  
492 - } else {  
493 - th.setData({  
494 - is_show_sto_cat: 0,  
495 - only_pk: e.data.data.pageData  
496 - });  
497 - }  
498 - }  
499 - }  
500 - })  
501 -  
502 - },2)  
503 -  
504 - },  
505 -  
506 - //选择更多门店  
507 - more_store: function() {  
508 - this.setData({  
509 - sort_store: 1  
510 - });  
511 - },  
512 - //---选择分类门店---  
513 - choice_sort_store: function(e) {  
514 - var index = e.currentTarget.dataset.index;  
515 - var region_name = e.currentTarget.dataset.region;  
516 - var item = this.data.all_sto[index];  
517 - this.setData({  
518 - region_name: region_name,  
519 - sort_store: 0,  
520 - choice_sort_store: 1,  
521 - sec_sto: item,  
522 - sec_pick_index: 0  
523 - });  
524 - },  
525 - // 返回按钮  
526 - returns: function() {  
527 - this.setData({  
528 - sort_store: 0,  
529 - choice_sort_store: 0  
530 - });  
531 - },  
532 - //身份证号严格校验  
533 - IdentityIDCard: function(e) {  
534 - var code = e.detail.value;  
535 - //身份证号前两位代表区域  
536 - var city = {  
537 - 11: "北京",  
538 - 12: "天津",  
539 - 13: "河北",  
540 - 14: "山西",  
541 - 15: "内蒙古",  
542 - 21: "辽宁",  
543 - 22: "吉林",  
544 - 23: "黑龙江 ",  
545 - 31: "上海",  
546 - 32: "江苏",  
547 - 33: "浙江",  
548 - 34: "安徽",  
549 - 35: "福建",  
550 - 36: "江西",  
551 - 37: "山东",  
552 - 41: "河南",  
553 - 42: "湖北 ",  
554 - 43: "湖南",  
555 - 44: "广东",  
556 - 45: "广西",  
557 - 46: "海南",  
558 - 50: "重庆",  
559 - 51: "四川",  
560 - 52: "贵州",  
561 - 53: "云南",  
562 - 54: "西藏 ",  
563 - 61: "陕西",  
564 - 62: "甘肃",  
565 - 63: "青海",  
566 - 64: "宁夏",  
567 - 65: "新疆",  
568 - 71: "台湾",  
569 - 81: "香港",  
570 - 82: "澳门",  
571 - 91: "国外 "  
572 - };  
573 - //身份证格式正则表达式  
574 - var idCardReg = /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i;  
575 - var errorMess = ""; //错误提示信息  
576 - var isPass = true; //身份证验证是否通过(true通过、false未通过)  
577 -  
578 - //如果身份证不满足格式正则表达式  
579 - if (!code || !idCardReg.test(code)) {  
580 - errorMess = "您输入的身份证号格式有误!";  
581 - isPass = false;  
582 - }  
583 -  
584 - //区域数组中不包含需验证的身份证前两位  
585 - else if (!city[code.substr(0, 2)]) {  
586 - errorMess = "您输入的身份证地址编码有误!";  
587 - isPass = false;  
588 - } else {  
589 - //18位身份证需要验证最后一位校验位  
590 - if (code.length == 18) {  
591 - code = code.split('');  
592 - //∑(ai×Wi)(mod 11)  
593 - //加权因子  
594 - var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];  
595 - //校验位  
596 - var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];  
597 - var sum = 0;  
598 - var ai = 0;  
599 - var wi = 0;  
600 - for (var i = 0; i < 17; i++) {  
601 - ai = code[i];  
602 - wi = factor[i];  
603 - sum += ai * wi;  
604 - }  
605 - var last = parity[sum % 11];  
606 - if (parity[sum % 11] != code[17]) {  
607 - errorMess = "您输入的身份证号不存在!";  
608 - isPass = false;  
609 - }  
610 - }  
611 - }  
612 - var returnParam = {  
613 - 'errorMess': errorMess,  
614 - 'isPass': isPass  
615 - }  
616 - if (errorMess != "") {  
617 - wx.showModal({  
618 - title: errorMess,  
619 - content: '',  
620 - showCancel: false,  
621 - confirmText: '确定',  
622 - confirmColor: '',  
623 - success: function(res) {},  
624 - fail: function(res) {},  
625 - complete: function(res) {},  
626 - })  
627 - }  
628 - return returnParam;  
629 - },  
630 - //------初始化加载----------  
631 - onLoad: function(t) {  
632 - let th= this;  
633 - var user = getApp().globalData.userInfo;  
634 - if (user.card_field != '' && user.card_field != null && user.card_field != undefined && user.card_expiredate) {  
635 - var now = ut.gettimestamp();  
636 - var str = user.card_expiredate.replace(/-/g, '/');;  
637 - var end = new Date(str);  
638 - end = Date.parse(end) / 1000;  
639 - if (now < end) {  
640 - this.puls_user();  
641 - }  
642 - }  
643 - //调用接口判断商家plus有没有过期  
644 - getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + r.stoid + "&type=3", {}).then(res => {  
645 - if (res.data.code == 0) {  
646 - var arr = res.data.data.pageData;  
647 - if (arr.length > 0) {  
648 - var item = arr[0];  
649 - if (item.is_sy == 0) {  
650 - var now = Date.parse(new Date()); now = now / 1000;  
651 - if (item.end_time < now) {  
652 - th.setData({ is_no_plus: 0 })  
653 - }  
654 - }  
655 - }  
656 - }  
657 - })  
658 - this.initial_user();  
659 - // 获取用户昵称  
660 - if (wx.getUserProfile) {  
661 - this.setData({  
662 - canIUseGetUserProfile: true  
663 - })  
664 - }  
665 - //如果有指定要启用密码的时候  
666 - if(t.isstcsp){  
667 - this.setData({set_isstcsp:1,ispwhid:0});  
668 - }  
669 -  
670 - },  
671 -  
672 - // 获取用户头像昵称  
673 - getUserProfile(e) {  
674 - var th = this;  
675 -  
676 - var ob={  
677 - nickname:this.data.user.nickname,  
678 - head_pic:this.data.user.head_pic,  
679 - }  
680 - getApp().globalData.up_nick_avatar=ob;  
681 - getApp().goto('/packageE/pages/user/nick_avatar/nick_avatar');  
682 -  
683 -  
684 - // new Promise((resolve, reject) => {  
685 - // wx.getUserProfile({  
686 - // desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写  
687 - // success: (res) => {  
688 - // th.data.user.nickname = res.userInfo.nickName;  
689 - // th.data.user.head_pic = res.userInfo.avatarUrl;  
690 - // this.setData({  
691 - // userInfo: res.userInfo,  
692 - // hasUserInfo: true,  
693 - // user: th.data.user,  
694 - // });  
695 - // resolve(res.userInfo);  
696 - // },  
697 - //  
698 - // });  
699 - // }).then((userInfo) => {  
700 - // getApp().request.put("/api/weshop/users/update", {  
701 - // data: {  
702 - // storeId: r.stoid,  
703 - // user_id: getApp().globalData.user_id,  
704 - // nickname: userInfo.nickName,  
705 - // head_pic: userInfo.avatarUrl  
706 - //  
707 - // },  
708 - // success: function(su) {  
709 - // if (su.data.code == 0) {  
710 - // console.log("update user info OK");  
711 - // }  
712 - // }  
713 - // });  
714 - // });  
715 -  
716 -  
717 - },  
718 -  
719 -  
720 - //-----------会员是否初始化---------------------  
721 - initial_user: function() {  
722 -  
723 - var th = this;  
724 - getApp().request.get("/api/weshop/users/grade/vip/init/get", {  
725 - data: {  
726 - storeId: r.stoid,  
727 - },  
728 - success: function(su) {  
729 - var isBool = su.data.data.isBool;  
730 - th.setData({  
731 - isBool: isBool  
732 - });  
733 -  
734 - if (!isBool) return false;  
735 - //-----会员权益获取--------------  
736 - getApp().request.get("/api/weshop/users/grade/aftervipinfo/get", {  
737 - data: {  
738 - storeId: r.stoid,  
739 - userId: getApp().globalData.user_id,  
740 - },  
741 - success: function(su) {  
742 - var gradename = su.data.data.GradeName;  
743 - th.setData({  
744 - gradename: gradename  
745 - });  
746 - }  
747 - });  
748 -  
749 - }  
750 - });  
751 - this.get_config();  
752 - },  
753 -  
754 -  
755 - //-----Plus会员获取-----------  
756 - puls_user: function() {  
757 - var th = this;  
758 - getApp().request.get("/api/weshop/plus/vip/mem/list", {  
759 - data: {  
760 - storeId: r.stoid,  
761 - userId: getApp().globalData.user_id,  
762 - },  
763 - success: function(su) {  
764 -  
765 - if (su.data.code == 0) {  
766 - var cardname = su.data.data[0].MemCardName;  
767 - th.setData({  
768 - pulscardname: cardname  
769 - });  
770 - }  
771 - }  
772 - });  
773 - },  
774 -  
775 - onShow: function() {  
776 - getApp().check_can_share();  
777 - var e = this;  
778 -  
779 - //如果有传值进行跳转的话,  
780 - var choice_guide=null;  
781 - if(getApp().globalData.choice_guide){  
782 - choice_guide=JSON.parse(JSON.stringify(getApp().globalData.choice_guide));  
783 - getApp().globalData.choice_guide=null;  
784 - let user=this.data.user;  
785 - this.setData({  
786 - 'user.staffName':choice_guide.StaffName,  
787 - 'user.staffId':choice_guide.Id,  
788 - 'user.staffTel':choice_guide.Tel  
789 - })  
790 - return false;  
791 - }  
792 -  
793 - if (this.data.is_zy){  
794 - this.data.is_zy=0;  
795 - return false;  
796 - }  
797 - this.wait_for_store_config();  
798 -  
799 -  
800 -  
801 - var req = t;  
802 - req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, {  
803 - success: function(src) {  
804 - var a = src.data.data;  
805 -  
806 - if(!a) a={};  
807 - var time ="",birthday ="";  
808 - if(a && a.reg_time) time=util.formatTime(a.reg_time, "'Y/M/D");  
809 - if(a && a.birthday) birthday=util.formatTime(a.birthday, "'Y/M/D");  
810 -  
811 - a.reg_time = time;  
812 - a.birthday = birthday  
813 -  
814 - if(a.address=='null' || !a.address){  
815 - a.address="";  
816 - }  
817 -  
818 - e.data.fir_guide_id=a.staffId;  
819 - if(choice_guide){  
820 - a.staffName=choice_guide.StaffName;  
821 - a.staffId=choice_guide.Id;  
822 - a.staffTel=choice_guide.Tel;  
823 - }  
824 -  
825 - if(e.data.set_isstcsp){  
826 - a.vipnopwd=1;  
827 - }  
828 -  
829 - e.setData({  
830 - phone: a.mobile,  
831 - user: a,  
832 - openid: a.openid,  
833 - sto_sele_id: a.pickup_id,  
834 - consumption: a.paypwd,  
835 - identity_card: a.idcard,  
836 - address: a.address,  
837 - isGender: a.sex,  
838 - isstcsp: a.vipnopwd,  
839 - iscalendar:a.islunar  
840 - });  
841 -  
842 - }  
843 - })  
844 -  
845 -  
846 - a.getUserInfo(function(a) {  
847 - var txt = util.formatTime(a.birthday, 'yyyy-M-d'),  
848 - arr = txt.split(' ');  
849 - a.birthday = arr[0];  
850 - var txt2 = util.formatTime(a.reg_time, 'yyyy-M-d'),  
851 - arr2 = txt.split(' ');  
852 - a.reg_time = arr2[0];  
853 - if (a.pickup_id != null) {  
854 - req.get("/api/weshop/pickup/get/" + r.stoid + "/" + a.pickup_id, {  
855 - success: function(da) {  
856 - if(da.data.data){  
857 - //设置门店  
858 - e.setData({  
859 - stoname: da.data.data.pickup_name  
860 - });  
861 - }  
862 -  
863 - }  
864 - })  
865 - }  
866 -  
867 - }, !0);  
868 - },  
869 -  
870 - onHide:function (){  
871 - this.data.sele_ing=0;  
872 - },  
873 -  
874 - editUserInfo: function(e) {  
875 - var r = e.currentTarget.dataset.type;  
876 - if (("password" == r || "paypwd" == r) && !this.data.user.mobile) return a.showWarning("请先绑定手机号码");  
877 - r && this.data.user && wx.navigateTo({  
878 - url: "/pages/user/userinfo_edit/userinfo_edit?type=" + r  
879 - });  
880 - },  
881 -  
882 - /*--------------------修改头像---------------------*/  
883 - changeAvatar: function() {  
884 - return false;  
885 - var r = this;  
886 - getApp().globalData.no_clear=1;  
887 - wx.chooseImage({  
888 - count: 1,  
889 - sizeType: ["compressed", "original"],  
890 - sourceType: ["camera", "album"],  
891 - success: function(u) {  
892 - t.uploadFile(r.data.url + "/api/user/upload_headpic", {  
893 - filePath: u.tempFilePaths[0],  
894 - name: "head_pic",  
895 - success: function(t) {  
896 - var u = s.getFullUrl(t.data.result);  
897 - r.setData(e({}, "user.head_pic", u)), a.globalData.userInfo.head_pic = u, a.showSuccess("设置头像成功");  
898 - }  
899 - });  
900 - }  
901 - });  
902 - },  
903 -  
904 -  
905 - //------卡片的显示和关闭--------  
906 - show_tc: function() {  
907 - var that=this;  
908 - var req = t;  
909 - if (!getApp().globalData.userInfo) return false;  
910 - //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s')  
911 - var getnowtime;  
912 - req.get("/api/weshop/users/getServerTime", {  
913 - success: function (res) {  
914 - if (res.data.code == 0)  
915 - {  
916 - getnowtime=res.data.data;  
917 - if (!getnowtime)  
918 - {  
919 - getApp().showWarning("获取服务时间失败");  
920 - return;  
921 - }  
922 - //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s')  
923 - var val = that.data.userInfo.mobile + "|" +getnowtime+"|"+that.data.getusercode_vailtime;  
924 - val = "^" + ut.base64_encode(val);  
925 -  
926 - qrcode('qrcode', val, 480, 480, that);  
927 - that.setData({  
928 - tc_hide: false,  
929 - });  
930 - }  
931 - }  
932 - })  
933 -  
934 -  
935 - },  
936 - hide_tc: function() {  
937 - this.setData({  
938 - tc_hide: true,  
939 - });  
940 - },  
941 - //消费密码输入框失去焦点事件  
942 - lose_focus: function(e) {  
943 - var th = this;  
944 - var val = e.detail.value;  
945 - this.setData({  
946 - consumption: val  
947 - })  
948 - },  
949 -  
950 - //地址  
951 - address: function(e) {  
952 - var val = e.detail;  
953 - this.setData({  
954 - address: val.value  
955 - });  
956 - },  
957 -  
958 - //身份证验证  
959 - identity_card: function(e) {  
960 - var val = e.detail;  
961 -  
962 - this.setData({  
963 - identity_card: val.value  
964 - });  
965 -  
966 - },  
967 - //用户名字  
968 - user_name: function(e) {  
969 - var th = this;  
970 - var name = e.detail.value;  
971 - var vipname = 'user.vipname';  
972 - if (name != "" || name != null) {  
973 - th.setData({  
974 - [vipname]: name  
975 - });  
976 - }  
977 -  
978 - },  
979 -  
980 - //点击确认修改信息  
981 - confirm_revision: function() {  
982 - var th = this;  
983 - var isstcsp = th.data.isstcsp; //是否启用消费密码  
984 - var phone = th.data.phone; //手机号码  
985 - if (phone == "" || phone == null) {  
986 - getApp().my_warnning("手机不能为空", 0, th);  
987 - return false;  
988 - }  
989 - var consumption = th.data.consumption; //消费密码  
990 - var isstcsp = th.data.isstcsp;  
991 - if (isstcsp == 1) {  
992 -  
993 - if (consumption == null || consumption == "" || consumption == undefined) {  
994 - getApp().my_warnning("消费密码不能为空", 0, th);  
995 - return false;  
996 - }  
997 - if (consumption.length < 6) {  
998 - getApp().my_warnning("消费密码不能小于6位", 0, th);  
999 - return false;  
1000 - }  
1001 - }  
1002 - var sex = th.data.isGender; //性别  
1003 -  
1004 - if (sex != "1" && sex != "2") {  
1005 - getApp().my_warnning("请选择性别", 0, th);  
1006 - return false;  
1007 - }  
1008 - var user_name = th.data.user.vipname; //用户姓名  
1009 - if (user_name == "" || user_name == null) {  
1010 - getApp().my_warnning("请输入名字", 0, th);  
1011 - return false;  
1012 - }  
1013 - var identity_card = th.data.identity_card; //身份证  
1014 -  
1015 - if (identity_card!=null && identity_card!=undefined && identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) {  
1016 - getApp().my_warnning("身份证号码错误", 0, th);  
1017 - return false;  
1018 - }  
1019 - var address = th.data.address; //地址  
1020 - var sto_sele_id = th.data.sto_sele_id;  
1021 - var datas = {  
1022 - mobile: phone, //手机号码  
1023 - store_id: r.stoid,  
1024 - user_id: getApp().globalData.user_id,  
1025 - vipnopwd: isstcsp,  
1026 - //vippass: consumption, //消费密码  
1027 - sex: sex, //性别  
1028 - vipname: user_name, //昵称  
1029 - idcard: identity_card, //身份证  
1030 - address: address, //地址  
1031 - pickup_id: sto_sele_id ,//自提门店 所属门店  
1032 - islunar:th.data.iscalendar,  
1033 - birthday:th.data.datet  
1034 - }  
1035 -  
1036 - if (isstcsp == 1) {  
1037 - datas.vippass=consumption;  
1038 - }  
1039 -  
1040 -  
1041 - //往上提交美导的ID  
1042 - if(th.data.fir_guide_id!=th.data.user.staffId){  
1043 - datas.staffId=th.data.user.staffId;  
1044 - datas.StaffName=th.data.user.staffName;  
1045 - }  
1046 -  
1047 - getApp().request.put("/api/weshop/users/updateUserInfo", {  
1048 - data: datas,  
1049 - success: function(res) {  
1050 - if (res.data.code == 0) {  
1051 - getApp().my_warnning("修改成功", 1, th);  
1052 - getApp().goto("/pages/user/index/index");  
1053 - } else {  
1054 - getApp().my_warnning("系统繁忙,请稍后再试", 0, th);  
1055 - }  
1056 - }  
1057 - })  
1058 - },  
1059 - //选择地址  
1060 - goto_address: function() {  
1061 - // this.setData({ is_zy: 1 });  
1062 - },  
1063 - //更换手机  
1064 - go_phone: function(e) {  
1065 - var url = e.currentTarget.dataset.url;  
1066 - this.setData({  
1067 - is_zy: 1  
1068 - });  
1069 - getApp().goto(url);  
1070 - },  
1071 -  
1072 - //--点击分享事件---  
1073 - onShareAppMessage: function(t) {  
1074 - getApp().globalData.no_clear=1;  
1075 - return o.share;  
1076 - },  
1077 -  
1078 - //-- 跳转到获取导购的列表 --  
1079 - go_get_guide:function () {  
1080 - let th=this;  
1081 -  
1082 - if(this.data.sele_ing) return false;  
1083 - this.data.sele_ing=1;  
1084 - this.check_click_ok(function(){  
1085 - th.data.is_zy=1;  
1086 - getApp().goto("/packageB/pages/user/choice_guide/choice_guide?is_back=1");  
1087 -  
1088 - },1)  
1089 - },  
1090 -  
1091 - //点击门店,导购的次数判断, type 1=导购 2=门店  
1092 - check_click_ok:function(func,idx){  
1093 - var th=this;  
1094 - var userId=getApp().globalData.user_id;  
1095 - getApp().request.get("/api/weshop/users/getGuideNum/"+r.stoid+"/"+userId+"/"+idx, {  
1096 - success: function(res) {  
1097 - if(res.data.code==0){  
1098 - func();  
1099 - }else{  
1100 - getApp().my_warnning(res.data.msg, 0, th);  
1101 - }  
1102 - }  
1103 - });  
1104 - }  
1105 -  
1106 -  
1107 -});  
1108 \ No newline at end of file 0 \ No newline at end of file
pages/user/userinfo/userinfo.json deleted
1 -{  
2 - "navigationBarTitleText": "个人资料",  
3 - "enablePullDownRefresh": false,  
4 - "usingComponents": {  
5 - "warn": "/components/long_warn/long_warn"  
6 - }  
7 -}  
8 \ No newline at end of file 0 \ No newline at end of file
pages/user/userinfo/userinfo.wxml deleted
1 -<wxs module="filters" src="../../../utils/filter.wxs"></wxs>  
2 -<view class="container">  
3 -  
4 - <!-- 头像,昵称,多个卡 -->  
5 - <view class="head flex-space-between">  
6 - <view class="flex-center">  
7 -  
8 - <view class="flex-center">  
9 - <image class="Headportrait" src="{{user.head_pic}}"></image>  
10 - </view>  
11 -  
12 - <view class="flex-center vipmax">  
13 - <view>  
14 - <view>  
15 - <view class="ellipsis-2 Nickname" style="font-size: 31rpx">  
16 - <view style="float:left;">{{user.nickname}}</view>  
17 - <button bindtap="getUserProfile" style="margin-left:10rpx;float:left;width: 50rpx;height:50rpx;font-size:20rpx;background:rgba(217, 81, 99, 0.9);" class="flex-center fs30 confirmtext"><text class="iconfont icon-tongbu"></text></button>  
18 - </view>  
19 - </view>  
20 -  
21 - <view class="flex fs22 vip">  
22 - <block wx:if="{{isBool && gradename}}">  
23 - <navigator url="/pages/user/userqy/userqy">  
24 - <view class="flex-center AncrownMax">  
25 - <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image>  
26 - <view>{{gradename}}</view>  
27 - </view>  
28 - </navigator>  
29 - </block>  
30 - <block wx:if="{{pulscardname && rank_switch > 0 }}">  
31 - <navigator url="/pages/user/plus/plus">  
32 - <view class="flex-center plusMax">  
33 - <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>  
34 - <view>{{pulscardname}}</view>  
35 - </view>  
36 - </navigator>  
37 - </block>  
38 - </view>  
39 -  
40 -  
41 - </view>  
42 - </view>  
43 - </view>  
44 - <view class="flex ai_and">  
45 - <view class="flex-level ai_and" style="background-image:url({{iurl}}/miniapp/images/userinfo/userinfo/code.png);width:170rpx;height:140rpx;margin-top: 80rpx;background-size:100%;" bindtap="show_tc">  
46 - <view class="fs26 code" style="color:rgb(255,255,255);margin-left:9rpx;margin-top: 100rpx;">我的二维码</view>  
47 - </view>  
48 - </view>  
49 - </view>  
50 -  
51 - <view class="user-container">  
52 - <view class="Bbottom">  
53 - <view bindtap="changeAvatar" class="user-head flex-vertical-between">  
54 - <view class="user-txt">卡号</view>  
55 - <view class="user-txt-right">{{user.erpvipno}}  
56 - </view>  
57 - </view>  
58 - <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="nickname">  
59 - <view>是否启用消费密码</view>  
60 - <view class="flex-center" bindtap="isstcsp">  
61 - <view class="flex-center cmleft">  
62 - <block wx:if="{{isstcsp}}">  
63 - <icon size="20" type="success" color="rgb(212,2,31)"></icon>  
64 - </block>  
65 - <block wx:else>  
66 - <icon size="20" type="success" color="rgb(0, 0, 0, 0.4)"></icon>  
67 - </block>  
68 - <view class="Mleft">启用密码消费</view>  
69 - </view>  
70 - </view>  
71 -  
72 - </view>  
73 - <!-- 是否显示密码 -->  
74 - <view class="flex-vertical-between user-name" wx:if="{{isstcsp==1}}">  
75 - <view class="user-txt">消费密码</view>  
76 - <view class="flex">  
77 - <block wx:if="{{ispwhid}}">  
78 - <input bindblur="lose_focus" class="fs28 hion user-txt-right" value="{{consumption}}" password="true" type="number"/>  
79 - </block>  
80 - <block wx:else>  
81 - <input bindblur="lose_focus" focus="{{set_isstcsp?true:false}}" class="fs28 hion user-txt-right" value="{{consumption}}" type="number"/>  
82 - </block>  
83 -  
84 - <block wx:if="{{ispwhid}}">  
85 - <image class="eye" src="{{iurl}}/miniapp/images/userinfo/userinfo/Eye.png" bindtap="ispwhid"></image>  
86 - </block>  
87 - <block wx:else>  
88 - <image class="eye" src="{{iurl}}/miniapp/images/userinfo/open_eye.png" bindtap="ispwhid"></image>  
89 - </block>  
90 -  
91 - </view>  
92 - </view>  
93 -  
94 -  
95 - <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="sex">  
96 - <view>性别</view>  
97 - <view class="flex">  
98 - <view class="flex-center {{isGender==1?'Gendercheck':'Gender'}}" data-sex="1" bindtap="isGender">  
99 - <block wx:if="{{isGender==1}}">  
100 - <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/malealready.png"></image>  
101 - </block>  
102 - <block wx:else>  
103 - <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/malenot.png"></image>  
104 - </block>  
105 - <view class="fs24">男</view>  
106 - </view>  
107 - <view class="flex-center {{isGender==2?'Gendercheck':'Gender'}}" data-sex="2" bindtap="isGender">  
108 - <block wx:if="{{isGender==2}}">  
109 - <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/femalealready.png"></image>  
110 - </block>  
111 - <block wx:else>  
112 - <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/femalenot.png"></image>  
113 - </block>  
114 - <view class="fs26">女</view>  
115 - </view>  
116 -  
117 - <block wx:if="{{!user.sex}}">  
118 - <text class="lb_txt" wx:if="{{reg_info.sex && reg_info.sex_state && (reg_info.sex_state_type == 0)}}">+{{reg_info.sex}}积分</text>  
119 - <text class="lb_txt" wx:if="{{reg_info.sex && reg_info.sex_state && (reg_info.sex_state_type == 1)}}">+{{reg_info.sex}}成长值</text>  
120 - </block>  
121 -  
122 - </view>  
123 -  
124 - </view>  
125 -  
126 - <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="sex">  
127 - <view>出生日期</view>  
128 - <view class="flex flex-vertical-between fs28 Birth">  
129 - <view class="flex" bindtap="iscalendar">  
130 -  
131 - <!-- <block wx:if="user.birthday==null&&user.birthday==''"> -->  
132 -  
133 - <block wx:if="{{iscalendar}}">  
134 - <view class="flex-center">  
135 - <icon size="20" type="success" color="rgb(212,2,31)"></icon>  
136 - </view>  
137 - </block>  
138 - <block wx:else>  
139 - <icon size="20" type="success" color="rgb(0, 0, 0, 0.4)"></icon>  
140 - </block>  
141 -  
142 - <!-- </block> -->  
143 -  
144 -  
145 - <view class="flex-center">  
146 - <view class="Mleft">农历</view>  
147 - </view>  
148 - </view>  
149 - <view class="user-txt-right flex ai_c">  
150 - <!-- 填充数据的时候要判断是否已经有出生日期,有值的话就不可修改 -->  
151 - <block wx:if="{{user.birthday==''||user.birthday==null}}">  
152 - <picker bindchange='bindChange' value="{{datet}}" mode="date" start="{{year-70}}-1-1" end="{{year}}-12-31">  
153 - {{datet?datet:"请选择时间"}}  
154 - </picker>  
155 - </block>  
156 - <block wx:else>  
157 - <view>{{datet==""? user.birthday==""?"":filters.replace_time2(user.birthday):datet}}</view>  
158 - </block>  
159 -  
160 - <block wx:if="{{!user.birthday}}">  
161 - <text class="lb_txt" wx:if="{{reg_info.birthday && reg_info.birthday_state && (reg_info.birthday_type == 0)}}">+{{reg_info.birthday}}积分</text>  
162 - <text class="lb_txt" wx:if="{{reg_info.birthday && reg_info.birthday_state && (reg_info.birthday_type == 1)}}">+{{reg_info.birthday}}成长值</text>  
163 - </block>  
164 -  
165 - </view>  
166 - </view>  
167 - </view>  
168 - </view>  
169 - <view class="Bbottom">  
170 - <view bindtap="editUserInfo1" class="user-name mt flex-vertical-between" data-type="nickname">  
171 - <view class="user-name-txt">姓名</view>  
172 - <view class="flex ai_c">  
173 - <input maxlength="10" bindblur="user_name" class="user-txt-right t-r" placeholder="*姓名" value='{{user.vipname}}' />  
174 - <block wx:if="{{!user.vipname}}">  
175 - <text class="lb_txt" wx:if="{{reg_info.name && reg_info.name_state && (reg_info.name_val_type == 0)}}">+{{reg_info.name}}积分</text>  
176 - <text class="lb_txt" wx:if="{{reg_info.name && reg_info.name_state && (reg_info.name_val_type == 1)}}">+{{reg_info.name}}成长值</text>  
177 - </block>  
178 - </view>  
179 - </view>  
180 -  
181 - <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="nickname">  
182 - <view class="user-name-txt">身份证</view>  
183 - <view class="flex ai_c">  
184 - <input bindblur="identity_card" class="user-txt-right t-r" value="{{user.idcard}}" placeholder="*身份证" />  
185 - <block wx:if="{{!user.idcard}}">  
186 - <text class="lb_txt" wx:if="{{reg_info.idcard && reg_info.idcard_state && (reg_info.idcard_type == 0)}}">+{{reg_info.idcard}}积分</text>  
187 - <text class="lb_txt" wx:if="{{reg_info.idcard && reg_info.idcard_state && (reg_info.idcard_type == 1)}}">+{{reg_info.idcard}}成长值</text>  
188 - </block>  
189 - </view>  
190 -  
191 - </view>  
192 - <view data-url="/packageB/pages/user/Change_phone/Change_phone" bindtap="go_phone" class="user-name flex-vertical-between" data-type="mobile">  
193 - <view class="user-name-txt">更换手机</view>  
194 - <view class="flex-center user-txt-right">  
195 - <view class="flex">{{phone}}</view>  
196 - <view class="angle">∟</view>  
197 - </view>  
198 - </view>  
199 -  
200 - <view class="user-name flex-vertical-between" data-type="mobile">  
201 - <view class="user-name-txt">地址</view>  
202 - <!-- <block wx:if="{{user.address.length>0}}">  
203 - <view>{{user.address}}</view>  
204 - </block>  
205 - <block wx:else> -->  
206 - <view class="flex ai_c">  
207 - <input bindblur="address" maxlength="30" value="{{user.address}}" class="user-txt-right" placeholder="*地址" style="text-align:right" />  
208 - <block wx:if="{{!user.address}}">  
209 - <text class="lb_txt" wx:if="{{reg_info.address && reg_info.address_state && (reg_info.address_type == 0)}}">+{{reg_info.address}}积分</text>  
210 - <text class="lb_txt" wx:if="{{reg_info.address && reg_info.address_state && (reg_info.address_type == 1)}}">+{{reg_info.address}}成长值</text>  
211 - </block>  
212 - </view>  
213 -  
214 - </view>  
215 -  
216 - <!-- 选择门店 -->  
217 - <view bindtap="onclickstore" class="user-name flex-vertical-between" data-type="email">  
218 - <view class="user-name-txt">所属门店</view>  
219 - <view class="flex-center user-txt-right">  
220 - <view class="one-line">{{stoname}}</view>  
221 - <view class="flex ai_c">  
222 - <view class="angle">∟</view>  
223 - <block wx:if="{{!user.pickup_id}}">  
224 - <text class="lb_txt" wx:if="{{reg_info.pick && reg_info.pick_state && (reg_info.pick_type == 0)}}">+{{reg_info.pick}}积分</text>  
225 - <text class="lb_txt" wx:if="{{reg_info.pick && reg_info.pick_state && (reg_info.pick_type == 1)}}">+{{reg_info.pick}}成长值</text>  
226 - </block>  
227 - </view>  
228 -  
229 - </view>  
230 - </view>  
231 -  
232 - <!-- 美容顾问 -->  
233 - <view bindtap="go_get_guide" class="user-name flex-vertical-between" data-type="email">  
234 - <view class="user-name-txt">{{guide_title}}</view>  
235 - <view class="flex-center user-txt-right">  
236 - <view class="one-line">{{user.staffName?user.staffName:"*选择顾问"}}</view>  
237 - <view class="angle">∟</view>  
238 - </view>  
239 - </view>  
240 -  
241 - <view wx:if="{{user.staffTel}}" class="user-name flex-vertical-between">  
242 - <view class="user-name-txt">{{guide_title}}电话</view>  
243 - <view class="flex-center user-txt-right">  
244 - <view class="one-line">{{user.staffTel}}</view>  
245 - </view>  
246 -  
247 - </view>  
248 -  
249 -  
250 -  
251 - </view>  
252 - <!-- 我的兴趣 -->  
253 - <view wx:if="{{ isBool==1 && is_lable_set==1}}" class="padding Bbottom">  
254 - <!-- 我的兴趣 -->  
255 - <view wx:if="{{is_lable_set!=null && is_lable_set==1}}" class="Bbottom">  
256 - <view class="interest fs28">  
257 - <view class="flex-vertical-between" bindtap="goto" data-url="/packageE/pages/user/labels/labels">  
258 - <view class="fs30">我的兴趣</view>  
259 - <view class="angle">∟</view>  
260 - </view>  
261 - <!-- 选中的标签 -->  
262 - <view class="lables">  
263 - <block wx:if="{{check_label.length>0}}">  
264 - <view class="lable" wx:for="{{check_label}}" wx:for-item="label">  
265 - <view class="ellipsis-1">{{label}}</view>  
266 - </view>  
267 - </block>  
268 - <!-- 添加标签按钮 -->  
269 - <view class="add_lable ib ellipsis-1" bindtap="goto" data-url="/packageE/pages/user/labels/labels">  
270 - <text class="plus">+</text>  
271 - <text>标签</text>  
272 - </view>  
273 - </view>  
274 - </view>  
275 - </view>  
276 - </view>  
277 -  
278 - <navigator bindtap="goto" class="user-name mt flex-vertical-between" data-url="/packageF/pages/user/address_list/address_list">  
279 - <view class="user-name-txt">收货地址</view>  
280 - <view class="flex-center user-txt-right">  
281 - <view class="angle">∟</view>  
282 - </view>  
283 - </navigator>  
284 -  
285 - <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="email">  
286 - <view class="user-name-txt">绑定时间</view>  
287 - <view class="user-txt-right one-line">{{user.reg_time?filters.replace_time2(user.reg_time):""}}</view>  
288 - </view>  
289 -  
290 -</view>  
291 -<!-- 确认修改按钮 -->  
292 -<view class="flex-center confirm">  
293 - <view class="flex-center fs30 confirmtext" bindtap="confirm_revision">  
294 - <view>确认修改</view>  
295 - </view>  
296 -</view>  
297 -  
298 -<!--弹出层内容,其中的“我知道”中绑定让弹出层消失的函数:bindtap="hide"-->  
299 -<view class="tc_view" hidden='{{tc_hide}}' bindtap='hide_tc'>  
300 - <view class="modal-box" hidden="{{flag}}" bindtap="hide"></view>  
301 - <view class="modal-body">  
302 - <view class="modal-content">  
303 - <view class="flex">  
304 - <image src="{{user.head_pic}}" class="hd_img"></image>  
305 - <view class="ctent_txt">  
306 - <view class='txt1'>{{user.nickname}}  
307 - <image wx:if="{{user.sex==2}}" class="arrow-right" src="{{iurl}}/miniapp/images/user/wum.png"></image>  
308 - <image wx:else class="arrow-right" src="{{iurl}}/miniapp/images/user/man.png"></image>  
309 - </view>  
310 - <view class='txt2' wx:if="{{user.address}}">{{user.address}}</view>  
311 - </view>  
312 - </view>  
313 - <view class="m_ta">  
314 - <canvas class="g_img" canvas-id="qrcode" />  
315 - </view>  
316 - <view class="s_sao">扫一扫上面的二维码图案,即可消费</view>  
317 - </view>  
318 - </view>  
319 -</view>  
320 -  
321 -<!-- 选择门店的弹框,1.1版最新的 -->  
322 -<block wx:if="{{store==1}}">  
323 - <view class="mongolia-layer" bindtap="onclickstore"></view>  
324 - <view class="popup-frame">  
325 - <block wx:if="{{sort_store==0}}">  
326 - <!-- 头部 标题 -->  
327 - <view class="popup-top flex-space-between">  
328 - <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text>  
329 - <view>  
330 - <view>  
331 - <icon bindtap="onclickstore" class="modal-closes" color="black" size="22" type="cancel"></icon>  
332 - </view>  
333 - <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}">  
334 - <text class="fs26 red-co">{{choice_sort_store==0?'更多门店':'返回'}}</text>  
335 - <view class="bg_rights"></view>  
336 - </view>  
337 - </view>  
338 - </view>  
339 - <!-- 门店列表,最外层的门店列表,一开始 -->  
340 - <view class="store-list">  
341 - <!--如果还没有点击更多门店的时候 -->  
342 - <block wx:if="{{choice_sort_store==0}}">  
343 - <!-- 需要for循环 -->  
344 - <block wx:if="{{is_show_sto_cat==1}}">  
345 - <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}">  
346 - <view class="store flex-vertical">  
347 - <!-- 需要点击事件 -->  
348 - <block wx:if="{{index==fir_pick_index}}">  
349 - <view class="circle white xc-hook fs20 red-b">Г</view>  
350 - </block>  
351 - <block wx:else>  
352 - <view class="circle xc-hooks"></view>  
353 - </block>  
354 - <view class="address-frame xc-ash">  
355 - <view class="flex-vertical-between butttem5">  
356 - <view class="flex xc-ash">  
357 - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>  
358 - </view>  
359 - <view>  
360 - <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">  
361 - 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view>  
362 - </view>  
363 - </view>  
364 - <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>  
365 - </view>  
366 - </view>  
367 - </view>  
368 - </block>  
369 - <block wx:else>  
370 - <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}">  
371 - <view class="store flex-vertical">  
372 - <!-- 需要点击事件 -->  
373 - <block wx:if="{{index==fir_pick_index}}">  
374 - <view class="circle white xc-hook fs20 red-b">Г</view>  
375 - </block>  
376 - <block wx:else>  
377 - <view class="circle xc-hooks"></view>  
378 - </block>  
379 -  
380 - <view class="address-frame xc-ash">  
381 - <view class="flex-vertical-between ">  
382 - <view class="flex xc-ash">  
383 - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>  
384 - </view>  
385 - <view>  
386 - <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}  
387 - </view>  
388 - </view>  
389 - </view>  
390 - <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>  
391 - </view>  
392 - </view>  
393 - </view>  
394 - </block>  
395 - </block>  
396 - <block wx:else>  
397 - <!-- 如果是点击选择门店分类后显示分类下的门店 -->  
398 - <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store">  
399 - <view class="store flex-vertical">  
400 - <!-- 需要点击事件 -->  
401 - <block wx:if="{{index==sec_pick_index}}">  
402 - <view class="circle white xc-hook fs20 red-b">Г</view>  
403 - </block>  
404 - <block wx:else>  
405 - <view class="circle xc-hooks"></view>  
406 - </block>  
407 -  
408 - <view class="address-frame xc-ash">  
409 - <view class="flex-vertical-between ">  
410 - <view class="flex xc-ash">  
411 - <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view>  
412 - </view>  
413 - <view>  
414 - <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view>  
415 - </view>  
416 - </view>  
417 - <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>  
418 - </view>  
419 - </view>  
420 - </view>  
421 - </block>  
422 -  
423 - </view>  
424 -  
425 - <!-- 门店列表底部 -->  
426 - <view class="store-bottom-frame">  
427 - <view class="store-bottom flex-center">  
428 - <view class="determine red-b fs30 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}">确定</view>  
429 - <!-- <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}">设为默认</view> -->  
430 - </view>  
431 - </view>  
432 -  
433 - </block>  
434 -  
435 -  
436 - <block wx:else>  
437 - <view class="popup-top flex-space-between">  
438 - <text class="fs32 nearby_store">门店分类选择</text>  
439 - <view>  
440 - <view>  
441 - <icon bindtap="onclickstore" class="modal-closes" color="black" size="22" type="cancel"></icon>  
442 - </view>  
443 - </view>  
444 - </view>  
445 - <view class="sort_store_list">  
446 -  
447 - <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}">  
448 - <view class="sort-store flex-vertical-between">  
449 - <view class="fs30" di>{{item.name}}</view>  
450 - <view class="black_rights-frame">  
451 - <view class="black_rights"></view>  
452 - </view>  
453 - </view>  
454 - </view>  
455 -  
456 - </view>  
457 - </block>  
458 - </view>  
459 -</block>  
460 -</view>  
461 -<warn id="warn"></warn>  
462 \ No newline at end of file 0 \ No newline at end of file
pages/user/userinfo/userinfo.wxss deleted
1 -.container {  
2 - padding-bottom: 165rpx;  
3 - transform: translate();  
4 -}  
5 -  
6 -.user-container {  
7 - font-size: 30rpx;  
8 -}  
9 -  
10 -input {  
11 - width: 450rpx;  
12 -}  
13 -  
14 -.head {  
15 - height: 220rpx;  
16 - border-bottom: 6rpx solid rgb(245, 245, 245);  
17 - border-top: 2rpx solid rgb(245, 245, 245);  
18 - background-size: 100%;  
19 -}  
20 -  
21 -.angle {  
22 - transform: rotate(225deg);  
23 - font-size: 24rpx;  
24 - margin-top: 2rpx;  
25 - color: rgb(153, 153, 153);  
26 -}  
27 -  
28 -.Headportrait {  
29 - width: 145rpx;  
30 - height: 145rpx;  
31 - border-radius: 50%;  
32 - margin-left: 40rpx;  
33 -}  
34 -  
35 -.vip {  
36 - margin-top: 30rpx;  
37 - color: rgb(255, 255, 255);  
38 -}  
39 -  
40 -.AncrownMax {  
41 - background-color: rgb(57, 57, 57);  
42 - height: 36rpx;  
43 - border-radius: 20rpx;  
44 - margin-right: 20rpx;  
45 - line-height: 36rpx;  
46 - padding-right: 14rpx;  
47 - padding-left: 10rpx;  
48 -}  
49 -  
50 -.Nickname {  
51 - max-width: 375rpx;  
52 -}  
53 -  
54 -.Ancrown {  
55 - width: 30rpx;  
56 - height: 30rpx;  
57 - margin-right: 5rpx;  
58 -}  
59 -  
60 -.plusMax {  
61 - background-color: rgb(212, 58, 30);  
62 - height: 36rpx;  
63 - border-radius: 20rpx;  
64 - line-height: 36rpx;  
65 - padding-left: 10rpx;  
66 - padding-right: 14rpx;  
67 -}  
68 -  
69 -.fuls {  
70 - width: 25rpx;  
71 - height: 25rpx;  
72 - margin-right: 5rpx;  
73 -}  
74 -  
75 -.Bbottom {  
76 - border-bottom: 6rpx solid rgb(245, 245, 245);  
77 -}  
78 -  
79 -.Mleft {  
80 - margin-left: 8rpx;  
81 -}  
82 -  
83 -.Birth {  
84 - width: 500rpx;  
85 -}  
86 -  
87 -.Gendercheck {  
88 - width: 90rpx;  
89 - height: 35rpx;  
90 - border: 2rpx solid rgb(212, 2, 31);  
91 - color: rgb(212, 2, 31);  
92 - border-radius: 20rpx;  
93 - margin-left: 15rpx;  
94 -}  
95 -  
96 -.Gender {  
97 - width: 90rpx;  
98 - height: 35rpx;  
99 - border: 2rpx solid rgb(153, 153, 153);  
100 - color: rgb(153, 153, 153);  
101 - border-radius: 20rpx;  
102 - margin-left: 15rpx;  
103 -}  
104 -  
105 -.GenderImage {  
106 - width: 25rpx;  
107 - height: 25rpx;  
108 - margin-right: 10rpx;  
109 -}  
110 -  
111 -.confirm {  
112 - width: 100%;  
113 - position: fixed;  
114 - left: 0rpx;  
115 - bottom: 0rpx;  
116 - height: 130rpx;  
117 - background-color: rgb(255, 255, 255);  
118 - z-index: 9;  
119 - border-top: 1rpx solid #ddd;  
120 -}  
121 -  
122 -.confirmtext {  
123 - width: 495rpx;  
124 - height: 65rpx;  
125 - color: rgb(255, 255, 255);  
126 - background-color: rgb(214, 1, 33);  
127 - border-radius: 35rpx;  
128 -}  
129 -  
130 -.cmleft {  
131 - margin-left: 45rpx;  
132 -}  
133 -  
134 -.hion {  
135 - width: 300rpx;  
136 - text-align: right;  
137 - margin-top: 3rpx;  
138 - margin-right: 5rpx;  
139 -}  
140 -  
141 -.eye {  
142 - width: 50rpx;  
143 - height: 50rpx;  
144 -}  
145 -  
146 -.user-head {  
147 - height: 95rpx;  
148 - background-color: white;  
149 - margin: 0rpx 20rpx;  
150 - border-bottom: 2rpx solid rgb(245, 245, 245);  
151 - padding: 0rpx 20rpx;  
152 - padding-top: 20rpx;  
153 -}  
154 -  
155 -.user_headimg {  
156 - height: 140rpx;  
157 - width: 140rpx;  
158 - border-radius: 70rpx;  
159 -}  
160 -  
161 -.user-name {  
162 - height: 95rpx;  
163 - margin-top: 2rpx;  
164 - background-color: white;  
165 - margin: 0rpx 20rpx;  
166 - border-bottom: 2rpx solid rgb(245, 245, 245);  
167 - padding: 0rpx 20rpx;  
168 -}  
169 -  
170 -.user-name.mt {  
171 - margin-top: 20rpx;  
172 -}  
173 -  
174 -.address {  
175 - max-width: 300rpx;  
176 -}  
177 -  
178 -.Receiving_goods {  
179 - width: 330rpx;  
180 -}  
181 -  
182 -.user-change {  
183 - width: 100%;  
184 - height: 100rpx;  
185 - margin-top: 20rpx;  
186 - background-color: white;  
187 -}  
188 -  
189 -.one-line {  
190 - white-space: nowrap;  
191 - word-break: keep-all;  
192 - overflow: hidden;  
193 -}  
194 -  
195 -/*---弹出层---*/  
196 -  
197 -.modal-box {  
198 - position: fixed;  
199 - width: 100%;  
200 - height: 100%;  
201 - top: 0px;  
202 - background: rgba(0, 0, 0, 0.4);  
203 - overflow: hidden;  
204 -}  
205 -  
206 -.modal-body {  
207 - position: fixed;  
208 - top: 80rpx;  
209 - left: 0;  
210 - z-index: 100;  
211 - background: #fff;  
212 - margin-left: 73rpx;  
213 - width: 600rpx;  
214 - height: 860rpx;  
215 - border-radius: 8px;  
216 - text-align: center;  
217 -}  
218 -  
219 -.modal-content {  
220 - width: 480rpx;  
221 - margin: 0 auto;  
222 - margin-top: 60rpx;  
223 - overflow: hidden;  
224 -}  
225 -  
226 -.modal-content .hd_img {  
227 - width: 170rpx;  
228 - height: 170rpx;  
229 - border-radius: 5px;  
230 -}  
231 -  
232 -.ctent_txt {  
233 - margin-left: 30rpx;  
234 - text-align: left;  
235 -}  
236 -  
237 -.txt1 {  
238 - font-size: 34rpx;  
239 - font-weight: bold;  
240 -}  
241 -  
242 -.txt2 {  
243 - font-size: 30rpx;  
244 - color: #999;  
245 - margin-top: 20rpx;  
246 -}  
247 -  
248 -.arrow-right {  
249 - width: 35rpx;  
250 - height: 35rpx;  
251 - margin-left: 10rpx;  
252 - position: relative;  
253 - top: 5rpx;  
254 -}  
255 -  
256 -.code {  
257 - margin-bottom: 10rpx;  
258 -}  
259 -  
260 -.user-txt-right {  
261 - color: rgb(153, 153, 153);  
262 - font-size: 28rpx;  
263 -}  
264 -  
265 -.user-txt {  
266 - font-size: 32rpx;  
267 -}  
268 -  
269 -.m_ta {  
270 - margin-top: 50rpx;  
271 -}  
272 -  
273 -.g_img {  
274 - width: 480rpx;  
275 - height: 480rpx;  
276 -}  
277 -  
278 -.s_sao {  
279 - font-size: 27rpx;  
280 - margin-top: 25rpx;  
281 -}  
282 -  
283 -.order-ico1 {  
284 - width: 80rpx;  
285 - height: 46rpx;  
286 - margin-left: 40rpx;  
287 - margin-right: 20rpx;  
288 - color: rgba(0, 0, 0, 0.4);  
289 -}  
290 -  
291 -.f_btn {  
292 - font-size: 24rpx;  
293 - padding: 0 12rpx;  
294 - margin-right: 26rpx;  
295 - margin-top: -10rpx;  
296 -}  
297 -  
298 -.order-ico3 {  
299 - width: 54rpx;  
300 - height: 40rpx;  
301 - margin-left: 40rpx;  
302 - margin-right: 20rpx;  
303 -}  
304 -  
305 -.wh1001 {  
306 - width: 62rpx;  
307 - height: 100%;  
308 -}  
309 -  
310 -.wh1002 {  
311 - width: 76rpx;  
312 - height: 100%;  
313 -}  
314 -  
315 -.order-ico.cla {  
316 - width: 32rpx;  
317 -}  
318 -  
319 -.order-ico.cla2 {  
320 - width: 42rpx;  
321 - margin-left: 34rpx;  
322 -}  
323 -  
324 -.order-ico.cla3 {  
325 - width: 40rpx;  
326 - margin-left: 36rpx;  
327 -}  
328 -  
329 -/* 日期控件 */  
330 -  
331 -.pi {  
332 - width: 200rpx;  
333 - height: auto;  
334 - margin-left: 10rpx;  
335 -}  
336 -  
337 -.vipmax {  
338 - margin-left: 20rpx;  
339 -}  
340 -  
341 -/* 门店地址 */  
342 -  
343 -.xc-address_frame {  
344 - border-top: 1rpx solid #eee;  
345 - width: 100%;  
346 - height: auto;  
347 -}  
348 -  
349 -.on_height {  
350 - height: 90rpx;  
351 -}  
352 -  
353 -.sn_height {  
354 - height: 170rpx;  
355 -}  
356 -  
357 -.xc-address_frame .address_frame {  
358 - width: 92%;  
359 - padding-left: 10rpx;  
360 - margin: auto;  
361 -}  
362 -  
363 -.stores-img {  
364 - width: 40rpx;  
365 - height: 35rpx;  
366 - margin-right: 10rpx;  
367 -}  
368 -  
369 -.shop_name {  
370 - margin-right: 10rpx;  
371 -}  
372 -  
373 -.address {  
374 - width: 87%;  
375 - margin-top: 5rpx;  
376 - margin-bottom: 5rpx;  
377 -}  
378 -  
379 -.distance {  
380 - padding-left: 15rpx;  
381 - padding-right: 15rpx;  
382 - background: #eee;  
383 - border-radius: 20rpx;  
384 - margin-right: 5rpx;  
385 - color: #999;  
386 - height: 38rpx;  
387 - line-height: 38rpx;  
388 -}  
389 -  
390 -/* 选择门店的弹窗 */  
391 -  
392 -.mongolia-layer {  
393 - position: fixed;  
394 - left: 0;  
395 - top: 0;  
396 - right: 0;  
397 - bottom: 0;  
398 - z-index: 11;  
399 - background: rgba(0, 0, 0, 0.4);  
400 - width: 100%;  
401 - height: 91.9%;  
402 -}  
403 -  
404 -.popup-frame {  
405 - position: fixed;  
406 - bottom: -1rpx;  
407 - z-index: 20;  
408 - background: white;  
409 - width: 100%;  
410 - border-radius: 20rpx 20rpx 0 0;  
411 -}  
412 -  
413 -.popup-top {  
414 - border-bottom: 1rpx solid #eee;  
415 - height: 155rpx;  
416 - width: 95%;  
417 - margin: auto;  
418 - line-height: 155rpx;  
419 -}  
420 -  
421 -.bg_rights {  
422 - border-top: 2rpx solid;  
423 - border-right: 2rpx solid;  
424 - transform: rotate(45deg);  
425 - display: inline-block;  
426 - width: 15rpx;  
427 - height: 15rpx;  
428 - border-color: #da0b31;  
429 -}  
430 -  
431 -.modal-closes {  
432 - position: absolute;  
433 - right: 30rpx;  
434 - top: 20rpx;  
435 - height: 50rpx;  
436 - line-height: 50rpx;  
437 -}  
438 -  
439 -.choose_more {  
440 - margin-top: 40rpx;  
441 - padding-right: 20rpx;  
442 -}  
443 -  
444 -.choose_mores {  
445 - margin-top: 30rpx;  
446 - margin-right: 15rpx;  
447 -}  
448 -  
449 -.store-list {  
450 - width: 95%;  
451 - min-height: 300rpx;  
452 - max-height: 610rpx;  
453 - overflow-y: scroll;  
454 - margin: auto;  
455 -}  
456 -  
457 -.store-list .store_choose {  
458 - width: 100%;  
459 - height: 120rpx;  
460 - line-height: 125rpx;  
461 - border-bottom: 1rpx solid #eee;  
462 -}  
463 -  
464 -.store-list .store_choose .store {  
465 - width: 100%;  
466 - margin: auto;  
467 - line-height: 37rpx;  
468 - padding-left: 20rpx;  
469 -}  
470 -  
471 -.xc-hook {  
472 - width: 33rpx;  
473 - height: 33rpx;  
474 - transform: rotate(-145deg);  
475 - line-height: 37rpx;  
476 - text-align: center;  
477 -}  
478 -  
479 -.xc-hooks {  
480 - width: 30rpx;  
481 - height: 30rpx;  
482 - border: 1rpx solid #999;  
483 -}  
484 -  
485 -.address-frame {  
486 - width: 93%;  
487 - margin-left: 7rpx;  
488 -}  
489 -  
490 -.nearby_store {  
491 - margin-left: 17rpx;  
492 -}  
493 -  
494 -.address_name {  
495 - margin-right: 10rpx;  
496 -}  
497 -  
498 -.address-val {  
499 - height: 38rpx;  
500 - line-height: 38rpx;  
501 -}  
502 -  
503 -.store-bottom {  
504 - width: 85%;  
505 - margin: auto;  
506 - height: 90rpx;  
507 -}  
508 -  
509 -.determine {  
510 - width: 320rpx;  
511 - height: 55rpx;  
512 - border-radius: 50rpx;  
513 - line-height: 55rpx;  
514 -}  
515 -  
516 -.default {  
517 - width: 260rpx;  
518 - height: 55rpx;  
519 - border: 3rpx solid #c8c8c8;  
520 - border-radius: 50rpx;  
521 - line-height: 55rpx;  
522 -}  
523 -  
524 -.store-bottom-frame {  
525 - width: 95%;  
526 - margin: auto;  
527 -}  
528 -  
529 -/* 门店分类列表 */  
530 -  
531 -.sort_store_list {  
532 - max-height: 700rpx;  
533 - overflow: hidden;  
534 - overflow-y: scroll;  
535 - width: 95%;  
536 - margin: auto;  
537 -}  
538 -  
539 -.sort_store_list .sort-store-frame {  
540 - width: 100%;  
541 - height: 100rpx;  
542 - line-height: 100rpx;  
543 - border-bottom: 1rpx solid #eee;  
544 -}  
545 -  
546 -.sort_store_list .sort-store-frame .sort-store {  
547 - width: 94.5%;  
548 - margin: auto;  
549 -}  
550 -  
551 -.black_rights-frame {  
552 - width: 50%;;  
553 -}  
554 -  
555 -.black_rights-frame .black_rights {  
556 - border-top: 3rpx solid;  
557 - border-right: 3rpx solid;  
558 - transform: rotate(45deg);  
559 - display: inline-block;  
560 - width: 20rpx;  
561 - height: 20rpx;  
562 -}  
563 -  
564 -.xc-val-money {  
565 - height: 80rpx;  
566 -}  
567 -  
568 -.xc-distance-bottom {  
569 - margin-bottom: 40rpx;  
570 -}  
571 -  
572 -.xc-distance-top {  
573 - margin-top: 10rpx;  
574 -}  
575 -  
576 -.xc-width {  
577 - width: 100%;  
578 -}  
579 -  
580 -.right-arrow {  
581 - width: 15rpx;  
582 - height: 15rpx;  
583 - border-top: 2rpx solid #d70026;  
584 - border-right: 2rpx solid #d70026;  
585 - transform: rotate(45deg);  
586 - display: inline-block;  
587 - margin-bottom: 3rpx;  
588 -}  
589 -  
590 -.xc-goods-attribute {  
591 - border-bottom: 1px solid #eee;  
592 - padding-bottom: 15px;  
593 - margin-bottom: 40rpx;  
594 -}  
595 -  
596 -.xc-val-fream {  
597 - width: 105rpx;  
598 -}  
599 -  
600 -.is_stock {  
601 - width: 58%;  
602 - height: 70rpx;  
603 - border-radius: 55rpx;  
604 -}  
605 -  
606 -.select_store_height {  
607 - height: 50rpx;  
608 -}  
609 -  
610 -.butttem5 {  
611 - margin-bottom: 5rpx;  
612 -}  
613 -  
614 -.s_btn {  
615 - margin-top: 25rpx;  
616 -}  
617 -  
618 -.padding {  
619 - padding: 0rpx 20rpx;  
620 -}  
621 -  
622 -.interest {  
623 - padding: 0rpx 20rpx;  
624 - padding-top: 30rpx;  
625 - padding-bottom: 30rpx;  
626 -}  
627 -  
628 -.lables {  
629 - display: inline-block;  
630 - padding-top: 25rpx;  
631 -}  
632 -  
633 -.lable {  
634 - display: inline-block;  
635 - height: 44rpx;  
636 - line-height: 44rpx;  
637 - margin-right: 15rpx;  
638 - color: rgb(255, 255, 255);  
639 - border: 2rpx solid rgb(255, 138, 160);  
640 - background-color: rgb(255, 138, 160);  
641 - padding: 0rpx 25rpx;  
642 - border-radius: 30rpx;  
643 - margin-bottom: 21rpx;  
644 - max-width: 195rpx;  
645 -}  
646 -  
647 -.add_lable {  
648 - height: 44rpx;  
649 - line-height: 44rpx;  
650 - color: rgb(189, 189, 189);  
651 - border: 2rpx solid rgb(189, 189, 189);  
652 - border-radius: 30rpx;  
653 - padding: 0rpx 25rpx;  
654 -}  
655 -  
656 -.plus {  
657 - font-weight: bold;  
658 - margin-right: 8rpx;  
659 -}  
660 -  
661 -.lable_wh {  
662 - height: 46rpx;  
663 - line-height: 46rpx;  
664 -}  
665 -  
666 -.lb_txt{  
667 - color: red; font-size: 24rpx;  
668 -}  
utils/filter.wxs
@@ -265,10 +265,22 @@ var filters = { @@ -265,10 +265,22 @@ var filters = {
265 endDate = filters.format_time2(getDate(startDate).getTime() + days); 265 endDate = filters.format_time2(getDate(startDate).getTime() + days);
266 return startDate + '至' + endDate; 266 return startDate + '至' + endDate;
267 }; 267 };
268 - }, 268 + },
  269 + //判断加购按钮是否显示
  270 + has_add_goods:function(type){
  271 + var hide_add_goods=[4,6,8,9] //不显示加购按钮的活动
  272 + var off = true
  273 + for (var index = 0; index < hide_add_goods.length; index++) {
  274 + if (hide_add_goods[index] === type) {
  275 + off = false
  276 + }
  277 + }
  278 + return off
  279 + }
269 }; 280 };
270 281
271 module.exports = { 282 module.exports = {
  283 + has_add_goods:filters.has_add_goods,
272 toFix: filters.toFix, 284 toFix: filters.toFix,
273 replace_time: filters.replace_time, 285 replace_time: filters.replace_time,
274 replace_time2: filters.replace_time2, 286 replace_time2: filters.replace_time2,