|
@@ -1,5 +1,4 @@
|
|
|
import axios from "axios"
|
|
|
-import historyRawData from "@/assets/mock/history.json"
|
|
|
|
|
|
// axios({
|
|
|
// method: 'post',
|
|
@@ -39,57 +38,37 @@ export default {
|
|
|
return res.data.data.records
|
|
|
})
|
|
|
},
|
|
|
- // getHistoryList({
|
|
|
- // pageNum = 0,
|
|
|
- // pageSize = 0,
|
|
|
- // searchKey = '',
|
|
|
- // stage = '',
|
|
|
- // } = {}) {
|
|
|
- // return axios({
|
|
|
- // method: 'post',
|
|
|
- // url: `${process.env.VUE_APP_API_ORIGIN}/api/show/history/pageList`,
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/json",
|
|
|
- // },
|
|
|
- // data: {
|
|
|
- // pageNum,
|
|
|
- // pageSize,
|
|
|
- // searchKey,
|
|
|
- // stage,
|
|
|
- // },
|
|
|
- // }).then((res) => {
|
|
|
- // return res.data.data.records
|
|
|
- // })
|
|
|
- // },
|
|
|
getHistoryList({
|
|
|
pageNum = 0,
|
|
|
pageSize = 0,
|
|
|
searchKey = '',
|
|
|
stage = '',
|
|
|
} = {}) {
|
|
|
- const ret = historyRawData['阶段任务信息'].find((item) => {
|
|
|
- return item['所属阶段'] === stage
|
|
|
- }).children.map((item) => {
|
|
|
- return {
|
|
|
- companyName: item['品牌'],
|
|
|
- description: item['简介'],
|
|
|
- id: item['序号'],
|
|
|
- name: item['名称'],
|
|
|
+ return axios({
|
|
|
+ method: 'post',
|
|
|
+ url: `${process.env.VUE_APP_API_ORIGIN}/api/show/history/pageList`,
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ pageNum,
|
|
|
+ pageSize,
|
|
|
+ searchKey,
|
|
|
stage,
|
|
|
- story: item['故事'],
|
|
|
- }
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ return res.data.data.records
|
|
|
})
|
|
|
- return Promise.resolve(ret)
|
|
|
},
|
|
|
- // getHistoryDetail(id) {
|
|
|
- // return axios({
|
|
|
- // method: 'get',
|
|
|
- // url: `${process.env.VUE_APP_API_ORIGIN}/api/show/history/detail/${id}`,
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/json",
|
|
|
- // },
|
|
|
- // }).then((res) => {
|
|
|
- // return res.data.data
|
|
|
- // })
|
|
|
- // }
|
|
|
+ getHistoryDetail(id) {
|
|
|
+ return axios({
|
|
|
+ method: 'get',
|
|
|
+ url: `${process.env.VUE_APP_API_ORIGIN}/api/show/history/detail/${id}`,
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ return res.data.data
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|