Browse Source

去掉动态话题

lizhen_gitee 7 months ago
parent
commit
5bf541f3f3

+ 1 - 2
application/admin/controller/Topicdongtai.php

@@ -56,7 +56,7 @@ class Topicdongtai extends Backend
             list($where, $sort, $order, $offset, $limit) = $this->buildparams();
 
             $list = $this->model
-                    ->with(['user','topichub'])
+                    ->with(['user'])
                     ->where($where)
                     ->order('topicdongtai.toptime desc')
                     ->order($sort, $order)
@@ -66,7 +66,6 @@ class Topicdongtai extends Backend
             foreach ($list as $row) {
                 
                 $row->getRelation('user')->visible(['username']);
-				$row->getRelation('topichub')->visible(['name']);
             }
 
             $result = array("total" => $list->total(), "rows" => $list->items());

+ 1 - 4
application/admin/model/Topicdongtai.php

@@ -128,8 +128,5 @@ class Topicdongtai extends Model
     }
 
 
-    public function topichub()
-    {
-        return $this->belongsTo('Topichub', 'topic_ids', 'id', [], 'LEFT')->setEagerlyType(0);
-    }
+
 }

+ 2 - 2
application/admin/view/topicdongtai/edit.html

@@ -1,11 +1,11 @@
 <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
 
-    <div class="form-group">
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Topic_ids')}:</label>
         <div class="col-xs-12 col-sm-8">
             <input id="c-topic_ids" data-source="topichub/index" data-multiple="true" class="form-control selectpage" name="row[topic_ids]" type="text" value="{$row.topic_ids|htmlentities}">
         </div>
-    </div>
+    </div>-->
     <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
         <div class="col-xs-12 col-sm-8">

+ 1 - 2
public/assets/js/backend/topicdongtai.js

@@ -27,8 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     [
                         {checkbox: true},
                         {field: 'id', title: __('Id')},
-//                        {field: 'topic_ids', title: __('Topic_ids'), operate: 'LIKE'},
-//                        {field: 'topichub.name', title: __('Topichub.name'), operate: 'LIKE'},
+
 
                         {field: 'user_id', title: __('User_id')},
                         {field: 'user.username', title: __('User.username'),sortable:true, operate: 'LIKE'},