hookehuyr

✨ feat(客户端): 新增微信支付成功页,新增捐赠证书页面

...@@ -104,6 +104,11 @@ export default { ...@@ -104,6 +104,11 @@ export default {
104 console.warn(this.donate_name); 104 console.warn(this.donate_name);
105 console.warn(this.donate_number); 105 console.warn(this.donate_number);
106 this.closeBtn(); 106 this.closeBtn();
107 +
108 + // 交易成功跳转回调页面
109 + this.$router.push({
110 + path: '/client/wechatpayCallback'
111 + })
107 }, 112 },
108 } 113 }
109 } 114 }
...@@ -117,16 +122,16 @@ export default { ...@@ -117,16 +122,16 @@ export default {
117 border: 1px solid #ECECEC; 122 border: 1px solid #ECECEC;
118 border-radius: 5px; 123 border-radius: 5px;
119 padding: 0.1rem; 124 padding: 0.1rem;
120 - .donate-detail { 125 + }
121 - font-size: 1.25rem; 126 + .donate-detail {
122 - padding: 1rem; 127 + font-size: 1.25rem;
123 - .text { 128 + padding: 1rem;
124 - color: #292929; 129 + .text {
125 - font-weight: bold; 130 + color: #292929;
126 - } 131 + font-weight: bold;
127 - .price { 132 + }
128 - color: #EE332E; 133 + .price {
129 - } 134 + color: #EE332E;
130 } 135 }
131 } 136 }
132 } 137 }
......
1 +<template>
2 + <div class="donate-certificate">
3 + <div class="header-bg">
4 + <van-image width="100" height="100" fit="contain" :src="icon_cert" style="margin-top: 15vh;" />
5 + </div>
6 + <div class="title">
7 + <van-row align="center">
8 + <van-col>
9 + <span style="font-size: 0.8rem; color: #272727;">尊敬的</span>
10 + </van-col>
11 + <van-col>
12 + <div style="color: #713610; padding: 1rem;" class="van-hairline--bottom">{{ name }}</div>
13 + </van-col>
14 + <van-col>:</van-col>
15 + </van-row>
16 + </div>
17 + <div class="content">
18 + 感谢您对“童声无界-声音漂流记”活动的支持。上海市儿童基金会已收到您的捐助,您的捐助将全部用于多民族语言发展项目,感谢您的爱心捐赠!
19 + </div>
20 + <div class="price">
21 + <div>爱心捐赠</div>
22 + <div>{{ price }}&nbsp;元</div>
23 + </div>
24 + <div class="organizer">
25 + <div class="wrapper">
26 + <p>上海市儿童基金会</p>
27 + <p>上海初心为爱公益基金会</p>
28 + <div style="position: absolute; width: 50%; height: 100%; top: 0; left: 0;">
29 + <van-image height="100%" fit="contain" :src="icon_stamp01" />
30 + </div>
31 + <div style="position: absolute; width: 50%; height: 100%; top: 0; right: 0;">
32 + <van-image height="100%" fit="contain" :src="icon_stamp02" />
33 + </div>
34 + </div>
35 + </div>
36 + <div class="date">{{ datetime }}</div>
37 + </div>
38 +</template>
39 +
40 +<script setup>
41 +import icon_cert from '@images/zhengshu@2x.png'
42 +import icon_stamp01 from '@images/stamp01.png'
43 +import icon_stamp02 from '@images/stamp02.png'
44 +
45 +import { ref, reactive, onMounted } from 'vue'
46 +import { useRoute, useRouter } from 'vue-router'
47 +import axios from '@/utils/axios';
48 +import $ from 'jquery'
49 +import { Toast } from 'vant';
50 +const $route = useRoute();
51 +const $router = useRouter();
52 +
53 +onMounted(() => {
54 +
55 +})
56 +</script>
57 +
58 +<script>
59 +import mixin from 'common/mixin';
60 +
61 +export default {
62 + mixins: [mixin.init],
63 + data() {
64 + return {
65 + name: '杨桐桐',
66 + price: '359',
67 + datetime: '2022年04月25日'
68 + }
69 + },
70 + mounted() {
71 +
72 + },
73 + methods: {
74 +
75 + }
76 +}
77 +</script>
78 +
79 +<style lang="less" scoped>
80 +.donate-certificate {
81 + background-image: url('@images/zhengshu-banner@2x.png');
82 + background-color: white;
83 + background-repeat: no-repeat;
84 + background-size: contain;
85 + width: 100%;
86 + position: relative;
87 + border-radius: 10px;
88 + height: 85vh;
89 + .header-bg {
90 + text-align: center;
91 + }
92 + .title {
93 + padding: 0 2rem;
94 + }
95 + .content {
96 + font-size: 0.85rem;
97 + padding: 2rem;
98 + line-height: 1.75;
99 + }
100 + .price {
101 + margin-left: 5rem;
102 + div:first-child {
103 + display: inline-block;
104 + font-size: 0.5rem;
105 + vertical-align: middle;
106 + margin-right: 0.5rem;
107 + }
108 + div:last-child {
109 + display: inline-block;
110 + font-size: 1.25rem;
111 + color: red;
112 + vertical-align: middle;
113 + }
114 + }
115 + .organizer {
116 + margin: 1rem;
117 + overflow: auto;
118 + .wrapper {
119 + float: right;
120 + font-size: 0.8rem;
121 + text-align: center;
122 + line-height: 2;
123 + position: relative;
124 + color: #0B3A72;
125 + padding: 0.5rem 0;
126 + }
127 + }
128 + .date {
129 + color: #272727;
130 + font-size: 0.85rem;
131 + text-align: right;
132 + padding-right: 2rem;
133 + }
134 +}
135 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -68,15 +68,31 @@ export default [{ ...@@ -68,15 +68,31 @@ export default [{
68 title: '实名认证' 68 title: '实名认证'
69 }, 69 },
70 children: [] 70 children: []
71 - }, { 71 +}, {
72 path: '/client/finishUpload', 72 path: '/client/finishUpload',
73 - name: '客户端上传作品成功跳转页面', 73 + name: '客户端上传作品成功跳转页面',
74 component: () => import('./views/client/finishUpload.vue'), 74 component: () => import('./views/client/finishUpload.vue'),
75 - meta: { 75 + meta: {
76 - title: '作品上传' 76 + title: '作品上传'
77 - }, 77 + },
78 - children: [] 78 + children: []
79 - }, { 79 +}, {
80 + path: '/client/wechatpayCallback',
81 + name: '微信付款成功后跳转页面',
82 + component: () => import('./views/client/wechatpayCallback.vue'),
83 + meta: {
84 + title: '微信支付'
85 + },
86 + children: []
87 +}, {
88 + path: '/client/donateCertificate',
89 + name: '捐书成功后提示证书页面',
90 + component: () => import('./views/client/donateCertificate.vue'),
91 + meta: {
92 + title: '捐赠证书'
93 + },
94 + children: []
95 +}, {
80 path: '/image', 96 path: '/image',
81 name: 'html转图片', 97 name: 'html转图片',
82 component: () => import('./views/html2canvas.vue'), 98 component: () => import('./views/html2canvas.vue'),
......
1 +<template>
2 + <div class="donate-certificate-page content-bg">
3 + <donate-cert></donate-cert>
4 + </div>
5 +</template>
6 +
7 +<script setup>
8 +import DonateCert from '@/components/DonateCert/index.vue'
9 +
10 +import { ref, reactive, onMounted } from 'vue'
11 +import { useRoute, useRouter } from 'vue-router'
12 +import axios from '@/utils/axios';
13 +import $ from 'jquery'
14 +import { Toast } from 'vant';
15 +const $route = useRoute();
16 +const $router = useRouter();
17 +
18 + onMounted(() => {
19 +
20 + })
21 +</script>
22 +
23 +<script>
24 +import mixin from 'common/mixin';
25 +
26 +export default {
27 + mixins: [mixin.init],
28 + data () {
29 + return {
30 +
31 + }
32 + },
33 + mounted () {
34 +
35 + },
36 + methods: {
37 +
38 + }
39 +}
40 +</script>
41 +
42 +<style lang="less" scoped>
43 +@import url('@css/content-bg.less');
44 +.donate-certificate-page {
45 + height: 96vh;
46 + padding: 2vh;
47 +}
48 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div class="wechatpay-callback-page">
3 + <div style="text-align: center; padding: 20%;">
4 + <van-image width="50" height="50" :src="icon_wechatpay" />
5 + <div style="color: #52ab38;;">支付成功</div>
6 + </div>
7 + <div style="color: #222222; text-align: center;">
8 + <p style="font-size: 1.15rem; margin-bottom: 1rem;">上海市儿童基金会</p>
9 + <div>
10 + <div style="font-size: 1.5rem; display: inline-block; vertical-align: middle;">¥</div>&nbsp;
11 + <div style="font-size: 2.5rem; display: inline-block; vertical-align: middle;">59.00</div>
12 + </div>
13 + </div>
14 + <div style="padding: 30% 4rem;">
15 + <my-button @on-click="getCert" type="primary">查看证书</my-button>
16 + </div>
17 + </div>
18 +</template>
19 +
20 +<script setup>
21 +import MyButton from '@/components/MyButton/index.vue'
22 +
23 +import icon_wechatpay from '@images/zhifu@2x.png'
24 +
25 +import { ref, reactive, onMounted } from 'vue'
26 +import { useRoute, useRouter } from 'vue-router'
27 +import axios from '@/utils/axios';
28 +import $ from 'jquery'
29 +import { Toast } from 'vant';
30 +const $route = useRoute();
31 +const $router = useRouter();
32 +
33 + onMounted(() => {
34 +
35 + })
36 +</script>
37 +
38 +<script>
39 +import mixin from 'common/mixin';
40 +
41 +export default {
42 + mixins: [mixin.init],
43 + data () {
44 + return {
45 +
46 + }
47 + },
48 + mounted () {
49 +
50 + },
51 + methods: {
52 + getCert () {
53 + this.$router.push({
54 + path: '/client/donateCertificate'
55 + });
56 + }
57 + }
58 +}
59 +</script>
60 +
61 +<style lang="less" scoped>
62 +.wechatpay-callback-page {}
63 +</style>
...\ No newline at end of file ...\ No newline at end of file