kaifain_v2.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <nuxt />
  3. </template>
  4. <script>
  5. import Cookies from 'js-cookie'
  6. const MOB_HOST = process.env.NODE_ENV === 'development' ? 'kaifain-m.test.proginn.com' : 'kaifain.m.proginn.com'
  7. export default {
  8. head() {
  9. return {
  10. bodyAttrs: {
  11. class: 'kaifain-view'
  12. }
  13. }
  14. },
  15. created() {
  16. if (process.client) {
  17. if (Cookies.get('x_app') || /(android|iphone|ipod)/i.test(window.navigator.userAgent)) {
  18. const source = window.location.href
  19. let target
  20. if (/\/(s|d)\/[0-9a-f]+/.test(source)) {
  21. target = source.replace(location.host, MOB_HOST)
  22. } else {
  23. target = `https://${MOB_HOST}/`
  24. }
  25. window.location.replace(target)
  26. }
  27. }
  28. }
  29. }
  30. </script>
  31. <style lang="scss">
  32. @import '@/kaifain_v2/assets/styles/icon.scss';
  33. :root {
  34. font-size: 16px;
  35. }
  36. .kaifain-view {
  37. @import '@/kaifain_v2/assets/styles/buefy.scss';
  38. font-family: -apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Segoe UI,Arial,Roboto,PingFang SC,Hiragino Sans GB,Microsoft Yahei,sans-serif;
  39. background: #fff;
  40. .container {
  41. display: block;
  42. }
  43. .navbar {
  44. &> .container {
  45. display: flex;
  46. flex-direction: row;
  47. @media screen and (max-width: 1023px) {
  48. display: block;
  49. }
  50. }
  51. }
  52. .main {
  53. min-width: auto;
  54. min-height: auto;
  55. margin: 0;
  56. }
  57. .footer {
  58. padding: 0 0 1rem;
  59. }
  60. .connectUs {
  61. .toastBox .toastArea {
  62. .title {
  63. margin: 0;
  64. width: auto;
  65. }
  66. .tips {
  67. font-size: 12.5px;
  68. color: #999;
  69. margin: 4px 0 0;
  70. width: auto;
  71. }
  72. .submitBtn {
  73. margin-top: 24px;
  74. width: auto;
  75. }
  76. }
  77. }
  78. .el-dropdown-menu {
  79. padding: 6px 0;
  80. }
  81. .el-dropdown-menu__item {
  82. padding: 0 18px 0 16px;
  83. }
  84. #proginn-footer {
  85. .item-box {
  86. width: 100%;
  87. }
  88. }
  89. }
  90. </style>