DESKTOP-D85FA51\111
2021-01-20 17160d0cacec834a737f6736a49447d94ec72a73
修改代码 功能bug
1 files added
6 files modified
108 ■■■■■ changed files
debug.log 1 ●●●● patch | view | raw | blame | history
src/apis/coursewareSource/packageManage/index.js 3 ●●●● patch | view | raw | blame | history
src/components/course/imgUp.vue 41 ●●●●● patch | view | raw | blame | history
src/components/coursewareSource/ButtonUp.vue 2 ●●● patch | view | raw | blame | history
src/components/coursewareSource/TextImgUp.vue 51 ●●●●● patch | view | raw | blame | history
src/views/coursewareSource/packageManage/SetPackage.vue 9 ●●●●● patch | view | raw | blame | history
src/views/coursewareSource/packageManage/SetPass.vue 1 ●●●● patch | view | raw | blame | history
debug.log
New file
@@ -0,0 +1 @@
[0120/145000.561:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
src/apis/coursewareSource/packageManage/index.js
@@ -118,7 +118,6 @@
  vocabulary,
  learningBase,
  status,
  modelArr,
  funArr,
  taskArr
) =>
@@ -133,7 +132,7 @@
    vocabulary,
    learningBase,
    status,
    modelArr,
    funArr,
    taskArr,
  });
src/components/course/imgUp.vue
@@ -9,7 +9,7 @@
            :src="
              imgSrc.indexOf('http') >= 0
                ? imgSrc
                : 'http://mpfile.anniekids.com' + imgSrc
                : 'https://resourcecdn.anniekids.com' + imgSrc
            "
            alt=""
          />
@@ -46,6 +46,7 @@
import moment from "moment";
import { Utils } from "@/assets/js/utils";
let utils = new Utils();
import { mapState } from "vuex";
export default {
  name: "upload",
  props: ["upDis", "style1"],
@@ -56,12 +57,17 @@
      imgA: "",
      isValidate: false,
      styles: false,
      host: "",
    };
  },
  created() {
    this.imgSrc = this.upDis;
    this.styles = this.style1 || "";
    console.log(this.imgSrc, "imgsrc");
  },
  computed: {
    ...mapState("common", {
      user: (state) => JSON.parse(state.user),
    }),
  },
  watch: {
    upDis: {
@@ -125,31 +131,30 @@
      // }
    },
    uploadImg(file) {
      let that = this;
      let imgObj = {
        timestamp: moment().format("X"),
        classId: "",
        status: 0,
        title: file.name,
        releaseId: JSON.parse(utils.decrypt(localStorage.getItem("annieUser")))
          .userId,
        releaseName: JSON.parse(
          utils.decrypt(localStorage.getItem("annieUser"))
        ).mobile,
        isInside: 0,
        cid: 0,
        source: 6,
        FSource: 13,
        FStatus: "1",
        FIntro: "消息推送",
        FUser: that.user.nickName,
        FUid: that.user.userId,
        FBusiness: 24,
        isInside: "1",
        FTranscoding: "0",
      };
      let formData = utils.fnUploadPara(imgObj, file);
      this.instance
        .post("/Api/v1/ImgSet/imgUploadSub", formData)
      this.uploads
        .post("api/v1/img/imgUploadSub", formData)
        .then((res) => {
          let { data, status } = res.data;
          if (status === 0) {
          let { code, data } = res.data;
          if (code == 1) {
            let FR = new FileReader();
            FR.readAsDataURL(file);
            FR.onload = () => {
              //this.imgSrc = data.filePath;
              // this.form.userFile = data.filePath;
              this.host = data.host;
              this.$emit("getPosimg", data);
            };
          }
src/components/coursewareSource/ButtonUp.vue
@@ -11,7 +11,7 @@
        >
          <div class="img">
            <img
              :src="host || 'https://resourcecdn.anniekids.com' + item.imgUrl"
              :src="(host || 'https://resourcecdn.anniekids.com') + item.imgUrl"
              alt=""
            />
          </div>
src/components/coursewareSource/TextImgUp.vue
@@ -6,7 +6,15 @@
      <li v-if="imgSrc">
        <div class="item">
          <div class="img">
            <img v-if="imgSrc" :src="imgSrc ? imgSrc : imgSrc" alt="" />
            <img
              v-if="imgSrc"
              :src="
                imgSrc.indexOf('http') >= 0
                  ? imgSrc
                  : 'https://resourcecdn.anniekids.com' + imgSrc
              "
              alt=""
            />
          </div>
          <img
            src="../../assets/images/deleteImg.png"
@@ -37,6 +45,7 @@
import { userId, userName } from "@/assets/js/consts";
import moment from "moment";
import { Utils } from "@/assets/js/utils";
import { mapState } from "vuex";
let utils = new Utils();
export default {
  name: "upload",
@@ -47,6 +56,7 @@
      imgSrc: "",
      imgA: "",
      isValidate: false,
      host: "",
    };
  },
  created() {
@@ -63,6 +73,11 @@
      },
      deep: true,
    },
  },
  computed: {
    ...mapState("common", {
      user: (state) => JSON.parse(state.user),
    }),
  },
  methods: {
    deleteImg() {
@@ -108,33 +123,31 @@
      // }
    },
    uploadImg(file) {
      let that = this;
      let imgObj = {
        timestamp: moment().format("X"),
        classId: "",
        status: 0,
        title: file.name,
        releaseId: JSON.parse(utils.decrypt(localStorage.getItem("annieUser")))
          .userId,
        releaseName: JSON.parse(
          utils.decrypt(localStorage.getItem("annieUser"))
        ).mobile,
        isInside: 0,
        cid: 0,
        source: 6,
        FSource: 13,
        FStatus: "1",
        FIntro: "消息推送",
        FUser: that.user.nickName,
        FUid: that.user.userId,
        FBusiness: 24,
        isInside: "1",
        FTranscoding: "0",
      };
      let formData = utils.fnUploadPara(imgObj, file);
      this.instance
        .post("/Api/v1/ImgSet/imgUploadSub", formData)
      this.uploads
        .post("api/v1/img/imgUploadSub", formData)
        .then((res) => {
          let { data, status } = res.data;
          if (status === 0) {
          let { code, data } = res.data;
          if (code === 1) {
            let FR = new FileReader();
            FR.readAsDataURL(file);
            FR.onload = () => {
              this.imgSrc = data;
              // this.imgSrc = data;
              // this.form.userFile = data.filePath;
              this.$emit("getPosimg", this.imgSrc);
              this.host = data.host;
              this.$emit("getPosimg", data);
            };
          }
        })
src/views/coursewareSource/packageManage/SetPackage.vue
@@ -492,12 +492,13 @@
    },
    // 获取图片
    getPosimg(e, index) {
      console.log(e, "e");
      if (index == 1) {
        this.ruleForm.packageCoverImg = e.filePath;
        this.ruleForm.httpPackageCoverImg = e.fileUrl;
        this.ruleForm.httpPackageCoverImg = e.filePath;
      } else {
        this.ruleForm.guidanceImage = e.filePath;
        this.ruleForm.httPguidanceImage = e.fileUrl;
        this.ruleForm.httPguidanceImage = e.filePath;
      }
      this.$forceUpdate();
    },
@@ -513,7 +514,7 @@
          value = item.httpImgUrl;
        }
      });
      console.log(value);
      return value;
    },
    // 删除
@@ -531,7 +532,7 @@
      this.ruleForm.funArr.forEach((item) => {
        if (item.modelType == modelType && item.type == type) {
          item.imgUrl = e.filePath;
          item.httpImgUrl = e.fileUrl;
          item.httpImgUrl = e.filePath;
        }
      });
      this.$forceUpdate();
src/views/coursewareSource/packageManage/SetPass.vue
@@ -558,6 +558,7 @@
    // 获取图片list
    getPosimg(e) {
      this.ruleForm.helpArr.push({ imgUrl: e.filePath });
      console.log(this.ruleForm.helpArr);
    },
    // 获取课件list
    getCourse(data) {