Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cof_vip
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
houdong
cof_vip
Commits
ad213dc6
Commit
ad213dc6
authored
Jul 05, 2023
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增委托列表
parent
93136308
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
24 deletions
+56
-24
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+43
-1
UserModel.class.php
app/Lib/Model/UserModel.class.php
+1
-16
itemTrade.html
app/Tpl/Vip/PkTop/itemTrade.html
+12
-7
No files found.
app/Lib/Action/Vip/PkTopAction.class.php
View file @
ad213dc6
...
...
@@ -1304,7 +1304,49 @@ class PkTopAction extends IdentityAction{
// $this->assign('order',$order);
$gInfo
=
D
(
'Group'
)
->
getGroup
(
$this
->
GID
);
$phb
=
D
(
'User'
)
->
getEntrust
(
$gInfo
,
$p
,
$pageSize
);
$this
->
assign
(
'wtList'
,
$phb
[
0
]);
$wtList
=
$phb
[
0
];
//取最新价
$stockHq
=
[];
$stockCodes
=
array_column
(
$wtList
,
'stock_code'
);
$res
=
D
(
'Stock'
)
->
stockQuotation
(
implode
(
','
,
$stockCodes
),[
'type'
=>
1
]);
if
(
count
(
$stockCodes
)
==
1
)
{
$typeCode
=
strtolower
(
$wtList
[
0
][
'stock_type'
]
.
$stockCodes
);
$stockHq
[
$typeCode
]
=
$res
;
}
else
{
$stockHq
=
$res
;
}
foreach
(
$wtList
as
$key
=>
&
$e
)
{
$stockCodeType
=
strtolower
(
$e
[
'stock_type'
]
.
$e
[
'stock_code'
]);
$quo
=
$stockHq
[
$stockCodeType
];
if
(
$quo
){
//根据成交价和最新价算涨跌
$nowPrice
=
formatPrice
((
$quo
[
'nowprice'
]
>
0
?
$quo
[
'nowprice'
]
:
$quo
[
'closePrice'
]));
$e
[
'now_price'
]
=
$nowPrice
;
$e
[
'zd'
]
=
formatPrice
((
$nowPrice
-
$e
[
'cj_price'
])
/
$e
[
'cj_price'
]
*
100
,
2
)
.
'%'
;
}
// $userids[] =$e['CD'];
}
$nick_name_arry
=
getUser
(
array_column
(
$wtList
,
'CD'
),
'nick'
);
$tids
=
array_column
(
$wtList
,
'userid'
);
$tInfo
=
M
(
"userinfo"
,
" "
,
C
(
'DB_CONFIG_MNCG3'
))
->
where
([
'uid'
=>
[
'in'
,
$tids
]])
->
cache
(
true
,
60
)
->
getField
(
'uid,new_phb,zongup'
);
foreach
(
$wtList
as
&
$n
)
{
$nick_name
=
$nick_name_arry
[
$n
[
'CD'
]];
$n
[
'username'
]
=
$nick_name
;
$n
[
'cj_time'
]
=
substr
(
$n
[
'cj_time'
],
0
,
16
);
$n
[
'entrust_bs'
]
=
$n
[
'entrust_bs'
]
==
'r'
?
'买入'
:
'卖出'
;
$n
[
'price'
]
=
number_format
(
$n
[
'price'
],
2
,
'.'
,
''
);
$n
[
'cj_price'
]
=
number_format
(
$n
[
'cj_price'
],
2
,
'.'
,
''
);
// $n['phb'] =$phbs[$n['userid']];
$n
[
'phb'
]
=
$tInfo
[
$n
[
'userid'
]][
'new_phb'
];
$n
[
'zongup'
]
=
$tInfo
[
$n
[
'userid'
]][
'zongup'
];
}
$this
->
assign
(
'wtList'
,
$wtList
);
$this
->
assign
([
'p'
=>
$p
,
'pageSize'
=>
$pageSize
,
'pages'
=>
ceil
(
$phb
[
1
]
/
$pageSize
),
'count'
=>
$phb
[
1
]]);
...
...
app/Lib/Model/UserModel.class.php
View file @
ad213dc6
...
...
@@ -165,22 +165,7 @@ class UserModel extends Model{
}
//
//
// foreach ($entrustList as $key => &$e) {
// $e['headImg'] = getAvatarPath($e['CD'],'small',true);
// $e['cj_time']=substr($e['cj_time'],0,16);
// $e['entrust_bs']=$e['entrust_bs']=='r'?'买入':'卖出';
// $e['price'] =number_format($e['price'],2,'.','');
// $e['cj_price'] =number_format($e['cj_price'],2,'.','');
// $e['phb'] =$phbs[$e['userid']];
// $userids[] =$e['CD'];
// }
// $nick_name_arry =getUser($userids,'nick');
// foreach ($entrustList as &$n) {
// $nick_name = $nick_name_arry[$n['CD']];
// $n['username'] = $nick_name;
// }
return
[
$entrustList
,
$total
?
$total
:
0
];
...
...
app/Tpl/Vip/PkTop/itemTrade.html
View file @
ad213dc6
...
...
@@ -14,18 +14,23 @@
<td><eq
name=
"vo.entrust_bs"
value=
"r"
>
买入
<else/>
卖出
</eq>
价:
<span
class=
"num"
>
{$vo.cj_price|default='-'}
</span></td>
<td><eq
name=
"vo.entrust_bs"
value=
"r"
>
买入
<else/>
卖出
</eq>
数量:
<span
class=
"num"
>
{$vo.amount|default='-'}
</span></td>
</tr>
<tr>
<lt
name=
"vo.zd"
value=
"0"
><td>
当前价:
<span
class=
"green"
>
{$vo.now_price|default='-'}({$vo.zd|default='-'})
</span></td></lt>
<gt
name=
"vo.zd"
value=
"0"
><td>
当前价:
<span
class=
"red"
>
{$vo.now_price|default='-'}({$vo.zd|default='-'})
</span></td></gt>
<eq
name=
"vo.zd"
value=
"0"
><td>
当前价:
<span>
{$vo.now_price|default='-'}({$vo.zd|default='-'})
</span></td></eq>
<!-- <tr>-->
<!-- <lt name="vo.zd" value="0"><td>当前价:<span class="green">{$vo.now_price|default='-'}({$vo.zd|default='-'})</span></td></lt>-->
<!-- <gt name="vo.zd" value="0"><td>当前价:<span class="red">{$vo.now_price|default='-'}({$vo.zd|default='-'})</span></td></gt>-->
<!-- <eq name="vo.zd" value="0"><td>当前价:<span>{$vo.now_price|default='-'}(0.00%)</span></td></eq>-->
<td>
当前价:
<span
class=
"<egt name='vo.zd' value='0'>red<else/>green</egt> "
>
{$vo.now_price|default='-'}({$vo.zd|default='-'})
</span></td>
<td>
成交价:
<span
class=
"num"
>
{$vo.cj_price}
</span></td>
</tr>
</table>
<div
class=
"team-no"
>
<span
class=
"team-no-span"
>
成员背景:
<span
class=
"c3"
>
大赛排名No.{$vo.phb|default='-'}
</span></span>
<lt
name=
"vo.zongup"
value=
"0"
><span>
总盈利率:
<span
class=
"green"
>
{$vo.zongup|default='-'}%
</span></span></lt>
<gt
name=
"vo.zongup"
value=
"0"
><span>
总盈利率:
<span
class=
"red"
>
{$vo.zongup|default='-'}%
</span></span></gt>
<eq
name=
"vo.zongup"
value=
"0"
><span>
总盈利率:
<span>
{$vo.zongup|default='-'}%
</span></span></eq>
<!-- <lt name="vo.zongup" value="0"><span>总盈利率:<span class="green">{$vo.zongup|default='-'}%</span></span></lt>-->
<!-- <gt name="vo.zongup" value="0"><span>总盈利率:<span class="red">{$vo.zongup|default='-'}%</span></span></gt>-->
<!-- <eq name="vo.zongup" value="0"><span>总盈利率:<span>0.00%</span></span></eq>-->
<span>
总盈利率:
<span
class=
"<egt name='vo.zongup' value='0'>red<else/>green</egt> "
>
{$vo.zongup|default='-'}%
</span></span>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment