hookehuyr

fix 提交活动发布时需要确认

<!--
* @Date: 2022-09-21 16:04:10
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-10-28 16:42:03
* @LastEditTime: 2022-10-28 18:21:13
* @FilePath: /swx/src/pages/createActivity/index.vue
* @Description: 创建活动页面
-->
......@@ -156,7 +156,7 @@
<view class="confirm-publish-wrapper">
<view class="box">
<view @tap="onSubmit" class="button">确定发布</view>
<view @tap="create_show=true" class="button">确定发布</view>
</view>
</view>
......@@ -259,6 +259,8 @@
</van-popup>
<van-toast id="van-toast" />
<van-dialog title="温馨提示" :show="create_show" :show-cancel-button="true" message="是否确认提交?" confirm-button-color="#199A74" @confirm="onCreateConfirm" @cancel="onCreateCancel"></van-dialog>
</template>
<script setup>
......@@ -712,6 +714,14 @@ const validForm = () => { // 校验表单
return true;
}
const create_show = ref(false);
const onCreateConfirm = () => {
create_show.value = false;
onSubmit()
}
const onCreateCancel = () => {
create_show.value = false;
}
const onSubmit = async () => {
const fields = signInfo.value.filter(item => !item.nop && item.checked); // 处理报名信息结构,剔除固定字段,获取选中字段
if (validForm()) {
......