import $app from "./app";
import PagesJSON from "@/pages.json";

const config = {};

// 地址类
config.url = {
  // API请求基础URL
  // request : 'https://charge.hub.zswlgz.com/',
  // request : '/api',
  // request : 'http://192.168.110.3:80/',
  // request : 'http://192.168.1.253:80/',
  // request : 'http://120.78.228.211:8866/',
  // request: "http://192.168.0.11:8989/",
  request: "https://cd.admin.zswlgz.com/",
  // request: "http://192.168.0.217:8989/",
  // request : 'https://charge.dev.hub.zswlgz.com/',
  // 上传地址
  upload: "http://127.0.0.1:3000/upload/",
  // 下载地址
  download: "http://oss.aabb.com/download/",
  // 静态文件服务
  static: "http://oss.aabb.com/",
  //配置文件地址
  configUrl: "http://bx.eomp.cn/adp/",
};

// 接口类
config.api = {
  login: "/userApi/login",
  refreshToken: "/api/v1/auth/refresh-token",
};

// 键名类
config.keyname = {
  userInfo: "USER_INFO",
  userToken: "USER_TOKEN",
  logs: "LOGS_DATA",
  accessToken: "ACCESS_TOKEN",
  refreshToken: "REFRESH_TOKEN",
};

// 事件名
config.eventName = {
  setResult: "SET-HOME-RESULT",
};

// 客服
config.customerService = {
  id: "wwfb3777bf94dcfaf1",
  url: "https://work.weixin.qq.com/kfid/kfc4feac060f5c1bc7e",
};

// pages.json 页面配置文件
config.pages = PagesJSON.pages.map((i) => {
  i.style = { ...PagesJSON.globalStyle, ...i.style };
  return i;
});

// 不同版本执行器
$app.sys.envVersion({
  // 正式版
  release: () => {},
  // 体验版
  trial: () => {},
  // 开发版
  develop: () => {},
});

export default config;
