notice-article.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="container cart clearfix">
  3. <tui-skeleton v-if="isRequest" :loadingType="3" :isLoading="true" />
  4. <view class="container-main" v-else>
  5. <view class="clearfix">
  6. <!-- 空白页 -->
  7. <view class="empty-container" v-if="isEmpty">
  8. <image mode="aspectFill" class="empty_notice" src="@/static/tabBar/emtry_notice.png"></image>
  9. <text class="error-text">暂无任何消息~</text>
  10. </view>
  11. <!-- 列表 -->
  12. <view
  13. class="tui-notice"
  14. v-else
  15. v-for="(cell, index) in dataValue"
  16. :key="index"
  17. @click.stop="handleOrderClick(cell)"
  18. >
  19. <tui-swipe-action :operateWidth="80" :backgroundColor="'#F7F7F7'">
  20. <template v-slot:content>
  21. <notice-cell :cellType="5" :cell="cell"></notice-cell>
  22. </template>
  23. <template v-slot:button>
  24. <view class="tui-custom-btn_box">
  25. <view class="tui-custom-btn" @click.stop="deleteBtn(cell.id, index)">
  26. <image src="@/static/tabBar/delete_notice.png" class="deleteImage" mode="aspectFill"></image>
  27. </view>
  28. </view>
  29. </template>
  30. </tui-swipe-action>
  31. </view>
  32. <!--加载loadding-->
  33. <view v-if="showLoading">
  34. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  35. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText"></tui-nomore>
  36. </view>
  37. <!--加载loadding-->
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import { mapState, mapMutations } from 'vuex'
  44. import noticeMixins from './mixins/notice_mixins.js'
  45. import noticeCell from './components/notice-cell.vue'
  46. export default {
  47. mixins: [noticeMixins],
  48. components: {
  49. noticeCell
  50. },
  51. data() {
  52. return {
  53. }
  54. },
  55. onLoad(option) {
  56. this.initData(option)
  57. },
  58. methods: {
  59. async initData(option) {
  60. this.params.messageType = option.messageType
  61. this.getUserAuthClubMessageList()
  62. },
  63. handleOrderClick(cell) {
  64. const link = `${
  65. process.env.NODE_ENV === 'development' ? 'http://120.79.25.27:8009/' : 'https://www.caimei365.com/'
  66. }/info/detail-${cell.thisId}-1.html`
  67. uni.navigateTo({
  68. url: `/pages/views/others/web-view?websit=${link}`
  69. })
  70. this.clearCellNew(cell.id)
  71. }
  72. },
  73. onReachBottom() {
  74. if (this.hasNextPage) {
  75. this.loadding = true
  76. this.pullUpOn = true
  77. this.getUserAuthClubMessageList()
  78. }
  79. },
  80. onPullDownRefresh() {
  81. //下拉刷新
  82. this.listQuery.pageNum = 1
  83. this.getUserAuthClubMessageList()
  84. uni.stopPullDownRefresh()
  85. }
  86. }
  87. </script>
  88. <style lang="scss">
  89. page {
  90. background-color: #f7f7f7;
  91. }
  92. .container-main {
  93. width: 100%;
  94. box-sizing: border-box;
  95. padding: 24rpx 0;
  96. .empty-container {
  97. display: flex;
  98. flex-direction: column;
  99. align-items: center;
  100. justify-content: center;
  101. height: 60vh;
  102. }
  103. .empty_notice {
  104. width: 290rpx;
  105. height: 230rpx;
  106. }
  107. .error-text{
  108. color: #999999;
  109. font-size: 26rpx;
  110. }
  111. }
  112. .tui-swipeout-content {
  113. white-space: normal !important;
  114. }
  115. .tui-notice {
  116. margin-bottom: 24rpx;
  117. }
  118. .tui-notice-cell {
  119. width: 702rpx;
  120. height: auto;
  121. background-color: #ffffff;
  122. border-radius: 16rpx;
  123. box-sizing: border-box;
  124. padding: 16rpx 24rpx;
  125. margin: 0 auto;
  126. .tui-cell-top {
  127. width: 100%;
  128. height: 88rpx;
  129. line-height: 88rpx;
  130. float: left;
  131. .cell-title {
  132. font-size: 32rpx;
  133. color: #333333;
  134. float: left;
  135. font-weight: bold;
  136. }
  137. .cell-time {
  138. font-size: 24rpx;
  139. color: #999999;
  140. float: right;
  141. }
  142. }
  143. .tui-cell-content {
  144. width: 100%;
  145. height: auto;
  146. float: left;
  147. box-sizing: border-box;
  148. border-radius: 8rpx;
  149. line-height: 44rpx;
  150. padding: 24rpx;
  151. background-color: #f7f7f7;
  152. font-size: 28rpx;
  153. color: #666666;
  154. text-align: justify;
  155. }
  156. }
  157. .tui-custom-btn_box {
  158. width: 80px;
  159. height: 100%;
  160. padding: 0 20rpx;
  161. box-sizing: border-box;
  162. display: flex;
  163. align-items: center;
  164. justify-content: center;
  165. background-color: #f7f7f7;
  166. }
  167. .tui-custom-btn {
  168. width: 56rpx;
  169. height: 56rpx;
  170. border-radius: 50%;
  171. background-color: #f94b4b;
  172. color: #ffffff;
  173. display: flex;
  174. align-items: center;
  175. justify-content: center;
  176. flex-shrink: 0;
  177. .deleteImage{
  178. width: 56rpx;
  179. height: 56rpx;
  180. }
  181. }
  182. </style>