1
This commit is contained in:
@@ -40,8 +40,8 @@ interface UpdateUserParams {
|
||||
avatar_url: string;
|
||||
gender: string;
|
||||
phone: string;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
latitude?: number;
|
||||
longitude?: number;
|
||||
city: string;
|
||||
province: string;
|
||||
country: string;
|
||||
@@ -379,17 +379,17 @@ export class UserService {
|
||||
static async save_user_info(user_info: Partial<UserInfo> & { phone?: string; gender?: string }): Promise<boolean> {
|
||||
try {
|
||||
// 获取当前位置信息
|
||||
const location = await Taro.getLocation({
|
||||
type: 'wgs84'
|
||||
});
|
||||
// const location = await Taro.getLocation({
|
||||
// type: 'wgs84'
|
||||
// });
|
||||
|
||||
const updateParams: UpdateUserParams = {
|
||||
nickname: user_info.nickname || '',
|
||||
avatar_url: user_info.avatar || '',
|
||||
gender: user_info.gender || '',
|
||||
phone: user_info.phone || '',
|
||||
latitude: location.latitude,
|
||||
longitude: location.longitude,
|
||||
latitude: user_info.latitude||'',
|
||||
longitude: user_info.longitude||'',
|
||||
city: user_info.location || '',
|
||||
province: '', // 需要从用户信息中获取
|
||||
country: '' // 需要从用户信息中获取
|
||||
|
||||
Reference in New Issue
Block a user