29 lines
702 B
PHP
29 lines
702 B
PHP
<?php
|
|
declare (strict_types = 1);
|
|
|
|
namespace app\index\model;
|
|
|
|
|
|
/**
|
|
* @mixin \think\Model
|
|
*/
|
|
class Contact extends BaseModel
|
|
{
|
|
/**
|
|
* @param $languageId
|
|
* @param $data
|
|
* @return array|string[]
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
*/
|
|
public function getAboutBanner($languageId,$data):array
|
|
{
|
|
$space = AdvertiseSpace::where('name',$data)->select()->toArray();
|
|
if (!empty($space)) {
|
|
return $this->getBanner($languageId,$space[0]['id']);
|
|
}
|
|
return ['image' => ''];
|
|
}
|
|
}
|