feat(user): 新增收货地址管理及售后申请页面

- 新增地址类型定义,增强前端地址数据结构
- 新增地址编辑页面,支持地址智能识别和定位选点功能
- 地址编辑支持省市区选择及默认地址设置
- 新增地址列表页面,支持地址展示、删除、编辑和选择功能
- 实现售后申请页面,支持选择售后类型和退款原因
- 售后申请支持商品选择、退款金额计算和凭证上传
- 新增售后详情页面,支持售后状态展示及申请取消
- 优化页面加载和用户交互体验,增加错误提示和权限处理
This commit is contained in:
2026-07-01 12:11:56 +08:00
parent bf6ed504cc
commit 1fa58040f3
636 changed files with 58878 additions and 716 deletions

View File

@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type {ApiResult, PageResult} from '@/api';
import type {CompanyComment, CompanyCommentParam} from './model';
import {SERVER_API_URL} from "@/utils/server";
/**
* 分页查询应用评论
*/
export async function pageCompanyComment(params: CompanyCommentParam) {
const res = await request.get<ApiResult<PageResult<CompanyComment>>>(
SERVER_API_URL + '/system/company-comment/page',
{
params
}
);
if (res.code === 0) {
return res.data;
}
return Promise.reject(new Error(res.message));
}
/**
* 查询应用评论列表
*/
export async function listCompanyComment(params?: CompanyCommentParam) {
const res = await request.get<ApiResult<CompanyComment[]>>(
SERVER_API_URL + '/system/company-comment',
{
params
}
);
if (res.code === 0 && res.data) {
return res.data;
}
return Promise.reject(new Error(res.message));
}
/**
* 添加应用评论
*/
export async function addCompanyComment(data: CompanyComment) {
const res = await request.post<ApiResult<unknown>>(
SERVER_API_URL + '/system/company-comment',
data
);
if (res.code === 0) {
return res.message;
}
return Promise.reject(new Error(res.message));
}
/**
* 修改应用评论
*/
export async function updateCompanyComment(data: CompanyComment) {
const res = await request.put<ApiResult<unknown>>(
SERVER_API_URL + '/system/company-comment',
data
);
if (res.code === 0) {
return res.message;
}
return Promise.reject(new Error(res.message));
}
/**
* 删除应用评论
*/
export async function removeCompanyComment(id?: number) {
const res = await request.del<ApiResult<unknown>>(
SERVER_API_URL + '/system/company-comment/' + id
);
if (res.code === 0) {
return res.message;
}
return Promise.reject(new Error(res.message));
}
/**
* 批量删除应用评论
*/
export async function removeBatchCompanyComment(data: (number | undefined)[]) {
const res = await request.del<ApiResult<unknown>>(
SERVER_API_URL + '/system/company-comment/batch',
{
data
}
);
if (res.code === 0) {
return res.message;
}
return Promise.reject(new Error(res.message));
}
/**
* 根据id查询应用评论
*/
export async function getCompanyComment(id: number) {
const res = await request.get<ApiResult<CompanyComment>>(
SERVER_API_URL + '/system/company-comment/' + id
);
if (res.code === 0 && res.data) {
return res.data;
}
return Promise.reject(new Error(res.message));
}

View File

@@ -0,0 +1,43 @@
import type { PageParam } from '@/api';
/**
* 应用评论
*/
export interface CompanyComment {
// ID
id?: number;
// 父级ID
parentId?: number;
// 用户ID
userId?: number;
// 企业ID
companyId?: number;
// 评分
rate?: number;
// 排序(数字越小越靠前)
sortNumber?: number;
// 评论内容
comments?: string;
// 状态
status?: number;
// 租户id
tenantId?: number;
// 租户名称
tenantName?: string;
// 企业
logo?: string;
// 创建时间
createTime?: string;
// 子列表
children?: CompanyComment[];
}
/**
* 应用评论搜索条件
*/
export interface CompanyCommentParam extends PageParam {
id?: number;
userId?: number;
tenantId?: number;
keywords?: string;
}