service.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="service">
  3. <tui-skeleton
  4. v-if="skeletonShow"
  5. backgroundColor="#fafafa"
  6. borderRadius="10rpx"
  7. :isLoading="true"
  8. :loadingType="5"
  9. ></tui-skeleton>
  10. <view class="container">
  11. <view v-for="(cell, index) in messageList" class="info-card" :key="index">
  12. <view class="tui-notice clearfix">
  13. <tui-swipe-action :operateWidth="80" :backgroundColor="'#F7F7F7'">
  14. <template v-slot:content>
  15. <notice-cell :cellType="1" :cell="cell" @trampInfo="trampInfo"></notice-cell>
  16. </template>
  17. <template v-slot:button>
  18. <view class="tui-custom-btn_box">
  19. <view class="tui-custom-btn" @click.stop="deleteBtn(cell.id,index)">
  20. <text class="iconfont icon-shanchu3"></text>
  21. </view>
  22. </view>
  23. </template>
  24. </tui-swipe-action>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import { mapState, mapMutations } from 'vuex'
  32. import noticeCell from '../components/notice-cell.vue'
  33. export default {
  34. components: {
  35. noticeCell
  36. },
  37. data() {
  38. return {
  39. skeletonShow: false, // 刷新
  40. messageList: [
  41. {
  42. id: 1,
  43. messageType: 1,
  44. time: '2023年8月29日',
  45. accountType: 1,
  46. content: '大黄蜂'
  47. }
  48. ], // 信息列表
  49. }
  50. },
  51. methods: {
  52. // 请求信息列表
  53. async getMessageList(){
  54. console.log(1111)
  55. },
  56. // 删除
  57. deleteBtn() {},
  58. // 详情
  59. trampInfo($event) {
  60. this.$api.navigateTo('/pages/seller/notice/service/Institutional_visits?id=' + $event)
  61. }
  62. },
  63. onPullDownRefresh() {
  64. console.log('刷新')
  65. uni.stopPullDownRefresh()
  66. },
  67. onReachBottom() {
  68. console.log('到底了')
  69. }
  70. }
  71. </script>
  72. <style scopde lang="scss">
  73. .container {
  74. padding: 24rpx;
  75. box-sizing: border-box;
  76. }
  77. .info-card {
  78. margin-bottom: 24rpx;
  79. box-sizing: border-box;
  80. }
  81. page {
  82. background-color: #f7f7f7;
  83. }
  84. .container-main {
  85. width: 100%;
  86. box-sizing: border-box;
  87. padding: 24rpx 0;
  88. .empty-container-image {
  89. width: 260rpx;
  90. height: 260rpx;
  91. margin-top: -300rpx;
  92. }
  93. }
  94. .tui-swipeout-content{
  95. white-space:normal !important;
  96. }
  97. .tui-notice{
  98. margin-bottom: 24rpx;
  99. }
  100. .tui-notice-cell {
  101. width: 702rpx;
  102. height: auto;
  103. background-color: #ffffff;
  104. border-radius: 16rpx;
  105. box-sizing: border-box;
  106. padding:0 24rpx;
  107. margin: 0 auto;
  108. .tui-cell-top{
  109. width: 100%;
  110. height: 105rpx;
  111. line-height: 105rpx;
  112. border-bottom: 1px solid #ccc;
  113. .cell-title{
  114. font-size: 32rpx;
  115. color: #333333;
  116. float: left;
  117. font-weight: bold;
  118. }
  119. .cell-time{
  120. font-size: 24rpx;
  121. color: #999999;
  122. float: right;
  123. }
  124. }
  125. .tui-cell-content{
  126. width: 100%;
  127. height: auto;
  128. box-sizing: border-box;
  129. border-radius: 8rpx;
  130. line-height: 44rpx;
  131. padding: 24rpx;
  132. background-color: #F7F7F7;
  133. font-size: 28rpx;
  134. color: #333333;
  135. text-align: justify;
  136. }
  137. }
  138. .tui-custom-btn_box {
  139. width: 80px;
  140. height: 100%;
  141. padding: 0 20rpx;
  142. box-sizing: border-box;
  143. display: flex;
  144. align-items: center;
  145. justify-content: center;
  146. background-color: #f7f7f7;
  147. }
  148. .tui-custom-btn {
  149. width: 56rpx;
  150. height: 56rpx;
  151. border-radius: 50%;
  152. background-color: #f94b4b;
  153. color: #ffffff;
  154. display: flex;
  155. align-items: center;
  156. justify-content: center;
  157. flex-shrink: 0;
  158. .icon-shanchu3 {
  159. font-size: 32rpx;
  160. }
  161. }
  162. </style>