feature #1
|
@ -20,7 +20,6 @@ class Index extends Controller
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
if (Auth::check()) {
|
|
||||||
$this->data = [
|
$this->data = [
|
||||||
'webTitle' => empty($tempStorage = DB::table('info')->find(1)->data) ? '未定义标题' : $tempStorage,
|
'webTitle' => empty($tempStorage = DB::table('info')->find(1)->data) ? '未定义标题' : $tempStorage,
|
||||||
'webDescription' => empty($tempStorage = DB::table('info')->find(2)->data) ? '未定义副标题' : $tempStorage,
|
'webDescription' => empty($tempStorage = DB::table('info')->find(2)->data) ? '未定义副标题' : $tempStorage,
|
||||||
|
@ -30,9 +29,6 @@ public function __construct()
|
||||||
'webHeader' => DB::table('info')->find(7)->data,
|
'webHeader' => DB::table('info')->find(7)->data,
|
||||||
'webFooter' => DB::table('info')->find(8)->data,
|
'webFooter' => DB::table('info')->find(8)->data,
|
||||||
'webKeyword' => empty($tempStorage = DB::table('info')->find(6)->data) ? '筱锋,凌中的锋雨,xiao_lfeng' : $tempStorage,
|
'webKeyword' => empty($tempStorage = DB::table('info')->find(6)->data) ? '筱锋,凌中的锋雨,xiao_lfeng' : $tempStorage,
|
||||||
'userName' => Auth::user()->username,
|
|
||||||
'userEmail' => Auth::user()->email,
|
|
||||||
'userIcon' => Auth::user()->icon,
|
|
||||||
'sqlAuthor' => empty($tempStorage = DB::table('info')->find(12)->data) ? '筱锋xiao_lfeng' : $tempStorage,
|
'sqlAuthor' => empty($tempStorage = DB::table('info')->find(12)->data) ? '筱锋xiao_lfeng' : $tempStorage,
|
||||||
'sqlCopyRightYear' => DB::table('info')->find(13)->data,
|
'sqlCopyRightYear' => DB::table('info')->find(13)->data,
|
||||||
'sqlIcp' => DB::table('info')->find(10)->data,
|
'sqlIcp' => DB::table('info')->find(10)->data,
|
||||||
|
@ -43,8 +39,11 @@ public function __construct()
|
||||||
preg_match('/[0-9]+/', $this->data['sqlGongan'], $data);
|
preg_match('/[0-9]+/', $this->data['sqlGongan'], $data);
|
||||||
$this->data = array_merge($this->data, ['GonganCode' => $data[0]]);
|
$this->data = array_merge($this->data, ['GonganCode' => $data[0]]);
|
||||||
}
|
}
|
||||||
} else {
|
if (Auth::check()) {
|
||||||
$this->data = array();
|
$this->data = array_merge($this->data,[
|
||||||
|
'userName' => Auth::user()->username,
|
||||||
|
'userEmail' => Auth::user()->email,
|
||||||
|
'userIcon' => Auth::user()->icon]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user