diff --git a/zyplayer-doc-data/src/main/java/com/zyplayer/doc/data/utils/DruidDataSourceUtil.java b/zyplayer-doc-data/src/main/java/com/zyplayer/doc/data/utils/DruidDataSourceUtil.java
index 441868e7..119ac075 100644
--- a/zyplayer-doc-data/src/main/java/com/zyplayer/doc/data/utils/DruidDataSourceUtil.java
+++ b/zyplayer-doc-data/src/main/java/com/zyplayer/doc/data/utils/DruidDataSourceUtil.java
@@ -4,7 +4,6 @@ import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.zyplayer.doc.core.exception.ConfirmException;
-import java.sql.SQLException;
import java.util.concurrent.atomic.AtomicLong;
public class DruidDataSourceUtil {
@@ -31,7 +30,8 @@ public class DruidDataSourceUtil {
// 重试3次,失败退出,源码里是errorCount > connectionErrorRetryAttempts,所以写成2就是3次、、、
// CreateConnectionThread 源码在这个类里面
dataSource.setConnectionErrorRetryAttempts(2);
- dataSource.setBreakAfterAcquireFailure(true);
+ dataSource.setBreakAfterAcquireFailure(false);// 连接出错后不退出,等待下个定时周期重试
+ dataSource.setTimeBetweenConnectErrorMillis(180000);// 连接出错后重试时间间隔3分钟
dataSource.setName("zyplayer-doc-db-" + nameId.incrementAndGet());
if (url.contains("oracle")) {
dataSource.setValidationQuery("select 1 from dual");
diff --git a/zyplayer-doc-ui/wiki-ui/package-lock.json b/zyplayer-doc-ui/wiki-ui/package-lock.json
index 01ecad7f..5eba9c45 100644
--- a/zyplayer-doc-ui/wiki-ui/package-lock.json
+++ b/zyplayer-doc-ui/wiki-ui/package-lock.json
@@ -6450,6 +6450,11 @@
}
}
},
+ "jquery": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npm.taobao.org/jquery/download/jquery-3.5.1.tgz",
+ "integrity": "sha1-17TQjhv9uGrS8aPQOeoXMEcXq7U="
+ },
"js-cookie": {
"version": "2.2.1",
"resolved": "https://registry.npm.taobao.org/js-cookie/download/js-cookie-2.2.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-cookie%2Fdownload%2Fjs-cookie-2.2.1.tgz",
diff --git a/zyplayer-doc-ui/wiki-ui/package.json b/zyplayer-doc-ui/wiki-ui/package.json
index e81a90e6..e1c600cf 100644
--- a/zyplayer-doc-ui/wiki-ui/package.json
+++ b/zyplayer-doc-ui/wiki-ui/package.json
@@ -10,15 +10,16 @@
"axios": "^0.19.0",
"core-js": "^3.3.2",
"echarts": "^4.5.0",
+ "element-ui": "^2.10.0",
+ "jquery": "^3.5.1",
"js-cookie": "^2.2.1",
"pouchdb": "^7.1.1",
+ "sql-formatter": "^2.3.3",
"vue": "^2.6.10",
"vue-axios": "^2.1.5",
"vue-hljs": "^1.1.2",
"vue-router": "^3.1.3",
"vuex": "^3.1.2",
- "element-ui": "^2.10.0",
- "sql-formatter": "^2.3.3",
"wangeditor": "^3.1.1"
},
"devDependencies": {
diff --git a/zyplayer-doc-ui/wiki-ui/src/App.vue b/zyplayer-doc-ui/wiki-ui/src/App.vue
index 8b8c4ef7..d2da87c0 100644
--- a/zyplayer-doc-ui/wiki-ui/src/App.vue
+++ b/zyplayer-doc-ui/wiki-ui/src/App.vue
@@ -1,461 +1,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 创建文档
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 控制台
- 关于
- 我的资料
- 退出登录
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 公共空间
- 属于公共,登录用户可访问、编辑
-
-
- 个人空间
- 属于个人,所有登录用户可访问
-
-
- 隐私空间
- 属于个人,仅创建者可访问
-
-
-
-
- 保存修改
- 立即创建
- 取消
-
-
-
-
-
-
-
-
-
-
-
- {{scope.row.name}}
- 暂未开放
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
-
-
-
- zyplayer-doc
-
-
- 暮光:城中城
-
-
- {{upgradeInfo.nowVersion}}
- {{upgradeInfo.lastVersion}}
-
- {{upgradeInfo.upgradeUrl}}
-
- {{upgradeInfo.upgradeContent}}
-
-
- 欢迎加群讨论,QQ群号:466363173,欢迎提交需求,欢迎使用和加入开发!
-
-
-
-
+
+
+
diff --git a/zyplayer-doc-ui/wiki-ui/src/common/lib/common.js b/zyplayer-doc-ui/wiki-ui/src/common/lib/common.js
index 95254514..cb0685fa 100644
--- a/zyplayer-doc-ui/wiki-ui/src/common/lib/common.js
+++ b/zyplayer-doc-ui/wiki-ui/src/common/lib/common.js
@@ -23,7 +23,7 @@ export default {
} else if (res.data.errCode == 400) {
vue.$message('请先登录');
var href = encodeURIComponent(window.location.href);
- window.location = apimix.apilist1.HOST + "#/user/login?redirect=" + href;
+ window.location = process.env.VUE_APP_BASE_API + "#/user/login?redirect=" + href;
} else if (res.data.errCode == 402) {
vue.$router.push("/common/noAuth");
} else if (res.data.errCode !== 200) {
diff --git a/zyplayer-doc-ui/wiki-ui/src/components/editor/MgEditor.vue b/zyplayer-doc-ui/wiki-ui/src/components/editor/MgEditor.vue
new file mode 100644
index 00000000..8ff70363
--- /dev/null
+++ b/zyplayer-doc-ui/wiki-ui/src/components/editor/MgEditor.vue
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/zyplayer-doc-ui/wiki-ui/src/components/editor/css/MgEditor.css b/zyplayer-doc-ui/wiki-ui/src/components/editor/css/MgEditor.css
new file mode 100644
index 00000000..910240fd
--- /dev/null
+++ b/zyplayer-doc-ui/wiki-ui/src/components/editor/css/MgEditor.css
@@ -0,0 +1,147 @@
+
+.mg-editor {
+ padding: 10px;
+ height: 500px;
+ width: 100%;
+ font-size: 16px;
+ box-sizing: border-box;
+}
+
+.mg-editor:focus {
+ outline: none;
+}
+
+.mg-editor:empty::before {
+ content: attr(placeholder);
+ font-size: 14px;
+ color: #ccc;
+ line-height: 20px;
+ padding-top: 10px;
+}
+
+.mg-editor-toolbar {
+ position: fixed;
+ top: 0;
+ left: 0;
+ display: none;
+ z-index: 1;
+ padding: 5px 6px;
+ background-color: #fff;
+ border-radius: 4px;
+ border: 1px solid #dee0e3;
+ user-select: none;
+ box-shadow: 0 6px 24px 0 rgba(31, 35, 41, .1);
+}
+
+.mg-editor-toolbar .iconfont {
+ padding: 5px;
+ font-size: 24px;
+ cursor: pointer;
+}
+
+
+.mg-editor .list-code {
+ font-size: 14px !important;
+ line-height: 1.68 !important
+}
+
+.mg-editor .list-code code {
+ border: 1px solid #dee0e3;
+ display: block;
+ background-color: #f5f6f7;
+ line-height: 1.5;
+ padding: 6px 8px 3px 45px;
+ font-size: 14px;
+ word-break: break-word;
+ margin: 5px 0;
+}
+
+.mg-editor .list-code code .list-code-span {
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+ line-height: 1.5;
+}
+
+.mg-editor .list-code code:before {
+ content: attr(start);
+ display: inline-block;
+ font-size: 14px;
+ text-align: right;
+ direction: rtl;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+ overflow: visible;
+ white-space: nowrap;
+ width: 0;
+ margin-left: -11px;
+ padding-right: 11px;
+ font-weight: 400;
+ background-color: transparent;
+ line-height: 1.5;
+ color: #8f959e;
+ vertical-align: bottom;
+}
+
+.mg-editor .list-code code + code {
+ border-top: none;
+ margin-top: -9px;
+}
+
+.mg-editor .ace-editor .list-code code:before {
+ left: 4px;
+}
+
+/*Hn样式-S-*/
+/*我很懒,样式都是抄的*/
+.mg-editor .head-h1, .mg-editor .head-h2, .mg-editor .head-h3, .mg-editor .head-h4, .mg-editor .head-h5, .mg-editor .head-h6, .mg-editor .head-h7, .mg-editor .head-h8, .mg-editor .head-h9 {
+ font-weight: 600;
+ letter-spacing: .02em;
+ line-height: 1.65
+}
+
+.mg-editor .head-h1 {
+ font-size: 26px;
+ margin-bottom: 10px
+}
+
+.mg-editor .head-h1 .collapsable-section-handle {
+ font-size: 26px
+}
+
+.mg-editor .head-h2 {
+ font-size: 22px;
+ margin-bottom: 8px
+}
+
+.mg-editor .head-h2 .collapsable-section-handle {
+ font-size: 22px
+}
+
+.mg-editor .head-h3 {
+ font-size: 20px;
+ margin-bottom: 8px
+}
+
+.mg-editor .head-h3 .collapsable-section-handle {
+ font-size: 20px
+}
+
+.mg-editor .head-h4 {
+ font-size: 18px;
+ margin-bottom: 8px
+}
+
+.mg-editor .head-h4 .collapsable-section-handle {
+ font-size: 18px
+}
+
+.mg-editor .head-h5,.mg-editor .head-h6,.mg-editor .head-h7,.mg-editor .head-h8,.mg-editor .head-h9 {
+ font-size: 16px;
+ margin-bottom: 6px
+}
+
+.mg-editor .head-h5 .collapsable-section-handle,.mg-editor .head-h6 .collapsable-section-handle,.mg-editor .head-h7 .collapsable-section-handle,.mg-editor .head-h8 .collapsable-section-handle,.mg-editor .head-h9 .collapsable-section-handle {
+ font-size: 16px
+}
+
+/*Hn样式-E-*/
diff --git a/zyplayer-doc-ui/wiki-ui/src/components/editor/css/MgEditorIconfont.css b/zyplayer-doc-ui/wiki-ui/src/components/editor/css/MgEditorIconfont.css
new file mode 100644
index 00000000..d20e0fe5
--- /dev/null
+++ b/zyplayer-doc-ui/wiki-ui/src/components/editor/css/MgEditorIconfont.css
@@ -0,0 +1,117 @@
+@font-face {
+ font-family: "iconfont";
+ src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAzgAAsAAAAAHHgAAAyQAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFVgqnIJ81ATYCJANsCzgABCAFhG0HghUbihcz0s3RqnZk/9UBbxjPvImD1hEhmkgkcf1tFr58DJK1y3Mn5uYUPc7dBMPgkn3/52pKMQiOfR8PPJf7d7vBk8M4oDYlFCVwL1rTIpiigR51PM3Zz9pbiygWQxZJ0JKlmoNgUk8qGiqBmgaqyxl2dx8LUkWqocL9ijqcuBMAg3Nl8uN248ADoBoq1HREr0aSsJFLLD1i+8xqxHXyQWB4LfKg72vTFCg0zB6mUDlvT/bSbvg2n646hf5v7X919osKMHj7ISGJZ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ItG2jY9XaEZus0SHFG4hKSbpXEF9hrOhuZE1cV3O5oSJ+yvohUQnrBxdhuLelp4sz8K83TzZW2qbcS0r5/Ggih7NuYl7e+7VhIyuElA8Nmwf3PwBA1OC9Kjo7uqphpNmo0iXj72ca8Cst4/HLZE/Cbzt60cg049cWsAhDpt7WjAS8ekH417Sdiz+po/32OhyIv+Wfmq10/Mrw/46t99Y/WbzykeDfiwEcoKv90tI8pyEnRuQ3kKO/P1X3XNUArYC64wDAxW0BBsO2Gnjv+Bx6byXjTE7rUhxoMFECGBAkMjqBUsCDSBEwkEE5iIf8M/OghZVAAEayAGCDl1oUAxUcpjgo4AIlQAX3JDL6XUpBEHxLEagwgnIwCdOeJw8xmDSNrzG0wClzUclS55OgjBdDfiEcquZNQ5X9gYfURa0Xq2KfPTqwxAmGY9iIeOWZmtq1rgy1kuqZMqwsoki/XS697gYWltpofI2hBU6ZS1YxWer8imVcev9fCIeq2TLBccU/8JB2XK0XKw9pb3deEzyW4Ydj2EggvEpHZ2pqFwjUuCepXn+oDCuLWKN7v10GM/K+9mL/jvZ6bALV6HliDeAoNAaLwxOIJDKFSqOjRoMWHXqCCCaEUMIwYBQybhKyJs+kIy/klbyRd/Ix7CeaQ+zA9+mpKgRPRttiqRJPqvYNV9Mgs0OX28+jjbDF0Pm2dYCu3DZiPB06ExudAhNdU+gsOgE/9S+gwsvYVLLl/0CC+yRVPjvWW5z2iDJOXa1tLDnMV8pevCMAAAA=') format('woff2'); /* iOS 4.1- */
+}
+
+.iconfont {
+ font-family: "iconfont" !important;
+ font-size: 16px;
+ font-style: normal;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-h2:before {
+ content: "\e503";
+}
+
+.icon-h1:before {
+ content: "\e504";
+}
+
+.icon-h3:before {
+ content: "\e505";
+}
+
+.icon-hn:before {
+ content: "\e506";
+}
+
+.icon-h4:before {
+ content: "\e507";
+}
+
+.icon-h5:before {
+ content: "\e508";
+}
+
+.icon-h6:before {
+ content: "\e509";
+}
+
+.icon-h7:before {
+ content: "\e50b";
+}
+
+.icon-h8:before {
+ content: "\e50c";
+}
+
+.icon-h9:before {
+ content: "\e50d";
+}
+
+.icon-border:before {
+ content: "\e50e";
+}
+
+.icon-delete:before {
+ content: "\e50f";
+}
+
+.icon-backcolor:before {
+ content: "\e510";
+}
+
+.icon-orderedlist:before {
+ content: "\e511";
+}
+
+.icon-unorderedlist:before {
+ content: "\e512";
+}
+
+.icon-checkbox:before {
+ content: "\e513";
+}
+
+.icon-link:before {
+ content: "\e514";
+}
+
+.icon-more:before {
+ content: "\e515";
+}
+
+.icon-underline:before {
+ content: "\e516";
+}
+
+.icon-aligncenter:before {
+ content: "\e517";
+}
+
+.icon-alignleft:before {
+ content: "\e518";
+}
+
+.icon-blockquote:before {
+ content: "\e519";
+}
+
+.icon-italic:before {
+ content: "\e51a";
+}
+
+.icon-alignright:before {
+ content: "\e51b";
+}
+
+.icon-inlinecode:before {
+ content: "\e51c";
+}
+
+.icon-inlinecodelist:before {
+ content: "\e51d";
+}
+
diff --git a/zyplayer-doc-ui/wiki-ui/src/components/editor/toolbar/common.js b/zyplayer-doc-ui/wiki-ui/src/components/editor/toolbar/common.js
new file mode 100644
index 00000000..9f63acb3
--- /dev/null
+++ b/zyplayer-doc-ui/wiki-ui/src/components/editor/toolbar/common.js
@@ -0,0 +1,19 @@
+export default {
+ getSelectionContainer(judgeRoot) {
+ let container = window.getSelection().getRangeAt(0).commonAncestorContainer;
+ if (container.nodeType != 1) {
+ container = container.parentNode;
+ }
+ if (container.nodeType != 1 || (judgeRoot && this.isRootBox(container))) {
+ return null;
+ }
+ return container;
+ },
+ isRootBox(container) {
+ return this.domHaveClass(container, "mg-editor");
+ },
+ domHaveClass(container, cls) {
+ return container && container.classList && container.classList.contains(cls);
+ },
+}
+
diff --git a/zyplayer-doc-ui/wiki-ui/src/components/editor/toolbar/hn.js b/zyplayer-doc-ui/wiki-ui/src/components/editor/toolbar/hn.js
new file mode 100644
index 00000000..6ef9e619
--- /dev/null
+++ b/zyplayer-doc-ui/wiki-ui/src/components/editor/toolbar/hn.js
@@ -0,0 +1,20 @@
+import toolbarCommon from './common';
+
+const $ = require("jquery");
+
+export default {
+ toolbarHn(hn) {
+ // 找到内容,生成div把每一行包住
+ let container = toolbarCommon.getSelectionContainer(true);
+ if (container == null) return;
+ let innerTextArr = container.innerText.split("\n");
+ if (innerTextArr.length >= 1) {
+ innerTextArr.filter(item => !!item).forEach(item => {
+ $(container).before(`
${item}
`);
+ });
+ }
+ // 最后把当前行移出掉
+ container.remove();
+ }
+}
+
diff --git a/zyplayer-doc-ui/wiki-ui/src/components/editor/toolbar/inlineCodeList.js b/zyplayer-doc-ui/wiki-ui/src/components/editor/toolbar/inlineCodeList.js
new file mode 100644
index 00000000..94ac036f
--- /dev/null
+++ b/zyplayer-doc-ui/wiki-ui/src/components/editor/toolbar/inlineCodeList.js
@@ -0,0 +1,36 @@
+import toolbarCommon from './common';
+import utilBase from '../util/util';
+
+const $ = require("jquery");
+
+export default {
+ createCodeListBlock() {
+ let containerNow = window.getSelection().getRangeAt(0).commonAncestorContainer;
+ let divEle = this.findRootDomOnNotCode(containerNow);
+ if (divEle == null) return;
+ divEle.classList.add("list-code");
+ let codeEle = $(``)[0];
+ $(divEle).append(codeEle);
+ // 光标放到代码框里
+ utilBase.moveSelectionRange(codeEle, 0, 0);
+ },
+ findRootDomOnNotCode(container) {
+ container = container.nodeType == 3 ? container.parentNode : container;
+ // 如果自己是root,创建一个div放最后
+ if (toolbarCommon.isRootBox(container)) {
+ let lastEle = document.createElement("div");
+ container.appendChild(lastEle);
+ return lastEle;
+ }
+ // 如果父元素是root,添加一个新的div,再把自己移除
+ let parentNode = container.parentNode;
+ if (toolbarCommon.isRootBox(parentNode)) {
+ let lastEle = document.createElement("div");
+ parentNode.insertBefore(lastEle, container);
+ container.remove();
+ return lastEle;
+ }
+ // 在非根结点里面输入```无效
+ return null;
+ },
+}
diff --git a/zyplayer-doc-ui/wiki-ui/src/components/editor/util/MgEditor.js.vue.old b/zyplayer-doc-ui/wiki-ui/src/components/editor/util/MgEditor.js.vue.old
new file mode 100644
index 00000000..d4e076c6
--- /dev/null
+++ b/zyplayer-doc-ui/wiki-ui/src/components/editor/util/MgEditor.js.vue.old
@@ -0,0 +1,258 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/zyplayer-doc-ui/wiki-ui/src/components/editor/util/past.js b/zyplayer-doc-ui/wiki-ui/src/components/editor/util/past.js
new file mode 100644
index 00000000..37d39d2c
--- /dev/null
+++ b/zyplayer-doc-ui/wiki-ui/src/components/editor/util/past.js
@@ -0,0 +1,87 @@
+/**
+ * 本文件内容拷贝自:https://github.com/wangfupeng1988/wangEditor
+ * zyplayer-doc在此基础上有稍作修改
+ */
+
+import utilBase from './util'
+
+export default {
+ // 获取粘贴的纯文本
+ getPasteText(e) {
+ const clipboardData = e.clipboardData || (e.originalEvent && e.originalEvent.clipboardData);
+ let pasteText;
+ if (clipboardData == null) {
+ pasteText = window.clipboardData && window.clipboardData.getData('text');
+ } else {
+ pasteText = clipboardData.getData('text/plain');
+ }
+ let resultStr = '';
+ let htmlStr = utilBase.replaceHtmlSymbol(pasteText);
+ htmlStr.split('
').forEach(item => {
+ if (resultStr) resultStr += '
';
+ resultStr += item.trim();
+ });
+ return resultStr;
+ },
+ // 获取粘贴的html
+ getPasteHtml(e, filterStyle, ignoreImg) {
+ const clipboardData = e.clipboardData || (e.originalEvent && e.originalEvent.clipboardData);
+ let pasteText, pasteHtml;
+ if (clipboardData == null) {
+ pasteText = window.clipboardData && window.clipboardData.getData('text');
+ } else {
+ pasteText = clipboardData.getData('text/plain');
+ pasteHtml = clipboardData.getData('text/html');
+ }
+ if (!pasteHtml && pasteText) {
+ pasteHtml = utilBase.replaceHtmlSymbol(pasteText);
+ }
+ if (!pasteHtml) {
+ return;
+ }
+ // 过滤word中状态过来的无用字符
+ const docSplitHtml = pasteHtml.split('