hookehuyr

新增物资申领成功页面

9.58 KB | W: | H:

20.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
1 /* 1 /*
2 * @Date: 2023-09-01 10:29:30 2 * @Date: 2023-09-01 10:29:30
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-07-23 14:41:12 4 + * @LastEditTime: 2024-07-24 18:16:18
5 * @FilePath: /temple_material_request/src/route.js 5 * @FilePath: /temple_material_request/src/route.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
...@@ -24,6 +24,12 @@ export default [{ ...@@ -24,6 +24,12 @@ export default [{
24 title: '待申领物资', 24 title: '待申领物资',
25 } 25 }
26 }, { 26 }, {
27 + path: '/success',
28 + component: () => import('@/views/success.vue'),
29 + meta: {
30 + title: '申领成功',
31 + }
32 +}, {
27 path: '/auth', 33 path: '/auth',
28 component: () => import('@/views/auth.vue'), 34 component: () => import('@/views/auth.vue'),
29 meta: { 35 meta: {
......
1 <!-- 1 <!--
2 * @Date: 2024-07-23 12:53:15 2 * @Date: 2024-07-23 12:53:15
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-07-24 16:52:35 4 + * @LastEditTime: 2024-07-24 18:26:06
5 * @FilePath: /temple_material_request/src/views/material_pre_request.vue 5 * @FilePath: /temple_material_request/src/views/material_pre_request.vue
6 * @Description: 待申领物资页面 6 * @Description: 待申领物资页面
7 --> 7 -->
...@@ -357,6 +357,8 @@ const onDialogConfirm = () => { ...@@ -357,6 +357,8 @@ const onDialogConfirm = () => {
357 console.warn('request_tel', request_tel.value); 357 console.warn('request_tel', request_tel.value);
358 // TODO:购物车的值应该不用传,数量应该是单独修改 358 // TODO:购物车的值应该不用传,数量应该是单独修改
359 showType.value = false; 359 showType.value = false;
360 + // 申领成功跳转
361 + $router.push({ path: '/success' });
360 } 362 }
361 const onDialogCancel = () => { 363 const onDialogCancel = () => {
362 showType.value = false; 364 showType.value = false;
......
1 <!-- 1 <!--
2 * @Date: 2022-06-29 18:18:02 2 * @Date: 2022-06-29 18:18:02
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-02-16 16:41:15 4 + * @LastEditTime: 2024-07-24 18:25:08
5 - * @FilePath: /data-table/src/views/success.vue 5 + * @FilePath: /temple_material_request/src/views/success.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
8 <template> 8 <template>
9 <div class="success-page"> 9 <div class="success-page">
10 - <div v-if="successInfo.commit_text_type === 'default'" class="text-wrapper"> 10 + <div class="text-wrapper">
11 <van-image 11 <van-image
12 - round 12 + width="15rem"
13 - width="10rem"
14 height="10rem" 13 height="10rem"
15 style="vertical-align: bottom" 14 style="vertical-align: bottom"
16 :src="icon_success" 15 :src="icon_success"
17 /> 16 />
18 - <p class="name">{{ successInfo.form_name }}</p> 17 + <div style="font-size: 1.5rem; color: #A67939; margin-top: 2rem;">物资申领成功</div>
19 - <p class="text">{{ successInfo.commit_text }}</p> 18 + </div>
19 + <div style="border: 1px dashed #A67939;"></div>
20 + <div style="padding: 3rem 4rem;">
21 + <van-button plain block :color="styleColor.baseColor" style="margin-bottom: 1.5rem;" @click="goTo('activity')">回到活动主页</van-button>
22 + <van-button plain block :color="styleColor.baseColor" @click="goTo('home')">返回首页</van-button>
20 </div> 23 </div>
21 - <div v-else class="rich-text" v-html="successInfo.commit_text" />
22 - <!-- <div style="padding: 0 15% 1rem 15%">
23 - <div class="button-plain" :style="styleObj" @click="handle">返回</div>
24 - </div> -->
25 </div> 24 </div>
26 </template> 25 </template>
27 26
...@@ -54,12 +53,6 @@ const styleObj = { ...@@ -54,12 +53,6 @@ const styleObj = {
54 color: "#FFFFFF", 53 color: "#FFFFFF",
55 }; 54 };
56 55
57 -// 获取成功返回信息
58 -const store = mainStore();
59 -const { successInfo } = storeToRefs(store);
60 -
61 -const richText = '<div style="font-weight: bold;">123</div>'
62 -
63 onMounted(() => { 56 onMounted(() => {
64 $('body').css('backgroundColor', 'white'); 57 $('body').css('backgroundColor', 'white');
65 }); 58 });
...@@ -67,6 +60,16 @@ onMounted(() => { ...@@ -67,6 +60,16 @@ onMounted(() => {
67 const handle = () => { 60 const handle = () => {
68 $router.go(-1); 61 $router.go(-1);
69 }; 62 };
63 +
64 +const goTo = (type) => {
65 + // TODO:地址待定需要和后台沟通
66 + if (type === 'home') { // 返回首页
67 + // location.href = '/';
68 + } else { // 返回活动主页
69 + // location.href = '/';
70 + }
71 + console.warn(type);
72 +}
70 </script> 73 </script>
71 74
72 <style lang="less" scoped> 75 <style lang="less" scoped>
......