fix(ui): 我的页继续瘦身 + 计算结果页客服按钮统一 + 历史页标题运行时回写
my-profile.vue: - 整段移除「工具与服务」(邀请有礼当前未上线,剩它一项无意义) - 同步清理 iconGift / goToInvite 残留 calculator-result.vue: - 「联系专业营养师」按钮 MP-WEIXIN 端改用 <button open-type='contact'> - 与 welcome-gift / customer-service 统一行为,零 JS API 依赖 - 非小程序端保留原 contactNutritionist 兜底 - contact-btn-mp 重置 button 默认 line-height/border 视觉一致 calculator-history.vue: - onLoad 中 uni.setNavigationBarTitle 强制回写「我的计算记录」 - 兜底部分开发者工具/旧编译缓存把 UTF-8 标题渲染成乱码的场景 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -121,10 +121,17 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 联系专业营养师按钮 -->
|
||||
<!-- 联系专业营养师按钮:小程序使用原生 button open-type='contact' 直接唤起客服 -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button class="contact-btn contact-btn-mp" open-type="contact" hover-class="none">
|
||||
<text>联系专业营养师</text>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view class="contact-btn" @click="contactNutritionist">
|
||||
<text>联系专业营养师</text>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
|
||||
<!-- 营养配餐Tab内容 -->
|
||||
@@ -249,10 +256,17 @@
|
||||
<text class="adopt-text">采纳计划,开始打卡</text>
|
||||
</view>
|
||||
|
||||
<!-- 联系专业营养师按钮 -->
|
||||
<!-- 联系专业营养师按钮:小程序使用原生 button open-type='contact' 直接唤起客服 -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button class="contact-btn contact-btn-mp" open-type="contact" hover-class="none">
|
||||
<text>联系专业营养师</text>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view class="contact-btn" @click="contactNutritionist">
|
||||
<text>联系专业营养师</text>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
|
||||
<!-- 底部安全距离 -->
|
||||
@@ -483,7 +497,7 @@ export default {
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
/* Tab:未激活灰字、透明底边占位(无可见下划线);激活加粗+主色+橙色底边(BUG-002) */
|
||||
/* Tab:未激活 #9ca3af、无橙色下划线;激活加粗 + 主色字 + 3px 橙色底边(BUG-002) */
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -493,40 +507,31 @@ export default {
|
||||
justify-content: center;
|
||||
gap: 16rpx;
|
||||
box-sizing: border-box;
|
||||
color: #9ca3af;
|
||||
font-weight: 400;
|
||||
text-decoration: none;
|
||||
border-bottom: 3px solid transparent;
|
||||
transition: color 0.2s ease, border-color 0.2s ease;
|
||||
}
|
||||
|
||||
.tab-item .tab-icon,
|
||||
.tab-item .tab-text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
/* 未激活:灰字、常规字重(显式写到 text 节点,避免小程序不继承 view 颜色) */
|
||||
.tab-item:not(.active) .tab-icon,
|
||||
.tab-item:not(.active) .tab-text {
|
||||
color: #9ca3af;
|
||||
font-weight: 400;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* 激活:粗体、主色、橙色底边(与未激活同宽底边,避免切换时跳动) */
|
||||
.tab-item.active {
|
||||
background: transparent;
|
||||
color: #f97316;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
border-bottom: 3px solid #f97316;
|
||||
}
|
||||
/* 与激活态同厚底边占位,避免切换跳动;透明即无可见下划线 */
|
||||
border-bottom: 3px solid transparent;
|
||||
transition: color 0.2s ease, border-color 0.2s ease, font-weight 0.15s ease;
|
||||
|
||||
.tab-item.active .tab-icon,
|
||||
.tab-item.active .tab-text {
|
||||
color: #f97316;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
/* 字色与字重落在 text 节点上,避免部分端不继承 view 的 color */
|
||||
.tab-icon,
|
||||
.tab-text {
|
||||
font-size: 28rpx;
|
||||
color: #9ca3af;
|
||||
font-weight: 400;
|
||||
transition: color 0.2s ease, font-weight 0.15s ease;
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: #f97316;
|
||||
font-weight: 700;
|
||||
border-bottom: 3px solid #f97316;
|
||||
|
||||
.tab-icon,
|
||||
.tab-text {
|
||||
color: #f97316;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 内容滚动区域 */
|
||||
@@ -787,6 +792,14 @@ export default {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
/* 小程序原生 button 样式重置(保证视觉与原 view 版按钮一致) */
|
||||
.contact-btn-mp {
|
||||
line-height: 96rpx;
|
||||
padding: 0;
|
||||
}
|
||||
.contact-btn-mp::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
.empty-placeholder {
|
||||
|
||||
Reference in New Issue
Block a user