no message
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
<div class="asterisk">*</div>
|
||||
</div>
|
||||
|
||||
<div class="title-box item-input-box flexacenter"><el-input v-model="info.subject" placeholder="给你的面经帖起一个吸引的标题吧"></el-input></div>
|
||||
<div class="title-box item-input-box flexacenter"><el-input v-model="info.subject" placeholder="给你的面经帖起一个吸引的标题吧" show-word-limit maxlength="80"></el-input></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="visible-box flexacenter" @click="cutVisible()">
|
||||
@@ -87,7 +87,7 @@
|
||||
<div class="asterisk">*</div>
|
||||
</div>
|
||||
<div class="course-box">
|
||||
<el-input v-model="info.message" type="textarea" autosize placeholder="例如:项目介绍、面试时长、面试官、问题QA、需要注意的地方"></el-input>
|
||||
<el-input v-model="info.message" type="textarea" autosize show-word-limit maxlength="2000" placeholder="例如:项目介绍、面试时长、面试官、问题QA、需要注意的地方"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,7 +106,7 @@
|
||||
匿名发表
|
||||
<div class="text">(发布后可修改)</div>
|
||||
</div>
|
||||
<div class="issue-btn flexcenter" @click="submit()">发布</div>
|
||||
<div class="issue-btn flexcenter" @click="submit()">发布{{ loading ? "中..." : "" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -275,21 +275,30 @@ const cutVisible = () => {
|
||||
info.value["isvisiblereply"] = info.value["isvisiblereply"] == 0 ? 1 : 0
|
||||
}
|
||||
|
||||
let loading = ref(false)
|
||||
// 提交发布
|
||||
const submit = (status = 1) => {
|
||||
publishSubmitHttp({ info: info.value, token, status }).then(res => {
|
||||
if (res.code != 200) {
|
||||
ElMessage.error(res.message)
|
||||
return
|
||||
}
|
||||
if (loading.value) {
|
||||
ElMessage.error("提交中,稍等")
|
||||
return
|
||||
}
|
||||
|
||||
const data = res.data
|
||||
ElMessage.success(res.message)
|
||||
loading.value = true
|
||||
publishSubmitHttp({ info: info.value, token, status })
|
||||
.then(res => {
|
||||
if (res.code != 200) {
|
||||
ElMessage.error(res.message)
|
||||
return
|
||||
}
|
||||
|
||||
// router.push(`/details/${data["uniqid"]}`)
|
||||
if (status == 0) goToURL(`/index.html`, false)
|
||||
else goToURL(`/details/${data["uniqid"]}`, false)
|
||||
})
|
||||
const data = res.data
|
||||
ElMessage.success(res.message)
|
||||
|
||||
// router.push(`/details/${data["uniqid"]}`)
|
||||
if (status == 0) goToURL(`/index.html`, false)
|
||||
else goToURL(`/details/${data["uniqid"]}`, false)
|
||||
})
|
||||
.finally(() => (loading.value = false))
|
||||
}
|
||||
|
||||
// 放弃保存 跳跃上一页或者首页
|
||||
|
Reference in New Issue
Block a user