Commit a4b56f40ef740d371f98544ea3cacc13c1f33baa
Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp
Showing
1 changed file
with
16 additions
and
1 deletions
packageE/pages/qy/contactMe/contactMe.js
| 1 | var t = require("../../../../utils/common.js"); | 1 | var t = require("../../../../utils/common.js"); |
| 2 | const app = getApp(); | 2 | const app = getApp(); |
| 3 | var os = app.globalData.setting; | 3 | var os = app.globalData.setting; |
| 4 | +var oo = os; | ||
| 4 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 5 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
| 5 | 6 | ||
| 6 | Page({ | 7 | Page({ |
| @@ -107,6 +108,7 @@ Page({ | @@ -107,6 +108,7 @@ Page({ | ||
| 107 | }) | 108 | }) |
| 108 | this.getopenuserid(f_arr[2]) | 109 | this.getopenuserid(f_arr[2]) |
| 109 | }else{ | 110 | }else{ |
| 111 | + | ||
| 110 | wx.removeStorageSync('userinfo') | 112 | wx.removeStorageSync('userinfo') |
| 111 | wx.setStorageSync('qyzsdg', tt.scene) | 113 | wx.setStorageSync('qyzsdg', tt.scene) |
| 112 | wx.navigateTo({ | 114 | wx.navigateTo({ |
| @@ -181,12 +183,25 @@ Page({ | @@ -181,12 +183,25 @@ Page({ | ||
| 181 | }, | 183 | }, |
| 182 | getopenuserid(id) { | 184 | getopenuserid(id) { |
| 183 | let url = `/api/weshop/qyWeChat/qywxStaffcode/get/${id}` | 185 | let url = `/api/weshop/qyWeChat/qywxStaffcode/get/${id}` |
| 184 | - getApp().request.promiseGet(url, { data: {} }).then(res => { | 186 | + getApp().request.promiseGet(url, { data: {} }).then(async res => { |
| 185 | console.log(res); | 187 | console.log(res); |
| 186 | if (res.data.code == 0) { | 188 | if (res.data.code == 0) { |
| 187 | // let resdata=JSON.parse(res.data.data); | 189 | // let resdata=JSON.parse(res.data.data); |
| 188 | let openuserid = res.data.data.openuserid; | 190 | let openuserid = res.data.data.openuserid; |
| 189 | let skip_verify = res.data.data.skip_verify; | 191 | let skip_verify = res.data.data.skip_verify; |
| 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 | + ) | ||
| 190 | this.setData({ | 205 | this.setData({ |
| 191 | openuserid, | 206 | openuserid, |
| 192 | skip_verify | 207 | skip_verify |