|
@@ -1,6 +1,7 @@
|
|
|
import { enroll,smsSend } from '../../api/other';
|
|
|
import { FETCH_AND_FORMAT_USER_INFO } from '../../utils/util.js'
|
|
|
import { uploadImage } from '../../utils/upload.js';
|
|
|
+import {BASE_URL} from '../../utils/request';
|
|
|
const app = getApp();
|
|
|
Page({
|
|
|
data: {
|
|
@@ -16,7 +17,6 @@ Page({
|
|
|
phoneError: '',
|
|
|
genders: ['女', '男'],
|
|
|
showPicker: false,
|
|
|
- pickerValue: '',
|
|
|
fileList: [],
|
|
|
checked: false,
|
|
|
showRegistrationSuccess: false,
|
|
@@ -30,7 +30,8 @@ Page({
|
|
|
countdown: 60,
|
|
|
couponInfo:{},
|
|
|
filePath: '', // 上传成功的文件路径
|
|
|
- fileType: '' // image / pdf
|
|
|
+ fileType: '', // image / pdf
|
|
|
+ baseUrl:BASE_URL
|
|
|
},
|
|
|
|
|
|
onShowPicker() {
|
|
@@ -39,16 +40,13 @@ Page({
|
|
|
onCancel() {
|
|
|
this.setData({ showPicker: false });
|
|
|
},
|
|
|
- onPickerChange(event) {
|
|
|
- const { value } = event.detail;
|
|
|
- this.setData({ pickerValue: value });
|
|
|
- },
|
|
|
// 性别确定
|
|
|
- onConfirm() {
|
|
|
+ onConfirm(event) {
|
|
|
+ const { value } = event.detail;
|
|
|
this.setData({
|
|
|
formData: {
|
|
|
...this.data.formData,
|
|
|
- gender: this.data.pickerValue
|
|
|
+ gender: value
|
|
|
},
|
|
|
showPicker: false
|
|
|
}, () => this.checkFormValid());
|
|
@@ -119,7 +117,6 @@ Page({
|
|
|
"formData.competition_image": ''
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
// 输入框数据绑定
|
|
|
onInput(e) {
|
|
|
const field = e.currentTarget.dataset.field;
|
|
@@ -169,7 +166,6 @@ Page({
|
|
|
}
|
|
|
// 禁用按钮
|
|
|
this.setData({ codeDisabled: true });
|
|
|
- // 发送验证码请求给后台
|
|
|
const res = await smsSend({phone:this.data.formData.phone});
|
|
|
if (res.code == 200) {
|
|
|
wx.showToast({ title: '验证码已发送', icon: 'none' });
|