日常更新
This commit is contained in:
17
app/model/Form.php
Normal file
17
app/model/Form.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace app\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Form extends Model {
|
||||
|
||||
public $status = array(
|
||||
1 => '开启',
|
||||
0 => '关闭'
|
||||
);
|
||||
|
||||
|
||||
public function getStatusTextAttr($value, $data){
|
||||
return isset($this->status[$data['status']]) ? $this->status[$data['status']] : '未知';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user