当前位置:网站首页>Get wechat avatar and nickname with uniapp
Get wechat avatar and nickname with uniapp
2022-07-05 19:06:00 【gblfy】
<view class="userInformation">
<!-- User defined Avatar -->
<view class="userPortrait">
<image :src="yonghuwx.avatarUrl" mode="widthFix"></image>
</view>
<view class="userLook" >
<!-- User defined name -->
<view class="user-title clamp">{
{
yonghuwx.nickName}}</view>
<view class="user-edit"> Check your profile </view>
</view>
</view>
onLoad(){
let that = this;
uni.login({
provider:'weixin',
success:function(loginRes) {
// Get user information
uni.getUserInfo({
provider:'weixin',
success:function(infoRes){
that.userInfo= infoRes.userInfo
console.log(that.userInfo)
}
});
}
});
}
边栏推荐
- Oracle日期格式转换 to_date,to_char,to_timetamp 相互转换
- 2022 Alibaba Android advanced interview questions sharing, 2022 Alibaba hand Taobao Android interview questions
- 2022最新大厂Android面试真题解析,Android开发必会技术
- Go语言 | 03 数组、指针、切片用法
- AI Open2022|基于异质信息网络的推荐系统综述:概念,方法,应用与资源
- #夏日挑战赛# HarmonyOS - 实现消息通知功能
- ROS安装报错 sudo: rosdep:找不到命令
- 技术分享 | 常见接口协议解析
- 华律网牵手观测云,上线系统全链路可观测平台
- C language makes it easy to add, delete, modify and check the linked list "suggested collection"
猜你喜欢
Interviewer: what is the difference between redis expiration deletion strategy and memory obsolescence strategy?
[detailed explanation of AUTOSAR 14 startup process]
2022全网最全的腾讯后台自动化测试与持续部署实践【万字长文】
The basic grammatical structure of C language
Ten years at sea: old and new relay, dark horse rising
Blue sky drawing bed Apple quick instructions
自动化测试的好处
鱼和熊掌可以兼得!天翼云弹性裸金属一招鲜!
蚂蚁集团开源可信隐私计算框架「隐语」:开放、通用
图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统
随机推荐
JS解力扣每日一题(十二)——556. 下一个更大元素 III(2022-7-3)
Tianyi cloud understands enterprise level data security in this way
从外卖点单浅谈伪需求
Why can't Bi software do correlation analysis? Take you to analyze
在线协作产品哪家强?微软 Loop 、Notion、FlowUs
Go语言 | 02 for循环及常用函数的使用
深入底层C源码讲透Redis核心设计原理
#夏日挑战赛#数据库学霸笔记,考试/面试快速复习~
达梦数据库udf实现
Overview of video self supervised learning
Rse2020/ cloud detection: accurate cloud detection of high-resolution remote sensing images based on weak supervision and deep learning
自动化测试的好处
Technology sharing | interface testing value and system
Low code practice of xtransfer, a cross-border payment platform: how to integrate with other medium-sized platforms is the core
golang通过指针for...range实现切片中元素的值的更改
技术分享 | 常见接口协议解析
Go deep into the underlying C source code and explain the core design principles of redis
中文版Postman?功能真心强大!
视频融合云平台EasyCVR增加多级分组,可灵活管理接入设备
How to write good code defensive programming