diff --git a/app/admin/controller/mall/Address.php b/app/admin/controller/mall/Address.php index 1222ad1..f791fb6 100644 --- a/app/admin/controller/mall/Address.php +++ b/app/admin/controller/mall/Address.php @@ -52,7 +52,9 @@ class Address extends Backend */ list($where, $alias, $limit, $order) = $this->queryBuilder(); $res = $this->model - ->withJoin($this->withJoinTable, $this->withJoinType) + ->with(['mallUser' => function ($query) { + $query->field('id,username'); + }]) ->visible(['mallUser' => ['username']]) ->alias($alias) ->where($where) diff --git a/app/common/model/MallAddress.php b/app/common/model/MallAddress.php index 97fdd45..e096a6d 100644 --- a/app/common/model/MallAddress.php +++ b/app/common/model/MallAddress.php @@ -2,6 +2,7 @@ namespace app\common\model; +use app\common\model\traits\TimestampInteger; use support\think\Model; /** @@ -9,6 +10,8 @@ use support\think\Model; */ class MallAddress extends Model { + use TimestampInteger; + // 表名 protected $name = 'mall_address'; diff --git a/web/src/views/backend/mall/address/index.vue b/web/src/views/backend/mall/address/index.vue index 2829d43..2489bde 100644 --- a/web/src/views/backend/mall/address/index.vue +++ b/web/src/views/backend/mall/address/index.vue @@ -51,6 +51,7 @@ const baTable = new baTableClass( label: t('mall.address.malluser__username'), prop: 'mallUser.username', align: 'center', + minWidth: 120, operatorPlaceholder: t('Fuzzy query'), render: 'tags', operator: 'LIKE',