mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
删除无用文件夹
This commit is contained in:
22
wechat/utils/login.js
Normal file
22
wechat/utils/login.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const api = require("../API/request")
|
||||
const appLogin =(options)=>{
|
||||
console.log("登录")
|
||||
wx.login({
|
||||
success:(res)=>{
|
||||
console.log("登录",res)
|
||||
if(res.errMsg == "login:ok"){
|
||||
api.userLogin({
|
||||
code : res.code,
|
||||
options:options
|
||||
}).then(res=>{
|
||||
wx.setStorageSync('token', res.token)
|
||||
// wx.setStorageSync('userType', res.data.userType)
|
||||
// wx.setStorageSync('userInfo', res.data.userInfo)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
module.exports={
|
||||
appLogin
|
||||
}
|
||||
Reference in New Issue
Block a user