|
|
@@ -70,6 +70,7 @@ use App\Model\Message;
|
|
|
use App\Model\ResearchTopic;
|
|
|
use App\Model\RetopicUser;
|
|
|
use App\Model\SinglePage;
|
|
|
+use App\Model\WebCateinfo;
|
|
|
#[RpcService(name: "WebService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
|
|
|
class WebService implements WebServiceInterface
|
|
|
{
|
|
|
@@ -3979,5 +3980,34 @@ class WebService implements WebServiceInterface
|
|
|
}
|
|
|
return Result::success($child_cate);
|
|
|
}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * @param array $data
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function getWebsiteTypeweb(array $data): array
|
|
|
+ {
|
|
|
+ $web = Website::where('id',$data['website_id'])->first();
|
|
|
+ if (empty($web)) {
|
|
|
+ return Result::error("暂无相关网站信息", 0);
|
|
|
+ }
|
|
|
+ unset($data['website_id']);
|
|
|
+ $where = ['status' => 1];
|
|
|
+ if (isset($data['province_id']) && !empty($data['province_id'])) {
|
|
|
+ $where['province_id'] = $data['province_id'];
|
|
|
+ }
|
|
|
+ if (isset($data['city_id']) && !empty($data['city_id'])) {
|
|
|
+ $where['city_id'] = $data['city_id'];
|
|
|
+ }
|
|
|
+ if (isset($data['county_id']) && !empty($data['county_id'])) {
|
|
|
+ $where['county_id'] = $data['county_id'];
|
|
|
+ }
|
|
|
+ if (isset($data['type_id']) && !empty($data['type_id'])) {
|
|
|
+ $where['type_id'] = $data['type_id'];
|
|
|
+ }
|
|
|
+ $web_cateinfo = WebCateinfo::where($where)->get()->all();
|
|
|
+ if (empty($web_cateinfo)) {
|
|
|
+ return Result::error("暂无相关官网导航相关信息!", 0);
|
|
|
+ }
|
|
|
+ return Result::success($web_cateinfo);
|
|
|
+ }
|
|
|
}
|