1
This commit is contained in:
parent
9ef1337a95
commit
54fc6c1e0c
@ -25,10 +25,8 @@ class ChipController extends BaseAuthedController
|
|||||||
$chipList = Chip::all($type);
|
$chipList = Chip::all($type);
|
||||||
$chipDtoList = array();
|
$chipDtoList = array();
|
||||||
foreach ($chipList as $item) {
|
foreach ($chipList as $item) {
|
||||||
if ($item['inlay_state'] == 0){
|
|
||||||
array_push($chipDtoList, Chip::toDto($item));
|
array_push($chipDtoList, Chip::toDto($item));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'data' => $chipDtoList,
|
'data' => $chipDtoList,
|
||||||
));
|
));
|
||||||
@ -44,10 +42,8 @@ class ChipController extends BaseAuthedController
|
|||||||
$chipList = Chip::all($type);
|
$chipList = Chip::all($type);
|
||||||
$chipDtoList = array();
|
$chipDtoList = array();
|
||||||
foreach ($chipList as $item) {
|
foreach ($chipList as $item) {
|
||||||
if ($item['inlay_state'] == 0){
|
|
||||||
array_push($chipDtoList, Chip::toDto($item));
|
array_push($chipDtoList, Chip::toDto($item));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$data = $this->_orderByChip($chipDtoList,$order);
|
$data = $this->_orderByChip($chipDtoList,$order);
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'data' => $data,
|
'data' => $data,
|
||||||
@ -496,10 +492,6 @@ class ChipController extends BaseAuthedController
|
|||||||
|
|
||||||
private function _inLayNewAttr($hero_id){
|
private function _inLayNewAttr($hero_id){
|
||||||
$hero = Hero::find($hero_id);
|
$hero = Hero::find($hero_id);
|
||||||
if (! $hero){
|
|
||||||
$this->_rspErr(1, 'Not enough hero');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$chipAttr = [];
|
$chipAttr = [];
|
||||||
if (! $hero['chip_ids'] ){
|
if (! $hero['chip_ids'] ){
|
||||||
return $hero;
|
return $hero;
|
||||||
@ -527,10 +519,6 @@ class ChipController extends BaseAuthedController
|
|||||||
|
|
||||||
private function _inLayNewAttrGun($gun_id){
|
private function _inLayNewAttrGun($gun_id){
|
||||||
$gun = Gun::find($gun_id);
|
$gun = Gun::find($gun_id);
|
||||||
if (! $gun){
|
|
||||||
$this->_rspErr(1, 'Not enough gun');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$chipAttr = [];
|
$chipAttr = [];
|
||||||
if (! $gun['chip_ids'] ){
|
if (! $gun['chip_ids'] ){
|
||||||
return $gun;
|
return $gun;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user