diff --git a/src/api/ad.js b/src/api/ad.js
index 576356a..4103d2d 100644
--- a/src/api/ad.js
+++ b/src/api/ad.js
@@ -31,3 +31,34 @@ export function delAdPos(data) {
data,
})
}
+
+export function getAdAreaList() {
+ return request({
+ url: '/games/ad/get-area',
+ method: 'get',
+ })
+}
+
+export function saveAdArea(data) {
+ return request({
+ url: '/games/ad/save-area',
+ method: 'post',
+ data,
+ })
+}
+
+export function editAdArea(data) {
+ return request({
+ url: '/games/ad/edit-area',
+ method: 'post',
+ data,
+ })
+}
+
+export function delAdArea(data) {
+ return request({
+ url: '/games/ad/del-area',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/router/modules/games.js b/src/router/modules/games.js
index 9cda686..e955638 100644
--- a/src/router/modules/games.js
+++ b/src/router/modules/games.js
@@ -9,32 +9,38 @@ const gamesRouter = {
name: 'Games',
meta: {
title: '游戏管理',
- icon: 'games'
+ icon: 'games',
},
children: [
{
path: 'list',
component: () => import('@/views/games/list'), // Parent router-view
name: 'GameList',
- meta: { title: '游戏列表' }
+ meta: {title: '游戏列表'},
},
{
path: 'settings',
component: () => import('@/views/games/settings'), // Parent router-view
name: 'GameSettings',
- meta: { title: '配置项管理' }
+ meta: {title: '配置项管理'},
},
{
path: 'platforms',
component: () => import('@/views/games/platforms'), // Parent router-view
name: 'GamePlatforms',
- meta: { title: '平台管理' }
+ meta: {title: '平台管理'},
+ },
+ {
+ path: 'ad-area',
+ component: () => import('@/views/games/ad-area'), // Parent router-view
+ name: 'GameAdArea',
+ meta: {title: '广告区域管理'},
},
{
path: 'lib',
component: () => import('@/views/games/lib'), // Parent router-view
name: 'GameLib',
- meta: { title: '素材管理' }
+ meta: {title: '素材管理'},
},
{
path: 'details/:uid?',
@@ -44,256 +50,263 @@ const gamesRouter = {
hidden: true,
// meta: { title: '游戏信息' },
children: [
- {
- path: 'profile',
- component: () => import('@/views/games/details/profile'),
- name: 'GameDetailsProfile',
- meta: { title: '游戏简介' }
- },
+ // {
+ // path: 'profile',
+ // component: () => import('@/views/games/details/profile'),
+ // name: 'GameDetailsProfile',
+ // meta: { title: '游戏简介' }
+ // },
{
path: 'info',
component: () => import('@/views/games/details/info'),
name: 'GameDetailsInfo',
- meta: { title: '详细信息' }
+ meta: {title: '详细信息'},
},
{
path: 'data',
component: () => import('@/views/games/details/data'),
name: 'GameDetailsData',
- meta: { title: '数据' }
+ meta: {title: '数据'},
},
{
path: 'settings/index',
component: () => import('@/views/games/details/settings/index'),
name: 'GameDetailsSettings',
- meta: { title: '配置' }
+ meta: {title: '配置'},
},
{
path: 'settings/achievement',
component: () => import('@/views/games/details/settings/achievement'),
name: 'GameDetailsAchievement',
- meta: { title: '成就' }
+ meta: {title: '成就'},
},
{
path: 'settings/invitation',
component: () => import('@/views/games/details/settings/invitation'),
name: 'GameDetailsInvitation',
- meta: { title: '邀请' }
+ meta: {title: '邀请'},
},
{
path: 'settings/red-envelope',
- component: () => import('@/views/games/details/settings/red-envelope'),
+ component: () =>
+ import('@/views/games/details/settings/red-envelope'),
name: 'GameDetailsRedEnvelope',
- meta: { title: '红包' }
+ meta: {title: '红包'},
},
{
path: 'settings/sign',
component: () => import('@/views/games/details/settings/sign'),
name: 'GameDetailsSign',
- meta: { title: '签到' }
+ meta: {title: '签到'},
},
{
path: 'settings/online',
component: () => import('@/views/games/details/settings/online'),
name: 'GameDetailsOnline',
- meta: { title: '在线时长奖励' }
+ meta: {title: '在线时长奖励'},
+ },
+ {
+ path: 'settings/banner',
+ component: () => import('@/views/games/details/settings/banner'),
+ name: 'GameDetailsBanner',
+ meta: {title: 'Banner广告配置'},
},
{
path: 'recommendation',
component: () => import('@/views/games/details/recommendation'),
name: 'GameDetailsRecommendation',
- meta: { title: '关联推荐' }
+ meta: {title: '关联推荐'},
},
{
path: 'share',
component: () => import('@/views/games/details/share/index'),
name: 'GameDetailsShare',
- meta: { title: '分享图' }
+ meta: {title: '分享图'},
},
{
path: 'share/edit',
component: () => import('@/views/games/details/share/edit'),
name: 'GameDetailsShareEdit',
- meta: { title: '编辑分享图' }
+ meta: {title: '编辑分享图'},
},
{
path: 'reward',
component: () => import('@/views/games/details/reward'),
name: 'GameDetailsReward',
- meta: { title: '客服奖励' }
+ meta: {title: '客服奖励'},
},
{
path: 'ad-pos',
component: () => import('@/views/games/details/adPos'),
name: 'GameDetailsAdPos',
- meta: { title: '广告位置' }
- },
- {
- path: 'gm/servers',
- component: () => import('@/views/games/details/gm/servers'),
- name: 'GameDetailsGMServers',
- meta: { title: '服务器管理' }
- },
- {
- path: 'gm/announces',
- component: () => import('@/views/games/details/gm/announces'),
- name: 'GameDetailsGMAnnounces',
- meta: { title: '公告' }
- },
- {
- path: 'gm/scroll',
- component: () => import('@/views/games/details/gm/scroll'),
- name: 'GameDetailsGMScroll',
- meta: { title: '跑马灯' }
- },
- {
- path: 'gm/mails',
- component: () => import('@/views/games/details/gm/mails'),
- name: 'GameDetailsGMMails',
- meta: { title: '邮件' }
- },
- {
- path: 'gm/activities',
- component: () => import('@/views/games/details/gm/activities'),
- name: 'GameDetailsGMActivities',
- meta: { title: '活动' }
- },
- {
- path: 'gm/codes',
- component: () => import('@/views/games/details/gm/codes'),
- name: 'GameDetailsGMCodes',
- meta: { title: '兑换码' }
- },
- {
- path: 'gm/gifts',
- component: () => import('@/views/games/details/gm/gifts'),
- name: 'GameDetailsGMGifts',
- meta: { title: '礼包' }
- },
- {
- path: 'gm/recharge-record',
- component: () => import('@/views/games/details/gm/recharge-record'),
- name: 'GameDetailsGMRechargeRecord',
- meta: { title: '充值记录' }
- },
- {
- path: 'gm/recharge-request',
- component: () => import('@/views/games/details/gm/recharge-request'),
- name: 'GameDetailsGMRechargeRequest',
- meta: { title: '充值请求' }
- },
- {
- path: 'gm/users',
- component: () => import('@/views/games/details/gm/users'),
- name: 'GameDetailsGMUsers',
- meta: { title: '用户管理' }
- },
- {
- path: 'gm/forbid-account',
- component: () => import('@/views/games/details/gm/forbid-account'),
- name: 'GameDetailsGMForbidAccount',
- meta: { title: '封禁记录' }
- },
- {
- path: 'gm/forbid-speak',
- component: () => import('@/views/games/details/gm/forbid-speak'),
- name: 'GameDetailsGMForbidSpeak',
- meta: { title: '禁言记录' }
- },
- {
- path: 'gm/chat-logs',
- component: () => import('@/views/games/details/gm/chat-logs'),
- name: 'GameDetailsGMChatLogs',
- meta: { title: '聊天记录' }
- },
- {
- path: 'gm/op-logs',
- component: () => import('@/views/games/details/gm/op-logs'),
- name: 'GameDetailsGMOpLogs',
- meta: { title: '操作记录' }
- },
- {
- path: 'doll/dolls/index',
- component: () => import('@/views/games/details/doll/dolls/index'),
- name: 'GameDetailsDollDollsIndex',
- meta: { title: '公仔列表' }
- },
- {
- path: 'doll/dolls/edit',
- component: () => import('@/views/games/details/doll/dolls/edit'),
- name: 'GameDetailsDollDollsEdit',
- meta: { title: '编辑公仔' }
- },
- {
- path: 'doll/cards/index',
- component: () => import('@/views/games/details/doll/cards/index'),
- name: 'GameDetailsDollCardsIndex',
- meta: { title: '卡片列表' }
- },
- {
- path: 'doll/cards/edit',
- component: () => import('@/views/games/details/doll/cards/edit'),
- name: 'GameDetailsDollCardsEdit',
- meta: { title: '编辑卡片' }
- },
- {
- path: 'doll/exchange',
- component: () => import('@/views/games/details/doll/exchange'),
- name: 'GameDetailsDollExchange',
- meta: { title: '兑换记录' }
- },
- {
- path: 'doll/points',
- component: () => import('@/views/games/details/doll/points'),
- name: 'GameDetailsDollPoints',
- meta: { title: '积分墙' }
- },
- {
- path: 'puzzle/questions',
- component: () => import('@/views/games/details/puzzle/questions'),
- name: 'GameDetailsPuzzleQuestions',
- meta: { title: '题库管理' }
- },
- {
- path: 'puzzle/levels',
- component: () => import('@/views/games/details/puzzle/levels'),
- name: 'GameDetailsPuzzleLevels',
- meta: { title: '关卡' }
- },
- {
- path: 'emulate/games/index',
- component: () => import('@/views/games/details/emulate/games/index'),
- name: 'GameDetailsEmulateGames',
- meta: { title: '模拟器游戏列表' }
- },
- {
- path: 'emulate/games/edit',
- component: () => import('@/views/games/details/emulate/games/edit'),
- name: 'GameDetailsEmulateGames',
- meta: { title: '编辑模拟器游戏' }
- },
- {
- path: 'emulate/recommend',
- component: () => import('@/views/games/details/emulate/recommend'),
- name: 'GameDetailsEmulateRecommend',
- meta: { title: '游戏推荐' }
+ meta: {title: '广告位置'},
},
+ // {
+ // path: 'gm/servers',
+ // component: () => import('@/views/games/details/gm/servers'),
+ // name: 'GameDetailsGMServers',
+ // meta: { title: '服务器管理' }
+ // },
+ // {
+ // path: 'gm/announces',
+ // component: () => import('@/views/games/details/gm/announces'),
+ // name: 'GameDetailsGMAnnounces',
+ // meta: { title: '公告' }
+ // },
+ // {
+ // path: 'gm/scroll',
+ // component: () => import('@/views/games/details/gm/scroll'),
+ // name: 'GameDetailsGMScroll',
+ // meta: { title: '跑马灯' }
+ // },
+ // {
+ // path: 'gm/mails',
+ // component: () => import('@/views/games/details/gm/mails'),
+ // name: 'GameDetailsGMMails',
+ // meta: { title: '邮件' }
+ // },
+ // {
+ // path: 'gm/activities',
+ // component: () => import('@/views/games/details/gm/activities'),
+ // name: 'GameDetailsGMActivities',
+ // meta: { title: '活动' }
+ // },
+ // {
+ // path: 'gm/codes',
+ // component: () => import('@/views/games/details/gm/codes'),
+ // name: 'GameDetailsGMCodes',
+ // meta: { title: '兑换码' }
+ // },
+ // {
+ // path: 'gm/gifts',
+ // component: () => import('@/views/games/details/gm/gifts'),
+ // name: 'GameDetailsGMGifts',
+ // meta: { title: '礼包' }
+ // },
+ // {
+ // path: 'gm/recharge-record',
+ // component: () => import('@/views/games/details/gm/recharge-record'),
+ // name: 'GameDetailsGMRechargeRecord',
+ // meta: { title: '充值记录' }
+ // },
+ // {
+ // path: 'gm/recharge-request',
+ // component: () => import('@/views/games/details/gm/recharge-request'),
+ // name: 'GameDetailsGMRechargeRequest',
+ // meta: { title: '充值请求' }
+ // },
+ // {
+ // path: 'gm/users',
+ // component: () => import('@/views/games/details/gm/users'),
+ // name: 'GameDetailsGMUsers',
+ // meta: { title: '用户管理' }
+ // },
+ // {
+ // path: 'gm/forbid-account',
+ // component: () => import('@/views/games/details/gm/forbid-account'),
+ // name: 'GameDetailsGMForbidAccount',
+ // meta: { title: '封禁记录' }
+ // },
+ // {
+ // path: 'gm/forbid-speak',
+ // component: () => import('@/views/games/details/gm/forbid-speak'),
+ // name: 'GameDetailsGMForbidSpeak',
+ // meta: { title: '禁言记录' }
+ // },
+ // {
+ // path: 'gm/chat-logs',
+ // component: () => import('@/views/games/details/gm/chat-logs'),
+ // name: 'GameDetailsGMChatLogs',
+ // meta: { title: '聊天记录' }
+ // },
+ // {
+ // path: 'gm/op-logs',
+ // component: () => import('@/views/games/details/gm/op-logs'),
+ // name: 'GameDetailsGMOpLogs',
+ // meta: { title: '操作记录' }
+ // },
+ // {
+ // path: 'doll/dolls/index',
+ // component: () => import('@/views/games/details/doll/dolls/index'),
+ // name: 'GameDetailsDollDollsIndex',
+ // meta: { title: '公仔列表' }
+ // },
+ // {
+ // path: 'doll/dolls/edit',
+ // component: () => import('@/views/games/details/doll/dolls/edit'),
+ // name: 'GameDetailsDollDollsEdit',
+ // meta: { title: '编辑公仔' }
+ // },
+ // {
+ // path: 'doll/cards/index',
+ // component: () => import('@/views/games/details/doll/cards/index'),
+ // name: 'GameDetailsDollCardsIndex',
+ // meta: { title: '卡片列表' }
+ // },
+ // {
+ // path: 'doll/cards/edit',
+ // component: () => import('@/views/games/details/doll/cards/edit'),
+ // name: 'GameDetailsDollCardsEdit',
+ // meta: { title: '编辑卡片' }
+ // },
+ // {
+ // path: 'doll/exchange',
+ // component: () => import('@/views/games/details/doll/exchange'),
+ // name: 'GameDetailsDollExchange',
+ // meta: { title: '兑换记录' }
+ // },
+ // {
+ // path: 'doll/points',
+ // component: () => import('@/views/games/details/doll/points'),
+ // name: 'GameDetailsDollPoints',
+ // meta: { title: '积分墙' }
+ // },
+ // {
+ // path: 'puzzle/questions',
+ // component: () => import('@/views/games/details/puzzle/questions'),
+ // name: 'GameDetailsPuzzleQuestions',
+ // meta: { title: '题库管理' }
+ // },
+ // {
+ // path: 'puzzle/levels',
+ // component: () => import('@/views/games/details/puzzle/levels'),
+ // name: 'GameDetailsPuzzleLevels',
+ // meta: { title: '关卡' }
+ // },
+ // {
+ // path: 'emulate/games/index',
+ // component: () => import('@/views/games/details/emulate/games/index'),
+ // name: 'GameDetailsEmulateGames',
+ // meta: { title: '模拟器游戏列表' }
+ // },
+ // {
+ // path: 'emulate/games/edit',
+ // component: () => import('@/views/games/details/emulate/games/edit'),
+ // name: 'GameDetailsEmulateGames',
+ // meta: { title: '编辑模拟器游戏' }
+ // },
+ // {
+ // path: 'emulate/recommend',
+ // component: () => import('@/views/games/details/emulate/recommend'),
+ // name: 'GameDetailsEmulateRecommend',
+ // meta: { title: '游戏推荐' }
+ // },
{
path: 'mp/edit',
component: () => import('@/views/games/details/mp/edit'),
name: 'GameDetailsMpEdit',
- meta: { title: '分享小程序模板编辑' }
+ meta: {title: '分享小程序模板编辑'},
},
{
path: 'mp/index',
component: () => import('@/views/games/details/mp/index'),
name: 'GameDetailsMp',
- meta: { title: '分享小程序模板列表' }
+ meta: {title: '分享小程序模板列表'},
},
- ]
- }
- ]
+ ],
+ },
+ ],
}
export default gamesRouter
diff --git a/src/views/games/ad-area.vue b/src/views/games/ad-area.vue
new file mode 100644
index 0000000..c00495e
--- /dev/null
+++ b/src/views/games/ad-area.vue
@@ -0,0 +1,272 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 确 定
+
+
+
+
+
+
diff --git a/src/views/games/details/index.vue b/src/views/games/details/index.vue
index 4c8e540..9ab051b 100644
--- a/src/views/games/details/index.vue
+++ b/src/views/games/details/index.vue
@@ -36,6 +36,10 @@
v-if="uid !== 'new'"
:index="`/games/details/${uid}/settings/online`"
>在线
+ banner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ `区域:${areaList[item.id]&& areaList[item.id].label || '待定' }`}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 可填写广告 ID,或选择随机 ID
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+ 保存
+ 跳转发布
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/games/details/settings/online.vue b/src/views/games/details/settings/online.vue
index 67be8a3..50fde12 100644
--- a/src/views/games/details/settings/online.vue
+++ b/src/views/games/details/settings/online.vue
@@ -76,9 +76,9 @@
{{ `${item.name}` || '未命名'}}