From 7e7f901b2172281dc294dfbc67e6ad00625f09f4 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 04 三月 2024 10:11:21 +0800
Subject: [PATCH] 合并代码

---
 cloud-server-management/src/main/webapp/static/modular/system/course/course.js |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/static/modular/system/course/course.js b/cloud-server-management/src/main/webapp/static/modular/system/course/course.js
index 051e336..c1aa138 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/course/course.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/course/course.js
@@ -1,7 +1,7 @@
 /**
  * 系统管理--用户管理的单例对象
  */
-let Course = {
+var Course = {
     id: "managerTable",//表格id
     seItem: null,		//选中的条目
     table: null,
@@ -15,7 +15,7 @@
 Course.initColumn = function () {
     let columns = [
         {field: 'selectItem', radio: true},
-        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
+        {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
         {title: '视频类型', field: 'type', align: 'center', valign: 'middle',
             formatter: function (v) {
                 switch (v) {
@@ -51,13 +51,7 @@
 Course.check = function () {
     let selected = $('#' + this.id).bootstrapTable('getSelections');
     if (selected.length == 0) {
-        if(language==1){
-            Feng.info("请先选中表格中的某一记录!");
-        }else if(language==2){
-            Feng.info("Please select a record in the table first!");
-        }else {
-            Feng.info("Pilih catatan di tabel terlebih dahulu!");
-        }
+        Feng.info("请先选中表格中的某一记录!");
         return false;
     } else {
         Course.seItem = selected[0];
@@ -105,6 +99,11 @@
  */
 Course.delCourse = function () {
     if (this.check()) {
+        console.log()
+        if (Course.seItem.state == 1){
+            Feng.error("只能删除已下架的视频课");
+            return;
+        }
         let operation = function(){
             let ajax = new $ax(Feng.ctxPath + "/course/delCourse", function () {
                 Feng.success("删除成功!");

--
Gitblit v1.7.1