baseUrl.js 3.8 KB

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