diff --git a/app/service/affiche.js b/app/service/affiche.js new file mode 100644 index 0000000..63f40b9 --- /dev/null +++ b/app/service/affiche.js @@ -0,0 +1,62 @@ +const Service = require('egg').Service; +const validateUtil = require('@jianghujs/jianghu/app/common/validateUtil'); +const { BizError, errorInfoEnum } = require('../constant/error'); +const _ = require('lodash'); +const idGenerateUtil = require("@jianghujs/jianghu/app/common/idGenerateUtil"); +const dayjs = require('dayjs') + +class NoticeService extends Service { + + async insertAffiche() { + const { jianghuKnex } = this.app; + const { actionData } = this.ctx.request.body.appData; + const { afficheId, afficheMemberIdList, afficheStatus } = actionData + + let noticeInsertData = null + + if (afficheStatus === "已发送") { + // TODO:待完善 + noticeInsertData = { + noticeId: await idGenerateUtil.uuid(), + noticeName: "通知-公告-" + afficheId, + noticeContent: afficheMemberIdList, + pushContent: '{}', + pushStatus: "success", + pushAt: dayjs().format("YYYY-MM-DD HH:mm:ss") + } + } + + await jianghuKnex.transaction(async trx => { + await trx("affiche", this.ctx).jhInsert(actionData); + + if (noticeInsertData) await trx("notice_push", this.ctx).jhInsert(noticeInsertData); + }) + } + async updateAffiche() { + const { jianghuKnex } = this.app; + const { actionData } = this.ctx.request.body.appData; + const { afficheId, afficheMemberIdList, afficheStatus } = actionData + + let noticeInsertData = null + + if (afficheStatus === "已发送") { + // TODO:待完善 + noticeInsertData = { + noticeId: await idGenerateUtil.uuid(), + noticeName: "通知-公告-" + afficheId, + noticeContent: afficheMemberIdList, + pushContent: '{}', + pushStatus: "success", + pushAt: dayjs().format("YYYY-MM-DD HH:mm:ss") + } + } + + console.log('appData_+_+_+_+', actionData); + await jianghuKnex.transaction(async trx => { + await trx("affiche", this.ctx).jhUpdate(actionData); + if (noticeInsertData) await trx("notice_push", this.ctx).jhInsert(noticeInsertData); + }) + } +} + +module.exports = NoticeService; \ No newline at end of file diff --git a/app/view/component/articleViewer/jianghuCommonCss.html b/app/view/component/articleViewer/jianghuCommonCss.html new file mode 100644 index 0000000..7699737 --- /dev/null +++ b/app/view/component/articleViewer/jianghuCommonCss.html @@ -0,0 +1,1088 @@ + \ No newline at end of file diff --git a/app/view/component/articleViewer/jianghuDocCss.html b/app/view/component/articleViewer/jianghuDocCss.html new file mode 100644 index 0000000..3b6205a --- /dev/null +++ b/app/view/component/articleViewer/jianghuDocCss.html @@ -0,0 +1,336 @@ + \ No newline at end of file diff --git a/app/view/component/articleViewer/jianghuDocDocsCss.html b/app/view/component/articleViewer/jianghuDocDocsCss.html new file mode 100644 index 0000000..94be82d --- /dev/null +++ b/app/view/component/articleViewer/jianghuDocDocsCss.html @@ -0,0 +1,286 @@ + + + diff --git a/app/view/component/articleViewer/jianghuJs.html b/app/view/component/articleViewer/jianghuJs.html new file mode 100644 index 0000000..ccbd759 --- /dev/null +++ b/app/view/component/articleViewer/jianghuJs.html @@ -0,0 +1,197 @@ + + + + + + + + + + + + diff --git a/app/view/component/articleViewer/jianghuUiCss.html b/app/view/component/articleViewer/jianghuUiCss.html new file mode 100644 index 0000000..e3b2517 --- /dev/null +++ b/app/view/component/articleViewer/jianghuUiCss.html @@ -0,0 +1,289 @@ + \ No newline at end of file diff --git a/app/view/component/markdown2html/articleMarkdownEngine.html b/app/view/component/markdown2html/articleMarkdownEngine.html new file mode 100644 index 0000000..0ac79e0 --- /dev/null +++ b/app/view/component/markdown2html/articleMarkdownEngine.html @@ -0,0 +1,616 @@ + diff --git a/app/view/component/markdown2html/articleQueryTemplate.html b/app/view/component/markdown2html/articleQueryTemplate.html new file mode 100644 index 0000000..4e6a895 --- /dev/null +++ b/app/view/component/markdown2html/articleQueryTemplate.html @@ -0,0 +1,71 @@ + + + + diff --git a/app/view/component/markdown2html/jhTagEngine.html b/app/view/component/markdown2html/jhTagEngine.html new file mode 100644 index 0000000..0b0064c --- /dev/null +++ b/app/view/component/markdown2html/jhTagEngine.html @@ -0,0 +1,205 @@ + diff --git a/app/view/component/markdown2html/md2html.html b/app/view/component/markdown2html/md2html.html new file mode 100644 index 0000000..cfa1ad3 --- /dev/null +++ b/app/view/component/markdown2html/md2html.html @@ -0,0 +1,152 @@ + + + +{% include 'component/markdown2html/jhTagEngine.html' %} +{% include 'component/markdown2html/toggleTemplate.html' %} +{% include 'component/markdown2html/articleQueryTemplate.html' %} +{% include 'component/markdown2html/articleMarkdownEngine.html' %} +{% include 'component/markdown2html/pdfViewerTemplate.html' %} + + + diff --git a/app/view/component/markdown2html/pdfViewerTemplate.html b/app/view/component/markdown2html/pdfViewerTemplate.html new file mode 100644 index 0000000..f1c3642 --- /dev/null +++ b/app/view/component/markdown2html/pdfViewerTemplate.html @@ -0,0 +1,48 @@ + + + + diff --git a/app/view/component/markdown2html/toggleTemplate.html b/app/view/component/markdown2html/toggleTemplate.html new file mode 100644 index 0000000..9dfa17e --- /dev/null +++ b/app/view/component/markdown2html/toggleTemplate.html @@ -0,0 +1,60 @@ + + + + diff --git a/app/view/component/select-org-user-dialog.html b/app/view/component/select-org-user-dialog.html new file mode 100644 index 0000000..6be5b94 --- /dev/null +++ b/app/view/component/select-org-user-dialog.html @@ -0,0 +1,237 @@ + + + + + diff --git a/app/view/page/afficheManagement.html b/app/view/page/afficheManagement.html new file mode 100644 index 0000000..a9077c2 --- /dev/null +++ b/app/view/page/afficheManagement.html @@ -0,0 +1,725 @@ +{% extends 'template/jhTemplateV4.html'%} {% block vueTemplate %} + + + +
+ +{% endblock %} +{% block vueScript %} +{% include 'component/select-org-user-dialog.html' %} + + + + + + + + +{% endblock %} \ No newline at end of file diff --git a/app/view/page/afficheViewer.html b/app/view/page/afficheViewer.html new file mode 100644 index 0000000..0fd0797 --- /dev/null +++ b/app/view/page/afficheViewer.html @@ -0,0 +1,269 @@ +{% extends 'template/jhTemplateV4.html'%} + +{% block vueTemplate %} + + + +
+
+ +{% endblock %} + +{% block vueScript %} + + + + + + + + + +{% include 'component/articleViewer/jianghuUiCss.html' %} +{% include 'component/articleViewer/jianghuCommonCss.html' %} +{% include 'component/articleViewer/jianghuDocCss.html' %} +{% include 'component/articleViewer/jianghuDocDocsCss.html' %} +{% include 'component/articleViewer/jianghuJs.html' %} +{% include 'component/markdown2html/md2html.html' %} + + + + +{% endblock %} \ No newline at end of file