{{ headItem(item.statusCode).label }}
{{ item.auctionType==='local'? $t('live_room.spot'):$t('live_room.network') }}
{{ item.createdAt }}
diff --git a/app/pages/liveRoom/index.client.vue b/app/pages/liveRoom/index.client.vue
index 19446fa..3ffdfb7 100644
--- a/app/pages/liveRoom/index.client.vue
+++ b/app/pages/liveRoom/index.client.vue
@@ -13,11 +13,8 @@ import {message} from "~/components/x-message/useMessage.js"
import {showConfirmDialog} from 'vant';
import {artworkBuy} from "@/api/goods/index.js"
import {useI18n} from 'vue-i18n'
-import {CountUp} from 'countup.js'
const { t } = useI18n()
-const countUpRef = ref(null)
-const nextPriceRef = ref(null)
-const { auctionDetail} = goodStore();
+const { auctionDetail,getAuctionDetail} = goodStore();
const player = ref(null)
const {quoteStatus, show, playerId, show1, auctionData, getSocketData, getLiveLink, fullLive} = liveStore()
const pullLink = ref('')
@@ -101,6 +98,7 @@ const initializePlayer = async () => {
onMounted(async () => {
+ await getAuctionDetail()
pullLink.value = await getLiveLink()
if (auctionDetail.value.isLiving===1){
initializePlayer()
diff --git a/app/pages/payment/checkoutPage/index.vue b/app/pages/payment/checkoutPage/index.vue
new file mode 100644
index 0000000..90da516
--- /dev/null
+++ b/app/pages/payment/checkoutPage/index.vue
@@ -0,0 +1,342 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/pages/payment/completePage/index.vue b/app/pages/payment/completePage/index.vue
new file mode 100644
index 0000000..e4681ef
--- /dev/null
+++ b/app/pages/payment/completePage/index.vue
@@ -0,0 +1,363 @@
+
+
+
+
+
+
{{ statusText }}
+
+
+
+
+ id
+ {{ intentId }}
+
+
+ status
+ {{ intentStatus }}
+
+
+
+
+
+ View details
+
+
+
+
+
+
Test another
+
+
+
+
\ No newline at end of file
diff --git a/app/pages/payment/index.vue b/app/pages/payment/index.vue
index 6f34474..6482a70 100644
--- a/app/pages/payment/index.vue
+++ b/app/pages/payment/index.vue
@@ -5,11 +5,12 @@ import {goodStore} from "~/stores/goods/index.js";
import { showLoadingToast ,closeToast} from 'vant';
import {authStore} from "~/stores/auth/index.js";
import {message} from "~/components/x-message/useMessage.js";
-const {checkoutSessionUrl,payment}= authStore()
+const {checkoutSessionUrl,payment,payUid}= authStore()
const payStatus=ref(0)
definePageMeta({
i18n: 'payment.title'
})
+const {t}=useI18n()
const router=useRouter()
const changePayStatus=()=>{
payStatus.value=payStatus.value===0?1:0
@@ -29,6 +30,7 @@ const confirmPay=async ()=>{
message: t('payment.loading'),
forbidClick: true,
});
+
const res=await createBuyOrder({
buyUid:payment.value.buyUid,
price:payStatus.value===0?payment.value.leftPrice:amount.value,
@@ -36,17 +38,16 @@ const confirmPay=async ()=>{
testReturnHost:window.location.origin,
testReturnEndPoint:'/payment/result'
})
- if (res.status===0){
-/* router.push({
- path:'/externallinks',
- query:{
- url:res.data.checkoutSessionUrl
- }
- })*/
- window.location.href=res.data.checkoutSessionUrl
- }
+ console.log('res',res);
+ if (res.status===0){
+ // if (res.status===0){
+ // window.location.href=res.data.checkoutSessionUrl
+ // }
+ checkoutSessionUrl.value=res.data.checkoutSessionUrl
+ payUid.value=res.data.payUid
+ router.push('/payment/checkoutPage')
+}
}
-
const handleInput = (e) => {
// 只允许数字和小数点,且只保留两位小数
const value = e.target.value
@@ -72,12 +73,12 @@ const handleInput = (e) => {
-
{{payStatus===0 ? t('payment.payAll') : t('payment.payPartial')}}
+
{{payStatus===0 ? t('payment.fullPayment') : t('payment.partialPayment')}}
{{payment.leftCurrency}} {{payment?.leftPrice}}
-
+
-
{{payStatus===1 ? t('payment.payAll') : t('payment.payPartial')}}
+
{{payStatus===1 ? t('payment.fullPayment') : t('payment.partialPayment')}}
{{ t('payment.confirm') }}
diff --git a/app/pages/payment/result/index.vue b/app/pages/payment/result/index.vue
index bc02e5f..a8f412a 100644
--- a/app/pages/payment/result/index.vue
+++ b/app/pages/payment/result/index.vue
@@ -1,25 +1,68 @@
@@ -33,12 +76,11 @@ const goHome=()=>{
- {{ t('payment.backToHome') }}
+ {{ t('payment.result.backToHome') }}
-