Commit 4316ab75 authored by ZhuChunYang's avatar ZhuChunYang

update

parent 2eecdfc7
...@@ -12,6 +12,7 @@ use backend\models\coin\CoinForm; ...@@ -12,6 +12,7 @@ use backend\models\coin\CoinForm;
use common\business\CoinBusiness; use common\business\CoinBusiness;
use common\models\psources\Coin; use common\models\psources\Coin;
use common\models\psources\CoinPlatform; use common\models\psources\CoinPlatform;
use common\models\psources\CoinRecommend;
use Yii; use Yii;
use yii\validators\ImageValidator; use yii\validators\ImageValidator;
use yii\web\Response; use yii\web\Response;
...@@ -189,6 +190,11 @@ class CoinController extends BaseController ...@@ -189,6 +190,11 @@ class CoinController extends BaseController
Yii::$app->response->format = 'json'; Yii::$app->response->format = 'json';
$id = Yii::$app->request->get('id', 0); $id = Yii::$app->request->get('id', 0);
if ($id) { if ($id) {
$coin_recommend = CoinRecommend::find()->where(['cid' => $id])->one();
if($coin_recommend){
return ['code' => -1, 'msg' => '推荐币种里有改币种,无法删除'];
}
$model = Coin::findOne(['id' => $id]); $model = Coin::findOne(['id' => $id]);
if ($model) { if ($model) {
$platform_id = Yii::$app->user->identity->platform_id; $platform_id = Yii::$app->user->identity->platform_id;
......
...@@ -15,6 +15,7 @@ class CoinForm extends Model ...@@ -15,6 +15,7 @@ class CoinForm extends Model
public $id; public $id;
public $name; public $name;
public $nickname; public $nickname;
public $sid;
public $icon; public $icon;
public $introduce; public $introduce;
public $official; public $official;
...@@ -48,6 +49,7 @@ class CoinForm extends Model ...@@ -48,6 +49,7 @@ class CoinForm extends Model
'id' => 'ID', 'id' => 'ID',
'name' => '名称', 'name' => '名称',
'nickname' => '别称', 'nickname' => '别称',
'sid' => '全称',
'icon' => '图标', 'icon' => '图标',
'introduce' => '介绍', 'introduce' => '介绍',
'official' => '官网', 'official' => '官网',
...@@ -71,6 +73,7 @@ class CoinForm extends Model ...@@ -71,6 +73,7 @@ class CoinForm extends Model
'id', 'id',
'name', 'name',
'nickname', 'nickname',
'sid',
'icon', 'icon',
'introduce', 'introduce',
'official', 'official',
...@@ -88,6 +91,7 @@ class CoinForm extends Model ...@@ -88,6 +91,7 @@ class CoinForm extends Model
'id', 'id',
'name', 'name',
'nickname', 'nickname',
'sid',
'icon', 'icon',
'introduce', 'introduce',
'official', 'official',
......
...@@ -30,6 +30,12 @@ ...@@ -30,6 +30,12 @@
</div> </div>
</div> </div>
<div class="layui-form-item"> <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> <label class="layui-form-label">官网</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input class="layui-input" name="official" value="<?= $model->official ?>"> <input class="layui-input" name="official" value="<?= $model->official ?>">
......
...@@ -30,6 +30,12 @@ ...@@ -30,6 +30,12 @@
</div> </div>
</div> </div>
<div class="layui-form-item"> <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> <label class="layui-form-label">官网</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input class="layui-input" name="official" value="<?= $model->official ?>"> <input class="layui-input" name="official" value="<?= $model->official ?>">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment