diff --git a/src/api/groupbuy/index.ts b/src/api/groupbuy/index.ts index f53d181..e3de418 100644 --- a/src/api/groupbuy/index.ts +++ b/src/api/groupbuy/index.ts @@ -1,10 +1,10 @@ -import { get } from '@/utils/request'; +import { post } from '@/utils/request'; export const getGroupBuyList = (data: { - pageNum: string, - pageSize: string, + pageNum: number, + pageSize: number, obj: { - companyId: string, + status: number, } -}) => get({ url: '/wc/coupons/group/pageList', data }); +}) => post({ url: '/group/coupons/wx_query', data }); diff --git a/src/api/user/index.ts b/src/api/user/index.ts index 6139152..f956869 100644 --- a/src/api/user/index.ts +++ b/src/api/user/index.ts @@ -12,7 +12,10 @@ enum URL { register = '/wc/wechat/register', uploadAvatar = '/wc/wechat/uploadImage', logout = '/user/logout', - profile = '/user/profile', + // profile = '/user/profile', + profile = 'wc/wechat/member_detail', + + // wc/wechat/member_detail addressList = '/ext/addr/list', addressDetail = '/ext/addr/find', addressCreate = '/ext/addr/create', @@ -20,6 +23,7 @@ enum URL { addressDelete = '/ext/addr/delete', dynamicCode = '/member/dynccode', rechargeList = '/ext/recharge/rule_config', + recharge = '/memberIncoming/wx_save', couponList = '/wechat/coupons/coupons/pageList', integralList = '/ext/member/integral_query' } @@ -43,6 +47,8 @@ export const getDynamicCode = () => post({ url: URL.dynamicCode }); export const getRechargeList = () => get({ url: URL.rechargeList }); +export const recharge = (data: any) => post({ url: URL.recharge, data }); + export const getCouponList = (data: any) => post({ url: URL.couponList, data }); -export const getIntegralList =(data:any)=>post({url:URL.integralList, data}) +export const getIntegralList = (data: any) => get({ url: URL.integralList, data }); diff --git a/src/pages/common/groupbuy/index.vue b/src/pages/common/groupbuy/index.vue index 6c9ad2d..c54d91a 100644 --- a/src/pages/common/groupbuy/index.vue +++ b/src/pages/common/groupbuy/index.vue @@ -6,16 +6,16 @@ - + - + - 女童夏装套装洋气装短袖阔腿裤短… + {{ item.name }} - 原价:¥56 + 原价:¥{{ item.payPrice }} - 直降¥15 + 直降¥{{ item.offsetPrice }} 即将恢复 @@ -38,10 +38,26 @@ import { getGroupBuyList } from '@/api/groupbuy'; import { goPath } from '@/utils'; const tabIndex = ref(0); +const groupbuyList = ref([]); onLoad((e) => { - getGroupBuyList(); + fetchData(); }); + +watch(() => tabIndex.value, () => { + fetchData(); +}); + +const fetchData = async () => { + const { list } = await getGroupBuyList({ + pageNum: 1, + pageSize: 100, + obj: { + status: tabIndex.value + } + }); + groupbuyList.value = list; +};