rk
2025-09-29 e067f714c0588407b1c20ddd6b7af3b2043e35f8
admin/src/components/common/UploadFaceImg.vue
@@ -21,7 +21,7 @@
        :visible.sync="updateImg"
        width="1000px"
        class="icon-dialog-wrapper dialong-com-style">
      <ImageCropper ref="iconShot" v-if="updateImg" :imgSrc="img" >
      <ImageCropper ref="iconShot" v-if="updateImg" :imgSrc="img"  :auto-crop="autoCrop">
      </ImageCropper>
      <span slot="footer" class="dialog-footer">
            <el-button v-if="loading">取 消</el-button>
@@ -42,7 +42,17 @@
      type: Object,
      default: () => {}
    },
    tipsLabel: '',
    autoCrop: {
      type: Object,
      default () {
        return { width: 500, height: 500 }
      }
    },
    // eslint-disable-next-line vue/require-prop-type-constructor
    tipsLabel: {
      type: String,
      default: ''
    },
    customStyle: {
      type: String,
      default: 'width: 90px; height: 90px;'
@@ -52,7 +62,7 @@
  data () {
    return {
      loading: false,
      fileInfo:{},
      fileInfo: {},
      img: null,
      updateImg: false,
      imageSrc: null,
@@ -68,17 +78,17 @@
        console.log(fileData)
        const formData = new FormData()
        formData.append('folder', 'member')
        if(this.uploadData.isFace || this.uploadData.isFace == 0){
        formData.append('folder', this.uploadData.folder || 'member')
        if (this.uploadData.isFace || this.uploadData.isFace == 0) {
          formData.append('isFace', 0)
        }
        formData.append(
            'file',
            new File(
                [fileData], // 将Blob类型转化成File类型
                this.fileInfo.name, // 设置File类型的文件名称
                { type: this.fileInfo.type } // 设置File类型的文件类型
            )
          'file',
          new File(
            [fileData], // 将Blob类型转化成File类型
            this.fileInfo.name, // 设置File类型的文件名称
            { type: this.fileInfo.type } // 设置File类型的文件类型
          )
        )
        this.loading = true
        upload(formData).then(res => {