添加admin表phone字段

This commit is contained in:
巴掌 committed 2018-10-18 12:54:12 +08:00
1 parent 6b90b89bc2
commit 2e75e7431a
3 files changed
+5 -2

No files matched your search

+2 -2
View File
@@ -55,7 +55,7 @@ class Index extends Base
//查询数据
$data = $admin
->field('id,xingming,xingbie,username,denglucishu,status,create_time')
->field('id,xingming,xingbie,username,phone,denglucishu,status,create_time')
->order([$order_field=>$order])
->limit($limit_start,$limit_length)
->all();
@@ -65,7 +65,7 @@ class Index extends Base
// 如果需要查询
if($search){
$data = $admin
->field('id,xingming,xingbie,username,denglucishu,status,create_time')
->field('id,xingming,xingbie,username,phone,denglucishu,status,create_time')
->order([$order_field=>$order])
->limit($limit_start,$limit_length)
->where('username|xingming','like','%'.$search.'%')
+2
View File
@@ -13,6 +13,7 @@
<th>姓名</th>
<th>姓别</th>
<th>帐号</th>
<th>手机号码</th>
<th>登录次数</th>
<th>创建时间</th>
<th>状态</th>
@@ -44,6 +45,7 @@
{ "data": "xingming" },
{ "data": "xingbie" },
{ "data": "username" },
{ "data": "phone" },
{ "data": "denglucishu" },
{ "data": "create_time" },
{ "data": "status" },
@@ -39,6 +39,7 @@ class Member extends Migrator
->addColumn('username','string',['limit'=>12,'null'=>false,'comment'=>'用户帐号'])
->addColumn('password','string',['limit'=>37,'null'=>false,'comment'=>'登录密码'])
->addColumn('miyao','string',['limit'=>8,'null'=>false,'comment'=>'密钥'])
->addColumn('phone','string',['limit'=>11,'null'=>true,'comment'=>'联系方式'])
->addColumn('denglucishu','integer',['limit'=>5,'default'=>0,'null'=>false,'comment'=>'登录次数'])
->addColumn('lastip','string',['limit'=>55,'default'=>'127.0.0.1','null'=>false,'comment'=>'最后一次登录IP'])
->addColumn('ip','string',['limit'=>55,'default'=>'127.0.0.1','null'=>false,'comment'=>'登录IP'])