12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <template>
- <view class="visitor">
- <view class="visits-time">{{ accDateTime }}</view>
- <template>
- <visits-cell
- @handlerVisits="handlerVisits"
- :visits-info="visitsInfo"
- v-for="visitsInfo in visitsList"
- :key="visitsInfo.userID"
- />
- </template>
- </view>
- </template>
- <script>
- import VisitsCell from '../components/visits-cell.vue'
- export default {
- components: {
- VisitsCell
- },
- data() {
- return {
- visitsList: [],
- accDateTime: '',
- spId: '',
- type: ''
- }
- },
- async onLoad(options) {
- this.spId = options.spId
- const { data } = await this.SellerService.getVisitesClubList({
- spId: options.spId,
- accDateTime: options.accDateTime,
- type: options.type
- })
- this.visitsList = data
- this.accDateTime = options.accDateTime
- if (options.type) {
- this.type = options.type || ''
- }
- console.log('options', options, 'visitsList', data)
- },
- onReachBottom() {
- },
- onPullDownRefresh() {
- //下拉刷新
- this.getVisitesClubList()
- uni.stopPullDownRefresh()
- },
- methods: {
- handlerVisits($event) {
- this.$api.navigateTo(
- '/pages/seller/notice/service/visits_details?spId=' +
- this.spId +
- '&clubId=' +
- ($event.clubId || '') +
- '&accessTime=' +
- this.accDateTime + '&type=' + this.type
- )
- },
- async getVisitesClubList() {
- const { data } = await this.SellerService.getVisitesClubList({
- spId: options.spId,
- accDateTime: options.accDateTime
- })
- this.visitsList = data
- console.log('visitsList', this.visitsList)
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #f7f7f7;
- }
- .visitor {
- .visits-time {
- font-size: 32rpx;
- font-weight: bold;
- color: #333333;
- padding: 40rpx 0 24rpx 16rpx;
- }
- }
- </style>
|