670增加跳转至地图,修改mqtt.js,使用request中的环境配置

This commit is contained in:
liub
2025-09-24 10:18:31 +08:00
parent ab696c3076
commit 8a54aa85d1
6 changed files with 67 additions and 16 deletions

View File

@ -1,5 +1,5 @@
import config from '../config/index.js';
const env = 'development'; //production development //开发of线上 改这里就行
export const env = 'development'; //production development //开发of线上 改这里就行
const BASE = config[env];
const request = (options) => {
console.log("options"+JSON.stringify(options),BASE.BASE_URL)
@ -46,7 +46,7 @@ const request = (options) => {
});
};
// 导出基础URL以便其他地方使用
export const baseURL = BASE.BASE_URL
export const getToken = () => uni.getStorageSync('token') // 获取token的方法
export const baseURL = BASE.BASE_URL;
export const getToken = () => uni.getStorageSync('token'); // 获取token的方法
export const clientid =() => uni.getStorageSync('clientID');
export default request;
export default request;