env:后端的请求地址,调整到 env 里

This commit is contained in:
YunaiV
2024-01-20 13:13:28 +08:00
parent 80f80e358f
commit 33d57fd7e5
33 changed files with 130 additions and 145 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ const ActivityApi = {
// 获得单个商品,近期参与的每个活动
getActivityListBySpuId: (spuId) => {
return request({
url: '/app-api/promotion/activity/list-by-spu-id',
url: '/promotion/activity/list-by-spu-id',
method: 'GET',
params: {
spuId,
+1 -1
View File
@@ -4,7 +4,7 @@ export default {
// 获得文章详情
getArticle: (id, title) => {
return request({
url: '/app-api/promotion/article/get',
url: '/promotion/article/get',
method: 'GET',
params: { id, title }
});
+3 -3
View File
@@ -4,21 +4,21 @@ const BargainApi = {
// 获得砍价记录的概要信息
getBargainRecordSummary: () => {
return request({
url: '/app-api/promotion/bargain-record/get-summary',
url: '/promotion/bargain-record/get-summary',
method: 'GET',
});
},
// 获得砍价活动分页
getBargainActivityPage: () => {
return request({
url: '/app-api/promotion/bargain-activity/page',
url: '/promotion/bargain-activity/page',
method: 'GET',
});
},
// 获得砍价活动详情
getBargainActivityDetail(params) {
return request({
url: '/app-api/promotion/bargain-activity/get-detail',
url: '/promotion/bargain-activity/get-detail',
method: 'GET',
params,
});
+7 -7
View File
@@ -5,7 +5,7 @@ const CombinationApi = {
// 获得拼团活动列表
getCombinationActivityList: (count) => {
return request({
url: '/app-api/promotion/combination-activity/list',
url: '/promotion/combination-activity/list',
method: 'GET',
params: { count },
});
@@ -14,7 +14,7 @@ const CombinationApi = {
// 获得拼团活动分页
getCombinationActivityPage: (params) => {
return request({
url: '/app-api/promotion/combination-activity/page',
url: '/promotion/combination-activity/page',
method: 'GET',
params,
});
@@ -23,7 +23,7 @@ const CombinationApi = {
// 获得拼团活动明细
getCombinationActivity: (id) => {
return request({
url: '/app-api/promotion/combination-activity/get-detail',
url: '/promotion/combination-activity/get-detail',
method: 'GET',
params: {
id,
@@ -34,7 +34,7 @@ const CombinationApi = {
// 获得最近 n 条拼团记录(团长发起的)
getHeadCombinationRecordList: (activityId, status, count) => {
return request({
url: '/app-api/promotion/combination-record/get-head-list',
url: '/promotion/combination-record/get-head-list',
method: 'GET',
params: {
activityId,
@@ -47,7 +47,7 @@ const CombinationApi = {
// 获得我的拼团记录分页
getCombinationRecordPage: (params) => {
return request({
url: "/app-api/promotion/combination-record/page",
url: "/promotion/combination-record/page",
method: 'GET',
params
});
@@ -56,7 +56,7 @@ const CombinationApi = {
// 获得拼团记录明细
getCombinationRecordDetail: (id) => {
return request({
url: '/app-api/promotion/combination-record/get-detail',
url: '/promotion/combination-record/get-detail',
method: 'GET',
params: {
id,
@@ -67,7 +67,7 @@ const CombinationApi = {
// 获得拼团记录的概要信息
getCombinationRecordSummary: () => {
return request({
url: '/app-api/promotion/combination-record/get-summary',
url: '/promotion/combination-record/get-summary',
method: 'GET',
});
},
+9 -9
View File
@@ -4,7 +4,7 @@ const CouponApi = {
// 获得优惠劵模板列表
getCouponTemplateListByIds: (ids) => {
return request({
url: '/app-api/promotion/coupon-template/list-by-ids',
url: '/promotion/coupon-template/list-by-ids',
method: 'GET',
params: { ids },
});
@@ -12,7 +12,7 @@ const CouponApi = {
// 获得优惠劵模版列表
getCouponTemplateList: (spuId, productScope, count) => {
return request({
url: '/app-api/promotion/coupon-template/list',
url: '/promotion/coupon-template/list',
method: 'GET',
params: { spuId, productScope, count },
});
@@ -20,7 +20,7 @@ const CouponApi = {
// 获得优惠劵模版分页
getCouponTemplatePage: (params) => {
return request({
url: '/app-api/promotion/coupon-template/page',
url: '/promotion/coupon-template/page',
method: 'GET',
params,
});
@@ -28,7 +28,7 @@ const CouponApi = {
// 获得优惠劵模版
getCouponTemplate: (id) => {
return request({
url: '/app-api/promotion/coupon-template/get',
url: '/promotion/coupon-template/get',
method: 'GET',
params: { id },
});
@@ -36,7 +36,7 @@ const CouponApi = {
// 我的优惠劵列表
getCouponPage: (params) => {
return request({
url: '/app-api/promotion/coupon/page',
url: '/promotion/coupon/page',
method: 'GET',
params,
});
@@ -44,7 +44,7 @@ const CouponApi = {
// 领取优惠券
takeCoupon: (templateId) => {
return request({
url: '/app-api/promotion/coupon/take',
url: '/promotion/coupon/take',
method: 'POST',
data: { templateId },
});
@@ -52,7 +52,7 @@ const CouponApi = {
// 获得优惠劵
getCoupon: (id) => {
return request({
url: '/app-api/promotion/coupon/get',
url: '/promotion/coupon/get',
method: 'GET',
params: { id },
});
@@ -60,7 +60,7 @@ const CouponApi = {
// 获得未使用的优惠劵数量
getUnusedCouponCount: () => {
return request({
url: '/app-api/promotion/coupon/get-unused-count',
url: '/promotion/coupon/get-unused-count',
method: 'GET',
custom: {
showLoading: false,
@@ -71,7 +71,7 @@ const CouponApi = {
// 获得匹配指定商品的优惠劵列表
getMatchCouponList: (price, spuIds, skuIds, categoryIds) => {
return request({
url: '/app-api/promotion/coupon/match-list',
url: '/promotion/coupon/match-list',
method: 'GET',
params: {
price,
+1 -1
View File
@@ -3,7 +3,7 @@ import request from '@/sheep/request';
const DiyPageApi = {
getDiyPage: (id) => {
return request({
url: '/app-api/promotion/diy-page/get',
url: '/promotion/diy-page/get',
method: 'GET',
params: {
id
+2 -2
View File
@@ -3,13 +3,13 @@ import request from '@/sheep/request';
const DiyTemplateApi = {
getUsedDiyTemplate: () => {
return request({
url: '/app-api/promotion/diy-template/used',
url: '/promotion/diy-template/used',
method: 'GET',
});
},
getDiyTemplate: (id) => {
return request({
url: '/app-api/promotion/diy-template/get',
url: '/promotion/diy-template/get',
method: 'GET',
params: {
id
+1 -1
View File
@@ -4,7 +4,7 @@ const RewardActivityApi = {
// 获得满减送活动
getRewardActivity: (id) => {
return request({
url: '/app-api/promotion/reward-activity/get',
url: '/promotion/reward-activity/get',
method: 'GET',
params: { id },
});