diff --git a/.vscode/settings.json b/.vscode/settings.json index 4fbb64b..1fa243b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -89,5 +89,6 @@ "Wechat", "WechatMiniprogram", "Weixin" - ] + ], + "git.ignoreLimitWarning": true } diff --git a/src/api/bank.ts b/src/api/bank.ts new file mode 100644 index 0000000..f5eeda5 --- /dev/null +++ b/src/api/bank.ts @@ -0,0 +1,24 @@ +import { http } from '@/http/alova' +import type { IAddBankCardParams } from '@/api/types/bank' + +/** + * 添加银行卡 + */ +export function addBankCard(data: IAddBankCardParams) { + return http.Post('/storeapi/user/addBank', data) +} + + +/** + * 删除银行卡 + */ +export function deleteBankCard(id: number) { + return http.Post('/storeapi/user/delBank', { id }) +} + +/** + * 获取银行卡列表 + */ +export function getBankCardList() { + return http.Post('/storeapi/user/checkBank') +} \ No newline at end of file diff --git a/src/api/store.ts b/src/api/store.ts index c182770..365f51f 100644 --- a/src/api/store.ts +++ b/src/api/store.ts @@ -19,4 +19,33 @@ export function getStoreDetails(id: number) { */ export function switchStore(id: number) { return http.Post('/storeapi/store/switchStore', { id }) +} + + +/** + * 编辑门店信息 + */ +export interface IEditStoreInfoParams { + id: number, + name?: string, + dy_uid?: string, + image?: string, + image_arr?: string[], + video?: string, + province?: string, + province_id?: Number, + city?: string, + city_id?: Number, + district?: string, + district_id?: Number, + address?: string, + area?: string, + contact_phone?: string, + day_time?: string, + start_time?: string, + end_time?: string, +} + +export function editStoreInfo(data: IEditStoreInfoParams) { + return http.Post('/storeapi/store/editStore', data) } \ No newline at end of file diff --git a/src/api/types/bank.ts b/src/api/types/bank.ts new file mode 100644 index 0000000..ef80d01 --- /dev/null +++ b/src/api/types/bank.ts @@ -0,0 +1,7 @@ +export interface IAddBankCardParams { + bank_name: string + bank_card: string + mobile: number|string + code: number|string + bank_open_name: string +} \ No newline at end of file diff --git a/src/api/user.ts b/src/api/user.ts index a146356..cb98041 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -24,18 +24,37 @@ export interface IUpdateUserInfoParams { } export function updateUserInfo(data: IUpdateUserInfoParams) { - console.log("🚀 ~ updateUserInfo ~ data:", data) return http.Post('/storeapi/user/updateUser', data) } +/** + * 获取流水明细 + */ +export interface IGetUserTransactionDetailsParams { + page: number + size: number + end_time: string +} + +export function getUserTransactionDetails(data: IGetUserTransactionDetailsParams) { + return http.Post('/storeapi/user/balanceLogList', data) +} + +/** + * 获取流水明细详情(账单明细) + */ +export function getUserTransactionDetailsInfo(id: number) { + return http.Post('/storeapi/user/balanceLogDetails', { id }) +} + /** * 获取验证码 */ -export interface IGetVerificationCodeParams { +export interface IGetStoreVerificationCodeParams { mobile: string - scene: number + scene: string } -export function getVerificationCode(data: IGetVerificationCodeParams) { +export function getVerificationCode(data: IGetStoreVerificationCodeParams) { return http.Post('/storeapi/sms/sendCode', data) -} +} \ No newline at end of file diff --git a/src/bundle/parten/pages/bank-card/add.vue b/src/bundle/parten/pages/bank-card/add.vue index c11455e..769b7b7 100644 --- a/src/bundle/parten/pages/bank-card/add.vue +++ b/src/bundle/parten/pages/bank-card/add.vue @@ -10,15 +10,13 @@