update:个人CA申请入口打开 新增查询接口
update:法人CA使用vue3.0组合式api
This commit is contained in:
21
src/App.vue
21
src/App.vue
@@ -1,6 +1,23 @@
|
||||
<template>
|
||||
<router-view />
|
||||
<router-view v-if="isShow" />
|
||||
</template>
|
||||
|
||||
<style lang="less"></style>
|
||||
<script></script>
|
||||
<script>
|
||||
import { ref, provide, nextTick } from "vue";
|
||||
export default {
|
||||
setup() {
|
||||
const isShow = ref(true);
|
||||
provide("reload", () => {
|
||||
console.log("startReload");
|
||||
isShow.value = false;
|
||||
nextTick(() => {
|
||||
isShow.value = true;
|
||||
});
|
||||
});
|
||||
return {
|
||||
isShow
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -4,6 +4,7 @@ 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";
|
||||
import CA_Unit_composition from "../views/CA/UnitApply.composition.vue";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
@@ -29,6 +30,11 @@ const routes = [
|
||||
path: "unit",
|
||||
component: CA_Unit,
|
||||
name: "企业数字证书申领"
|
||||
},
|
||||
{
|
||||
path: "composition",
|
||||
component: CA_Unit_composition,
|
||||
name: "企业数字证书申领新"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ export async function get(url, params) {
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.status == "401") {
|
||||
return new {
|
||||
return {
|
||||
errorCode: -1,
|
||||
errorMsg: "身份认证失败"
|
||||
}();
|
||||
};
|
||||
} else {
|
||||
return new {
|
||||
return {
|
||||
errorCode: -1,
|
||||
errorMsg: "请求出错"
|
||||
}();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,15 +23,15 @@ export async function post(url, data) {
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.status == "401") {
|
||||
return new {
|
||||
return {
|
||||
errorCode: -1,
|
||||
errorMsg: "身份认证失败"
|
||||
}();
|
||||
};
|
||||
} else {
|
||||
return new {
|
||||
return {
|
||||
errorCode: -1,
|
||||
errorMsg: "请求出错"
|
||||
}();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,3 +3,10 @@ export function delay(ms) {
|
||||
setTimeout(reslove, ms);
|
||||
});
|
||||
}
|
||||
export function toBit(str) {
|
||||
if (!/^[01]+$/.test(str)) throw new Error("not a valid bit value");
|
||||
return str
|
||||
.split("")
|
||||
.reverse()
|
||||
.reduce((pre, cur, idx) => pre + (1 * cur ? Math.pow(2, cur * idx) : 0), 0);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="ca_index">
|
||||
<Space>
|
||||
<Button type="primary" disabled>
|
||||
<Button type="primary">
|
||||
<router-link to="/ca/user"> 个人数字证书申领入口 </router-link>
|
||||
</Button>
|
||||
<Button>
|
||||
|
||||
30
src/views/CA/Result.vue
Normal file
30
src/views/CA/Result.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<Result
|
||||
status="success"
|
||||
title="您的企业已经完成数字证书申领"
|
||||
sub-title="已经申领过数字证书的企业无法再次申领,如需补办请联系管理人员"
|
||||
>
|
||||
<template #extra>
|
||||
<!-- <Button type="primary">
|
||||
申请补办
|
||||
</Button> -->
|
||||
<Button @click="router.back()"> 返回 </Button>
|
||||
</template>
|
||||
</Result>
|
||||
</template>
|
||||
<script>
|
||||
import { Result, Button } from "ant-design-vue";
|
||||
import { useRouter } from "vue-router";
|
||||
export default {
|
||||
components: {
|
||||
Result,
|
||||
Button
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
return {
|
||||
router
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,7 @@
|
||||
<Button type="primary" @click="onSubmit" v-if="!disableEdit"
|
||||
>前往申领</Button
|
||||
>
|
||||
<Button type="primary" @click="goCertUrl" v-if="disableEdit"
|
||||
<Button type="primary" @click="getStatus" v-if="disableEdit"
|
||||
>继续申领流程</Button
|
||||
>
|
||||
<Button style="margin-left: 10px" @click="showDrawer"
|
||||
@@ -133,6 +133,26 @@ export default {
|
||||
} else {
|
||||
message.error(res.errorMsg);
|
||||
}
|
||||
},
|
||||
async getStatus() {
|
||||
const res = await get("/api2/CA/UserApplyGetStatus", {
|
||||
id: this.currentApplyId
|
||||
});
|
||||
if (res.errorCode == 0) {
|
||||
const status = res.data;
|
||||
message.info(
|
||||
"当前状态:" +
|
||||
[
|
||||
"待审核,请耐心等待结果",
|
||||
"审核通过,请等待授权通过",
|
||||
"已授权,请等待证书发放",
|
||||
"已发放,申领已完成",
|
||||
"已拒绝,请重新申请或联系管理员"
|
||||
][status]
|
||||
);
|
||||
} else {
|
||||
await this.goCertUrl();
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
Reference in New Issue
Block a user