版本预发布

This commit is contained in:
孟帅
2023-02-08 20:29:34 +08:00
parent f11c7c5bf2
commit 2068d05c93
269 changed files with 16122 additions and 12075 deletions

View File

@@ -1,71 +0,0 @@
<template>
<n-grid cols="2 s:2 m:2 l:3 xl:3 2xl:3" responsive="screen">
<n-grid-item>
<n-form :label-width="80" :model="formValue" :rules="rules" ref="formRef">
<n-form-item label="昵称" path="name">
<n-input v-model:value="formValue.name" placeholder="请输入昵称" />
</n-form-item>
<n-form-item label="邮箱" path="email">
<n-input placeholder="请输入邮箱" v-model:value="formValue.email" />
</n-form-item>
<n-form-item label="联系电话" path="mobile">
<n-input placeholder="请输入联系电话" v-model:value="formValue.mobile" />
</n-form-item>
<n-form-item label="联系地址" path="address">
<n-input v-model:value="formValue.address" type="textarea" placeholder="请输入联系地址" />
</n-form-item>
<div>
<n-space>
<n-button type="primary" @click="formSubmit">更新基本信息</n-button>
</n-space>
</div>
</n-form>
</n-grid-item>
</n-grid>
</template>
<script lang="ts" setup>
import { reactive, ref } from 'vue';
import { useMessage } from 'naive-ui';
const rules = {
name: {
required: true,
message: '请输入昵称',
trigger: 'blur',
},
email: {
required: true,
message: '请输入邮箱',
trigger: 'blur',
},
mobile: {
required: true,
message: '请输入联系电话',
trigger: 'input',
},
};
const formRef: any = ref(null);
const message = useMessage();
const formValue = reactive({
name: '',
mobile: '',
email: '',
address: '',
});
function formSubmit() {
formRef.value.validate((errors) => {
if (!errors) {
message.success('验证成功');
} else {
message.error('验证失败,请填写完整信息');
}
});
}
</script>

View File

@@ -1,52 +0,0 @@
<template>
<n-grid cols="1" responsive="screen" class="-mt-5">
<n-grid-item>
<n-list>
<n-list-item>
<template #suffix>
<n-button type="primary" text>修改</n-button>
</template>
<n-thing title="账户密码">
<template #description
><span class="text-gray-400">绑定手机和邮箱并设置密码帐号更安全</span></template
>
</n-thing>
</n-list-item>
<n-list-item>
<template #suffix>
<n-button type="primary" text>修改</n-button>
</template>
<n-thing title="绑定手机">
<template #description
><span class="text-gray-400">已绑定手机号+86189****4877</span></template
>
</n-thing>
</n-list-item>
<n-list-item>
<template #suffix>
<n-button type="primary" text>设置</n-button>
</template>
<n-thing title="密保问题">
<template #description
><span class="text-gray-400"
>未设置密保问题密保问题可有效保护账户安全</span
></template
>
</n-thing>
</n-list-item>
<n-list-item>
<template #suffix>
<n-button type="primary" text>修改</n-button>
</template>
<n-thing title="个性域名">
<template #description
><span class="text-gray-400">已绑定域名https://hotgo.facms.cn</span></template
>
</n-thing>
</n-list-item>
</n-list>
</n-grid-item>
</n-grid>
</template>
<script lang="ts" setup></script>

View File

@@ -1,76 +0,0 @@
<template>
<div>
<n-grid :x-gap="24">
<n-grid-item span="6">
<n-card :bordered="false" size="small" class="proCard">
<n-thing
class="thing-cell"
v-for="item in typeTabList"
:key="item.key"
:class="{ 'thing-cell-on': type === item.key }"
@click="switchType(item)"
>
<template #header>{{ item.name }}</template>
<template #description>{{ item.desc }}</template>
</n-thing>
</n-card>
</n-grid-item>
<n-grid-item span="18">
<n-card :bordered="false" size="small" :title="typeTitle" class="proCard">
<BasicSetting v-if="type === 1" />
<SafetySetting v-if="type === 2" />
</n-card>
</n-grid-item>
</n-grid>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import BasicSetting from './BasicSetting.vue';
import SafetySetting from './SafetySetting.vue';
const typeTabList = [
{
name: '基本设置',
desc: '个人账户信息设置',
key: 1,
},
{
name: '安全设置',
desc: '密码,邮箱等设置',
key: 2,
},
];
const type = ref(1);
const typeTitle = ref('基本设置');
function switchType(e) {
type.value = e.key;
typeTitle.value = e.name;
}
</script>
<style lang="less" scoped>
.thing-cell {
margin: 0 -16px 10px;
padding: 5px 16px;
&:hover {
background: #f3f3f3;
cursor: pointer;
}
}
.thing-cell-on {
background: #f0faff;
color: #2d8cf0;
::v-deep(.n-thing-main .n-thing-header .n-thing-header__title) {
color: #2d8cf0;
}
&:hover {
background: #f0faff;
}
}
</style>

View File

@@ -27,6 +27,10 @@
/>
</n-form-item>
<n-form-item label="网站域名" path="basicDomain">
<n-input v-model:value="formValue.basicDomain" placeholder="请输入网站域名" />
</n-form-item>
<n-form-item label="用户是否可注册开关" path="basicRegisterSwitch">
<n-radio-group
v-model:value="formValue.basicRegisterSwitch"
@@ -122,6 +126,7 @@
const formValue = ref({
basicName: 'HotGo',
basicLogo: '',
basicDomain: 'https://hotgo.facms.cn',
basicIcpCode: '',
basicLoginCode: 0,
basicRegisterSwitch: 1,

View File

@@ -35,6 +35,40 @@
<n-input v-model:value="formValue.smtpAdminMailbox" placeholder="" />
</n-form-item>
<n-divider title-placement="left">发信限制</n-divider>
<n-form-item label="最小发送间隔" path="smtpMinInterval">
<n-input-number
:show-button="false"
placeholder="请输入"
v-model:value="formValue.smtpMinInterval"
>
<template #suffix> </template>
</n-input-number>
<template #feedback> 同地址</template>
</n-form-item>
<n-form-item label="IP最大发送次数" path="smtpMaxIpLimit">
<n-input-number v-model:value="formValue.smtpMaxIpLimit" placeholder="" />
<template #feedback> 同IP每天最大允许发送次数 </template>
</n-form-item>
<n-form-item label="验证码有效期" path="smtpCodeExpire">
<n-input-number
:show-button="false"
placeholder="请输入"
v-model:value="formValue.smtpCodeExpire"
>
<template #suffix> </template>
</n-input-number>
</n-form-item>
<n-form-item label="邮件模板" path="smtpTemplate">
<n-dynamic-input
v-model:value="formValue.smtpTemplate"
preset="pair"
key-placeholder="事件KEY"
value-placeholder="模板路径"
/>
</n-form-item>
<div>
<n-space>
<n-button type="primary" @click="formSubmit">保存更新</n-button>
@@ -63,7 +97,12 @@
class="py-4"
>
<n-form-item label="接收邮箱" path="to">
<n-input placeholder="多个用;隔开" v-model:value="formParams.to" :required="true" />
<n-input
type="textarea"
placeholder="多个用;隔开"
v-model:value="formParams.to"
:required="true"
/>
</n-form-item>
</n-form>
@@ -84,10 +123,8 @@
const group = ref('smtp');
const show = ref(false);
const showModal = ref(false);
const formBtnLoading = ref(false);
const formParams = ref({ to: '' });
const rules = {
@@ -108,6 +145,10 @@
smtpPass: '',
smtpSendName: 'HotGo',
smtpAdminMailbox: '',
smtpMinInterval: 60,
smtpMaxIpLimit: 10,
smtpCodeExpire: 600,
smtpTemplate: null,
});
function confirmForm(e) {
@@ -134,15 +175,10 @@
function formSubmit() {
formRef.value.validate((errors) => {
if (!errors) {
updateConfig({ group: group.value, list: formValue.value })
.then((res) => {
console.log('res:' + JSON.stringify(res));
message.success('更新成功');
load();
})
.catch((error) => {
message.error(error.toString());
});
updateConfig({ group: group.value, list: formValue.value }).then((res) => {
message.success('更新成功');
load();
});
} else {
message.error('验证失败,请填写完整信息');
}
@@ -159,13 +195,11 @@
getConfig({ group: group.value })
.then((res) => {
show.value = false;
// state.formValue.watermarkClarity = res;
res.list.smtpTemplate = JSON.parse(res.list.smtpTemplate);
formValue.value = res.list;
console.log('res:' + JSON.stringify(res));
})
.catch((error) => {
.finally(() => {
show.value = false;
message.error(error.toString());
});
});
}

View File

@@ -3,7 +3,6 @@
<n-spin :show="show" description="正在获取配置...">
<n-grid cols="2 s:2 m:2 l:2 xl:2 2xl:2" responsive="screen">
<n-grid-item>
<n-divider title-placement="left">通用配置</n-divider>
<n-form :label-width="100" :model="formValue" :rules="rules" ref="formRef">
<n-form-item label="默认驱动" path="smsDrive">
<n-select
@@ -13,6 +12,7 @@
/>
</n-form-item>
<n-divider title-placement="left">发信限制</n-divider>
<n-form-item label="最小发送间隔" path="smsMinInterval">
<n-input-number
:show-button="false"
@@ -184,8 +184,6 @@
function formSubmit() {
formRef.value.validate((errors) => {
if (!errors) {
console.log('formValue.value:' + JSON.stringify(formValue.value));
updateConfig({ group: group.value, list: formValue.value })
.then((res) => {
console.log('res:' + JSON.stringify(res));

View File

@@ -3,7 +3,6 @@
<n-spin :show="show" description="正在获取配置...">
<n-grid cols="2 s:2 m:2 l:2 xl:2 2xl:2" responsive="screen">
<n-grid-item>
<n-divider title-placement="left">通用配置</n-divider>
<n-form :label-width="100" :model="formValue" :rules="rules" ref="formRef">
<n-form-item label="默认驱动" path="uploadDrive">
<n-select
@@ -13,6 +12,7 @@
/>
</n-form-item>
<n-divider title-placement="left">上传限制</n-divider>
<n-form-item label="图片大小限制" path="uploadImageSize">
<n-input-number
:show-button="false"

View File

@@ -21,9 +21,9 @@
<ThemeSetting v-if="type === 2" />
<RevealSetting v-if="type === 3" />
<EmailSetting v-if="type === 4" />
<SmsSetting v-if="type === 5" />
<UploadSetting v-if="type === 8" />
<GeoSetting v-if="type === 9" />
<SmsSetting v-if="type === 10" />
</n-card>
</n-grid-item>
</n-grid>
@@ -59,11 +59,11 @@
desc: '系统邮件设置',
key: 4,
},
// {
// name: '客服设置',
// desc: '系统客服设置',
// key: 5,
// },
{
name: '短信配置',
desc: '短信验证码平台',
key: 5,
},
// {
// name: '下游配置',
// desc: '默认设置和权限屏蔽',
@@ -84,11 +84,6 @@
desc: '配置地理位置工具',
key: 9,
},
{
name: '短信配置',
desc: '短信验证码平台',
key: 10,
},
];
export default defineComponent({
components: {