修复研究院所提漏洞

master
yujialong 2 years ago
parent c44e5dc84d
commit 08d20f3a8d
  1. 0
      public/images/default.png
  2. 4
      public/index.html
  3. 0
      public/styles/css/editor.css
  4. 0
      public/styles/tinymce/icons/default/icons.min.js
  5. 0
      public/styles/tinymce/jquery.tinymce.min.js
  6. 0
      public/styles/tinymce/langs/README.md
  7. 0
      public/styles/tinymce/langs/zh_CN.js
  8. 0
      public/styles/tinymce/license.txt
  9. 0
      public/styles/tinymce/plugins/advlist/plugin.min.js
  10. 0
      public/styles/tinymce/plugins/anchor/plugin.min.js
  11. 0
      public/styles/tinymce/plugins/autolink/plugin.min.js
  12. 0
      public/styles/tinymce/plugins/autoresize/plugin.min.js
  13. 0
      public/styles/tinymce/plugins/autosave/plugin.min.js
  14. 0
      public/styles/tinymce/plugins/bbcode/plugin.min.js
  15. 0
      public/styles/tinymce/plugins/charmap/plugin.min.js
  16. 0
      public/styles/tinymce/plugins/code/plugin.min.js
  17. 0
      public/styles/tinymce/plugins/codesample/plugin.min.js
  18. 0
      public/styles/tinymce/plugins/colorpicker/plugin.min.js
  19. 0
      public/styles/tinymce/plugins/contextmenu/plugin.min.js
  20. 0
      public/styles/tinymce/plugins/directionality/plugin.min.js
  21. 0
      public/styles/tinymce/plugins/emoticons/js/emojiimages.js
  22. 0
      public/styles/tinymce/plugins/emoticons/js/emojiimages.min.js
  23. 0
      public/styles/tinymce/plugins/emoticons/js/emojis.js
  24. 0
      public/styles/tinymce/plugins/emoticons/js/emojis.min.js
  25. 0
      public/styles/tinymce/plugins/emoticons/plugin.min.js
  26. 0
      public/styles/tinymce/plugins/fullpage/plugin.min.js
  27. 0
      public/styles/tinymce/plugins/fullscreen/plugin.min.js
  28. 0
      public/styles/tinymce/plugins/help/plugin.min.js
  29. 0
      public/styles/tinymce/plugins/hr/plugin.min.js
  30. 0
      public/styles/tinymce/plugins/image/plugin.min.js
  31. 0
      public/styles/tinymce/plugins/imagetools/plugin.min.js
  32. 0
      public/styles/tinymce/plugins/importcss/plugin.min.js
  33. 0
      public/styles/tinymce/plugins/insertdatetime/plugin.min.js
  34. 0
      public/styles/tinymce/plugins/legacyoutput/plugin.min.js
  35. 0
      public/styles/tinymce/plugins/link/plugin.min.js
  36. 0
      public/styles/tinymce/plugins/lists/plugin.min.js
  37. 0
      public/styles/tinymce/plugins/media/plugin.min.js
  38. 0
      public/styles/tinymce/plugins/nonbreaking/plugin.min.js
  39. 0
      public/styles/tinymce/plugins/noneditable/plugin.min.js
  40. 0
      public/styles/tinymce/plugins/pagebreak/plugin.min.js
  41. 0
      public/styles/tinymce/plugins/paste/plugin.min.js
  42. 0
      public/styles/tinymce/plugins/preview/plugin.min.js
  43. 0
      public/styles/tinymce/plugins/print/plugin.min.js
  44. 0
      public/styles/tinymce/plugins/quickbars/plugin.min.js
  45. 0
      public/styles/tinymce/plugins/save/plugin.min.js
  46. 0
      public/styles/tinymce/plugins/searchreplace/plugin.min.js
  47. 0
      public/styles/tinymce/plugins/spellchecker/plugin.min.js
  48. 0
      public/styles/tinymce/plugins/tabfocus/plugin.min.js
  49. 0
      public/styles/tinymce/plugins/table/plugin.min.js
  50. 0
      public/styles/tinymce/plugins/template/plugin.min.js
  51. 0
      public/styles/tinymce/plugins/textcolor/plugin.min.js
  52. 0
      public/styles/tinymce/plugins/textpattern/plugin.min.js
  53. 0
      public/styles/tinymce/plugins/toc/plugin.min.js
  54. 0
      public/styles/tinymce/plugins/visualblocks/plugin.min.js
  55. 0
      public/styles/tinymce/plugins/visualchars/plugin.min.js
  56. 0
      public/styles/tinymce/plugins/wordcount/plugin.min.js
  57. 0
      public/styles/tinymce/skins/content/dark/content.min.css
  58. 0
      public/styles/tinymce/skins/content/default/content.min.css
  59. 0
      public/styles/tinymce/skins/content/document/content.min.css
  60. 0
      public/styles/tinymce/skins/content/writer/content.min.css
  61. 0
      public/styles/tinymce/skins/ui/oxide-dark/content.inline.min.css
  62. 0
      public/styles/tinymce/skins/ui/oxide-dark/content.min.css
  63. 0
      public/styles/tinymce/skins/ui/oxide-dark/content.mobile.min.css
  64. 0
      public/styles/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff
  65. 0
      public/styles/tinymce/skins/ui/oxide-dark/skin.min.css
  66. 0
      public/styles/tinymce/skins/ui/oxide-dark/skin.mobile.min.css
  67. 0
      public/styles/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css
  68. 0
      public/styles/tinymce/skins/ui/oxide/content.inline.min.css
  69. 0
      public/styles/tinymce/skins/ui/oxide/content.min.css
  70. 0
      public/styles/tinymce/skins/ui/oxide/content.mobile.min.css
  71. 0
      public/styles/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff
  72. 0
      public/styles/tinymce/skins/ui/oxide/skin.min.css
  73. 0
      public/styles/tinymce/skins/ui/oxide/skin.mobile.min.css
  74. 0
      public/styles/tinymce/skins/ui/oxide/skin.shadowdom.min.css
  75. 0
      public/styles/tinymce/themes/mobile/theme.min.js
  76. 0
      public/styles/tinymce/themes/silver/theme.min.js
  77. 0
      public/styles/tinymce/tinymce.d.ts
  78. 0
      public/styles/tinymce/tinymce.min.js
  79. 4
      src/components/editor.js
  80. 131
      src/components/pdf/index.vue
  81. 255
      src/components/quill/index.vue
  82. 16
      src/components/quill/options.js
  83. 43
      src/libs/util.cookies.js
  84. 130
      src/libs/util.js
  85. 5
      src/main.js
  86. 16
      src/pages/article/add/editor.js
  87. 1
      src/plugins/aliplayer/aliplayer-min.css
  88. 2
      src/plugins/aliplayer/aliplayer-min.js
  89. 12
      src/plugins/filters/index.js
  90. 3
      src/plugins/index.js
  91. 10
      src/plugins/requests/index.js
  92. 18
      src/plugins/throttle/index.js
  93. 5
      src/setting.js

Before

Width:  |  Height:  |  Size: 407 KiB

After

Width:  |  Height:  |  Size: 407 KiB

@ -4,8 +4,8 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css">
<script src="/tinymce/tinymce.min.js"></script>
<meta name="referrer" content="no-referrer">
<script src="/styles/tinymce/tinymce.min.js"></script>
<title>粒子研究院</title>
</head>
<body>

@ -5,7 +5,7 @@ import Util from '@/libs/util'
export default {
//skin:'oxide-dark',
language:'zh_CN',
language_url: './tinymce/langs/zh_CN.js',
language_url: './styles/tinymce/langs/zh_CN.js',
plugins: 'print powerpaste preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template advcode codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave autoresize formatpainter',
toolbar: 'code undo redo restoredraft | cut copy powerpaste pastetext | forecolor backcolor bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify outdent indent | \
styleselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \
@ -16,7 +16,7 @@ export default {
promotion: false,
branding: false,
content_css: [ //可设置编辑区内容展示的css,谨慎使用
'./editor.css',
'./styles/css/editor.css',
],
// content_style: Style,
fontsize_formats: '12px 14px 16px 19px 24px 36px 48px 56px 72px',

@ -1,131 +0,0 @@
<template>
<div>
<el-dialog
custom-class="pdf-dia"
:close-on-click-modal="false"
:visible.sync="visible"
@close="closePdf"
:fullscreen="true"
:modal="false"
:append-to-body="true">
<div>
<button type="button" aria-label="Close" class="el-dialog__headerbtn" @click="closePdf"><i class="el-dialog__close el-icon el-icon-close"></i></button>
<div class="pdf">
<p class="arrow">
<span @click="changePdfPage(0)" class="turn el-icon-arrow-left" :class="{grey: currentPage==1}"></span>
{{ currentPage }} / {{ pageCount }}
<span @click="changePdfPage(1)" class="turn el-icon-arrow-right" :class="{grey: currentPage==pageCount}"></span>
</p>
<pdf
class="pdf-wrap"
:src="src"
:page="currentPage"
@num-pages="pageCount=$event"
@page-loaded="currentPage=$event"
@loaded="loadPdfHandler"
>
</pdf>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import pdf from "vue-pdf";
export default {
props: ["visible", "src"],
data() {
return {
pdfVisible: false,
pdfSrc: "",
currentPage: 0,
pageCount: 0,
fileType: "pdf"
};
},
components: { pdf },
mounted() {
this.addEvent();
},
methods: {
closePdf() {
this.$emit("update:visible", false);
this.$emit("update:src", "");
this.currentPage = 1;
},
changePdfPage(val) {
if (val === 0 && this.currentPage > 1) {
this.currentPage--;
}
if (val === 1 && this.currentPage < this.pageCount) {
this.currentPage++;
}
},
loadPdfHandler(e) {
this.currentPage = 1;
},
addEvent() {
document.onkeydown = e => {
let key = window.event.keyCode;
if (key == 37) {
this.changePdfPage(0);
} else if (key == 39) {
this.changePdfPage(1);
}
};
this.$once("hook:beforeDestroy", () => {
document.onkeydown = null;
});
}
}
};
</script>
<style lang="scss" scoped>
/deep/ .pdf-dia {
border-radius: 0 !important;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 0;
}
.el-dialog__headerbtn {
top: 10px;
.el-dialog__close {
color: #fff;
font-size: 16px;
}
}
.pdf {
.arrow {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
padding: 10px 0;
font-size: 16px;
color: #fff;
background-color: #333;
.turn {
margin: 0 10px;
font-size: 18px;
cursor: pointer;
}
}
.pdf-wrap {
height: calc(100vh - 45px);
margin: 0 auto;
overflow: auto;
}
}
}
</style>

@ -1,255 +0,0 @@
<template>
<div class="quill" ref="quill" :class="classes">
<div ref="editor" :style="styles" v-loading="loading"></div>
<el-upload
:headers="headers"
:action="this.api.fileupload"
:before-upload="beforeUpload"
:on-success="editorUploadSuccess"
style="display: none"
>
<el-button class="editorUpload" type="primary">点击上传</el-button>
</el-upload>
</div>
</template>
<script>
import util from "@/libs/util";
import Setting from "@/setting";
import Quill from "quill";
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
import toolbarOptions from "./options";
export default {
name: "quill",
props: {
value: {
type: String,
default: ""
},
readonly: {
type: Boolean,
default: false
},
toTop: {
type: Boolean,
default: true
},
border: {
type: Boolean,
default: false
},
height: {
type: Number
},
minHeight: {
type: Number
},
/*
* 原本的readOnly失效,对比其他项目发现是quill版本不同导致
* 使用props传入elseRead = 'true'手动隐藏工具栏
*/
elseRead: {
type: String, default: "false"
}
},
data() {
return {
headers: {
token: util.local.get(Setting.tokenKey)
},
Quill: null,
currentValue: "",
options: {
theme: "snow",
bounds: document.body,
debug: "warn",
modules: {
toolbar: {
container: toolbarOptions,
handlers: {
"image": function(value) {
if (value) {
// iview
document.querySelector(".editorUpload").click();
} else {
this.Quill.format("image", false);
}
}
}
}
},
placeholder: "",
readOnly: this.readonly
},
loading: false
};
},
computed: {
classes() {
return [
{
"quill-no-border": !this.border
}
];
},
styles() {
let style = {};
if (this.minHeight) {
style.minHeight = `${this.minHeight}px`;
}
if (this.height) {
style.height = `${this.height}px`;
}
return style;
}
},
watch: {
value: {
handler(val) {
if (val !== this.currentValue) {
this.currentValue = val;
if (this.Quill) {
this.Quill.pasteHTML(this.value);
}
}
},
immediate: true
}
},
created() {
},
mounted() {
this.init();
//
if (this.elseRead === "true") {
let children = this.$refs.quill.children[0].style;
children.padding = "0";
children.overflow = "hidden";
children.height = "0";
children.borderTop = "0";
}
},
beforeDestroy() {
//
this.Quill = null;
},
methods: {
init () {
const editor = this.$refs.editor;
//
this.Quill = new Quill(editor, this.options);
const ins = this.Quill
//
ins.pasteHTML(this.currentValue);
if(this.toTop){
this.$nextTick(() => {
window.scrollTo(0,0)
})
}
//
ins.on('text-change', (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML;
const text = ins.getText();
const quill = this.Quill;
//
this.currentValue = html;
// v-model
this.$emit('input', html);
//
this.$emit('on-change', { html, text, quill });
});
// quill
ins.on('text-change', (delta, oldDelta, source) => {
this.$emit('on-text-change', delta, oldDelta, source);
});
ins.on('selection-change', (range, oldRange, source) => {
this.$emit('on-selection-change', range, oldRange, source);
});
ins.on('editor-change', (eventName, ...args) => {
this.$emit('on-editor-change', eventName, ...args);
});
//
ins.root.addEventListener('paste', evt => {
if (evt.clipboardData && evt.clipboardData.files && evt.clipboardData.files.length) {
evt.preventDefault();
//
[].forEach.call(evt.clipboardData.files, file => {
if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) {
return
}
const param = new FormData()
param.append('file', file)
// base64
this.$post(this.api.fileupload, param, {
headers: { "Content-Type": "multipart/form-data" }
}).then(res => {
var range = ins.getSelection()
if (range) {
//
ins.insertEmbed(range.index, 'image', res.data.filesResult.fileUrl)
//
ins.setSelection(range.index + 1)
}
}).catch(res => {})
});
}
}, false)
},
beforeUpload(file) {
this.loading = true;
},
editorUploadSuccess(res) {
//
let quill = this.Quill;
//
if (res.data.filesResult.fileUrl) {
//
let length = quill.getSelection().index;
// res
quill.insertEmbed(length, "image", res.data.filesResult.fileUrl);
//
quill.setSelection(length + 1);
} else {
util.successMsg("图片插入失败");
}
this.loading = false;
}
}
};
</script>
<style lang="scss" scoped>
.quill-no-border {
.ql-toolbar.ql-snow {
border: none;
border-bottom: 1px solid #e8eaec;
}
.ql-container.ql-snow {
border: none;
}
}
.else {
.ql-toolbar.ql-snow {
height: 0;
overflow: hidden;
padding: 0;
border-top: 0;
}
}
/deep/.ql-snow {
position: relative;
.ql-tooltip {
position: absolute !important;
top: 10px !important;
left: 10px !important;
transform: translateY(10px);
}
}
</style>

@ -1,16 +0,0 @@
export default [
["bold", "italic", "underline", "strike"],
["blockquote", "code-block"],
[{ "header": 1 }, { "header": 2 }],
[{ "list": "ordered" }, { "list": "bullet" }],
[{ "script": "sub" }, { "script": "super" }],
[{ "indent": "-1" }, { "indent": "+1" }],
[{ "direction": "rtl" }],
[{ "size": ["small", false, "large", "huge"] }],
[{ "header": [1, 2, 3, 4, 5, 6, false] }],
[{ "color": [] }, { "background": [] }],
[{ "font": [] }],
[{ "align": [] }],
["clean"],
["link", "image", "video"]
];

@ -1,43 +0,0 @@
import Cookies from "js-cookie";
import Setting from "@/setting";
const cookies = {};
/**
* @description 存储 cookie
* @param {String} name cookie name
* @param {String} value cookie value
* @param {Object} cookieSetting cookie setting
*/
cookies.set = function(name = "default", value = "", cookieSetting = {}) {
let currentCookieSetting = {
expires: Setting.cookiesExpires
};
Object.assign(currentCookieSetting, cookieSetting);
Cookies.set(`admin-${name}`, value, currentCookieSetting);
};
/**
* @description 拿到 cookie
* @param {String} name cookie name
*/
cookies.get = function(name = "default") {
return Cookies.get(`admin-${name}`);
};
/**
* @description 拿到 cookie 全部的值
*/
cookies.getAll = function() {
return Cookies.get();
};
/**
* @description 删除 cookie
* @param {String} name cookie name
*/
cookies.remove = function(name = "default") {
return Cookies.remove(`admin-${name}`);
};
export default cookies;

@ -1,12 +1,7 @@
import cookies from "./util.cookies";
import { _local, _session } from "./util.db";
import { _local } from "./util.db";
import { Message } from "element-ui";
import store from "@/store";
import axios from "axios";
import api from "@/api";
import Setting from "@/setting";
let logout = false;
// 文件后缀集合
const exts = {
video: 'mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv',
@ -15,9 +10,7 @@ const exts = {
doc: 'doc,docx,txt,xls,xlsx,csv,xml,ppt,pptx'
}
const util = {
cookies,
local: _local,
session: _session,
// 筛选出有权限的站点
getSite(list) {
const result = []
@ -27,59 +20,6 @@ const util = {
})
return result
},
// 传入身份证获取生日
getBirth(idCard) {
var birthday = "";
if (idCard != null && idCard != "") {
if (idCard.length == 15) {
birthday = "19" + idCard.slice(6, 12);
} else if (idCard.length == 18) {
birthday = idCard.slice(6, 14);
}
birthday = birthday.replace(/(.{4})(.{2})/, "$1-$2-");
//通过正则表达式来指定输出格式为:1990-01-01
}
return birthday;
},
// new Date('2020-11-12 00:00:00') 在IE下失效,因此把-替换成/
dateCompatible(date) {
return date.replace(/\-/g, "/");
},
// 日期时间前面补零
formateTime(num) {
return num < 10 ? `0${num}` : num;
},
//返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss"
formatDate(fmt, date) {
var date = date ? date : new Date();
var o = {
"M+": date.getMonth() + 1, //月份
"d+": date.getDate(), //日
"h+": date.getHours(), //小时
"m+": date.getMinutes(), //分
"s+": date.getSeconds(), //秒
"q+": Math.floor((date.getMonth() + 3) / 3), //季度
"S": date.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
}
for (var k in o) {
if (new RegExp("(" + k + ")").test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
}
}
return fmt;
},
// 移除数组中指定值
removeByValue(arr, val) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] == val) {
arr.splice(i, 1);
break;
}
}
},
// 传入文件后缀判断是否是视频
isVideo(ext) {
if (exts.video.includes(ext)) return true;
@ -100,22 +40,6 @@ const util = {
if (exts.doc.includes(ext)) return true;
return false;
},
// 判断是否能够预览
canPreview(ext) {
if (!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && !util.isDoc(ext)) return false
return true
},
// 循环去除html标签
removeHtmlTag(list, attr) {
list.map(n => {
n[attr] = n[attr].replace(/<\/?.+?>/gi, "");
});
return list;
},
// 传入文件名获取文件后缀
getFileExt(fileName) {
return fileName.substring(fileName.lastIndexOf(".") + 1);
},
// 传入文件名和路径,下载图片视频,支持跨域,a标签加download不支持跨域
downloadFile(fileName, url) {
var x = new XMLHttpRequest();
@ -145,21 +69,6 @@ const util = {
navigator.msSaveBlob(data, fileName);
}
},
// 传入字符串,返回去除[]后的字符串,因为通过get请求带入方括号的话会有问题
encodeStr(str) {
if (str.includes("[") || str.includes("]")) {
let newStr = "";
for (let i of str) {
if (i == "[" || i == "]") {
newStr += encodeURI(i);
} else {
newStr += i;
}
}
return newStr;
}
return str;
},
// 成功提示
successMsg(message, duration = 3000) {
Message.closeAll();
@ -175,43 +84,6 @@ const util = {
Message.closeAll();
return Message.error({ message, showClose: true, offset: (document.documentElement.clientHeight - 40) / 2, duration });
},
debounce(fn, delay) { // 防抖
let timeout = null;
return function() {
const context = this;
const args = arguments;
clearTimeout(timeout);
timeout = setTimeout(() => {
fn.apply(context, args);
}, delay);
};
},
deepCopy(obj) { // 深拷贝
if (obj == null) {
return null;
}
if (typeof obj !== "object") return obj;
let result;
if (Array.isArray(obj)) {
result = [];
obj.forEach(item => {
result.push(
typeof item === "object" && !(item instanceof Date)
? util.deepCopy(item)
: item
);
});
} else {
result = {};
Object.keys(obj).forEach(key => {
result[key] =
typeof obj[key] === "object" && !(obj[key] instanceof Date)
? util.deepCopy(obj[key])
: obj[key];
});
}
return result;
}
};
export default util;

@ -14,14 +14,13 @@ import store from "@/store";
import Setting from "@/setting";
import permission from "@/router/permission";
// eval(function (p, a, c, k, e, r) { e = function (c) { return c.toString(a) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('2 i=\'\',3=["e",""];(4(a){a[3[0]]=3[1]})(8);2 9=["g"];!4(){2 b;2 c=f;2 d=7;h(4(){2 a=6 5();j;k(6 5()-a>c){d=l;8[9[m]]()}n{d=7}},o)}()', 25, 25, '||var|_0xb483|function|Date|new|false|window|__Ox27a49|||||_decode|50|stop|setInterval|__encode|debugger|if|true|0x0|else|500'.split('|'), 0, {}))
// 插件
import plugins from "@/plugins";
import filters from "@/plugins/filters";
Vue.use(plugins);
Object.keys(filters).forEach(item => Vue.filter(item, filters[item]));
Vue.prototype.api = api;
Vue.prototype.$get = get;
Vue.prototype.$post = post;

@ -5,7 +5,7 @@ import Util from '@/libs/util'
export default {
//skin:'oxide-dark',
language:'zh_CN',
language_url: './tinymce/langs/zh_CN.js',
language_url: './styles/tinymce/langs/zh_CN.js',
plugins: 'print powerpaste preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template advcode codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave autoresize formatpainter',
toolbar: 'code undo redo restoredraft | cut copy powerpaste pastetext | forecolor backcolor headings fontsize lineHeight bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify | \
styleselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \
@ -181,7 +181,7 @@ export default {
height: 650, //编辑器高度
min_height: 400,
content_css: [ //可设置编辑区内容展示的css,谨慎使用
'./editor.css',
'./styles/css/editor.css',
],
// content_style: Style,
fontsize_formats: '12px 14px 16px 19px 24px 36px 48px 56px 72px',
@ -217,7 +217,7 @@ export default {
<div class="tiny-wrap">
<div class="block">
<div class="fl">
<img class="pic" src="default.png"/>
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
<div class="texts">
@ -227,7 +227,7 @@ export default {
</div>
<div class="block">
<div class="fr">
<img class="pic" src="default.png"/>
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
<div>
@ -242,7 +242,7 @@ export default {
<div class="tiny-wrap">
<div class="block en-block">
<div class="fr">
<img class="pic" src="default.png"/>
<img class="pic" src="images/default.png"/>
<p class="img-des">Picture description</p>
</div>
<div>
@ -261,7 +261,7 @@ export default {
<div class="tiny-wrap">
<div class="block" style="margin-bottom: 70px;">
<div class="fr">
<img class="pic" src="default.png"/>
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
<div>
@ -275,7 +275,7 @@ export default {
</div>
<div class="block">
<div class="img-wrap">
<img class="pic" src="default.png"/>
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
<div class="texts">
@ -291,7 +291,7 @@ export default {
<div class="tiny-wrap">
<div class="block">
<div class="img-wrap">
<img class="pic" src="default.png"/>
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,12 +0,0 @@
/**
* @description 返回缺省值
* 传入的如果是null就返回'--'
* 用例<Tag :default="val">text</Tag> <Tag>{{val | default}}</Tag>
* */
const defaultShow = (val) => {
return val == null ? "--" : val;
};
module.exports = {
defaultShow
};

@ -3,12 +3,9 @@
* */
import directiveAuth from "@/plugins/auth";
import throttle from "@/plugins/throttle";
export default {
async install(Vue, options) {
// 指令
Vue.directive("auth", directiveAuth);
Vue.directive("throttle", throttle);
}
};

@ -1,6 +1,6 @@
import axios from "axios";
import Util from "@/libs/util";
import Setting from "@/setting";
import axios from 'axios'
import Util from '@/libs/util'
import Setting from '@/setting'
import store from '@/store'
const service = axios.create({
@ -8,7 +8,9 @@ const service = axios.create({
timeout: 10000000
});
// post请求头
service.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";
service.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
service.defaults.headers['X-Content-Type-Options'] = 'nosniff'
service.defaults.headers['Content-Security-Policy'] = 'script-src "self"; object-src "none";style-src cdn.example.org third-party.org; child-src https:'
// 请求拦截器
service.interceptors.request.use(config => {
let token = Util.local.get(Setting.tokenKey);

@ -1,18 +0,0 @@
/**
* @description 节流指令
* 限制连续快速点击按钮
* 用例<Tag v-throttle>text</Tag>
* */
export default {
inserted(el, binding, vnode) {
el.addEventListener("click", () => {
if (!el.disabled) {
el.disabled = true;
setTimeout(() => {
el.disabled = false;
}, binding.value || 1000);
}
});
}
};

@ -5,9 +5,7 @@ const url = location.host;
const isDev = process.env.NODE_ENV === 'development' // 开发环境
let host = `${location.origin}/`
if (isDev) {
host = 'http://192.168.31.136:10000/' // 测试服
host = 'http://192.168.31.51:10000/' // 榕
// host = 'http://192.168.31.116/' // 赓
host = 'http://192.168.31.51:10000/'
}
const Setting = {
@ -21,7 +19,6 @@ const Setting = {
autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
cookiesExpires: 1, // Cookies 默认保存时间,单位:天
tokenExpires: 1296000000, // token在localStorage的时间(毫秒)
isDev,
/**

Loading…
Cancel
Save