interactive.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template>
  2. <view class="supply-hall">
  3. <z-paging ref="paging" v-model="dataList" @query="queryList">
  4. <!-- <template slot="top">
  5. <view style="width: 100%; height: 50px; border-bottom: 1px solid #f1f1f1">
  6. <u-navbar
  7. @leftClick="leftClick"
  8. title="服务通知"
  9. bgColor="transparent"
  10. :autoBack="true"
  11. leftIconSize="20px"
  12. ></u-navbar>
  13. </view>
  14. </template> -->
  15. <view class="main" v-for="(item, index) in dataList" :key="index">
  16. <view class="item">
  17. <view class="left">
  18. <image :src="item.fromUserAvatar" style="width: 70px; height: 70px" />
  19. </view>
  20. <view class="right">
  21. <view>
  22. <view class="title">
  23. {{ item.refTitle }}
  24. </view>
  25. <view class="contont">
  26. {{ item.content }}
  27. </view>
  28. <view>
  29. {{ item.createTime ? $moment(item.createTime).format("YYYY-MM-DD") : "" }}
  30. </view>
  31. </view>
  32. <view>
  33. <image
  34. :src="item.extendInfo ? JSON.parse(item.extendInfo).refImg : ''"
  35. style="width: 70px; height: 70px"
  36. mode=""
  37. />
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </z-paging>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data() {
  48. return {
  49. show: false,
  50. dataList: [],
  51. queryParams: {
  52. type: "1",
  53. toUserId: "",
  54. page: "1",
  55. size: "10",
  56. },
  57. };
  58. },
  59. mounted() {
  60. // #ifndef H5 || APP-PLUS || MP-ALIPAY
  61. const { windowHeight, screenHeight, safeArea, statusBarHeight } = uni.$u.sys(); // 获取页面高度
  62. let menuButtonObject = uni.getMenuButtonBoundingClientRect();
  63. let navHeight =
  64. menuButtonObject.height + (menuButtonObject.top - statusBarHeight) * 2;
  65. this.statusBarHeight = navHeight + statusBarHeight + 4;
  66. let tabBarHeight = windowHeight - safeArea.bottom;
  67. this.bottomStatusHeight = screenHeight - this.statusBarHeight - tabBarHeight;
  68. // #endif
  69. },
  70. onLoad(option) {
  71. console.log("option", option);
  72. },
  73. onReady() {},
  74. methods: {
  75. leftClick() {
  76. uni.reLaunch({
  77. url: "/TUIKit/components/TUIConversation/index",
  78. });
  79. },
  80. queryList(pageNumber, pageSize) {
  81. this.queryParams.page = pageNumber;
  82. this.queryParams.size = pageSize;
  83. let dataList = [];
  84. this.$refs.paging.complete(dataList);
  85. this.api
  86. .noticeList(this.queryParams)
  87. .then((res) => {
  88. if (res.code === 200) {
  89. this.$refs.paging.complete(res.data.content);
  90. this.api.readAll();
  91. }
  92. })
  93. .catch((res) => {
  94. this.$refs.paging.complete(false);
  95. });
  96. },
  97. },
  98. };
  99. </script>
  100. <style lang="scss" scoped>
  101. .popup ::v-deep .u-button {
  102. width: 100% !important;
  103. height: 38px !important;
  104. background: linear-gradient(87deg, #28d141 0%, #28ef8c 100%) !important;
  105. border: none !important;
  106. border-radius: 29rpx !important;
  107. font-size: 28rpx !important;
  108. font-weight: bold !important;
  109. margin-top: 30px;
  110. color: white;
  111. }
  112. .main {
  113. .item {
  114. display: flex;
  115. flex-direction: row;
  116. align-items: center;
  117. padding: 10px 20px;
  118. background: white;
  119. .left {
  120. width: 20%;
  121. margin-right: 10px;
  122. .img {
  123. width: 110rpx;
  124. height: 110rpx;
  125. border-radius: 50%;
  126. }
  127. }
  128. .right {
  129. width: 80%;
  130. line-height: 25px;
  131. display: flex;
  132. flex-direction: row;
  133. align-items: center;
  134. justify-content: space-around;
  135. .contont {
  136. font-size: 26rpx;
  137. color: #333333;
  138. }
  139. .title {
  140. font-weight: 600;
  141. font-size: 36rpx;
  142. color: #333333;
  143. }
  144. }
  145. }
  146. }
  147. .supply-hall {
  148. width: 750rpx;
  149. height: 100vh;
  150. background-color: white;
  151. overflow: hidden;
  152. &-tabs {
  153. height: 70rpx;
  154. background-color: #ffffff;
  155. border-radius: 0rpx 0rpx 28rpx 28rpx;
  156. display: flex;
  157. justify-content: space-between;
  158. align-items: center;
  159. padding: 0rpx 24rpx;
  160. &-item {
  161. display: flex;
  162. align-items: center;
  163. }
  164. }
  165. &-screen {
  166. height: 70rpx;
  167. background-color: #ffffff;
  168. // border-radius: 0rpx 0rpx 28rpx 28rpx;
  169. display: flex;
  170. align-items: center;
  171. justify-content: space-around;
  172. position: relative;
  173. &-item {
  174. display: flex;
  175. align-items: center;
  176. }
  177. }
  178. }
  179. .ml6 {
  180. margin-left: 6rpx;
  181. }
  182. ::v-deep .supply-hall-search .u-input.data-v-113bc24f {
  183. background-color: #fff !important;
  184. box-sizing: border-box !important;
  185. border-radius: 33rpx !important;
  186. height: 64rpx !important;
  187. padding-right: 2rpx !important;
  188. }
  189. ::v-deep .popup-item .u-input.data-v-113bc24f {
  190. background-color: #fff !important;
  191. box-sizing: border-box !important;
  192. border-radius: 33rpx !important;
  193. height: 64rpx !important;
  194. padding-right: 2rpx !important;
  195. width: 200rpx !important;
  196. }
  197. ::v-deep .u-button--primary.data-v-2bf0e569 {
  198. width: 110rpx !important;
  199. height: 56rpx !important;
  200. background: linear-gradient(87deg, #28d141 0%, #28ef8c 100%) !important;
  201. border: none !important;
  202. border-radius: 29rpx !important;
  203. font-size: 28rpx !important;
  204. font-weight: bold !important;
  205. }
  206. </style>