Commit 0c9104fd by 前端

Merge branch 'hotfix_v1.2.1' into 'master'

上线合并

See merge request !4
2 parents 80f00eb0 54737ae4
...@@ -104,6 +104,8 @@ service.interceptors.response.use( ...@@ -104,6 +104,8 @@ service.interceptors.response.use(
localStorage.removeItem("sessionId"); localStorage.removeItem("sessionId");
const [href] = window.location.href.split("/#/"); const [href] = window.location.href.split("/#/");
location.href = `${href}/#/login`; location.href = `${href}/#/login`;
} else {
Message.error(res.message || res.msg || "出错了,请联系管理员");
} }
// Message(res.message) // Message(res.message)
break; break;
......
...@@ -58,6 +58,12 @@ const getRiskRef = (el: any, id: number) => { ...@@ -58,6 +58,12 @@ const getRiskRef = (el: any, id: number) => {
riskRefList.value[id] = el; riskRefList.value[id] = el;
} }
}; };
// 发布时间改变
const handleChange = (val: string) => {
if (val == '1') {
form.systemPublishTime = ''
}
}
/** 提交表单 */ /** 提交表单 */
const handleSubmit = async () => { const handleSubmit = async () => {
await nextTick(); await nextTick();
...@@ -424,7 +430,7 @@ const onBeforeRemove = (fileItem: FileItem, modelName: string) => { ...@@ -424,7 +430,7 @@ const onBeforeRemove = (fileItem: FileItem, modelName: string) => {
label="发布时间" label="发布时间"
:rules="[{ required: true, message: '发布时间必填' }]" :rules="[{ required: true, message: '发布时间必填' }]"
> >
<a-radio-group v-model="form.sendType"> <a-radio-group v-model="form.sendType" @change="handleChange">
<a-radio value="1">即时发布</a-radio> <a-radio value="1">即时发布</a-radio>
<a-radio value="2">定时发布</a-radio> <a-radio value="2">定时发布</a-radio>
</a-radio-group> </a-radio-group>
......
...@@ -39,7 +39,12 @@ const formRef = ref(); ...@@ -39,7 +39,12 @@ const formRef = ref();
onBeforeMount(() => { onBeforeMount(() => {
if (query.value.id) findById(); if (query.value.id) findById();
}); });
// 发布时间改变
const handleRadioChange = (val: string) => {
if (val == '1') {
form.value.publishTime = ''
}
}
/** 获取详情 */ /** 获取详情 */
const findById = async () => { const findById = async () => {
const id = query.value.id; const id = query.value.id;
...@@ -271,7 +276,7 @@ onBeforeUnmount(() => { ...@@ -271,7 +276,7 @@ onBeforeUnmount(() => {
label="发布时间" label="发布时间"
:rules="[{ required: true, message: '发布时间必填' }]" :rules="[{ required: true, message: '发布时间必填' }]"
> >
<a-radio-group v-model="form.publishType"> <a-radio-group v-model="form.publishType" @change="handleRadioChange">
<a-radio value="1">即时发布</a-radio> <a-radio value="1">即时发布</a-radio>
<a-radio value="2">定时发布</a-radio> <a-radio value="2">定时发布</a-radio>
</a-radio-group> </a-radio-group>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!