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
4316ab75
Commit
4316ab75
authored
Dec 21, 2018
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2eecdfc7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
0 deletions
+22
-0
CoinController.php
backend/controllers/CoinController.php
+6
-0
CoinForm.php
backend/models/coin/CoinForm.php
+4
-0
add.php
backend/views/coin/add.php
+6
-0
edit.php
backend/views/coin/edit.php
+6
-0
No files found.
backend/controllers/CoinController.php
View file @
4316ab75
...
...
@@ -12,6 +12,7 @@ use backend\models\coin\CoinForm;
use
common\business\CoinBusiness
;
use
common\models\psources\Coin
;
use
common\models\psources\CoinPlatform
;
use
common\models\psources\CoinRecommend
;
use
Yii
;
use
yii\validators\ImageValidator
;
use
yii\web\Response
;
...
...
@@ -189,6 +190,11 @@ class CoinController extends BaseController
Yii
::
$app
->
response
->
format
=
'json'
;
$id
=
Yii
::
$app
->
request
->
get
(
'id'
,
0
);
if
(
$id
)
{
$coin_recommend
=
CoinRecommend
::
find
()
->
where
([
'cid'
=>
$id
])
->
one
();
if
(
$coin_recommend
){
return
[
'code'
=>
-
1
,
'msg'
=>
'推荐币种里有改币种,无法删除'
];
}
$model
=
Coin
::
findOne
([
'id'
=>
$id
]);
if
(
$model
)
{
$platform_id
=
Yii
::
$app
->
user
->
identity
->
platform_id
;
...
...
backend/models/coin/CoinForm.php
View file @
4316ab75
...
...
@@ -15,6 +15,7 @@ class CoinForm extends Model
public
$id
;
public
$name
;
public
$nickname
;
public
$sid
;
public
$icon
;
public
$introduce
;
public
$official
;
...
...
@@ -48,6 +49,7 @@ class CoinForm extends Model
'id'
=>
'ID'
,
'name'
=>
'名称'
,
'nickname'
=>
'别称'
,
'sid'
=>
'全称'
,
'icon'
=>
'图标'
,
'introduce'
=>
'介绍'
,
'official'
=>
'官网'
,
...
...
@@ -71,6 +73,7 @@ class CoinForm extends Model
'id'
,
'name'
,
'nickname'
,
'sid'
,
'icon'
,
'introduce'
,
'official'
,
...
...
@@ -88,6 +91,7 @@ class CoinForm extends Model
'id'
,
'name'
,
'nickname'
,
'sid'
,
'icon'
,
'introduce'
,
'official'
,
...
...
backend/views/coin/add.php
View file @
4316ab75
...
...
@@ -30,6 +30,12 @@
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
币种全称
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"sid"
value=
"
<?=
$model
->
sid
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
官网
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"official"
value=
"
<?=
$model
->
official
?>
"
>
...
...
backend/views/coin/edit.php
View file @
4316ab75
...
...
@@ -30,6 +30,12 @@
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
币种全称
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"sid"
value=
"
<?=
$model
->
sid
?>
"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
官网
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
name=
"official"
value=
"
<?=
$model
->
official
?>
"
>
...
...
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