| | |
| | | <text class="more" @click="viewAllVisitors()">查看全部</text> |
| | | </view> |
| | | <view class="visitor-list"> |
| | | <view class="visitor-item" v-for="(visitor, index) in visitors" :key="index"> |
| | | <image class="visitor-avatar" :src="visitor.avatar || '/static/default.png'" mode="aspectFill"> |
| | | <view class="visitor-item" v-for="(visitor, index) in visitors.data" :key="index"> |
| | | <image class="visitor-avatar" :src="visitor.user.avatarUrl || '/static/default.png'" mode="aspectFill"> |
| | | </image> |
| | | <view class="visitor-info"> |
| | | <view class="visitor-name">{{visitor.user_name || '未知访客'}}</view> |
| | | <view class="visitor-time">{{formatTime(visitor.visit_time)}}</view> |
| | | <view class="visitor-name">{{visitor.user.nickName || '未知访客'}}</view> |
| | | <view class="visitor-time">{{visitor.update_time}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | //this.getStatistics(); |
| | | this.getVisitorList(); |
| | | const systemInfo = uni.getSystemInfoSync() |
| | | this.screenWidth=systemInfo.screenWidth*2-70; |
| | | this.screenWidth = systemInfo.screenWidth * 2 - 70; |
| | | }, |
| | | getbusinessList() { |
| | | let _this = this; |
| | | _this._post('plus.business.business/getList', {user_id:uni.removeStorageSync('user_id')}, function(res) { |
| | | _this._post('plus.business.business/getList', { |
| | | user_id: uni.removeStorageSync('user_id') |
| | | }, function(res) { |
| | | _this.businessList = res.data.data; |
| | | if (_this.businessList.length > 0) { |
| | | _this.getbusiness(_this.businessList[_this.current].user_id) |
| | |
| | | }); |
| | | }, |
| | | |
| | | getStatistics() { |
| | | // 获取统计数据 |
| | | getStatistics(business_card_id) { |
| | | // 默认名片 |
| | | let _this = this; |
| | | _this._post('plus.business.business/getStatistics', {}, function(res) { |
| | | _this.statistics = res.data; |
| | | _this._post('plus.business.business/editDefault', { |
| | | business_card_id: business_card_id |
| | | }, function(res) { |
| | | _this.getbusinessList(); |
| | | _this.getVisitorList(); |
| | | }); |
| | | }, |
| | | getbusiness(user_id) { |
| | |
| | | page: 1, |
| | | list_rows: 10 |
| | | }, function(res) { |
| | | _this.visitors = res.data.list; |
| | | console.log(res); |
| | | _this.visitors = res.data; |
| | | }); |
| | | }, |
| | | makePhoneCall(phone) { |
| | |
| | | }, |
| | | selectCard(index) { |
| | | this.current = index; |
| | | this.getCardStatistics(this.businessList[this.current].business_card_id); |
| | | this.getStatistics(this.businessList[this.current].business_card_id); |
| | | this.closePopup(); |
| | | }, |
| | | addNewCard() { |