diff --git a/App.vue b/App.vue index e920460..af33f22 100644 --- a/App.vue +++ b/App.vue @@ -1,276 +1,285 @@ \ No newline at end of file +/*每个页面公共css */ +@import '@/static/css/common.css'; + +/* App.vue全局style */ +page, +html, +body { + -webkit-text-size-adjust: 100% !important; + text-size-adjust: 100% !important; +} + diff --git a/CHANGE_RECORD.md b/CHANGE_RECORD.md new file mode 100644 index 0000000..58c3eda --- /dev/null +++ b/CHANGE_RECORD.md @@ -0,0 +1,92 @@ +# 改动记录 + +## 2026-06-12 + +### 后台长时间运行后首页登录态不同步 + +问题现象: + +- APP 后台运行较长时间后再次进入。 +- 商家首页显示未登录或无法及时获取商家信息。 +- “我的”页面仍显示已登录。 +- 从“我的”页面切回首页后,首页才能正常获取商家信息。 + +涉及文件: + +- `App.vue` +- `pages/home/home.vue` +- `utils/request.js` + +改动内容: + +- `App.vue` + - 在全局 `onShow` 中新增 `uni.$emit('appShowRefresh')`。 + - APP 从后台恢复前台时主动通知页面刷新状态,避免只依赖页面级 `onShow`。 + +- `pages/home/home.vue` + - 新增 `refreshPageState` 方法,统一处理首页登录态刷新。 + - `onShow`、下拉刷新、APP 前台恢复事件都调用同一套刷新逻辑。 + - `onLoad` 注册 `appShowRefresh` 事件。 + - `onUnload` 解除 `appShowRefresh` 事件,避免重复监听。 + - 有 token 时主动重新请求 `/sj/user/getUser`。 + - 无 token 时清空 `userInfo`、`authDetails`、`sjId`,并重置 `isUserInfoLoaded`。 + - `getUserInfo` 请求成功后显式设置 `isLogin = true` 和 `isUserInfoLoaded = true`。 + - `getUserInfo` 请求失败时,如果本地 token 已被清理,则同步首页为未登录状态。 + +- `utils/request.js` + - `refreshToken` 兼容后端返回结构: + - 支持 token 在 `res.access_token`。 + - 支持 token 在 `res.data.access_token`。 + - 刷新 token 成功后同步更新: + - `accessToken` + - `refreshToken` + - `refresh_token_expries` + - 如果刷新接口成功但没有返回 `access_token`,主动抛错,避免写入 `undefined` token。 + +验证情况: + +- 已检查相关 diff,未做全文件重构。 +- `pages/home/home.vue` 原文件为 CRLF 行尾;为避免整文件行尾改造造成大面积 diff,本次保留原行尾。 +- 项目 `package.json` 未配置 build/lint 脚本,未执行完整构建校验。 + +### 订单详情顾客头像被挤压 + +问题现象: + +- `pages/shop/SellerDetail` 页面“顾客信息”一栏中,客户头像在部分图片比例下显示被拉伸或挤压。 + +涉及文件: + +- `pages/shop/SellerDetail.vue` + +改动内容: + +- 给顾客头像 `` 增加 `mode="aspectFill"`,按头像容器比例裁剪填充,避免原图比例不一致时被拉伸。 +- 为 `.shop_photo` 增加 `min-width` 和 `min-height`,在 flex 布局中进一步锁定头像为固定正方形尺寸。 + +验证情况: + +- 已执行 `pages/shop/SellerDetail.vue` 与 `CHANGE_RECORD.md` 的空白格式检查。 + +### 核销成功后工时/工位订单详情跳转错误 + +问题现象: + +- 商家扫码核销或输入核销码核销成功后,工时订单和工位订单跳转到详情页时参数或页面类型不正确。 +- 工时订单会进入工位详情链路,工位订单会落到普通订单详情链路。 + +涉及文件: + +- `pages/shop/verify/verify-order-detail.vue` + +改动内容: + +- 新增 `getOrderDetailUrl`,统一按 `order_type` 生成核销成功后的详情页地址。 +- `order_type=3` 工时订单跳转到 `/pages/shop/SellerDetail?order_id=...&identity=1`,使用手艺人工时订单详情链路。 +- `order_type=4` 工位订单跳转到 `/pages/shop/SellerDetail?order_id=...`,使用商家工位订单详情链路。 +- `order_type=6` 自营订单跳转普通订单详情并携带 `serviceType=2`。 +- 其他普通订单跳转普通订单详情,不再误携带自营参数。 + +验证情况: + +- 已执行 `pages/shop/verify/verify-order-detail.vue` 与 `CHANGE_RECORD.md` 的空白格式检查。 diff --git a/components/MyTabBar.vue b/components/MyTabBar.vue index 8f4b0e6..54c8af2 100644 --- a/components/MyTabBar.vue +++ b/components/MyTabBar.vue @@ -95,7 +95,7 @@ export default { color: #999; } .tab-text.active { - color: #E8101E; /* 选中颜色 */ + color: #FF4767; /* 选中颜色 */ } .tab-badge { position: absolute; diff --git a/components/circle-progress/circle-progress.vue b/components/circle-progress/circle-progress.vue index b683442..ea989e3 100644 --- a/components/circle-progress/circle-progress.vue +++ b/components/circle-progress/circle-progress.vue @@ -43,7 +43,7 @@ export default { // 圆环颜色 color: { type: String, - default: '#E8101E' + default: '#FF4767' }, // 背景圆环颜色 backgroundColor: { diff --git a/components/common/CommonFilter.vue b/components/common/CommonFilter.vue index 8e06ee6..406a915 100644 --- a/components/common/CommonFilter.vue +++ b/components/common/CommonFilter.vue @@ -402,7 +402,7 @@ export default { } .time-option.active .time-text { - color: #E8101E; + color: #FF4767; font-weight: 500; } @@ -413,7 +413,7 @@ export default { .time-discount { font-size: 24rpx; - color: #E8101E; + color: #FF4767; padding: 4rpx 12rpx; background-color: #fff5f6; border-radius: 20rpx; @@ -444,7 +444,7 @@ export default { color: #666; } .active { - color: #E8101E; /* 选中态主题色 */ + color: #FF4767; /* 选中态主题色 */ } /* 服务时间按钮专属:控制下拉图标尺寸 */ diff --git a/components/common/service-first-tab.vue b/components/common/service-first-tab.vue index cd5dbac..e911c06 100644 --- a/components/common/service-first-tab.vue +++ b/components/common/service-first-tab.vue @@ -52,7 +52,7 @@ export default { // 已定义的激活色props(无需修改) activeColor: { type: String, - default: "#E8101E", + default: "#FF4767", }, // 已定义的非激活色props(无需修改) inactiveColor: { diff --git a/components/common/service-second-icon-tab.vue b/components/common/service-second-icon-tab.vue index f5c689d..757650b 100644 --- a/components/common/service-second-icon-tab.vue +++ b/components/common/service-second-icon-tab.vue @@ -59,7 +59,7 @@ export default { // 激活状态的颜色 activeColor: { type: String, - default: "#E8101E", + default: "#FF4767", }, // 非激活状态的颜色 inactiveColor: { @@ -129,7 +129,7 @@ export default { left: 0; right: 0; bottom: 0; - border: 2rpx solid #E8101E; + border: 2rpx solid #FF4767; border-radius: 48rpx; } @@ -143,6 +143,6 @@ export default { } .icon-item.active .icon-text { - color: #E8101E; + color: #FF4767; } diff --git a/components/filter-popup/filter-popup.vue b/components/filter-popup/filter-popup.vue index 4189288..9db6136 100644 --- a/components/filter-popup/filter-popup.vue +++ b/components/filter-popup/filter-popup.vue @@ -208,7 +208,7 @@ export default { padding-left: 30rpx; position: relative; &__point { - background-color: #E8101E; + background-color: #FF4767; height: 6rpx; width: 6rpx; border-radius: 50%; @@ -221,7 +221,7 @@ export default { } .active { background: #ffffff; - color: #E8101E; + color: #FF4767; } } &__right { @@ -295,17 +295,17 @@ export default { height: 82rpx; font-weight: 400; font-size: 30rpx; - color: #E8101E; + color: #FF4767; line-height: 42rpx; text-align: left; font-style: normal; } &__sure { border-radius: 41rpx; - border: 2rpx solid #E8101E; + border: 2rpx solid #FF4767; } &__reset { - background: #E8101E; + background: #FF4767; border-radius: 41rpx; color: #ffffff; } diff --git a/components/filterCard/filterCard.vue b/components/filterCard/filterCard.vue index 9c203e5..3ef8b7d 100644 --- a/components/filterCard/filterCard.vue +++ b/components/filterCard/filterCard.vue @@ -114,8 +114,8 @@ export default { } .active { background: rgba(252, 67, 124, 0.1); - color: #E8101E; - border: 1rpx solid #E8101E; + color: #FF4767; + border: 1rpx solid #FF4767; } } diff --git a/components/hao-indexList/hao-indexList/hao-indexList.vue b/components/hao-indexList/hao-indexList/hao-indexList.vue index eff530a..aabce58 100644 --- a/components/hao-indexList/hao-indexList/hao-indexList.vue +++ b/components/hao-indexList/hao-indexList/hao-indexList.vue @@ -548,7 +548,7 @@ width: 690rpx; height: 68rpx; background: #FFFFFF; - border: 2rpx solid #E8101E; + border: 2rpx solid #FF4767; background-color: #fafafa; display: flex; align-items: center; diff --git a/components/hot-card/hot-card.vue b/components/hot-card/hot-card.vue index 47f3f6e..7bc0b2d 100644 --- a/components/hot-card/hot-card.vue +++ b/components/hot-card/hot-card.vue @@ -121,7 +121,7 @@ export default { border: 1rpx solid #fba9bb; font-weight: 500; font-size: 24rpx; - color: #E8101E; + color: #FF4767; text-align: left; font-style: normal; } @@ -197,7 +197,7 @@ export default { margin-top: 10rpx; font-weight: 500; font-size: 24rpx; - color: #E8101E; + color: #FF4767; line-height: 33rpx; text-align: left; font-style: normal; diff --git a/components/noData/noLogin.vue b/components/noData/noLogin.vue index 5c3b06c..47e85de 100644 --- a/components/noData/noLogin.vue +++ b/components/noData/noLogin.vue @@ -59,7 +59,7 @@ export default { .loginBtn { width: 262rpx; height: 86rpx; - background: #e8101e; + background: #FF4767; border-radius: 43rpx; text-align: center; line-height: 86rpx; diff --git a/components/select-time-page/select-time-page.vue b/components/select-time-page/select-time-page.vue index 9636437..5e39ee0 100644 --- a/components/select-time-page/select-time-page.vue +++ b/components/select-time-page/select-time-page.vue @@ -408,11 +408,11 @@ export default { .isActive { background: rgba(252, 67, 124, 0.08); - color: #e8101e !important; + color: #FF4767 !important; } .isActive .time-picker-content__time__list__item__text { - color: #e8101e !important; + color: #FF4767 !important; } /* 选中样式前后弧度 */ @@ -433,7 +433,7 @@ border-radius: 0rpx 51rpx 51rpx 0rpx} .time-picker-content__time__sure__box { width: 648rpx; height: 94rpx; - background: #E8101E; + background: #FF4767; border-radius: 48rpx; display: flex; align-items: center; diff --git a/components/select-time-page/select-time-page2.vue b/components/select-time-page/select-time-page2.vue index c9b03bd..e8fdd4a 100644 --- a/components/select-time-page/select-time-page2.vue +++ b/components/select-time-page/select-time-page2.vue @@ -467,8 +467,8 @@ .isActive { background: rgba(252, 67, 124, 0.08); border-radius: 10rpx; - border: 1rpx solid #E8101E; - color: #E8101E; + border: 1rpx solid #FF4767; + color: #FF4767; /* 选中状态 */ } @@ -493,7 +493,7 @@ &__box { width: 648rpx; height: 94rpx; - background: linear-gradient(140deg, #fa4e9a 0%, #E8101E 100%); + background: linear-gradient(140deg, #fa4e9a 0%, #FF4767 100%); border-radius: 48rpx; display: flex; align-items: center; diff --git a/components/service-code-input/service-code-input.vue b/components/service-code-input/service-code-input.vue index 37cb524..9c49111 100644 --- a/components/service-code-input/service-code-input.vue +++ b/components/service-code-input/service-code-input.vue @@ -1,30 +1,19 @@ \ No newline at end of file diff --git a/components/service-grid/service-grid.vue b/components/service-grid/service-grid.vue index 16b665c..a7e55ec 100644 --- a/components/service-grid/service-grid.vue +++ b/components/service-grid/service-grid.vue @@ -181,7 +181,7 @@ position: absolute; top: 0rpx; left: 0rpx; - background-color: #E8101E; + background-color: #FF4767; color: #FFFFFF; font-size: 24rpx; padding: 6rpx 14rpx; @@ -247,7 +247,7 @@ .price-symbol { font-weight: 500; font-size: 24rpx; - color: #E8101E; + color: #FF4767; line-height: 33rpx; text-align: left; font-style: normal; @@ -256,7 +256,7 @@ .price-value { font-weight: 500; font-size: 36rpx; - color: #E8101E; + color: #FF4767; line-height: 33rpx; text-align: left; font-style: normal; @@ -332,12 +332,12 @@ .price-symbol { font-size: 24rpx; - color: #E8101E; + color: #FF4767; } .price-value { font-size: 32rpx; - color: #E8101E; + color: #FF4767; font-weight: 500; margin-right: 12rpx; } diff --git a/components/shop-list/shop-list.vue b/components/shop-list/shop-list.vue index a7b2a0b..f6f4458 100644 --- a/components/shop-list/shop-list.vue +++ b/components/shop-list/shop-list.vue @@ -336,7 +336,7 @@ .price-text{ font-weight: 500; font-size: 24rpx; - color: #E8101E; + color: #FF4767; line-height: 33rpx; text-align: left; font-style: normal; @@ -345,7 +345,7 @@ .price-symbol { font-weight: 500; font-size: 20rpx; - color: #E8101E; + color: #FF4767; line-height: 33rpx; text-align: left; font-style: normal; @@ -354,7 +354,7 @@ .price-value { font-weight: 500; font-size: 30rpx; - color: #E8101E; + color: #FF4767; line-height: 33rpx; text-align: left; font-style: normal; diff --git a/components/step-tab/step-tab.vue b/components/step-tab/step-tab.vue index 1615bfe..7b9b60f 100644 --- a/components/step-tab/step-tab.vue +++ b/components/step-tab/step-tab.vue @@ -1,63 +1,54 @@ \ No newline at end of file diff --git a/pages/shop/components/orderCard2.vue b/pages/shop/components/orderCard2.vue index 57602ea..bcd9f68 100644 --- a/pages/shop/components/orderCard2.vue +++ b/pages/shop/components/orderCard2.vue @@ -205,7 +205,7 @@ .stateText { font-weight: 400; font-size: 26rpx; - color: #E8101E; + color: #FF4767; text-align: left; font-style: normal; position: absolute; @@ -255,7 +255,7 @@ .service-price { font-weight: 500; font-size: 24rpx; - color: #E8101E; + color: #FF4767; line-height: 34rpx; text-align: left; font-style: normal; @@ -291,7 +291,7 @@ letter-spacing: 2px; text-align: left; font-style: normal; - background: linear-gradient(166deg, #FC5E72 0%, #E8101E 100%); + background: linear-gradient(166deg, #FC5E72 0%, #FF4767 100%); border-radius: 6rpx; padding: 4rpx 4rpx 4rpx 8rpx; margin-right: 13rpx; @@ -387,8 +387,8 @@ /* 接单按钮 */ .accept-btn { - border: 2rpx solid #E8101E; - color: #E8101E; + border: 2rpx solid #FF4767; + color: #FF4767; } .order-address { diff --git a/pages/shop/create-order.vue b/pages/shop/create-order.vue index c900ed6..7052a2e 100644 --- a/pages/shop/create-order.vue +++ b/pages/shop/create-order.vue @@ -500,7 +500,7 @@ export default { height: 28rpx; border: 3rpx; margin-right: 16rpx; - background-color: #E8101E; + background-color: #FF4767; } .service-item { padding-top: 24rpx; @@ -636,7 +636,7 @@ export default { .price-total .price { font-size: 28rpx; font-weight: 500; - color: #E8101E; + color: #FF4767; } .amount-lable { @@ -646,7 +646,7 @@ export default { .submit-btn { width: 492rpx; height: 64rpx; - background: #E8101E; + background: #FF4767; border-radius: 32rpx; color: #ffffff; font-size: 28rpx; diff --git a/pages/shop/groupBuying/addGroupBuying.vue b/pages/shop/groupBuying/addGroupBuying.vue index 8a6b0a1..043b1a5 100644 --- a/pages/shop/groupBuying/addGroupBuying.vue +++ b/pages/shop/groupBuying/addGroupBuying.vue @@ -67,7 +67,7 @@ - + - +