feat: 新增用户和师傅消息中心及订单页重构
- 新增用户消息中心组件 UserMessageView - 新增师傅消息中心组件 MasterMessageView - 新增用户订单列表组件 UserOrdersView - 重构订单列表页,复用独立组件 - 新增系统工具 getWindowInfoSafe 兼容多端系统信息获取 - 重构 TabBar 组件,支持单母页模式和事件回调 - 优化消息跳转逻辑,支持角色自适应 Tab 切换
这个提交包含在:
30
yjyf-app/utils/system.js
普通文件
30
yjyf-app/utils/system.js
普通文件
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* 系统与窗口信息工具
|
||||
* 兼容微信小程序新版规范(废弃 wx.getSystemInfoSync,推荐 getWindowInfo)
|
||||
*/
|
||||
export function getWindowInfoSafe() {
|
||||
try {
|
||||
if (typeof uni.getWindowInfo === 'function') {
|
||||
const win = uni.getWindowInfo();
|
||||
if (win && (win.statusBarHeight !== undefined || win.windowWidth !== undefined)) {
|
||||
return win;
|
||||
}
|
||||
}
|
||||
if (typeof uni.getSystemInfoSync === 'function') {
|
||||
return uni.getSystemInfoSync();
|
||||
}
|
||||
} catch (e) {
|
||||
// 忽略异常,降级兜底
|
||||
}
|
||||
return {
|
||||
statusBarHeight: 20,
|
||||
windowWidth: 375,
|
||||
windowHeight: 667,
|
||||
screenWidth: 375,
|
||||
screenHeight: 667
|
||||
};
|
||||
}
|
||||
|
||||
export default {
|
||||
getWindowInfoSafe
|
||||
};
|
||||
在新工单中引用
屏蔽一个用户