Commit ca6728668e773ec862d93b43227acfdb88d75f0a
1 parent
53c76ad5
从staff_id获取线上导购列表
Showing
1 changed file
with
32 additions
and
1 deletions
app.js
| ... | ... | @@ -1738,7 +1738,38 @@ App({ |
| 1738 | 1738 | break; |
| 1739 | 1739 | } |
| 1740 | 1740 | } |
| 1741 | - } | |
| 1741 | + }, | |
| 1742 | + | |
| 1743 | + //从staff_id获取线上导购列表 | |
| 1744 | + async get_guide_from_staff(staff_id,func) { | |
| 1745 | + let guide=null; | |
| 1746 | + //获取导购 | |
| 1747 | + await this.promiseGet("/api/weshop/shoppingGuide/getStaffIdInfo", { | |
| 1748 | + data: { | |
| 1749 | + store_id:this.globalData.setting.stoid, | |
| 1750 | + StaffId:staff_id | |
| 1751 | + }, | |
| 1752 | + }).then(res => { | |
| 1753 | + if(res && res.data.code==0 && res.data.data && res.data.data.is_bind && res.data.data.bind_user_id){ | |
| 1754 | + guide=res.data.data | |
| 1755 | + } | |
| 1756 | + }) | |
| 1757 | + | |
| 1758 | + if(guide) { | |
| 1759 | + guide.beauty_strengths = "美妆小能手"; | |
| 1760 | + //获取导购绑定的会员的信息 | |
| 1761 | + await this.promiseGet("/api/weshop/users/get/" + this.globalData.setting.stoid + "/" + guide.bind_user_id, { | |
| 1762 | + data: {}, | |
| 1763 | + }).then(res => { | |
| 1764 | + if (res && res.data.code == 0 && res.data.data) { | |
| 1765 | + guide.head_pic = res.data.data.head_pic; | |
| 1766 | + } | |
| 1767 | + }) | |
| 1768 | + } | |
| 1769 | + if(func){ | |
| 1770 | + func(guide); | |
| 1771 | + } | |
| 1772 | + }, | |
| 1742 | 1773 | |
| 1743 | 1774 | |
| 1744 | 1775 | ... | ... |