Files
uniapp-im-shop/api/my-index.js
2026-01-04 23:35:06 +08:00

144 lines
2.7 KiB
JavaScript

import http from '@/utils/request'
/** 添加银行卡 */
export const addUserAddress = data => {
return http({
url: '/api/service/userCard',
method: 'post',
data
})
}
/** 修改银行卡 */
export const updateUserAddress = data => {
return http({
url: '/api/service/userCard',
method: 'put',
data
})
}
/** 获取用户银行卡列表 */
export const getUserAddress = data => {
return http({
url: '/api/service/userCard/list',
method: 'get',
data
})
}
/** 删除银行卡 */
export const deleteUserAddress = id => {
return http({
url: `/api/service/userCard/${id}`,
method: 'delete'
})
}
/** 获取用户银行卡详情 */
export const getUserAddressDetail = id => {
return http({
url: `/api/service/userCard/details/${id}`,
method: 'get'
})
}
/** 获取用户支付密码详细信息 */
export const getUserPayPwd = () => {
return http({
url: '/api/service/userPassword/details',
method: 'get'
})
}
/**
* 添加/修改支付密码
* @param {*} data
* @param {*} method post 添加 put 修改
* @returns
*/
export const updateUserPayPwd = (data, method = 'post') => {
return http({
url: '/api/service/userPassword',
method,
data
})
}
/**
* 添加/修改银行卡
* @param {*} data
* @param {*} method post 添加 put 修改
* @returns
*/
export const addUserPayPwd = (data, method = 'post') => {
return http({
url: '/api/service/userCard',
method,
data
})
}
/** 删除银行卡 */
export const deleteUserPayPwd = id => {
return http({
url: `/api/service/userCard/${id}`,
method: 'delete'
})
}
/** 获取银行卡列表 */
export const getUserBankList = () => {
return http({
url: '/api/service/userCard/list',
method: 'get'
})
}
/** 获取银行卡详情 */
export const getUserBankDetail = id => {
return http({
url: `/api/service/userCard/details/${id}`,
method: 'get'
})
}
/**
* 添加/修改用户第三方支付账户
* @param {*} data 提交数据
* @param {*} method post 添加 put 修改
* @returns
*/
export const addUserThirdPay = (data, method = 'post') => {
return http({
url: '/api/service/userPayment',
method,
data
})
}
/** 获取用户第三方支付详情 */
export const getUserThirdPay = id => {
return http({
url: `/api/service/userPayment/${id}`,
method: 'get'
})
}
/** 获取身份证信息 */
export const getUserIdCard = () => {
return http({
url: '/api/service/userVerification/details',
method: 'get'
})
}
/** 添加身份证 */
export const addUserIdCard = data => {
return http({
url: '/api/service/userVerification',
method: 'post',
data
})
}