Commit 456e2d1c by 冷斌

测试首页

parent 32eb5925
...@@ -35,6 +35,9 @@ class IndexAction extends CommonAction ...@@ -35,6 +35,9 @@ class IndexAction extends CommonAction
*/ */
public function index() public function index()
{ {
echo '猜猜是不是首页';
die;
// 取得首页配置 // 取得首页配置
$config = model('Xdata')->get('admin_Config:index_item'); $config = model('Xdata')->get('admin_Config:index_item');
//加载首页头部轮播广告位 //加载首页头部轮播广告位
...@@ -271,7 +274,7 @@ class IndexAction extends CommonAction ...@@ -271,7 +274,7 @@ class IndexAction extends CommonAction
if ($credit['score'] > 0) { if ($credit['score'] > 0) {
$wt_type = 1; $wt_type = 1;
$note = $note.'点评点赞获得的积分'; $note = $note.'点评点赞获得的积分';
} }
model('Credit')->addUserCreditRule($fid, $wt_type, $credit['id'], $credit['name'], $credit['score'], $credit['count'], $note); model('Credit')->addUserCreditRule($fid, $wt_type, $credit['id'], $credit['name'], $credit['score'], $credit['count'], $note);
} }
$this->mzSuccess('添加成功'); $this->mzSuccess('添加成功');
...@@ -1110,14 +1113,14 @@ class IndexAction extends CommonAction ...@@ -1110,14 +1113,14 @@ class IndexAction extends CommonAction
// S($video_price.$vo['id'], $vo['dis_price']); // S($video_price.$vo['id'], $vo['dis_price']);
} }
$vo['keshi']=M('Zy_video_section')->where("vid='".$vo['id']."' and pid!=0 and is_activity=1")->count(); $vo['keshi']=M('Zy_video_section')->where("vid='".$vo['id']."' and pid!=0 and is_activity=1")->count();
$view_url_arr = [ $view_url_arr = [
1 => U('course/Video/view',array('id'=>$vo['id'])), 1 => U('course/Video/view',array('id'=>$vo['id'])),
2 => U('live/Index/view',array('id'=>$vo['id'])), 2 => U('live/Index/view',array('id'=>$vo['id'])),
6 => U('course/Classes/view',array('id'=>$vo['id'])), 6 => U('course/Classes/view',array('id'=>$vo['id'])),
]; ];
$vo['view_url'] = $view_url_arr[$vo['type']]; $vo['view_url'] = $view_url_arr[$vo['type']];
//机构对应的大分类id //机构对应的大分类id
$sch1 = array_filter(explode(',', $vo['fullcategorypath']))[1]; $sch1 = array_filter(explode(',', $vo['fullcategorypath']))[1];
if($vl['id'] == $sch1){ if($vl['id'] == $sch1){
...@@ -1437,7 +1440,7 @@ class IndexAction extends CommonAction ...@@ -1437,7 +1440,7 @@ class IndexAction extends CommonAction
$this->assign('unique_cate', $unique_cate); $this->assign('unique_cate', $unique_cate);
} }
/** /**
* 主题模板9获取意向数据 * 主题模板9获取意向数据
* @Author 亓官雨树<lucky.max@foxmail.com> * @Author 亓官雨树<lucky.max@foxmail.com>
...@@ -1490,7 +1493,7 @@ class IndexAction extends CommonAction ...@@ -1490,7 +1493,7 @@ class IndexAction extends CommonAction
} }
/** /**
* 去除三级分类无数据的一二级分类 * 去除三级分类无数据的一二级分类
* @Author 亓官雨树<lucky.max@foxmail.com> * @Author 亓官雨树<lucky.max@foxmail.com>
* @DateTime 2019-09-18 * @DateTime 2019-09-18
*/ */
...@@ -1512,7 +1515,7 @@ class IndexAction extends CommonAction ...@@ -1512,7 +1515,7 @@ class IndexAction extends CommonAction
$third_cate[] = $ca; $third_cate[] = $ca;
} }
$category['third_cate'] = $third_cate; $category['third_cate'] = $third_cate;
$thatpid = $cate['pid']; $thatpid = $cate['pid'];
$thatid = $cate['id']; $thatid = $cate['id'];
$cate['url'] = U('course/Video/index', ['cateId'=>",$thatpid,$thatid"]); $cate['url'] = U('course/Video/index', ['cateId'=>",$thatpid,$thatid"]);
...@@ -1607,7 +1610,7 @@ class IndexAction extends CommonAction ...@@ -1607,7 +1610,7 @@ class IndexAction extends CommonAction
OPEN_SCHOOL && $where['v.show_place'] = ['NEQ', 2]; OPEN_SCHOOL && $where['v.show_place'] = ['NEQ', 2];
$data = M('zy_video')->join("v INNER JOIN " . C("DB_PREFIX") . "zy_course_events e ON v.id=e.course_id AND e.start_time<{$time} AND e.end_time>{$time}")->where($where)->field("v.id,v.cover,v.type")->limit(3)->select(); $data = M('zy_video')->join("v INNER JOIN " . C("DB_PREFIX") . "zy_course_events e ON v.id=e.course_id AND e.start_time<{$time} AND e.end_time>{$time}")->where($where)->field("v.id,v.cover,v.type")->limit(3)->select();
foreach ($data as $key => &$val) { foreach ($data as $key => &$val) {
$val['video_title'] = mStr($val['video_title'], 10); $val['video_title'] = mStr($val['video_title'], 10);
if($val['type'] == 1){ if($val['type'] == 1){
...@@ -1888,7 +1891,7 @@ class IndexAction extends CommonAction ...@@ -1888,7 +1891,7 @@ class IndexAction extends CommonAction
$cache->set('weixin_mp_76',$json); $cache->set('weixin_mp_76',$json);
echo '提现成功'; echo '提现成功';
} }
} }
public function getwxcache() public function getwxcache()
......
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