12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- namespace app\index\controller;
- use app\common\controller\Frontend;
- use app\utils\PayUtil;
- use think\Db;
- class Index extends Frontend
- {
- protected $noNeedLogin = '*';
- protected $noNeedRight = '*';
- protected $layout = '';
- /**
- * @return void
- */
- public function aa()
- {
- $pay = new PayUtil();
- $pay->jsPay('123123123123123','0.01','开通会员');
- return json_encode($pay->getData());
- }
- public function index()
- {
- $code = input('code', '', 'trim'); //邀请码
- $this->view->assign('code', $code);
- $this->view->assign('downurl', config("site.apk_url"));
- $is_ios = 0;
- if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
- $is_ios = 1;
- }
- $this->view->assign('is_ios', $is_ios);
- return $this->view->fetch();
- }
- public function wxsharedownload(){
- $this->view->assign('downurl', config("site.apk_url"));
- return $this->view->fetch();
- }
- public function suningh5(){
- return $this->view->fetch();
- }
- /**
- * app下载页
- * 判断是安卓还是ios
- */
- public function appdownload() {
- echo 'hello wold';
- }
-
- /**
- * app下载页-新
- * 判断是安卓还是ios
- */
- public function downapp() {
- $code = input('code', '', 'trim'); //邀请码
- $this->view->assign('code', $code);
- $this->view->assign('downurl', config("site.apk_url"));
- return $this->view->fetch();
- // if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
- // header("Location: https://apps.apple.com/cn/app/%E4%BC%B4%E5%A3%B0%E8%AF%AD%E9%9F%B3/id1556551099");
- // }else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
- // //$host = $_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"];
- // //header("Location: ".$host."/index/index/download");
- // $this->view->assign('downurl', config("site.apk_url"));
- // return $this->view->fetch();
- // }else{
- // $this->view->assign('downurl', config("site.apk_url"));
- // return $this->view->fetch();
- // }
- }
- //基础文章网页
- public function basedata(){
- $key = input('key','');
- if(!$key){
- exit;
- }
- $content = Db::name('basedata')->where('key',$key)->find();
- $this->assign('content',$content['content']);
- return $this->fetch();
- }
- }
|