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
6dd888b2
Commit
6dd888b2
authored
Apr 24, 2024
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加默认邀请人
parent
69bae24e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
IndexAction.class.php
app/Lib/Action/Vip/IndexAction.class.php
+1
-3
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+3
-1
UserModel.class.php
app/Lib/Model/UserModel.class.php
+1
-2
No files found.
app/Lib/Action/Vip/IndexAction.class.php
View file @
6dd888b2
...
...
@@ -471,14 +471,12 @@ class IndexAction extends IdentityAction {
//钱包
$userId
=
$ucData
[
'user_id'
];
//用户未加入大赛或已加入,但不在cofool_allex_user表,需要添加
if
(
$joinRes
[
'status'
]
==
0
||
$joinRes
[
'joinStatus'
]
==
1
){
$exist
=
M
(
'PktopUser'
)
->
where
(
array
(
'user_id'
=>
$userId
))
->
find
();
if
(
empty
(
$exist
)){
$inviterId
=
$inviterId
?
$inviterId
:
cookie
(
'aid'
);
$inviterId
=
$inviterId
?
$inviterId
:
5420972
;
$userData
=
array
(
'user_id'
=>
$userId
,
'user_name'
=>
$ucData
[
'user_name'
],
'inviter_id'
=>
$inviterId
,
'referer'
=>
$referer
,
'add_time'
=>
time
(),
'device'
=>
'pc'
);
M
(
'PktopUser'
)
->
add
(
$userData
);
...
...
app/Lib/Action/Vip/PkTopAction.class.php
View file @
6dd888b2
...
...
@@ -601,6 +601,7 @@ class PkTopAction extends IdentityAction{
$exist
=
M
(
'PktopUser'
)
->
where
(
array
(
'user_id'
=>
$userId
))
->
find
();
if
(
empty
(
$exist
)){
$inviterId
=
$inviterId
?
$inviterId
:
cookie
(
'aid'
);
$inviterId
=
$inviterId
?
$inviterId
:
5420972
;
$userData
=
array
(
'user_id'
=>
$userId
,
'user_name'
=>
$userName
,
'inviter_id'
=>
$inviterId
,
'referer'
=>
$referer
,
'add_time'
=>
time
(),
'device'
=>
$place
?
$place
:
'm'
);
//ur里面有user_id时,判断不出是自己的还是邀请人的
...
...
@@ -639,7 +640,8 @@ class PkTopAction extends IdentityAction{
D
(
'Sms'
)
->
send
([
'mobile'
=>
$mobile
,
'content'
=>
$bmContent
,
'type'
=>
46
],
true
,
true
);
#富币任务-全民邀请参赛
$result
=
D
(
'CofCoin'
)
->
addMoneyForQmJoin
(
$userId
,
cookie
(
'aid'
));
$aid
=
cookie
(
'aid'
)
?
cookie
(
'aid'
)
:
5420972
;
$result
=
D
(
'CofCoin'
)
->
addMoneyForQmJoin
(
$userId
,
$aid
);
if
(
cookie
(
'aid'
)){
cookie
(
'aid'
,
null
);
}
...
...
app/Lib/Model/UserModel.class.php
View file @
6dd888b2
...
...
@@ -72,6 +72,7 @@ class UserModel extends Model{
//加入邀请表
public
function
addInvite
(
$userIdB
,
$userNameB
){
$aid
=
cookie
(
'aid'
);
$aid
=
$aid
?
$aid
:
5420972
;
if
(
$aid
){
$ucA
=
uc_get_user
([
'userId'
=>
$aid
,
'type'
=>
3
]);
$ucDataA
=
$ucA
[
'data'
];
...
...
@@ -86,8 +87,6 @@ class UserModel extends Model{
M
(
'WalletInvite'
)
->
where
([
'user_id_b'
=>
$userIdB
,
'status'
=>
0
])
->
delete
();
//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]);
M
(
'WalletInvite'
)
->
add
([
'user_id_a'
=>
$aid
,
'user_name_a'
=>
$userNameA
,
'user_id_b'
=>
$userIdB
,
'user_name_b'
=>
$userNameB
,
'status'
=>
0
,
'add_time'
=>
time
(),
'group_id'
=>
PRIZE_GROUP_2021
]);
...
...
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