update:个人CA申请入口打开 新增查询接口
update:法人CA使用vue3.0组合式api
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user