Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
xysBooking
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-01-25 15:14:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fe181c6e27bc8cac396c9ff424aefac65bf248f5
fe181c6e
1 parent
b4fc25ae
退款API联调
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
12 deletions
components.d.ts
src/api/index.js
src/components/reserveCard.vue
src/views/bookingDetail.vue
components.d.ts
View file @
fe181c6
...
...
@@ -7,7 +7,6 @@ export {}
declare
module
'@vue/runtime-core'
{
export
interface
GlobalComponents
{
Calendar
:
typeof
import
(
'./src/components/calendar.vue'
)[
'default'
]
QrCode
:
typeof
import
(
'./src/components/qrCode.vue'
)[
'default'
]
ReserveCard
:
typeof
import
(
'./src/components/reserveCard.vue'
)[
'default'
]
RouterLink
:
typeof
import
(
'vue-router'
)[
'RouterLink'
]
...
...
src/api/index.js
View file @
fe181c6
/*
* @Date: 2023-08-24 09:42:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-25
08:36:47
* @LastEditTime: 2024-01-25
14:56:16
* @FilePath: /xysBooking/src/api/index.js
* @Description: 文件描述
*/
...
...
@@ -20,7 +20,7 @@ const Api = {
QRCODE_LIST
:
'/srv/?a=api&t=qrcode_list'
,
QRCODE_STATUS
:
'/srv/?a=api&t=qrcode_status'
,
BILL_LIST
:
'/srv/?a=api&t=bill_list'
,
CANCEL_PREPARE
:
'/srv/?a=api&t=cancel_prepare
'
,
ICBC_REFUND
:
'/srv/?a=icbc_refund
'
,
BILL_PREPARE
:
'/srv/?a=api&t=bill_person'
,
BILL_PAY_STATUS
:
'/srv/?a=api&t=bill_pay_status'
,
};
...
...
@@ -117,11 +117,11 @@ export const qrcodeStatusAPI = (params) => fn(fetch.get(Api.QRCODE_STATUS, param
export
const
billListAPI
=
(
params
)
=>
fn
(
fetch
.
get
(
Api
.
BILL_LIST
,
params
));
/**
* @description: 取消预约
退款准备(模拟)
* @param {String}
bill_id 预约单
id
* @returns {String}
bill_id 预约单id
* @description: 取消预约
* @param {String}
pay_
id
* @returns {String}
*/
export
const
cancelPrepareAPI
=
(
params
)
=>
fn
(
fetch
.
post
(
Api
.
CANCEL_PREPARE
,
params
));
export
const
icbcRefundAPI
=
(
params
)
=>
fn
(
fetch
.
post
(
Api
.
ICBC_REFUND
,
params
));
/**
* @description: 预约单的参观者列表
...
...
src/components/reserveCard.vue
View file @
fe181c6
<!--
* @Date: 2024-01-24 16:38:13
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-25 1
1:33:4
4
* @LastEditTime: 2024-01-25 1
5:13:0
4
* @FilePath: /xysBooking/src/components/reserveCard.vue
* @Description: 文件描述
-->
...
...
@@ -101,7 +101,7 @@ const formatStatus = (status) => {
case CodeStatus.CANCELED:
return {
key: 'cancel',
value: '
已取消
'
value: '
支付超时
'
}
case CodeStatus.USED:
return {
...
...
src/views/bookingDetail.vue
View file @
fe181c6
<!--
* @Date: 2024-01-16 13:19:23
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-2
4 18:47:48
* @LastEditTime: 2024-01-2
5 14:57:11
* @FilePath: /xysBooking/src/views/bookingDetail.vue
* @Description: 预约记录详情
-->
...
...
@@ -48,7 +48,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
import qrCode from '@/components/qrCode';
import { showConfirmDialog } from 'vant';
import { showSuccessToast, showFailToast } from 'vant';
import { billInfoAPI,
cancelPrepare
API } from '@/api/index'
import { billInfoAPI,
icbcRefund
API } from '@/api/index'
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
...
...
@@ -67,7 +67,7 @@ const cancelBooking = (item) => {
})
.then(async () => {
// on confirm
const { code, data } = await
cancelPrepareAPI({ bill_id: billInfo.value.bill
_id });
const { code, data } = await
icbcRefundAPI({ pay
_id });
if (code) {
showSuccessToast('取消成功');
$router.go(-1);
...
...
Please
register
or
login
to post a comment