club-visit.vue 5.3 KB

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