import Taro from '@tarojs/taro';
import {User} from "@/api/system/user/model";

// 模版套餐ID
export const TEMPLATE_ID = 10556;
// 服务接口
export const SERVER_API_URL = 'https://server.gxwebsoft.com/api';
// export const SERVER_API_URL = 'http://127.0.0.1:8000/api';
// 服务接口
export const APP_API_URL = 'http://182.90.229.54:10048/api';
// export const APP_API_URL = 'http://127.0.0.1:9000/api';
// WSS
export const WSS_API_URL = 'ws://182.90.229.54:10048/api';
/**
 * 保存用户信息到本地存储
 * @param token
 * @param user
 */
export function saveStorageByLoginUser(token: string, user: User) {
  Taro.setStorageSync('TenantId',user.tenantId)
  Taro.setStorageSync('access_token', token)
  Taro.setStorageSync('UserId', user.userId)
  Taro.setStorageSync('Phone', user.phone)
  Taro.setStorageSync('User', user)
}
