Blame view

member-miniapp/utils/config.js 1.35 KB
e1dcb3a0   “wangming”   1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  // 全局可配置项:后端地址、存储 key、门店来源等
  // 上线前请根据实际环境修改 BASE_URL 与门店列表(STORES)
  
  // 后端服务地址(联调默认本地 5000,上线改为正式域名,需 https 且已在小程序后台配置 request 合法域名)
  export const BASE_URL = 'http://localhost:5000'
  
  // 请求超时时间(毫秒)
  export const REQUEST_TIMEOUT = 20000
  
  // 本地存储 key
  export const TOKEN_KEY = 'lf_mall_token'
  export const MEMBER_KEY = 'lf_mall_member'
  
  // 登录页路径(401 时跳转)
  export const LOGIN_PAGE = '/pages/login/login'
  
  // 首页路径(登录成功后进入)
  export const HOME_PAGE = '/pages/home/home'
  
  // ================= 门店来源(下单自提门店) =================
  // 下单页优先调用后端接口动态获取真实门店:
  //   GET /api/Extend/LqMallProduct/GetPickupStores → [{ id, name, address, city, ... }]
  // 下方 STORES 仅作为接口异常时的兜底占位(id 为空不可真正下单)。
  export const STORES = [
    { id: '', name: '绿纤西站店', address: '成都 · 西站片区' },
    { id: '', name: '绿纤金沙店', address: '成都 · 金沙片区' },
    { id: '', name: '绿纤大源店', address: '成都 · 大源片区' }
  ]
  
  // 默认门店 Id(可留空,留空则下单前需先在确认页选择门店)
  export const DEFAULT_STORE_ID = ''