diff --git a/build_script/copy_dist.js b/build_script/copy_dist.js new file mode 100644 index 0000000..e69de29 diff --git a/src/main.js b/src/main.js index 2c15420..22ae997 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,8 @@ import { createApp } from "vue"; import App from "./App.vue"; import router from "./router"; - +import { Form } from "ant-design-vue"; createApp(App) .use(router) + .use(Form) .mount("#app"); diff --git a/src/router/index.js b/src/router/index.js index e105e21..c282b28 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,5 +1,6 @@ import { createRouter, createWebHashHistory } from "vue-router"; import Home from "../views/Home.vue"; +import CA from "../views/CA.vue"; import CA_Index from "../views/CA/Index.vue"; import CA_User from "../views/CA/UserApply.vue"; import CA_Unit from "../views/CA/UnitApply.vue"; @@ -12,15 +13,22 @@ const routes = [ }, { path: "/CA", - component: CA_Index, + component: CA, + name: "数字证书申领", children: [ + { + path: "", + component: CA_Index + }, { path: "user", - component: CA_User + component: CA_User, + name: "个人数字证书申领" }, { path: "unit", - component: CA_Unit + component: CA_Unit, + name: "企业数字证书申领" } ] } diff --git a/src/services/http.js b/src/services/http.js index f03b361..c914785 100644 --- a/src/services/http.js +++ b/src/services/http.js @@ -1,7 +1,28 @@ +import { message } from "ant-design-vue"; import axios from "axios"; export async function get(url, params) { var response = await axios.get(url, { params }); if (response.status == 200) { return response.data; + } else if (response.status == 401) { + message.warning( + "未登录或身份认证信息已过期", + (onclose = () => { + top && top.login(); + }) + ); + } +} +export async function post(url, data) { + var response = await axios.post(url, data); + if (response.status == 200) { + return response.data; + } else if (response.status == 401) { + message.warning( + "未登录或身份认证信息已过期", + (onclose = () => { + top && top.login(); + }) + ); } } diff --git a/src/views/CA.vue b/src/views/CA.vue new file mode 100644 index 0000000..7a87d6a --- /dev/null +++ b/src/views/CA.vue @@ -0,0 +1,14 @@ + + diff --git a/src/views/CA/Index.vue b/src/views/CA/Index.vue index 63cdb44..4267b5d 100644 --- a/src/views/CA/Index.vue +++ b/src/views/CA/Index.vue @@ -1,19 +1,23 @@ diff --git a/src/views/CA/UserApply.vue b/src/views/CA/UserApply.vue index fe77f94..bb38c20 100644 --- a/src/views/CA/UserApply.vue +++ b/src/views/CA/UserApply.vue @@ -1,7 +1,142 @@ - - + + diff --git a/vue.config.js b/vue.config.js index 65a4310..2901c27 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,5 @@ module.exports = { - publicPath: "/www", + publicPath: "/spa", css: { loaderOptions: { less: {