fix app.js getUserInfo & update chooseMedia
This commit is contained in:
@@ -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: () => {
|
||||
|
||||
@@ -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'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -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: () => {
|
||||
|
||||
Reference in New Issue
Block a user