Files
websopy-taro/src/api/shop/shopCart/model/index.ts
T
gxwebsoft 9df90c1176 feat(address): 新增收货地址与售后申请功能
- 新增地址编辑页面,支持地址智能识别、地图选点、地区选择和默认地址设置
- 实现地址列表页面,支持地址查看、删除、设为默认及选择返回结算页
- 新增售后申请页面,支持退款类型选择、商品选择、原因填写、图片上传和提交审核
- 修复 passport 分包配置,移除不存在分包并补充缺失声明,避免 Taro 编译报错
- 新增地址类型定义,增强前端地址数据结构类型安全
- 优化页面交互体验,完善表单校验及错误提示逻辑
- 统一代码格式与命名规范,保持代码风格一致性
2026-07-16 01:18:42 +08:00

81 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { PageParam } from '@/api';
/**
* 购物车项
*/
export interface ShopCart {
// 主键ID
id?: number;
// 用户ID
userId?: number;
// 商品ID
goodsId?: number;
// SKU ID
skuId?: number;
// 数量(后端字段名 cartNum)
cartNum?: number;
// 商品名称
goodsName?: string;
// 商品图片
goodsImage?: string;
// SKU价格
skuPrice?: string;
// SKU规格
skuSpec?: string;
// 库存
stock?: number;
// 市场价(划线价)
salePrice?: string | number;
// 经销商价(VIP专享)
dealerPrice?: string | number;
// 是否选中(后端字段名 selected)
selected?: boolean;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 更新时间
updateTime?: string;
}
/**
* 购物车项扩展(包含选中状态,用于前端展示)
*/
export interface ShopCartItem extends ShopCart {
// 是否选中
checked?: boolean;
// 商品详情
product?: any;
// SKU详情
sku?: any;
}
/**
* 添加到购物车参数
*/
export interface AddToCartParam {
// 商品ID
goodsId: number;
// SKU ID(单规格可不传)
skuId?: number;
// 数量(后端字段名 cartNum)
cartNum: number;
}
/**
* 更新购物车数量参数
*/
export interface UpdateCartNumParam {
// 购物车ID
id: number;
// 数量(后端字段名 cartNum)
cartNum: number;
}
/**
* 购物车搜索条件
*/
export interface ShopCartParam extends PageParam {
userId?: number;
}