|
@@ -0,0 +1,52 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace app\company\controller;
|
|
|
+
|
|
|
+use app\common\controller\Apic;
|
|
|
+use think\Db;
|
|
|
+/**
|
|
|
+ * 轮播图
|
|
|
+ */
|
|
|
+class Usercenter extends Apic
|
|
|
+{
|
|
|
+ protected $noNeedLogin = ['*'];
|
|
|
+ protected $noNeedRight = ['*'];
|
|
|
+
|
|
|
+ //轮播图
|
|
|
+ public function set_banner()
|
|
|
+ {
|
|
|
+ //轮播图
|
|
|
+ $banner_images = input('banner_images','');
|
|
|
+ Db::name('banner')->where('company_id',$this->auth->company_id)->delete();
|
|
|
+
|
|
|
+ $banner_images = explode(',',$banner_images);
|
|
|
+ if(!empty($banner_images)){
|
|
|
+ foreach($banner_images as $key => $val){
|
|
|
+ $insert_all[] = [
|
|
|
+ 'image' => $val,
|
|
|
+ 'company_id' => $this->auth->company_id,
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ Db::name('banner')->insertAll($insert_all);
|
|
|
+ }
|
|
|
+
|
|
|
+ //关于我们图
|
|
|
+ $aboutus_image = input('aboutus_image','');
|
|
|
+
|
|
|
+ $update = ['aboutus_image'=>$aboutus_image];
|
|
|
+ Db::name('company')->where('id',$this->auth->company_id)->update($update);
|
|
|
+
|
|
|
+ $this->success();
|
|
|
+ }
|
|
|
+
|
|
|
+ //编辑关于我们
|
|
|
+ public function set_aboutus()
|
|
|
+ {
|
|
|
+ $aboutus_image = input('aboutus','');
|
|
|
+
|
|
|
+ $update = ['aboutus'=>$aboutus_image];
|
|
|
+ Db::name('company')->where('id',$this->auth->company_id)->update($update);
|
|
|
+
|
|
|
+ $this->success();
|
|
|
+ }
|
|
|
+}
|