Browse Source

后台创建

lizhen_gitee 1 year ago
parent
commit
d7857ada6f

+ 1 - 1
application/admin/controller/Lesson.php

@@ -58,7 +58,7 @@ class Lesson extends Backend
 
             foreach ($list as $row) {
                 
-                $row->getRelation('cate')->visible(['name']);
+                $row->getRelation('cate')->visible(['name','name_en']);
             }
 
             $result = array("total" => $list->total(), "rows" => $list->items());

+ 2 - 1
application/admin/lang/zh-cn/lesson.php

@@ -14,5 +14,6 @@ return [
     'Is_show 1'     => '上架',
     'Is_show 0'     => '下架',
     'Weigh'         => '排序',
-    'Cate.name'     => '课程分类'
+    'Cate.name'     => '课程分类',
+    'Cate.name_en'  => '课程分类en'
 ];

+ 3 - 1
public/assets/js/backend/lesson.js

@@ -35,10 +35,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'oldprice', title: __('Oldprice'), operate:'BETWEEN'},
 //                        {field: 'content', title: __('Content')},
 //                        {field: 'content_en', title: __('Content_en')},
-                        {field: 'lessoncate_id', title: __('Lessoncate_id')},
+
                         {field: 'is_show', title: __('Is_show'), searchList: {"1":__('Is_show 1'),"0":__('Is_show 0')}, formatter: Table.api.formatter.normal},
                         {field: 'weigh', title: __('Weigh'), operate: false},
+                        {field: 'lessoncate_id', title: __('Lessoncate_id')},
                         {field: 'cate.name', title: __('Cate.name'), operate: 'LIKE'},
+                        {field: 'cate.name_en', title: __('Cate.name_en'), operate: 'LIKE'},
                         {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                     ]
                 ]