# 修改头像功能实现
// 修改头像
chooseImage() {
uni.chooseImage({
count: 1, //默认9
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
success: (res) => {
this.userpic = res.tempFilePaths[0]
}
});
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10