|
@@ -13,14 +13,16 @@ class Index extends Api
|
|
|
protected $noNeedRight = [''];
|
|
|
|
|
|
/**
|
|
|
- * 首页
|
|
|
- *
|
|
|
+ * 默认
|
|
|
*/
|
|
|
public function index()
|
|
|
{
|
|
|
$this->success('请求成功');
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 首页
|
|
|
+ */
|
|
|
public function home(){
|
|
|
//轮播
|
|
|
$banner = Db::name('banner')->field('id, title, image, url')
|
|
@@ -33,16 +35,15 @@ class Index extends Api
|
|
|
//负责人
|
|
|
$header = Db::name('user_company')->field('header,header_mobile')
|
|
|
->where('user_id',$this->auth->id)->find();
|
|
|
- $header = info_domain_image($header,['header_mobile']);
|
|
|
|
|
|
//关于我们
|
|
|
$aboutus = Db::name('company')->field('aboutus,aboutus_image')
|
|
|
->where('id',$this->auth->company_id)->find();
|
|
|
- $aboutus = info_domain_image($aboutus,['header_mobile']);
|
|
|
+ $aboutus = info_domain_image($aboutus,['aboutus_image']);
|
|
|
|
|
|
//最新动态
|
|
|
$zgs_id = 0;
|
|
|
- $dongtai = Db::name('dongtai')
|
|
|
+ $dongtai = Db::name('dongtai')->field('id,title,image,updatetime')
|
|
|
->where('company_id','IN',[$this->auth->company_id,$zgs_id])
|
|
|
->order('id' , 'desc')
|
|
|
->limit(3)
|
|
@@ -61,5 +62,29 @@ class Index extends Api
|
|
|
$this->success(1, $result);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 关于我们
|
|
|
+ */
|
|
|
+ public function aboutus(){
|
|
|
+ //关于我们
|
|
|
+ $aboutus = Db::name('company')->field('aboutus,aboutus_image')
|
|
|
+ ->where('id',$this->auth->company_id)->find();
|
|
|
+ $aboutus = info_domain_image($aboutus,['aboutus_image']);
|
|
|
+
|
|
|
+ $this->success(1, $aboutus);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 维保信息
|
|
|
+ */
|
|
|
+ public function weiboinfo(){
|
|
|
+ $info = Db::name('user_company')->where('user_id',$this->auth->id)->find();
|
|
|
+ $info = info_domain_image($info,['header_avatar']);
|
|
|
+ $info['weituo_info'] = $info['weituo'].'消防设施维护保养';
|
|
|
+
|
|
|
+ $this->success(1, $info);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|