1
This commit is contained in:
parent
1580cc814b
commit
ae2093468f
@ -100,7 +100,7 @@ class UserController extends BaseAuthedController {
|
||||
}
|
||||
|
||||
private function addChip(){
|
||||
$list1 = [130001,130002,130003,130004,130005,130006,130007,130008,130009,130010];
|
||||
$list1 = [130001,130002,130003,130004,130005,130006,130007,130008];
|
||||
$list2 = [130011,130012,130013,130014,130015,130016];
|
||||
for ($i=1;$i<=15;$i++){
|
||||
$itemId1 = $list1[rand(0,9)];
|
||||
|
@ -47,6 +47,8 @@ class User extends BaseModel {
|
||||
'pve_instance_id' => $row['pve_instance_id'],
|
||||
'like_count' => $row['like_count'],
|
||||
'head_list' => self::getHeadList($row),
|
||||
// 'head_list' => self::exportHeadList($row)['head_list'],
|
||||
// 'hero_list' => self::exportHeadList($row)['hero_list'],
|
||||
'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()),
|
||||
);
|
||||
}
|
||||
@ -74,6 +76,8 @@ class User extends BaseModel {
|
||||
'first_fight' => $row['first_fight'],
|
||||
'already_guide' => $row['already_guide'],
|
||||
'head_list' => self::getHeadList($row),
|
||||
// 'head_list' => self::exportHeadList($row)['head_list'],
|
||||
// 'hero_list' => self::exportHeadList($row)['hero_list'],
|
||||
'pve_instance_id' => $row['pve_instance_id'],
|
||||
'like_count' => $row['like_count'],
|
||||
'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()),
|
||||
@ -134,6 +138,21 @@ class User extends BaseModel {
|
||||
return $headList;
|
||||
}
|
||||
|
||||
private static function exportHeadList($userInfo){
|
||||
$list = emptyReplace(json_decode($userInfo['head_list'], true), array());
|
||||
$head_list = array();
|
||||
$hero_list = array();
|
||||
foreach ($list as $value){
|
||||
$temp = explode('|',$value);
|
||||
array_push($head_list,$temp[0]);
|
||||
array_push($hero_list,$temp[1]);
|
||||
}
|
||||
return array(
|
||||
'head_list'=>$head_list,
|
||||
'hero_list'=>$hero_list,
|
||||
);
|
||||
}
|
||||
|
||||
public static function update( $fieldsKv){
|
||||
SqlHelper::update
|
||||
(myself()->_getSelfMysql(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user