notify.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <div class="upgrade-popup" @click.stop="" v-if="status">
  3. <h2 class="upgrade-text">
  4. {{ $i18n.locale == "zh" ? upgradeInfo.title : upgradeInfo.titleEn }}
  5. </h2>
  6. <div
  7. class="upgrade-image"
  8. :style="`background-image:url(${
  9. $i18n.locale == 'zh' ? upgradeInfo.imageUrl : upgradeInfo.imageUrlEn
  10. });`"
  11. ></div>
  12. <div class="upgrade-content">
  13. <div class="info">
  14. <span class="info-text">{{
  15. $i18n.t("components.user_guid.upgradeInfo")
  16. }}</span>
  17. </div>
  18. <div
  19. class="desc"
  20. style="white-space: pre-wrap"
  21. v-html="
  22. $i18n.locale == 'zh'
  23. ? upgradeInfo.description
  24. : upgradeInfo.descriptionEn
  25. "
  26. ></div>
  27. </div>
  28. <div class="upgrade-btn">
  29. <button class="ui-button primary" @click="close">
  30. {{ $i18n.t("components.user_guid.set") }}
  31. </button>
  32. <button
  33. class="ui-button submit"
  34. @click.stop="
  35. gotoView(
  36. $i18n.locale == 'zh' ? upgradeInfo.infoUrl : upgradeInfo.infoUrlEn
  37. )
  38. "
  39. >
  40. {{ $i18n.t("components.user_guid.seeMore") }}
  41. </button>
  42. </div>
  43. </div>
  44. </template>
  45. <script>
  46. import { mapGetters } from "vuex";
  47. export default {
  48. name: "notify",
  49. props: {},
  50. computed: {
  51. ...mapGetters({
  52. upgradeInfo: "notice/content",
  53. status: "notice/status",
  54. }),
  55. },
  56. methods: {
  57. gotoView(url) {
  58. window.open(url);
  59. close();
  60. },
  61. close() {
  62. this.$store.commit("notice/setStatus", false);
  63. },
  64. },
  65. };
  66. </script>
  67. <style lang="scss" scoped>
  68. .upgrade-popup {
  69. position: fixed;
  70. top: 0;
  71. left: 0;
  72. width: 100%;
  73. height: 100%;
  74. background: rgba(27, 27, 28, 0.9);
  75. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25),
  76. inset 0px 0px 0px 2px rgba(255, 255, 255, 0.1);
  77. z-index: 10001;
  78. display: flex;
  79. align-items: center;
  80. justify-content: center;
  81. flex-flow: column;
  82. color: #fff;
  83. overflow-y: auto;
  84. z-index: 10000000001;
  85. .upgrade-text {
  86. width: 560px;
  87. font-size: 24px;
  88. margin-bottom: 40px;
  89. word-break: break-all;
  90. }
  91. .upgrade-image {
  92. width: 560px;
  93. height: 320px;
  94. // background: #f2f2f2;
  95. border-radius: 10px;
  96. background-repeat: no-repeat;
  97. background-size: cover;
  98. }
  99. .upgrade-content {
  100. width: 560px;
  101. margin-top: 30px;
  102. .info {
  103. display: flex;
  104. align-items: center;
  105. justify-content: space-between;
  106. .info-text {
  107. font-size: 16px;
  108. }
  109. .info-time {
  110. font-size: 12px;
  111. color: rgba(255, 255, 255, 0.7);
  112. .time {
  113. margin-left: 5px;
  114. }
  115. }
  116. }
  117. .desc {
  118. margin-top: 10px;
  119. word-break: break-all;
  120. font-size: 14px;
  121. line-height: 28px;
  122. max-height: 200px;
  123. overflow: auto;
  124. }
  125. }
  126. .upgrade-btn {
  127. display: flex;
  128. align-items: center;
  129. justify-content: space-between;
  130. margin-top: 40px;
  131. .ui-button {
  132. width: 160px;
  133. height: 40px;
  134. &:first-child {
  135. margin-right: 30px;
  136. }
  137. }
  138. }
  139. }
  140. </style>