Parcourir la source

1、去掉房间密码操作

yys il y a 3 semaines
Parent
commit
e99f1893cf
1 fichiers modifiés avec 0 ajouts et 86 suppressions
  1. 0 86
      src/views/live/live/index.vue

+ 0 - 86
src/views/live/live/index.vue

@@ -334,11 +334,6 @@
               <el-dropdown-item @click.native="handleAudit(scope.row)">
                 <i class="el-icon-service"></i> 审核
               </el-dropdown-item>
-              <el-dropdown-item
-                v-if="scope.row.status != 2"
-                @click.native="handleRoomPassword(scope.row)">
-                <i class="el-icon-service"></i> 房间密码
-              </el-dropdown-item>
 <!--              <el-dropdown-item -->
 <!--                @click.native="handleExportComments(scope.row)"-->
 <!--                :disabled="exportingComments[scope.row.liveId]"-->
@@ -667,38 +662,6 @@
         <el-button @click="addTagCancel">取 消</el-button>
       </div>
     </el-dialog>
-
-    <!-- 设置房间密码对话框 -->
-    <el-dialog
-      title="设置房间密码"
-      :visible.sync="roomPasswordDialog.open"
-      width="500px"
-      append-to-body
-      class="simple-dialog"
-    >
-      <el-form ref="roomPasswordForm" :model="roomPasswordForm" :rules="roomPasswordRules" label-width="100px">
-        <el-form-item label="直播ID">
-          <el-input v-model="roomPasswordForm.liveId" disabled />
-        </el-form-item>
-        <el-form-item label="直播名称">
-          <el-input v-model="roomPasswordForm.liveName" disabled />
-        </el-form-item>
-        <el-form-item label="房间密码" prop="roomPassword">
-          <el-input
-            v-model="roomPasswordForm.roomPassword"
-            placeholder="请输入房间密码(留空表示无密码)"
-            clearable
-            maxlength="20"
-            show-word-limit
-          />
-          <div class="form-tip">提示:设置密码后,用户进入直播间需要输入密码</div>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitRoomPassword">确 定</el-button>
-        <el-button @click="roomPasswordDialog.open = false">取 消</el-button>
-      </div>
-    </el-dialog>
   </div>
 </template>
 
@@ -857,22 +820,6 @@ export default {
       },
       // 导出评论状态:key为liveId,value为是否正在导出
       exportingComments: {},
-      // 房间密码弹窗
-      roomPasswordDialog: {
-        open: false
-      },
-      // 房间密码表单
-      roomPasswordForm: {
-        liveId: null,
-        liveName: null,
-        roomPassword: null
-      },
-      // 房间密码表单校验
-      roomPasswordRules: {
-        roomPassword: [
-          { max: 20, message: '密码长度不能超过20个字符', trigger: 'blur' }
-        ]
-      }
     };
   },
   created() {
@@ -1312,39 +1259,6 @@ export default {
     handleImgError(e) {
       e.target.src = this.defaultImg;
     },
-    // 设置房间密码
-    handleRoomPassword(row){
-      this.roomPasswordForm.liveId = row.liveId
-      this.roomPasswordForm.liveName = row.liveName
-      this.roomPasswordForm.roomPassword = row.roomPassword || ''
-      this.roomPasswordForm.startTime = row.startTime || ''
-      this.roomPasswordDialog.open = true
-    },
-    // 提交房间密码
-    submitRoomPassword() {
-      this.$refs['roomPasswordForm'].validate(valid => {
-        if (valid) {
-          const params = {
-            liveId: this.roomPasswordForm.liveId,
-            roomPassword: this.roomPasswordForm.roomPassword || '',
-            startTime: this.roomPasswordForm.startTime || '',
-          }
-
-          updateLive(params).then(response => {
-            if (response.code === 200) {
-              this.$message.success('房间密码设置成功')
-              this.roomPasswordDialog.open = false
-              this.getList()
-            } else {
-              this.$message.error(response.msg || '设置失败')
-            }
-          }).catch(error => {
-            console.error('设置房间密码失败:', error)
-            this.$message.error('设置失败,请稍后重试')
-          })
-        }
-      })
-    },
     handleAudit(row) {
       this.$alert("是否审核通过?", "审核", {
         confirmButtonText: "同意",