success.vue
2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!--
* @Date: 2022-06-29 18:18:02
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-02 18:44:30
* @FilePath: /temple_material_request/src/views/success.vue
* @Description: 文件描述
-->
<template>
<div class="success-page">
<div class="text-wrapper">
<van-image
width="15rem"
height="10rem"
style="vertical-align: bottom"
:src="icon_success"
/>
<div style="font-size: 1.5rem; color: #A67939; margin-top: 2rem;">物资申领成功</div>
</div>
<div style="border: 1px dashed #A67939;"></div>
<div style="padding: 3rem 4rem;">
<van-button plain block :color="styleColor.baseColor" style="margin-bottom: 1.5rem;" @click="goTo('activity')">回到活动主页</van-button>
<van-button plain block :color="styleColor.baseColor" @click="goTo('home')">返回首页</van-button>
</div>
</div>
</template>
<script setup>
import { ref } from "vue";
import { useRoute, useRouter } from "vue-router";
import { styleColor } from "@/constant.js";
import icon_success from "@images/que-sucess@2x.png";
import {
Cookies,
$,
_,
axios,
storeToRefs,
mainStore,
Toast,
useTitle,
} from "@/utils/generatePackage.js";
//import { } from '@/utils/generateModules.js'
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
const activity_id = $route.query.activity_id ? $route.query.activity_id : '';
const form_id = $route.query.form_id ? $route.query.form_id : '';
const client_id = $route.query.client_id ? $route.query.client_id : '';
const styleObj = {
background: styleColor.baseColor,
border: styleColor.baseColor,
color: "#FFFFFF",
};
onMounted(() => {
$('body').css('backgroundColor', 'white');
});
const handle = () => {
$router.go(-1);
};
const goTo = (type) => {
if (type === 'home') { // 返回首页
location.href = `../../../?p=volunteer_home&t=volunteer&c=${client_id}`;
} else { // 返回活动主页
location.href = `../?p=activity&form_id=${form_id}&i=${activity_id}`;
}
}
</script>
<style lang="less" scoped>
.success-page {
.text-wrapper {
padding-top: 2rem;
padding-bottom: 2rem;
text-align: center;
.name {
font-size: 1.25rem;
margin: 0.5rem;
font-weight: bold;
}
.text {
font-size: 1.05rem;
margin: 0.5rem;
font-weight: bold;
}
}
.rich-text {
padding: 1rem 2rem;
white-space: pre-wrap;
:deep(img) {
width: 100%;
}
}
.button-plain {
width: auto;
height: auto;
text-align: center;
padding: 0.6rem;
margin: 0.5rem;
font-size: 1rem;
// background: @base-font-color;
border-radius: 24px;
// border: 1px solid @base-color;
// color: @base-color;
font-weight: bold;
}
}
</style>