123456789101112131415161718192021222324252627282930 |
- <?php
- namespace app\api\model;
- use app\common\model\XcxHomeSetting as XcxHomeSettingModel;
- /**
- * 渠道销售统计模型
- * @package app\store\model
- */
- class XcxHomeSetting extends XcxHomeSettingModel
- {
- public function getSettingAttr($data){
- if ($data){
- return json_decode($data);
- }
- return null;
- }
- public function getPage(){
- $now = time();
- return $this->where(['open_status'=>1])
- ->where('start_time','<=',$now)
- ->where('end_time','>=',$now)
- ->field('id,home_type,setting,file_id,open_status')
- ->find();
- }
- }
|