当前位置:网站首页>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)
}
});
}
});
}
边栏推荐
- AI Open2022|基于异质信息网络的推荐系统综述:概念,方法,应用与资源
- 线性表——抽象数据类型
- LeetCode 6111. Spiral matrix IV
- Use QT to traverse JSON documents and search sub objects
- 技术分享 | 接口测试价值与体系
- The era of Web3.0 is coming. See how Tianyi cloud storage resources revitalize the system to enable new infrastructure (Part 2)
- RedHat7.4配置yum软件仓库(RHEL7.4)
- U-Net: Convolutional Networks for Biomedical Images Segmentation
- Isprs2020/ cloud detection: transferring deep learning models for cloud detection between landsat-8 and proba-v
- Mathematical modeling of oil pipeline layout MATLAB, mathematical model of oil pipeline layout
猜你喜欢

The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly

Tianyi cloud understands enterprise level data security in this way

Mysql database indexing tutorial (super detailed)

Word查找红色文字 Word查找颜色字体 Word查找突出格式文本

Oracle日期格式转换 to_date,to_char,to_timetamp 相互转换

尚硅谷尚优选项目教程发布

A cloud opens a new future of smart transportation

进程间通信(IPC):共享内存

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

Tupu software digital twin | visual management system based on BIM Technology
随机推荐
Windows Oracle 开启远程连接 Windows Server Oracle 开启远程连接
The main thread anr exception is caused by too many binder development threads
怎么自动安装pythn三方库
R language Visual scatter plot graph, add labels to some data points in the graph, and always display all labels, even if they have too much overlap. Ggrep package helps
Oracle Chinese sorting Oracle Chinese field sorting
IDEA配置npm启动
7-1 linked list is also simple fina
A2L file parsing based on CAN bus (3)
为什么 BI 软件都搞不定关联分析?带你分析分析
Is it safe to make fund fixed investment on access letter?
How much does the mlperf list weigh when AI is named?
Use of websocket tool
《ClickHouse原理解析与应用实践》读书笔记(5)
达梦数据库udf实现
The origin of PTS, DTS and duration of audio and video packages
图扑软件数字孪生智慧风电系统
Tupu software digital twin smart wind power system
解决 contents have differences only in line separators
Find in MySQL_ in_ Detailed explanation of set() function usage
Why can't Bi software do correlation analysis? Take you to analyze