config.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // 配置文件
  2. const env=uni.getAccountInfoSync().miniProgram
  3. // 请求根路径
  4. let baseApiUrl=''
  5. if(env.envVersion==='develop'){//开发
  6. baseApiUrl='http://8.136.199.33:8612'
  7. }else if(env.envVersion==='trial'){//体验版
  8. baseApiUrl='http://8.136.199.33:8612'
  9. }else if(env.envVersion==='release'){//正式版
  10. baseApiUrl='https://yanbao.hzinsights.com'
  11. }
  12. // 配置图片资源 https://hzstatic.hzinsights.com/static/icon/hzyb/
  13. const globalImgUrls={
  14. activityNoAuth:'https://hzstatic.hzinsights.com/static/icon/hzyb/activity_no_auth.png',
  15. imgSuccess:'https://hzstatic.hzinsights.com/static/icon/hzyb/success_icon.png',
  16. loginTop:'https://hzstatic.hzinsights.com/static/icon/hzyb/login_top_img.png',
  17. idCardExp:'https://hzstatic.hzinsights.com/static/icon/hzyb/idcard_exp.jpg'
  18. }
  19. // 默认tabbar数据
  20. const defaultTabBarListConfig=[
  21. {
  22. key: "activity",
  23. pagePath: "pages/activity/activity",
  24. text: "报告及活动",
  25. iconPath: "../static/tabbar/activity.png",
  26. selectedIconPath: "../static/tabbar/activity-s.png",
  27. },
  28. {
  29. key: "report",
  30. pagePath: "pages/report/report",
  31. text: "报告",
  32. iconPath: "../static/tabbar/report.png",
  33. selectedIconPath: "../static/tabbar/report-s.png",
  34. },
  35. {
  36. key: "buy",
  37. pagePath: "pages/buy/buy",
  38. text: "已购",
  39. iconPath: "../static/tabbar/buy.png",
  40. selectedIconPath: "../static/tabbar/buy-s.png",
  41. },
  42. {
  43. key: "chart",
  44. pagePath: "pages/chart/chart",
  45. text: "图库",
  46. iconPath: "../static/tabbar/chart.png",
  47. selectedIconPath: "../static/tabbar/chart-s.png",
  48. },
  49. {
  50. key: "user",
  51. pagePath: "pages/user/user",
  52. text: "我的",
  53. iconPath: "../static/tabbar/user.png",
  54. selectedIconPath: "../static/tabbar/user-s.png",
  55. }
  56. ]
  57. module.exports={
  58. baseApiUrl,
  59. globalImgUrls,
  60. defaultTabBarListConfig
  61. }