chenhao 4 vuotta sitten
vanhempi
commit
5789713881

+ 15 - 0
application/admin/controller/Uuser.php

@@ -55,6 +55,20 @@ class Uuser extends Controller
         foreach($data as &$v) {
             $v['levels'] = $v['level'];
             $v['level'] = $level[$v['level']];
+//
+//            $len =  strlen($v['content']);
+//            $str = '';
+//            $num = ceil($len/20);
+//            for ($i=0;$i<$num;$i++) {
+//                if ($i==0) {
+//                    $str = substr($v['content'],0,20);
+//
+//                } else {
+//                    $str = $str. substr($v['content'],$i*20,$i*20+20).'<br />';
+//                }
+//
+//            }
+//            $v['content'] = $str;
         }
 
     }
@@ -124,6 +138,7 @@ class Uuser extends Controller
             $data['username'] = $post['username'];
             $data['mobile'] = $post['mobile'];
             $data['avatar'] = $post['avatar'];
+            $data['content'] = $post['content'];
 
             $upd = Db::name('user')->where('id',$post['id'])->update($data);
 

+ 9 - 2
application/admin/view/uuser/edits.html

@@ -13,7 +13,7 @@
             <label class="relative block">
                 <span class="color-green font-w7">登录用户账号</span>
                 <span class="color-desc margin-left-5">Username</span>
-                <input name="username" value='{$vo.username|default=""}' required pattern="^.{4,}$" placeholder="请输入4位及以上字符登录用户账号" class="layui-input">
+                <input name="username" value='{$vo.username|default=""}' required  placeholder="请输入4位及以上字符登录用户账号" class="layui-input">
             </label>
             <p class="help-block">登录用户账号创建</p>
         </div>
@@ -25,7 +25,14 @@
             </label>
             <p class="color-desc">可选,用户联系手机号码,需要填写正确的格式</p>
         </div>
-
+        <div class="layui-form-item">
+            <label class="relative block">
+                <span class="color-green font-w7">备注</span>
+                <span class="color-desc margin-left-5">notice</span>
+                <input type="text"  name="content" value='{$vo.content|default=""}'  placeholder="" class="layui-input">
+            </label>
+            <p class="color-desc">可选,用户联系手机号码,需要填写正确的格式</p>
+        </div>
         <div class="layui-form-item">
             <label class="relative block">
                 <span class="color-green font-w7">新的登录密码</span>

+ 2 - 0
application/admin/view/uuser/index.html

@@ -27,6 +27,7 @@
             <th class='text-left nowrap'>联系手机</th>
             <th class='text-left nowrap'>身份</th>
             <th class='text-left nowrap'>积分</th>
+            <th class='text-left nowrap'>备注</th>
             <th class='text-left nowrap'>创建时间</th>
 <!--            <th class='text-left nowrap'>状态</th>-->
             <th class='text-left nowrap'></th>
@@ -44,6 +45,7 @@
             <td class='text-left nowrap'>{$vo.mobile|default=0}</td>
             <td class='text-left nowrap'>{$vo.level}</td>
             <td class='text-left nowrap'>{$vo.integral}</td>
+            <td width="200" style="word-break:break-all;" >{$vo.content|raw}</td>
             <td class='text-left nowrap'>{$vo.create_time}</td>
 <!--            <td class='text-left nowrap'>{eq name='vo.is_deleted' value='2'}<span class="color-red">已禁用</span>{else}<span class="color-green">使用中</span>{/eq}</td>-->