mirror of
https://github.com/chowa/ejyy.git
synced 2026-01-21 05:07:48 +08:00
fix app.js getUserInfo & update chooseMedia
This commit is contained in:
@@ -299,12 +299,13 @@ Component({
|
|||||||
*/
|
*/
|
||||||
upload() {
|
upload() {
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.chooseImage({
|
wx.chooseMedia({
|
||||||
count: 1,
|
count: 1,
|
||||||
|
mediaType: ['image'],
|
||||||
sizeType: ['original', 'compressed'],
|
sizeType: ['original', 'compressed'],
|
||||||
sourceType: ['album', 'camera'],
|
sourceType: ['album', 'camera'],
|
||||||
success: res => {
|
success: res => {
|
||||||
const tempFilePaths = res.tempFilePaths[0];
|
const tempFilePaths = res.tempFiles[0].tempFilePath;
|
||||||
that.pushImg(tempFilePaths);
|
that.pushImg(tempFilePaths);
|
||||||
},
|
},
|
||||||
fail: () => {
|
fail: () => {
|
||||||
|
|||||||
@@ -125,15 +125,18 @@ App({
|
|||||||
communityInfo: res.data.communityInfo,
|
communityInfo: res.data.communityInfo,
|
||||||
globalFetching: false
|
globalFetching: false
|
||||||
});
|
});
|
||||||
|
var pages = getCurrentPages() //获取加载的页面
|
||||||
if (!res.data.userInfo.intact) {
|
var currentPage = pages[pages.length - 1].route //获取当前页面的对象 修改数量可以获取之前跳转页面的地址
|
||||||
|
if (currentPage !== 'pages/zone/avatar') {
|
||||||
|
if (!res.data.userInfo.intact) {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '/pages/zone/supplement'
|
url: '/pages/zone/supplement'
|
||||||
});
|
});
|
||||||
} else if (res.data.communityInfo.list.length === 0) {
|
} else if (res.data.communityInfo.list.length === 0) {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '/pages/community/binding'
|
url: '/pages/community/binding'
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -299,12 +299,13 @@ Component({
|
|||||||
*/
|
*/
|
||||||
upload() {
|
upload() {
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.chooseImage({
|
wx.chooseMedia({
|
||||||
count: 1,
|
count: 1,
|
||||||
|
mediaType: ['image'],
|
||||||
sizeType: ['original', 'compressed'],
|
sizeType: ['original', 'compressed'],
|
||||||
sourceType: ['album', 'camera'],
|
sourceType: ['album', 'camera'],
|
||||||
success: res => {
|
success: res => {
|
||||||
const tempFilePaths = res.tempFilePaths[0];
|
const tempFilePaths = res.tempFiles[0].tempFilePath;
|
||||||
that.pushImg(tempFilePaths);
|
that.pushImg(tempFilePaths);
|
||||||
},
|
},
|
||||||
fail: () => {
|
fail: () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user