diff --git a/src/api/tes-specialist.ts b/src/api/tes-specialist.ts new file mode 100644 index 0000000..cd7a27d --- /dev/null +++ b/src/api/tes-specialist.ts @@ -0,0 +1,8 @@ +import { http } from '@/http/alova' + +/** + * 茶艺师个人介绍 + */ +export function getTeaSpecialistProfile() { + return http.Post('/teamapi/user/Introduction') +} diff --git a/src/api/user.ts b/src/api/user.ts index 041ca2a..f668c8f 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -78,4 +78,75 @@ export function resetPassword(data: IResetPasswordParams) { */ export function getUserBalance(store_id: number) { return http.Post('/storeapi/user/checkMoney', {store_id}) -} \ No newline at end of file +} + +/** + * 修改个人信息 + */ +// export function setUserAvatar() { +// return http.Post('/storeapi/user/updateUser', { avatar }) +// } + +/** + * 编辑工作时间 + */ +export interface ISetUserWorkTimeParams { + work_day: string // 1,2,3,4,5也就是周一、二、三、四、五 + work_start: string // 09:00 + work_end: string // 18:00 +} + +export function setUserWorkTime(data: ISetUserWorkTimeParams) { + return http.Post('/teamapi/user/editWork', data) +} + + +/** + * 地址列表 + */ +export interface IUserAddressListParams { + id: number + team_user_id: number + city_id: number + longitude: number + latitude: number + address: string +} + +export function getUserAddressList() { + return http.Post>('/teamapi/user/addressList') +} + +/** + * 获取已开通城市列表 + */ +export function getOpenCityList() { + return http.Post('/teamapi/user/teaStoreCity') +} + +/** + * 新增地址 + */ +export interface IAddUserAddressListParams { + city_id: number + longitude: number + latitude: number + address: string +} +export function addUserAddress(data: IAddUserAddressListParams) { + return http.Post('/teamapi/user/addAddress', data) +} + +/** + * 编辑地址 + */ +export function editUserAddress(data: IAddUserAddressListParams & { id: number }) { + return http.Post('/teamapi/user/editAddress', data) +} + +/** + * 删除地址 + */ +export function deleteUserAddress(id: number) { + return http.Post('/teamapi/user/delAddress', { id }) +} diff --git a/src/bundle/address/add.vue b/src/bundle/address/add.vue index 04a774b..a53219d 100644 --- a/src/bundle/address/add.vue +++ b/src/bundle/address/add.vue @@ -15,12 +15,12 @@ - + 选择地区 - + - + @@ -48,8 +48,7 @@ - 删除地址 - 确定 + 确定 @@ -59,7 +58,7 @@ -