This commit is contained in:
zhangmanman
2021-07-07 10:56:55 +08:00
parent c29fc7b5cb
commit ba6b09db50
2 changed files with 7 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ import {req} from "../request"
const index = () => req({url: "user"}) const index = () => req({url: "user"})
//切换用户登录 //切换用户登录
const mobiles = () => req({url: "user/mobiles"}) const mobiles = (wechatUser_id) => req({url: "user/mobiles", data:{wechatUser_id : wechatUser_id}})
//卡券 //卡券
const coupon = (status) => req({url: "coupons?status=" + status}) const coupon = (status) => req({url: "coupons?status=" + status})

View File

@@ -30,8 +30,13 @@ Page({
way : options.way way : options.way
}) })
const wechatUserId = wx.getStorageSync("wechatUser")
this.setData({
wechatUserId: wechatUserId
})
if(options.type == "mobiles") { if(options.type == "mobiles") {
wx.$api.user.mobiles().then(res=>{ wx.$api.user.mobiles(this.data.wechatUserId).then(res=>{
this.setData({ this.setData({
loginTel : res.data loginTel : res.data
}) })