mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
update
This commit is contained in:
parent
ebf99de47a
commit
9157e123b6
@ -22,10 +22,7 @@ import { TB, Tables } from "../resources/config/data/schema";
|
|||||||
import { JsonAsset } from "cc";
|
import { JsonAsset } from "cc";
|
||||||
import { GAction } from "./consts/GActionEnum";
|
import { GAction } from "./consts/GActionEnum";
|
||||||
import { StorageData, StorageEnum } from "./consts/GData";
|
import { StorageData, StorageEnum } from "./consts/GData";
|
||||||
import { Axios, Env, JNGame } from "../../extensions/ngame/assets/ngame/JNGame";
|
import { JAPI, JAPIConfig } from "../../extensions/ngame/assets/ngame/util/JAPI";
|
||||||
|
|
||||||
//设置微信环境
|
|
||||||
JNGame.setEnv(Env.WX);
|
|
||||||
|
|
||||||
let IP = "localhost";
|
let IP = "localhost";
|
||||||
|
|
||||||
@ -234,9 +231,9 @@ export const app = {
|
|||||||
sync : new JNGSyncFrame(), //同步
|
sync : new JNGSyncFrame(), //同步
|
||||||
event : EventDispatcher.getIns(), //通知
|
event : EventDispatcher.getIns(), //通知
|
||||||
proto : NGameMessage.getIns(), //消息
|
proto : NGameMessage.getIns(), //消息
|
||||||
// api : Axios.create({
|
api : JAPI.create({
|
||||||
// baseURL: `http://${IP}:8080`,
|
baseURL: `http://${IP}:8080`,
|
||||||
// }), //请求
|
}), //请求
|
||||||
// api : {}, //请求
|
// api : {}, //请求
|
||||||
battle : GBattleModeManager.getIns(), //战斗
|
battle : GBattleModeManager.getIns(), //战斗
|
||||||
config : new JNGConfig(), //配置文件
|
config : new JNGConfig(), //配置文件
|
||||||
@ -248,8 +245,8 @@ export const app = {
|
|||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
// app.api.interceptors.request.use(function(config){
|
app.api.addInterceptor((config:JAPIConfig) => {
|
||||||
// //设置Token
|
//设置Token
|
||||||
// config.headers.set("Token",StorageData.get(StorageEnum.Token));
|
config.headers["Token"] = StorageData.get(StorageEnum.Token);
|
||||||
// return config;
|
return true;
|
||||||
// })
|
})
|
@ -1 +1 @@
|
|||||||
Subproject commit eed71d5820b3a313f6daf848e4d91abdcb55b367
|
Subproject commit 892bdd16170c411e8dc0910a52b33bd42cb29dce
|
Loading…
x
Reference in New Issue
Block a user