baseUrl.js 3.7 KB

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