<template>
  <div class="pb_content2" style="background: #fff; display: inline">
    <div class="pb_head logo">
      <div class="logoImg"><img src="../../ai/img/logo.png" alt="" /></div>
      <div class="sName">深圳市民治中学</div>
    </div>
    <div class="pb_content_body">
      <div class="sw_select">
        <span style="color: red">*</span>作品名称
        <van-cell-group
          style="
            border: 1px solid rgb(207, 207, 207);
            width: 90%;
            margin-left: 10px;
            border-radius: 5px;
            overflow: auto;
          "
        >
          <van-field
            v-model="workName"
            maxlength="50"
            class="workDisplay"
            show-word-limit
            placeholder="请输入作品名称"
          />
        </van-cell-group>
      </div>
      <div>
        <span style="font-size: 16px; color: #444; margin-left: 8px"
          >作业描述</span
        >
        <div class="myp_parent_textarea">
          <van-field
            v-model="workDesc"
            rows="1"
            autosize
            type="textarea"
            maxlength="2000"
            class="workDDisplay"
            placeholder="作品描述"
            show-word-limit
          />
        </div>
      </div>
      <div>
        <span style="font-size: 16px; color: #444; margin-left: 8px"
          >作品封面</span
        >
        <div>
          <van-uploader
            v-model="fileList.cover"
            :after-read="afterRead"
            preview-size="5rem"
            accept="image/*"
            class="uploadPhoto"
            max-count="1"
            v-loading="photoLoading"
          >
            <img src="../../assets/uploadWork/add.png" alt />
            <div style="color: #969491; font-size: 14px">上传封面</div>
            <template #preview-cover>
              <div class></div>
            </template>
          </van-uploader>
          <div>{{ error }}</div>
        </div>
      </div>
      <div style="margin-bottom: 1.5rem">
        <span style="font-size: 16px; color: #444; margin-left: 8px"
          >添加附件</span
        >
        <div>
          <van-uploader
            v-model="fileList.files"
            :after-read="afterReadM"
            preview-size="5rem"
            accept="image/*,video/*,application/pdf,.ppt,.pptx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
            class="uploadFiles"
            v-loading="mediaLoading"
            @click-preview="mediaPreview"
          >
            <img
              src="../../assets/uploadWork/addFiles.png"
              style="width: 2rem; margin-right: 0.2rem"
              alt
            />
            <div style="font-size: 16px; margin: 0; color: #9ba0a5">
              添加文件<span style="font-size: 14px; color: #d6d5da"
                >(不超过10M)</span
              >
            </div>
            <template #preview-cover>
              <div class></div>
            </template>
          </van-uploader>
        </div>
      </div>
    </div>
    <div class="pb_content_body" style="margin-top: 1rem">
      <div style="border-bottom: 1px solid #efefef; padding-bottom: 1rem">
        <span style="font-size: 16px; color: #444; margin-left: 8px"
          >上传作品图片</span
        >
      </div>
      <div>
        <div>
          <van-uploader
            v-model="fileList.photo"
            :after-read="afterReadP"
            preview-size="5rem"
            accept="image/*"
            class="uploadPhotos"
            v-loading="photosLoading"
          >
            <img src="../../assets/uploadWork/add.png" alt />
            <div style="color: #969491; font-size: 12px">
              支持jpg/gif/png格式
            </div>
            <div style="color: #969491; font-size: 12px">不超过20M</div>
            <template #preview-cover>
              <div class></div>
            </template>
          </van-uploader>
          <div>{{ error }}</div>
        </div>
      </div>
    </div>
    <div class="class_learn">
              <button @click="findWorkRepeat">提交作业</button>      
    </div>

    <van-overlay
      :show="show"
      @click="overlayShow"
      style="display: flex; align-items: center"
    >
      <div class="wrapper" @click.stop>
        <video-player
          class="video-player vjs-custom-skin"
          ref="videoPlayer"
          :playsinline="playsinline"
          @canplay="onPlayerCanplay($event)"
          :options="playerO"
          @play="onPlayerPlay($event)"
          style="width: 100%; height: 100%"
        ></video-player>
      </div>
    </van-overlay>
    <van-dialog
      v-model="Dshow"
      :show-confirm-button="false"
      overlay-class="classOverlay"
      close-on-click-overlay
      :before-close="handleClose"
      theme="round-button"
      style="border-radius: 7px"
      class="present"
      bind:cancel="colseArea"
    >
      <div class="dia_title">
        <div class="close" @click="$router.go(-1)">
          <img src="../../assets/ranking/cancel.png" />
        </div>
      </div>
      <div class="dia_content">
        <div style="position: relative">
          <img src="../../assets/ranking/champion.png" />
          <span class="scoreInner">提交成功</span>
        </div>
        <div class="score">
          恭喜获得
          <span style="color: orange; font-size: 1.8rem; margin: 0 0.5rem"
            >2</span
          >积分
        </div>
        <div class="btn" @click="$router.go(-1)">我收下了</div>
      </div>
    </van-dialog>
    <div v-if="proVisible" class="mask">
      <div class="progressBox">
        <div class="lbox">
          <img :src="require('../../assets/loading.gif')" />压缩上传中，请稍后
        </div>
        <el-progress
          :text-inside="true"
          :stroke-width="20"
          :percentage="progress"
          style="width: 80%"
        ></el-progress>
      </div>
    </div>
  </div>
</template>

<script>
import "../../common/aws-sdk-2.235.1.min";

export default {
  data() {
    return {
      cid: this.$route.query.cid,
      course: null,
      workName: "",
      workDesc: "",
      courseId: "",
      message: "",
      fileList: { cover: [], files: [], photo: [] },
      fileaaa: [],
      filebbb: [],
      now: null,
      photoLoading: false,
      mediaLoading: false,
      photosLoading: false,
      error: "",
      show: false,
      Dshow: false,
      Dtype: 1,
      playerOptions: {
        playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
        autoplay: false, //如果true,浏览器准备好时开始回放。
        muted: false, // 默认情况下将会消除任何音频。
        loop: false, // 导致视频一结束就重新开始。
        preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频（如果浏览器支持）
        language: "zh-CN",
        aspectRatio: "16:9", // 将播放器置于流畅模式，并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字（例如"16:9"或"4:3"）
        fluid: true, // 当true时，Video.js player将拥有流体大小。换句话说，它将按比例缩放以适应其容器。
        sources: [
          {
            type: "video/mp4", //这里的种类支持很多种：基本视频格式、直播、流媒体等，具体可以参看git网址项目   || "video/ogg"|| "video/webm"
            src: "", //url地址require("../../assets/media/aaa.mp4")
          },
        ],
        // poster: require("../../assets/tu31.png"), //你的封面地址
        // poster: dataRes.imgUrl, //你的封面地址
        notSupportedMessage: "此视频暂无法播放，请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
        controlBar: {
          timeDivider: true, //当前时间和持续时间的分隔符
          durationDisplay: true, //显示持续时间
          remainingTimeDisplay: false, //是否显示剩余时间功能
          fullscreenToggle: true, //全屏按钮
        },
      },
      playerO: {},
      fileMname: "",
      proVisible: false,
      progress: 0,
    };
  },
  computed: {
    playsinline() {
      let ua = navigator.userAgent.toLocaleLowerCase();
      // x5内核
      if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
        return false;
      } else {
        // ios端
        return true;
      }
    },
  },
  methods: {
    overlayShow() {
      this.show = false;
      this.$refs.videoPlayer.player.pause();
    },
    time() {
      if (!this.now) {
        this.now = new Date().getTime();
        return true;
      } else {
        let time = new Date().getTime();
        if (time - this.now > 3000) {
          this.now = time;
          return true;
        } else {
          return false;
        }
      }
    },
    goBack() {
      document.getElementsByClassName("pb_content2")[0].style.display = "block";
      this.$router.isBack = true;
      if (window.history.length <= 1) {
        this.$router.push({ path: "/" });
        return false;
      } else {
        this.$router.go(-1);
      }
    },
    //上传封面
    afterRead(file) {
      this.photoLoading = true;

      var _file = file.file;
      this.fileaaa.push(_file);
      file.status = "uploading";
      file.message = "上传中...";

      var credentials = {
        accessKeyId: "AKIATLPEDU37QV5CHLMH",
        secretAccessKey: "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",
      }; //秘钥形式的登录上传
      window.AWS.config.update(credentials);
      window.AWS.config.region = "cn-northwest-1"; //设置区域

      var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
      var _this = this;

      var mediaFormatList = ["png", "jpg", "jpeg"];

      if (
        mediaFormatList.indexOf(
          _file.name
            .split(".")
            [_file.name.split(".").length - 1].toLocaleLowerCase()
        ) == "-1"
      ) {
        _this.$toast.fail("请上传jpg或者png的图片格式文件");
        _this.fileList.cover = _this.fileList.cover.filter((fileA) => {
          return fileA.file.lastModified != file.file.lastModified;
        });
        file.status = "failed";
        file.message = "上传失败";
        this.photoLoading = false;

        return;
      }

      if (_file) {
        var params = {
          Key:
            _file.name.split(".")[0] +
            new Date().getTime() +
            "." +
            _file.name.split(".")[1],
          ContentType: _file.type,
          Body: _file,
          "Access-Control-Allow-Credentials": "*",
          ACL: "public-read",
        }; //key可以设置为桶的相抵路径，Body为文件， ACL最好要设置
        var options = {
          partSize: 2048 * 1024 * 1024,
          queueSize: 2,
          leavePartsOnError: true,
        };
        bucket
          .upload(params, options)
          .on("httpUploadProgress", function (evt) {
            //这里可以写进度条
            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
          })
          .send(function (err, data) {
            _this.photoLoading = false;
            if (err) {
              _this.error = err;
              _this.$toast.fail("上传失败");
              file.status = "failed";
              file.message = "上传失败";
              //上传错误处理
              _this.fileList.cover = _this.fileList.cover.filter((fileA) => {
                return fileA.file.lastModified != _file.lastModified;
              });
            } else {
              //上传成功处理
              file.status = "success";
              // _file.url = data.Location;
              // _this.fileList.push(_file);
              _this.fileList.cover = _this.fileList.cover.filter((fileA) => {
                if (fileA.file.lastModified == _file.lastModified) {
                  fileA.url = data.Location;
                  return fileA;
                } else {
                  return fileA;
                }
              });
              console.log(data.Location);
            }
          });
      }
    },
    //上传图片
    afterReadP(file) {
      this.photosLoading = true;

      var _file = file.file;
      this.fileaaa.push(_file);
      file.status = "uploading";
      file.message = "上传中...";

      var credentials = {
        accessKeyId: "AKIATLPEDU37QV5CHLMH",
        secretAccessKey: "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",
      }; //秘钥形式的登录上传
      window.AWS.config.update(credentials);
      window.AWS.config.region = "cn-northwest-1"; //设置区域

      var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
      var _this = this;

      var mediaFormatList = ["png", "jpg", "jpeg"];

      if (
        mediaFormatList.indexOf(
          _file.name
            .split(".")
            [_file.name.split(".").length - 1].toLocaleLowerCase()
        ) == "-1"
      ) {
        _this.$toast.fail("请上传jpg或者png的图片格式文件");
        _this.fileList.photo = _this.fileList.photo.filter((fileA) => {
          return fileA.file.lastModified != file.file.lastModified;
        });
        file.status = "failed";
        file.message = "上传失败";
        this.photosLoading = false;

        return;
      }

      if (_file) {
        var params = {
          Key:
            _file.name.split(".")[0] +
            new Date().getTime() +
            "." +
            _file.name.split(".")[1],
          ContentType: _file.type,
          Body: _file,
          "Access-Control-Allow-Credentials": "*",
          ACL: "public-read",
        }; //key可以设置为桶的相抵路径，Body为文件， ACL最好要设置
        var options = {
          partSize: 2048 * 1024 * 1024,
          queueSize: 2,
          leavePartsOnError: true,
        };
        bucket
          .upload(params, options)
          .on("httpUploadProgress", function (evt) {
            //这里可以写进度条
            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
          })
          .send(function (err, data) {
            _this.photosLoading = false;
            if (err) {
              _this.error = err;
              _this.$toast.fail("上传失败");
              file.status = "failed";
              file.message = "上传失败";
              //上传错误处理
              _this.fileList.photo = _this.fileList.photo.filter((fileA) => {
                return fileA.file.lastModified != _file.lastModified;
              });
            } else {
              //上传成功处理
              file.status = "success";
              // _file.url = data.Location;
              // _this.fileList.push(_file);
              _this.fileList.photo = _this.fileList.photo.filter((fileA) => {
                if (fileA.file.lastModified == _file.lastModified) {
                  fileA.url = data.Location;
                  return fileA;
                } else {
                  return fileA;
                }
              });
              console.log(data.Location);
            }
          });
      }
    },
    //上传附件
    afterReadM(file) {
      this.mediaLoading = true;
      var _file = file.file;
      this.fileaaa.push(_file);
      file.status = "uploading";
      file.message = "上传中...";

      var credentials = {
        accessKeyId: "AKIATLPEDU37QV5CHLMH",
        secretAccessKey: "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",
      }; //秘钥形式的登录上传
      window.AWS.config.update(credentials);
      window.AWS.config.region = "cn-northwest-1"; //设置区域

      var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
      var _this = this;

      if (_file) {
        var params = {
          Key:
            _file.name.split(".")[0] +
            new Date().getTime() +
            "." +
            _file.name.split(".")[1],
          ContentType: _file.type,
          Body: _file,
          "Access-Control-Allow-Credentials": "*",
          ACL: "public-read",
        }; //key可以设置为桶的相抵路径，Body为文件， ACL最好要设置
        var options = {
          partSize: 2048 * 1024 * 1024,
          queueSize: 2,
          leavePartsOnError: true,
        };
        bucket
          .upload(params, options)
          .on("httpUploadProgress", function (evt) {
            //这里可以写进度条
            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
          })
          .send(function (err, data) {
            _this.mediaLoading = false;
            if (err) {
              _this.error = err;
              _this.$toast.fail("上传失败");
              file.status = "failed";
              file.message = "上传失败";
              //上传错误处理
              _this.fileList.files = _this.fileList.files.filter((fileA) => {
                return fileA.file.lastModified != _file.lastModified;
              });
            } else {
              //上传成功处理
              file.status = "success";
              // _file.url = data.Location;
              // _this.fileList.push(_file);
              _this.fileList.files = _this.fileList.files.filter((fileA) => {
                if (fileA.file.lastModified == _file.lastModified) {
                  fileA.url = data.Location;
                  return fileA;
                } else {
                  return fileA;
                }
              });
              console.log(data.Location);
            }
          });
      }
    },
    //获取课程
    // getCourse() {
    //   let params = { cid: this.cid };
    //   this.ajax
    //     .get(this.$store.state.api + "getCourseByid", params)
    //     .then((res) => {
    //       console.log(JSON.parse(res.data[0][0].chapters).homework);
    //       this.course = JSON.parse(res.data[0][0].chapters).homework;
    //     })
    //     .catch((err) => {
    //       console.error(err);
    //     });
    // },
    findWorkRepeat() {
      if (this.workName == "") {
        this.$toast.fail("请填写作品名称");
        return;
      } else if (this.workDesc == "") {
        this.$toast.fail("请填写作业描述");
        return;
      } else if (this.fileList.cover.length == 0) {
        this.$toast.fail("请上传作品封面");
        return;
      } else if (this.fileList.files.length == 0) {
        this.$toast.fail("请上传附件");
        return;
      } else if (this.fileList.photo.length == 0) {
        this.$toast.fail("请上传作品图片");
        return;
      }
      var cover = [];
      var files = [];
      var photo = [];

      for (var i = 0; i < this.fileList.cover.length; i++) {
        cover.push(this.fileList.cover[i].url);
      }

      for (var i = 0; i < this.fileList.files.length; i++) {
        files.push(this.fileList.files[i].url);
      }
      for (var i = 0; i < this.fileList.photo.length; i++) {
        photo.push(this.fileList.photo[i].url);
      }
      this.$store.commit("update", ["loading", true]);
      this.$store.commit("update", ["loading", false]);
      this.$toast.success("提交成功");
      this.workName = "";
      this.workDesc = "";
      this.fileList = { cover: [], files: [], photo: [] };
      // 自定义加载图标
      // this.$toast.loading({
      //   message: "提交中...",
      //   forbidClick: true,
      //   loadingType: "spinner",
      //   duration: 0,
      // });
      // let params = [
      //   {
      //     uid: "0",
      //     n: this.workName,
      //     d: this.workDesc,
      //     file: JSON.stringify({
      //       cover: cover.join(","),
      //       files: files.join(","),
      //       photo: photo.join(","),
      //     }),
      //   },
      // ];
      // this.ajax
      //   .post(this.$store.state.api + "insertWork", params)
      //   .then((res) => {
      //     this.$store.commit("update", ["loading", false]);
      //     this.$toast.success("提交成功");
      //     this.workName = "";
      //     this.workDesc = "";
      //     this.fileList = { cover: [], files: [], photo: [] };
      //   })
      //   .catch((err) => {
      //     this.$store.commit("update", ["loading", false]);
      //     this.$toast.fail("提交失败");
      //     console.error(err);
      //   });
    },
    //提交作业
    SubmitWork() {
      if (this.time()) {
        var photo = [];
        var media = [];

        for (var i = 0; i < this.fileList.length; i++) {
          photo.push(this.fileList[i].url);
        }

        for (var i = 0; i < this.fileList2.length; i++) {
          media.push(this.fileList2[i].url);
        }

        this.$store.commit("update", ["loading", true]);
        // 自定义加载图标
        this.$toast.loading({
          message: "提交中...",
          forbidClick: true,
          loadingType: "spinner",
          duration: 0,
        });
        let params = [
          {
            uid: this.$store.state.userInfo.userid,
            cid: this.cid,
            hid: this.courseId,
            ccontent: JSON.stringify({
              content: this.message,
              photo: photo.join(","),
              media: media.join(","),
            }),
          },
        ];
        this.ajax
          .post(this.$store.state.api + "submitWork", params)
          .then((res) => {
            this.$store.commit("update", ["loading", false]);
            this.$toast.success("提交成功");
            if (this.Dtype == 1) {
              this.addScore();
            } else {
              this.goBack();
            }
            // this.$router.go(-1);
          })
          .catch((err) => {
            this.$store.commit("update", ["loading", false]);
            this.$toast.fail("提交失败");
            console.error(err);
          });
      } else {
        return false;
      }
    },
    addScore() {
      let params = [
        {
          uid: this.$store.state.userInfo.userid,
          score: 2,
          c: "积分增加-提交作业",
        },
      ];
      this.ajax
        .post(this.$store.state.api + "addScore", params)
        .then((res) => {
          this.Dshow = true;
        })
        .catch((err) => {
          console.error(err);
        });
    },
    handleClose(action, done) {
      this.goBack();
      done();
    },
    mediaPreview(file) {
      console.log(file);
      this.show = true;
      this.playerOptions.sources[0].src = file.url;
      this.playerO = this.playerOptions;
    },
    onPlayerCanplay() {},
    onPlayerPlay() {},
  },
  created() {
    // this.$vConsole
    // this.getCourse();
  },
};
</script>

<style scoped>
body,
html {
  background: #eee;
}
.myp_parent_textarea {
  width: 95%;
  margin: 0 auto;
  border: 1px solid rgb(207, 207, 207);
  margin-left: 10px !important;
  border-radius: 5px;
  overflow: auto;
}
.van-cell {
  background: #fdfdfd;
}
.pb_content_body {
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  /* justify-content: space-around; */
  width: 95%;
  background: #fff;
  padding: 0px 5px;
  margin: 5px 0 0 5px;
  height: auto;
}

.pb_content_body div {
  margin: 0.5rem 0 0;
}
.pb_content_body div > img {
  width: 1.5rem;
}
.pb_content_body .van-cell {
  margin: 0;
}
.sw_select {
  font-size: 16px;
  color: #444;
}
.sw_select >>> .el-input__inner {
  /* border: none !important; */
  border: 1px solid #eee !important;
}
.sw_select >>> .el-select {
  width: 12rem;
}
.class_learn button {
  color: white;
  background: #de8410;
  border: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  text-align: center;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s;
  height: 2rem;
  width: 100%;
  font-size: 0.8rem;
  line-height: 1.5rem;
  margin-bottom: 0.5rem;
}
.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 11rem;
  width: 100%;
}
.dia_title {
  display: flex;
  width: 100%;
  align-items: center;
  height: 2rem;
  justify-content: center;
}
.close {
  position: absolute;
  right: 5%;
  top: 0.5rem;
}
.close img {
  width: 1rem;
}

.dia_content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dia_content .score {
  font-size: 1.2rem;
  font-family: "Microsoft JhengHei";
  font-weight: 600;
  color: rgb(39, 39, 39);
  margin: 0.8rem 0;
  display: flex;
  align-items: center;
}
.dia_content .btn {
  font-family: "Microsoft JhengHei";
  font-size: 0.85rem;
  width: 8rem;
  height: 1.8rem;
  line-height: 1.8rem;
  text-align: center;
  background: #58a5e6;
  color: #fff;
  border-radius: 3rem;
}

.scoreInner {
  position: absolute;
  bottom: 0.4rem;
  width: fit-content;
  left: 50%;
  font-size: 1rem;
  color: #fff;
  transform: translateX(-50%);
}
.mask {
  background-color: rgba(0, 0, 0, 0);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.progressBox {
  width: 95%;
  height: 6rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 6px 1px #bfbfbf;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.progressBox .lbox {
  height: 3rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
}

.progressBox .lbox img {
  width: 1.3rem;
  margin-right: 1.2rem;
}

.progressBox >>> .el-progress-bar__outer {
  background-color: #d1dfff !important;
  height: 1.2rem !important;
}

.workDisplay >>> .van-field__value,
.workDDisplay >>> .van-field__value {
  display: flex;
  justify-content: space-between;
}
.workDDisplay >>> .van-field__body {
  width: 100%;
}
.workDDisplay >>> .van-field__control {
  max-height: 200px;
  overflow: auto;
}
.uploadPhoto {
  width: 45%;
  padding-left: 8px;
}
.uploadPhoto >>> .van-uploader__wrapper {
  background: #f2f2f2;
  height: 125px;
}
.uploadPhoto >>> .van-uploader__input-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
}
.uploadPhoto >>> .van-uploader__preview {
  margin: 0;
  width: 100%;
  height: 100%;
}
.uploadPhoto >>> .van-uploader__preview-image {
  width: 100% !important;
  height: 100% !important;
}
.uploadPhotos {
  width: 100%;
}
.uploadPhotos >>> .van-uploader__wrapper {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.uploadPhotos >>> .van-uploader__input-wrapper {
  background: #f2f2f2;
  height: 100px;
  width: 45%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  margin: 0 0 1rem 8px;
}
.uploadFiles {
  width: 100%;
  padding-left: 8px;
}
.uploadFiles >>> .van-uploader__input-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 60%;
  align-items: center;
  justify-content: center;
  background: #f2f2f2;
  height: 65px;
  border-radius: 10px;
}
.uploadFiles >>> .van-uploader__file {
  margin: 0;
}
.uploadFiles >>> .van-uploader__preview-image {
  margin: 0;
}
.uploadFiles >>> .van-uploader__preview-delete {
  margin: 0;
}
.sName {
  color: #fff;
  font-size: 16px;
  margin-left: 10px;
}

.logoImg > img {
  width: 100%;
  height: 100%;
}

.logoImg {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 0 auto 1rem;
}
.logo {
  display: flex;
  justify-content: start;
  background: #ffbf43;
  height: 2rem;
  align-items: center;
}
</style>
