club-visit.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view class="container ">
  3. <tui-skeleton
  4. v-if="skeletonShow"
  5. backgroundColor="#fafafa"
  6. borderRadius="10rpx"
  7. :isLoading="true"
  8. :loadingType="5"
  9. ></tui-skeleton>
  10. <template v-else>
  11. <au-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></au-custom>
  12. <view class="vsit-content" v-if="list.length>0">
  13. <view class="list" v-for="(item,index) in list" :key="index" >
  14. <view class="list-title">{{ item.year }}年</view>
  15. <view class="list-main clear">
  16. <view class="list-main-item" v-for="(visit,vIndex) in item.data" :key="vIndex" @click="handleVisitDeatil(visit)">
  17. <view class="item-le">{{ visit.monthAndDay }}</view>
  18. <view class="item-ri">
  19. <view class="item-ri-i">访问记录</view>
  20. <view class="item-ri-i none">{{ visit.number }}条</view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="vsit-content-none" v-else>
  27. <image class="none-image" src="https://static.caimei365.com/app/img/bg/bg_visit_none@2x.png" mode=""></image>
  28. <view class="none-text">暂无数据</view>
  29. </view>
  30. </template>
  31. </view>
  32. </template>
  33. <script>
  34. export default{
  35. data(){
  36. return{
  37. skeletonShow:true,
  38. clubId:0,
  39. nvabarData: { //顶部自定义导航
  40. haveHome:true,
  41. haveBack:true,
  42. textColor:'#ffffff',
  43. showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
  44. showSearch: 0,
  45. title: '', // 导航栏 中间的标题
  46. textLeft:this.$store.state.isIphone
  47. },
  48. list:[]
  49. }
  50. },
  51. filters:{
  52. },
  53. onLoad(option) {
  54. this.clubId = option.clubId
  55. this.getVisitList(option.clubId)
  56. },
  57. methods:{
  58. getVisitList(clubId){
  59. this.UserService.userClubRecordList({ clubId : clubId })
  60. .then(response => {
  61. this.list = response.data
  62. setTimeout(()=>{
  63. this.skeletonShow = false
  64. },500)
  65. })
  66. .catch(error => {
  67. console.log(error)
  68. })
  69. },
  70. handleVisitDeatil(visit){
  71. this.$api.navigateTo(`/pages/seller/club/club-visit-detail?clubId=${this.clubId}&accessDate=${visit.accessDate}&ip=${visit.ip}`)
  72. },
  73. hanldNavigateBack(){
  74. uni.navigateBack({
  75. delta: 1
  76. })
  77. }
  78. },
  79. onShow() {
  80. }
  81. }
  82. </script>
  83. <style lang="scss">
  84. page{
  85. width: 100%;
  86. height: auto;
  87. background-color: #F7F7F7 !important;
  88. }
  89. .container{
  90. width: 100%;
  91. min-height: 700rpx;
  92. background: url(https://static.caimei365.com/app/img/bg/bg_visit@2x.png) top center no-repeat;
  93. background-size: contain;
  94. box-sizing: border-box;
  95. padding: 0 24rpx;
  96. padding-top: 441rpx;
  97. }
  98. .vsit-content-none{
  99. width: 100%;
  100. min-height: 1000rpx;
  101. background: #FFFFFF;
  102. border-radius: 24rpx;
  103. padding: 52rpx 24rpx;
  104. box-sizing: border-box;
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. flex-direction: column;
  109. .none-image{
  110. width: 260rpx;
  111. height: 260rpx;
  112. margin-bottom: 20rpx;
  113. }
  114. .none-text{
  115. font-size: $font-size-28;
  116. color: #999999;
  117. line-height: 44rpx;
  118. }
  119. }
  120. .vsit-content{
  121. width: 100%;
  122. min-height: 1000rpx;
  123. background: #FFFFFF;
  124. border-radius: 24rpx;
  125. padding: 52rpx 24rpx;
  126. box-sizing: border-box;
  127. .list{
  128. width: 100%;
  129. height: auto;
  130. margin-bottom: 80rpx;
  131. .list-title{
  132. width: 100%;
  133. height: 58rpx;
  134. margin-bottom: 20rpx;
  135. font-size: 42rpx;
  136. color: #333;
  137. }
  138. .list-main{
  139. width: 100%;
  140. height: auto;
  141. padding: 24rpx 16rpx 24rpx 70rpx;
  142. box-sizing: border-box;
  143. position: relative;
  144. &::before{
  145. content:'';
  146. height: 100%;
  147. border-left: 2px dashed #FFA880;
  148. position: absolute;
  149. left: 37rpx;
  150. top: 0;
  151. }
  152. .list-main-item{
  153. width: 565rpx;
  154. height: 120rpx;
  155. box-sizing: border-box;
  156. padding: 12rpx 35rpx;
  157. background: url(https://static.caimei365.com/app/img/bg/bg_visit_list@2x.png)no-repeat;
  158. background-size: cover;
  159. margin-bottom: 40rpx;
  160. position: relative;
  161. border-radius: 16rpx;
  162. &::after{
  163. content:'';
  164. width: 40rpx;
  165. height: 40rpx;
  166. background: url(https://static.caimei365.com/app/img/bg/bg_visit_radius@2x.png)no-repeat;
  167. background-size: cover;
  168. position: absolute;
  169. left: -52rpx;
  170. }
  171. .item-le{
  172. height: 100%;
  173. box-sizing: border-box;
  174. padding-right: 30rpx;
  175. position: relative;
  176. float: left;
  177. line-height: 96rpx;
  178. font-size: 30rpx;
  179. text-align: center;
  180. color: #333333;
  181. &::before{
  182. content: '';
  183. width: 1px;
  184. height: 48rpx;
  185. background-color: #CCC;
  186. position: absolute;
  187. top: 24rpx;
  188. right: 0;
  189. }
  190. }
  191. .item-ri{
  192. height: 96rpx;
  193. padding-left: 48rpx;
  194. float: left;
  195. .item-ri-i{
  196. padding-right: 60rpx;
  197. line-height: 96rpx;
  198. font-size: 28rpx;
  199. text-align: center;
  200. color: #999;
  201. float: left;
  202. &.none{
  203. font-size: 30rpx;
  204. color: #FF5B00;
  205. }
  206. }
  207. }
  208. }
  209. }
  210. }
  211. }
  212. </style>