Commit 2ac8d1df1407d785780183b241d9beae0f7fabc9

Authored by taiyuan
1 parent 6913340f

预约服务修改

packageA/pages/my_service/appment_main.js
... ... @@ -563,21 +563,32 @@ Page({
563 563 });
564 564  
565 565 // 获取当前默认导购信息及归属门店信息
566   - getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', {
567   - data: {
568   - store_id: a.stoid,
569   - guide_id: e.globalData.guide_id,
570   - UserCode: th.data.options.usercode,
571   - }
572   - }).then(res => {
573   - console.log('res==>', a.stoid, e.globalData.guide_id, th.data.options.usercode);
574   - if(res.data.data.Tech) {
575   - th.setData({
576   - store_name: res.data.data.StorageName,
577   - beautician_name: res.data.data.StaffName,
578   - });
579   - }
580   - });
  566 + if(options.firstleader) {
  567 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+a.stoid+"/"+options.firstleader,{}).then(res=>{
  568 +        if(res.data.code==0){
  569 +          getApp().globalData.guide_id=res.data.data.id;
  570 +
  571 + getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', {
  572 + data: {
  573 + store_id: a.stoid,
  574 + guide_id: e.globalData.guide_id,
  575 + UserCode: th.data.options.usercode,
  576 + }
  577 + }).then(res => {
  578 + console.log('res==>', a.stoid, e.globalData.guide_id, th.data.options.usercode);
  579 + if(res.data.data.Tech) {
  580 + th.setData({
  581 + store_name: res.data.data.StorageName,
  582 + beautician_name: res.data.data.StaffName,
  583 + });
  584 + }
  585 + });
  586 +
  587 +
  588 +        };
  589 + });
  590 + };
  591 +
581 592  
582 593 },
583 594 //查询剩下可预约人数
... ...
packageA/pages/my_service/i_service.wxml
... ... @@ -50,7 +50,7 @@
50 50 <!-- <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}">
51 51 <view>帮你预约</view>
52 52 </view> -->
53   - <view class="flex-level btn" data-url="/packageA/pages/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}&userid={{options.UserId}}&usercode={{options.UserCode}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}">
  53 + <view class="flex-level btn" data-url="/packageA/pages/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}&userid={{options.UserId}}&usercode={{options.UserCode}}&firstleader={{options.first_leader}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}">
54 54 <view>帮你预约</view>
55 55 </view>
56 56 </view>
... ...