zhongshujie
6 天以前 bb584963c6abe77c5577cbcad3c9956b69444ae9
src/assets/js/config.js
@@ -1,27 +1,30 @@
import axios from "axios";
export const resourceCtx = "http://182.92.203.7:3007/books/resource/"; // 资源请求地址
export let activeBook = {}; // 资源请求地址
export let goodsStore = "";
// 请求教材配置信息
const getBookConfig = async (bookId) => {
  const response = await axios.get(
    resourceCtx + (bookId ? bookId : "1") + "/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;
// 请求教材资源信息
const getBookResources =  async (ctx) => {
  const response = await axios.get(ctx + "/bookResources.json");
  return response.data;
};
export const appId = 0;
export const requestTimeOut = 300000; // 请求超时时间
export const tokenKey = "jsek-token";
export const tokenKey = "token";
//  export const tokenKey = "website-front-token"
const config = {
  resourceCtx,
  activeBook,
  requestTimeOut,
  tokenKey,
  goodsStore,
  appId,
  getBookConfig
  getBookConfig,
  getBookResources,
};
export default config;