"use strict"; const common_request = require("../common/request.js"); let request = new common_request.Request().http; 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}`, // 小黄车查询店铺 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}`, // 直播间点赞、关注、在线人数数据 liveRed: "/app/live/liveRed/claim", // 点击领红包 // 直播订单 liveStore: (liveId, key) => `/app/live/liveGoods/liveStore/${liveId}?key=${key}`, // 店铺展示 liveGoodsDetail: (productId) => `/app/live/liveGoods/liveGoodsDetail/${productId}`, // 商品详情 liveOrderUser: (liveId) => `/app/live/liveOrder/liveOrderUser/${liveId}` // 正在购买 }; function liveDataLike(liveId, data = {}) { return request(api.liveDataLike(liveId), data, "GET", "application/json;charset=UTF-8"); } function collectStore(sotreId, data = {}) { return request(api.collectStore(sotreId), data, "POST", "application/json;charset=UTF-8"); } function collectGoods(goodId, data = {}) { return request(api.collectGoods(goodId), data, "POST", "application/json;charset=UTF-8"); } function store(storeld, key, data = {}) { return request(api.store(storeld, key), data, "GET", "application/json;charset=UTF-8"); } function queryStore(storeld, pageSize, pageNum, keywords, data = {}) { return request(api.queryStore(storeld, pageSize, pageNum, keywords), data, "GET", "application/json;charset=UTF-8"); } function liveRed(data) { return request(api.liveRed, data, "POST", "application/json;charset=UTF-8"); } function follow(liveId, data = {}) { return request(api.follow(liveId), data, "GET", "application/json;charset=UTF-8"); } function watchUserList(liveId, pageSize, pageNum, reasonable, data = {}) { return request(api.watchUserList(liveId, pageSize, pageNum, reasonable), data, "GET", "application/json;charset=UTF-8"); } function liveMsg(liveId, pageSize, pageNum, data = {}) { return request(api.liveMsg(liveId, pageSize, pageNum), data, "GET", "application/json;charset=UTF-8"); } function liveGoodsDetail(productId, data) { return request(api.liveGoodsDetail(productId), data, "GET", "application/json;charset=UTF-8"); } function liveOrderUser(liveId, data = {}) { return request(api.liveOrderUser(liveId), data, "GET", "application/json;charset=UTF-8"); } function getLiveInfo(liveId, data = {}) { return request(api.getLiveInfo(liveId), data, "GET", "application/json;charset=UTF-8"); } function getLiveViewData(liveId, data = {}) { return request(api.getLiveViewData(liveId), data, "GET", "application/json;charset=UTF-8"); } exports.collectGoods = collectGoods; exports.collectStore = collectStore; exports.follow = follow; exports.getLiveInfo = getLiveInfo; exports.getLiveViewData = getLiveViewData; exports.liveDataLike = liveDataLike; exports.liveGoodsDetail = liveGoodsDetail; exports.liveMsg = liveMsg; exports.liveOrderUser = liveOrderUser; exports.liveRed = liveRed; exports.queryStore = queryStore; exports.store = store; exports.watchUserList = watchUserList;