Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-12-05 17:31:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a59b4a6a451a16524786a862e85f0f6569fb07bb
a59b4a6a
1 parent
42702807
新增表单提交成功页面
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
25 deletions
src/App.vue
src/assets/images/que-sucess@2x.png
src/components/FileUploaderField/index.vue
src/route.js
src/views/index.vue
src/views/success.vue
src/App.vue
View file @
a59b4a6
...
...
@@ -13,11 +13,6 @@
</van-col>
</van-row>
<router-view v-else></router-view>
<div
style="text-align: center; color: #545454; font-size: 0.85rem; padding-bottom: 1rem"
>
提交即授权该表单收集你的填写信息
</div>
</template>
<script setup>
...
...
@@ -74,10 +69,6 @@ onMounted(async () => {
// wx.error((err) => {
// console.warn(err);
// });
// TAG: 全局背景色
document
.querySelector("body")
.setAttribute("style", `background-color: ${styleColor.backgroundColor}`);
});
</script>
...
...
src/assets/images/que-sucess@2x.png
0 → 100644
View file @
a59b4a6
9.58 KB
src/components/FileUploaderField/index.vue
View file @
a59b4a6
...
...
@@ -17,15 +17,15 @@
>
{{ item.component_props.note }}
</div>
<div
style="font-size: 0.9rem"
>
<div>
<p
v-for="file in fileList"
:key="index"
style="padding-left: 1rem; margin-bottom: 0.5rem"
>
{{ file.filename }} <
span
style="color: #e32525"
@click="beforeDelete(file)"
<span style="font-size: 1rem">{{ file.filename }}</
span
>
<span style="color: #e32525; font-size: 0.85rem"
@click="beforeDelete(file)"
>移除</span
>
</p>
...
...
src/route.js
View file @
a59b4a6
/*
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-
07-19 17:17:38
* @FilePath: /
front
/src/route.js
* @LastEditTime: 2022-
12-05 16:58:59
* @FilePath: /
data-table
/src/route.js
* @Description: 文件描述
*/
export
default
[{
...
...
@@ -11,4 +11,10 @@ export default [{
meta
:
{
title
:
'首页'
,
}
},
{
path
:
'/success'
,
component
:
()
=>
import
(
'@/views/success.vue'
),
meta
:
{
title
:
'提交成功'
,
}
}];
...
...
src/views/index.vue
View file @
a59b4a6
...
...
@@ -47,18 +47,13 @@
</van-form>
</van-config-provider>
</div>
<div
style="text-align: center; color: #545454; font-size: 0.85rem; padding-bottom: 1rem"
>
提交即授权该表单收集你的填写信息
</div>
</template>
<script>
export default {
mounted() {
setTimeout(() => {
// console.warn(this.$refs);
}, 100);
},
};
</script>
<script setup>
import "@vant/touch-emulator";
import { createComponentType } from "@/hooks/useComponentType";
...
...
@@ -85,6 +80,7 @@ const themeVars = {
};
const $route = useRoute();
const $router = useRouter();
const PHeader = ref({});
const PHeader_cover = ref("");
const PHeader_title = ref("");
...
...
@@ -150,6 +146,10 @@ const setRefMap = (el, item) => {
};
onMounted(async () => {
// TAG: 全局背景色
document
.querySelector("body")
.setAttribute("style", `background-color: ${styleColor.backgroundColor}`);
const { data } = await queryFormAPI({ form_code: $route.query.code });
const form_data = data[0];
// 重构数据结构
...
...
@@ -287,6 +287,9 @@ const onSubmit = async (values) => {
});
if (result.code) {
showSuccessToast("提交成功");
$router.push({
path: "/success",
});
}
} else {
console.warn(validOther().key + "不通过验证");
...
...
src/views/success.vue
0 → 100644
View file @
a59b4a6
<!--
* @Date: 2022-06-29 18:18:02
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-29 18:18:09
* @FilePath: /tswj/src/views/test/404.vue
* @Description: 文件描述
-->
<template>
<div class="success-page">
<div style="padding-top: 2rem; padding-bottom: 2rem; text-align: center">
<van-image
round
width="10rem"
height="10rem"
style="vertical-align: bottom"
:src="icon_success"
/>
<p style="font-size: 1.05rem; margin: 0.5rem; font-weight: bold">提交成功!</p>
<!-- <p style="font-size: 0.9rem; margin-bottom: 0.5rem">您的作品正在审核中</p> -->
<!-- <p style="font-size: 0.9rem">请耐心等待~~</p> -->
</div>
<div style="padding: 0 15% 1rem 15%">
<div class="button-plain" :style="styleObj" @click="handle">返回</div>
</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 styleObj = {
background: styleColor.baseColor,
border: styleColor.baseColor,
color: "#FFFFFF",
};
onMounted(() => {});
const handle = () => {
$router.go(-1);
};
</script>
<style lang="less" scoped>
.success-page {
.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>
Please
register
or
login
to post a comment