| | |
| | | import axios from "axios"; |
| | | export const requestCtx = "https://jsek.bnuic.com"; // 请求地址 |
| | | export const resourceCtx = "http://182.92.203.7:3007/books/resource/1"; // 资源请求地址 |
| | | export const resourceCtx = "http://182.92.203.7:3007/books/resource/"; // 资源请求地址 |
| | | // export const resourceCtx = "https://jsek.bnuic.com/books/resource/"; // 资源请求地址 |
| | | export const tinymceBaseUrl = 'https://jsek.bnuic.com/home/' |
| | | export let activeBook = {}; // 资源请求地址 |
| | | export let goodsStore = ""; |
| | | // 请求教材配置信息 |
| | | const getBookConfig = async () => { |
| | | const response = await axios.get(resourceCtx + "/bookConfig.json"); |
| | | activeBook = response.data; |
| | | goodsStore = response.data.storeRefcode; |
| | | const getBookConfig = async (ctx) => { |
| | | const response = await axios.get( |
| | | ctx + "/bookConfig.json" |
| | | ); |
| | | return response.data; |
| | | }; |
| | | export const appId = 3; |
| | | export const requestTimeOut = 300000; // 请求超时时间 |
| | | export const tokenKey = "jsek-token"; |
| | | // export const tokenKey = "jsek-token"; |
| | | export const tokenKey = "token" |
| | | |
| | | const config = { |
| | | requestCtx, |
| | | resourceCtx, |
| | | tinymceBaseUrl, |
| | | activeBook, |
| | | requestTimeOut, |
| | | tokenKey, |
| | | goodsStore, |
| | | appId, |
| | | getBookConfig, |
| | | getBookConfig |
| | | }; |
| | | export default config; |