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