Quellcode durchsuchen

会员菜单样式

Cherry vor 2 Jahren
Ursprung
Commit
018879be9f

+ 9 - 0
application/admin/controller/user/User.php

@@ -79,6 +79,15 @@ class User extends Backend
 
             return json($result);
         }
+
+        if ($this->request->request('level') == 1) {
+            $this->assignconfig("c_remarks", 1);
+            $this->assignconfig("b_remarks", 0);
+        } else {
+            $this->assignconfig("c_remarks", 0);
+            $this->assignconfig("b_remarks", 1);
+        }
+
         return $this->view->fetch();
     }
 

+ 9 - 9
application/admin/view/user/user/index.html

@@ -1,14 +1,14 @@
 <div class="panel panel-default panel-intro">
 
-    <div class="panel-heading">
-        {:build_heading(null,FALSE)}
-        <ul class="nav nav-tabs" data-field="level">
-            <li class="{:$Think.get.level === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
-            {foreach name="levelList" item="vo"}
-            <li class="{:$Think.get.level === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
-            {/foreach}
-        </ul>
-    </div>
+<!--    <div class="panel-heading">-->
+<!--        {:build_heading(null,FALSE)}-->
+<!--        <ul class="nav nav-tabs" data-field="level">-->
+<!--            <li class="{:$Think.get.level === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>-->
+<!--            {foreach name="levelList" item="vo"}-->
+<!--            <li class="{:$Think.get.level === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>-->
+<!--            {/foreach}-->
+<!--        </ul>-->
+<!--    </div>-->
 
     <div class="panel-body">
         <div id="myTabContent" class="tab-content">

+ 8 - 6
public/assets/js/backend/user/user.js

@@ -15,6 +15,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
             });
 
             var table = $("#table");
+            var c_remarks = Config.c_remarks;
+            var b_remarks = Config.b_remarks;
 
             // 初始化表格
             table.bootstrapTable({
@@ -43,16 +45,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                             searchList: {"1": __('Level 1'), "2": __('Level 2'), "3": __('Level 3')},
                             formatter: Table.api.formatter.normal
                         },
-                        {field: 'joinremarks1.value', title: __('Remarks1')},
-                        {field: 'joinremarks2.value', title: __('Remarks2')},
-                        {field: 'joinremarks3.value', title: __('Remarks3')},
+                        {field: 'joinremarks1.value', title: __('Remarks1'),visible:c_remarks},
+                        {field: 'joinremarks2.value', title: __('Remarks2'),visible:c_remarks},
+                        {field: 'joinremarks3.value', title: __('Remarks3'),visible:c_remarks},
                         {
                             field: 'type_remarks',
                             title: __('TypeRemarks'),
                             formatter: Table.api.formatter.normal,
-                            searchList: {"1": __('TypeRemarks 1'), "2": __('TypeRemarks 2'), "3": __('TypeRemarks 3')}
+                            searchList: {"1": __('TypeRemarks 1'), "2": __('TypeRemarks 2'), "3": __('TypeRemarks 3')},visible:b_remarks
                         },
-                        {field: 'bindremarks.value', title: __('BindRemarks'), operate: false,},
+                        {field: 'bindremarks.value', title: __('BindRemarks'), operate: false,visible:b_remarks},
                         {field: 'score', title: __('Score'), operate: 'LIKE'},
                         {
                             field: 'logintime',
@@ -99,7 +101,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                 classname: 'btn btn-xs btn-success btn-magic btn-ajax',
                                 confirm: '确认重置密码?重置后密码:123456',
                                 url: 'user/user/reset_password?ids={id}',
-                                // visible: function (row) {
+                               // visible: function (row) {
                                 //     if ((row.status == 1) || (row.status == 5)) {
                                 //         return true;
                                 //     } else {