index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <view>
  3. <My_listbox ref="List" @getlist="getList" :bottomHeight="70">
  4. <view class="item-box">
  5. <navigator :url="'/cloud/feedback/detail?id='+item.sa_feedbackid" class="item" v-for="item 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. updateList () {
  70. this.$Http.updateList = function(res) {
  71. this.getList(true)
  72. delete this.$Http.updateList
  73. }.bind(this)
  74. }
  75. },
  76. onLoad (options) {
  77. uni.setNavigationBarTitle({
  78. title:'意见反馈',
  79. })
  80. this.getList(true)
  81. }
  82. }
  83. </script>
  84. <style lang="scss">
  85. .item-box {
  86. padding: 10px;
  87. .item {
  88. background: #ffffff;
  89. padding: 19px 0 10px 10px;
  90. border-radius: 8px 8px 8px 8px;
  91. font-family: Source Han Sans SC, Source Han Sans SC;
  92. margin-top: 10px;
  93. &:first-child {
  94. margin-top: 0 !important;
  95. }
  96. .header {
  97. display: flex;
  98. justify-content: space-between;
  99. align-items: center;
  100. padding-right: 10px;
  101. .header-left {
  102. position: relative;
  103. padding-left: 10px;
  104. &::after {
  105. content:'';
  106. width: 4px;
  107. height: 16px;
  108. background: #C30D23;
  109. position: absolute;
  110. left: 0;
  111. top: 2px;
  112. }
  113. }
  114. .header-right {
  115. font-weight: 400;
  116. font-size: 12px;
  117. color: #E3041F;
  118. position: relative;
  119. &::after {
  120. content:'';
  121. width: 5px;
  122. height: 5px;
  123. border-radius: 50%;
  124. background: #E3041F;
  125. position: absolute;
  126. left: -8px;
  127. top: 6px;
  128. }
  129. }
  130. }
  131. .content {
  132. font-weight: 400;
  133. font-size: 14px;
  134. color: #666666;
  135. margin: 10px 0;
  136. padding:0 10px 10px 0;
  137. border-bottom: 1px solid #DDDDDD;
  138. }
  139. .footer {
  140. display: flex;
  141. align-items: center;
  142. justify-content: space-between;
  143. font-weight: 400;
  144. font-size: 12px;
  145. color: #999999;
  146. padding-right: 10px;
  147. }
  148. }
  149. }
  150. .bottom {
  151. display: flex;
  152. position: fixed;
  153. bottom: 0;
  154. left: 0;
  155. width: 375px;
  156. height: 64px;
  157. background: #FFFFFF;
  158. box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
  159. box-sizing: border-box;
  160. z-index: 9999999;
  161. padding: 10px;
  162. .but {
  163. width: 355px;
  164. height: 45px;
  165. font-family: PingFang SC, PingFang SC;
  166. font-weight: 500;
  167. font-size: 14px;
  168. color: #FFFFFF;
  169. background: #C30D23;
  170. border-radius: 5px 5px 5px 5px;
  171. border: 1px solid #FFFFFF;
  172. display: flex;
  173. align-items: center;
  174. align-content: center;
  175. justify-content: space-evenly;
  176. }
  177. }
  178. </style>