1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- // +----------------------------------------------------------------------
- // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
- // +----------------------------------------------------------------------
- // | Author: 萤火科技 <admin@yiovo.com>
- // +----------------------------------------------------------------------
- declare (strict_types = 1);
- namespace app\common\model\store;
- use app\common\library\helper;
- use app\common\model\BaseModel;
- use think\facade\Log;
- /**
- * 系统设置模型
- * Class Setting
- * @package app\common\model
- */
- class ExploreSet extends BaseModel
- {
- // 定义表名
- protected $name = 'explore_experience';
- /**
- * 获取器: 转义数组格式
- * @param $value
- * @return mixed
- */
- public function getContentsAttr($value, $data)
- {
- if ($data['contents']) {
- return htmlspecialchars_decode($data['contents']);
- }
- return '';
- }
- /**
- * 修改器: 转义成json格式
- * @param $value
- * @return string
- */
- public function setContentsAttr($value, $data)
- {
- if ($data['contents']) {
- return $data['contents'] ?? '';
- }
- return '';
- }
- public static function getItem($type){
- return self::where('types',$type)->find();
- }
- public static function detail($type){
- return self::where('types',$type)->find();
- }
- }
|