Browse Source

Merge remote-tracking branch 'origin/master'

hotchicken1996 1 month ago
parent
commit
7d17aad5e0

+ 5 - 2
client_h5/src/pages/dailyNotify/editors.vue

@@ -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();          
         }
       });

+ 1 - 1
client_h5/src/pages/dailyNotify/index.vue

@@ -190,7 +190,7 @@ const onDeleteHandle = (item: any) => {
       showNotify({
         type: 'primary',
         message: '删除成功',
-        duration: 2000,
+        duration: 800,
         position: 'top',
         onOpened() {
           queryDailyNotifyGroup();