2 Commits eca712022f ... 2cad7a7607

Tác giả SHA1 Thông báo Ngày
  panda 2cad7a7607 Merge branch 'master' of http://git.huxiukeji.com/lizhen/xiaoyou 6 tháng trước cách đây
  panda 89a25fa655 用户列表增加更多操作按钮 6 tháng trước cách đây

+ 1 - 1
application/admin/lang/zh-cn/user/user.php

@@ -1,7 +1,7 @@
 <?php
 
 return [
-    'Id'                  => 'ID',
+    'Id'                  => '用户ID',
     'Gh_id'               => '公会ID',
     'Intro_uid'           => '推荐人ID',
     'Username'            => '用户名',

+ 15 - 1
public/assets/css/fastadmin.css

@@ -5886,4 +5886,18 @@ fieldset[disabled] .btn-yahoo.active {
     white-space: normal !important;
   }
 }
-/*# sourceMappingURL=fastadmin.css.map */
+/*# sourceMappingURL=fastadmin.css.map */
+.panda-show{
+  color: #fff !important;
+}
+.panda-show:hover{
+  color: #555 !important;
+}
+.dropdown-menu > li > a > .glyphicon, .dropdown-menu > li > a > .fa, .dropdown-menu > li > a > .ion{
+  margin-right: 0 !important;
+}
+.dropdown-menu{
+  min-width: 90px !important;
+  left: -15px !important;
+  right: auto !important;
+}

+ 64 - 3
public/assets/js/backend/user/user.js

@@ -38,13 +38,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'id', title: __('Id')},
                         // {field: 'gh_id', title: __('Gh_id')},
                         // {field: 'gonghui.name', title: __('Gonghui.name'), operate: false},
-                        {field: 'intro_uid', title: __('Intro_uid')},
-                        {field: 'username', title: __('Username'), operate: 'LIKE'},
+
+
                         {field: 'nickname', title: __('Nickname'), operate: 'LIKE'},
                         //{field: 'password', title: __('Password'), operate: 'LIKE'},
                         //{field: 'salt', title: __('Salt'), operate: 'LIKE'},
                         //{field: 'email', title: __('Email'), operate: 'LIKE'},
                         {field: 'mobile', title: __('Mobile'), operate: 'LIKE'},
+                        {field: 'username', title: __('Username'), operate: 'LIKE'},
+                        {field: 'intro_uid', title: __('Intro_uid')},
                         {field: 'introcode', title: __('Introcode'), operate: 'LIKE'},
                         {field: 'avatar', title: __('Avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
                         {field: 'real_status', title: __('Real_status'), searchList: {"-1":__('Real_status -1'),"0":__('Real_status 0'),"1":__('Real_status 1'),"2":__('Real_status 2')}, formatter: Table.api.formatter.status},
@@ -107,7 +109,66 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'week_profit', title: __('本周收益'), operate: false},
                         {field: 'last_week_count', title: __('上周收益'), operate: false},
 
-                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+                        {
+                            field: 'operate',
+                            title: __('Operate'),
+                            width:'130',
+                            table: table,
+                            events: Table.api.events.operate,
+                            formatter: Table.api.formatter.operate,
+                            // buttons: [
+                            //     {
+                            //         name: 'click',
+                            //         text: __('点击事件'),
+                            //         title: __('点击事件'),
+                            //         classname: 'btn btn-xs btn-info btn-click panda-show',
+                            //         icon: 'fa fa-leaf',
+                            //         dropdown: '更多',//如果包含dropdown,将会以下拉列表的形式展示
+                            //         trigger: 'hover',
+                            //         click: function (data) {
+                            //             Layer.alert("点击按钮执行的事件");
+                            //         }
+                            //     },
+                            //     {
+                            //         name: 'detail',
+                            //         text: __('弹出窗口'),
+                            //         classname: 'btn btn-xs btn-primary btn-dialog panda-show',
+                            //         icon: 'fa fa-list',
+                            //         dropdown: '更多',//如果包含dropdown,将会以下拉列表的形式展示
+                            //         url: 'example/bootstraptable/detail',
+                            //         callback: function (data) {
+                            //             Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
+                            //         }
+                            //     },
+                            //     {
+                            //         name: 'ajax',
+                            //         text: __('发送Ajax'),
+                            //         classname: 'btn btn-xs btn-success btn-magic btn-ajax panda-show',
+                            //         icon: 'fa fa-magic',
+                            //         dropdown: '更多',//如果包含dropdown,将会以下拉列表的形式展示
+                            //         confirm: '确认发送Ajax请求?',
+                            //         url: 'example/bootstraptable/detail',
+                            //         success: function (data, ret) {
+                            //             Layer.alert(ret.msg + ",返回数据:" + JSON.stringify(data));
+                            //             //如果需要阻止成功提示,则必须使用return false;
+                            //             //return false;
+                            //         },
+                            //         error: function (data, ret) {
+                            //             console.log(data, ret);
+                            //             Layer.alert(ret.msg);
+                            //             return false;
+                            //         }
+                            //     },
+                            //     {
+                            //         name: 'addtabs',
+                            //         text: __('打开选项卡'),
+                            //         classname: 'btn btn-xs btn-warning btn-addtabs panda-show',
+                            //         icon: 'fa fa-folder-o',
+                            //         dropdown: '更多',//如果包含dropdown,将会以下拉列表的形式展示
+                            //         url: 'example/bootstraptable/detail'
+                            //     }
+                            // ]
+                        }
                     ]
                 ]
             });

+ 1 - 1
public/assets/js/require-table.js

@@ -874,7 +874,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
                     $.each(dropdowns, function (i, j) {
                         dropdownHtml.push('<div class="btn-group"><button type="button" class="btn btn-primary dropdown-toggle btn-xs" data-toggle="dropdown">' + i + '</button><button type="button" class="btn btn-primary dropdown-toggle btn-xs" data-toggle="dropdown"><span class="caret"></span></button><ul class="dropdown-menu dropdown-menu-right"><li>' + j.join('</li><li>') + '</li></ul></div>');
                     });
-                    html.unshift(dropdownHtml);
+                    html.push(dropdownHtml);
                 }
                 return html.join(' ');
             },