index.vue 6.0 KB

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