From d29bc132d5fc47a6e28e31933140edcf4943791a Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 11 Nov 2020 15:29:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B8=B8=E6=88=8Fip=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/common.js | 8 + src/api/games.js | 17 +- src/router/modules/games.js | 6 + src/views/games/details/index.vue | 1 + .../games/details/settings/SettingPanel.vue | 60 +-- src/views/games/details/settings/ip.vue | 380 ++++++++++++++++++ 7 files changed, 442 insertions(+), 31 deletions(-) create mode 100644 src/views/games/details/settings/ip.vue diff --git a/package.json b/package.json index eb3e9d8..61752a5 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "dependencies": { "axios": "0.18.0", "echarts": "^4.2.1", + "el-tree-transfer": "^2.3.2", "element-ui": "^2.9.1", "install": "^0.12.2", "js-cookie": "2.2.0", diff --git a/src/api/common.js b/src/api/common.js index b4f6c09..03e18a3 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -10,6 +10,14 @@ export function getRegions(params) { }) } +export function getRegionWithId(params) { + return request({ + url: '/common/loc/china_region_id', + method: 'get', + params, + }) +} + export function getAreas() { return request({ url: '/common/loc/china_area', diff --git a/src/api/games.js b/src/api/games.js index 2b6ecf0..1514dcf 100644 --- a/src/api/games.js +++ b/src/api/games.js @@ -57,7 +57,6 @@ export function deployCfg(data) { }) } - export function updateRC(data) { return request({ url: '/games/update_rc', @@ -65,3 +64,19 @@ export function updateRC(data) { data }) } + +export function getIpInfo(gid, pid) { + const url = `/games/ip/${gid}/${pid}` + return request({ + url: url, + method: 'get', + }) +} + +export function saveIpInfo(data) { + return request({ + url: '/games/ip/update', + method: 'post', + data + }) +} diff --git a/src/router/modules/games.js b/src/router/modules/games.js index 0808e40..22353ec 100644 --- a/src/router/modules/games.js +++ b/src/router/modules/games.js @@ -112,6 +112,12 @@ const gamesRouter = { name: 'GameDetailsBanner', meta: { title: 'Banner广告配置' } }, + { + path: 'settings/ip', + component: () => import('@/views/games/details/settings/ip'), + name: 'GameDetailsIP', + meta: { title: 'IP屏蔽' } + }, { path: 'recommendation', component: () => import('@/views/games/details/recommendation'), diff --git a/src/views/games/details/index.vue b/src/views/games/details/index.vue index 203ffa3..7023913 100644 --- a/src/views/games/details/index.vue +++ b/src/views/games/details/index.vue @@ -21,6 +21,7 @@ 签到 在线 banner + IP屏蔽 {{ tip - }} + }} - {{item.title}} + {{ item.title }} - + @@ -117,13 +117,13 @@ >发布 重置 -
+
@@ -137,16 +137,16 @@ class="mgb-20 multiple-select" style="width: 300px" value-key="key" - @remove-tag="delSetting" filterable + @remove-tag="delSetting" >
添加新的配置项 清空 - + - + 该值写入redis并传入客户端,请谨慎填写 - + @@ -280,9 +280,9 @@ +