/** * 添加对应 * @param int $user_id 用户的 id * @param string $nikename 用户昵称 * @param int $gender 性别 1男 2 女 */ public static function add($user_id, $nikename, $gender) { $model = new UserProfile(); $model->gender = $gender; $model->nikename = $nikename; $model->user_id = $user_id; $model->update_time = time(); $model->insert(); return $model; }