log.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <view class="event-details">
  3. <navbar ref="navbar" :config="config" backColor="#666"></navbar>
  4. <view class="middle">
  5. <view v-if="logList.length > 0">
  6. <view class="item" v-for="(item, index) in logList" :key="index">
  7. <view class="box">
  8. <view class="time">
  9. {{ item.verification_time }}
  10. </view>
  11. </view>
  12. <view class="content">
  13. <view class="title"> 操作人: {{ item.admin }} </view>
  14. <view class="title"> 核销码: {{ item.verification_code }} </view>
  15. <view class="title"> 备注: {{ item.remark }} </view>
  16. </view>
  17. </view>
  18. <loadMore v-if="logList.length > 0" :status="status"></loadMore>
  19. </view>
  20. <nodata v-else :config="{ top: 20, content: '暂无数据~' }"></nodata>
  21. </view>
  22. <ldLoading isFullScreen :active="loading"></ldLoading>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. config: {
  30. back: true, //false是tolbar页面 是则不写
  31. title: "核销记录",
  32. color: "#1A1A1A",
  33. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  34. backgroundColor: [1, "#FFFFFF"],
  35. statusBarFontColor: "#1A1A1A",
  36. },
  37. status: "more",
  38. params: {
  39. //分页
  40. page: 1,
  41. limit: 10,
  42. },
  43. type: null,
  44. logList: [],
  45. loading: true,
  46. params: {
  47. order_id: null,
  48. child_order_id: null,
  49. page: 1,
  50. limit: 10,
  51. },
  52. };
  53. },
  54. onLoad(options) {
  55. if (options.id && options.childId) {
  56. this.params.order_id = options.id;
  57. this.params.child_order_id = options.childId;
  58. }
  59. this.getLog();
  60. },
  61. //上拉加载
  62. onReachBottom(e) {
  63. this.params.page++;
  64. this.getLog();
  65. },
  66. //下拉刷新
  67. onPullDownRefresh() {
  68. this.params.page = 1;
  69. this.logList = [];
  70. this.getLog();
  71. uni.stopPullDownRefresh();
  72. },
  73. //不知道有哪些消息啊
  74. methods: {
  75. //获取数据
  76. getLog() {
  77. this.$http.get("/sgoodsverification/list", this.params).then((res) => {
  78. if (res && res.code == 200) {
  79. this.loading = false;
  80. this.logList = this.logList.concat(res.page.list);
  81. if (res.page.totalPage <= res.page.currPage) {
  82. this.status = "noMore";
  83. } else {
  84. this.status = "more";
  85. }
  86. }
  87. });
  88. },
  89. },
  90. };
  91. </script>
  92. <style scoped lang="scss">
  93. .event-details{
  94. min-height: 100vh;
  95. }
  96. .middle {
  97. padding: 0 30rpx;
  98. .item {
  99. .box {
  100. display: flex;
  101. justify-content: center;
  102. .time {
  103. font-size: 22rpx;
  104. color: #666666;
  105. font-weight: 400;
  106. background-color: #e3e3e3;
  107. padding: 10rpx 20rpx;
  108. border-radius: 24rpx;
  109. margin: 40rpx 0;
  110. }
  111. }
  112. .content {
  113. padding: 44rpx 30rpx;
  114. background-color: #ffffff;
  115. border-radius: 18rpx;
  116. .bottom-time {
  117. font-size: 24rpx;
  118. color: #999999;
  119. font-weight: 400;
  120. }
  121. .logistics-top {
  122. font-size: 28rpx;
  123. color: #1a1a1a;
  124. font-weight: 400;
  125. }
  126. .logistics-box {
  127. margin-top: 22rpx;
  128. display: flex;
  129. .logistics-left {
  130. image {
  131. width: 156rpx;
  132. height: 156rpx;
  133. }
  134. }
  135. .logistics-right {
  136. margin-left: 32rpx;
  137. display: flex;
  138. flex-direction: column;
  139. justify-content: space-between;
  140. .logistics-right-top {
  141. overflow: hidden;
  142. text-overflow: ellipsis;
  143. display: -webkit-box;
  144. -webkit-line-clamp: 2;
  145. -webkit-box-orient: vertical;
  146. word-wrap: break-word;
  147. word-break: break-all;
  148. white-space: normal !important;
  149. font-size: 26rpx;
  150. color: #1a1a1a;
  151. font-weight: 400;
  152. flex: 1;
  153. }
  154. .logistics-right-content {
  155. color: #1a1a1a;
  156. font-size: 26rpx;
  157. font-weight: 400;
  158. margin-bottom: 8rpx;
  159. text {
  160. color: #999999;
  161. margin-left: 16rpx;
  162. }
  163. }
  164. .logistics-right-bottom {
  165. font-size: 22rpx;
  166. color: #999999;
  167. font-weight: 400;
  168. margin-bottom: 18rpx;
  169. }
  170. }
  171. }
  172. .bottom-box {
  173. text-align: right;
  174. text {
  175. color: #ff0000;
  176. font-size: 32rpx;
  177. font-weight: Bold;
  178. }
  179. }
  180. .title {
  181. font-size: 28rpx;
  182. color: #1a1a1a;
  183. font-weight: 400;
  184. margin-bottom: 26rpx;
  185. }
  186. .small-box {
  187. margin-bottom: 60rpx;
  188. display: flex;
  189. .small-left {
  190. image {
  191. width: 200rpx;
  192. height: 200rpx;
  193. }
  194. }
  195. .small-right {
  196. display: flex;
  197. flex-direction: column;
  198. justify-content: space-between;
  199. margin-left: 30rpx;
  200. .small-top {
  201. flex: 1;
  202. }
  203. .specifications {
  204. font-size: 22rpx;
  205. color: #999999;
  206. font-weight: 400;
  207. margin-bottom: 14rpx;
  208. }
  209. .price {
  210. color: #1a1a1a;
  211. font-size: 26rpx;
  212. font-weight: 400;
  213. text {
  214. margin-left: 13rpx;
  215. color: #999999;
  216. }
  217. }
  218. }
  219. }
  220. .single-data {
  221. .single-img {
  222. display: flex;
  223. flex-wrap: nowrap;
  224. overflow: hidden;
  225. image {
  226. width: 200rpx;
  227. height: 200rpx;
  228. padding: 0 5rpx;
  229. }
  230. }
  231. .single-bottom {
  232. text-align: right;
  233. margin-right: 10rpx;
  234. margin-top: 60rpx;
  235. text {
  236. color: #ff0000;
  237. font-size: 32rpx;
  238. font-weight: bold;
  239. }
  240. }
  241. }
  242. .image {
  243. image {
  244. width: 630rpx;
  245. height: 250rpx;
  246. }
  247. }
  248. }
  249. }
  250. }
  251. .event-details {
  252. background-color: #f5f5f5;
  253. }
  254. </style>