1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <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: '',
- userInfo: {}
- }
- },
- onLoad(options) {
- this.accDateTime = options.accDateTime
- },
- mounted() {
- this.userInfo = uni.getStorageSync('userInfo')
- this.getVisitesClubList()
- },
- onReachBottom() {
- },
- onPullDownRefresh() {
- //下拉刷新
- this.getVisitesClubList()
- uni.stopPullDownRefresh()
- },
- methods: {
- handlerVisits($event) {
- uni.setStorageSync('visitsInfo', JSON.stringify($event))
- this.$api.navigateTo(
- '/pages/seller/notice/service/visits_details?spId=' +
- this.userInfo.serviceProviderId +
- '&clubId=' +
- $event.clubId +
- '&accessTime=' +
- $event.accessTime.substr(0, 10)
- )
- },
- async getVisitesClubList() {
- const { data } = await this.SellerService.getVisitesClubList({
- spId: this.userInfo.serviceProviderId,
- accDateTime: this.accDateTime
- })
- this.visitsList = data
- }
- }
- }
- </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>
|