mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 10:56:46 +08:00
Merge branch 'master' of https://codeup.aliyun.com/648097ddb583fece2f059e59/vue/fe-manage
This commit is contained in:
28
src/main.js
28
src/main.js
@@ -21,7 +21,8 @@ import {USER_INFO, USER_PERMISSION, VALIDATE_TOKEN} from "@/api/apis";
|
||||
import * as api1 from "@/api/index1";
|
||||
import {getCookieForName} from "@/api/method";
|
||||
import components from './components'
|
||||
// import axios from 'axios'
|
||||
import axios from 'axios'
|
||||
import Cookies from "vue-cookies";
|
||||
// axios.defaults.withCredentials = true;
|
||||
// import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||
const app = createApp(App)
|
||||
@@ -69,9 +70,32 @@ async function initDict(key) {
|
||||
store.commit("SET_DICT", {key, data: list});
|
||||
}
|
||||
const getDictList = (param) => api1.getDictTree({code: param,}).then((res) => res.data.data);
|
||||
const initDictTree = (key) => {
|
||||
axios({
|
||||
method: "get",
|
||||
url: "/systemapi/xboe/type/tree-list",
|
||||
params: {
|
||||
sysResType: "1",
|
||||
status: "1",
|
||||
},
|
||||
headers: {
|
||||
"XBOR-Access-token": Cookies.get("token"),
|
||||
},
|
||||
}).then(
|
||||
(res) => {
|
||||
console.log(res.data.result,'课程分类接口')
|
||||
store.commit("SET_DICT", {key, data: res.data.result});
|
||||
},
|
||||
(err) => {
|
||||
message.error(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async function init() {
|
||||
initDict("content_type"); //内容分类
|
||||
|
||||
// initDict("content_type"); //内容分类
|
||||
initDictTree("content_type"); //内容分类,换成type/tree-list接口
|
||||
initDict("project_level"); //项目级别
|
||||
initDict("project_sys"); //培训分类
|
||||
initDict("project_pic"); //项目封面
|
||||
|
||||
Reference in New Issue
Block a user