|
@@ -1,6 +1,7 @@
|
|
import { commonConfig } from '@/common/config.js';
|
|
import { commonConfig } from '@/common/config.js';
|
|
import {againToken} from '../utils/againToken.js'
|
|
import {againToken} from '../utils/againToken.js'
|
|
import { showFullScreenLoading , tryHideFullScreenLoading } from '../utils/loading.js'
|
|
import { showFullScreenLoading , tryHideFullScreenLoading } from '../utils/loading.js'
|
|
|
|
+let showModal = false;
|
|
// 此vm参数为页面的实例,可以通过它引用vuex中的变量
|
|
// 此vm参数为页面的实例,可以通过它引用vuex中的变量
|
|
module.exports = (vm) => {
|
|
module.exports = (vm) => {
|
|
// 初始化请求配置
|
|
// 初始化请求配置
|
|
@@ -67,6 +68,8 @@ module.exports = (vm) => {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
tryHideFullScreenLoading()
|
|
tryHideFullScreenLoading()
|
|
|
|
+ if(showModal){return}
|
|
|
|
+ showModal = true;
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
content: '你需要登录后,才可使用此功能!',
|
|
content: '你需要登录后,才可使用此功能!',
|
|
@@ -80,8 +83,15 @@ module.exports = (vm) => {
|
|
// console.log('success');
|
|
// console.log('success');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- uni.navigateBack()
|
|
|
|
|
|
+ console.log('pages',pages);
|
|
|
|
+ let pages = getCurrentPages();
|
|
|
|
+ if(pages.length>1){
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ complete() {
|
|
|
|
+ showModal = false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|