From 8840efb29d8818afcfd2176914bcf4811d9c60fe Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期三, 11 九月 2024 15:38:31 +0800
Subject: [PATCH] 1.粉丝数数据量统计 2.点赞设置为0

---
 sub_pages/customer/shop/shop.vue |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/sub_pages/customer/shop/shop.vue b/sub_pages/customer/shop/shop.vue
index 8d7bd8b..a70ca42 100644
--- a/sub_pages/customer/shop/shop.vue
+++ b/sub_pages/customer/shop/shop.vue
@@ -34,11 +34,11 @@
 					<view class="label">发布</view>
 				</view>
 				<view class="form-item">
-					<view class="value">*</view>
+					<view class="value">0</view>
 					<view class="label">获赞</view>
 				</view>
 				<view class="form-item">
-					<view class="value">*</view>
+					<view class="value">{{statis.fans_cnt}}</view>
 					<view class="label">粉丝</view>
 				</view>
 				<!-- <view class="form-item">
@@ -287,18 +287,25 @@
 				order_show: false,
 				order_columns: [
 					[]
-				]
+				],
+				statis:{
+					fans_cnt:0
+				}
 			}
 		},
 		onShow() {
 			//避免商品数目不一样			
 			this.refreshList('post')
+			// 获取粉丝数
+			this.getFansCount()
 		},
 		async onPullDownRefresh() {
 			if (this.id) {
 				await this.getDetail()
 			}
 			await this.refreshList('post')
+			// 获取粉丝数
+			this.getFansCount()
 			uni.stopPullDownRefresh()
 
 		},
@@ -335,6 +342,9 @@
 					value: ''
 				})
 			})
+			
+			// 获取粉丝数
+			this.getFansCount()
 		},
 		// #ifdef PUB_CUSTOMER
 		onShareAppMessage() {
@@ -366,6 +376,20 @@
 			// }
 		},
 		methods: {
+			
+			// 获取粉丝数量
+			getFansCount(){
+				 
+				this.$http.request('get', `/api/follow/fans/statis/${this.query.supplierId}`, {
+					params: {
+						supplierId: this.query.supplierId
+					}
+				}).then(res => {
+					var data = res.data
+					this.statis.fans_cnt=data
+				})
+			},
+			
 			getList_after() {
 				if (this.list) {
 					for (var item of this.list) {

--
Gitblit v1.9.3