index.vue
2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<template>
<view class="graybg">
<view class="formBox">
<uni-forms ref="baseForm" :modelValue="baseFormData">
<uni-forms-item label="姓名" required>
<uni-easyinput v-model="baseFormData.name" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="身份证" required>
<uni-easyinput v-model="baseFormData.telno" placeholder="请输入身份证号码" />
</uni-forms-item>
<uni-forms-item label="备注说明">
<uni-easyinput type="textarea" v-model="baseFormData.requirement" placeholder="请输入需求描述" />
</uni-forms-item>
</uni-forms>
<button type="primary" @click="submit">核实报名信息</button>
</view>
</view>
<uni-popup ref="alertPayOk" type="dialog">
<uni-popup-dialog type="success" confirmText="确定" content="用户不存在或信息填写错误请再次核实" @confirm="goIndex">
</uni-popup-dialog>
</uni-popup>
</template>
<script setup>
import {
ref,getCurrentInstance
} from 'vue';
import {
onLoad,
onShow,onReady
} from '@dcloudio/uni-app';
import * as api from '@/common/api.js';
const { proxy } = getCurrentInstance()
const app = getApp();
const telNo = ref('');
const alertPayOk = ref(null);
const isActive = ref(null);
const formData = ref({})
const baseFormData = ref({})
onReady(()=>{
// 修改页头标题
uni.setNavigationBarTitle({
title: formData.value.name
});
})
onShow(() => {
})
function goIndex() {
}
function submit(){
// 姓名
if(!baseFormData.value.name){
uni.showToast({
title: '请输入姓名',
icon: 'none',
duration: 2000
});
return
}
// 手机号
if(!baseFormData.value.telno){
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 2000
});
return
}
api.checkReport().then((res)=>{
if(res.data.userNo){
} else {
alertPayOk.value.open()
}
})
}
</script>
<style scoped>
button{ font-size: 32rpx; background: linear-gradient(90deg, #00C176, #3ed89b);}
.richContent{padding: 40rpx 40rpx 100rpx;
line-height: 1.6;
background: #fff;}
.richContent2{padding: 0 0 40rpx;
line-height: 1.6;
background: #fff;}
.graybg {
background: #f7f8fa;
height: 100vh;
padding: 0 0 100rpx;
width: 100vw;
overflow: auto;
}
.whitebg {
background: #fff;
margin-top: 15rpx;
border-radius: 20rpx;
margin-bottom: 90rpx;
}
.payBtn {
width: 750rpx;
line-height: 90rpx;
height: 120rpx;
text-align: center;
background: #ff8124;
color: #ffffff;
font-size: 36rpx;
border-radius: 20rpx 20rpx 0px 0px;
position: fixed;
bottom: 0;
}
.uni-list-cell::after {
display: none;
}
.formBox{ background: #fff;
padding: 50rpx 40rpx;
margin: 0 30rpx;
border-radius: 20rpx;}
</style>