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
bfe97a65
You need to sign in or sign up before continuing.
Commit
bfe97a65
authored
Jul 23, 2024
by
houyadong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成员交易逻辑修改
parent
a405709d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
CommonModel.class.php
app/Lib/Model/CommonModel.class.php
+41
-0
No files found.
app/Lib/Model/CommonModel.class.php
0 → 100644
View file @
bfe97a65
<?php
class
CommonModel
extends
Model
{
public
$autoCheckFields
=
false
;
//进入交易需要的参数,可能跳转到他人主页
public
function
setGoTrade
(
$gInfo
,
$userId
,
$userName
,
$jump
)
{
//非特殊大赛
if
(
$gInfo
[
'type'
]
!=
1
)
{
$goTradeInfo
=
[
'group_id'
=>
$gInfo
[
'group_id'
],
'web_id'
=>
$gInfo
[
'web_id'
],
'category'
=>
$gInfo
[
'category'
],
'name'
=>
$gInfo
[
'name'
]];
$groupStatus
=
$gInfo
[
'startTime'
]
>
time
()
?
'1'
:
(
is_end
(
$gInfo
[
'endTime'
])
?
'3'
:
'2'
);
$goTradeInfo
[
'groupStatus'
]
=
$groupStatus
;
$goTradeInfo
[
'zhuangtai'
]
=
$gInfo
[
'startTime'
]
>
time
()
?
'未开始'
:
(
is_end
(
$gInfo
[
'endTime'
])
?
'已结束'
:
'进行中'
);
$goTradeInfo
[
'statusInt'
]
=
$groupStatus
;
}
$goTradeInfo
[
'userName'
]
=
$userName
;
if
(
in_array
(
$gInfo
[
"category"
],
[
1
,
9
]))
{
$goTradeInfo
[
'viewPage'
]
=
1
;
}
if
(
in_array
(
$gInfo
[
"category"
],
[
3
,
4
,
6
,
7
]))
{
$goTradeInfo
[
'viewPage'
]
=
2
;
}
if
(
in_array
(
$gInfo
[
"category"
],
[
2
,
5
]))
{
$goTradeInfo
[
'viewPage'
]
=
3
;
}
$user_agent
=
explode
(
'cofool/'
,
$_SERVER
[
'HTTP_USER_AGENT'
]);
$version
=
$user_agent
[
1
];
if
(
in_array
(
$gInfo
[
"category"
],
[
8
]))
{
$goTradeInfo
[
'viewPage'
]
=
checkVersion
(
'>='
,
'3.7.1'
,
$version
,
''
)
?
1
:
2
;
}
$goTradeInfo
[
'userID'
]
=
$version
[
0
]
==
'A'
?
(
$gInfo
[
'group_id'
]
.
'X'
.
$userId
)
:
$userId
;
$goTradeInfo
[
'jump'
]
=
$jump
;
return
json_encode
(
$goTradeInfo
);
}
}
\ 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