qingyiay
2023-05-16 72935b2a35765bcc3622561bb06f2eccd64caf83
pages/register/register.vue
@@ -34,7 +34,7 @@
            <u-form-item prop="carNo" label="车牌号" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" 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-form-item prop="carImg" label="车辆照片" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" required @click="beforeRead">
               <u-upload
                  :fileList="fileList1"
                  deletable
@@ -51,7 +51,7 @@
                  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-form-item prop="drivingImg" label="行驶证" labelWidth="20%" borderBottom v-if="radiovalue1 == '司机'" required @click="beforeRead">
               <u-upload
                  :fileList="fileList2"
                  deletable
@@ -89,6 +89,7 @@
<script>
import { apiRegister } from '@/api/publicInterface.js';
import { BaseUrl } from '@/api/publicInterface.js';
import { mapMutations } from 'vuex';
export default {
   // onLoad: function() {
   //   // 查看是否授权
@@ -265,6 +266,7 @@
      }
   },
   methods: {
      ...mapMutations(['changeisUploadimg']),
      registerClick() {
         if (this.registerFormModel.password == this.registerFormModel.confirmPassword) {
            this.$refs.regesterFormRef
@@ -284,7 +286,7 @@
                              uni.redirectTo({ url: '/pages/login/login' });
                           }, 1000);
                        } else {
                           this.$u.toast(res.data.data ? res.data.data : '添加失败');
                           this.$u.toast(res.msg ? res.msg : '添加失败');
                        }
                     })
                     .catch(err => {
@@ -319,8 +321,12 @@
         }
      },
      // 上传图片方法
      beforeRead() {
         this.changeisUploadimg(true);
      },
      // 删除图片
      deletePic(event) {
         this.changeisUploadimg(true);
         this[`fileList${event.name}`].splice(event.index, 1);
      },
      // 新增图片