当前位置:网站首页>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)
}
});
}
});
}
边栏推荐
- EasyCVR电子地图中设备播放器loading样式的居中对齐优化
- XML基础知识概念
- LeetCode 6111. Spiral matrix IV
- Technology sharing | interface testing value and system
- AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
- Ant group open source trusted privacy computing framework "argot": open and universal
- Is it safe for Apple mobile phone to speculate in stocks? Is it a fraud to get new debts?
- 为什么 BI 软件都搞不定关联分析?带你分析分析
- Applet modification style (placeholder, checkbox style)
- 紧固件行业供应商绩效考核繁琐?选对工具才能轻松逆袭!
猜你喜欢

5. Data access - entityframework integration

A2L file parsing based on CAN bus (3)
![[detailed explanation of AUTOSAR 14 startup process]](/img/c4/5b08b43db97d8bb10c7207005f8c0a.png)
[detailed explanation of AUTOSAR 14 startup process]

2022 Alibaba Android advanced interview questions sharing, 2022 Alibaba hand Taobao Android interview questions

技术分享 | 常见接口协议解析

You can have both fish and bear's paw! Sky wing cloud elastic bare metal is attractive!

Overview of video self supervised learning

2022最新中高级Android面试题目,【原理+实战+视频+源码】

跨境支付平台 XTransfer 的低代码实践:如何与其他中台融合是核心

Applet modification style (placeholder, checkbox style)
随机推荐
Tianyi cloud understands enterprise level data security in this way
Personal understanding of convolutional neural network
紧固件行业供应商绩效考核繁琐?选对工具才能轻松逆袭!
Precautions for RTD temperature measurement of max31865 module
RPC protocol details
Word finds red text word finds color font word finds highlighted formatted text
Golang through pointer for Range implements the change of the value of the element in the slice
Applet modification style (placeholder, checkbox style)
Simple query cost estimation
Icml2022 | partial and asymmetric comparative learning of out of distribution detection in long tail recognition
Is it safe for Apple mobile phone to speculate in stocks? Is it a fraud to get new debts?
Web3.0时代来了,看天翼云存储资源盘活系统如何赋能新基建(下)
Interprocess communication (IPC): shared memory
c语言简便实现链表增删改查「建议收藏」
golang通过指针for...range实现切片中元素的值的更改
Oracle Chinese sorting Oracle Chinese field sorting
【Autosar 十四 启动流程详解】
Find in MySQL_ in_ Detailed explanation of set() function usage
案例分享|金融业数据运营运维一体化建设
sample_rate(采樣率),sample(采樣),duration(時長)是什麼關系