From 664bf9149aac1364739d5640bc318c289ddb394d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BA=86=E7=A3=8A?= Date: Thu, 5 Aug 2021 17:04:31 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=BD=93=E5=89=8D=E9=A1=B5=E9=9D=A2=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/layout/aside/historyComponent/history.vue | 11 +++++++++-- web/src/view/layout/index.vue | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/web/src/view/layout/aside/historyComponent/history.vue b/web/src/view/layout/aside/historyComponent/history.vue index ec645799..e78a24c3 100644 --- a/web/src/view/layout/aside/historyComponent/history.vue +++ b/web/src/view/layout/aside/historyComponent/history.vue @@ -16,7 +16,7 @@ :tab="item" class="gva-tab" > - {{ item.meta.title }} + {{ item.meta.title }} @@ -105,7 +105,13 @@ export default { } this.setTab(this.$route) }, - + mounted(){ + //全局监听 关闭当前页面函数 + this.$bus.on('closeThisPage', ()=>{ + const router = this.$route.path.split("/") + this.removeTab(`${router[router.length - 1]}`) + }) + }, beforeDestroy() { this.$bus.off('collapse') this.$bus.off('mobile') @@ -244,6 +250,7 @@ export default { }) }, removeTab(tab) { + console.log(tab) const index = this.historys.findIndex( item => getFmtString(item) === tab ) diff --git a/web/src/view/layout/index.vue b/web/src/view/layout/index.vue index 7bb7d08b..ccf13a9b 100644 --- a/web/src/view/layout/index.vue +++ b/web/src/view/layout/index.vue @@ -68,7 +68,7 @@ - + From 941b5f2483f469e0cf57b5d0447e958239111be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Sat, 28 Aug 2021 13:09:17 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/go.mod | 25 +------------------------ server/initialize/plugin.go | 4 ++-- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/server/go.mod b/server/go.mod index 055161d9..0237ed4e 100644 --- a/server/go.mod +++ b/server/go.mod @@ -3,56 +3,33 @@ module github.com/flipped-aurora/gin-vue-admin/server go 1.16 require ( - github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible - github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect github.com/casbin/casbin/v2 v2.11.0 github.com/casbin/gorm-adapter/v3 v3.0.2 github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect + github.com/flipped-aurora/gva-plugins v0.0.0-20210828050649-287731daeddb github.com/fsnotify/fsnotify v1.4.9 github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 github.com/gin-gonic/gin v1.6.3 - github.com/go-ole/go-ole v1.2.4 // indirect - github.com/go-openapi/jsonreference v0.19.6 // indirect - github.com/go-openapi/spec v0.20.3 // indirect - github.com/go-openapi/swag v0.19.15 // indirect - github.com/go-playground/validator/v10 v10.3.0 // indirect github.com/go-redis/redis/v8 v8.11.0 github.com/go-sql-driver/mysql v1.5.0 github.com/gookit/color v1.3.1 - github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 // indirect github.com/jordan-wright/email v0.0.0-20200824153738-3f5bafa1cd84 - github.com/json-iterator/go v1.1.10 // indirect github.com/lestrrat-go/file-rotatelogs v2.3.0+incompatible - github.com/lestrrat-go/strftime v1.0.3 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mitchellh/mapstructure v1.2.2 // indirect github.com/mojocn/base64Captcha v1.3.1 - github.com/pelletier/go-toml v1.6.0 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/qiniu/api.v7/v7 v7.4.1 github.com/robfig/cron/v3 v3.0.1 github.com/satori/go.uuid v1.2.0 github.com/shirou/gopsutil v3.21.1+incompatible - github.com/spf13/afero v1.2.2 // indirect - github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.7.0 github.com/swaggo/gin-swagger v1.3.0 github.com/swaggo/swag v1.7.0 - github.com/tebeka/strftime v0.1.3 // indirect github.com/tencentyun/cos-go-sdk-v5 v0.7.19 github.com/unrolled/secure v1.0.7 github.com/xuri/excelize/v2 v2.4.1 go.uber.org/zap v1.10.0 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect - golang.org/x/tools v0.1.5 // indirect - google.golang.org/protobuf v1.24.0 // indirect - gopkg.in/ini.v1 v1.55.0 // indirect gorm.io/driver/mysql v1.0.1 gorm.io/gorm v1.20.7 ) diff --git a/server/initialize/plugin.go b/server/initialize/plugin.go index 02f6f1b9..acc19421 100644 --- a/server/initialize/plugin.go +++ b/server/initialize/plugin.go @@ -2,8 +2,8 @@ package initialize import ( "github.com/flipped-aurora/gin-vue-admin/server/global" - //email "github.com/flipped-aurora/gva-plug-email" // 在线仓库模式 - "github.com/flipped-aurora/gin-vue-admin/server/plugin/email" // 本地插件仓库地址模式 + email "github.com/flipped-aurora/gva-plugins/email" // 在线仓库模式go + //"github.com/flipped-aurora/gin-vue-admin/server/plugin/email" // 本地插件仓库地址模式 "github.com/flipped-aurora/gin-vue-admin/server/plugin/example_plugin" "github.com/flipped-aurora/gin-vue-admin/server/utils/plugin" "github.com/gin-gonic/gin" From 8c9f845b11212f788e5dd07efdb9ad9e2701f5bb Mon Sep 17 00:00:00 2001 From: klausY Date: Sat, 28 Aug 2021 13:31:32 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/.env.development | 2 +- web/package-lock.json | 160 +++++++++++++++---------------- web/src/view/dashboard/index.vue | 8 +- 3 files changed, 87 insertions(+), 83 deletions(-) diff --git a/web/.env.development b/web/.env.development index 6e1d0340..f6020ca1 100644 --- a/web/.env.development +++ b/web/.env.development @@ -3,4 +3,4 @@ ENV = 'development' VUE_APP_CLI_PORT = 8080 VUE_APP_SERVER_PORT = 8888 VUE_APP_BASE_API = /api -VUE_APP_BASE_PATH = http://127.0.0.1 +VUE_APP_BASE_PATH = http://8.141.61.63 diff --git a/web/package-lock.json b/web/package-lock.json index 997cdee3..29be2ef0 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1780,6 +1780,63 @@ "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, "ssri": { "version": "8.0.1", "resolved": "https://registry.nlark.com/ssri/download/ssri-8.0.1.tgz", @@ -1788,6 +1845,28 @@ "requires": { "minipass": "^3.1.1" } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.5.0", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", + "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + } } } }, @@ -11544,87 +11623,6 @@ } } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.5.0", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", - "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-particle-line": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/vue-particle-line/-/vue-particle-line-0.1.4.tgz", diff --git a/web/src/view/dashboard/index.vue b/web/src/view/dashboard/index.vue index 89a7fe5b..36dde790 100644 --- a/web/src/view/dashboard/index.vue +++ b/web/src/view/dashboard/index.vue @@ -86,7 +86,9 @@
-
+
+ +
@@ -198,6 +200,10 @@ export default { padding: 10px; background-color: #fff; } + .iPlayer{ + width: 100%; + height: 100%; + } } } From b8a29fee4ec14aefb8385868ef554cf63c710ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Sat, 28 Aug 2021 14:28:47 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- server/docs/docs.go | 154 ++++++----------- server/docs/swagger.json | 154 ++++++----------- server/docs/swagger.yaml | 95 ++++------- server/go.mod | 4 +- server/initialize/plugin.go | 9 +- server/plugin/notify/README.MD | 74 -------- server/plugin/notify/api/api.go | 67 -------- server/plugin/notify/api/enter.go | 7 - server/plugin/notify/config/dingding.go | 7 - server/plugin/notify/global/global.go | 5 - server/plugin/notify/main.go | 28 --- server/plugin/notify/model/response/notify.go | 21 --- server/plugin/notify/router/enter.go | 7 - server/plugin/notify/router/router.go | 18 -- server/plugin/notify/service/enter.go | 7 - server/plugin/notify/service/notify.go | 157 ----------------- server/plugin/notify/utils/utils.go | 1 - web/.env.development | 2 +- web/package-lock.json | 160 +++++++++--------- 20 files changed, 225 insertions(+), 754 deletions(-) delete mode 100644 server/plugin/notify/README.MD delete mode 100644 server/plugin/notify/api/api.go delete mode 100644 server/plugin/notify/api/enter.go delete mode 100644 server/plugin/notify/config/dingding.go delete mode 100644 server/plugin/notify/global/global.go delete mode 100644 server/plugin/notify/main.go delete mode 100644 server/plugin/notify/model/response/notify.go delete mode 100644 server/plugin/notify/router/enter.go delete mode 100644 server/plugin/notify/router/router.go delete mode 100644 server/plugin/notify/service/enter.go delete mode 100644 server/plugin/notify/service/notify.go delete mode 100644 server/plugin/notify/utils/utils.go diff --git a/README.md b/README.md index c7e05af0..1a016332 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ [github地址](https://github.com/flipped-aurora/gin-vue-admin): https://github.com/flipped-aurora/gin-vue-admin -[vue3版本分支地址](https://github.com/flipped-aurora/gin-vue-admin/tree/vue3Develop): https://github.com/flipped-aurora/gin-vue-admin/tree/vue3Develop +[插件仓库以及开发规范](https://github.com/flipped-aurora/gva-plugins):https://github.com/flipped-aurora/gva-plugins [审批流分支](https://github.com/flipped-aurora/gin-vue-admin/tree/gva_workflow): https://github.com/flipped-aurora/gin-vue-admin/tree/gva_workflow diff --git a/server/docs/docs.go b/server/docs/docs.go index 28c80d96..a0abd332 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -24,108 +24,6 @@ var doc = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { - "/SimpleUploaderApi/checkFileMd5": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "SimpleUploader" - ], - "summary": "断点续传插件版示例", - "parameters": [ - { - "type": "string", - "description": "md5", - "name": "md5", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/SimpleUploaderApi/mergeFileMd5": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "SimpleUploader" - ], - "summary": "合并文件", - "parameters": [ - { - "type": "string", - "description": "md5", - "name": "md5", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"合并成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/SimpleUploaderApi/upload": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "SimpleUploader" - ], - "summary": "断点续传插件版示例", - "parameters": [ - { - "type": "file", - "description": "断点续传插件版示例", - "name": "file", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"切片创建成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, "/api/createApi": { "post": { "security": [ @@ -1527,6 +1425,41 @@ var doc = `{ } } }, + "/email/sendEmail": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "System" + ], + "summary": "发送邮件", + "parameters": [ + { + "description": "发送邮件必须的参数", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/response.Email" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"发送成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/excel/downloadTemplate": { "get": { "security": [ @@ -4376,6 +4309,23 @@ var doc = `{ } } }, + "response.Email": { + "type": "object", + "properties": { + "body": { + "description": "邮件内容", + "type": "string" + }, + "subject": { + "description": "邮件标题", + "type": "string" + }, + "to": { + "description": "邮件发送给谁", + "type": "string" + } + } + }, "response.SysAuthorityCopyResponse": { "type": "object", "properties": { diff --git a/server/docs/swagger.json b/server/docs/swagger.json index ed0e1e2b..60db1a59 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -8,108 +8,6 @@ }, "basePath": "/", "paths": { - "/SimpleUploaderApi/checkFileMd5": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "SimpleUploader" - ], - "summary": "断点续传插件版示例", - "parameters": [ - { - "type": "string", - "description": "md5", - "name": "md5", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/SimpleUploaderApi/mergeFileMd5": { - "get": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "produces": [ - "application/json" - ], - "tags": [ - "SimpleUploader" - ], - "summary": "合并文件", - "parameters": [ - { - "type": "string", - "description": "md5", - "name": "md5", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"合并成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/SimpleUploaderApi/upload": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], - "tags": [ - "SimpleUploader" - ], - "summary": "断点续传插件版示例", - "parameters": [ - { - "type": "file", - "description": "断点续传插件版示例", - "name": "file", - "in": "formData", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"切片创建成功\"}", - "schema": { - "type": "string" - } - } - } - } - }, "/api/createApi": { "post": { "security": [ @@ -1511,6 +1409,41 @@ } } }, + "/email/sendEmail": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "System" + ], + "summary": "发送邮件", + "parameters": [ + { + "description": "发送邮件必须的参数", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/response.Email" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"发送成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/excel/downloadTemplate": { "get": { "security": [ @@ -4360,6 +4293,23 @@ } } }, + "response.Email": { + "type": "object", + "properties": { + "body": { + "description": "邮件内容", + "type": "string" + }, + "subject": { + "description": "邮件标题", + "type": "string" + }, + "to": { + "description": "邮件发送给谁", + "type": "string" + } + } + }, "response.SysAuthorityCopyResponse": { "type": "object", "properties": { diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index acdd8708..fae34820 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -567,6 +567,18 @@ definitions: description: 每页大小 type: integer type: object + response.Email: + properties: + body: + description: 邮件内容 + type: string + subject: + description: 邮件标题 + type: string + to: + description: 邮件发送给谁 + type: string + type: object response.SysAuthorityCopyResponse: properties: authority: @@ -930,68 +942,6 @@ info: title: Swagger Example API version: 0.0.1 paths: - /SimpleUploaderApi/checkFileMd5: - get: - parameters: - - description: md5 - in: query - name: md5 - required: true - type: string - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"查询成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 断点续传插件版示例 - tags: - - SimpleUploader - /SimpleUploaderApi/mergeFileMd5: - get: - parameters: - - description: md5 - in: query - name: md5 - required: true - type: string - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"合并成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 合并文件 - tags: - - SimpleUploader - /SimpleUploaderApi/upload: - post: - consumes: - - multipart/form-data - parameters: - - description: 断点续传插件版示例 - in: formData - name: file - required: true - type: file - produces: - - application/json - responses: - "200": - description: '{"success":true,"data":{},"msg":"切片创建成功"}' - schema: - type: string - security: - - ApiKeyAuth: [] - summary: 断点续传插件版示例 - tags: - - SimpleUploader /api/createApi: post: consumes: @@ -1844,6 +1794,27 @@ paths: summary: 发送测试邮件 tags: - System + /email/sendEmail: + post: + parameters: + - description: 发送邮件必须的参数 + in: body + name: data + required: true + schema: + $ref: '#/definitions/response.Email' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"发送成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 发送邮件 + tags: + - System /excel/downloadTemplate: get: consumes: diff --git a/server/go.mod b/server/go.mod index 0237ed4e..fb0d090a 100644 --- a/server/go.mod +++ b/server/go.mod @@ -3,12 +3,13 @@ module github.com/flipped-aurora/gin-vue-admin/server go 1.16 require ( + github.com/StackExchange/wmi v1.2.1 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible github.com/casbin/casbin/v2 v2.11.0 github.com/casbin/gorm-adapter/v3 v3.0.2 github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/flipped-aurora/gva-plugins v0.0.0-20210828050649-287731daeddb + github.com/flipped-aurora/gva-plugins v0.0.0-20210828060501-fc8b729b9a4a // indirect github.com/fsnotify/fsnotify v1.4.9 github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 github.com/gin-gonic/gin v1.6.3 @@ -17,6 +18,7 @@ require ( github.com/gookit/color v1.3.1 github.com/jordan-wright/email v0.0.0-20200824153738-3f5bafa1cd84 github.com/lestrrat-go/file-rotatelogs v2.3.0+incompatible + github.com/lestrrat-go/strftime v1.0.5 // indirect github.com/mojocn/base64Captcha v1.3.1 github.com/qiniu/api.v7/v7 v7.4.1 github.com/robfig/cron/v3 v3.0.1 diff --git a/server/initialize/plugin.go b/server/initialize/plugin.go index 7c5ae5e4..69b8a1af 100644 --- a/server/initialize/plugin.go +++ b/server/initialize/plugin.go @@ -2,7 +2,6 @@ package initialize import ( "github.com/flipped-aurora/gin-vue-admin/server/global" - "github.com/flipped-aurora/gin-vue-admin/server/plugin/notify" email "github.com/flipped-aurora/gva-plugins/email" // 在线仓库模式go //"github.com/flipped-aurora/gin-vue-admin/server/plugin/email" // 本地插件仓库地址模式 "github.com/flipped-aurora/gin-vue-admin/server/plugin/example_plugin" @@ -19,7 +18,8 @@ func PluginInit(group *gin.RouterGroup, Plugin ...plugin.Plugin) { func InstallPlugin(PublicGroup *gin.RouterGroup, PrivateGroup *gin.RouterGroup) { // 添加开放权限的插件 示例 - PluginInit(PublicGroup, example_plugin.ExamplePlugin) + PluginInit(PublicGroup, + example_plugin.ExamplePlugin) // 添加跟角色挂钩权限的插件 示例 本地示例模式于在线仓库模式注意上方的import 可以自行切换 效果相同 PluginInit(PrivateGroup, email.CreateEmailPlug( @@ -32,9 +32,4 @@ func InstallPlugin(PublicGroup *gin.RouterGroup, PrivateGroup *gin.RouterGroup) global.GVA_CONFIG.Email.IsSSL, )) - // 钉钉通知,暂时开放权限 - PluginInit(PublicGroup, notify.CreateDDPlug( - "https://oapi.dingtalk.com/robot/send", - "8ded23f91917dc4f6275f44ba5ef243e6ed1d2cc74de83f01a6f5f5f39905671", - "SECaecf452bd6e671ab0d47469c3ad933e32fcc47b335333049a1b8961606192f38")) } diff --git a/server/plugin/notify/README.MD b/server/plugin/notify/README.MD deleted file mode 100644 index 4b8d8f84..00000000 --- a/server/plugin/notify/README.MD +++ /dev/null @@ -1,74 +0,0 @@ -## GVA 钉钉群通知插件 - -本插件用于向钉钉群推送消息 - -### 1. 使用场景 - -- 当服务运行异常时,可以向钉钉推送异常信息,便于及时发现解决问题 -- 推送一些关键业务的运行日志等 - -### 2. 配置说明 - -钉钉 token 等相关信息的获取,请参考 [钉钉官网](https://developers.dingtalk.com/document/robots/custom-robot-access?spm=ding_open_doc.document.0.0.7f8710afbfzduV#topic-2026027) - -在`plugin/notify/global/global.go` 文件中配置钉钉通知的URL ,Token 等 - -```go - // 在gin-vue-admin 主程序的initialize中的plugin的InstallPlugin 函数中写入如下代码 - PluginInit(PublicGroup, notify.CreateDDPlug( - URL, - Token, - 密钥)) -} -``` - -### 3 参数说明 -#### 3-1 全局参数说明 - -```go - Url string `mapstructure:"url" json:"url" yaml:"url"` // Url - Token string `mapstructure:"token" json:"token" yaml:"token"` // access_token - Secret string `mapstructure:"secret" json:"secret" yaml:"secret"` // 密钥 -``` -#### 3-2 请求入参说明 -```go - - -``` - -### 3方法API(可调用方法) -```go - -//content 发送的内容 -//atMobiles 需要艾特的人的手机号 -//isAtAll 是否艾特全体 -SendTextMessage(content string,atMobiles []string,isAtAll bool) - -//content 发送的内容 -//title 内容标题 -//picUrl 配图 -//messageUrl 点击跳转路径 -SendLinkMessage(content,title,picUrl,messageUrl string) - -//content 发送的内容(markdown语法) -//title 内容标题 -//atMobiles 需要艾特的人的手机号 -//isAtAll 是否艾特全体 -SendMarkdownMessage(content,title string,atMobiles []string,isAtAll bool) - -``` - -### 4. 可直接调用接口 - - 发送文字消息接口: /notify/sendTextMessage [post] 已配置swagger - 发送图文链接消息接口: /notify/sendLinkMessage [post] 已配置swagger - 发送markdown消息接口: /notify/sendMarkdownMessage [post] 已配置swagger - - 入参: - type Email struct { - To string `json:"to"` // 邮件发送给谁 - Subject string `json:"subject"` // 邮件标题 - Body string `json:"body"` // 邮件内容 - } - - diff --git a/server/plugin/notify/api/api.go b/server/plugin/notify/api/api.go deleted file mode 100644 index e52102cb..00000000 --- a/server/plugin/notify/api/api.go +++ /dev/null @@ -1,67 +0,0 @@ -package api - -import ( - "github.com/flipped-aurora/gin-vue-admin/server/global" - "github.com/flipped-aurora/gin-vue-admin/server/model/common/response" - notify_response "github.com/flipped-aurora/gin-vue-admin/server/plugin/notify/model/response" - "github.com/flipped-aurora/gin-vue-admin/server/plugin/notify/service" - "github.com/gin-gonic/gin" - "go.uber.org/zap" -) - -type Api struct { -} - -// @Tags Notify -// @Summary 发送文字消息接口 -// @Security ApiKeyAuth -// @Produce application/json -// @Param data body notify_response.TextNotify true "发送文字消息的参数" -// @Success 200 {string} string "{"success":true,"data":{},"msg":"发送成功"}" -// @Router /notify/sendTextMessage [post] -func (s *Api) SendTextMessage(c *gin.Context) { - var textNotify notify_response.TextNotify - _ = c.ShouldBindJSON(&textNotify) - if err := service.ServiceGroupApp.SendTextMessage(textNotify.Content, textNotify.AtMobiles, textNotify.IsAtAll); err != nil { - global.GVA_LOG.Error("发送失败!", zap.Any("err", err)) - response.FailWithMessage("发送失败", c) - } else { - response.OkWithData("发送成功", c) - } -} - -// @Tags Notify -// @Summary 发送图文链接消息接口 -// @Security ApiKeyAuth -// @Produce application/json -// @Param data body notify_response.LinkNotify true "发送图文链接消息的参数" -// @Success 200 {string} string "{"success":true,"data":{},"msg":"发送成功"}" -// @Router /notify/sendLinkMessage [post] -func (s *Api) SendLinkMessage(c *gin.Context) { - var linkNotify notify_response.LinkNotify - _ = c.ShouldBindJSON(&linkNotify) - if err := service.ServiceGroupApp.SendLinkMessage(linkNotify.Content, linkNotify.Title, linkNotify.PicUrl, linkNotify.MessageUrl); err != nil { - global.GVA_LOG.Error("发送失败!", zap.Any("err", err)) - response.FailWithMessage("发送失败", c) - } else { - response.OkWithData("发送成功", c) - } -} - -// @Tags Notify -// @Summary 发送markdown消息接口 -// @Security ApiKeyAuth -// @Produce application/json -// @Param data body notify_response.MarkdownNotify true "发送markdown消息的参数" -// @Success 200 {string} string "{"success":true,"data":{},"msg":"发送成功"}" -// @Router /notify/sendMarkdownMessage [post] -func (s *Api) SendMarkdownMessage(c *gin.Context) { - var markdownNotify notify_response.MarkdownNotify - _ = c.ShouldBindJSON(&markdownNotify) - if err := service.ServiceGroupApp.SendMarkdownMessage(markdownNotify.Content, markdownNotify.Title, markdownNotify.AtMobiles, markdownNotify.IsAtAll); err != nil { - global.GVA_LOG.Error("发送失败!", zap.Any("err", err)) - response.FailWithMessage("发送失败", c) - } else { - response.OkWithData("发送成功", c) - } -} diff --git a/server/plugin/notify/api/enter.go b/server/plugin/notify/api/enter.go deleted file mode 100644 index 5fe286c1..00000000 --- a/server/plugin/notify/api/enter.go +++ /dev/null @@ -1,7 +0,0 @@ -package api - -type ApiGroup struct { - Api -} - -var ApiGroupApp = new(ApiGroup) diff --git a/server/plugin/notify/config/dingding.go b/server/plugin/notify/config/dingding.go deleted file mode 100644 index 7ce67b1f..00000000 --- a/server/plugin/notify/config/dingding.go +++ /dev/null @@ -1,7 +0,0 @@ -package config - -type DingDing struct { - Url string `mapstructure:"url" json:"url" yaml:"url"` // Url - Token string `mapstructure:"token" json:"token" yaml:"token"` // access_token - Secret string `mapstructure:"secret" json:"secret" yaml:"secret"` // 密钥 -} diff --git a/server/plugin/notify/global/global.go b/server/plugin/notify/global/global.go deleted file mode 100644 index 12e15ca4..00000000 --- a/server/plugin/notify/global/global.go +++ /dev/null @@ -1,5 +0,0 @@ -package global - -import "github.com/flipped-aurora/gin-vue-admin/server/plugin/notify/config" - -var GlobalConfig_ = &config.DingDing{} diff --git a/server/plugin/notify/main.go b/server/plugin/notify/main.go deleted file mode 100644 index 2c2d9391..00000000 --- a/server/plugin/notify/main.go +++ /dev/null @@ -1,28 +0,0 @@ -package notify - -import ( - "github.com/flipped-aurora/gin-vue-admin/server/plugin/notify/global" - "github.com/flipped-aurora/gin-vue-admin/server/plugin/notify/router" - "github.com/gin-gonic/gin" -) - -type ddPlugin struct { - Secret string - Token string - Url string -} - -func CreateDDPlug(url, Token, Secret string) *ddPlugin { - global.GlobalConfig_.Url = url - global.GlobalConfig_.Token = Token - global.GlobalConfig_.Secret = Secret - return &ddPlugin{} -} - -func (*ddPlugin) Register(group *gin.RouterGroup) { - router.RouterGroupApp.InitRouter(group) -} - -func (*ddPlugin) RouterPath() string { - return "notify" -} diff --git a/server/plugin/notify/model/response/notify.go b/server/plugin/notify/model/response/notify.go deleted file mode 100644 index 1555ae58..00000000 --- a/server/plugin/notify/model/response/notify.go +++ /dev/null @@ -1,21 +0,0 @@ -package response - -type TextNotify struct { // 文字信息 - Content string `json:"content"` // 发送的内容 - AtMobiles []string `json:"atMobiles"` // 需要艾特的人的手机号 - IsAtAll bool `json:"isAtAll"` // 是否艾特全体 -} - -type LinkNotify struct { // 图文链接信息 - Content string `json:"content"` // 发送的内容 - Title string `json:"title"` // 内容标题 - PicUrl string `json:"picUrl"` // 配图 - MessageUrl string `json:"messageUrl"` // 点击跳转路径 -} - -type MarkdownNotify struct { // markdown信息 - Title string `json:"title"` // 内容标题 - Content string `json:"content"` // 发送的内容 - AtMobiles []string `json:"atMobiles"` // 需要艾特的人的手机号 - IsAtAll bool `json:"isAtAll"` // 是否艾特全体 -} diff --git a/server/plugin/notify/router/enter.go b/server/plugin/notify/router/enter.go deleted file mode 100644 index 30aca42c..00000000 --- a/server/plugin/notify/router/enter.go +++ /dev/null @@ -1,7 +0,0 @@ -package router - -type RouterGroup struct { - NotifyRouter -} - -var RouterGroupApp = new(RouterGroup) diff --git a/server/plugin/notify/router/router.go b/server/plugin/notify/router/router.go deleted file mode 100644 index b500d52c..00000000 --- a/server/plugin/notify/router/router.go +++ /dev/null @@ -1,18 +0,0 @@ -package router - -import ( - "github.com/flipped-aurora/gin-vue-admin/server/middleware" - "github.com/flipped-aurora/gin-vue-admin/server/plugin/notify/api" - "github.com/gin-gonic/gin" -) - -type NotifyRouter struct { -} - -func (s *NotifyRouter) InitRouter(Router *gin.RouterGroup) { - router := Router.Use(middleware.OperationRecord()) - var SendTextMessage = api.ApiGroupApp.Api.SendTextMessage - { - router.POST("sendTextMessage", SendTextMessage) - } -} diff --git a/server/plugin/notify/service/enter.go b/server/plugin/notify/service/enter.go deleted file mode 100644 index 0eb00088..00000000 --- a/server/plugin/notify/service/enter.go +++ /dev/null @@ -1,7 +0,0 @@ -package service - -type ServiceGroup struct { - NotifyService -} - -var ServiceGroupApp = new(ServiceGroup) diff --git a/server/plugin/notify/service/notify.go b/server/plugin/notify/service/notify.go deleted file mode 100644 index 4e3045f6..00000000 --- a/server/plugin/notify/service/notify.go +++ /dev/null @@ -1,157 +0,0 @@ -package service - -import ( - "bytes" - "crypto/hmac" - "crypto/sha256" - "encoding/base64" - "encoding/json" - "fmt" - "github.com/flipped-aurora/gin-vue-admin/server/plugin/notify/global" - "io/ioutil" - "net/http" - "net/url" - "time" -) - -type NotifyService struct { -} - -//@author: [Espoir](https://github.com/nightsimon) -//@function: SendTextMessage -//@description: 发送钉钉文字信息 -//@params content string发送的文字内容 -//@params atMobiles []string 艾特的手机号 -//@params isAtAll bool 是否艾特全体 -//@return: err error - -func (e *NotifyService) SendTextMessage(content string, atMobiles []string, isAtAll bool) (err error) { - msg := map[string]interface{}{ - "msgtype": "text", - "text": map[string]string{ - "content": content, - }, - "at": map[string]interface{}{ - "atMobiles": atMobiles, - "isAtAll": isAtAll, - }, - } - return SendMessage(msg) -} - -//@author: [Espoir](https://github.com/nightsimon) -//@function: SendLinkMessage -//@description: 发送钉钉图文链接信息 -//@params content string 发送的文字内容 -//@params title string 发送的标题 -//@params picUrl string 艾特的手机号 -//@params messageUrl string 是否艾特全体 -//@return: err error - -func (e *NotifyService) SendLinkMessage(content, title, picUrl, messageUrl string) (err error) { - msg := map[string]interface{}{ - "msgtype": "link", - "link": map[string]string{ - "text": content, - "title": title, - "picUrl": picUrl, - "messageUrl": messageUrl, - }, - } - return SendMessage(msg) -} - -//@author: [Espoir](https://github.com/nightsimon) -//@function: SendMarkdownMessage -//@description: 发送钉钉Markdown信息 -//@params content 发送的文字内容 -//@params title 发送的标题 -//@params atMobiles []string 艾特的手机号 -//@params isAtAll bool 是否艾特全体 -//@return: err error - -func (e *NotifyService) SendMarkdownMessage(content, title string, atMobiles []string, isAtAll bool) (err error) { - msg := map[string]interface{}{ - "msgtype": "markdown", - "markdown": map[string]string{ - "text": content, - "title": title, - }, - "at": map[string]interface{}{ - "atMobiles": atMobiles, - "isAtAll": isAtAll, - }, - } - return SendMessage(msg) -} - -func SendMessage(msg interface{}) error { - body := bytes.NewBuffer(nil) - err := json.NewEncoder(body).Encode(msg) - if err != nil { - return fmt.Errorf("msg json failed, msg: %v, err: %v", msg, err.Error()) - } - - value := url.Values{} - value.Set("access_token", global.GlobalConfig_.Token) - if global.GlobalConfig_.Secret != "" { - t := time.Now().UnixNano() / 1e6 - value.Set("timestamp", fmt.Sprintf("%d", t)) - value.Set("sign", sign(t, global.GlobalConfig_.Secret)) - } - - request, err := http.NewRequest(http.MethodPost, global.GlobalConfig_.Url, body) - if err != nil { - return fmt.Errorf("error request: %v", err.Error()) - } - request.URL.RawQuery = value.Encode() - request.Header.Add("Content-Type", "application/json") - res, err := (&http.Client{}).Do(request) - if err != nil { - return fmt.Errorf("send dingTalk message failed, error: %v", err.Error()) - } - defer func() { _ = res.Body.Close() }() - result, err := ioutil.ReadAll(res.Body) - - if res.StatusCode != 200 { - return fmt.Errorf("send dingTalk message failed, %s", httpError(request, res, result, "http code is not 200")) - } - if err != nil { - return fmt.Errorf("send dingTalk message failed, %s", httpError(request, res, result, err.Error())) - } - - type response struct { - ErrCode int `json:"errcode"` - } - var ret response - - if err := json.Unmarshal(result, &ret); err != nil { - return fmt.Errorf("send dingTalk message failed, %s", httpError(request, res, result, err.Error())) - } - - if ret.ErrCode != 0 { - return fmt.Errorf("send dingTalk message failed, %s", httpError(request, res, result, "errcode is not 0")) - } - - return nil -} - -func httpError(request *http.Request, response *http.Response, body []byte, error string) string { - return fmt.Sprintf( - "http request failure, error: %s, status code: %d, %s %s, body:\n%s", - error, - response.StatusCode, - request.Method, - request.URL.String(), - string(body), - ) -} -func sign(t int64, secret string) string { - strToHash := fmt.Sprintf("%d\n%s", t, secret) - hmac256 := hmac.New(sha256.New, []byte(secret)) - hmac256.Write([]byte(strToHash)) - data := hmac256.Sum(nil) - return base64.StdEncoding.EncodeToString(data) -} - -// 其余方法请参考 https://developers.dingtalk.com/document/robots/custom-robot-access?spm=ding_open_doc.document.0.0.7f8710afbfzduV#topic-2026027 diff --git a/server/plugin/notify/utils/utils.go b/server/plugin/notify/utils/utils.go deleted file mode 100644 index d4b585bf..00000000 --- a/server/plugin/notify/utils/utils.go +++ /dev/null @@ -1 +0,0 @@ -package utils diff --git a/web/.env.development b/web/.env.development index f6020ca1..6e1d0340 100644 --- a/web/.env.development +++ b/web/.env.development @@ -3,4 +3,4 @@ ENV = 'development' VUE_APP_CLI_PORT = 8080 VUE_APP_SERVER_PORT = 8888 VUE_APP_BASE_API = /api -VUE_APP_BASE_PATH = http://8.141.61.63 +VUE_APP_BASE_PATH = http://127.0.0.1 diff --git a/web/package-lock.json b/web/package-lock.json index 29be2ef0..997cdee3 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1780,63 +1780,6 @@ "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", "dev": true }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, "ssri": { "version": "8.0.1", "resolved": "https://registry.nlark.com/ssri/download/ssri-8.0.1.tgz", @@ -1845,28 +1788,6 @@ "requires": { "minipass": "^3.1.1" } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.5.0", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", - "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - } } } }, @@ -11623,6 +11544,87 @@ } } }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.5.0", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", + "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "vue-particle-line": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/vue-particle-line/-/vue-particle-line-0.1.4.tgz", From 722dbe53168e0c37d1f45670bf163e5a5eac8a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Sat, 28 Aug 2021 15:13:39 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E5=89=8D=E7=AB=AFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/go.mod | 2 +- web/src/view/about/index.vue | 38 +++++++++++++++----------------- web/src/view/dashboard/index.vue | 18 +++------------ 3 files changed, 22 insertions(+), 36 deletions(-) diff --git a/server/go.mod b/server/go.mod index fb0d090a..3860e764 100644 --- a/server/go.mod +++ b/server/go.mod @@ -9,7 +9,7 @@ require ( github.com/casbin/casbin/v2 v2.11.0 github.com/casbin/gorm-adapter/v3 v3.0.2 github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/flipped-aurora/gva-plugins v0.0.0-20210828060501-fc8b729b9a4a // indirect + github.com/flipped-aurora/gva-plugins v0.0.0-20210828060501-fc8b729b9a4a github.com/fsnotify/fsnotify v1.4.9 github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 github.com/gin-gonic/gin v1.6.3 diff --git a/web/src/view/about/index.vue b/web/src/view/about/index.vue index 71dcce6c..9599612e 100644 --- a/web/src/view/about/index.vue +++ b/web/src/view/about/index.vue @@ -79,20 +79,22 @@
- + + + +

{{ item.title }}

+

{{ item.message }}

+
+
+
import { Commits, Members } from '@/api/github' -import Timeline from 'timeline-vuejs' export default { name: 'About', - components: { - Timeline - }, data() { return { messageWhenNoItems: 'There arent commits', members: [], dataTimeline: [], - page: 0 + page: 0, } }, created() { @@ -138,7 +136,7 @@ export default { from: new Date(element.commit.author.date), title: element.commit.author.name, showDayAndMonth: true, - description: `${element.commit.message}` + message: element.commit.message, }) } }) @@ -149,8 +147,8 @@ export default { this.members = data this.members.sort() }) - } - } + }, + }, } diff --git a/web/src/view/dashboard/index.vue b/web/src/view/dashboard/index.vue index 36dde790..bdbb286f 100644 --- a/web/src/view/dashboard/index.vue +++ b/web/src/view/dashboard/index.vue @@ -57,11 +57,11 @@

- 使用教学:https://www.bilibili.com/video/BV1fV411y7dT/ + 使用教学:https://www.bilibili.com/video/BV1Rg411u7xH/


- 工作流教学:https://www.bilibili.com/video/BV1Ka411F7Ji/ + 插件仓库:https://github.com/flipped-aurora/gva-plugins

@@ -83,18 +83,6 @@
-
- - -
- -
-
- -
- - -
@@ -189,7 +177,7 @@ export default { } .bottom { width: 100%; - height: 300px; + height: 420px; // margin: 20px 0; .el-row { margin-right: 4px !important; From 383e219195be8d387381c9f26854c6dc3ba68cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Mon, 30 Aug 2021 23:49:54 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/view/superAdmin/user/user.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/view/superAdmin/user/user.vue b/web/src/view/superAdmin/user/user.vue index c6b2e83c..be3363da 100644 --- a/web/src/view/superAdmin/user/user.vue +++ b/web/src/view/superAdmin/user/user.vue @@ -74,8 +74,7 @@ Date: Tue, 31 Aug 2021 11:02:09 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E6=B8=85=E9=99=A4=E6=97=A0=E6=95=88gomod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/go.mod b/server/go.mod index 3860e764..66294c02 100644 --- a/server/go.mod +++ b/server/go.mod @@ -3,7 +3,6 @@ module github.com/flipped-aurora/gin-vue-admin/server go 1.16 require ( - github.com/StackExchange/wmi v1.2.1 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible github.com/casbin/casbin/v2 v2.11.0 @@ -18,7 +17,6 @@ require ( github.com/gookit/color v1.3.1 github.com/jordan-wright/email v0.0.0-20200824153738-3f5bafa1cd84 github.com/lestrrat-go/file-rotatelogs v2.3.0+incompatible - github.com/lestrrat-go/strftime v1.0.5 // indirect github.com/mojocn/base64Captcha v1.3.1 github.com/qiniu/api.v7/v7 v7.4.1 github.com/robfig/cron/v3 v3.0.1 From 8588b054525cce77c2f335407551c40324d54e6e Mon Sep 17 00:00:00 2001 From: krank Date: Tue, 31 Aug 2021 14:33:51 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=BB=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/utils/request.js | 41 +++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/web/src/utils/request.js b/web/src/utils/request.js index ac9946b2..9498482a 100644 --- a/web/src/utils/request.js +++ b/web/src/utils/request.js @@ -81,19 +81,34 @@ service.interceptors.response.use( }, error => { closeLoading() - ElMessageBox.confirm(` -

检测到接口错误${error}

-

错误码500:此类错误内容常见于后台panic,如果影响您正常使用可强制登出清理缓存

-

错误码404:此类错误多为接口未注册(或未重启)或者请求路径(方法)与api路径(方法)不符

- `, '接口报错', { - dangerouslyUseHTMLString: true, - distinguishCancelAndClose: true, - confirmButtonText: '清理缓存', - cancelButtonText: '取消' - }) - .then(() => { - store.commit('user/LoginOut') - }) + switch (error.response.status) { + case 500: + ElMessageBox.confirm(` +

检测到接口错误${error}

+

错误码 500 :此类错误内容常见于后台panic,请先查看后台日志,如果影响您正常使用可强制登出清理缓存

+ `, '接口报错', { + dangerouslyUseHTMLString: true, + distinguishCancelAndClose: true, + confirmButtonText: '清理缓存', + cancelButtonText: '取消' + }) + .then(() => { + store.commit('user/LoginOut') + }) + break + case 404: + ElMessageBox.confirm(` +

检测到接口错误${error}

+

错误码 404 :此类错误多为接口未注册(或未重启)或者请求路径(方法)与api路径(方法)不符--如果为自动化代码请检查是否存在空格

+ `, '接口报错', { + dangerouslyUseHTMLString: true, + distinguishCancelAndClose: true, + confirmButtonText: '我知道了', + cancelButtonText: '取消' + }) + break + } + return error } ) From 498be36686ca9f81287241a60fd890e225863ac1 Mon Sep 17 00:00:00 2001 From: krank Date: Tue, 31 Aug 2021 17:40:58 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E6=B8=85=E7=90=86=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package-lock.json | 210 +++++++++++++--------------------- web/package.json | 6 +- web/src/core/gin-vue-admin.js | 3 - 3 files changed, 81 insertions(+), 138 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 997cdee3..fd4ac33c 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,5 +1,5 @@ { - "name": "gvav3", + "name": "gin-vue-admin", "version": "0.1.0", "lockfileVersion": 1, "requires": true, @@ -1156,21 +1156,6 @@ "postcss": "^7.0.0" } }, - "@moefe/vue-aplayer": { - "version": "2.0.0-beta.5", - "resolved": "https://registry.npmjs.org/@moefe/vue-aplayer/-/vue-aplayer-2.0.0-beta.5.tgz", - "integrity": "sha512-ytzp4GStzjftuh7H1rIS/ziqwV1FO67iTLSkDxgN0J2bqlO+rBgDDr83Y+pZKBIgRUc30uu/UZHqmE4QiBHHeg==", - "requires": { - "vue": "^2.5.17" - }, - "dependencies": { - "vue": { - "version": "2.6.14", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", - "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==" - } - } - }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npm.taobao.org/@mrmlnc/readdir-enhanced/download/@mrmlnc/readdir-enhanced-2.2.1.tgz", @@ -1780,6 +1765,63 @@ "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, "ssri": { "version": "8.0.1", "resolved": "https://registry.nlark.com/ssri/download/ssri-8.0.1.tgz", @@ -1788,6 +1830,28 @@ "requires": { "minipass": "^3.1.1" } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.5.0", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", + "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + } } } }, @@ -10113,11 +10177,6 @@ } } }, - "simple-uploader.js": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/simple-uploader.js/-/simple-uploader.js-0.5.6.tgz", - "integrity": "sha512-ukjL0wZhK1dNMaQa6sd+UpCSmnUjblaUGbAd/B8f5IFrChMzDsC/7eFSK4bs4BS5NPJFSZVLI+l6Ri7THTkQtw==" - }, "slash": { "version": "2.0.0", "resolved": "https://registry.npm.taobao.org/slash/download/slash-2.0.0.tgz", @@ -10962,21 +11021,6 @@ "integrity": "sha1-Wrr3FKlAXbBQRzK7zNLO3Z75U30=", "dev": true }, - "timeline-vuejs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/timeline-vuejs/-/timeline-vuejs-1.1.1.tgz", - "integrity": "sha512-jsdr0xNCBH/GBiW7qsOTbBxZuyk7WKD5YmtTGP1sm0su0fy+iBsEJLDyhHhQ4nTAxca8MkSbJhKGUgF5eNoEfA==", - "requires": { - "vue": "^2.5.17" - }, - "dependencies": { - "vue": { - "version": "2.6.14", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", - "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==" - } - } - }, "timers-browserify": { "version": "2.0.12", "resolved": "https://registry.npm.taobao.org/timers-browserify/download/timers-browserify-2.0.12.tgz?cache=0&sync_timestamp=1603793712916&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftimers-browserify%2Fdownload%2Ftimers-browserify-2.0.12.tgz", @@ -11544,87 +11588,6 @@ } } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.5.0", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", - "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-particle-line": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/vue-particle-line/-/vue-particle-line-0.1.4.tgz", @@ -11648,14 +11611,6 @@ "@vue/devtools-api": "^6.0.0-beta.14" } }, - "vue-simple-uploader": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/vue-simple-uploader/-/vue-simple-uploader-0.7.6.tgz", - "integrity": "sha512-DYddedNi+ZZzqxmKgW2t4lBN3aiB66oKOxgAfS9Hz9J1FHv7Xt+u1Pq8F48BFS4vG0+MFHCNzjzS2xaEUOIcHQ==", - "requires": { - "simple-uploader.js": "^0.5.6" - } - }, "vue-style-loader": { "version": "4.1.3", "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.3.tgz?cache=0&sync_timestamp=1614758661292&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-style-loader%2Fdownload%2Fvue-style-loader-4.1.3.tgz", @@ -11680,11 +11635,6 @@ "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", "dev": true }, - "vuescroll": { - "version": "4.17.3", - "resolved": "https://registry.npmjs.org/vuescroll/-/vuescroll-4.17.3.tgz", - "integrity": "sha512-5P3hje/fYjo1eAB0Y8zboLbaq/mnPNczYyZ1aPHHM6wIFKcqal9Mi42CBCZizUnEtoXtbsGlnyLcVbnalTNptA==" - }, "vuex": { "version": "4.0.2", "resolved": "https://registry.nlark.com/vuex/download/vuex-4.0.2.tgz?cache=0&sync_timestamp=1623945253165&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvuex%2Fdownload%2Fvuex-4.0.2.tgz", diff --git a/web/package.json b/web/package.json index 27cb3714..fc754b2a 100644 --- a/web/package.json +++ b/web/package.json @@ -1,5 +1,5 @@ { - "name": "gvav3", + "name": "gin-vue-admin", "version": "0.1.0", "private": true, "scripts": { @@ -8,7 +8,6 @@ "lint": "vue-cli-service lint" }, "dependencies": { - "@moefe/vue-aplayer": "^2.0.0-beta.5", "axios": "^0.19.2", "core-js": "^3.6.5", "element-plus": "^1.1.0-beta.4", @@ -22,12 +21,9 @@ "screenfull": "^5.0.2", "script-ext-html-webpack-plugin": "^2.1.4", "spark-md5": "^3.0.1", - "timeline-vuejs": "1.1.1", "vue": "^3.0.0", "vue-particle-line": "^0.1.4", "vue-router": "^4.0.0-0", - "vue-simple-uploader": "^0.7.4", - "vuescroll": "^4.14.4", "vuex": "^4.0.0-0", "vuex-persist": "^2.1.0" }, diff --git a/web/src/core/gin-vue-admin.js b/web/src/core/gin-vue-admin.js index 66fda07e..146eed3d 100644 --- a/web/src/core/gin-vue-admin.js +++ b/web/src/core/gin-vue-admin.js @@ -2,9 +2,6 @@ * gin-vue-admin web框架组 * * */ -// time line css -import '../../node_modules/timeline-vuejs/dist/timeline-vuejs.css' - // 加载网站配置文件夹 import config from './config' From 1962bd771d081cd9c144ab86d02bf9f62dd974c5 Mon Sep 17 00:00:00 2001 From: piexlmax Date: Wed, 1 Sep 2021 14:29:25 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E9=A1=B5=E9=9D=A2=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/core/gin-vue-admin.js | 1 - .../view/layout/aside/historyComponent/history.vue | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/core/gin-vue-admin.js b/web/src/core/gin-vue-admin.js index 146eed3d..e104f69a 100644 --- a/web/src/core/gin-vue-admin.js +++ b/web/src/core/gin-vue-admin.js @@ -7,7 +7,6 @@ import config from './config' export const run = function(app) { app.config.globalProperties.$GIN_VUE_ADMIN = config - // app.use(uploader) console.log(` diff --git a/web/src/view/layout/aside/historyComponent/history.vue b/web/src/view/layout/aside/historyComponent/history.vue index 06abb4a8..ee26c2f6 100644 --- a/web/src/view/layout/aside/historyComponent/history.vue +++ b/web/src/view/layout/aside/historyComponent/history.vue @@ -16,7 +16,9 @@ :tab="item" class="gva-tab" > - {{ item.meta.title }} + @@ -107,11 +109,10 @@ export default { } this.setTab(this.$route) }, - mounted(){ - //全局监听 关闭当前页面函数 - this.$bus.on('closeThisPage', ()=>{ - const router = this.$route.path.split("/") - this.removeTab(`${router[router.length - 1]}`) + mounted() { + // 全局监听 关闭当前页面函数 + emitter.on('closeThisPage', () => { + this.removeTab(this.name(this.$route)) }) }, beforeDestroy() { From 2f8a3e35d598323220f421136f83ffcb23527149 Mon Sep 17 00:00:00 2001 From: piexlmax Date: Wed, 1 Sep 2021 15:20:46 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E5=A2=9E=E5=8A=A0$CloseThisPage=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/core/gin-vue-admin.js | 6 ++---- web/src/core/global.js | 11 +++++++++++ .../view/layout/aside/historyComponent/history.vue | 1 - 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 web/src/core/global.js diff --git a/web/src/core/gin-vue-admin.js b/web/src/core/gin-vue-admin.js index e104f69a..fa2cb3e2 100644 --- a/web/src/core/gin-vue-admin.js +++ b/web/src/core/gin-vue-admin.js @@ -3,12 +3,10 @@ * * */ // 加载网站配置文件夹 -import config from './config' +import { register } from './global' export const run = function(app) { - app.config.globalProperties.$GIN_VUE_ADMIN = config - // app.use(uploader) - + register(app) console.log(` 欢迎使用 Gin-Vue-Admin 当前版本:V2.4.5 alpha diff --git a/web/src/core/global.js b/web/src/core/global.js new file mode 100644 index 00000000..988fd2d3 --- /dev/null +++ b/web/src/core/global.js @@ -0,0 +1,11 @@ +import config from './config' +import { emitter } from '@/utils/bus.js' + +const closeThisPage = () => { + emitter.emit('closeThisPage') +} + +export const register = (app) => { + app.config.globalProperties.$GIN_VUE_ADMIN = config + app.config.globalProperties.$CloseThisPage = closeThisPage +} diff --git a/web/src/view/layout/aside/historyComponent/history.vue b/web/src/view/layout/aside/historyComponent/history.vue index ee26c2f6..cd464d94 100644 --- a/web/src/view/layout/aside/historyComponent/history.vue +++ b/web/src/view/layout/aside/historyComponent/history.vue @@ -252,7 +252,6 @@ export default { }) }, removeTab(tab) { - console.log(tab) const index = this.historys.findIndex( item => getFmtString(item) === tab )