Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
wallet
token
Commits
f4c21ec8
Commit
f4c21ec8
authored
Jul 09, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/optimize' into 'master'
添加推荐币种时完全匹配 See merge request
!56
parents
6e875f8b
47e27532
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
CoinRecommendController.php
backend/controllers/CoinRecommendController.php
+0
-1
CoinRecommend.php
common/models/psources/CoinRecommend.php
+1
-1
No files found.
backend/controllers/CoinRecommendController.php
View file @
f4c21ec8
...
@@ -71,7 +71,6 @@ class CoinRecommendController extends BaseController
...
@@ -71,7 +71,6 @@ class CoinRecommendController extends BaseController
$platform_id
=
empty
(
$get
[
'platform_id'
])
?
1
:
$get
[
'platform_id'
];
$platform_id
=
empty
(
$get
[
'platform_id'
])
?
1
:
$get
[
'platform_id'
];
$user_platform_id
=
Yii
::
$app
->
user
->
identity
->
platform_id
;
$user_platform_id
=
Yii
::
$app
->
user
->
identity
->
platform_id
;
#var_dump($platform_id, $user_platform_id);exit;
if
(
1
!=
$user_platform_id
&&
$user_platform_id
!=
$platform_id
)
{
if
(
1
!=
$user_platform_id
&&
$user_platform_id
!=
$platform_id
)
{
return
[
'code'
=>
-
1
,
'msg'
=>
'没有权限修改'
];
return
[
'code'
=>
-
1
,
'msg'
=>
'没有权限修改'
];
}
}
...
...
common/models/psources/CoinRecommend.php
View file @
f4c21ec8
...
@@ -84,7 +84,7 @@ class CoinRecommend extends BaseActiveRecord
...
@@ -84,7 +84,7 @@ class CoinRecommend extends BaseActiveRecord
$type
=
$params
[
'type'
]
??
1
;
$type
=
$params
[
'type'
]
??
1
;
$chain
=
$params
[
'chain'
]
??
''
;
$chain
=
$params
[
'chain'
]
??
''
;
$coin
=
Coin
::
findOne
([
'name'
=>
strtoupper
(
$coin_name
)]);
$coin
=
Coin
::
findOne
([
'name'
=>
strtoupper
(
$coin_name
)
,
'platform'
=>
strtoupper
(
$chain
)
]);
if
(
empty
(
$coin
))
{
if
(
empty
(
$coin
))
{
return
[
'code'
=>
-
1
,
'msg'
=>
'币种不存在'
];
return
[
'code'
=>
-
1
,
'msg'
=>
'币种不存在'
];
}
}
...
...
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