Commit 30be2eef authored by houyadong's avatar houyadong

排行榜跳转个人主页指定收益类型

parent 1162381f
...@@ -405,6 +405,7 @@ class PkTopAction extends IdentityAction ...@@ -405,6 +405,7 @@ class PkTopAction extends IdentityAction
$userId = I('userId', '', intval); $userId = I('userId', '', intval);
$userName = I('userName', ''); $userName = I('userName', '');
$gid = I('gid', $this->GID, intval); $gid = I('gid', $this->GID, intval);
$sy = I('sy','');
if (!$userId) { if (!$userId) {
$this->ajaxReturn(['status' => 0, 'info' => '非法参数']); $this->ajaxReturn(['status' => 0, 'info' => '非法参数']);
} }
...@@ -418,7 +419,14 @@ class PkTopAction extends IdentityAction ...@@ -418,7 +419,14 @@ class PkTopAction extends IdentityAction
$goTradeInfo['userName'] = $userName; $goTradeInfo['userName'] = $userName;
$goTradeInfo['jump'] = $this->user['userID'] == $userId ? 1 : 2; $goTradeInfo['jump'] = $this->user['userID'] == $userId ? 1 : 2;
#跳转到个人主页时需要指定盈利数据
$tmp_arr = [
'zongup' => '',
'lastmonthup' => 'month',
'lastweekup' => 'week',
'lastdayup' => ''
];
$goTradeInfo['firstName'] = $tmp_arr[$sy];
$this->ajaxReturn(['status' => 1, 'data' => json_encode($goTradeInfo)]); $this->ajaxReturn(['status' => 1, 'data' => json_encode($goTradeInfo)]);
} }
...@@ -621,7 +629,13 @@ class PkTopAction extends IdentityAction ...@@ -621,7 +629,13 @@ class PkTopAction extends IdentityAction
$phb = $this->getPhb($p, $pageSize, $order); $phb = $this->getPhb($p, $pageSize, $order);
$this->assign('weekPhb', $phb[0]); $this->assign('weekPhb', $phb[0]);
$this->assign(['p' => $p, 'pageSize' => $pageSize, 'pages' => ceil($phb[1] / $pageSize), 'count' => $phb[1]]); $this->assign([
'p' => $p,
'pageSize' => $pageSize,
'pages' => ceil($phb[1] / $pageSize),
'count' => $phb[1],
'sy' => 'lastweekup'
]);
if (IS_GET) { if (IS_GET) {
//我的排名 //我的排名
...@@ -678,7 +692,13 @@ class PkTopAction extends IdentityAction ...@@ -678,7 +692,13 @@ class PkTopAction extends IdentityAction
$phb = $this->getPhb($p, $pageSize, $order); $phb = $this->getPhb($p, $pageSize, $order);
$this->assign('otherPhb', $phb[0]); $this->assign('otherPhb', $phb[0]);
$this->assign(['p' => $p, 'pageSize' => $pageSize, 'pages' => ceil($phb[1] / $pageSize), 'count' => $phb[1]]); $this->assign([
'p' => $p,
'pageSize' => $pageSize,
'pages' => ceil($phb[1] / $pageSize),
'count' => $phb[1],
'sy' => $order
]);
if (IS_GET) { if (IS_GET) {
//我的排名 //我的排名
......
...@@ -13,14 +13,12 @@ ...@@ -13,14 +13,12 @@
<eq name='key' value='2'><img src="__PUBLIC__/Home/images/g2020/crown3.png" alt=""></eq> <eq name='key' value='2'><img src="__PUBLIC__/Home/images/g2020/crown3.png" alt=""></eq>
</eq> </eq>
</span> </span>
<span class="user-head " pId="{$vo.user_id}" pName="{$vo.nick}"> <span class="user-head " pId="{$vo.user_id}" pName="{$vo.nick}" pSy="{$sy}">
<img src="{:getPortraitPath($vo['user_id'], 'small', true)}" alt=""> <img src="{:getPortraitPath($vo['user_id'], 'small', true)}" alt="">
</span> </span>
</div> </div>
<span class="head-r-t " pId="{$vo.user_id}" pName="{$vo.nick}">{$vo.nick}</span> <span class="head-r-t " pId="{$vo.user_id}" pName="{$vo.nick}" pSy="{$sy}">{$vo.nick}</span>
<span class="head-r-t"> <span class="head-r-t"></span>
</span>
</div> </div>
<p class="info-rank-w"> <p class="info-rank-w">
<eq name="order" value="zongup"> <eq name="order" value="zongup">
...@@ -67,10 +65,13 @@ ...@@ -67,10 +65,13 @@
$('.user-head,.head-r-t').click(function(){ $('.user-head,.head-r-t').click(function(){
if(flag==1)return; if(flag==1)return;
flag=1; flag=1;
$.post("/PkTop/getGoTradeInfo", {'userId':$(this).attr('pId'),'userName':$(this).attr('pName')}, function (res) { $.post("/PkTop/getGoTradeInfo", {
'userId':$(this).attr('pId'),
'userName':$(this).attr('pName'),
'sy':$(this).attr('pSy'),
}, function (res) {
if (res.status == 1) { if (res.status == 1) {
flag=0; flag=0;
// alert(res.data);
if(mfrom[1] > 0){ if(mfrom[1] > 0){
AppBridge.goTrade(res.data); AppBridge.goTrade(res.data);
} }
......
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