lsc 2 years ago
parent
commit
88e6acae52
32 changed files with 269 additions and 4 deletions
  1. 1 1
      beifeng/index.html
  2. 0 0
      beifeng/static/css/app.3392eb5272b7325e17fe65c85aad888a.css
  3. 0 0
      beifeng/static/css/app.3392eb5272b7325e17fe65c85aad888a.css.map
  4. 0 0
      beifeng/static/css/app.d3a6655fcdf2ffae2c5a1b1afba44f36.css
  5. 0 0
      beifeng/static/css/app.d3a6655fcdf2ffae2c5a1b1afba44f36.css.map
  6. BIN
      beifeng/static/img/left_coinGM.49d8add.png
  7. BIN
      beifeng/static/img/noBanner.8b0b738.jpg
  8. BIN
      beifeng/static/img/projectNameGM.7e14a4d.png
  9. BIN
      beifeng/static/img/right_coinGM.dfb30ab.png
  10. BIN
      beifeng/static/img/ttitle.430109e.png
  11. 0 0
      beifeng/static/js/0.7da288988865a9378b49.js
  12. 0 0
      beifeng/static/js/0.7da288988865a9378b49.js.map
  13. 0 0
      beifeng/static/js/app.15b4d780ecc477996241.js
  14. 0 0
      beifeng/static/js/app.15b4d780ecc477996241.js.map
  15. 0 0
      beifeng/static/js/app.5f7569e28dc0cc7fb455.js
  16. 0 0
      beifeng/static/js/app.5f7569e28dc0cc7fb455.js.map
  17. 2 0
      beifeng/static/js/manifest.3512a67a6213c2df4180.js
  18. 0 0
      beifeng/static/js/manifest.3512a67a6213c2df4180.js.map
  19. 0 0
      beifeng/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  20. 1 1
      dist/index.html
  21. 3 0
      dist/js/aws-sdk-2.235.1.min.js
  22. 19 0
      dist/js/html2canvas.min.js
  23. 113 0
      dist/js/jietu.js
  24. 127 0
      dist/js/jietu2.js
  25. 1 0
      dist/js/jquery-3.6.0.min.js
  26. BIN
      dist/js/loading.gif
  27. 0 0
      dist/static/css/app.37481aca28043fba79c36e8c0ead5d63.css
  28. 0 0
      dist/static/css/app.37481aca28043fba79c36e8c0ead5d63.css.map
  29. 0 0
      dist/static/js/app.7652f56bf0bd503b0a5e.js
  30. 0 0
      dist/static/js/app.7652f56bf0bd503b0a5e.js.map
  31. 0 0
      dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  32. 2 2
      src/config/config.js

+ 1 - 1
beifeng/index.html

@@ -18,4 +18,4 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.00d92818cd5e4eb3606ca20140d00bdb.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.b786a8947e1f5a7b4973.js></script><script type=text/javascript src=./static/js/app.96596db1d8ae290f517e.js></script></body></html><script>document.domain = "cocorobo.cn"</script>
+    }</style><link href=./static/css/app.3392eb5272b7325e17fe65c85aad888a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.b786a8947e1f5a7b4973.js></script><script type=text/javascript src=./static/js/app.5f7569e28dc0cc7fb455.js></script></body></html><script>document.domain = "cocorobo.cn"</script>

+ 0 - 0
dist/static/css/app.3392eb5272b7325e17fe65c85aad888a.css → beifeng/static/css/app.3392eb5272b7325e17fe65c85aad888a.css


+ 0 - 0
dist/static/css/app.3392eb5272b7325e17fe65c85aad888a.css.map → beifeng/static/css/app.3392eb5272b7325e17fe65c85aad888a.css.map


File diff suppressed because it is too large
+ 0 - 0
beifeng/static/css/app.d3a6655fcdf2ffae2c5a1b1afba44f36.css


File diff suppressed because it is too large
+ 0 - 0
beifeng/static/css/app.d3a6655fcdf2ffae2c5a1b1afba44f36.css.map


BIN
beifeng/static/img/left_coinGM.49d8add.png


BIN
beifeng/static/img/noBanner.8b0b738.jpg


BIN
beifeng/static/img/projectNameGM.7e14a4d.png


BIN
beifeng/static/img/right_coinGM.dfb30ab.png


BIN
beifeng/static/img/ttitle.430109e.png


File diff suppressed because it is too large
+ 0 - 0
beifeng/static/js/0.7da288988865a9378b49.js


File diff suppressed because it is too large
+ 0 - 0
beifeng/static/js/0.7da288988865a9378b49.js.map


File diff suppressed because it is too large
+ 0 - 0
beifeng/static/js/app.15b4d780ecc477996241.js


File diff suppressed because it is too large
+ 0 - 0
beifeng/static/js/app.15b4d780ecc477996241.js.map


+ 0 - 0
dist/static/js/app.5f7569e28dc0cc7fb455.js → beifeng/static/js/app.5f7569e28dc0cc7fb455.js


+ 0 - 0
dist/static/js/app.5f7569e28dc0cc7fb455.js.map → beifeng/static/js/app.5f7569e28dc0cc7fb455.js.map


+ 2 - 0
beifeng/static/js/manifest.3512a67a6213c2df4180.js

@@ -0,0 +1,2 @@
+!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i]);for(n&&n(r,a,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)f=o(o.s=c[s]);return f};var r={},t={4:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+e+"."+{0:"7da288988865a9378b49",1:"994623639438b244a74c"}[e]+".js";var i=setTimeout(u,12e4);function u(){c.onerror=c.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=u,a.appendChild(c),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
+//# sourceMappingURL=manifest.3512a67a6213c2df4180.js.map

File diff suppressed because it is too large
+ 0 - 0
beifeng/static/js/manifest.3512a67a6213c2df4180.js.map


File diff suppressed because it is too large
+ 0 - 0
beifeng/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 1 - 1
dist/index.html

@@ -18,4 +18,4 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.3392eb5272b7325e17fe65c85aad888a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.b786a8947e1f5a7b4973.js></script><script type=text/javascript src=./static/js/app.5f7569e28dc0cc7fb455.js></script></body></html><script>document.domain = "cocorobo.cn"</script>
+    }</style><link href=./static/css/app.37481aca28043fba79c36e8c0ead5d63.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.b786a8947e1f5a7b4973.js></script><script type=text/javascript src=./static/js/app.7652f56bf0bd503b0a5e.js></script></body></html><script>document.domain = "cocorobo.cn"</script>

File diff suppressed because it is too large
+ 3 - 0
dist/js/aws-sdk-2.235.1.min.js


File diff suppressed because it is too large
+ 19 - 0
dist/js/html2canvas.min.js


+ 113 - 0
dist/js/jietu.js

@@ -0,0 +1,113 @@
+function jietu_shishi(uid, cid,page,type) {
+  html2canvas($("body")[0]).then(function (canvas) {
+    //获取截取图片路径
+
+    var base64Url = canvas.toDataURL('image/png');
+    //后台操作处理
+
+    var base64 = "<img src=" + base64Url + " />"
+    var file = dataURLtoFile_shishi(base64Url, "截图")
+    beforeUpload_shishi(file, uid, cid, page, type)
+    // $("body")[0].innerHTML = base64
+  });
+}
+
+function dataURLtoFile_shishi(dataurl, filename) {
+  let arr = dataurl.split(","),
+    mime = arr[0].match(/:(.*?);/)[1],
+    bstr = atob(arr[1]),
+    n = bstr.length,
+    u8arr = new Uint8Array(n);
+  while (n--) {
+    u8arr[n] = bstr.charCodeAt(n);
+  }
+  return new File([u8arr], filename, {
+    type: mime
+  });
+}
+
+
+function beforeUpload_shishi(nfile, uid, cid, page, type) {
+  var file = nfile;
+  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"
+    }
+  }); //选择桶
+
+  if (file) {
+    var params = {
+      Key: file.name.split(".")[0] + new Date().getTime() + "." + "png",
+      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) {
+        console.log(data.Location);
+        var a = {
+          name: file.name,
+          url: data.Location,
+          uid: file.uid,
+        }
+        addSWork_shishi(uid, cid, a, page, type)
+      });
+  }
+}
+
+function addSWork_shishi(uid, cid, a, page, type) {
+  let params = {
+    uid: uid,
+    cid: cid,
+    p:page,
+    t:type,
+    // upload: JSON.stringify([{
+    //   upImg: [a],
+    //   upVedio: [],
+    //   upIntro: "",
+    // }]), 
+    upload: a.url,
+    // upload: JSON.stringify(this.imgFileUp),
+  };
+  $.ajax({
+    type: 'GET',
+    url: 'https://pbl.cocorobo.cn/api/pbl/insertSWork',
+    data: params,
+    dataType: "json",
+    success: (data) => {
+      var _a = document.getElementsByTagName("img")
+      for (var i = 0; i < _a.length; i++) {
+        _a[i].removeAttribute("crossorigin")
+      }
+      parent.document.getElementById("shishi_loading").style.display = "none"
+      let _div = document.createElement('div')
+      _div.style = "width:100%;height:100%;background:#0000008f;position:fixed;top:0;left:0;z-index:99999999999999;display: flex;justify-content: center;align-items: center;"
+      let _inner = document.createElement('div')
+      _inner.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;"
+      _inner.innerHTML = "截图上传成功"
+      _div.appendChild(_inner)
+      document.body.appendChild(_div)
+      setTimeout(() => {
+        //  document.body.removeChild(_loading)
+        document.body.removeChild(_div)
+      }, 2000);
+      console.log("截图上传成功");
+    }
+  })
+}

+ 127 - 0
dist/js/jietu2.js

@@ -0,0 +1,127 @@
+//  let _loading = document.createElement('div')
+//  _loading.style = "width:100%;height:100%;background:#0000008f;position:fixed;top:0;left:0;z-index:99999999999999;display: flex;justify-content: center;align-items: center;"
+//  let _lchild = document.createElement('div')
+//  let _limg = document.createElement('img')
+//  _limg.src = 'https://pbl.cocorobo.cn/pbl-student-table/dist/js/loading.gif'
+//  _limg.style = "width: 26px;margin-right: 10px;"
+//  _lchild.appendChild(_limg)
+//  let _lspan = document.createElement('span')
+//  _lspan.innerHTML = "上传中..."
+//  _lchild.appendChild(_lspan)
+//  _lchild.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;display:flex;align-items:center;"
+//  _loading.appendChild(_lchild)
+//  document.body.appendChild(_loading)
+
+function jietu_shishi(uid, cid, stage, task, tool) {
+  html2canvas($("body")[0]).then(function (canvas) {
+    //获取截取图片路径
+
+    var base64Url = canvas.toDataURL('image/png');
+    //后台操作处理
+
+    var base64 = "<img src=" + base64Url + " />"
+    var file = dataURLtoFile_shishi(base64Url, "截图")
+    beforeUpload_shishi(file, uid, cid, stage, task, tool)
+    // $("body")[0].innerHTML = base64
+  });
+}
+
+function dataURLtoFile_shishi(dataurl, filename) {
+  let arr = dataurl.split(","),
+    mime = arr[0].match(/:(.*?);/)[1],
+    bstr = atob(arr[1]),
+    n = bstr.length,
+    u8arr = new Uint8Array(n);
+  while (n--) {
+    u8arr[n] = bstr.charCodeAt(n);
+  }
+  return new File([u8arr], filename, {
+    type: mime
+  });
+}
+
+
+function beforeUpload_shishi(nfile, uid, cid, stage, task, tool, loading) {
+  // loading.style.display = 'flex'
+  // top.document.getElementById(loading);
+  //  document.body.appendChild(_loading)
+  var file = nfile;
+  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"
+    }
+  }); //选择桶
+
+  if (file) {
+    var params = {
+      Key: file.name.split(".")[0] + new Date().getTime() + "." + "png",
+      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) {
+        console.log(data.Location);
+        var a = {
+          name: file.name,
+          url: data.Location,
+          uid: file.uid,
+        }
+        addSWork_shishi(uid, cid, stage, task, tool, data.Location, loading)
+      });
+  }
+}
+
+function addSWork_shishi(uid, cid, stage, task, tool, a, loading) {
+  let params = {
+    uid: uid,
+    cid: cid,
+    stage: stage,
+    task: task,
+    tool: tool,
+    content: a,
+    type: 1,
+    // upload: JSON.stringify(this.imgFileUp),
+  };
+  $.ajax({
+    type: 'GET',
+    url: 'https://pbl.cocorobo.cn/api/pbl/addCourseWorks2',
+    data: params,
+    dataType: "json",
+    success: (data) => {
+      var _a = document.getElementsByTagName("img")
+      for (var i = 0; i < _a.length; i++) {
+        _a[i].removeAttribute("crossorigin")
+      }
+      top.document.getElementById(loading).children[0].style.display = "none"
+      let _div = document.createElement('div')
+      _div.style = "width:100%;height:100%;background:#0000008f;position:fixed;top:0;left:0;z-index:99999999999999;display: flex;justify-content: center;align-items: center;"
+      let _inner = document.createElement('div')
+      _inner.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;"
+      _inner.innerHTML = "截图上传成功"
+      _div.appendChild(_inner)
+      document.body.appendChild(_div)
+      setTimeout(() => {
+        //  document.body.removeChild(_loading)
+        document.body.removeChild(_div)
+      }, 2000);
+      console.log("截图上传成功");
+    }
+  })
+}

File diff suppressed because it is too large
+ 1 - 0
dist/js/jquery-3.6.0.min.js


BIN
dist/js/loading.gif


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.37481aca28043fba79c36e8c0ead5d63.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.37481aca28043fba79c36e8c0ead5d63.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.7652f56bf0bd503b0a5e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.7652f56bf0bd503b0a5e.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 2 - 2
src/config/config.js

@@ -9,9 +9,9 @@ const store = new Vuex.Store({
         luyou: 1,
         userInfo: {},
         nCount: 0,
-        // api: 'https://pbl.cocorobo.cn/api/pbl/',
+        api: 'https://pbl.cocorobo.cn/api/pbl/',
         socket: "https://poll.cocorobo.cn",
-        api: 'http://localhost:7003/api/pbl/',
+        // api: 'http://localhost:7003/api/pbl/',
     },
 
     mutations: {

Some files were not shown because too many files changed in this diff