|
@@ -52,10 +52,30 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- const res = await this.$http.post("/api/ecs_core/verifyCode/register", {
|
|
|
|
- user_id: localStorage.getItem("uuidForEcs"),
|
|
|
|
- client_type: "Web",
|
|
|
|
- });
|
|
|
|
|
|
+ let res = null;
|
|
|
|
+ try {
|
|
|
|
+ res = await this.$http.post("/api/ecs_core/verifyCode/register", {
|
|
|
|
+ user_id: localStorage.getItem("uuidForEcs"),
|
|
|
|
+ client_type: "Web",
|
|
|
|
+ });
|
|
|
|
+ } catch (error) {
|
|
|
|
+ createLog({
|
|
|
|
+ currentPage: "极验",
|
|
|
|
+ action: "register接口调用失败",
|
|
|
|
+ errorJSON: JSON.stringify(error, (key, value) =>
|
|
|
|
+ key === "token" ? "" : value
|
|
|
|
+ ),
|
|
|
|
+ errorName: error.name,
|
|
|
|
+ errorMessage: error.message,
|
|
|
|
+ errorStack: error.stack,
|
|
|
|
+ });
|
|
|
|
+ this.$Message.error({
|
|
|
|
+ content: "资源注册失败,请关闭程序,检查网络状况后重试。",
|
|
|
|
+ duration: 5 * 60,
|
|
|
|
+ closable: true,
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
// console.log(res);
|
|
// console.log(res);
|
|
const data = res.data;
|
|
const data = res.data;
|
|
if (!data.success) {
|
|
if (!data.success) {
|