本地调试成功

This commit is contained in:
2023-03-12 20:08:43 +08:00
parent 304f2fbd0c
commit cc95f82b7f
29 changed files with 132 additions and 74 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 264 KiB

+1 -1
View File
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<title>KoS</title>
</head>
<body>
<noscript>
+21 -21
View File
@@ -1,5 +1,5 @@
import $ from "jquery";
import store from ".";
// import $ from "jquery";
// import store from ".";
export default {
state: {
@@ -22,25 +22,25 @@ export default {
},
},
actions: {
getRecordList(context, data) {
// 获取 Bot 列表
$.ajax({
url: "http://localhost:3001/api/record/getlist/",
data: {
page_index: data.page,
},
type: "GET",
headers: {
Authorization: "Bearer " + store.state.user.token,
},
success(resp) {
data.success(resp);
},
error(resp) {
data.error(resp);
},
});
},
// getRecordList(context, data) {
// // 获取 Bot 列表
// $.ajax({
// url: "http://localhost:3001/api/record/getlist/",
// data: {
// page_index: data.page,
// },
// type: "GET",
// headers: {
// Authorization: "Bearer " + store.state.user.token,
// },
// success(resp) {
// data.success(resp);
// },
// error(resp) {
// data.error(resp);
// },
// });
// },
},
modules: {},
};
+1 -1
View File
@@ -93,7 +93,7 @@ export default {
$.ajax({
url: "http://localhost:3001/api/ranklist/getranklist/",
data: {
page_index:page,
page_index: page,
},
type: "GET",
headers: {
+10 -3
View File
@@ -62,6 +62,7 @@ import ContentBase from "../../components/ContentBase.vue";
import { useStore } from 'vuex';
import { ref } from "vue";
import router from "@/router/index";
import $ from "jquery";
export default {
components: {
@@ -103,9 +104,15 @@ export default {
const pull_page = (page) => { // 加载分页
current_page = page; // 更新页面序号
store.dispatch("getRecordList", {
page,
$.ajax({
url: "http://localhost:3001/api/record/getlist/",
data: {
page_index: page,
},
type: "GET",
headers: {
Authorization: "Bearer " + store.state.user.token,
},
success(resp) {
console.log(resp.records);
records.value = resp.records;