mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore:
This commit is contained in:
@@ -72,3 +72,10 @@ export async function SysSettingsSave(data: SysSettings) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export async function TestProxy() {
|
||||
return await request({
|
||||
url: apiPrefix + "/testProxy",
|
||||
method: "post"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="HTTPS代理" :name="['private', 'httpsProxy']" :rules="urlRules">
|
||||
<a-input v-model:value="formState.private.httpsProxy" placeholder="http://192.168.1.2:18010/" />
|
||||
<div class="flex">
|
||||
<a-input v-model:value="formState.private.httpsProxy" placeholder="http://192.168.1.2:18010/" />
|
||||
<a-button class="ml-5" type="primary" title="保存后,再点击测试" @click="testProxy">测试</a-button>
|
||||
</div>
|
||||
<div class="helper">一般这两个代理填一样的</div>
|
||||
</a-form-item>
|
||||
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
|
||||
@@ -96,6 +99,15 @@ async function stopOtherUserTimer() {
|
||||
message: "停止成功"
|
||||
});
|
||||
}
|
||||
|
||||
async function testProxy() {
|
||||
const res = await api.TestProxy();
|
||||
const content = `测试google:${res.google === true ? "成功" : "失败" + res.google},测试百度:${res.baidu === true ? "成功" : "失败:" + res.baidu}`;
|
||||
notification.success({
|
||||
message: "测试完成",
|
||||
description: content
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
Reference in New Issue
Block a user