|
|
@ -25,7 +25,7 @@ |
|
|
|
</Descriptions> --> |
|
|
|
|
|
|
|
<div class="bottom"> |
|
|
|
<ButtonGradient @click="confirm" class="title-button special-button"> |
|
|
|
<ButtonGradient @click.native="handleSubmit" :loading="submitting" class="title-button special-button"> |
|
|
|
一键发布 |
|
|
|
</ButtonGradient> |
|
|
|
<!-- <ButtonGradient class="title-button special-button"> |
|
|
@ -42,7 +42,7 @@ import Form from '@screen/components/FormConfig'; |
|
|
|
import CheckboxGroup from '@screen/components/FormConfig/components/ElCheckboxGroup.vue'; |
|
|
|
import Descriptions from '@screen/components/Descriptions.vue'; |
|
|
|
import { provideMixin } from "./../../mixin" |
|
|
|
import { method, result } from "lodash"; |
|
|
|
import request from "@/utils/request"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'ReleaseInformation', |
|
|
@ -70,6 +70,7 @@ export default { |
|
|
|
{ key: '3', label: '网站' }, |
|
|
|
{ key: '4', label: '新浪' }, |
|
|
|
], |
|
|
|
submitting: false, |
|
|
|
formList: [{ |
|
|
|
label: "发布内容:", |
|
|
|
key: "content", |
|
|
@ -90,13 +91,44 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async confirm(){ |
|
|
|
async handleSubmit(){ |
|
|
|
await this.$refs.FormMsgRef.validate() |
|
|
|
.then((res) => { |
|
|
|
console.log(res) |
|
|
|
.then(async (res) => { |
|
|
|
const {content,type} = res; |
|
|
|
if(content === null){ |
|
|
|
this.$message.warning(`未输入发布内容`); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(type.length === 0){ |
|
|
|
this.$message.warning(`未选择发布平台`); |
|
|
|
return; |
|
|
|
} |
|
|
|
// res.eventid = |
|
|
|
if(type.indexOf('1') !== -1){ |
|
|
|
res.phone = '13589019062' |
|
|
|
} |
|
|
|
res.eventId = this.detailData.id; |
|
|
|
this.submitting = true; |
|
|
|
|
|
|
|
await request({ |
|
|
|
url: `/business/sms/pushAll`, |
|
|
|
method: "post", |
|
|
|
data: res, |
|
|
|
}) |
|
|
|
.then((result) => { |
|
|
|
if (result.code != 200) return this.$message.error(result?.msg); |
|
|
|
this.$message.success("提交成功"); |
|
|
|
this.modelVisible = false; |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message.error("提交失败"); |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
this.submitting = false; |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log("catch"); |
|
|
|
console.log("catch"+err); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|