当前位置:网站首页>uniapp获取微信头像和昵称
uniapp获取微信头像和昵称
2022-07-05 18:39:00 【gblfy】
<view class="userInformation">
<!-- 用户自定义头像 -->
<view class="userPortrait">
<image :src="yonghuwx.avatarUrl" mode="widthFix"></image>
</view>
<view class="userLook" >
<!-- 用户自定义名字 -->
<view class="user-title clamp">{
{
yonghuwx.nickName}}</view>
<view class="user-edit">查看个人资料</view>
</view>
</view>
onLoad(){
let that = this;
uni.login({
provider:'weixin',
success:function(loginRes) {
// 获取用户信息
uni.getUserInfo({
provider:'weixin',
success:function(infoRes){
that.userInfo= infoRes.userInfo
console.log(that.userInfo)
}
});
}
});
}
边栏推荐
- 从外卖点单浅谈伪需求
- Tianyi cloud understands enterprise level data security in this way
- Tupu software digital twin | visual management system based on BIM Technology
- 7-1 链表也简单fina
- C language makes it easy to add, delete, modify and check the linked list "suggested collection"
- RPC protocol details
- Reading notes of Clickhouse principle analysis and Application Practice (5)
- 5. 数据访问 - EntityFramework集成
- Quickly generate IPA package
- 2022 latest intermediate and advanced Android interview questions, [principle + practice + Video + source code]
猜你喜欢
AI open2022 | overview of recommendation systems based on heterogeneous information networks: concepts, methods, applications and resources
MYSQL中 find_in_set() 函数用法详解
怎么自动安装pythn三方库
AI金榜题名时,MLPerf榜单的份量究竟有多重?
Oracle 中文排序 Oracle 中文字段排序
Windows Oracle open remote connection Windows Server Oracle open remote connection
Ant group open source trusted privacy computing framework "argot": open and universal
从外卖点单浅谈伪需求
Windows Oracle 开启远程连接 Windows Server Oracle 开启远程连接
Summary of six points of MySQL optimization
随机推荐
视频融合云平台EasyCVR增加多级分组,可灵活管理接入设备
一朵云开启智慧交通新未来
The monthly list of Tencent cloud developer community videos was released in May 2022
达梦数据库udf实现
SAP 特征 特性 说明
The road of enterprise digital transformation starts from here
A2L file parsing based on CAN bus (3)
China law network joins hands to observe the cloud, and the online system is a full link observable platform
视频自监督学习综述
使用文件和目录属性和属性
Quickly generate IPA package
Pytorch yolov5 training custom data
爬虫01-爬虫基本原理讲解
C final review
Precautions for RTD temperature measurement of max31865 module
Shang Silicon Valley Shang preferred project tutorial release
Startup and shutdown of CDB instances
紧固件行业供应商绩效考核繁琐?选对工具才能轻松逆袭!
EasyCVR电子地图中设备播放器loading样式的居中对齐优化
RPC协议详解