| | |
| | | <template> |
| | | <view class="register"> |
| | | <!-- <home-species title="注册"></home-species> --> |
| | | <view class="registerForm"> |
| | | <u--form :rules="rules" :model="registerFormModel" ref="regesterFormRef"> |
| | | <u-form-item labelWidth="20%" label="选择身份" borderBottom ref="roleRef" required> |
| | |
| | | <u--input v-model="registerFormModel.carNo" placeholder="请输入内容" clearable></u--input> |
| | | </u-form-item> |
| | | <u-form-item prop="carImg" label="车辆照片" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" required> |
| | | <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="1" width="250" height="150"> |
| | | <u-upload :fileList="fileList1" deletable @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="1" width="250" height="150"> |
| | | <!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png" |
| | | mode="widthFix" style="width: 250px;height: 150px;"></image> --> |
| | | </u-upload> |
| | | </u-form-item> |
| | | <u-form-item prop="drivingImg" label="行驶证" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" required> |
| | | <u-upload :fileList="fileList2" @afterRead="afterRead" @delete="deletePic" name="2" multiple :maxCount="1" width="250" height="150"> |
| | | <u-upload :fileList="fileList2" deletable @afterRead="afterRead" @delete="deletePic" name="2" multiple :maxCount="1" width="250" height="150"> |
| | | <!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png" |
| | | mode="widthFix" style="width: 250px;height: 150px;"></image> --> |
| | | </u-upload> |
| | | </u-form-item> |
| | | <u-form-item label="推荐人账号" labelWidth="25%" borderBottom><u--input v-model="registerFormModel.tuiJianMa" placeholder="请输入内容" clearable></u--input></u-form-item> |
| | | <u-form-item label="推荐人账号" labelWidth="25%" borderBottom> |
| | | <u--input v-model="registerFormModel.tuiJianMa" placeholder="请输入内容" clearable></u--input> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | | <view class="roleModel"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import HomeSpecies from '@/components/home-species/HomeSpecies.vue'; |
| | | import { apiRegister } from '@/api/publicInterface.js'; |
| | | import { BaseUrl } from '@/api/publicInterface.js'; |
| | | export default { |
| | |
| | | // } |
| | | // }) |
| | | // }, |
| | | components: { |
| | | // HomeSpecies |
| | | }, |
| | | // 监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发 |
| | | onReady() { |
| | | // this.$refs.regesterFormRef.setRules(this.rules); |
| | |
| | | this.registerFormModel.username = this.registerFormModel.phone; |
| | | apiRegister(this.registerFormModel) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.data.code == 0) { |
| | | uni.showToast({ |
| | | title: '注册成功,即将进入登录!', |
| | | title: '注册成功,即将返回登录页', |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }); |
| | |
| | | uni.redirectTo({ url: '/pages/login/login' }); |
| | | }, 1000); |
| | | } else { |
| | | this.$u.toast(res.data.msg); |
| | | this.$u.toast(res.data.data ? res.data.data : '添加失败'); |
| | | } |
| | | }) |
| | | .catch(err => { |
| | |
| | | this.$u.toast('两次密码不一致'); |
| | | } |
| | | }, |
| | | // 音视频通话 |
| | | // callingIn() { |
| | | // uni.navigateTo({ |
| | | // url: '/pages/calling-index/calling-index' |
| | | // }); |
| | | // }, |
| | | // 单选框事件 |
| | | groupChange(e) { |
| | | console.log('单选框小组', e); |