123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\api\controller\company;
- use app\common\controller\Apic;
- use think\Db;
- /**
- * 轮播图管理
- */
- class Banner extends Apic
- {
- protected $noNeedLogin = [];
- protected $noNeedRight = '*';
- //某门店的轮播图
- public function banner_list(){
- $where = [
- 'company_id' => $this->auth->company_id,
- 'position' => 0, //首页
- ];
- $index = Db::name('banner')->where($where)->order('weigh desc,id desc')->select();
- $index = list_domain_image($index,['image']);
- $where = [
- 'company_id' => $this->auth->company_id,
- 'position' => 1, //门店印象
- ];
- $store = Db::name('banner')->where($where)->order('weigh desc,id desc')->autopage()->select();
- $store = list_domain_image($store,['image']);
- $rs = [
- 'index' => $index,
- 'store' => $store,
- ];
- $this->success(1,$rs);
- }
- }
|