123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- "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}`,
- // 查询店铺
- follow: (liveId) => `/app/live/liveData/follow/${liveId}`,
- // 关注/取消关注
- getRecentLiveViewers: (liveId) => `/app/live/liveData/getRecentLiveViewers/${liveId}`,
- // 获取直播间用户(展示在线用户)
- // 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 follow(liveId, data = {}) {
- return request(api.follow(liveId), data, "GET", "application/json;charset=UTF-8");
- }
- function getRecentLiveViewers(liveId, data = {}) {
- return request(api.getRecentLiveViewers(liveId), data, "GET", "application/json;charset=UTF-8");
- }
- function liveStore(liveId, key, data) {
- return request(api.liveStore(liveId, key), 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.getRecentLiveViewers = getRecentLiveViewers;
- exports.liveDataLike = liveDataLike;
- exports.liveGoodsDetail = liveGoodsDetail;
- exports.liveOrderUser = liveOrderUser;
- exports.liveStore = liveStore;
- exports.store = store;
|