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

init token at main

上级 58fbe820
...@@ -36,13 +36,6 @@ export default { ...@@ -36,13 +36,6 @@ export default {
}, },
created() { created() {
const _this = this; const _this = this;
// if (this.$rocNative.isWeb) {
// cookies.set('conslToken', _this.token);
// _this.headerInfo.backMethod = '';
// _this.getProjectList();
// } else {
//
// }
_this.getUserInfo(); _this.getUserInfo();
}, },
mounted() { mounted() {
...@@ -62,14 +55,14 @@ export default { ...@@ -62,14 +55,14 @@ export default {
this.$rocNative.getUserInfo().then((params) => { this.$rocNative.getUserInfo().then((params) => {
this.token = params.userToken; this.token = params.userToken;
cookies.set('conslToken', this.token); cookies.set('conslToken', this.token);
this.getProjectList(); this.getProjectListMethod();
}); });
}, },
// 课程数据 // 课程数据
getProjectList() { getProjectListMethod() {
const params = { const params = {
token: this.token, token: cookies.get('conslToken'),
}; };
getProjectList(params).then((res) => { getProjectList(params).then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册