feat(mine): 我的页面左上角新增「返回首页」入口

- 头部新增 .h-top 胶囊按钮(半透明白底 + ‹ 字形,与 login 返回键、品牌橙底一致)
- 点击 uni.reLaunch 回启动页 /YJYF/YJYF,与 order/detail、coupon 等页面回首页写法一致
- 不改动既有头部布局尺寸,仅整体下移头像行
这个提交包含在:
linda
2026-10-28 17:14:47 +08:00
父节点 4e0c86ca06
当前提交 3bba2d6e94

查看文件

@@ -2,6 +2,12 @@
<view class="page">
<view class="header">
<view class="deco d1"></view>
<view class="h-top">
<view class="home-btn" @tap="backHome">
<text class="home-ic">‹</text>
<text class="home-tx">返回首页</text>
</view>
</view>
<view class="h-row">
<view class="avatar">
<image v-if="user && user.avatar" class="avatar-img" :src="user.avatar" mode="aspectFill"></image>
@@ -119,6 +125,7 @@
function toast(t) { uni.showToast({ title: t, icon: 'none' }); }
function go(url) { uni.navigateTo({ url: url }); }
function backHome() { uni.reLaunch({ url: '/YJYF/YJYF' }); }
function callService() { uni.makePhoneCall({ phoneNumber: '4000000000' }); }
async function load() {
@@ -170,6 +177,11 @@
.page { min-height: 100vh; background: #F5F6F8; padding-bottom: 60rpx; }
.header { position: relative; padding: 40rpx 32rpx 30rpx; overflow: hidden; background: linear-gradient(160deg, #FFB85C 0%, #F98D25 55%, #ED6F0E 100%); }
.deco { position: absolute; width: 320rpx; height: 320rpx; right: -110rpx; top: -130rpx; border-radius: 50%; background: rgba(255,255,255,.14); }
.h-top { position: relative; display: flex; align-items: center; margin-bottom: 16rpx; }
.home-btn { display: flex; align-items: center; height: 54rpx; padding: 0 22rpx 0 16rpx; border-radius: 27rpx; background: rgba(255,255,255,.24); }
.home-btn:active { background: rgba(255,255,255,.38); }
.home-ic { font-size: 34rpx; line-height: 34rpx; color: #fff; margin-top: -4rpx; margin-right: 8rpx; }
.home-tx { font-size: 24rpx; font-weight: 600; color: #fff; }
.h-row { position: relative; display: flex; align-items: center; }
.avatar { width: 120rpx; height: 120rpx; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.avatar-img { width: 120rpx; height: 120rpx; }