Authored by yangyang

会员等级页面,username获取ok

@@ -421,7 +421,7 @@ class HomeController extends AbstractAction @@ -421,7 +421,7 @@ class HomeController extends AbstractAction
421 //显示网站导航头部信息 421 //显示网站导航头部信息
422 $this->setNavHeader('会员等级'); 422 $this->setNavHeader('会员等级');
423 $uid = $this->getUid(); 423 $uid = $this->getUid();
424 - $uid = '10064'; //临时测试用 424 + $uid = '3566171'; //临时测试用
425 $data = GradeModel::getGrade($uid); 425 $data = GradeModel::getGrade($uid);
426 $data['pageFooter'] = true; 426 $data['pageFooter'] = true;
427 $this->_view->display('vip-grade', $data); 427 $this->_view->display('vip-grade', $data);
@@ -58,8 +58,8 @@ class GradeModel @@ -58,8 +58,8 @@ class GradeModel
58 //消费总计 58 //消费总计
59 $result['vipGrade']['sumCost'] = $data['costInfo']['total']; 59 $result['vipGrade']['sumCost'] = $data['costInfo']['total'];
60 //username 调用获取用户基本信息数据,获得username; 60 //username 调用获取用户基本信息数据,获得username;
61 - //var_dump(UserData::userData($uid));  
62 - $result['vipGrade']['name'] = '杨阳'; 61 + $userData = UserData::userData($uid);
  62 + $result['vipGrade']['name'] = $userData['username'];
63 //跳转url(会员特权详情) 63 //跳转url(会员特权详情)
64 $result['vipGrade']['allUrl'] = Helpers::url('/Home/preferential', null); 64 $result['vipGrade']['allUrl'] = Helpers::url('/Home/preferential', null);
65 //当前vip等级享受的特权 65 //当前vip等级享受的特权