| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace App\Http\Controllers\Web\Content;
- use App\Http\Controllers\Web\WebBaseController;
- use App\Services\Content\ArticleService;
- use App\Services\Content\ArticleCategoryService;
- use App\Services\Content\AdService;
- use App\Services\Content\NavigationService;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\Cache;
- use Illuminate\Support\Collection;
- class BuyhouseController extends WebBaseController
- {
- private $street = [
- '青阳街道', '梅岭街道', '西园街道', '罗山街道', '灵源街道', '新塘街道', '陈埭镇', '池店镇', '安海镇', '磁灶镇', '内坑镇', '紫帽镇', '东石镇', '永和镇', '英林镇', '金井镇', '龙湖镇', '深沪镇', '西滨镇',
- ];
- protected $articleService;
- protected $articleCategoryService;
- protected $adService;
- protected $navigationService;
- /**
- * ArticleController constructor.
- * @param $articleService
- * @param $articleCategoryService
- */
- public function __construct(ArticleService $articleService, ArticleCategoryService $articleCategoryService, AdService $adService, NavigationService $navigationService)
- {
- $this->articleService = $articleService;
- $this->articleCategoryService = $articleCategoryService;
- $this->adService = $adService;
- $this->navigationService = $navigationService;
- }
- public function list(Request $request)
- {
- $list = [
- [
- 'id' => 1,
- 'status' => '进行中',
- 'project' => '永隆江滨城',
- 'declare_time' => '2021-01-05 至 2021-02-01',
- 'address' => '晋新路与拥军路交汇处往北500米',
- 'apply_time' => '2021-01-05 至 2021-02-01',
- 'describe' => '这是项目的描述',
- ]
- ];
- $return_data = [
- 'list' => json_encode($list),
- 'street' => json_encode($this->street),
- ];
- return view('app.content.buyhouse.list', $return_data);
- }
- public function click($id)
- {
- $rst = $this->articleService->incrementData(['id' => $id], 1, 'click');
- $data = ['status' => 0];
- if ($rst) {
- $data = ['status' => 1];
- }
- return response()->json($data);
- }
- }
|