config.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. let config = {}
  2. // config.baseURL = 'http://192.168.1.35:2888' //本地
  3. // config.baseURL = 'http://123.60.225.130:2888'
  4. // config.baseURL = 'http://vote-back.guosen-fumao.cn/api' //测试服务器
  5. config.baseURL = 'https://vote.guosen-fumao.cn/api' //正式服务器
  6. //是否需要获取手机号
  7. config.isAuthPhone = true
  8. config.transformDomains = 'https://m.changyoyo.com'
  9. //普通二维码跳作品详情链接
  10. config.PRODUCT_PATH = 'https://vote.guosen-fumao.cn/home',
  11. config.kdniao = {
  12. appId: '1709349',
  13. appKey: '4d07512e-6516-4413-b82a-c68228111119'
  14. }
  15. config.themeRed = {
  16. skin: '--bgColor:#e72226;--color:#fff;--shopBg:#f24050;--shopRule:#FF797F',
  17. theme: {
  18. bgColor: '#e72226',
  19. color: '#fff',
  20. shopBg: '#f24050',
  21. rankBgImg: "https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/4872ea85f7e74a75a920135ce1384262-bg.png"
  22. }
  23. }
  24. config.setTheme = (baseTheme, vm) => {
  25. if (vm.$isEmpty(baseTheme)) {
  26. vm.$u.vuex('vuex_skin', config.themeRed.skin)
  27. vm.$u.vuex('vuex_theme', config.themeRed.theme)
  28. return
  29. }
  30. let rgba=vm.$u.colorToRgba(baseTheme.baseColor, 0.20)
  31. let skin =
  32. `--bgColor:${baseTheme.baseColor};--color:#fff;--shopBg:${baseTheme.shopBg};--shopRule:${baseTheme.ruleBg};--rgba:${rgba}`
  33. let theme = {
  34. bgColor: baseTheme.baseColor,
  35. color: '#fff',
  36. rgba,
  37. shopBg: baseTheme.shopBg,
  38. rankBgImg: baseTheme.rankBgImg
  39. }
  40. vm.$u.vuex('vuex_skin', skin)
  41. vm.$u.vuex('vuex_theme', theme)
  42. }
  43. export default config