Notice.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <view class="Notice-view blanck-pop clearfix" :style="{ backgroundColor: modelData.bgColor, margin: modelData.padding * 2 + 'rpx auto' }" v-if="noticeData.content">
  3. <view @click="noticePop = true">
  4. <view class="notice-icon float_left"><image src="https://onlineimg.qianniao.vip/noticeicon.png" mode="aspectFill"></image></view>
  5. <view class="notice-main float_left">
  6. <u-notice-bar
  7. mode="horizontal"
  8. padding="18rpx 0"
  9. :volume-icon="false"
  10. :font-size="28"
  11. type="none"
  12. :speed="50"
  13. :color="modelData.textColor"
  14. :border-radius="12"
  15. :list="[noticeData.content]"
  16. ></u-notice-bar>
  17. </view>
  18. </view>
  19. <u-popup
  20. v-model="noticePop"
  21. border-radius="18"
  22. mode="center"
  23. height="905"
  24. :custom-style="{
  25. background: 'rgba(0,0,0,0)'
  26. }"
  27. >
  28. <view class="mag-view">
  29. <view class="mag-top primary-bg"><image class="notice-i" src="https://onlineimg.qianniao.vip/notice-i.png" mode=""></image></view>
  30. <view class="msg-cont">
  31. <image class="msg-yun" src="https://onlineimg.qianniao.vip/notice-bg.png" mode=""></image>
  32. <view class="mag-tit">{{ noticeData.title }}</view>
  33. <scroll-view class="mag-main" scroll-y>{{ noticeData.content }}</scroll-view>
  34. </view>
  35. <view class="confirm-btn primary-btn-pain" @click="noticePop = false">我知道了</view>
  36. </view>
  37. </u-popup>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. name: 'Notice',
  43. props: {
  44. modelData: {
  45. type: Object,
  46. default: () => {
  47. return {};
  48. }
  49. },
  50. noticeData: {
  51. type: Object,
  52. default: () => {
  53. return {};
  54. }
  55. }
  56. },
  57. data() {
  58. return {
  59. noticePop: false
  60. };
  61. },
  62. methods: {
  63. openPop() {
  64. this.noticePop = true;
  65. },
  66. closePop() {
  67. this.noticePop = false;
  68. }
  69. }
  70. };
  71. </script>
  72. <style scoped lang="scss">
  73. .Notice-view {
  74. width: 710upx;
  75. padding-right: 24upx;
  76. margin: 10upx auto;
  77. background-color: #ffffff;
  78. border-radius: 64upx;
  79. .notice-icon {
  80. width: 72upx;
  81. text-align: center;
  82. line-height: 64upx;
  83. height: 64upx;
  84. image {
  85. width: 30rpx;
  86. height: 32rpx;
  87. vertical-align: middle;
  88. transform: translate(10rpx, 4rpx);
  89. }
  90. }
  91. .notice-main {
  92. width: 608upx;
  93. }
  94. }
  95. .mag-view {
  96. text-align: center;
  97. transform: translateY(100rpx);
  98. background-color: #ffffff;
  99. width: 612rpx;
  100. border-radius: 18rpx;
  101. padding-bottom: 46rpx;
  102. .mag-top {
  103. height: 242rpx;
  104. border-radius: 18rpx;
  105. background-color: $uni-color-primary;
  106. width: 100%;
  107. position: relative;
  108. .notice-i {
  109. width: 422rpx;
  110. height: 312rpx;
  111. position: absolute;
  112. top: -100rpx;
  113. left: 140rpx;
  114. }
  115. }
  116. .msg-cont {
  117. padding: 0 50rpx;
  118. padding-top: 56rpx;
  119. position: relative;
  120. .msg-yun {
  121. position: absolute;
  122. width: 622rpx;
  123. height: 215rpx;
  124. left: 0;
  125. top: -116rpx;
  126. z-index: 1;
  127. }
  128. .mag-main {
  129. height: 200rpx;
  130. }
  131. .mag-tit {
  132. position: relative;
  133. z-index: 9;
  134. font-size: 38upx;
  135. font-weight: bold;
  136. padding-bottom: 30rpx;
  137. }
  138. }
  139. .confirm-btn {
  140. line-height: 90rpx;
  141. height: 90rpx;
  142. font-size: 34rpx;
  143. width: 506rpx;
  144. margin: 30rpx auto 0;
  145. border: 1px solid $uni-color-primary;
  146. color: $uni-color-primary;
  147. border-radius: 12rpx;
  148. }
  149. }
  150. </style>