first commit
This commit is contained in:
19
application/mobile/common.php
Normal file
19
application/mobile/common.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// +------------------------------------------------+
|
||||
// |http://www.cjango.com |
|
||||
// +------------------------------------------------+
|
||||
// | 修复BUG不是一朝一夕的事情,等我喝醉了再说吧! |
|
||||
// +------------------------------------------------+
|
||||
// | Author: 小陈叔叔 <Jason.Chen> |
|
||||
// +------------------------------------------------+
|
||||
use think\Loader;
|
||||
//幻灯
|
||||
function advert($id)
|
||||
{
|
||||
$info = Loader::model('Advert')->find($id);
|
||||
if ($info && $info->status == 1) {
|
||||
return $info->detail()->where('status', 1)->limit($info->limit)->order('sort asc')->select();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user