feat(user): 新增收货地址管理及售后申请页面
- 新增地址类型定义,增强前端地址数据结构 - 新增地址编辑页面,支持地址智能识别和定位选点功能 - 地址编辑支持省市区选择及默认地址设置 - 新增地址列表页面,支持地址展示、删除、编辑和选择功能 - 实现售后申请页面,支持选择售后类型和退款原因 - 售后申请支持商品选择、退款金额计算和凭证上传 - 新增售后详情页面,支持售后状态展示及申请取消 - 优化页面加载和用户交互体验,增加错误提示和权限处理
This commit is contained in:
44
src_bak/api/shop/shopPointsProduct/index.ts
Normal file
44
src_bak/api/shop/shopPointsProduct/index.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
import type { ApiResult, PageResult } from '@/api'
|
||||
import type { ShopPointsProduct, ShopPointsProductParam } from './model'
|
||||
|
||||
/**
|
||||
* 分页查询积分兑换商品表
|
||||
*/
|
||||
export async function pageShopPointsProduct(params: ShopPointsProductParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopPointsProduct>>>(
|
||||
'/shop/shop-points-product/page',
|
||||
params
|
||||
)
|
||||
if (res.code === 0) {
|
||||
return res.data
|
||||
}
|
||||
return Promise.reject(new Error(res.message))
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询积分兑换商品表列表
|
||||
*/
|
||||
export async function listShopPointsProduct(params?: ShopPointsProductParam) {
|
||||
const res = await request.get<ApiResult<ShopPointsProduct[]>>(
|
||||
'/shop/shop-points-product',
|
||||
params
|
||||
)
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data
|
||||
}
|
||||
return Promise.reject(new Error(res.message))
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询积分兑换商品详情
|
||||
*/
|
||||
export async function getShopPointsProduct(id: number) {
|
||||
const res = await request.get<ApiResult<ShopPointsProduct>>(
|
||||
'/shop/shop-points-product/' + id
|
||||
)
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data
|
||||
}
|
||||
return Promise.reject(new Error(res.message))
|
||||
}
|
||||
51
src_bak/api/shop/shopPointsProduct/model/index.ts
Normal file
51
src_bak/api/shop/shopPointsProduct/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* 积分兑换商品表
|
||||
*/
|
||||
export interface ShopPointsProduct {
|
||||
/** ID */
|
||||
id?: number
|
||||
/** 商品名称 */
|
||||
productName?: string
|
||||
/** 商品图片 */
|
||||
productImage?: string
|
||||
/** 商品类型: 0实物 1优惠券 2虚拟商品 */
|
||||
productType?: number
|
||||
/** 优惠券ID(商品类型为优惠券时) */
|
||||
couponId?: number
|
||||
/** 兑换所需积分 */
|
||||
pointsPrice?: number
|
||||
/** 补差价金额 */
|
||||
moneyPrice?: string
|
||||
/** 库存 */
|
||||
stock?: number
|
||||
/** 兑换量 */
|
||||
sales?: number
|
||||
/** 商品描述 */
|
||||
description?: string
|
||||
/** 是否热门: 0否 1是 */
|
||||
isHot?: number
|
||||
/** 状态: 0下架 1上架 */
|
||||
status?: number
|
||||
/** 排序号 */
|
||||
sortNumber?: number
|
||||
/** 创建时间 */
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 积分兑换商品搜索条件
|
||||
*/
|
||||
export interface ShopPointsProductParam {
|
||||
/** 页码 */
|
||||
page?: number
|
||||
/** 每页数量 */
|
||||
limit?: number
|
||||
/** ID */
|
||||
id?: number
|
||||
/** 关键词 */
|
||||
keywords?: string
|
||||
/** 是否热门 */
|
||||
isHot?: number
|
||||
/** 状态 */
|
||||
status?: number
|
||||
}
|
||||
Reference in New Issue
Block a user