|
@@ -35,21 +35,7 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
- this.$http.defaults.headers.post["Content-Type"] = "application/json";
|
|
|
|
- if (!this.$http.defaults.headers.common["token"]) {
|
|
|
|
- // let that = this;
|
|
|
|
- const response = await this.$http.post("/api/ecs_core/auth/login", {
|
|
|
|
- domain: process.env.VUE_APP_LOGIN_DOMAIN,
|
|
|
|
- accountValue: process.env.VUE_APP_LOGIN_ACCOUNT_VALUE,
|
|
|
|
- password: process.env.VUE_APP_LOGIN_PASSWORD,
|
|
|
|
- accountType: process.env.VUE_APP_LOGIN_ACCOUNTTYPE
|
|
|
|
- });
|
|
|
|
- this.$http.defaults.headers.common["token"] = response.data.token;
|
|
|
|
- this.$http.defaults.headers.common["key"] = response.data.key;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
const res = await this.$http.get("/api/online_exam_course");
|
|
const res = await this.$http.get("/api/online_exam_course");
|
|
- // console.log(res);
|
|
|
|
|
|
|
|
this.courses = res.data.map(c => ({
|
|
this.courses = res.data.map(c => ({
|
|
courseName: c.courseName,
|
|
courseName: c.courseName,
|