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-26 16:31:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d4f9fe037088fc7e46e10e91e245a3df69d8c3e2
d4f9fe03
1 parent
cbda039c
支付完成反馈页新增商户号查询接口
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
7 deletions
src/api/index.js
src/views/callback.vue
src/api/index.js
View file @
d4f9fe0
/*
* @Date: 2023-08-24 09:42:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-26 1
3:28:51
* @LastEditTime: 2024-01-26 1
6:28:22
* @FilePath: /xysBooking/src/api/index.js
* @Description: 文件描述
*/
...
...
@@ -25,6 +25,7 @@ const Api = {
BILL_PREPARE
:
'/srv/?a=api&t=bill_person'
,
BILL_PAY_STATUS
:
'/srv/?a=api&t=bill_pay_status'
,
QUERY_QR_CODE
:
'/srv/?a=api&t=id_number_query_qr_code'
,
ICBC_ORDER_QRY
:
'/srv/?a=icbc_orderqry'
,
};
/**
...
...
@@ -152,3 +153,10 @@ export const billPayStatusAPI = (params) => fn(fetch.get(Api.BILL_PAY_STATUS, pa
* @returns {String}
*/
export
const
queryQrCodeAPI
=
(
params
)
=>
fn
(
fetch
.
get
(
Api
.
QUERY_QR_CODE
,
params
));
/**
* @description: 查询订单号
* @param {String}
* @returns {String}
*/
export
const
icbcOrderQryAPI
=
(
params
)
=>
fn
(
fetch
.
get
(
Api
.
ICBC_ORDER_QRY
,
params
));
...
...
src/views/callback.vue
View file @
d4f9fe0
<!--
* @Date: 2024-01-26 10:24:45
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-26 1
3:58:57
* @LastEditTime: 2024-01-26 1
6:30:31
* @FilePath: /xysBooking/src/views/callback.vue
* @Description: 反馈页面
-->
...
...
@@ -29,7 +29,7 @@
<script setup>
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { onAuthBillInfoAPI } from '@/api/index'
import { onAuthBillInfoAPI
, icbcOrderQryAPI
} from '@/api/index'
import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js'
//import { } from '@/utils/generateModules.js'
//import { } from '@/utils/generateIcons.js'
...
...
@@ -48,13 +48,18 @@ const formatDatetime = (data) => { // 格式化日期
}
onMounted(async () => {
// 获取订单
详情
const { code, data } = await
onAuthBillInfoAPI({ pay_id: $route.query.pay_id
});
// 获取订单
ID
const { code, data } = await
icbcOrderQryAPI({ out_trade_no: $route.query.out_trade_no
});
if (code) {
// 获取订单详情
const { code:code_pay, data:data_pay } = await onAuthBillInfoAPI({ pay_id: data.pay_id });
if (code_pay) {
//
data.datetime = data && formatDatetime(data
);
billInfo.value = data
;
data_pay.datetime = data_pay && formatDatetime(data_pay
);
billInfo.value = data_pay
;
}
}
})
</script>
...
...
Please
register
or
login
to post a comment