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

init token at main

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