constantData.js
832 Bytes
// export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/'
export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-webp/'
// 缓存get方法为空的默认指定值
export const DEFAULT_GET_STORAGEKEY = ['sessionId', 'merchantId', 'userInfo']
// 缓存get方法key的对应才映射值
export const STORAGE_OBJECTkEY = {
DEFAULT_GET_STORAGEKEY,
sessionId: 'sessionId',
userInfo: 'userInfo',
system_info: 'systemInfo',
app_title: 'appTitle',
auto_login_object: 'auto_login_object',
address_info: 'address_info',
srcm_shopmall_merchant_id: 'srcm_shopmall_merchant_id',
wx_user_info: 'wx_user_info'
}
export const IMG_VERSION = () => {
const accountInfo = wx.getAccountInfoSync()
return accountInfo?.miniProgram?.version || '1.0.0'
}