baseUrl.js 3.1 KB

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