1
0
mirror of synced 2025-12-08 22:48:31 +08:00

fix app.js getUserInfo & update chooseMedia

This commit is contained in:
AYKM
2022-05-07 14:39:31 +08:00
parent cb622ca880
commit 17be5362bc
3 changed files with 15 additions and 10 deletions

View File

@@ -299,12 +299,13 @@ Component({
*/
upload() {
let that = this;
wx.chooseImage({
wx.chooseMedia({
count: 1,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: res => {
const tempFilePaths = res.tempFilePaths[0];
const tempFilePaths = res.tempFiles[0].tempFilePath;
that.pushImg(tempFilePaths);
},
fail: () => {

View File

@@ -125,7 +125,9 @@ App({
communityInfo: res.data.communityInfo,
globalFetching: false
});
var pages = getCurrentPages() //获取加载的页面
var currentPage = pages[pages.length - 1].route //获取当前页面的对象 修改数量可以获取之前跳转页面的地址
if (currentPage !== 'pages/zone/avatar') {
if (!res.data.userInfo.intact) {
wx.redirectTo({
url: '/pages/zone/supplement'
@@ -135,6 +137,7 @@ App({
url: '/pages/community/binding'
});
}
}
});
},

View File

@@ -299,12 +299,13 @@ Component({
*/
upload() {
let that = this;
wx.chooseImage({
wx.chooseMedia({
count: 1,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: res => {
const tempFilePaths = res.tempFilePaths[0];
const tempFilePaths = res.tempFiles[0].tempFilePath;
that.pushImg(tempFilePaths);
},
fail: () => {