| | |
| | | //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) { |
| | |
| | | }, |
| | | 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() { |