baseUrl.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. let baseUrl = "";
  2. let h5BaseUrl = "";
  3. let socketUrl = "";
  4. if (process.env.NODE_ENV === 'development') {
  5. // 开发环境
  6. // baseUrl = "http://192.168.0.106:8080"; //屈晨
  7. baseUrl = "http://192.168.0.55:8080"; //蔡雅茹
  8. // baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
  9. // h5BaseUrl = "https://test.baoxianzhanggui.com/h5";
  10. // baseUrl = "https://pre.baoxianzhanggui.com/web-api"; //预生产
  11. // h5BaseUrl = "https://pre.baoxianzhanggui.com/h5";
  12. // baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //生产
  13. h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/h5";
  14. socketUrl = "";
  15. } else if (process.env.NODE_ENV === 'production') {
  16. // 生产环境
  17. // baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
  18. // h5BaseUrl = "https://test.baoxianzhanggui.com/h5";
  19. // baseUrl = "https://pre.baoxianzhanggui.com/web-api"; //预生产
  20. // h5BaseUrl = "https://pre.baoxianzhanggui.com/h5";
  21. baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //生产
  22. h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/h5";
  23. socketUrl = "";
  24. }
  25. const courtConfig = {
  26. //微信公众号APPID
  27. publicAppId: "",
  28. //请求接口
  29. baseUrl: baseUrl,
  30. //h5请求接口
  31. h5BaseUrl: h5BaseUrl,
  32. //webSocket地址
  33. socketUrl: socketUrl,
  34. //平台名称
  35. platformName: "晋掌柜",
  36. //项目logo
  37. logoUrl: "https://qn.kemean.cn/upload/201906/19/3f3b4751f3ed4a97be804450c3ec4c79",
  38. //页面分享配置
  39. share: {
  40. title: 'uniApp-案例',
  41. // #ifdef MP-WEIXIN
  42. path: '/pages/home/home', //小程序分享路径
  43. // #endif
  44. // #ifdef H5 || APP-PLUS
  45. //公众号||APP分享
  46. desc: "uniApp-案例", // 分享描述
  47. link: "https://www.kemean.com/sameCity/18031201/index.html", // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
  48. imgUrl: "http://qn.kemean.cn/upload/201901/28/23bedfc34597482292ecd6dc107f6342", // 分享图标
  49. // #endif
  50. }
  51. };
  52. const insCompanyList = [{
  53. name: "中煤财险",
  54. icon: "/static/insuranceicon/zhongmei.png"
  55. }, //华农
  56. {
  57. name: "恒邦财险",
  58. icon: "/static/insuranceicon/hengbang.png"
  59. },
  60. {
  61. name: "安盛天平",
  62. icon: "/static/insuranceicon/ansheng.png"
  63. },
  64. {
  65. name: "中国人寿",
  66. icon: "/static/insuranceicon/renshou.png"
  67. },
  68. {
  69. name: "众安财险",
  70. icon: "/static/insuranceicon/zhongan.png"
  71. },
  72. {
  73. name: "永诚财险",
  74. icon: "/static/insuranceicon/yongcheng.png"
  75. },
  76. {
  77. name: "永安财险",
  78. icon: "/static/insuranceicon/yongan.png"
  79. },
  80. {
  81. name: "紫金财险",
  82. icon: "/static/insuranceicon/zijin.png"
  83. },
  84. {
  85. name: "国任财险",
  86. icon: "/static/insuranceicon/guoren.png"
  87. },
  88. {
  89. name: "华泰财险",
  90. icon: "/static/insuranceicon/huatai.png"
  91. },
  92. {
  93. name: "大家财险",
  94. icon: "/static/insuranceicon/dajia.png"
  95. },
  96. {
  97. name: "太平财险",
  98. icon: "/static/insuranceicon/taiping.png"
  99. },
  100. {
  101. name: "华农财险",
  102. icon: "/static/insuranceicon/huanong.png"
  103. },
  104. {
  105. name: "渤海财险",
  106. icon: "/static/insuranceicon/bohai.png"
  107. },
  108. {
  109. name: "泰康财险",
  110. icon: "/static/insuranceicon/taikang.png"
  111. },
  112. ];
  113. //手机号验证正则表达式
  114. const phoneRegular = /^1[3456789]\d{9}$/;
  115. //邮箱验证正则表达式
  116. const mailRegular = /^\w+@\w+(\.[a-zA-Z]{2,3}){1,2}$/;
  117. //密码验证正则表达式(6-15位数字和字母组合)
  118. const passwordRegular = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,15}$/;
  119. export default Object.assign({
  120. phoneRegular,
  121. mailRegular,
  122. passwordRegular,
  123. insCompanyList
  124. }, courtConfig);