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
4fc88e48
Commit
4fc88e48
authored
Jun 21, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b35c8b41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
CoinController.php
api/controllers/CoinController.php
+2
-2
index.php
backend/views/coin-recommend/index.php
+17
-2
CoinRecommend.php
common/models/psources/CoinRecommend.php
+1
-1
No files found.
api/controllers/CoinController.php
View file @
4fc88e48
...
@@ -68,7 +68,7 @@ class CoinController extends BaseController
...
@@ -68,7 +68,7 @@ class CoinController extends BaseController
}
}
$recommend
=
$request
->
post
(
'recommend'
,
''
);
$recommend
=
$request
->
post
(
'recommend'
,
''
);
$condition
=
[
'platform_id'
=>
$platform_id
];
$condition
=
[
'platform_id'
=>
$platform_id
,
'type'
=>
1
];
if
(
$recommend
)
{
if
(
$recommend
)
{
$condition
[
'recommend'
]
=
$recommend
;
$condition
[
'recommend'
]
=
$recommend
;
}
}
...
@@ -126,7 +126,7 @@ class CoinController extends BaseController
...
@@ -126,7 +126,7 @@ class CoinController extends BaseController
$platform_id
=
$request
->
post
(
'platform_id'
,
1
);
//默认币钱包
$platform_id
=
$request
->
post
(
'platform_id'
,
1
);
//默认币钱包
$recommend
=
$request
->
post
(
'recommend'
,
''
);
$recommend
=
$request
->
post
(
'recommend'
,
''
);
$condition
=
[
'platform_id'
=>
$platform_id
];
$condition
=
[
'platform_id'
=>
$platform_id
,
'type'
=>
1
];
if
(
$recommend
)
{
if
(
$recommend
)
{
$condition
[
'recommend'
]
=
$recommend
;
$condition
[
'recommend'
]
=
$recommend
;
}
}
...
...
backend/views/coin-recommend/index.php
View file @
4fc88e48
...
@@ -109,6 +109,14 @@
...
@@ -109,6 +109,14 @@
{{
#
}
}}
{{
#
}
}}
</script>
</script>
<script
type=
"text/html"
id=
"type_tpl"
>
{{
#
if
(
1
==
d
.
type
){
}}
币钱包
{{
#
}
else
if
(
2
==
d
.
type
){
}}
托管钱包
{{
#
}
}}
</script>
<script
type=
"text/html"
id=
"toolBar"
>
<script
type=
"text/html"
id=
"toolBar"
>
<
button
class
=
"layui-btn layui-btn-xs layui-btn-normal"
lay
-
event
=
"edit"
>
编辑
<
/button
>
<
button
class
=
"layui-btn layui-btn-xs layui-btn-normal"
lay
-
event
=
"edit"
>
编辑
<
/button
>
<
button
class
=
"layui-btn layui-btn-xs layui-btn-danger"
lay
-
event
=
"del"
>
删除
<
/button
>
<
button
class
=
"layui-btn layui-btn-xs layui-btn-danger"
lay
-
event
=
"del"
>
删除
<
/button
>
...
@@ -149,6 +157,11 @@ table.render({
...
@@ -149,6 +157,11 @@ table.render({
templet
:
'#recommend_tpl'
templet
:
'#recommend_tpl'
},
},
{
{
field
:
'type'
,
title
:
'所属类型'
,
templet
:
'#type_tpl'
},
{
field
:
'sort'
,
field
:
'sort'
,
title
:
'排序'
title
:
'排序'
},
},
...
@@ -177,7 +190,8 @@ table.on('toolbar(table1)', function(obj) {
...
@@ -177,7 +190,8 @@ table.on('toolbar(table1)', function(obj) {
platform_id
:
$
(
'#platform_id'
).
val
(),
platform_id
:
$
(
'#platform_id'
).
val
(),
coin
:
''
,
coin
:
''
,
sort
:
''
,
sort
:
''
,
recommend
:
''
recommend
:
''
,
type
:
''
});
});
},
},
btn1
:
function
()
{
btn1
:
function
()
{
...
@@ -223,7 +237,8 @@ table.on('tool(table1)', function(obj) {
...
@@ -223,7 +237,8 @@ table.on('tool(table1)', function(obj) {
platform_id
:
data
.
platform_id
,
platform_id
:
data
.
platform_id
,
coin
:
data
.
coin
,
coin
:
data
.
coin
,
sort
:
data
.
sort
,
sort
:
data
.
sort
,
recommend
:
data
.
recommend
recommend
:
data
.
recommend
,
type
:
data
.
type
});
});
},
},
btn1
:
function
()
{
btn1
:
function
()
{
...
...
common/models/psources/CoinRecommend.php
View file @
4fc88e48
...
@@ -92,7 +92,7 @@ class CoinRecommend extends BaseActiveRecord
...
@@ -92,7 +92,7 @@ class CoinRecommend extends BaseActiveRecord
$coin_recommend
=
CoinRecommend
::
findOne
(
$id
);
$coin_recommend
=
CoinRecommend
::
findOne
(
$id
);
}
else
{
}
else
{
$coin_recommend
=
new
CoinRecommend
();
$coin_recommend
=
new
CoinRecommend
();
$count
=
self
::
find
()
->
where
([
'cid'
=>
$coin
->
id
,
'platform_id'
=>
$platform_id
])
->
count
();
$count
=
self
::
find
()
->
where
([
'cid'
=>
$coin
->
id
,
'platform_id'
=>
$platform_id
,
'type'
=>
$type
])
->
count
();
if
(
$count
>
0
)
{
if
(
$count
>
0
)
{
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