t-o-news.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <view>
  3. <!-- content -->
  4. <view class="content">
  5. <t-o-news-tab-2 ref="tab_2"></t-o-news-tab-2>
  6. </view>
  7. <view class="go_top" @click="go_top">
  8. <uni-icons type="top" size="22"></uni-icons>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. name: "t-o-news",
  15. data() {
  16. return {
  17. };
  18. },
  19. methods: {
  20. tab_2_onReachBottom() {
  21. this.$refs.tab_2.nextPage();
  22. },
  23. go_top() {
  24. uni.pageScrollTo({
  25. scrollTop: 0,
  26. duration: 200
  27. });
  28. }
  29. }
  30. }
  31. </script>
  32. <style lang="scss">
  33. page {
  34. background-color: #F2FAF7;
  35. }
  36. .tab {
  37. background-color: #FFFFFF;
  38. box-sizing: border-box;
  39. padding: 25rpx 50rpx;
  40. display: flex;
  41. justify-content: space-between;
  42. align-items: center;
  43. .item {
  44. text-align: center;
  45. .icon {
  46. height: 80rpx;
  47. image {
  48. width: 95rpx;
  49. height: 66rpx;
  50. }
  51. }
  52. .title {
  53. margin-top: 10rpx;
  54. .text {
  55. font-size: 30rpx;
  56. color: #727272;
  57. }
  58. .tip {
  59. margin-top: 5rpx;
  60. font-size: 24rpx;
  61. color: #979797;
  62. }
  63. }
  64. }
  65. }
  66. .content {
  67. margin-top: 20rpx;
  68. }
  69. .go_top {
  70. z-index: 999;
  71. position: fixed;
  72. bottom: 150rpx;
  73. right: 50rpx;
  74. width: 100rpx;
  75. height: 100rpx;
  76. line-height: 100rpx;
  77. text-align: center;
  78. // background-color: #FFFFFF;
  79. background-color: #EEEEEE;
  80. border-radius: 50%;
  81. font-weight: 700;
  82. }
  83. </style>