Commit e4079878cb6ab0f5a74ddaab987548a8cea34511
1 parent
05171cbb
预约分享
Showing
4 changed files
with
87 additions
and
7 deletions
packageA/pages/goodsInfo/goodsInfo.js
packageA/pages/my_service/appment_main.js
... | ... | @@ -150,7 +150,7 @@ Page({ |
150 | 150 | "keyword": res.data.data.Address |
151 | 151 | } |
152 | 152 | ], |
153 | - "page": "/packageA/pages/my_service/tment_details?number=" + number, | |
153 | + "page": "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid, | |
154 | 154 | "storeId": a.stoid, |
155 | 155 | "typeId": "1011", |
156 | 156 | "userId": th.data.options.userid |
... | ... | @@ -168,7 +168,7 @@ Page({ |
168 | 168 | }) |
169 | 169 | setTimeout(function() { |
170 | 170 | wx.redirectTo({ |
171 | - url: "/packageA/pages/my_service/tment_details?number=" + number | |
171 | + url: "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid, | |
172 | 172 | }); |
173 | 173 | }, 1000); |
174 | 174 | } else { |
... | ... | @@ -579,14 +579,16 @@ Page({ |
579 | 579 | UserCode: th.data.options.usercode, |
580 | 580 | } |
581 | 581 | }).then(res => { |
582 | - console.log('res==>', a.stoid, e.globalData.guide_id, th.data.options.usercode); | |
582 | + console.log('res==>', a.stoid, e.globalData.guide_id, th.data.options.usercode); | |
583 | 583 | if(res.data.data.Tech) { |
584 | - th.setData({ | |
584 | + | |
585 | + var data={ | |
585 | 586 | store_name: res.data.data.StorageName, |
586 | 587 | beautician_name: res.data.data.StaffName, |
587 | 588 | beauticianID: res.data.data.StaffId, |
588 | 589 | StorageId: res.data.data.StorageId, |
589 | - }); | |
590 | + } | |
591 | + th.check_firleader(data); | |
590 | 592 | } |
591 | 593 | }); |
592 | 594 | |
... | ... | @@ -670,4 +672,75 @@ Page({ |
670 | 672 | // var nav_b = th.selectComponent("#nav_b"); //组件的id |
671 | 673 | // nav_b.close_box(); |
672 | 674 | // } |
675 | + | |
676 | + //判断分享的导购是不是有门店,是不是该门店下又该会员 | |
677 | + check_firleader(data){ | |
678 | + var th=this; | |
679 | + var itemId = this.data.itemId; //服务id | |
680 | + var url = "/api/weshop/marketing/reservation/storage/pagenew"; | |
681 | + var key_word = data.store_name; | |
682 | + key_word = key_word.replace(/\s+/g, ""); | |
683 | + getApp().request.promiseGet(url, { | |
684 | + data: { | |
685 | + userId: th.data.options.userid, | |
686 | + storeId: os.stoid, | |
687 | + serviceId: itemId, | |
688 | + latitude: th.data.lat, | |
689 | + longitude: th.data.lon, | |
690 | + page: 1, | |
691 | + pageSize: 1000, | |
692 | + keyWord: key_word | |
693 | + } | |
694 | + }).then(res => { | |
695 | + //-- 如果是门店的话 -- | |
696 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData) { | |
697 | + var store_data=null; | |
698 | + for(var i in res.data.data.pageData){ | |
699 | + var it=res.data.data.pageData[i]; | |
700 | + if(it.Id==data.StorageId){ | |
701 | + store_data={ | |
702 | + store_name: data.store_name, | |
703 | + StorageId: data.StorageId, | |
704 | + }; | |
705 | + break; | |
706 | + } | |
707 | + } | |
708 | + if(!store_data) return false; | |
709 | + th.setData(store_data) | |
710 | + | |
711 | + }else{ | |
712 | + return false; | |
713 | + } | |
714 | + | |
715 | + //导购接口地址 | |
716 | + var url = "/api/weshop/marketing/reservation/staff/pagenew"; | |
717 | + return getApp().request.promiseGet(url, { | |
718 | + isShowLoading:1, | |
719 | + data: { | |
720 | + storeId: os.stoid, | |
721 | + userId: th.data.options.userid, | |
722 | + serviceId: itemId, | |
723 | + storageId: data.StorageId | |
724 | + } | |
725 | + }) | |
726 | + }).then(res=>{ | |
727 | + if (res && res.data && res.data.code == 0) { | |
728 | + var beautician_list=res.data.data; | |
729 | + for(var i in beautician_list){ | |
730 | + var item=beautician_list[i]; | |
731 | + if(item.staffid==data.beauticianID){ | |
732 | + th.setData({ | |
733 | + beautician_name:data.beautician_name, | |
734 | + beauticianID:data.beauticianID, | |
735 | + }) | |
736 | + break; | |
737 | + } | |
738 | + } | |
739 | + | |
740 | + } | |
741 | + }) | |
742 | + } | |
743 | + | |
744 | + | |
745 | + | |
673 | 746 | }) |
674 | 747 | \ No newline at end of file | ... | ... |
packageA/pages/my_service/tment_details.js
packageA/pages/service_share/service_share.js
... | ... | @@ -147,7 +147,7 @@ Page({ |
147 | 147 | var title= item.serviceName; |
148 | 148 | var img=this.data.url+item.original_img; |
149 | 149 | |
150 | - var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id; | |
150 | + var url="/packageA/pages/goodsInfo/goodsInfo?goods_id=" + item.id; | |
151 | 151 | if(getApp().globalData.user_id){ |
152 | 152 | url+="&first_leader="+getApp().globalData.user_id; |
153 | 153 | } |
... | ... | @@ -837,7 +837,7 @@ Page({ |
837 | 837 | go_goods:function(e){ |
838 | 838 | var index=e.currentTarget.dataset.index; |
839 | 839 | var item=this.data.list[index]; |
840 | - var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id; | |
840 | + var url="/packageA/pages/goodsInfo/goodsInfo?goods_id=" + item.id; | |
841 | 841 | getApp().goto(url); |
842 | 842 | }, |
843 | 843 | ... | ... |