更新头像获取方式
This commit is contained in:
parent
26357524d0
commit
c0493a942a
|
@ -12,3 +12,5 @@ $RECYCLE.BIN/
|
|||
|
||||
# Node.js
|
||||
node_modules/
|
||||
|
||||
project.config.json
|
|
@ -138,6 +138,21 @@ Page({
|
|||
})
|
||||
this.denglu2()
|
||||
},
|
||||
getUserProfile: function(e){
|
||||
wx.getUserProfile({
|
||||
desc: '获取头像和昵称', //
|
||||
success: (res) => {
|
||||
this.setData({
|
||||
userInfo: res.userInfo
|
||||
})
|
||||
this.denglu()
|
||||
},
|
||||
fail:(res)=>{
|
||||
this.denglu()
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="weui-btn" type="primary" open-type="getUserInfo" bindgetuserinfo="onGetInfo">授权并绑定登陆</button>
|
||||
<button class="weui-btn" type="primary" bindtap="getUserProfile">授权并绑定登陆</button>
|
||||
<view style="text-align:center;color:gray" bindtap="showPw">账号错误或忘记密码?</view>
|
||||
<view style="text-align:center;color:gray">获取测试账户请致电15810169371</view>
|
||||
<!-- <button class="weui-btn" bindtap="denglu2">测试账户登录</button> -->
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
"description": "项目配置文件。",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": true,
|
||||
"enhance": false,
|
||||
"postcss": true,
|
||||
"preloadBackgroundData": false,
|
||||
"minified": true,
|
||||
"newFeature": true,
|
||||
"coverView": true,
|
||||
"nodeModules": true,
|
||||
"autoAudits": false,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"scopeDataCheck": false,
|
||||
"uglifyFileName": false,
|
||||
"checkInvalidKey": true,
|
||||
"checkSiteMap": true,
|
||||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"useMultiFrameRuntime": false,
|
||||
"useApiHook": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"bundle": false,
|
||||
"useIsolateContext": false,
|
||||
"useCompilerModule": false,
|
||||
"userConfirmedUseCompilerModuleSwitch": false,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
"packNpmManually": false,
|
||||
"packNpmRelationList": [],
|
||||
"minifyWXSS": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.9.4",
|
||||
"appid": "wx5c39b569f01c27db",
|
||||
"projectname": "aqyj",
|
||||
"isGameTourist": false,
|
||||
"simulatorType": "wechat",
|
||||
"simulatorPluginLibVersion": {},
|
||||
"condition": {
|
||||
"search": {
|
||||
"list": []
|
||||
},
|
||||
"conversation": {
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"currentL": -1,
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"list": []
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue