diff --git a/app.js b/app.js index 13adf0f..80fee26 100644 --- a/app.js +++ b/app.js @@ -1738,7 +1738,38 @@ App({ break; } } - } + }, + + //从staff_id获取线上导购列表 + async get_guide_from_staff(staff_id,func) { + let guide=null; + //获取导购 + await this.promiseGet("/api/weshop/shoppingGuide/getStaffIdInfo", { + data: { + store_id:this.globalData.setting.stoid, + StaffId:staff_id + }, + }).then(res => { + if(res && res.data.code==0 && res.data.data && res.data.data.is_bind && res.data.data.bind_user_id){ + guide=res.data.data + } + }) + + if(guide) { + guide.beauty_strengths = "美妆小能手"; + //获取导购绑定的会员的信息 + await this.promiseGet("/api/weshop/users/get/" + this.globalData.setting.stoid + "/" + guide.bind_user_id, { + data: {}, + }).then(res => { + if (res && res.data.code == 0 && res.data.data) { + guide.head_pic = res.data.data.head_pic; + } + }) + } + if(func){ + func(guide); + } + },