企获客基础班本接口方法等描述
This commit is contained in:
43
components/loginLayer/loginLayer.js
Normal file
43
components/loginLayer/loginLayer.js
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
/**
|
||||
* Web唐明明
|
||||
* 一个梦想做木雕手艺人的程序员
|
||||
* explain: userInfoLayer
|
||||
*/
|
||||
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
showLayer: {
|
||||
type : Boolean,
|
||||
value : false
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
userInfo(info){
|
||||
if(info.detail.errMsg == "getUserInfo:ok"){
|
||||
wx.$api.auth.authInfo({
|
||||
nickname: info.detail.userInfo.nickName,
|
||||
avatar : info.detail.userInfo.avatarUrl
|
||||
}).then(()=>{
|
||||
this.triggerEvent("updateinfo", true)
|
||||
this.setData({
|
||||
showLayer: false
|
||||
})
|
||||
})
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: '拒绝了授权',
|
||||
icon : 'none'
|
||||
})
|
||||
this.triggerEvent("updateinfo", false)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user