Browse Source

协议修改

lizhen_gitee 6 days ago
parent
commit
660010078f

+ 2 - 2
application/admin/view/basedata/add.html

@@ -6,12 +6,12 @@
             <input id="c-name" class="form-control" name="row[name]" type="text">
         </div>
     </div>
-    <div class="form-group">
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Key')}:</label>
         <div class="col-xs-12 col-sm-8">
             <input id="c-key" class="form-control" name="row[key]" type="text">
         </div>
-    </div>
+    </div>-->
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
         <div class="col-xs-12 col-sm-8">

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

@@ -6,12 +6,12 @@
             <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
         </div>
     </div>
-    <div class="form-group">
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Key')}:</label>
         <div class="col-xs-12 col-sm-8">
             <input id="c-key" class="form-control" name="row[key]" disabled type="text" value="{$row.key|htmlentities}">
         </div>
-    </div>
+    </div>-->
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
         <div class="col-xs-12 col-sm-8">

+ 1 - 1
application/admin/view/basedata/index.html

@@ -7,7 +7,7 @@
                 <div class="widget-body no-padding">
                     <div id="toolbar" class="toolbar">
                         <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
-                        <!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('basedata/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
+                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('basedata/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
                         <!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('basedata/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
                         <!--<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('basedata/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                         <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('basedata/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>

+ 1 - 1
application/api/controller/Topicdongtai.php

@@ -818,7 +818,7 @@ class Topicdongtai extends Api
         $list = Db::name('topic_dongtai_message')->alias('msg')->field('msg.*,user.avatar,user.nickname,ur.nickname_remark')
             ->join('user','msg.from_user_id = user.id','LEFT')
             ->join('user_remark ur', 'ur.to_user_id = user.id and ur.user_id = '.$this->auth->id, 'LEFT')
-            ->where('msg.user_id',$this->auth->id)->autopage()->select();
+            ->where('msg.user_id',$this->auth->id)->order('msg.id desc')->autopage()->select();
         $list = list_domain_image($list,['avatar']);
 
         foreach ($list as &$val) {

+ 18 - 2
public/assets/js/backend/basedata.js

@@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     index_url: 'basedata/index' + location.search,
                     add_url: 'basedata/add',
                     edit_url: 'basedata/edit',
-//                    del_url: 'basedata/del',
+                    del_url: 'basedata/del',
                     multi_url: 'basedata/multi',
                     import_url: 'basedata/import',
                     table: 'basedata',
@@ -30,7 +30,23 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'key', title: __('Key'), operate: 'LIKE'},
                         {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
                         {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
-                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+                        {field: 'operate', title: __('Operate'), table: table,
+                            buttons:[
+                                {
+                                    name:'del',
+                                    text:'删除',
+                                    title:'删除',
+                                    icon:'fa fa-exclamation-circle',
+                                    classname:'btn btn-xs btn-danger btn-ajax',
+                                    url:'basedata/del/ids/{ids}?dialog=1',
+                                    target:'_self',
+                                    refresh:true,
+                                    hidden:function(row){
+                                        return row.id > 4 ? false : true;
+                                    }
+                                }
+                            ],
+                            events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                     ]
                 ]
             });