getOne($uid); if ($info) { $info['name'] = ''; if ($info['truename']) { $info['name'] = $info['truename']; } elseif ($info['username']) { $info['name'] = $info['username']; } if ($info['area']) { $info['add'] = $info['name'] . '('.$info['area'].')'; } else { $info['add'] = $info['name'] . '(未知)'; } if (!$info['birthday']) { $info['birthday'] = ''; } else { $info['birthday'] = date('Y-m-d', $info['birthday']); } if (!$info['avatar'] && $info['avatar_id'] > 0) { $avatar = Dever::db('passport/avatar')->one($info['avatar_id']); $info['avatar'] = $avatar['avatar']; } } return $info; } # 测试合并 public function test_combine() { $base = new Base; $base->combine(3, 321313); } # 更新用户表的地址 public function upAddress($uid, $address_contact, $address_mobile, $area_id = '', $address = '') { $update['where_id'] = $uid; $update['address_contact'] = $address_contact; $update['address_mobile'] = $address_mobile; $update['area_id'] = $area_id; $update['address'] = $address; Dever::db('passport/user')->update($update); return 'ok'; } }