openingNotice.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view>
  3. <uni-popup ref="popup" :is-mask-click="false">
  4. <view class="box">
  5. <view class="content">
  6. <view class="title">
  7. <view class="icon">
  8. <image src="./icon/icon.png" mode="scaleToFill"></image>
  9. </view>
  10. <view class="text">{{data.title}}</view>
  11. </view>
  12. <scroll-view scroll-y>
  13. <view class="inner">
  14. {{data.content}}
  15. </view>
  16. </scroll-view>
  17. </view>
  18. </view>
  19. </uni-popup>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. name: "openingNotice",
  25. data() {
  26. return {
  27. data: {}
  28. };
  29. },
  30. mounted() {
  31. this.get_notify_getNotifyOne()
  32. },
  33. methods: {
  34. get_notify_getNotifyOne() {
  35. this.$api.notify_getNotifyOne({
  36. }).then((res)=>{
  37. // console.log(res)
  38. if(res.data.code == 0 && res.data.data != null){
  39. this.data = res.data.data
  40. this.$refs.popup.open('top')
  41. setTimeout(()=>{
  42. this.$refs.popup.close()
  43. },10000)
  44. }else{
  45. // console.log("已读")
  46. }
  47. })
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss">
  53. .box {
  54. height: 100vh;
  55. display: flex;
  56. align-items: center;
  57. }
  58. .content {
  59. margin: 0 auto;
  60. width: 700rpx;
  61. background-color: #FFFFFF;
  62. border-radius: 20rpx;
  63. box-sizing: border-box;
  64. padding: 25rpx;
  65. .title {
  66. position: relative;
  67. height: 90rpx;
  68. line-height: 90rpx;
  69. font-size: 38rpx;
  70. font-weight: 700;
  71. text-align: center;
  72. border-bottom: 1rpx solid #E1E5E9;
  73. padding-top: 20rpx;
  74. .icon {
  75. position: absolute;
  76. top: -160rpx;
  77. left: 0;
  78. image {
  79. width: 218rpx;
  80. height: 193rpx;
  81. }
  82. }
  83. }
  84. .inner {
  85. height: 50vh;
  86. text-indent: 2rem;
  87. box-sizing: border-box;
  88. padding: 20rpx 0;
  89. }
  90. }
  91. </style>