index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <view>
  3. <My_listbox ref="List" @getlist="getList" :bottomHeight="70">
  4. <view class="item-box">
  5. <navigator @click="itemClick(item, index)" :url="'/cloud/feedback/detail?id=' + item.sa_feedbackid"
  6. class="item" v-for="(item, index) in list" :key="item.sa_feedbackid">
  7. <view class="header">
  8. <view class="header-left">
  9. <text>{{ item.type }}</text>
  10. </view>
  11. <view class="header-right" v-if="item.isnew">
  12. <text>新消息</text>
  13. </view>
  14. </view>
  15. <view class="content">
  16. {{ item.remarks }}
  17. </view>
  18. <view class="footer">
  19. <view class="footer-left">
  20. {{ item.createdate }}
  21. </view>
  22. <view class="footer-right">回复:{{ item.replycount }}</view>
  23. </view>
  24. </navigator>
  25. </view>
  26. </My_listbox>
  27. <view class="bottom">
  28. <navigator @click="updateList" class="but" url="/cloud/feedback/insert">
  29. <view class="but">
  30. <text>我要反馈</text>
  31. </view>
  32. </navigator>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. list: [],
  41. content: {
  42. "pageNumber": 1,
  43. "pageSize": 20,
  44. "where": {
  45. "condition": "",
  46. "type": ""
  47. }
  48. },
  49. }
  50. },
  51. methods: {
  52. getList(init = false) {
  53. return new Promise((resolve, reject) => {
  54. if (this.paging(this.content, init)) return resolve();
  55. this.$Http.basic({
  56. "id": "20240517102902",
  57. content: this.content
  58. }).then(res => {
  59. this.$refs.List.RefreshToComplete()
  60. console.log("获取意见列表", res)
  61. resolve();
  62. if (this.cutoff(res.msg)) return;
  63. this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
  64. this.content = this.$refs.List.paging(this.content, res)
  65. this.total = res.total;
  66. this.$refs.List.setHeight()
  67. })
  68. })
  69. },
  70. async itemClick(data, index) {
  71. this.$Http.setCallCount = function () {
  72. let replycount = this.list[index].replycount + 1
  73. this.$set(this.list[index], 'replycount', replycount)
  74. }.bind(this)
  75. },
  76. updateList() {
  77. this.$Http.updateList = function (res) {
  78. this.getList(true)
  79. delete this.$Http.updateList
  80. }.bind(this)
  81. }
  82. },
  83. onLoad(options) {
  84. uni.setNavigationBarTitle({
  85. title: '意见反馈',
  86. })
  87. this.getList(true)
  88. }
  89. }
  90. </script>
  91. <style lang="scss">
  92. .item-box {
  93. padding: 10px;
  94. .item {
  95. background: #ffffff;
  96. padding: 19px 0 10px 10px;
  97. border-radius: 8px 8px 8px 8px;
  98. font-family: Source Han Sans SC, Source Han Sans SC;
  99. margin-top: 10px;
  100. &:first-child {
  101. margin-top: 0 !important;
  102. }
  103. .header {
  104. display: flex;
  105. justify-content: space-between;
  106. align-items: center;
  107. padding-right: 10px;
  108. .header-left {
  109. position: relative;
  110. padding-left: 10px;
  111. &::after {
  112. content: '';
  113. width: 4px;
  114. height: 16px;
  115. background: #C30D23;
  116. position: absolute;
  117. left: 0;
  118. top: 2px;
  119. }
  120. }
  121. .header-right {
  122. font-weight: 400;
  123. font-size: 12px;
  124. color: #E3041F;
  125. position: relative;
  126. &::after {
  127. content: '';
  128. width: 5px;
  129. height: 5px;
  130. border-radius: 50%;
  131. background: #E3041F;
  132. position: absolute;
  133. left: -8px;
  134. top: 6px;
  135. }
  136. }
  137. }
  138. .content {
  139. font-weight: 400;
  140. font-size: 14px;
  141. color: #666666;
  142. margin: 10px 0;
  143. padding: 0 10px 10px 0;
  144. border-bottom: 1px solid #DDDDDD;
  145. }
  146. .footer {
  147. display: flex;
  148. align-items: center;
  149. justify-content: space-between;
  150. font-weight: 400;
  151. font-size: 12px;
  152. color: #999999;
  153. padding-right: 10px;
  154. }
  155. }
  156. }
  157. .bottom {
  158. display: flex;
  159. position: fixed;
  160. bottom: 0;
  161. left: 0;
  162. width: 375px;
  163. height: 64px;
  164. background: #FFFFFF;
  165. box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
  166. box-sizing: border-box;
  167. z-index: 9999999;
  168. padding: 5px 10px;
  169. .but {
  170. width: 355px;
  171. height: 45px;
  172. font-family: PingFang SC, PingFang SC;
  173. font-weight: 500;
  174. font-size: 14px;
  175. color: #FFFFFF;
  176. background: #C30D23;
  177. border-radius: 5px 5px 5px 5px;
  178. border: 1px solid #FFFFFF;
  179. display: flex;
  180. align-items: center;
  181. align-content: center;
  182. justify-content: space-evenly;
  183. }
  184. }</style>