hookehuyr

新增物资申领成功页面

9.58 KB | W: | H:

20.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
/*
* @Date: 2023-09-01 10:29:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-23 14:41:12
* @LastEditTime: 2024-07-24 18:16:18
* @FilePath: /temple_material_request/src/route.js
* @Description: 文件描述
*/
......@@ -24,6 +24,12 @@ export default [{
title: '待申领物资',
}
}, {
path: '/success',
component: () => import('@/views/success.vue'),
meta: {
title: '申领成功',
}
}, {
path: '/auth',
component: () => import('@/views/auth.vue'),
meta: {
......
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-24 16:52:35
* @LastEditTime: 2024-07-24 18:26:06
* @FilePath: /temple_material_request/src/views/material_pre_request.vue
* @Description: 待申领物资页面
-->
......@@ -357,6 +357,8 @@ const onDialogConfirm = () => {
console.warn('request_tel', request_tel.value);
// TODO:购物车的值应该不用传,数量应该是单独修改
showType.value = false;
// 申领成功跳转
$router.push({ path: '/success' });
}
const onDialogCancel = () => {
showType.value = false;
......
<!--
* @Date: 2022-06-29 18:18:02
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-02-16 16:41:15
* @FilePath: /data-table/src/views/success.vue
* @LastEditTime: 2024-07-24 18:25:08
* @FilePath: /temple_material_request/src/views/success.vue
* @Description: 文件描述
-->
<template>
<div class="success-page">
<div v-if="successInfo.commit_text_type === 'default'" class="text-wrapper">
<div class="text-wrapper">
<van-image
round
width="10rem"
width="15rem"
height="10rem"
style="vertical-align: bottom"
:src="icon_success"
/>
<p class="name">{{ successInfo.form_name }}</p>
<p class="text">{{ successInfo.commit_text }}</p>
<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 v-else class="rich-text" v-html="successInfo.commit_text" />
<!-- <div style="padding: 0 15% 1rem 15%">
<div class="button-plain" :style="styleObj" @click="handle">返回</div>
</div> -->
</div>
</template>
......@@ -54,12 +53,6 @@ const styleObj = {
color: "#FFFFFF",
};
// 获取成功返回信息
const store = mainStore();
const { successInfo } = storeToRefs(store);
const richText = '<div style="font-weight: bold;">123</div>'
onMounted(() => {
$('body').css('backgroundColor', 'white');
});
......@@ -67,6 +60,16 @@ onMounted(() => {
const handle = () => {
$router.go(-1);
};
const goTo = (type) => {
// TODO:地址待定需要和后台沟通
if (type === 'home') { // 返回首页
// location.href = '/';
} else { // 返回活动主页
// location.href = '/';
}
console.warn(type);
}
</script>
<style lang="less" scoped>
......