|
@@ -13,7 +13,7 @@
|
|
|
show-word-limit
|
|
|
/>
|
|
|
</div>
|
|
|
- <van-button style="border-radius: 12px;" block type="primary" @click="onSubmitHandle">确认发布</van-button>
|
|
|
+ <van-button style="border-radius: 12px;" :disabled="isDisabled" block type="primary" @click="onSubmitHandle">确认发布</van-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -45,6 +45,7 @@ const queryDetailById = () => {
|
|
|
}
|
|
|
queryDetailById()
|
|
|
|
|
|
+const isDisabled = ref(false)
|
|
|
const onSubmitHandle = () => {
|
|
|
const urlApi = query.id ? "/admin-api/adm/noticeAndLearn/update" : "/admin-api/adm/noticeAndLearn/add"
|
|
|
if (!message.value) {
|
|
@@ -59,14 +60,16 @@ const onSubmitHandle = () => {
|
|
|
if(query.id){
|
|
|
sendData['id'] = query.id
|
|
|
}
|
|
|
+ isDisabled.value = true;
|
|
|
reqest.post(urlApi, sendData).then((result: any) => {
|
|
|
if (result.data) {
|
|
|
showNotify({
|
|
|
type: 'primary',
|
|
|
message: '发布成功',
|
|
|
- duration: 2000,
|
|
|
+ duration: 800,
|
|
|
position: 'top',
|
|
|
onClose() {
|
|
|
+ isDisabled.value = false;
|
|
|
router.back();
|
|
|
}
|
|
|
});
|