12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- "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: "/app/live/liveData/collectStore",
- // 收藏/取消收藏
- 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}`,
- // 直播间点赞、关注、在线人数数据
- // 直播订单
- liveStore: (liveId) => `/app/live/liveGoods/liveStore/${liveId}`,
- // 店铺展示
- 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(data) {
- return request(api.collectStore, 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, data) {
- return request(api.liveStore(liveId), 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.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;
|