public function test_feed($params) { $uid = $params['u']; $tu = new TTUser($uid); $id = $tu->getoid('achieves', TT::OTHER_GROUP); $achieves = $tu->getbyid($id); $aparams = $tu->getf(array('popu', 'invite_count', 'gogoods_count', 'total_count', 'total_sale')); $ret['baparams'] = $aparams; foreach (AchieveConfig::$_config as $tag => $conf) { $ret['tag'][] = $tag; $ret['conf'][] = $conf; } $data = array('total_count' => 50000, 'total_sale' => 100000, 'gogoods_count' => 3000); $tu->mputf($data); $aparams = $tu->getf(array('popu', 'invite_count', 'gogoods_count', 'total_count', 'total_sale')); $ret['aaparams'] = $aparams; $ret['s'] = 'OK'; return $ret; }
/** * 更新用户形象等 * @param $params * require u -- 玩家id * ups -- 形象数组 * @return * s -- OK */ public function update_profile($params) { $uid = $params['u']; $ups = $params['ups']; $tu = new TTUser($uid); $tu->mputf($ups); $ret['s'] = 'OK'; return $ret; }