From bb584963c6abe77c5577cbcad3c9956b69444ae9 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期二, 01 七月 2025 17:17:30 +0800 Subject: [PATCH] 无人机样章 --- src/assets/js/config.js | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/assets/js/config.js b/src/assets/js/config.js index 2696dba..49f7369 100644 --- a/src/assets/js/config.js +++ b/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; -- Gitblit v1.9.1