update pay page
This commit is contained in:
1 parent
e73a743d3c
commit
9eb696ffbc
4 files changed
+135
-14
No files matched your search
@@ -1,7 +1,9 @@
|
|||||||
import button from './button';
|
import button from './button';
|
||||||
import message from './message';
|
import message from './message';
|
||||||
|
import title from './title';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
button,
|
button,
|
||||||
message
|
message,
|
||||||
|
title
|
||||||
};
|
};
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
paidSuccessfully: '支付成功',
|
paidSuccessfully: '支付成功',
|
||||||
paid: '已经购买成功',
|
paid: '已经购买成功',
|
||||||
needPay: '需要购买'
|
needPay: '需要购买',
|
||||||
|
wechatPayHelp: '请打开手机微信,扫一扫完成支付'
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
export default {
|
||||||
|
orderInfo: '订单信息',
|
||||||
|
orderId: '订单号',
|
||||||
|
orderDescription: '订单描述',
|
||||||
|
orderPrice: '应付金额',
|
||||||
|
orderGood: '商品信息',
|
||||||
|
payWay: '支付方式',
|
||||||
|
payWayWechat: '微信支付'
|
||||||
|
};
|
||||||
+121
-12
@@ -6,19 +6,62 @@
|
|||||||
<el-row v-if="order">
|
<el-row v-if="order">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="courses">
|
<el-row>
|
||||||
<div v-for="(course, courseIndex) in courses" :key="courseIndex">
|
<el-col :span="12" :offset="6">
|
||||||
<div class="title">
|
<div class="order">
|
||||||
{{ course.title }}
|
<el-descriptions :title="$t('course.title.orderInfo')" :column="1">
|
||||||
|
<el-descriptions-item :label="$t('course.title.orderId')">{{ order?.id }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item :label="$t('course.title.orderDescription')">
|
||||||
|
{{ order?.description }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item :label="$t('course.title.orderPrice')">
|
||||||
|
<span class="price">¥{{ order?.price }}</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
v-for="(course, courseIndex) in courses"
|
||||||
|
:key="courseIndex"
|
||||||
|
:label="$t('course.title.orderGood')"
|
||||||
|
>
|
||||||
|
<span>{{ course.title }}</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
<div class="price">
|
</el-col>
|
||||||
{{ course.price }}
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12" :offset="6">
|
||||||
|
<el-divider border-style="dashed" />
|
||||||
|
<div class="payways">
|
||||||
|
<div
|
||||||
|
:class="{
|
||||||
|
payway: true,
|
||||||
|
wechat: true,
|
||||||
|
active: payway === 'wechat'
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<span class="payicon wechat"></span>
|
||||||
|
{{ $t('course.title.payWayWechat') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</el-col>
|
||||||
</div>
|
</el-row>
|
||||||
<div class="paycode">
|
<el-row>
|
||||||
<qr-code v-if="order.wechatpayUrl" :value="order.wechatpayUrl" :size="200" class="m-auto" />
|
<el-col :span="12" :offset="6">
|
||||||
</div>
|
<el-row class="paycodes">
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="paycode wechat">
|
||||||
|
<qr-code v-if="order.wechatpayUrl" :value="order.wechatpayUrl" :size="200" class="m-auto" />
|
||||||
|
<p class="help-text">{{ $t('course.message.wechatPayHelp') }}</p>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="help-img">
|
||||||
|
<img src="https://midas.gtimg.cn/enterprise/images/ep_sys_wx_tip.jpg" />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -37,7 +80,10 @@ import { defineComponent } from 'vue';
|
|||||||
import QrCode from 'qrcode.vue';
|
import QrCode from 'qrcode.vue';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
|
|
||||||
|
const PAYWAY_WECHAT = 'wechat';
|
||||||
|
|
||||||
interface IData {
|
interface IData {
|
||||||
|
payway: typeof PAYWAY_WECHAT;
|
||||||
order: IOrder | undefined;
|
order: IOrder | undefined;
|
||||||
courses: ICourse[] | undefined;
|
courses: ICourse[] | undefined;
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
@@ -50,6 +96,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
data(): IData {
|
data(): IData {
|
||||||
return {
|
return {
|
||||||
|
payway: PAYWAY_WECHAT,
|
||||||
order: undefined,
|
order: undefined,
|
||||||
courses: [],
|
courses: [],
|
||||||
loading: false
|
loading: false
|
||||||
@@ -104,7 +151,7 @@ export default defineComponent({
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.wrapper {
|
.wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 400px;
|
height: 800px;
|
||||||
background-image: radial-gradient(circle at 0 2%, #283e63, #172337 99%);
|
background-image: radial-gradient(circle at 0 2%, #283e63, #172337 99%);
|
||||||
.container {
|
.container {
|
||||||
width: 1200px;
|
width: 1200px;
|
||||||
@@ -155,6 +202,68 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.order {
|
||||||
|
.price {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-card {
|
||||||
|
padding: 50px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payways {
|
||||||
|
overflow: hidden;
|
||||||
|
.payway {
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
float: left;
|
||||||
|
width: 120px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
&.active {
|
||||||
|
border: 1px solid #3879d1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.payicon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-top: 2px;
|
||||||
|
display: inline-block;
|
||||||
|
&.wechat {
|
||||||
|
position: relative;
|
||||||
|
top: 3px;
|
||||||
|
width: 22px;
|
||||||
|
height: 19px;
|
||||||
|
background-image: url(//midas.gtimg.cn/enterprise/images/ep_new_sprites@2x.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 60px 250px;
|
||||||
|
background-position: 0 -50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.paycodes {
|
||||||
|
padding: 30px 0;
|
||||||
|
.wechat {
|
||||||
|
.help-text {
|
||||||
|
display: block;
|
||||||
|
background-color: #00c800;
|
||||||
|
color: white;
|
||||||
|
font-size: 14px;
|
||||||
|
height: 35px;
|
||||||
|
width: 240px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 35px;
|
||||||
|
margin: 10px auto 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.episodes {
|
.episodes {
|
||||||
padding: 50px 0;
|
padding: 50px 0;
|
||||||
&.disabled {
|
&.disabled {
|
||||||
|
|||||||
Reference in new issue
Block a user