Commit 1175de65607b646cd09b09bceed0b63b33183697
1 parent
f1581728
优化导购专属
Showing
1 changed file
with
15 additions
and
2 deletions
packageE/pages/qy/contactMe/contactMe.js
| 1 | 1 | var t = require("../../../../utils/common.js"); |
| 2 | 2 | const app = getApp(); |
| 3 | 3 | var os = app.globalData.setting; |
| 4 | +var oo = os; | |
| 4 | 5 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
| 5 | 6 | |
| 6 | 7 | Page({ |
| ... | ... | @@ -182,13 +183,25 @@ Page({ |
| 182 | 183 | }, |
| 183 | 184 | getopenuserid(id) { |
| 184 | 185 | let url = `/api/weshop/qyWeChat/qywxStaffcode/get/${id}` |
| 185 | - getApp().request.promiseGet(url, { data: {} }).then(res => { | |
| 186 | + getApp().request.promiseGet(url, { data: {} }).then(async res => { | |
| 186 | 187 | console.log(res); |
| 187 | 188 | if (res.data.code == 0) { |
| 188 | 189 | // let resdata=JSON.parse(res.data.data); |
| 189 | 190 | let openuserid = res.data.data.openuserid; |
| 190 | 191 | let skip_verify = res.data.data.skip_verify; |
| 191 | - getApp().globalData.guide_id=res.data.data.guide_id | |
| 192 | + let guide_id =res.data.data.guide_id | |
| 193 | + getApp().globalData.guide_id=guide_id | |
| 194 | + | |
| 195 | + //调用接口判断是不是会员 | |
| 196 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/" + oo.stoid + "/" + guide_id, {}).then( | |
| 197 | + res => { | |
| 198 | + // console.error(res); | |
| 199 | + if (res.data.code == 0) { | |
| 200 | + getApp().globalData.first_leader = res.data.data.bind_user_id; | |
| 201 | + // goods.guide_sn = res.data.data.salesman_no; | |
| 202 | + } | |
| 203 | + } | |
| 204 | + ) | |
| 192 | 205 | this.setData({ |
| 193 | 206 | openuserid, |
| 194 | 207 | skip_verify | ... | ... |