123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- import axios from "axios"
- import generalData from "@/assets/mock/general.json"
- // axios({
- // method: 'post',
- // url: `${config.backendDir}visit/saveType`,
- // headers: {
- // appId: "CA02F83A5FA162B930AA2F962D202F43B0F6DE0B51AD79FEDB03FA8202BB4909330105B3B347510D87C97060C4288280D4A744E00565A4EC",
- // "Content-Type": "application/json",
- // },
- // data: {
- // moduleType,
- // type: 'visit',
- // },
- // })
- export default {
- // getGeneralList() {
- // const listKeyNameCorrected = generalData.data.map((item) => {
- // const ret = {
- // id: item.id,
- // name: item.name,
- // createDay: item.createTime,
- // description: item.content,
- // }
- // return ret
- // })
- // listKeyNameCorrected.sort((a, b) => {
- // return Date.parse(a.createDay.substring(0, 4)) - Date.parse(b.createDay.substring(0, 4))
- // })
- // return Promise.resolve(listKeyNameCorrected)
- // },
- getSiteInfo() {
- return axios({
- method: 'get',
- url: `${process.env.VUE_APP_API_ORIGIN}/api/show/site/getInfo`,
- headers: {
- "Content-Type": "application/json",
- },
- }).then((res) => {
- return JSON.parse(res.data.data)
- })
- },
- getGeneralList({
- endTime = '',
- pageNum = 0,
- pageSize = 10000,
- searchKey = '',
- startTime = '',
- } = {}) {
- return axios({
- method: 'post',
- url: `${process.env.VUE_APP_API_ORIGIN}/api/show/company/pageList`,
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- endTime,
- pageNum,
- pageSize,
- searchKey,
- startTime,
- },
- }).then((res) => {
- return res.data.data.records
- })
- },
- getGeneralDetail(id) {
- return axios({
- method: 'get',
- url: `${process.env.VUE_APP_API_ORIGIN}/api/show/company/detail/${id}`,
- headers: {
- "Content-Type": "application/json",
- },
- }).then((res) => {
- return res.data.data
- })
- },
- getHistoryList({
- pageNum = 0,
- pageSize = 10000,
- 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
- })
- },
- 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
- })
- },
- getTreasureList({
- pageNum = 0,
- pageSize = 10000,
- searchKey = '',
- stage = '',
- } = {}) {
- return axios({
- method: 'post',
- url: `${process.env.VUE_APP_API_ORIGIN}/api/show/goods/pageList`,
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- pageNum,
- pageSize,
- searchKey,
- stage,
- }
- }).then((res) => {
- return res.data.data.records
- })
- },
- getTreasureDetail(id) {
- return axios({
- method: 'get',
- url: `${process.env.VUE_APP_API_ORIGIN}/api/show/goods/detail/${id}`,
- headers: {
- "Content-Type": "application/json",
- },
- data: {}
- }).then((res) => {
- return res.data.data
- })
- },
- reportTreasureVisit(id) {
- return axios({
- method: 'get',
- url: `${process.env.VUE_APP_API_ORIGIN}/api/show/goods/addVisit/${id}`,
- headers: {
- "Content-Type": "application/json",
- },
- data: {}
- }).then((res) => {
- })
- },
- getMetaverseList({
- endTime = "",
- pageNum = 0,
- pageSize = 10000,
- searchKey = "",
- startTime = "",
- } = {}) {
- return axios({
- method: 'post',
- url: `${process.env.VUE_APP_API_ORIGIN}/api/show/meta/pageList`,
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- endTime,
- pageNum,
- pageSize,
- searchKey,
- startTime,
- }
- }).then((res) => {
- return res.data.data.records
- })
- },
- // 获取元宇宙详情
- getG4InfoApi(id) {
- return axios({
- method: 'get',
- url: `${process.env.VUE_APP_API_ORIGIN}/api/show/meta/detail/${id}`,
- headers: {
- "Content-Type": "application/json",
- },
- data: {}
- }).then((res) => {
- return res.data.data
- })
- },
- }
|