123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?php
- namespace app\index\controller;
- use think\Controller;
- use think\Db;
- use think\Request;
- class Index extends Controller
- {
- public function index(){
- }
- //试课 支付成功页
- public function paysuccess(){
- $out_trade_no = input('out_trade_no','');
- $info = Db::name('trylesson_order')->alias('order')
- ->field('order.order_no,order.order_amount,
- user.firstname,user.lastname,user.mobile,user.email,
- trylesson.name,trylesson.name_en
- ')
- ->join('user','order.user_id = user.id','LEFT')
- ->join('trylesson','order.trylesson_id = trylesson.id','LEFT')
- ->where('order.order_no',$out_trade_no)->find();
- $this->assign('info',$info);
- $this->assign('nowtime',date('Y-m-d H:i'));
- return $this->fetch();
- }
- //售课 支付成功页
- public function lesson_paysuccess(){
- $out_trade_no = input('out_trade_no','');
- $info = Db::name('lesson_order')->alias('order')
- ->field('order.order_no,order.order_amount,
- user.firstname,user.lastname,user.mobile,user.email,
- lesson.name,lesson.name_en
- ')
- ->join('user','order.user_id = user.id','LEFT')
- ->join('lesson','order.lesson_id = lesson.id','LEFT')
- ->where('order.order_no',$out_trade_no)->find();
- $this->assign('info',$info);
- $this->assign('nowtime',date('Y-m-d H:i'));
- return $this->fetch();
- }
- //套餐 支付成功页
- public function package_paysuccess(){
- $out_trade_no = input('out_trade_no','');
- $info = Db::name('package_order')->alias('order')
- ->field('order.order_no,order.price as order_amount,
- user.firstname,user.lastname,user.mobile,user.email,
- lesson_package.name,lesson_package.name_en
- ')
- ->join('user','order.user_id = user.id','LEFT')
- ->join('lesson_package','order.package_id = lesson_package.id','LEFT')
- ->where('order.order_no',$out_trade_no)->find();
- $this->assign('info',$info);
- $this->assign('nowtime',date('Y-m-d H:i'));
- return $this->fetch();
- }
- //基础文章网页
- public function basedata(){
- $key = input('key','','trim');
- if(!$key){
- exit;
- }
- $lang = input('lang','zh-cn','strtolower');
- $content = Db::name('basedata')->where('key',$key)->find();
- if($lang == 'en'){
- $content['content'] = $content['content_en'];
- }
- $this->assign('content',$content['content']);
- return $this->fetch();
- }
- /**
- * app下载页
- * 判断是安卓还是ios
- * 用不到了,现在使用 index/appdown/index
- */
- public function appdownload() {
- if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
- header("Location: ".config('site.ios_downurl'));
- }else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
- $this->view->assign('downurl', config("site.android_apkUrl"));
- return $this->view->fetch();
- }else{
- $this->view->assign('downurl', config("site.android_apkUrl"));
- return $this->view->fetch();
- }
- }
- }
|