如果是商家则显示企业服务

This commit is contained in:
wangxiaowei 2024-08-11 20:29:49 +08:00
parent 0c9f90f0e4
commit 84f014921d

@ -193,16 +193,20 @@ class Index extends Api
// 控制显示本地生活
public function setHome(){
$arr = array(
array(
"image"=>'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/all_service.png',
"name"=>'企业服务',
"is_tab"=> 0,
"link"=>'/bundle_b/pages/local_shop_category/index',
"link_type"=>1,
"is_set"=>0
)
);
$local = Db::name("local_store")->where("user_id",$this->user_id)->where("is_delete",0)->select()->toArray();
$arr = [];
if(!empty($local)){
$arr = array(
array(
"image"=>'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/all_service.png',
"name"=>'企业服务',
"is_tab"=> 0,
"link"=>'/bundle_b/pages/local_shop_category/index',
"link_type"=>1,
"is_set"=>0
)
);
}
return JsonServer::success('查询成功', $arr);
}