diff --git a/.eslintrc.js b/.eslintrc.js index c8a9d4b..880105d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,7 +25,6 @@ module.exports = { "vue/multiline-html-element-content-newline":"off", "vue/name-property-casing": ["error", "PascalCase"], "vue/no-v-html": "off", - "vue/no-reserved-keys": "off", "vue/html-closing-bracket-spacing": ["error", { "startTag": "never", "endTag": "never", diff --git a/src/router/modules/games.js b/src/router/modules/games.js index 66cc7a5..0d1727c 100644 --- a/src/router/modules/games.js +++ b/src/router/modules/games.js @@ -25,7 +25,7 @@ const gamesRouter = { meta: { title: '配置项管理' } }, { - path: 'details/:_id?', + path: 'details/:uid?', component: () => import('@/views/games/details/index'), // Parent router-view redirect: '/games/details/profile', name: 'GameDetails', diff --git a/src/views/dashboard/components/GameCard.vue b/src/views/dashboard/components/GameCard.vue index 4e97fd2..745f9a9 100644 --- a/src/views/dashboard/components/GameCard.vue +++ b/src/views/dashboard/components/GameCard.vue @@ -3,20 +3,17 @@
- +

- 蔚蓝战纪 - - + {{info.game_name}} + +

- 策略养成 - 已上线 + {{info.show_type}} + {{info.status_show}}
@@ -24,7 +21,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 73c446e..1cb0408 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -8,7 +8,7 @@
早安,{{ userInfo.fullname }},祝你开心每一天! - 这个人很懒,什么都没留下 + {{userInfo.signature || '这个人很懒,什么都没留下'}}
@@ -17,20 +17,13 @@
游戏概览 - 游戏列表 + + 游戏列表 +
- - - - - - - - - - - + +
@@ -64,16 +57,42 @@ import GameCard from './components/GameCard' import NewsItem from './components/NewsItem' import { mapGetters } from 'vuex' +import request from '@/utils/request' export default { name: 'Dashboard', - + data() { + return { + gameList: [] + } + }, + mounted() { + this.getGameList() + }, components: { GameCard, NewsItem }, computed: { ...mapGetters(['userInfo']) + }, + methods: { + getGameList() { + request({ + url: '/api/games/list', + method: 'get' + }).then(res => { + const { data } = res + if (data.errcode !== 0) { + this.$notify.error({ + title: '错误', + message: data.errmsg + }) + return + } + this.gameList = data.gameList + }) + } } } diff --git a/src/views/games/details/index.vue b/src/views/games/details/index.vue index df0b6ed..bc9909d 100644 --- a/src/views/games/details/index.vue +++ b/src/views/games/details/index.vue @@ -2,45 +2,45 @@
- 简介 - 详情 - 配置 - 推荐 - 分享 - 奖励 - + 简介 + 详情 + 配置 + 推荐 + 分享 + 奖励 + - 服务器管理 - 公告 - 跑马灯 - 邮件 - 活动 - 兑换码 - 礼包 - 充值记录 - 充值请求 - 用户管理 - 封禁记录 - 禁言记录 - 聊天记录 - 操作记录 + 服务器管理 + 公告 + 跑马灯 + 邮件 + 活动 + 兑换码 + 礼包 + 充值记录 + 充值请求 + 用户管理 + 封禁记录 + 禁言记录 + 聊天记录 + 操作记录 - + - 公仔 - 卡片 - 兑换记录 - 积分墙 + 公仔 + 卡片 + 兑换记录 + 积分墙 - + - 题库管理 - 关卡 + 题库管理 + 关卡 - + - 游戏列表 - 游戏推荐 + 游戏列表 + 游戏推荐 @@ -52,7 +52,7 @@ export default { name: 'GameDetails', data() { return { - _id: '' + uid: '' } }, computed: { @@ -61,7 +61,7 @@ export default { } }, created() { - this._id = this.$route.params._id || 'new' + this.uid = this.$route.params.uid || 'new' } } diff --git a/src/views/games/details/info.vue b/src/views/games/details/info.vue index b7e13e9..1ef18ec 100644 --- a/src/views/games/details/info.vue +++ b/src/views/games/details/info.vue @@ -77,7 +77,7 @@ - 保存 + 保存 返回 @@ -86,12 +86,14 @@