会员级别添加关联权益及图片

This commit is contained in:
2026-04-24 17:47:36 +08:00
parent 507894c8b4
commit 52c0b234db
6 changed files with 47 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
@@ -17,13 +17,13 @@ use think\Model;
class Level extends Model
{
// 表名
protected $name = 'wdsxh_member_level';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
@@ -32,11 +32,15 @@ class Level extends Model
protected $updateTime = 'updatetime';
protected $deleteTime = false;
protected $type = [
'benefits_id' => 'json',
];
// 追加属性
protected $append = [
'status_text'
];
protected static function init()
{
@@ -46,7 +50,7 @@ class Level extends Model
});
}
public function getStatusList()
{
return ['normal' => __('Status normal'), 'hidden' => __('Status hidden')];