Global.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //后续跟随app发版版本一致,暂从2.0.0开始
  2. global.LOGINVERSION = '1.0.3'
  3. //是否启用版本控制
  4. global.USEVERSION = true
  5. // 获取客户信息
  6. export const GETCUSTOM = async data => {
  7. global.CUSTOMERINFO = data
  8. // global.CUSTOMERINFO.customerRankCode = "01";
  9. }
  10. // 获取全局币种信息
  11. export const SETCURRENCY = async res => {
  12. let currency = {}
  13. currency.id = res.id
  14. currency.code = res.code
  15. currency.name = res.name
  16. currency.currencySign = res.symbol // 币符
  17. currency.currencyPriceScale = res.pricePrecision // 价格精度
  18. currency.currencyAmountScale = res.amountPrecision // 金额精度
  19. global.CURRENCY = currency
  20. }
  21. // 设置全局用户登录信息
  22. export const SETUSERINFO = async data => {
  23. global.USERINFO = data
  24. }
  25. // 适配iPhone X的全局样式
  26. export const SETHEADER = async data => {
  27. let headerStyle = {}
  28. headerStyle.height = data.height
  29. headerStyle.paddingTop = data.paddingTop
  30. headerStyle.paddingBottom = data.paddingBottom
  31. global.HEADERSTYLE = headerStyle
  32. }
  33. // global.CUSTOMERINFO = "83fea73d-6155-4e16-90b2-28c9ae8294e4";