| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- {extend name="public/base"/}
- {block name="css"}
- {/block}
- {block name="body"}
- <van-nav-bar
- class="nav-theme"
- :fixed="true"
- :placeholder="true"
- >
- <template #title>
- <span class="text-white">信息填写</span>
- </template>
- </van-nav-bar>
- <van-form @submit="onSubmit">
- <van-cell-group>
- <van-field
- v-model="form.name"
- required
- type="text"
- label="姓名"
- placeholder="请输入参会人姓名"
- :rules="[{ required: true, message: '请输入姓名' }]"
- ></van-field>
- <van-field
- v-model="form.mobile"
- required
- type="mobile"
- label="手机号"
- placeholder="请输入参会人手机号"
- :rules="[{ required: true, message: '请输入手机号' }]"
- ></van-field>
- </van-cell-group>
- <div style="margin: 16px;">
- <van-button round block type="primary" native-type="submit">
- 提交
- </van-button>
- </div>
- </van-form>
- {/block}
- {block name="script"}
- <script>
- function v_setup() {
- let base = {};
- base.form = Vue.reactive({
- name: '',
- mobile: '',
- });
- base.flag = false;
- //表单提交
- base.onSubmit = () => {
- if (base.flag) {
- return;
- }
- base.flag = true;
- postJson('/seat/fillInfoPost',base.form,function(data) {
- vant.showToast(data.msg);
- base.flag = false;
- }).then(() => {
- vant.showDialog({
- title: '提示',
- message: '报名成功',
- }).then(() => {
- location.href = "{:url('seat/showSeat')}";
- });
- });
- };
- return base;
- }
- </script>
- {/block}
|