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
0240e722
Commit
0240e722
authored
Nov 18, 2022
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
有奖赛报名后即发短信
parent
ac2178b4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
6 deletions
+17
-6
config.php
app/Conf/config.php
+1
-0
IndexAction.class.php
app/Lib/Action/Vip/IndexAction.class.php
+5
-1
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+9
-4
SmsModel.class.php
app/Lib/Model/SmsModel.class.php
+2
-1
No files found.
app/Conf/config.php
View file @
0240e722
...
...
@@ -40,6 +40,7 @@ define('M2M_GROUP',24321);
define
(
'ZHONGJIN_GROUP'
,
24299
);
define
(
'NIU_STRONG_ID'
,
24323
);
define
(
'NIU_SAN_ID'
,
24326
);
define
(
'NIU_BAI_ID'
,
24327
);
return
array
(
...
...
app/Lib/Action/Vip/IndexAction.class.php
View file @
0240e722
...
...
@@ -236,7 +236,10 @@ class IndexAction extends IdentityAction {
$password
=
I
(
'password'
,
''
);
$referer
=
I
(
'referer'
,
''
);
$groupInfo
=
M
(
'Group'
)
->
field
(
'group_id,web_id,category,name,startTime,endTime'
)
->
where
(
array
(
'group_id'
=>
$groupId
))
->
find
();
// $groupInfo=M('Group')->field('group_id,web_id,category,name,startTime,endTime')->where(array('group_id'=>$groupId))->find();
$groupInfo
=
M
(
'Group a'
)
->
join
(
'left join cofool_group_info b on a.group_id=b.group_id'
)
->
field
(
'a.group_id,a.web_id,a.category,a.name,startTime,endTime,wechat'
)
->
where
([
'a.group_id'
=>
$groupId
])
->
find
();
$bmContent
=
'您正在报名全民争霸赛,请添加管理员微信加入【大赛高手交流群】,陪伴老师微信号:'
.
$groupInfo
[
'wechat'
];
//大赛是否结束
$groupStatus
=
0
;
...
...
@@ -337,6 +340,7 @@ class IndexAction extends IdentityAction {
}
//0成功,1失败
if
(
$joinRes
[
'status'
]
==
0
){
D
(
'Sms'
)
->
send
([
'mobile'
=>
$mobile
,
'content'
=>
$bmContent
,
'type'
=>
46
],
true
,
true
);
$this
->
ajaxReturn
(
array
(
'status'
=>
1
,
'info'
=>
'参赛成功!'
));
}
else
{
$this
->
ajaxReturn
(
array
(
'status'
=>
0
,
'info'
=>
$joinRes
[
'error'
],
'joinStatus'
=>
$joinRes
[
'joinStatus'
]));
...
...
app/Lib/Action/Vip/PkTopAction.class.php
View file @
0240e722
...
...
@@ -430,7 +430,7 @@ class PkTopAction extends IdentityAction{
// $cfrom=I('cfrom');
// $place=$cfrom?$cfrom:I('hfrom');
$place
=
''
;
$return
=
$this
->
joinUserGroup
(
$ucData
[
'user_id'
],
$ucData
[
'user_name'
],
$this
->
GID
,
$inviterId
,
$referer
,
$place
);
$return
=
$this
->
joinUserGroup
(
$ucData
[
'user_id'
],
$ucData
[
'user_name'
],
$this
->
GID
,
$inviterId
,
$referer
,
$place
,
$mobile
);
$this
->
ajaxReturn
(
$return
);
}
...
...
@@ -535,10 +535,14 @@ class PkTopAction extends IdentityAction{
}
//参加大赛
public
function
joinUserGroup
(
$userId
,
$userName
,
$groupId
,
$inviterId
,
$referer
,
$place
){
public
function
joinUserGroup
(
$userId
,
$userName
,
$groupId
,
$inviterId
,
$referer
,
$place
,
$mobile
){
$field
=
'group_id,name,question_privacy,reg_answer,type,web_id,capital,teamid,category,is_open'
;
$group
=
M
(
'Group'
)
->
where
(
array
(
'group_id'
=>
$groupId
))
->
field
(
$field
)
->
find
();
// $field='group_id,name,question_privacy,reg_answer,type,web_id,capital,teamid,category,is_open';
// $group =M('Group')->where(array('group_id'=>$groupId))->field($field)->find();
$field
=
'a.group_id,a.name,question_privacy,reg_answer,a.type,a.web_id,a.capital,a.teamid,a.category,is_open,wechat'
;
$group
=
M
(
'Group a'
)
->
join
(
'left join cofool_group_info b on a.group_id=b.group_id'
)
->
field
(
$field
)
->
where
([
'a.group_id'
=>
$groupId
])
->
find
();
$bmContent
=
'您正在报名全民争霸赛,请添加管理员微信加入【大赛高手交流群】,陪伴老师微信号:'
.
$group
[
'wechat'
];
if
(
$group
[
'is_open'
]
==
0
){
return
array
(
'status'
=>
0
,
'info'
=>
'当前大赛不允许加入!'
);
...
...
@@ -596,6 +600,7 @@ class PkTopAction extends IdentityAction{
M
(
'userinfo'
,
" "
,
C
(
'DB_CONFIG_MNCG3'
))
->
add
(
$initData
);
}
D
(
'Sms'
)
->
send
([
'mobile'
=>
$mobile
,
'content'
=>
$bmContent
,
'type'
=>
46
],
true
,
true
);
return
array
(
'status'
=>
1
,
'info'
=>
'参赛成功'
,
'debug'
=>
$userId
);
...
...
app/Lib/Model/SmsModel.class.php
View file @
0240e722
...
...
@@ -38,7 +38,8 @@ class SmsModel extends Model{
file_put_contents
(
$logFile
,
date
(
'Y-m-d H:i:s'
)
.
' '
.
$mobile
.
' content is:'
.
$content
.
PHP_EOL
,
FILE_APPEND
);
if
(
!
preg_match
(
'/^1([0-9]{9})/'
,
$mobile
))
{
exit
(
'mobile phone error'
);
// exit('mobile phone error');
return
false
;
}
$this
->
mobile
=
$mobile
;
$this
->
type
=
$type
;
...
...
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