|
@@ -111,6 +111,7 @@ export default {
|
|
|
name:'MainPage',
|
|
|
data(){
|
|
|
return {
|
|
|
+ noAllowed:false, //未登录
|
|
|
num:-1,//题目计数
|
|
|
pickDVal:'1天', //时间控件默认值
|
|
|
allMoudles:[],
|
|
@@ -153,6 +154,13 @@ export default {
|
|
|
created() {
|
|
|
//const userInfo= JSON.parse(localStorage.getItem("userInfo"))
|
|
|
const userInfo = this.$store.state.pathInfo;
|
|
|
+ if(!userInfo.hospitalCode){ //用户数据丢失,刷新或本页面分享时,跳回登录页
|
|
|
+ this.noAllowed=true;
|
|
|
+ this.$router.push({
|
|
|
+ path:'/'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.userInfo = userInfo;
|
|
|
let tmpModule = moduleConfig(this.config,this.tmpAllMoudles);
|
|
|
this.allMoudles = tmpModule.data;
|
|
@@ -160,6 +168,7 @@ export default {
|
|
|
this.updata()
|
|
|
},
|
|
|
mounted(){
|
|
|
+ if(this.noAllowed)return;
|
|
|
this.$nextTick(()=>{
|
|
|
let bs = new BScroll('.wrapper', {
|
|
|
probeType: 3,
|