generated from duanshuwen/webapp-vue-frontend
feat: 打包异常问题修复
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
<template #title>{{ questionnaire.title }}</template>
|
||||
|
||||
<van-form @submit="onSubmit">
|
||||
<van-cell-group :title="`${index + 1}. ${item.question}`" v-for="(item, index) in questionnaire.questions"
|
||||
:key="item.id">
|
||||
<van-cell-group :title="`${index + 1}. ${item.question}`" v-for="(item, index) in questionnaire.questions" :key="item.id">
|
||||
<!-- 单选框 -->
|
||||
<van-field v-if="item.type === 'radio'" name="radio">
|
||||
<template #input>
|
||||
@@ -20,8 +19,7 @@
|
||||
<van-field v-if="item.type === 'checkbox'" name="checkboxGroup">
|
||||
<template #input>
|
||||
<van-checkbox-group v-model="item.answer" shape="square">
|
||||
<van-checkbox v-for="(option, index) in item.options" :key="item.id + index" :name="option.id"
|
||||
class="mb-12">
|
||||
<van-checkbox v-for="(option, index) in item.options" :key="item.id + index" :name="option.id" class="mb-12">
|
||||
{{ option.text }}
|
||||
</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
@@ -32,14 +30,11 @@
|
||||
<van-field v-if="item.type === 'text'" v-model="item.answer" placeholder="请填写内容" />
|
||||
|
||||
<!-- 文本域 -->
|
||||
<van-field v-if="item.type === 'textarea'" type="textarea" v-model="item.answer" placeholder="请填写内容"
|
||||
maxlength="100" show-word-limit />
|
||||
<van-field v-if="item.type === 'textarea'" type="textarea" v-model="item.answer" placeholder="请填写内容" maxlength="100" show-word-limit />
|
||||
</van-cell-group>
|
||||
|
||||
<div class="m-16">
|
||||
<van-button round block type="primary" native-type="submit">
|
||||
提交
|
||||
</van-button>
|
||||
<van-button round block type="primary" native-type="submit"> 提交 </van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</Layout>
|
||||
@@ -47,7 +42,7 @@
|
||||
|
||||
<script setup name="home">
|
||||
import { getSurveyQuestionnaireUsingGet, submitSurveyQuestionnaireAnswerUsingPost } from '@api'
|
||||
import { showToast } from 'vant';
|
||||
import { showToast } from 'vant'
|
||||
|
||||
const form = ref({
|
||||
surveyId: '',
|
||||
|
||||
@@ -4,13 +4,9 @@
|
||||
<van-icon name="success" color="#fff" size="70" />
|
||||
</div>
|
||||
<div class="fz-26 mb-12">提交成功</div>
|
||||
<div class="color-66 fz-14 line-height-21 mb-12 text-center mb-30">感谢您参与息烽南山天沐温泉的客户调研问卷, 您的宝贵意见将帮助我们不断提升服务质量,
|
||||
请凭此截图于前台兑换精美礼品一份!
|
||||
</div>
|
||||
<div class="color-66 fz-14 line-height-21 mb-12 text-center mb-30">感谢您参与息烽南山天沐温泉的客户调研问卷, 您的宝贵意见将帮助我们不断提升服务质量, 请凭此截图于前台兑换精美礼品一份!</div>
|
||||
|
||||
<van-button class="fz-14 w-200" round block type="primary" @click="handleClick">
|
||||
完成
|
||||
</van-button>
|
||||
<van-button class="fz-14 w-200" round block type="primary" @click="handleClick"> 完成 </van-button>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -19,8 +15,8 @@ const handleClick = () => {
|
||||
// 确保在wx.ready中调用
|
||||
wx.ready(() => {
|
||||
// 关闭当前H5页面
|
||||
wx.miniProgram.navigateBack({});
|
||||
});
|
||||
wx.miniProgram.navigateBack({})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -32,4 +28,4 @@ section {
|
||||
align-items: center;
|
||||
padding: 100px 30px 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -20,17 +20,19 @@ export default defineConfig(({ mode }) => {
|
||||
return {
|
||||
base: isProd ? './' : './', // 是否是生产环境
|
||||
build: {
|
||||
target: 'es2020',
|
||||
cssCodeSplit: false,
|
||||
chunkSizeWarningLimit: 2048,
|
||||
sourcemap: isProd
|
||||
},
|
||||
esbuild: {
|
||||
target: 'es2020',
|
||||
drop: isProd ? ['console', 'debugger'] : undefined
|
||||
},
|
||||
plugins: [
|
||||
legacy({
|
||||
targets: ['defaults', 'not IE 11']
|
||||
}),
|
||||
// legacy({
|
||||
// targets: ['> 0.5%', 'last 2 versions', 'not dead', 'not safari < 12']
|
||||
// }),
|
||||
vue(),
|
||||
VueSetupExtend(),
|
||||
Components({
|
||||
|
||||
Reference in New Issue
Block a user