This commit is contained in:
2023-08-30 20:51:12 +08:00
parent 2e8d06d5e0
commit 6710347935
7 changed files with 152 additions and 4 deletions

13
src/config/index.ts Normal file
View File

@@ -0,0 +1,13 @@
// 用于配置项目的一些常量如接口地址、websocket地址等
import Taro from "@tarojs/taro";
export const app = {
API_URL: () =>
process.env.NODE_ENV === "production"
? "https://game.jdt168.com/dice"
: "http://game.jdt168.com/dice",
API_WS: () =>
process.env.NODE_ENV === "production"
? `wss://game.jdt168.com/dice/home?uid=${Taro.getStorageSync('uid')}`
: `ws://game.jdt168.com/dice/home?uid=${Taro.getStorageSync('uid')}`,
};