Commit 9de450d7 by lzzzzl

增加用户名字段

parent 6586bf25
......@@ -268,6 +268,7 @@ class SpiderModel extends Model
foreach ($data['data'] as $k => $v) {
$data['data'][$k]['update_time'] = date("Y-m-d H:i:s", $v['update_time']);
$data['data'][$k]['user_name'] = $this->saleMan($user_id);
}
return $data;
......@@ -295,4 +296,18 @@ class SpiderModel extends Model
}
public function saleMan($sale_id) {
$sale_man = '';
$sql = "SELECT name FROM user_info WHERE userId = " . $sale_id;
$result = DB::connection('ic')->select($sql);
foreach ($result as $k => $v) {
$sale_man = $v['name'];
}
return $sale_man;
}
}
......@@ -24,6 +24,7 @@ layui.use(['table', 'form', 'laydate', 'layer'], function () {
request:{pageName:'p', limitName:'limit'},
cols: [[
{field:'user_id', title:'用户id', sort: true},
{field:'user_name', title:'用户名', sort: true},
{field:'action', title: '行为', sort: true},
{field:'content', title:'修改内容', sort: true},
{field:'result', title:'结果', width: 250, sort: true},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment