后台会员级别及会员权益关联入会类型
This commit is contained in:
@@ -16,13 +16,13 @@ use think\Model;
|
||||
class JoinConfig extends Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_join_config';
|
||||
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
@@ -36,9 +36,9 @@ class JoinConfig extends Model
|
||||
'type_text',
|
||||
'status_text'
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function getTypeList()
|
||||
{
|
||||
return ['1' => __('Type 1'), '2' => __('Type 2'), '3' => __('Type 3')];
|
||||
@@ -115,7 +115,12 @@ class JoinConfig extends Model
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getSimpleByStatus($status = 'normal')
|
||||
{
|
||||
return Self::field(['id', 'name'])->where(function($query) use ($status) {
|
||||
if (null !== $status) {
|
||||
$query->where('status', '=', $status);
|
||||
}
|
||||
})->order('weigh', 'asc')->select();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user