diff --git a/backend/GameMode.exe b/backend/GameMode.exe
new file mode 100644
index 0000000..e204bde
Binary files /dev/null and b/backend/GameMode.exe differ
diff --git a/src/api/autoCounterPart.js b/src/api/autoCounterPart.js
new file mode 100644
index 0000000..bd90b42
--- /dev/null
+++ b/src/api/autoCounterPart.js
@@ -0,0 +1,23 @@
+import request from "@/utils/request.js";
+
+
+
+export const getCounterPartListInterface = () => {
+}
+
+export const addCounterPartInterface = (id) => {
+}
+
+export const getCounterPartTableInterface = () => {
+}
+
+export const editCounterPartInterface = (id) => {}
+
+export const deleteCounterPartInterface = (id) => {}
+
+export const resetCounterPartInterface = (id) => {}
+
+export const getCounterPartItemInterface = (id) => {}
+
+export const getAllUser = () => {}
+
diff --git a/src/api/byte.js b/src/api/byte.js
index 5820cca..8e69233 100644
--- a/src/api/byte.js
+++ b/src/api/byte.js
@@ -1,9 +1,9 @@
import request from '@/utils/request.js'
-export const sendByteInterface = (context) => {
- return request.get('/api/test', {
+export const sendByteInterface = (nick, pid, src) => {
+ return request.get('/test/send', {
params: {
- byte: context
+ nick, pid, src
}
})
}
diff --git a/src/api/login.js b/src/api/login.js
index f5e6ce1..7fec722 100644
--- a/src/api/login.js
+++ b/src/api/login.js
@@ -7,3 +7,17 @@ export const gameLoginInterface = (username, password) => {
password: password,
})
}
+
+export const addRoleInterface = (username, password) => {
+ return request.get('/login/add', {
+ params: {
+ acc: username,
+ pwd: password,
+ }
+ })
+}
+
+export const getRolesInterface = () => {
+ return request.get('/login/roles')
+}
+
diff --git a/src/api/maze.js b/src/api/maze.js
new file mode 100644
index 0000000..dc1d814
--- /dev/null
+++ b/src/api/maze.js
@@ -0,0 +1,13 @@
+import request from "@/utils/request.js";
+
+export const getMazeTasksInterface = () => {
+ return request.get('/migong/missions')
+}
+
+export const addMazeTaskInterface = (nick) => {
+ return request.get('/migong/add', {
+ params: {
+ nick: nick
+ }
+ })
+}
diff --git a/src/router/index.js b/src/router/index.js
index 4001c5f..ac3e127 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -14,6 +14,7 @@ const router = createRouter({
{path: '/toolBox/common', component: () => import('@/views/toolBox/commonPage.vue')},
{path: '/toolBox/test', component: () => import('@/views/toolBox/testPage.vue')},
{path: '/autoCounterPart', component: () => import('@/views/autoCounterPart/autoCounterPartPage.vue')},
+ {path: '/maze', component: () => import('@/views/maze/mazePage.vue')},
]
},
diff --git a/src/stores/modules/autoCounterPart.js b/src/stores/modules/autoCounterPart.js
new file mode 100644
index 0000000..44e66d8
--- /dev/null
+++ b/src/stores/modules/autoCounterPart.js
@@ -0,0 +1,97 @@
+import {defineStore} from "pinia";
+import {ref} from "vue";
+
+import {getCounterPartListInterface} from "@/api/autoCounterPart.js";
+
+
+export const useAutoCounterPart = defineStore("AutoCounterPart", () => {
+ const counterPartList = ref([
+ {
+ id: 1,
+ name: '啵咕'
+ },
+ {
+ id: 2,
+ name: '蚂蚁'
+ },
+ {
+ id: 3,
+ name: '小鸡'
+ },
+ ])
+ const counterPartTable = ref([
+ {
+ id: 1,
+ name: '啵咕',
+ count: 15
+ },
+ {
+ id: 2,
+ name: '蚂蚁',
+ count: 30
+ },
+ {
+ id: 3,
+ name: '小鸡',
+ count: 6
+ },
+ ])
+
+ const counterPartItem = ref([
+ {
+ id: 1,
+ fight: true
+ },
+ {
+ id: 2,
+ fight: false
+ },
+ {
+ id: 3,
+ fight: false
+ },
+ {
+ id: 4,
+ fight: true
+ }
+ ])
+
+ const users = ref([
+ {
+ id: 1,
+ name: '张三'
+ },
+ {
+ id: 2,
+ name: '李四'
+ },
+ {
+ id: 3,
+ name: '王二麻子'
+ },
+ {
+ id: 4,
+ name: '约翰'
+ },
+ {
+ id: 5,
+ name: '杰克'
+ },
+ {
+ id: 6,
+ name: '奥特曼'
+ },
+ ])
+
+
+ const getCounterPartList = async () => {
+ return
+ // const res = await getCounterPartList(counterPartList)
+ // counterPartList.value = res.data
+ }
+
+ return {
+ counterPartTable, counterPartList, counterPartItem, users,
+ getCounterPartList,
+ }
+})
diff --git a/src/stores/modules/maze.js b/src/stores/modules/maze.js
new file mode 100644
index 0000000..51bcb44
--- /dev/null
+++ b/src/stores/modules/maze.js
@@ -0,0 +1,17 @@
+import {defineStore} from "pinia";
+import {ref} from 'vue'
+import {getMazeTasksInterface} from "@/api/maze.js";
+
+export const useMazeStore = defineStore('mazeStore', () => {
+ const task = ref([])
+
+ const getMazeTasks = async () => {
+ const res = await getMazeTasksInterface()
+ task.value = res.data
+ }
+
+ return {
+ task,
+ getMazeTasks,
+ }
+})
diff --git a/src/stores/modules/roles.js b/src/stores/modules/roles.js
new file mode 100644
index 0000000..799fef4
--- /dev/null
+++ b/src/stores/modules/roles.js
@@ -0,0 +1,19 @@
+import {defineStore} from "pinia";
+import {ref} from 'vue'
+import {getRolesInterface} from "@/api/login.js";
+
+export const useRolesStore = defineStore('rolesStore', () => {
+ const liveRoles = ref([])
+ const currentRole = ref('')
+
+ const getRoles = async () => {
+ const res = await getRolesInterface()
+ liveRoles.value = res.data
+ }
+
+ return {
+ liveRoles, currentRole,
+ getRoles
+ }
+})
+
diff --git a/src/utils/request.js b/src/utils/request.js
index 663f249..b34959a 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -1,28 +1,35 @@
import axios from "axios";
+import {ElMessage} from 'element-plus'
const instance = axios.create({
- baseURL: 'http://localhost:5000',
- timeout: 10000,
- // headers: {'X-Custom-Header': 'foobar'}
+ baseURL: 'http://localhost:8080',
+ timeout: 10000,
+ // headers: {'X-Custom-Header': 'foobar'}
});
// 添加请求拦截器
instance.interceptors.request.use(function (config) {
// 在发送请求之前做些什么
return config;
- }, function (error) {
+}, function (error) {
// 对请求错误做些什么
+ console.log(error)
return Promise.reject(error);
- });
+});
// 添加响应拦截器
instance.interceptors.response.use(function (response) {
// 对响应数据做点什么
+ // 方便调试用
+ ElMessage({
+ message: response.data,
+ type: 'success',
+ })
return response;
- }, function (error) {
+}, function (error) {
// 对响应错误做点什么
return Promise.reject(error);
- });
+});
export default instance
diff --git a/src/views/autoCounterPart/autoCounterPartPage.vue b/src/views/autoCounterPart/autoCounterPartPage.vue
index edec389..af194d1 100644
--- a/src/views/autoCounterPart/autoCounterPartPage.vue
+++ b/src/views/autoCounterPart/autoCounterPartPage.vue
@@ -1,23 +1,34 @@
@@ -27,38 +38,43 @@ const visible = ref(true)
- 副本{{ item }}
-
+
- 添加
- 关闭拦截
- 拦截测试
+ 添加
+ 关闭拦截
+ 拦截测试
- {{ scope.row.Name }}
+ {{ scope.row.name }}
- {{ scope.row.Count }}
+ {{ scope.row.count }}
- 复位
- 编辑
- 删除
+ 复位
+ 编辑
+ 删除
@@ -67,12 +83,20 @@ const visible = ref(true)
配置
保存
- 取消
+ 取消
刷新用户
-
-
+
+
+
diff --git a/src/views/layout/gameLogin.vue b/src/views/layout/gameLogin.vue
index 71682f4..121169f 100644
--- a/src/views/layout/gameLogin.vue
+++ b/src/views/layout/gameLogin.vue
@@ -1,11 +1,14 @@
@@ -49,6 +52,13 @@
+
+
+
+
+ 迷宫寻宝
+
+
@@ -90,11 +100,13 @@
-
+
+
@@ -130,6 +142,10 @@
border-bottom: 1px solid #777;
height: 50px;
line-height: 50px;
+
+ .refresh {
+ margin-left: 10px;
+ }
}
diff --git a/src/views/maze/mazePage.vue b/src/views/maze/mazePage.vue
new file mode 100644
index 0000000..95ea736
--- /dev/null
+++ b/src/views/maze/mazePage.vue
@@ -0,0 +1,40 @@
+
+
+
+ 添加任务
+ 获取任务
+
+
+
+
+
+
+
+
diff --git a/src/views/toolBox/bytePage.vue b/src/views/toolBox/bytePage.vue
index 3a80908..3b273a8 100644
--- a/src/views/toolBox/bytePage.vue
+++ b/src/views/toolBox/bytePage.vue
@@ -1,21 +1,40 @@
@@ -26,7 +45,12 @@ const sendByte = async () => {
:rules="rules"
ref="byteForm"
>
-
+
+
+
+