Jelajahi Sumber

修改时间和弹框

tangning 3 tahun lalu
induk
melakukan
f85fb5a90b
2 mengubah file dengan 11 tambahan dan 5 penghapusan
  1. 10 4
      pages/room/add.js
  2. 1 1
      pages/roomManger/roomManger.js

+ 10 - 4
pages/room/add.js

@@ -208,7 +208,14 @@ Page({
       if (value < 0) {
       if (value < 0) {
         return wx.showToast({
         return wx.showToast({
           title: '结束时间大于开始时间',
           title: '结束时间大于开始时间',
-          icon: 'error',
+          icon: 'none',
+          duration: 1000
+        })
+      }
+      if (new Date(detail.effectiveEndTime.replace(/-/g, "/")).getTime()<new Date()) {
+        return wx.showToast({
+          title: '结束时间需大于现在',
+          icon: 'none',
           duration: 1000
           duration: 1000
         })
         })
       }
       }
@@ -251,7 +258,7 @@ Page({
     if (err) {
     if (err) {
       return wx.showToast({
       return wx.showToast({
         title: err,
         title: err,
-        icon: 'error',
+        icon: 'none',
         duration: 1000
         duration: 1000
       })
       })
     }
     }
@@ -260,7 +267,6 @@ Page({
       brandId, //直播场景ID
       brandId, //直播场景ID
       anchorUserId, //主持人ID
       anchorUserId, //主持人ID
       assistantUserId, //助理用户iD
       assistantUserId, //助理用户iD
-
       effectiveStartTime: new Date(effectiveStartTime.replace(/-/g, "/")).getTime() ,
       effectiveStartTime: new Date(effectiveStartTime.replace(/-/g, "/")).getTime() ,
       effectiveEndTime: new Date(effectiveEndTime.replace(/-/g, "/")).getTime() ,
       effectiveEndTime: new Date(effectiveEndTime.replace(/-/g, "/")).getTime() ,
     }, "POST", 'application/json')
     }, "POST", 'application/json')
@@ -281,7 +287,7 @@ Page({
     } else {
     } else {
       wx.showToast({
       wx.showToast({
         title: res.error || '创建失败!!',
         title: res.error || '创建失败!!',
-        icon: "error"
+        icon: "none"
       })
       })
     }
     }
   }
   }

+ 1 - 1
pages/roomManger/roomManger.js

@@ -44,7 +44,7 @@ Page({
   async handleDelete(e) {
   async handleDelete(e) {
     wx.showModal({
     wx.showModal({
       title: '温馨提示',
       title: '温馨提示',
-      content: '关闭房间后,房间内的所有人都会退出房间,是否继续关闭?',
+      content: this.data.fetcherData.state !== 102 ?'关闭房间后,房间内的所有人都会退出房间,是否继续关闭?':'删除房间后,房间信息将进行销毁,是否继续删除?',
       success: (res) => {
       success: (res) => {
         console.log('requestDelete', res)
         console.log('requestDelete', res)
         if (res.confirm) {
         if (res.confirm) {