浏览代码

修改时间和弹框

tangning 3 年之前
父节点
当前提交
f85fb5a90b
共有 2 个文件被更改,包括 11 次插入5 次删除
  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) {
         return wx.showToast({
           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
         })
       }
@@ -251,7 +258,7 @@ Page({
     if (err) {
       return wx.showToast({
         title: err,
-        icon: 'error',
+        icon: 'none',
         duration: 1000
       })
     }
@@ -260,7 +267,6 @@ Page({
       brandId, //直播场景ID
       anchorUserId, //主持人ID
       assistantUserId, //助理用户iD
-
       effectiveStartTime: new Date(effectiveStartTime.replace(/-/g, "/")).getTime() ,
       effectiveEndTime: new Date(effectiveEndTime.replace(/-/g, "/")).getTime() ,
     }, "POST", 'application/json')
@@ -281,7 +287,7 @@ Page({
     } else {
       wx.showToast({
         title: res.error || '创建失败!!',
-        icon: "error"
+        icon: "none"
       })
     }
   }

+ 1 - 1
pages/roomManger/roomManger.js

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