正在显示
3 个修改的文件
包含
8 行增加
和
8 行删除
@@ -50,13 +50,13 @@ class Renwu extends Backend | @@ -50,13 +50,13 @@ class Renwu extends Backend | ||
50 | } | 50 | } |
51 | list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | 51 | list($where, $sort, $order, $offset, $limit) = $this->buildparams(); |
52 | $total = $this->model | 52 | $total = $this->model |
53 | - ->with(['user', 'vip','user_xi','user_zhao']) | 53 | + ->with(['user', 'vip', 'xi_id', 'zhao_id']) |
54 | ->where($where) | 54 | ->where($where) |
55 | ->order($sort, $order) | 55 | ->order($sort, $order) |
56 | ->count(); | 56 | ->count(); |
57 | 57 | ||
58 | $list = $this->model | 58 | $list = $this->model |
59 | - ->with(['user', 'vip','user_xi','user_zhao']) | 59 | + ->with(['user', 'vip', 'xi_id', 'zhao_id']) |
60 | ->where($where) | 60 | ->where($where) |
61 | ->order($sort, $order) | 61 | ->order($sort, $order) |
62 | ->limit($offset, $limit) | 62 | ->limit($offset, $limit) |
@@ -65,8 +65,8 @@ class Renwu extends Backend | @@ -65,8 +65,8 @@ class Renwu extends Backend | ||
65 | foreach ($list as $row) { | 65 | foreach ($list as $row) { |
66 | 66 | ||
67 | $row->getRelation('user')->visible(['nickname', 'mobile', 'address', 'address_con', 'car_num', 'color', 'car_type', 'vip']); | 67 | $row->getRelation('user')->visible(['nickname', 'mobile', 'address', 'address_con', 'car_num', 'color', 'car_type', 'vip']); |
68 | - $row->getRelation('user_xi')->visible(['nickname']); | ||
69 | - $row->getRelation('user_zhao')->visible(['nickname']); | 68 | + $row->getRelation('xi_id')->visible(['nickname']); |
69 | + $row->getRelation('zhao_id')->visible(['nickname']); | ||
70 | $row->getRelation('vip')->visible(['title']); | 70 | $row->getRelation('vip')->visible(['title']); |
71 | } | 71 | } |
72 | $list = collection($list)->toArray(); | 72 | $list = collection($list)->toArray(); |
@@ -102,11 +102,11 @@ class Renwu extends Model | @@ -102,11 +102,11 @@ class Renwu extends Model | ||
102 | { | 102 | { |
103 | return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); | 103 | return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); |
104 | } | 104 | } |
105 | - public function user_xi() | 105 | + public function xi_id() |
106 | { | 106 | { |
107 | return $this->belongsTo('User', 'xi_id', 'id', [], 'LEFT')->setEagerlyType(0); | 107 | return $this->belongsTo('User', 'xi_id', 'id', [], 'LEFT')->setEagerlyType(0); |
108 | } | 108 | } |
109 | - public function user_zhao() | 109 | + public function zhao_id() |
110 | { | 110 | { |
111 | return $this->belongsTo('User', 'zhao_id', 'id', [], 'LEFT')->setEagerlyType(0); | 111 | return $this->belongsTo('User', 'zhao_id', 'id', [], 'LEFT')->setEagerlyType(0); |
112 | } | 112 | } |
@@ -39,11 +39,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -39,11 +39,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
39 | {field: 'vip.title', title: __('Vip.title'),operate:false}, | 39 | {field: 'vip.title', title: __('Vip.title'),operate:false}, |
40 | {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"0":__('Type 0'),"2":__('Type 2')}, formatter: Table.api.formatter.normal}, | 40 | {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"0":__('Type 0'),"2":__('Type 2')}, formatter: Table.api.formatter.normal}, |
41 | // {field: 'xi_id', title: __('Xi_id')}, | 41 | // {field: 'xi_id', title: __('Xi_id')}, |
42 | - {field: 'user_xi.nickname', title: __('user_xi.nickname'),operate:'LIKE'}, | 42 | + {field: 'xi_id.nickname', title: __('xi_id.nickname'),operate:'LIKE'}, |
43 | {field: 'xi_type', title: __('Xi_type'), searchList: {"1":__('Xi_type 1'),"0":__('Xi_type 0'),"2":__('Xi_type 2')}, formatter: Table.api.formatter.normal}, | 43 | {field: 'xi_type', title: __('Xi_type'), searchList: {"1":__('Xi_type 1'),"0":__('Xi_type 0'),"2":__('Xi_type 2')}, formatter: Table.api.formatter.normal}, |
44 | // {field: 'xi_images', title: __('Xi_images'), events: Table.api.events.image, formatter: Table.api.formatter.images}, | 44 | // {field: 'xi_images', title: __('Xi_images'), events: Table.api.events.image, formatter: Table.api.formatter.images}, |
45 | // {field: 'zhao_id', title: __('Zhao_id')}, | 45 | // {field: 'zhao_id', title: __('Zhao_id')}, |
46 | - {field: 'user_zhao.nickname', title: __('user_zhao.nickname'),operate:'LIKE'}, | 46 | + {field: 'zhao_id.nickname', title: __('zhao_id.nickname'),operate:'LIKE'}, |
47 | {field: 'zhao_type', title: __('Zhao_type'), searchList: {"1":__('Zhao_type 1'),"0":__('Zhao_type 0'),"2":__('Zhao_type 2')}, formatter: Table.api.formatter.normal}, | 47 | {field: 'zhao_type', title: __('Zhao_type'), searchList: {"1":__('Zhao_type 1'),"0":__('Zhao_type 0'),"2":__('Zhao_type 2')}, formatter: Table.api.formatter.normal}, |
48 | // {field: 'zhao_images', title: __('Zhao_images'), events: Table.api.events.image, formatter: Table.api.formatter.images}, | 48 | // {field: 'zhao_images', title: __('Zhao_images'), events: Table.api.events.image, formatter: Table.api.formatter.images}, |
49 | {field: 'car_address', title: __('Car_address'),operate:'LIKE'}, | 49 | {field: 'car_address', title: __('Car_address'),operate:'LIKE'}, |
-
请 注册 或 登录 后发表评论