Commit a934d42a authored by clone's avatar clone

app 模块安卓版本下载

parent 087725bb
<?php <?php
namespace app\app\controller; namespace app\app\controller;
use app\model\AppVersion;
use app\model\HouseImgs; use app\model\HouseImgs;
use app\model\HouseInfos; use app\model\HouseInfos;
use think\Controller; use think\Controller;
...@@ -11,45 +13,56 @@ class Index ...@@ -11,45 +13,56 @@ class Index
protected $db; protected $db;
protected $dbImg; protected $dbImg;
protected $appVersion;
public function __construct() public function __construct()
{ {
$this->db = new HouseInfos(); $this->db = new HouseInfos();
$this->dbImg = new HouseImgs(); $this->dbImg = new HouseImgs();
$this->appVersion = new AppVersion();
} }
public function index() public function index()
{ {
return view('index/index'); return view('index/index');
} }
public function share_detail() public function share_detail()
{ {
return view('index/share_detail'); return view('index/share_detail');
} }
public function share_register() public function share_register()
{ {
return view('index/share_register'); return view('index/share_register');
} }
public function agent_detail() public function agent_detail()
{ {
return view('index/agent_detail'); return view('index/agent_detail');
} }
public function agreement() public function agreement()
{ {
return view('index/agreement'); return view('index/agreement');
} }
public function agreement_app() public function agreement_app()
{ {
return view('index/agreement_app'); return view('index/agreement_app');
} }
public function more_pingjia() public function more_pingjia()
{ {
return view('index/more_pingjia'); return view('index/more_pingjia');
} }
public function more_chengjiao() public function more_chengjiao()
{ {
return view('index/more_chengjiao'); return view('index/more_chengjiao');
} }
/** /**
* 楼盘详情 * 楼盘详情
* @return \think\Response * @return \think\Response
...@@ -81,6 +94,18 @@ class Index ...@@ -81,6 +94,18 @@ class Index
} }
/**
* 获取最近版本号 安卓
* @return \think\Response
*/
public function getVersionNo()
{
$versionResult = $this->appVersion->getVersion("android");
return $this->response("200", "request success", $versionResult);
}
/** /**
* 输出返回数据 * 输出返回数据
* @param string $msg 提示消息内容 * @param string $msg 提示消息内容
......
...@@ -22,6 +22,7 @@ Route::group('app', [ ...@@ -22,6 +22,7 @@ Route::group('app', [
'agreement' => [ 'app/index/agreement', [ 'method' => 'get' ] ], 'agreement' => [ 'app/index/agreement', [ 'method' => 'get' ] ],
'agreement_app' => [ 'app/index/agreement_app', [ 'method' => 'get' ] ], 'agreement_app' => [ 'app/index/agreement_app', [ 'method' => 'get' ] ],
'getShopDetails' => [ 'app/index/getShopDetail', [ 'method' => 'get | post' ] ], 'getShopDetails' => [ 'app/index/getShopDetail', [ 'method' => 'get | post' ] ],
'getVersionNo' => [ 'app/index/getVersionNo', [ 'method' => 'get | post' ] ],
]); ]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment