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 @@ +