-
Notifications
You must be signed in to change notification settings - Fork 1
/
AboutController.php
executable file
·40 lines (35 loc) · 1.22 KB
/
AboutController.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace App\Http\Controllers\Company;
use App\Api\ApiBusiness\ApiComModule;
class AboutController extends BaseController
{
/**
* 企业页面 关于公司
*/
//genre:1公司简介,2公司历程,3新闻,4资讯
public function __construct()
{
parent::__construct();
$this->list['func']['name'] = '关于公司';
$this->list['func']['url'] = 'about';
}
public function index($cid,$genre=1)
{
$company = $this->company($cid,$this->list['func']['url']);
$cid = $company['company']['id'];
$pageCurr = isset($_GET['page']) ? $_GET['page'] : 1;
$apiModule = ApiComModule::getModuleByGenre($cid,$genre);
if ($apiModule['code']!=0) {
echo "<script>alert('".$apiModule['msg']."');history.go(-1);</script>";exit;
}
$apiFunc = $this->getFuncs($cid,5,$genre,$pageCurr);
$result = [
'modules' => $apiModule['data'],
'datas' => $apiFunc['datas'],
'pagelist' => $apiFunc['pagelist'],
'prefix_url' => $this->prefix_url,
'genre' => $genre,
];
return view('company.about.index', $result);
}
}