提交 731d00ec 编写于 作者: 张磊's avatar 张磊

init token at main

上级 81ff192e
......@@ -51,21 +51,40 @@ export default {
return {
cIndex: 0,
tapList: ['总体概况', '人群分析', '课程分析', '考试分析', '学习效果分析'],
toHeaderDis: '56px',
toHeaderDis: 0,
};
},
mounted() {
const headerHeight = sessionStorage.getItem('headerHeight') || 0;
console.log('headerHeight--', headerHeight);
this.toHeaderDis = Number(headerHeight) + 41 + 'px';
watch: {
needFixed: {
handler(newVal) {
if (newVal) {
this.setHeight();
} else {
this.toHeaderDis = '0px';
}
},
deep: false,
},
},
mounted() {},
methods: {
clickTab(index) {
this.cIndex = index;
this.$emit('tabClicked', index);
// this.scrollTabs(index);
},
setHeight() {
const ua = navigator.userAgent.toLowerCase();
const isAndroid = /(Android)/i.test(ua);
if (isAndroid) {
this.toHeaderDis = '85px';
} else {
this.toHeaderDis = '56px';
}
console.log('-this.toHeaderDis-', isAndroid, this.toHeaderDis);
},
},
};
</script>
......
......@@ -248,7 +248,6 @@ export default {
watch: {
projectId(newVal) {
this.queryParams.projectId = newVal;
// this.getProvinceData(this.queryParams);
},
provinceList(newVal) {
newVal[0].selected = true;
......@@ -276,7 +275,9 @@ export default {
if (this.$route && this.$route.query) {
const cQuery = this.$route.query;
this.queryParams.projectId = cQuery.projectId || '';
this.getProvinceData(this.queryParams);
if (this.queryParams.projectId) {
this.getProvinceData(this.queryParams);
}
}
},
mounted() {},
......
......@@ -421,19 +421,10 @@ export default {
this.queryGDParams.projectId = this.projectId;
this.CNTParams.projectId = this.projectId;
this.queryParams.projectId = this.projectId;
if (this.$rocNative.isWeb) {
// this.setUserToken(this.token);
// cookies.set('conslToken', this.token);
// this.setProjectId(this.projectId);
} else {
// this.getUserInfo();
}
this.getUserInfo();
// this.getProjectInfo(this.queryParams);
},
mounted() {
// this.getProjectInfo(this.queryParams);
window.addEventListener(
'scroll',
() => {
......@@ -784,7 +775,9 @@ export default {
cookies.set('conslToken', params.userToken);
this.setUserToken(this.token);
this.setProjectId(this.projectId);
this.getProjectInfo(this.queryParams);
if (this.queryParams.projectId) {
this.getProjectInfo(this.queryParams);
}
});
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册