|
@@ -74,8 +74,6 @@ export default {
|
|
|
created() {
|
|
|
this.env = process.env.VUE_APP_ENV;
|
|
|
this.initFun();
|
|
|
- // this.getLanXinSignature();
|
|
|
- this.getLanXinCode();
|
|
|
},
|
|
|
activated() {
|
|
|
this.setLanXinNavigator();
|
|
@@ -103,25 +101,33 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 初始化
|
|
|
- initFun() {
|
|
|
+ async initFun() {
|
|
|
// 获取所有用户
|
|
|
- this.$_http
|
|
|
- .get(this.$_API.JTXT_GET_USER_ADMIN_USERS)
|
|
|
- .then(res => {
|
|
|
- this.$store.commit("updateUserItemStore", {
|
|
|
- field: "userInfo",
|
|
|
- value: res.data.content[0]
|
|
|
+ if (this.env === "test") {
|
|
|
+ // 从蓝信获取用户信息
|
|
|
+ // this.getLanXinSignature();
|
|
|
+ console.log("-从蓝信获取用户信息-");
|
|
|
+ this.getLanXinCode();
|
|
|
+ } else {
|
|
|
+ console.log("-从本地获取用户信息-");
|
|
|
+ await this.$_http
|
|
|
+ .get(this.$_API.JTXT_GET_USER_ADMIN_USERS)
|
|
|
+ .then(res => {
|
|
|
+ this.$store.commit("updateUserItemStore", {
|
|
|
+ field: "userInfo",
|
|
|
+ value: res.data.content[0]
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$store.commit("toggleLoading", false);
|
|
|
});
|
|
|
- // 获取所有收藏
|
|
|
- this.getCollection();
|
|
|
- // 获取所有考试历史
|
|
|
- this.getExamHistory();
|
|
|
- // 查询工作信息
|
|
|
- this.getEngineeringWorkList();
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$store.commit("toggleLoading", false);
|
|
|
- });
|
|
|
+ }
|
|
|
+ // 获取所有收藏
|
|
|
+ this.getCollection();
|
|
|
+ // 获取所有考试历史
|
|
|
+ this.getExamHistory();
|
|
|
+ // 查询工作信息
|
|
|
+ this.getEngineeringWorkList();
|
|
|
this.activeTabName = 0;
|
|
|
this.onChangeTabFun(this.activeTabName);
|
|
|
},
|