feat: 新增师傅端功能及服务增项管理模块

- 新增师傅端路由和页面配置,切换登录后默认跳转到师傅大厅
- 新增服务分类图标上传功能和增项服务管理模块
- 新增订单、申诉、结算等模型关联关系及后台控制器
- 新增师傅端TabBar组件和消息页面跳转逻辑
- 新增文件上传接口和服务计算逻辑
- 新增各类SVG图标和空状态提示
这个提交包含在:
YuanWen
2026-11-03 15:45:21 +08:00
父节点 c01e8fc7d9
当前提交 361dffc7d8
共有 82 个文件被更改,包括 4787 次插入 和 531 次删除

查看文件

@@ -1,9 +1,12 @@
/**
* 接口清单(与后端 application/api/controller 一一对应)
*/
import { get, post } from './request';
import { get, post, uploadFile } from './request';
export default {
/* ---------- 公共 / 上传 ---------- */
upload: (filePath) => uploadFile(filePath),
/* ---------- 鉴权 ---------- */
login: (data) => post('/auth/login', data, { silent: true }),
wxLogin: (data) => post('/auth/wxlogin', data, { silent: true }),
@@ -42,6 +45,7 @@ export default {
masterApply: (data) => post('/master/apply', data),
masterInfo: () => get('/master/info'),
masterHall: (data) => get('/master/hall', data),
masterOrderDetail: (id, params) => get('/master/orderDetail', { id: id, ...(params || {}) }),
masterGrab: (data) => post('/master/grab', data),
masterOrders: (data) => get('/master/orders', data),
masterContact: (data) => post('/master/contact', data),

查看文件

@@ -123,3 +123,37 @@ export function get(path, data, options) {
export function post(path, data, options) {
return request(path, Object.assign({ method: 'POST', data: data }, options || {}));
}
export function uploadFile(filePath) {
return new Promise((resolve, reject) => {
const header = {};
const token = getToken();
if (token) {
header.token = token;
}
uni.uploadFile({
url: BASE_URL + '/common/upload',
filePath: filePath,
name: 'file',
header: header,
success: (res) => {
try {
const body = JSON.parse(res.data);
if (body.code === 1) {
resolve(body.data);
return;
}
uni.showToast({ title: body.msg || '上传失败', icon: 'none' });
reject(new Error(body.msg));
} catch (e) {
uni.showToast({ title: '解析上传响应失败', icon: 'none' });
reject(e);
}
},
fail: (err) => {
uni.showToast({ title: '网络异常,上传失败', icon: 'none' });
reject(err);
}
});
});
}