|
@@ -1,4 +1,4 @@
|
|
-import { extractAndRetained, qs } from '@/utils'
|
|
|
|
|
|
+import { qs } from '@/utils'
|
|
import { http } from '@/utils/http'
|
|
import { http } from '@/utils/http'
|
|
|
|
|
|
const pre = import.meta.env.VITE_SERVER_BASEURL_PREFIX
|
|
const pre = import.meta.env.VITE_SERVER_BASEURL_PREFIX
|
|
@@ -16,8 +16,7 @@ export function addressAdd(data: any) {
|
|
* @returns
|
|
* @returns
|
|
*/
|
|
*/
|
|
export function addressList(data: any) {
|
|
export function addressList(data: any) {
|
|
- const { extract, retained } = extractAndRetained(data, ['page', 'size'])
|
|
|
|
- return http.post<any>(`${pre}/app/user/address/list?${qs(extract)}`, retained)
|
|
|
|
|
|
+ return http.post<any>(`${pre}/app/user/address/list`, data)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -25,7 +24,7 @@ export function addressList(data: any) {
|
|
* @returns
|
|
* @returns
|
|
*/
|
|
*/
|
|
export function addressDetail(data: any) {
|
|
export function addressDetail(data: any) {
|
|
- return http.post<any>(`${pre}/app/user/address/detail?${qs(data)}`)
|
|
|
|
|
|
+ return http.get<any>(`${pre}/app/user/address/detail`, data)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -33,14 +32,14 @@ export function addressDetail(data: any) {
|
|
* @returns
|
|
* @returns
|
|
*/
|
|
*/
|
|
export function addressUpdate(data: any) {
|
|
export function addressUpdate(data: any) {
|
|
- return http.post<any>(`${pre}/app/user/address/update`, data)
|
|
|
|
|
|
+ return http.put<any>(`${pre}/app/user/address/update`, data)
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 收获地址删除 入参id
|
|
* 收获地址删除 入参id
|
|
* @returns
|
|
* @returns
|
|
*/
|
|
*/
|
|
export function addressDel(data: any) {
|
|
export function addressDel(data: any) {
|
|
- return http.post<any>(`${pre}/app/user/address/delete?${qs(data)}`)
|
|
|
|
|
|
+ return http.delete<any>(`${pre}/app/user/address/delete?${qs(data)}`)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -48,7 +47,7 @@ export function addressDel(data: any) {
|
|
* @returns
|
|
* @returns
|
|
*/
|
|
*/
|
|
export function todayDetail() {
|
|
export function todayDetail() {
|
|
- return http.post<any>(`${pre}/app/user/sign/todayDetail`)
|
|
|
|
|
|
+ return http.get<any>(`${pre}/app/user/sign/todayDetail`)
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 签到
|
|
* 签到
|