...
|
...
|
@@ -13,11 +13,55 @@ class Index extends Frontend |
|
|
protected $noNeedRight = '*';
|
|
|
protected $layout = '';
|
|
|
|
|
|
public function _initialize()
|
|
|
{
|
|
|
parent::_initialize(); // TODO: Change the autogenerated stub
|
|
|
$href = '';
|
|
|
$browser = 0;
|
|
|
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') == true) {
|
|
|
$browser = 1;
|
|
|
} else if (strpos($_SERVER['HTTP_USER_AGENT'], 'AlipayClient') == true) {
|
|
|
$browser = 2;
|
|
|
} else {
|
|
|
if (stristr($_SERVER['HTTP_USER_AGENT'], 'Android')) {
|
|
|
//echo '你的手机是:Android系统';
|
|
|
$href = request()->domain() . '/package/android_debug.apk';
|
|
|
} else if (stristr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
|
|
|
//echo '你的手机是:ISO系统';
|
|
|
$browser = 3;
|
|
|
}
|
|
|
}
|
|
|
$this->view->assign('href', $href);
|
|
|
$this->view->assign('browser', $browser);
|
|
|
}
|
|
|
|
|
|
public function index()
|
|
|
{
|
|
|
return $this->view->fetch();
|
|
|
}
|
|
|
|
|
|
public function download()
|
|
|
{
|
|
|
$href = '';
|
|
|
$browser = 0;
|
|
|
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') == true) {
|
|
|
$browser = 1;
|
|
|
} else if (strpos($_SERVER['HTTP_USER_AGENT'], 'AlipayClient') == true) {
|
|
|
$browser = 2;
|
|
|
}
|
|
|
if (stristr($_SERVER['HTTP_USER_AGENT'], 'Android')) {
|
|
|
//echo '你的手机是:Android系统';
|
|
|
// $ver = Db::name('version')->order('id', 'DESC')->find();
|
|
|
$href = request()->domain() . '/package/android_debug.apk';
|
|
|
} else if (stristr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
|
|
|
//echo '你的手机是:ISO系统';
|
|
|
$browser = 3;
|
|
|
}
|
|
|
$this->assign('url', $href);
|
|
|
$this->assign('browser', $browser);
|
|
|
return $this->view->fetch();
|
|
|
}
|
|
|
|
|
|
//会有到期提醒 添加信息记录
|
|
|
public function mess()
|
|
|
{
|
...
|
...
|
|