|
@@ -0,0 +1,45 @@
|
|
|
+<?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);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|