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
5f11fdb3
Commit
5f11fdb3
authored
Jul 05, 2023
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邀请功能
parent
9c13ab9e
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
726 additions
and
687 deletions
+726
-687
IndexAction.class.php
app/Lib/Action/Vip/IndexAction.class.php
+118
-119
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+563
-565
UserModel.class.php
app/Lib/Model/UserModel.class.php
+42
-0
jiang.html
app/Tpl/Vip/Index/jiang.html
+3
-3
userList_____.html
app/Tpl/Vip/Index/userList_____.html
+0
-0
indexOld____.html
app/Tpl/Vip/PkTop/indexOld____.html
+0
-0
No files found.
app/Lib/Action/Vip/IndexAction.class.php
View file @
5f11fdb3
This diff is collapsed.
Click to expand it.
app/Lib/Action/Vip/PkTopAction.class.php
View file @
5f11fdb3
This diff is collapsed.
Click to expand it.
app/Lib/Model/UserModel.class.php
View file @
5f11fdb3
...
@@ -55,6 +55,48 @@ class UserModel extends Model{
...
@@ -55,6 +55,48 @@ class UserModel extends Model{
return
!
empty
(
$r
)
?
$r
[
'concern_user_id'
]
:
0
;
return
!
empty
(
$r
)
?
$r
[
'concern_user_id'
]
:
0
;
}
}
//参赛送1.88元
public
function
addMoney
(
$userId
,
$userName
,
$mobile
){
$wallet
=
M
(
'Wallet'
)
->
where
([
'user_id'
=>
$userId
])
->
find
();
if
(
empty
(
$wallet
)){
M
(
'Wallet'
)
->
add
([
'user_id'
=>
$userId
,
'user_name'
=>
$userName
,
'add_time'
=>
time
(),
'money'
=>
1.88
]);
}
else
{
M
(
'Wallet'
)
->
where
([
'user_id'
=>
$userId
])
->
setInc
(
'money'
,
1.88
);
}
$addData
=
[
'user_id'
=>
$userId
,
'user_name'
=>
$userName
,
'mobile'
=>
$mobile
,
'item_money'
=>
1.88
,
'item_time'
=>
time
(),
'group_id'
=>
PRIZE_GROUP_2021
,
'status'
=>
1
,
'note'
=>
'【全民分赛场】报名奖励红包'
];
M
(
'WalletItem'
)
->
add
(
$addData
);
}
//加入邀请表
public
function
addInvite
(
$userIdB
,
$userNameB
){
$aid
=
cookie
(
'aid'
);
if
(
$aid
){
$ucA
=
uc_get_user
([
'userId'
=>
$aid
,
'type'
=>
3
]);
$ucDataA
=
$ucA
[
'data'
];
$userNameA
=
$ucDataA
[
'user_name'
];
//检查被邀请人是否被邀请过
$oldB
=
M
(
'WalletInvite'
)
->
where
([
'user_id_b'
=>
$userIdB
,
'status'
=>
1
])
->
count
();
if
(
$oldB
){
//-1不显示在界面上
M
(
'WalletInvite'
)
->
add
([
'user_id_a'
=>
$aid
,
'user_name_a'
=>
$userNameA
,
'user_id_b'
=>
$userIdB
,
'user_name_b'
=>
$userNameB
,
'status'
=>-
1
,
'add_time'
=>
time
(),
'group_id'
=>
PRIZE_GROUP_2021
]);
}
else
{
//status0报名未审核,1审核通过已报名状态
M
(
'WalletInvite'
)
->
add
([
'user_id_a'
=>
$aid
,
'user_name_a'
=>
$userNameA
,
'user_id_b'
=>
$userIdB
,
'user_name_b'
=>
$userNameB
,
'status'
=>
1
,
'money'
=>
1.88
,
'add_time'
=>
time
(),
'group_id'
=>
PRIZE_GROUP_2021
]);
//邀请人加1.88元
M
(
'Wallet'
)
->
where
([
'user_id'
=>
$aid
])
->
setInc
(
'money'
,
1.88
);
$addData
=
[
'user_id'
=>
$aid
,
'user_name'
=>
$userNameA
,
'mobile'
=>
$ucDataA
[
'mobile'
],
'item_money'
=>
1.88
,
'item_time'
=>
time
(),
'group_id'
=>
PRIZE_GROUP_2021
,
'status'
=>
1
,
'note'
=>
'邀请好友'
];
M
(
'WalletItem'
)
->
add
(
$addData
);
}
}
}
}
}
?>
?>
\ No newline at end of file
app/Tpl/Vip/Index/jiang.html
View file @
5f11fdb3
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
<a
name=
"4"
></a>
<a
name=
"4"
></a>
<div
class=
"new-quanmin marginB20"
>
<div
class=
"new-quanmin marginB20"
>
<p
class=
"bot-title"
>
实盘赛场
</p>
<p
class=
"bot-title"
>
实盘赛场
</p>
<div
class=
"item-cont item2"
url=
"{:M_URL}/True"
style=
"cursor: pointer"
>
<div
class=
"item-cont item2"
url=
"{:M_URL}/True
?aid={$Think.cookie.aid}
"
style=
"cursor: pointer"
>
<div
class=
"item-cont-logo"
>
<div
class=
"item-cont-logo"
>
<img
src=
"__PUBLIC__/Home/images/g2023/shipan.png"
alt=
""
>
<img
src=
"__PUBLIC__/Home/images/g2023/shipan.png"
alt=
""
>
</div>
</div>
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
<a
name=
"1"
></a>
<a
name=
"1"
></a>
<div
class=
"new-quanshang marginB20"
>
<div
class=
"new-quanshang marginB20"
>
<p
class=
"bot-title"
>
券商专场
</p>
<p
class=
"bot-title"
>
券商专场
</p>
<div
class=
"item-cont"
url=
"{:WWW_URL}/Zjds"
style=
"cursor: pointer"
>
<div
class=
"item-cont"
url=
"{:WWW_URL}/Zjds
?aid={$Think.cookie.aid}
"
style=
"cursor: pointer"
>
<img
class=
"gjj"
src=
"__PUBLIC__/Home/images/g2023/gjj-img.png"
alt=
""
>
<img
class=
"gjj"
src=
"__PUBLIC__/Home/images/g2023/gjj-img.png"
alt=
""
>
<div
class=
"item-cont-logo"
>
<div
class=
"item-cont-logo"
>
<img
src=
"__PUBLIC__/Home/images/g2023/quanshang.png"
alt=
""
>
<img
src=
"__PUBLIC__/Home/images/g2023/quanshang.png"
alt=
""
>
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
<eq
name=
"dsStatus.zjStatus"
value=
"1"
>
<eq
name=
"dsStatus.zjStatus"
value=
"1"
>
<div
class=
"enter-btn goTradeBtn "
gid=
"{:ZHONGJIN_GROUP}"
>
交易
</div>
<div
class=
"enter-btn goTradeBtn "
gid=
"{:ZHONGJIN_GROUP}"
>
交易
</div>
<else/>
<else/>
<div
class=
"enter-btn baoming"
url=
"{:WWW_URL}/Zjds?clickFlag=1"
>
报名参赛
</div>
<div
class=
"enter-btn baoming"
url=
"{:WWW_URL}/Zjds?clickFlag=1
&aid={$Think.cookie.aid}
"
>
报名参赛
</div>
</eq>
</eq>
</div>
</div>
</div>
</div>
...
...
app/Tpl/Vip/Index/userList.html
→
app/Tpl/Vip/Index/userList
_____
.html
View file @
5f11fdb3
File moved
app/Tpl/Vip/PkTop/indexOld.html
→
app/Tpl/Vip/PkTop/indexOld
____
.html
View file @
5f11fdb3
File moved
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