修改看到的一些问题

This commit is contained in:
lemon橪
2021-06-04 18:11:34 +08:00
parent fcb5d20ef1
commit 61273b78b9
21 changed files with 262 additions and 745 deletions

View File

@@ -1,25 +1,9 @@
/**
* 公共API
*/
import storage from "@/utils/storage.js"
import {http, Method} from '@/utils/request.js';
import api from '@/config/api.js';
/**
* 获取图片验证码URL
* @param type
* @param uuid
* @returns {string}
*/
export function getValidateCodeUrl(type, uuid) {
if (!type) {
return '';
}
if (!uuid) {
uuid = storage.getUuid()
}
return `${api.base}/captchas/${uuid}/${type}?r=${new Date().getTime()}`;
}
/**

View File

@@ -1,8 +1,20 @@
/**
* 促销相关API
*/
import {http, Method} from '@/utils/request.js';
import { http, Method } from "@/utils/request.js";
/**
* 获取当前直播列表
*
* @param {*}
* @returns
*/
export function getLiveList() {
return http.request({
url: `broadcast/studio`,
method: Method.GET,
});
}
/**
* 获取当前拼团活动的未成团的会员
@@ -14,24 +26,22 @@ export function getPromotionGroupMember(pintuanId) {
});
}
/** 获取拼团列表 */
export function getAssembleList(params) {
return http.request({
url: 'promotion/pintuan',
url: "promotion/pintuan",
method: Method.GET,
loading: false,
params
})
params,
});
}
/**
* 获取积分商城分类
*/
export function getPointsCategory() {
return http.request({
url: '/promotion/pointsGoods/category',
url: "/promotion/pointsGoods/category",
method: Method.GET,
});
}
@@ -42,7 +52,7 @@ export function getPointsCategory() {
*/
export function getPointsGoods(params) {
return http.request({
url: '/promotion/pointsGoods',
url: "/promotion/pointsGoods",
method: Method.GET,
params,
});
@@ -53,7 +63,7 @@ export function getPointsGoods(params) {
*/
export function getSeckillTimeLine() {
return http.request({
url: 'promotion/seckill',
url: "promotion/seckill",
method: Method.GET,
});
}
@@ -75,7 +85,7 @@ export function getSeckillTimeGoods(timeline) {
*/
export function getAllCoupons(params) {
return http.request({
url: '/promotion/coupon',
url: "/promotion/coupon",
method: Method.GET,
params,
});