Skip to content

Commit

Permalink
chore(quest): 任务请求改用post
Browse files Browse the repository at this point in the history
  • Loading branch information
X3ZvaWQ committed Oct 29, 2024
1 parent f861e5f commit bef01d5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
12 changes: 6 additions & 6 deletions src/service/quest.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { $node, $cms } from "@jx3box/jx3box-common/js/https";
const $ = $node();

/* import axios from 'axios'
const $ = axios.create({
baseURL: 'http://localhost:7002/',
}) */
// import axios from "axios";
// const $ = axios.create({
// baseURL: "http://localhost:7002/",
// });

export function getCategory(params) {
return $.get(`/quest/category`, { params });
Expand All @@ -14,8 +14,8 @@ export function getQuest(params) {
return $.get(`/quest/`, { params });
}

export function getQuests(params) {
return $.get(`/quests`, { params });
export function getQuests(params, body) {
return $.post(`/quests`, body, { params });
}

export function getNewestQuests(params) {
Expand Down
20 changes: 12 additions & 8 deletions src/views/quest/search-result.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ export default {
},
methods: {
search(page = 1) {
getQuests({
keyword: this.keyword,
chain: this.chain,
map_id: this.map_id,
client: this.client,
filter: this.filter,
page,
}).then((res) => {
getQuests(
{
keyword: this.keyword,
chain: this.chain,
map_id: this.map_id,
client: this.client,
page,
},
{
filter: this.filter,
}
).then((res) => {
this.result = res.data.list;
this.total = res.data.total;
this.pageSize = res.data.per;
Expand Down

0 comments on commit bef01d5

Please sign in to comment.