baseUrl.js 3.3 KB

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