购物车和订单中心以及优惠券相关功能初版
This commit is contained in:
@@ -308,8 +308,9 @@ const fetchCoupons = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await adminCouponApi.listAllCoupons()
|
||||
couponList.value = res || []
|
||||
pagination.total = res.length || 0
|
||||
// 处理后端返回的分页数据结构
|
||||
couponList.value = res?.list || []
|
||||
pagination.total = res?.total || 0
|
||||
} catch (error) {
|
||||
message.error('获取优惠券列表失败')
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user