Commit afc665e8 authored by zhengke's avatar zhengke

支付成功

parent a6034547
...@@ -24,7 +24,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -24,7 +24,7 @@ const routes: RouteRecordRaw[] = [
} }
}, },
{ {
path: '/space/:current(\\d+)?', path: '/space/:current(\\d+)?/:firm(\\d+)?',
component: () => import('@/views/SellTemplate/Workspace.vue'), component: () => import('@/views/SellTemplate/Workspace.vue'),
meta:{ meta:{
title:'个人空间' title:'个人空间'
......
...@@ -270,6 +270,8 @@ const redicetTo = (path:string)=>{ ...@@ -270,6 +270,8 @@ const redicetTo = (path:string)=>{
path path
}) })
} }
if(router.currentRoute.value.params.firm&&router.currentRoute.value.params.firm==1) createEnterpriseHandler()
</script> </script>
<style> <style>
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
</div> </div>
</div> </div>
</div> </div>
<Success v-if="dialogVisible" :PayDatas="PaySuccessDatas" @close="dialogVisible=false,close()"></Success>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -85,6 +86,7 @@ import { useUserStore } from '@/store' ...@@ -85,6 +86,7 @@ import { useUserStore } from '@/store'
import { openNewBlank, query } from '@/utils/common' import { openNewBlank, query } from '@/utils/common'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { ref,PropType, onMounted } from 'vue' import { ref,PropType, onMounted } from 'vue'
import Success from './success.vue'
const props = defineProps({ const props = defineProps({
defaultType: { defaultType: {
...@@ -119,7 +121,9 @@ const OrderReviewRef = ref() ...@@ -119,7 +121,9 @@ const OrderReviewRef = ref()
const orderNum = ref('') const orderNum = ref('')
const queryTimer = ref<any>(null) const queryTimer = ref<any>(null)
const currentPayStatus = ref(0) const currentPayStatus = ref(0)
const PaySuccessDatas = ref({} as any)
const countValue = ref(Date.now() + 1000 * 60 * 30) const countValue = ref(Date.now() + 1000 * 60 * 30)
const dialogVisible = ref(false)
if(userInfo.value.it) activeVersion.value=2 if(userInfo.value.it) activeVersion.value=2
...@@ -171,6 +175,8 @@ const getOrderStatus = async ()=>{ ...@@ -171,6 +175,8 @@ const getOrderStatus = async ()=>{
const response = await OrderService.GetOrderPayStatusAsync(orderNum.value) const response = await OrderService.GetOrderPayStatusAsync(orderNum.value)
if(response.data.resultCode == ApiResult.SUCCESS){ if(response.data.resultCode == ApiResult.SUCCESS){
currentPayStatus.value = parseInt(response.data.message) currentPayStatus.value = parseInt(response.data.message)
PaySuccessDatas.value = response.data.data
dialogVisible.value = true
}else{ }else{
stopTimerHandler() stopTimerHandler()
} }
......
<template>
<div class="OrderSuccess-form">
<div class="OrderSuccess-bj"></div>
<div class="OrderSuccess-c row flex-center items-center cusor-pointer"
@click="goUrl">
<div class="OrderSuccess-center text-center"
:class="[props.PayDatas.VipType==2?'active':'']">
<div class="OrderSuccess-title">
<template v-if="props.PayDatas.OrderType==1">
恭喜您成功购买
</template>
<template v-else-if="props.PayDatas.OrderType==2">
恭喜您续费成功
</template>
<template v-else-if="props.PayDatas.OrderType==3">
恭喜您升级成功
</template>
</div>
<div class="OrderSuccess-type row flex-between">
<div class="OrderSuccess-lin">
<div></div>
</div>
<div class="OrderSuccess-hy">
<span>{{props.PayDatas.VipType==2?'企业会员':'个人会员'}}</span>
</div>
<div class="OrderSuccess-lin">
<div></div>
</div>
</div>
<div class="OrderSuccess-time">有效期 {{props.PayDatas.ActiveDate.replace(/-/g, '.')}}-{{props.PayDatas.ExpiredDate.replace(/-/g, '.')}}</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router';
const props = defineProps({
PayDatas: {} as any
})
const emit = defineEmits<{
(event: 'close'): void
}>()
const router = useRouter();
const goUrl = () =>{
emit('close')
if(props.PayDatas.VipType==2&&props.PayDatas.OrderType==1){
router.push({
path: `/space/0/1`
})
}else{
router.push({
path: `/space`
})
}
}
</script>
<style scoped>
.OrderSuccess-form,.OrderSuccess-bj{
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 10;
}
.OrderSuccess-bj{
background: #000;
opacity: 0.6;
z-index: 11;
}
.OrderSuccess-c{
position: relative;
width: 100%;
height: 100%;
z-index: 12;
}
.OrderSuccess-center{
width: 477px;
height: 391px;
background: url('../../../assets/img/vipgr.png')no-repeat;
background-size: 100% 100%;
z-index: 12;
padding-right: 17px;
}
.OrderSuccess-title{
font-family: HYYuanLongHei;
font-weight: bold;
font-size: 24px;
color: #000000;
padding: 162px 0 5px 0 ;
}
.OrderSuccess-type{
padding: 0 137px ;
}
.OrderSuccess-lin div{
width: 23px;
height: 2px;
background: #B8B8F7;
border-radius: 1px;
border: 0px solid #000000;
position: relative;
top: 22px;
}
.OrderSuccess-hy{
font-family: HYYuanLongHei;
font-weight: bold;
font-size: 30px;
color: #115EFC;
}
.OrderSuccess-time{
font-family: PingFang SC;
font-weight: 500;
font-size: 14px;
color: #8B94CD;
padding-top: 15px;
}
.OrderSuccess-center.active{
background: url('../../../assets/img/vipjt.png')no-repeat;
background-size: 100% 100%;
}
.OrderSuccess-center.active .OrderSuccess-hy{
color: #641CF7;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment