Commit 0546faf7cb0e5c3617605a20d6321207f0ef59c3

Authored by WXD-SEASON\season
2 parents 0db5dca9 4a49c4ea

Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa

packageG/pages/user/my_beauty_consultant/my_beauty_consultant.js
@@ -84,47 +84,67 @@ Page({ @@ -84,47 +84,67 @@ Page({
84 qrcode('qrcode', "1505955959595", 480, 480, this); 84 qrcode('qrcode', "1505955959595", 480, 480, this);
85 //th.requestRecommend(); 85 //th.requestRecommend();
86 /*--- 获取一下,会员要不要线上美顾 ---*/ 86 /*--- 获取一下,会员要不要线上美顾 ---*/
87 - rq.get("/api/weshop/users/getAndUpdateUser/" + os.stoid + "/" + getApp().globalData.user_id, {  
88 - success: async function (src) {  
89 - if (src.data.code == 0) {  
90 - var u_data = src.data.data;  
91 - if (!u_data.staffId) {  
92 - getApp().confirmBox('该会员无专属导购');  
93 - return false;  
94 - }  
95 - //-- 导购的临时变量 --  
96 - let tp_guide = null;  
97 - let tp_pick = null;  
98 - //获取会员在手店后台的  
99 - await getApp().get_guide_from_staff(u_data.staffId, function (guide) {  
100 - if (!guide) {  
101 - getApp().confirmBox('该会员的专属导购未在手店后台导购列表中'); 87 +
  88 + getApp().getConfig(()=>{
  89 + rq.get("/api/weshop/users/getAndUpdateUser/" + os.stoid + "/" + getApp().globalData.user_id, {
  90 + success: async function (src) {
  91 + if (src.data.code == 0) {
  92 + var u_data = src.data.data;
  93 + if (!u_data.staffId) {
  94 + getApp().confirmBox('该会员无专属导购');
102 return false; 95 return false;
103 } 96 }
104 - tp_guide = guide;  
105 - });  
106 - tp_guide.staffName = u_data.staffName;  
107 - tp_guide.staffId = u_data.staffId;  
108 - tp_guide.staffTel = u_data.staffTel || tp_guide.mobile;  
109 - if(!tp_guide.staffTel){  
110 - tp_guide.staffTel=tp_guide.bind_user_mobile;  
111 - }  
112 - await getApp().request.promiseGet("/api/weshop/pickup/get/" + os.stoid + "/" + tp_guide.pickup_id, {}).then(res => {  
113 - if(res.data.code==0 && res.data.data){  
114 - tp_pick=res.data.data; 97 + //-- 导购的临时变量 --
  98 + let tp_guide = null;
  99 + let tp_pick = null;
  100 + //获取会员在手店后台的
  101 + await getApp().get_guide_from_staff(u_data.staffId, function (guide) {
  102 + if (!guide) {
  103 + getApp().confirmBox('该会员的专属导购未在手店后台导购列表中');
  104 + return false;
  105 + }
  106 + tp_guide = guide;
  107 + });
  108 +
  109 + if(!tp_guide.weapp_codeimg){
  110 + var code_rq={};
  111 + code_rq['accdb'] = getApp().globalData.config.erpid;
  112 + code_rq['staffId'] = encodeURIComponent(tp_guide['erp_staff_id']);
  113 + await getApp().request.promiseGet("/api/weshop/MdUser/getStaffWeAppEwm", {
  114 + data: code_rq,
  115 + }).then(res => {
  116 + if(res.data.code==0){
  117 + tp_guide.weapp_codeimg=res.data.data.weapp_codeimg;
  118 + }
  119 + })
  120 +
  121 + }
  122 +
  123 + tp_guide.staffName = u_data.staffName;
  124 + tp_guide.staffId = u_data.staffId;
  125 + tp_guide.staffTel = u_data.staffTel || tp_guide.mobile;
  126 + if(!tp_guide.staffTel){
  127 + tp_guide.staffTel=tp_guide.bind_user_mobile;
115 } 128 }
116 - })  
117 - th.setData({  
118 - guide: tp_guide,  
119 - pick_up: tp_pick,  
120 - }) 129 + await getApp().request.promiseGet("/api/weshop/pickup/get/" + os.stoid + "/" + tp_guide.pickup_id, {}).then(res => {
  130 + if(res.data.code==0 && res.data.data){
  131 + tp_pick=res.data.data;
  132 + }
  133 + })
  134 + th.setData({
  135 + guide: tp_guide,
  136 + pick_up: tp_pick,
  137 + })
121 138
122 139
123 - th.getopenuserid(tp_guide.id); 140 + th.getopenuserid(tp_guide.id);
124 141
  142 + }
125 } 143 }
126 - } 144 + })
127 }) 145 })
  146 +
  147 +
128 }, 148 },
129 149
130 //打电话 150 //打电话
packageG/pages/user/my_beauty_consultant/my_beauty_consultant.wxml
@@ -19,9 +19,9 @@ @@ -19,9 +19,9 @@
19 <!-- 二维码 --> 19 <!-- 二维码 -->
20 <view class="flex jc-center" style="margin-top: 60rpx;"> 20 <view class="flex jc-center" style="margin-top: 60rpx;">
21 <!-- 企业微信码 --> 21 <!-- 企业微信码 -->
22 - <image wx:if="{{is_qy_wx}}" style="height: 338rpx;width: 338rpx;" src="{{qr_code?qr_code:err_img}}" binderror="bind_bnerr2" show-menu-by-longpress ></image> 22 + <image referrerPolicy="no-referrer" wx:if="{{is_qy_wx}}" style="height: 338rpx;width: 338rpx;" src="{{qr_code?qr_code:err_img}}" binderror="bind_bnerr2" show-menu-by-longpress ></image>
23 <!-- 小程序太阳码 --> 23 <!-- 小程序太阳码 -->
24 - <image wx:else style="height: 338rpx;width: 338rpx;" src="{{guide.weapp_codeimg}}" show-menu-by-longpress ></image> 24 + <image referrerPolicy="no-referrer" wx:else style="height: 338rpx;width: 338rpx;" src="{{guide.weapp_codeimg}}" show-menu-by-longpress ></image>
25 </view> 25 </view>
26 <view class="flex jc-center" style="margin-top:20rpx"> 26 <view class="flex jc-center" style="margin-top:20rpx">
27 <text class="fs18 biaoqian_box flex-center">小福利TIPS</text> 27 <text class="fs18 biaoqian_box flex-center">小福利TIPS</text>