Visitslogs.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <view class="rigth-view">
  3. <scroll-view scroll-y="true" class="rigth-scroll" @scrolltolower="scrolltolowerMore">
  4. <view class="log-li" v-for="(item, index) in visit_logs" :key="index">
  5. <view class="goods-name">
  6. {{ item.goodsName }}
  7. </view>
  8. <view class="time">
  9. {{ $u.timeFormat(item.createTime, 'mm-dd hh:MM:ss') }}
  10. </view>
  11. </view>
  12. <!-- <view class="goods-li" v-for="(item, index) in visit_logs" :key="index">
  13. <view class="goods-main clearfix">
  14. <image class="goods-img float_left" src="../../../static/Tar_bar_slices/goods-fill.png" mode="aspectFill"></image>
  15. <view class="goods-info float_left ">
  16. <view class="goods-name clearfix ellipsis">
  17. <view class="ellipsis float_left" style="width: 350rpx;">{{ item.goodsName }}</view>
  18. <view class="float_right browse">
  19. <view class="float_left browse-left">浏览</view>
  20. <view class="float_left browse-center"></view>
  21. <view class="float_left browse-right">323S</view>
  22. </view>
  23. </view>
  24. <view class="goods-code">库存:114329</view>
  25. <view class="goods-code">
  26. <view class="num-ul clearfix">
  27. <view class="num-li" style="margin-right: 32rpx;">购买价格:212.00</view>
  28. <view class="num-li">购买数量:20</view>
  29. <view class="num-li price">
  30. <text style="font-weight: 300;">¥</text>
  31. 1230123213.78
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="bottom-view clearfix">
  38. <view class="float_left ellipsis shop-name">浏览店铺名称</view>
  39. <view class="float_right time">浏览时间:{{ $u.timeFormat(item.createTime, 'mm-dd hh:MM:ss') }}</view>
  40. </view>
  41. </view> -->
  42. <u-loadmore :status="load_status" />
  43. </scroll-view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. props: {
  49. customerId: {
  50. type: [Number, String],
  51. default: '',
  52. }
  53. },
  54. data() {
  55. return {
  56. load_status: 'nomore',
  57. visit_logs: [],
  58. page: 1,
  59. pageSize: 10,
  60. total: 0
  61. };
  62. },
  63. created() {
  64. this.getCustomerVisitsLogInfo();
  65. },
  66. methods: {
  67. scrolltolowerMore() {
  68. if (this.total / this.pageSize > this.page) {
  69. this.page += 1;
  70. this.getCustomerVisitsLogInfo();
  71. }
  72. },
  73. // 浏览记录
  74. getCustomerVisitsLogInfo() {
  75. this.$u.api
  76. .getAllCustomerVisitsLog({
  77. customerId: parseInt(this.customerId),
  78. page: this.page,
  79. pageSize: this.pageSize,
  80. })
  81. .then(({ data }) => {
  82. if (this.page === 1) {
  83. this.visit_logs = data;
  84. } else {
  85. this.visit_logs = this.visit_logs.concat(data);
  86. }
  87. this.total = pageTotal;
  88. this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
  89. });
  90. }
  91. }
  92. };
  93. </script>
  94. <style lang="scss" scoped>
  95. .rigth-view {
  96. background-color: rgb(247, 248, 250);
  97. .rigth-scroll {
  98. width: 100%;
  99. height: calc(90vh - 100rpx);
  100. .goods-li {
  101. width: 710rpx;
  102. margin: 24rpx auto;
  103. background-color: #ffffff;
  104. border-radius: 8px;
  105. position: relative;
  106. .bottom-view {
  107. padding: 0 24rpx;
  108. line-height: 86rpx;
  109. border-top: 1px solid #ecf0f7;
  110. .shop-name {
  111. font-weight: 600;
  112. }
  113. .time {
  114. color: #b8c0c8;
  115. }
  116. }
  117. .goods-main {
  118. padding: 27rpx 0 20rpx 24rpx;
  119. .goods-img {
  120. border-radius: 14rpx;
  121. width: 126rpx;
  122. height: 126rpx;
  123. margin-right: 16rpx;
  124. }
  125. .goods-info {
  126. width: 530rpx;
  127. .goods-name {
  128. -webkit-line-clamp: 1;
  129. color: #2d405e;
  130. font-size: 30rpx;
  131. font-weight: 500;
  132. .browse {
  133. .browse-left {
  134. border-radius: 8rpx 0 0 8rpx;
  135. width: 64rpx;
  136. height: 40rpx;
  137. background-color: #2d405e;
  138. font-size: 20rpx;
  139. color: #ffffff;
  140. line-height: 40rpx;
  141. text-align: center;
  142. }
  143. .browse-center {
  144. width: 0;
  145. height: 0;
  146. border-color: #2d405e #4076d6 transparent transparent;
  147. border-style: solid;
  148. border-width: 40rpx 10rpx 0 0;
  149. }
  150. .browse-right {
  151. border-radius: 0 8rpx 8rpx 0;
  152. width: 76rpx;
  153. height: 40rpx;
  154. background-color: #4076d6;
  155. font-size: 20rpx;
  156. color: #ffffff;
  157. line-height: 40rpx;
  158. text-align: center;
  159. }
  160. }
  161. }
  162. .goods-code {
  163. width: 100%;
  164. font-size: 22rpx;
  165. font-family: DINPro-Regular;
  166. font-weight: 400;
  167. color: #62738e;
  168. margin-top: 8rpx;
  169. }
  170. .goods-tag {
  171. padding: 10rpx 0;
  172. .tag-li {
  173. margin-right: 14rpx;
  174. }
  175. }
  176. .goods-num {
  177. color: #999999;
  178. font-size: 22rpx;
  179. text {
  180. padding-right: 10rpx;
  181. }
  182. }
  183. }
  184. }
  185. .num-ul {
  186. .num-li {
  187. float: left;
  188. &.price {
  189. font-weight: 600;
  190. float: right;
  191. color: #fa6400;
  192. }
  193. }
  194. }
  195. }
  196. }
  197. }
  198. .log-li{
  199. background-color: #FFFFFF;
  200. padding: 24rpx;
  201. width: 710rpx;
  202. margin: 24rpx auto;
  203. border-radius: 8px;
  204. .goods-name{
  205. color: #2d405e;
  206. font-size: 30rpx;
  207. font-weight: 500;
  208. }
  209. .time{
  210. padding-top: 20rpx;
  211. font-size: 24rpx;
  212. }
  213. }
  214. </style>