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
88ed5d68
Commit
88ed5d68
authored
Dec 29, 2023
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新用户加富币
parent
17819499
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+3
-0
CofCoinModel.class.php
app/Lib/Model/CofCoinModel.class.php
+12
-1
No files found.
app/Lib/Action/Vip/PkTopAction.class.php
View file @
88ed5d68
...
...
@@ -538,6 +538,9 @@ class PkTopAction extends IdentityAction{
uc_user_synlogin
(
array
(
'userId'
=>
$info
[
'user_id'
],
'userName'
=>
$info
[
'user_name'
],
'nick'
=>
''
,
'webId'
=>
''
));
$this
->
setLogin
(
array
(
'userID'
=>
$info
[
'user_id'
],
'userName'
=>
$info
[
' user_name'
],
'nick'
=>
''
));
}
//新用户注册送150富币
D
(
'CofCoin'
)
->
addMoneyForNewUser
(
$info
[
'user_id'
],
$info
[
'user_name'
],
$mobile
);
return
$info
;
}
...
...
app/Lib/Model/CofCoinModel.class.php
View file @
88ed5d68
...
...
@@ -12,7 +12,7 @@ class CofCoinModel extends Model
/** @var int 邀请好友全民炼股参赛成功 */
const
TYPE_INVITA_QM
=
26
;
const
TYPE_NEW_USER
=
30
;
/**
* 任务-被邀请参加全民后奖励富币
...
...
@@ -98,6 +98,17 @@ class CofCoinModel extends Model
}
return
true
;
}
//新用户注册送150富币
public
function
addMoneyForNewUser
(
$uid
,
$uname
,
$mobile
){
M
()
->
db
(
10
,
C
(
'DB_CONFIG_DEMO'
))
->
table
(
'cofool_coin_user'
)
->
add
([
'user_id'
=>
$uid
,
'coin'
=>
150
,
'add_time'
=>
time
()]);
$typeId
=
CofCoinModel
::
TYPE_NEW_USER
;
$typeData
=
M
()
->
db
(
10
,
C
(
'DB_CONFIG_DEMO'
))
->
table
(
'cofool_coin_type'
)
->
where
([
'type_id'
=>
$typeId
])
->
find
();
$addData
=
[
'user_id'
=>
$uid
,
'user_name'
=>
$uname
,
'mobile'
=>
$mobile
,
'title'
=>
$typeData
[
'type_name'
],
'coin_change'
=>
$typeData
[
'coin'
],
'add_time'
=>
time
(),
'type_id'
=>
$typeId
];
M
()
->
db
(
10
,
C
(
'DB_CONFIG_DEMO'
))
->
table
(
'cofool_coin_detail'
)
->
add
(
$addData
);
}
}
?>
\ No newline at end of file
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