1
This commit is contained in:
parent
8468ed2655
commit
ae0c533ddf
@ -28,8 +28,10 @@ class ChipController extends BaseAuthedController
|
||||
$chipList = Chip::all($type);
|
||||
$chipDtoList = array();
|
||||
foreach ($chipList as $item) {
|
||||
// array_push($chipDtoList, $item);
|
||||
array_push($chipDtoList, Chip::toDto($item));
|
||||
}
|
||||
// print_r($chipDtoList);die;
|
||||
$this->_rspData(array(
|
||||
'data' => $chipDtoList,
|
||||
));
|
||||
|
@ -39,7 +39,7 @@ class UserController extends BaseAuthedController {
|
||||
if (!$userInfo) {
|
||||
$this->createNewUser($userName, $avatarUrl);
|
||||
|
||||
//$this->addChip();
|
||||
$this->addChip();
|
||||
|
||||
$userInfo = $this->_getOrmUserInfo();
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ class Chip extends BaseModel
|
||||
$attr_pool = emptyReplace(json_decode($row['rand_attr'], true), array());
|
||||
$attrs = array();
|
||||
foreach ($attr_pool as $key=>$val){
|
||||
if ($val){
|
||||
$attr = mt\ChipAttr::getAttrById($val['attr_id'],$val['attr_type']);
|
||||
$newAttr = [
|
||||
|
||||
@ -85,6 +86,7 @@ class Chip extends BaseModel
|
||||
];
|
||||
array_push($attrs,$newAttr);
|
||||
}
|
||||
}
|
||||
$row['rand_attr'] = $attrs;
|
||||
$row['today_get_gold'] = $todayGetGold;
|
||||
$row['last_get_gold_time'] = $lastGetGoldTime;
|
||||
|
Loading…
x
Reference in New Issue
Block a user