Showing
2 changed files
with
29 additions
and
6 deletions
| ... | @@ -13,6 +13,16 @@ | ... | @@ -13,6 +13,16 @@ |
| 13 | </van-col> | 13 | </van-col> |
| 14 | </van-row> | 14 | </van-row> |
| 15 | <router-view v-else></router-view> | 15 | <router-view v-else></router-view> |
| 16 | + <div | ||
| 17 | + style=" | ||
| 18 | + text-align: center; | ||
| 19 | + color: #545454; | ||
| 20 | + font-size: 0.85rem; | ||
| 21 | + transition: opacity 0.4s linear; | ||
| 22 | + " | ||
| 23 | + > | ||
| 24 | + 提交即授权该表单收集你的填写信息 | ||
| 25 | + </div> | ||
| 16 | </template> | 26 | </template> |
| 17 | 27 | ||
| 18 | <script setup> | 28 | <script setup> |
| ... | @@ -69,6 +79,8 @@ onMounted(async () => { | ... | @@ -69,6 +79,8 @@ onMounted(async () => { |
| 69 | // wx.error((err) => { | 79 | // wx.error((err) => { |
| 70 | // console.warn(err); | 80 | // console.warn(err); |
| 71 | // }); | 81 | // }); |
| 82 | + // TAG: 全局背景色 | ||
| 83 | + document.querySelector("body").setAttribute("style", "background-color:#fff9ef"); | ||
| 72 | }); | 84 | }); |
| 73 | </script> | 85 | </script> |
| 74 | 86 | ||
| ... | @@ -80,7 +92,8 @@ body { | ... | @@ -80,7 +92,8 @@ body { |
| 80 | width: 100%; | 92 | width: 100%; |
| 81 | height: 100%; | 93 | height: 100%; |
| 82 | color: @base-font-color; | 94 | color: @base-font-color; |
| 83 | - background-color: #f7f8fa; | 95 | + // background-color: #f7f8fa; |
| 96 | + // background-color: #fff9ef; | ||
| 84 | padding: 0; | 97 | padding: 0; |
| 85 | margin: 0; | 98 | margin: 0; |
| 86 | } | 99 | } | ... | ... |
| ... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | + <div class="table-box"> | ||
| 9 | <van-image | 10 | <van-image |
| 10 | v-if="PHeader.type === '单张图'" | 11 | v-if="PHeader.type === '单张图'" |
| 11 | width="100%" | 12 | width="100%" |
| ... | @@ -20,10 +21,10 @@ | ... | @@ -20,10 +21,10 @@ |
| 20 | </van-swipe> | 21 | </van-swipe> |
| 21 | </template> | 22 | </template> |
| 22 | <div v-if="PHeader.label" class="table-title">{{ PHeader.label }}</div> | 23 | <div v-if="PHeader.label" class="table-title">{{ PHeader.label }}</div> |
| 23 | - <div v-if="PHeader.description" class="table-desc">{{ PHeader.description }}</div> | 24 | + <div v-if="PHeader.description" class="table-desc" v-html="PHeader.description" /> |
| 24 | - <div class="table-box"> | 25 | + <van-config-provider :theme-vars="themeVars"> |
| 25 | <van-form @submit="onSubmit"> | 26 | <van-form @submit="onSubmit"> |
| 26 | - <van-cell-group> | 27 | + <van-cell-group :border="false"> |
| 27 | <component | 28 | <component |
| 28 | :ref="item.component_props.name" | 29 | :ref="item.component_props.name" |
| 29 | v-for="(item, index) in formData" | 30 | v-for="(item, index) in formData" |
| ... | @@ -37,6 +38,7 @@ | ... | @@ -37,6 +38,7 @@ |
| 37 | <van-button round block type="primary" native-type="submit"> 提交 </van-button> | 38 | <van-button round block type="primary" native-type="submit"> 提交 </van-button> |
| 38 | </div> | 39 | </div> |
| 39 | </van-form> | 40 | </van-form> |
| 41 | + </van-config-provider> | ||
| 40 | </div> | 42 | </div> |
| 41 | </template> | 43 | </template> |
| 42 | 44 | ||
| ... | @@ -49,6 +51,12 @@ import { queryFormAPI } from "@/api/form.js"; | ... | @@ -49,6 +51,12 @@ import { queryFormAPI } from "@/api/form.js"; |
| 49 | import { addFormDataAPI } from "@/api/data.js"; | 51 | import { addFormDataAPI } from "@/api/data.js"; |
| 50 | import { showSuccessToast, showFailToast } from "vant"; | 52 | import { showSuccessToast, showFailToast } from "vant"; |
| 51 | 53 | ||
| 54 | +// TAG: 自定义主题颜色 | ||
| 55 | +const themeVars = { | ||
| 56 | + buttonPrimaryBackground: "#c2915f", | ||
| 57 | + buttonPrimaryBorderColor: "#c2915f", | ||
| 58 | +}; | ||
| 59 | + | ||
| 52 | const $route = useRoute(); | 60 | const $route = useRoute(); |
| 53 | const PHeader = ref({}); | 61 | const PHeader = ref({}); |
| 54 | const PHeader_cover = ref(""); | 62 | const PHeader_cover = ref(""); |
| ... | @@ -221,10 +229,12 @@ const validOther = () => { | ... | @@ -221,10 +229,12 @@ const validOther = () => { |
| 221 | } | 229 | } |
| 222 | .table-desc { | 230 | .table-desc { |
| 223 | padding: 0rem 1rem; | 231 | padding: 0rem 1rem; |
| 224 | - color: #bababa; | 232 | + color: #666; |
| 225 | font-size: 0.9rem; | 233 | font-size: 0.9rem; |
| 226 | } | 234 | } |
| 227 | .table-box { | 235 | .table-box { |
| 228 | - padding: 1rem; | 236 | + margin: 1rem; |
| 237 | + background-color: #ffffff; | ||
| 238 | + padding-bottom: 1rem; | ||
| 229 | } | 239 | } |
| 230 | </style> | 240 | </style> | ... | ... |
-
Please register or login to post a comment