后台内容模块功能完善
This commit is contained in:
@@ -97,6 +97,18 @@ class Model extends \think\Model{
|
||||
return $list;
|
||||
}
|
||||
|
||||
public function getAttrGroupAttr($value, $data){
|
||||
$list = [];
|
||||
if ($data['attribute_group']) {
|
||||
$row = explode(PHP_EOL, $data['attribute_group']);
|
||||
foreach ($row as $r) {
|
||||
list($key, $label) = explode(":", $r);
|
||||
$list[$key] = ['key' => $key, 'label' => $label];
|
||||
}
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
public function getStatusTextAttr($value, $data) {
|
||||
$status = [0 => '禁用', 1 => '启用'];
|
||||
return $status[$data['status']];
|
||||
|
||||
Reference in New Issue
Block a user