Browse Source

小黄车 添加直播间的数据

yuhongqi 2 weeks ago
parent
commit
8a5f3ee812
2 changed files with 7 additions and 6 deletions
  1. 5 5
      api/live.js
  2. 2 1
      pages/home/living.vue

+ 5 - 5
api/live.js

@@ -4,15 +4,15 @@ const api = {
 	liveDataLike: (liveId) => `/app/live/liveData/like/${liveId}`, // 点赞
 	collectStore:(sotreId)=> `/app/live/liveData/collectStore?storeId=${sotreId}`, // 店铺收藏/取消收藏
 	collectGoods:(goodId)=> `/app/live/liveData/collectGoods?goodId=${goodId}`, // 商品收藏/取消收藏
-	store:(storeld,key)=> `/app/live/store/${storeld}?key=${key}`, // 小黄车查询店铺
-	
+	store:(storeld,key,liveId)=> `/app/live/store/${storeld}?key=${key}&liveId=${liveId}`, // 小黄车查询店铺
+
 	queryStore:(storeld,pageSize,pageNum,keywords)=> `/app/live/store?storeId=${storeld}&pageSize=${pageSize}&pageNum=${pageNum}&keywords=${keywords}`, // 查询店铺
 	follow: (liveId) => `/app/live/liveData/follow/${liveId}`, // 关注/取消关注
 	// getRecentLiveViewers: (liveId) => `/app/live/liveData/getRecentLiveViewers/${liveId}`, // 获取直播间用户(展示在线用户)
 	watchUserList: (liveId,pageSize,pageNum,reasonable) => `/app/live/liveWatchUser/watchUserList/?liveId=${liveId}&pageSize=${pageSize}&pageNum=${pageNum}&reasonable=${reasonable}`, // 获取直播间用户(展示在线用户)
 	liveMsg: (liveId,pageSize,pageNum) => `/app/live/liveMsg/list/?liveId=${liveId}&pageSize=${pageSize}&pageNum=${pageNum}`, //获取最近聊天记录
 
-	
+
 	// checkSms: 'api/sms/checkSms',
 	getLiveInfo: (liveId) => `/app/live/${liveId}`, // 获取直播间信息接口
 	getLiveViewData: (liveId) => `/app/live/liveData/getLiveViewData/${liveId}`, // 直播间点赞、关注、在线人数数据
@@ -39,8 +39,8 @@ export function collectGoods(goodId,data= {}) {
 	return request(api.collectGoods(goodId), data, 'POST', 'application/json;charset=UTF-8')
 }
 // 小黄车查询店铺
-export function store(storeld,key,data= {}) {
-	return request(api.store(storeld,key), data, 'GET', 'application/json;charset=UTF-8')
+export function store(storeld,key, liveId,data= {}) {
+	return request(api.store(storeld,key,liveId), data, 'GET', 'application/json;charset=UTF-8')
 }
 // 查询店铺
 export function queryStore(storeld,pageSize,pageNum,keywords,data= {}) {

+ 2 - 1
pages/home/living.vue

@@ -1041,7 +1041,8 @@
 			// 查询店铺
 			queryCollect() {
 				if (!this.storeId) return;
-				store(this.storeId, this.inputInfo).then(res => {
+				if (!this.liveId) return;
+				store(this.storeId, this.inputInfo,this.liveId).then(res => {
 						if (res.code == 200) {
 							console.log("查询店铺>>", res)
 							this.products = res.data.goodsList