From 5939a24f544da51c7de199dcc51c5eeed377a133 Mon Sep 17 00:00:00 2001 From: SliverHorn <45428434+SliverHorn@users.noreply.github.com> Date: Thu, 8 Apr 2021 18:14:21 +0800 Subject: [PATCH 1/5] Update sys_casbin.go --- server/model/sys_casbin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/model/sys_casbin.go b/server/model/sys_casbin.go index 83f55f4d..9bb19886 100644 --- a/server/model/sys_casbin.go +++ b/server/model/sys_casbin.go @@ -1,7 +1,7 @@ package model type CasbinModel struct { - Ptype string `json:"ptype" gorm:"column:p_type"` + Ptype string `json:"ptype" gorm:"column:ptype"` AuthorityId string `json:"rolename" gorm:"column:v0"` Path string `json:"path" gorm:"column:v1"` Method string `json:"method" gorm:"column:v2"` From 2cce33afc3909290fb718e9b924cfa7c660085af Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Wed, 7 Apr 2021 14:40:48 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=B8=85=E7=90=86=20debugger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/view/superAdmin/api/api.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/web/src/view/superAdmin/api/api.vue b/web/src/view/superAdmin/api/api.vue index e48192c8..1d94642f 100644 --- a/web/src/view/superAdmin/api/api.vue +++ b/web/src/view/superAdmin/api/api.vue @@ -193,7 +193,6 @@ export default { }, async onDelete(){ const ids = this.apis.map(item=>item.ID) - debugger const res = await deleteApisByIds({ids}) if(res.code==0){ this.$message({ From d0c576fafa734eac130f9b576c347268010b3a1f Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Sat, 10 Apr 2021 10:28:48 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=97=B6=E6=95=88=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DImage=E7=BB=84=E4=BB=B6=E6=9C=AA=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/directive/auth.js | 3 +-- web/src/main.js | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/directive/auth.js b/web/src/directive/auth.js index bf6fc829..821e52d1 100644 --- a/web/src/directive/auth.js +++ b/web/src/directive/auth.js @@ -1,10 +1,10 @@ // 权限按钮展示指令 import { store } from '@/store/index' -const userInfo = store.getters['user/userInfo'] export const auth = (Vue) => { Vue.directive('auth', { // 当被绑定的元素插入到 DOM 中时…… bind: function (el, binding) { + const userInfo = store.getters['user/userInfo'] let type = "" switch (Object.prototype.toString.call(binding.value)) { case "[object Array]": @@ -27,7 +27,6 @@ export const auth = (Vue) => { return } const waitUse = binding.value.toString().split(",") - let flag = waitUse.some(item=>item==userInfo.authorityId) if (binding.modifiers.not) { flag = !flag diff --git a/web/src/main.js b/web/src/main.js index cd7044d6..86fcb3fa 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -52,7 +52,8 @@ import { Steps, Upload, Progress, - MessageBox + MessageBox, + Image } from 'element-ui'; Vue.use(Button); @@ -103,6 +104,7 @@ Vue.use(Upload); Vue.use(Progress); Vue.use(Scrollbar); Vue.use(Loading.directive); +Vue.use(Image) Vue.prototype.$loading = Loading.service; Vue.prototype.$message = Message; From a5a2250870d25e0886e932c2c98b7aff2c548193 Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Tue, 13 Apr 2021 11:47:30 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/server.go | 2 +- web/src/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/core/server.go b/server/core/server.go index d6a3d8ee..573d32f1 100644 --- a/server/core/server.go +++ b/server/core/server.go @@ -29,7 +29,7 @@ func RunWindowsServer() { fmt.Printf(` 欢迎使用 Gin-Vue-Admin - 当前版本:V2.4.0 + 当前版本:V2.4.1 加群方式:微信号:shouzi_1994 QQ群:622360840 默认自动化文档地址:http://127.0.0.1%s/swagger/index.html 默认前端文件运行地址:http://127.0.0.1:8080 diff --git a/web/src/main.js b/web/src/main.js index 86fcb3fa..2884878a 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -149,7 +149,7 @@ export default new Vue({ console.log(` 欢迎使用 Gin-Vue-Admin - 当前版本:V2.4.0 + 当前版本:V2.4.1 加群方式:微信:shouzi_1994 QQ群:622360840 默认自动化文档地址:http://127.0.0.1%s/swagger/index.html 默认前端文件运行地址:http://127.0.0.1:8080 From 06c6617a78806eda423f0dc86310d4c8254f94ba Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Fri, 16 Apr 2021 10:29:32 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=89=8D=E7=AB=AFneedIni?= =?UTF-8?q?t=E6=8A=A5=E9=94=99=E5=AF=BC=E8=87=B4=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/utils/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/utils/request.js b/web/src/utils/request.js index 640985d6..c7a445cf 100644 --- a/web/src/utils/request.js +++ b/web/src/utils/request.js @@ -66,7 +66,7 @@ service.interceptors.response.use( store.commit('user/setToken', response.headers["new-token"]) } if(response.data.code == 0){ - if(response.data.data.needInit){ + if(response.data.data?.needInit){ Message({ type:"info", message:"您是第一次使用,请初始化"