Merge branch 'master' of https://gitee.com/yudaocode/yudao-mall-uniapp into develop
# Conflicts: # pages/goods/index.vue # pages/order/addressSelection.vue # pages/order/confirm.vue # sheep/components/s-goods-column/s-goods-column.vue
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import request from '@/sheep/request';
|
||||
|
||||
// TODO 芋艿:暂不支持 socket 聊天
|
||||
export default {
|
||||
// 获取聊天token
|
||||
unifiedToken: () =>
|
||||
request({
|
||||
url: 'unifiedToken',
|
||||
custom: {
|
||||
showError: false,
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '@/sheep/request';
|
||||
|
||||
const ActivityApi = {
|
||||
// 获得单个商品,近期参与的每个活动
|
||||
// 获得单个商品,进行中的拼团、秒杀、砍价活动信息
|
||||
getActivityListBySpuId: (spuId) => {
|
||||
return request({
|
||||
url: '/promotion/activity/list-by-spu-id',
|
||||
|
||||
@@ -2,15 +2,6 @@ import request from '@/sheep/request';
|
||||
|
||||
// 拼团 API
|
||||
const CombinationApi = {
|
||||
// 获得拼团活动列表
|
||||
getCombinationActivityList: (count) => {
|
||||
return request({
|
||||
url: '/promotion/combination-activity/list',
|
||||
method: 'GET',
|
||||
params: { count },
|
||||
});
|
||||
},
|
||||
|
||||
// 获得拼团活动分页
|
||||
getCombinationActivityPage: (params) => {
|
||||
return request({
|
||||
@@ -31,6 +22,17 @@ const CombinationApi = {
|
||||
});
|
||||
},
|
||||
|
||||
// 获得拼团活动列表,基于活动编号数组
|
||||
getCombinationActivityListByIds: (ids) => {
|
||||
return request({
|
||||
url: '/promotion/combination-activity/list-by-ids',
|
||||
method: 'GET',
|
||||
params: {
|
||||
ids,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 获得最近 n 条拼团记录(团长发起的)
|
||||
getHeadCombinationRecordList: (activityId, status, count) => {
|
||||
return request({
|
||||
@@ -47,9 +49,9 @@ const CombinationApi = {
|
||||
// 获得我的拼团记录分页
|
||||
getCombinationRecordPage: (params) => {
|
||||
return request({
|
||||
url: "/promotion/combination-record/page",
|
||||
url: '/promotion/combination-record/page',
|
||||
method: 'GET',
|
||||
params
|
||||
params,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -79,23 +79,6 @@ const CouponApi = {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获得匹配指定商品的优惠劵列表
|
||||
getMatchCouponList: (price, spuIds, skuIds, categoryIds) => {
|
||||
return request({
|
||||
url: '/promotion/coupon/match-list',
|
||||
method: 'GET',
|
||||
params: {
|
||||
price,
|
||||
spuIds: spuIds.join(','),
|
||||
skuIds: skuIds.join(','),
|
||||
categoryIds: categoryIds.join(','),
|
||||
},
|
||||
custom: {
|
||||
showError: false,
|
||||
showLoading: false, // 避免影响 settlementOrder 结算的结果
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export default CouponApi;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from "@/sheep/request";
|
||||
import request from '@/sheep/request';
|
||||
|
||||
const SeckillApi = {
|
||||
// 获得秒杀时间段列表
|
||||
@@ -16,6 +16,17 @@ const SeckillApi = {
|
||||
return request({ url: 'promotion/seckill-activity/page', method: 'GET', params });
|
||||
},
|
||||
|
||||
// 获得秒杀活动列表,基于活动编号数组
|
||||
getSeckillActivityListByIds: (ids) => {
|
||||
return request({
|
||||
url: '/promotion/seckill-activity/list-by-ids',
|
||||
method: 'GET',
|
||||
params: {
|
||||
ids,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 获得秒杀活动明细
|
||||
* @param {number} id 秒杀活动编号
|
||||
@@ -25,9 +36,9 @@ const SeckillApi = {
|
||||
return request({
|
||||
url: 'promotion/seckill-activity/get-detail',
|
||||
method: 'GET',
|
||||
params: { id }
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export default SeckillApi;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import request from '@/sheep/request';
|
||||
|
||||
const DictApi = {
|
||||
// 根据字典类型查询字典数据信息
|
||||
getDictDataListByType: (type) => {
|
||||
return request({
|
||||
url: `/system/dict-data/type`,
|
||||
method: 'GET',
|
||||
params: {
|
||||
type,
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default DictApi;
|
||||
@@ -7,7 +7,25 @@ const DeliveryApi = {
|
||||
url: `/trade/delivery/express/list`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
},
|
||||
// 获得自提门店列表
|
||||
getDeliveryPickUpStoreList: (params) => {
|
||||
return request({
|
||||
url: `/trade/delivery/pick-up-store/list`,
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
},
|
||||
// 获得自提门店
|
||||
getDeliveryPickUpStore: (id) => {
|
||||
return request({
|
||||
url: `/trade/delivery/pick-up-store/get`,
|
||||
method: 'GET',
|
||||
params: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default DeliveryApi;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import request from '@/sheep/request';
|
||||
import { isEmpty } from '@/sheep/helper/utils';
|
||||
|
||||
const OrderApi = {
|
||||
// 计算订单信息
|
||||
@@ -13,6 +14,15 @@ const OrderApi = {
|
||||
if (!(data.addressId > 0)) {
|
||||
delete data2.addressId;
|
||||
}
|
||||
if (!(data.pickUpStoreId > 0)) {
|
||||
delete data2.pickUpStoreId;
|
||||
}
|
||||
if (isEmpty(data.receiverName)) {
|
||||
delete data2.receiverName;
|
||||
}
|
||||
if (isEmpty(data.receiverMobile)) {
|
||||
delete data2.receiverMobile;
|
||||
}
|
||||
if (!(data.combinationActivityId > 0)) {
|
||||
delete data2.combinationActivityId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user