Commit 75ac958f by 冷斌

个人中心 - vip

parent 12113ae5
......@@ -138,6 +138,13 @@ class UserAction extends CommonAction
$videocount = intval($order_album + $order_classes + $order_line + $video_data['count'] + $live_data['count']);
// 关注的讲师和学员数
$followcount = M('user_follow')->where(['uid'=>$uid])->count();
// vip
$vip = '';
$userVip = M('zy_learncoin')->where(['uid'=>$uid])->getField('vip_type');
if (!empty($userVip['vip_type'])) {
$vipInfo = M('user_vip')->where(['id'=>$userVip['vip_type']])->getField('title');
$vip = $vipInfo['title'];
}
$this->assign("coupon_count", $coupon['count']);
$this->assign("invite_url", $invite_url);
......@@ -146,13 +153,15 @@ class UserAction extends CommonAction
$this->assign('videocount', $videocount);
$this->assign('followcount', $followcount);
$this->assign('uid', $uid);
$this->assign('vip', $vip);
// 测试用
if($_GET['aaa']){
$this->display('index1');
}else{
$this->display();
$this->display();
}
}
public function recharge()
......@@ -3514,7 +3523,7 @@ class UserAction extends CommonAction
//获取课时最后的排序
$last_sort = M('zy_video_section')->where(array('vid' => $result['vid'], 'pid' => $result['pid']))->order('sort DESC')->getField('sort');
$result['sort'] = $last_sort+1;
$resadd = M('zy_video_section')->add($result);
$video_section = M('zy_video_section')->where(array('vid' => $result['vid'], 'pid' => ['neq', 0], 'is_activity' => ['gt', 1]))->count();
if ($res && $resadd) {
......@@ -5089,7 +5098,7 @@ class UserAction extends CommonAction
}
}
}
//用户组信息
$school = M('user_group')->where('user_group_id='.$id)->getField('user_group_name');
......
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