qingyiay
2023-03-28 5c01be6370291febe52adfa74fad8101a197c388
pages/register/register.vue
@@ -1,6 +1,5 @@
<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>
@@ -36,18 +35,20 @@
               <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">
@@ -58,7 +59,6 @@
</template>
<script>
// import HomeSpecies from '@/components/home-species/HomeSpecies.vue';
import { apiRegister } from '@/api/publicInterface.js';
import { BaseUrl } from '@/api/publicInterface.js';
export default {
@@ -77,9 +77,6 @@
   //     }
   //   })
   // },
   components: {
      // HomeSpecies
   },
   // 监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
   onReady() {
      // this.$refs.regesterFormRef.setRules(this.rules);
@@ -236,10 +233,9 @@
                  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
                           });
@@ -247,7 +243,7 @@
                              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 => {
@@ -262,12 +258,6 @@
            this.$u.toast('两次密码不一致');
         }
      },
      // 音视频通话
      // callingIn() {
      //    uni.navigateTo({
      //       url: '/pages/calling-index/calling-index'
      //    });
      // },
      // 单选框事件
      groupChange(e) {
         console.log('单选框小组', e);