diff --git a/README.md b/README.md
index 4bff716..daf60e3 100644
--- a/README.md
+++ b/README.md
@@ -167,18 +167,23 @@ www 系统部署目录(或者子目录)
Composer (用于管理第三方扩展包)
~~~
+三、演示地址
+
+ 勾股OA演示地址:https://oa.gougucms.com
+
+ 登录账号及密码:
+~~~
+ BOSS角色:suhaizhen 123456
+ 人事总监:fengcailing 123456
+ 财务总监:yucixin 123456
+ 市场总监:qinjiaxian 123456
+ 技术总监:yexiaochai 123456
+~~~
+PS:为了给后面的人提供良好的演示体验,体验以查看为主,如果确实需要填写数据,大家最好填些看似正常的数据,请不要乱填数据,比如:1111,aaa那些数据就不要乱来了。如果大家不遵守,后期发现很多乱的数据的话,就关闭对应的填写权限了。
+
三、系统安装
-**方式一:完整包安装**
-
- 第一步:前往官网下载页面 (https://oa.gougucms.com) 下载完整包解压到你的项目目录
-
- 第二步:添加虚拟主机并绑定到项目的public目录
-
- 第三步:访问 http://www.yoursite.com/install/index 进行安装
-
-
-**方式二:命令行安装(推荐)**
+**命令行安装(推荐)**
推荐使用命令行安装,因为采用命令行安装的方式可以和勾股CMS随时保持更新同步。使用命令行安装请提前准备好Git、Composer。
@@ -248,5 +253,6 @@ composer install
勾股OA遵循GPL-2.0开源协议发布,并支持免费使用。
### 开源助力
+目前勾股OA版本在公测中,如果大家在体验的过程中发现有问题或者BUG,请到Issue里面反馈,谢谢!
如果觉得勾股OA不错,不要吝啬您的赞许和鼓励,请给我们⭐ STAR ⭐吧!
diff --git a/app/home/controller/Admin.php b/app/home/controller/Admin.php
index b8e121b..417800d 100644
--- a/app/home/controller/Admin.php
+++ b/app/home/controller/Admin.php
@@ -245,15 +245,15 @@ class Admin extends BaseController
}
$new_pwd = set_salt(6);
$salt = set_salt(20);
- $list = [
+ $data = [
'reg_pwd' => $new_pwd,
'salt' => $salt,
'pwd' => set_password($new_pwd, $salt),
'id' => $id,
'update_time' => time(),
];
- if (Db::name('Admin')->update($list) !== false) {
- add_log('reset_psw', $id);
+ if (Db::name('Admin')->update($data) !== false) {
+ add_log('reset', $id);
return to_assign(0, '操作成功');
} else {
return to_assign(1, '操作失败');
diff --git a/app/home/controller/Api.php b/app/home/controller/Api.php
index f03349a..9448327 100644
--- a/app/home/controller/Api.php
+++ b/app/home/controller/Api.php
@@ -260,10 +260,14 @@ class Api extends BaseController
}
$salt = set_salt(20);
- $param['pwd'] = set_password($param['pwd'], $salt);
- $param['reg_pwd'] = '';
- $param['update_time'] = time();
- Db::name('Admin')->where(['id' => $uid])->strict(false)->field(true)->update($param);
+ $new_pwd = set_password($param['pwd'], $salt);
+ $data = [
+ 'reg_pwd' => '',
+ 'salt' => $salt,
+ 'pwd' => $new_pwd,
+ 'update_time' => time(),
+ ];
+ Db::name('Admin')->where(['id' => $uid])->strict(false)->field(true)->update($data);
$session_admin = get_config('app.session_admin');
Session::set($session_admin, Db::name('admin')->find($uid));
return to_assign();
diff --git a/app/home/view/admin/edit_password.html b/app/home/view/admin/edit_password.html
index e66d710..26619d2 100644
--- a/app/home/view/admin/edit_password.html
+++ b/app/home/view/admin/edit_password.html
@@ -49,11 +49,18 @@
data: data.field,
success: function (e) {
if (e.code == 0) {
- layer.msg('修改密码成功');
- setTimeout(function () {
- TAB.sonDelete();
- layer.close(index);
- }, 1000)
+ layer.msg('修改密码成功,使用新密码登录');
+ //注销
+ $.ajax({
+ url: "/home/login/login_out.html",
+ success: function (e) {
+ if (e.code == 0) {
+ setTimeout(function () {
+ parent.location.href = "/home/login/index.html"
+ }, 2000)
+ }
+ }
+ })
} else {
layer.msg(e.msg);
}
diff --git a/app/home/view/admin/index.html b/app/home/view/admin/index.html
index 6cf6a4b..8c7ab65 100644
--- a/app/home/view/admin/index.html
+++ b/app/home/view/admin/index.html
@@ -62,6 +62,7 @@
{block name="script"}
+
+{/block}
{block name="body"}
@@ -36,7 +46,7 @@
{/notempty}
文章内容 |
- {$detail.content|raw} |
+ {$detail.content|raw} |
@@ -47,7 +57,25 @@
{block name="script"}
diff --git a/public/static/ueditor/third-party/SyntaxHighlighter/prism.css b/public/static/ueditor/third-party/SyntaxHighlighter/prism.css
new file mode 100644
index 0000000..498e255
--- /dev/null
+++ b/public/static/ueditor/third-party/SyntaxHighlighter/prism.css
@@ -0,0 +1,232 @@
+/* PrismJS 1.24.1
+https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+java+markup-templating+php+python+sql&plugins=line-numbers+toolbar+copy-to-clipboard */
+/**
+ * okaidia theme for JavaScript, CSS and HTML
+ * Loosely based on Monokai textmate theme by http://www.monokai.nl/
+ * @author ocodia
+ */
+
+code[class*="language-"],
+pre[class*="language-"] {
+ color: #f8f8f2;
+ background: none;
+ text-shadow: 0 1px rgba(0, 0, 0, 0.3);
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+ font-size: 1em;
+ text-align: left;
+ white-space: pre;
+ word-spacing: normal;
+ word-break: normal;
+ word-wrap: normal;
+ line-height: 1.5;
+
+ -moz-tab-size: 4;
+ -o-tab-size: 4;
+ tab-size: 4;
+
+ -webkit-hyphens: none;
+ -moz-hyphens: none;
+ -ms-hyphens: none;
+ hyphens: none;
+}
+
+/* Code blocks */
+pre[class*="language-"] {
+ padding: 1em;
+ margin: .5em 0;
+ overflow: auto;
+ border-radius: 0.3em;
+}
+
+:not(pre) > code[class*="language-"],
+pre[class*="language-"] {
+ background: #272822;
+}
+
+/* Inline code */
+:not(pre) > code[class*="language-"] {
+ padding: .1em;
+ border-radius: .3em;
+ white-space: normal;
+}
+
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+ color: #8292a2;
+}
+
+.token.punctuation {
+ color: #f8f8f2;
+}
+
+.token.namespace {
+ opacity: .7;
+}
+
+.token.property,
+.token.tag,
+.token.constant,
+.token.symbol,
+.token.deleted {
+ color: #f92672;
+}
+
+.token.boolean,
+.token.number {
+ color: #ae81ff;
+}
+
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+ color: #a6e22e;
+}
+
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string,
+.token.variable {
+ color: #f8f8f2;
+}
+
+.token.atrule,
+.token.attr-value,
+.token.function,
+.token.class-name {
+ color: #e6db74;
+}
+
+.token.keyword {
+ color: #66d9ef;
+}
+
+.token.regex,
+.token.important {
+ color: #fd971f;
+}
+
+.token.important,
+.token.bold {
+ font-weight: bold;
+}
+.token.italic {
+ font-style: italic;
+}
+
+.token.entity {
+ cursor: help;
+}
+
+pre[class*="language-"].line-numbers {
+ position: relative;
+ padding-left: 3.8em;
+ counter-reset: linenumber;
+}
+
+pre[class*="language-"].line-numbers > code {
+ position: relative;
+ white-space: inherit;
+}
+
+.line-numbers .line-numbers-rows {
+ position: absolute;
+ pointer-events: none;
+ top: 0;
+ font-size: 100%;
+ left: -3.8em;
+ width: 3em; /* works for line-numbers below 1000 lines */
+ letter-spacing: -1px;
+ border-right: 1px solid #999;
+
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+
+}
+
+ .line-numbers-rows > span {
+ display: block;
+ counter-increment: linenumber;
+ }
+
+ .line-numbers-rows > span:before {
+ content: counter(linenumber);
+ color: #999;
+ display: block;
+ padding-right: 0.8em;
+ text-align: right;
+ }
+
+div.code-toolbar {
+ position: relative;
+}
+
+div.code-toolbar > .toolbar {
+ position: absolute;
+ top: .3em;
+ right: .2em;
+ transition: opacity 0.3s ease-in-out;
+ opacity: 0;
+}
+
+div.code-toolbar:hover > .toolbar {
+ opacity: 1;
+}
+
+/* Separate line b/c rules are thrown out if selector is invalid.
+ IE11 and old Edge versions don't support :focus-within. */
+div.code-toolbar:focus-within > .toolbar {
+ opacity: 1;
+}
+
+div.code-toolbar > .toolbar > .toolbar-item {
+ display: inline-block;
+}
+
+div.code-toolbar > .toolbar > .toolbar-item > a {
+ cursor: pointer;
+}
+
+div.code-toolbar > .toolbar > .toolbar-item > button {
+ background: none;
+ border: 0;
+ color: inherit;
+ font: inherit;
+ line-height: normal;
+ overflow: visible;
+ padding: 0;
+ -webkit-user-select: none; /* for button */
+ -moz-user-select: none;
+ -ms-user-select: none;
+}
+
+div.code-toolbar > .toolbar > .toolbar-item > a,
+div.code-toolbar > .toolbar > .toolbar-item > button,
+div.code-toolbar > .toolbar > .toolbar-item > span {
+ color: #bbb;
+ font-size: .8em;
+ padding: 0 .5em;
+ background: #f5f2f0;
+ background: rgba(224, 224, 224, 0.2);
+ box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);
+ border-radius: .5em;
+}
+
+div.code-toolbar > .toolbar > .toolbar-item > a:hover,
+div.code-toolbar > .toolbar > .toolbar-item > a:focus,
+div.code-toolbar > .toolbar > .toolbar-item > button:hover,
+div.code-toolbar > .toolbar > .toolbar-item > button:focus,
+div.code-toolbar > .toolbar > .toolbar-item > span:hover,
+div.code-toolbar > .toolbar > .toolbar-item > span:focus {
+ color: inherit;
+ text-decoration: none;
+}
+
diff --git a/public/static/ueditor/third-party/SyntaxHighlighter/prism.js b/public/static/ueditor/third-party/SyntaxHighlighter/prism.js
new file mode 100644
index 0000000..00c9f54
--- /dev/null
+++ b/public/static/ueditor/third-party/SyntaxHighlighter/prism.js
@@ -0,0 +1,15 @@
+/* PrismJS 1.24.1
+https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+java+markup-templating+php+python+sql&plugins=line-numbers+toolbar+copy-to-clipboard */
+var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f)))break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(P