feat(fe): 宠物照片替代默认头像,身份卡移到首页门面卡
- 首页/我的/切换条:上传过照片就用照片,没有才退回 emoji - 报告页分享海报:先异步加载头像再开画,画成圆形头像 - 一起生活的天数改成从到家日期算,没填就显示「-」并可点去补 - 身份卡入口从「我的」页移到首页门面卡右上角 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -199,6 +199,16 @@ Page({
|
||||
},
|
||||
// 去建档页改阶段。改完回来 onShow 会重新拉一次漂移状态,提示自然消失。
|
||||
// 不在首页直接改:改阶段之后要不要套新方案是同一件事,放在一起做才连贯
|
||||
// 点「一起生活的天数」空态,去建档页补到家日期
|
||||
onDaysTap() {
|
||||
const id = this.data.pet && this.data.pet.id;
|
||||
if (!this.data.daysTogether && id) wx.navigateTo({ url: '/pages/petform/petform?id=' + id });
|
||||
},
|
||||
// 身份卡:门面卡右上角进,用当前宠物
|
||||
goIDCard() {
|
||||
const id = this.data.pet && this.data.pet.id;
|
||||
if (id) wx.navigateTo({ url: '/pages/idcard/idcard?id=' + id });
|
||||
},
|
||||
goStageUpdate() {
|
||||
const id = this.data.pet && this.data.pet.id;
|
||||
if (id) wx.navigateTo({ url: '/pages/petform/petform?id=' + id });
|
||||
|
||||
@@ -21,9 +21,15 @@
|
||||
<text wx:if="{{zodiac}}">{{zodiac}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hero-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view>
|
||||
<view wx:if="{{pet.id}}" class="hero-idcard" catchtap="goIDCard">
|
||||
<pt-icon name="user" size="{{30}}"></pt-icon>身份卡
|
||||
</view>
|
||||
</view>
|
||||
<!-- 一起生活的天数从到家日算。没填到家日就显示「-」,点一下去补 -->
|
||||
<view wx:if="{{pet.id}}" class="hero-days {{daysTogether ? '' : 'hero-days-empty'}}" catchtap="onDaysTap">
|
||||
<block wx:if="{{daysTogether}}">我们一起生活的第 <text class="hd-n">{{daysTogether}}</text> 天</block>
|
||||
<block wx:else>还没填到家日期,一起生活的天数显示 <text class="hd-n">-</text></block>
|
||||
</view>
|
||||
<view wx:if="{{daysTogether}}" class="hero-days">我们一起生活的第 <text class="hd-n">{{daysTogether}}</text> 天</view>
|
||||
</view>
|
||||
|
||||
<!-- 阶段漂移。系统只负责发现,换不换由用户点 —— 偷偷换会让他莫名发现
|
||||
|
||||
@@ -87,3 +87,16 @@
|
||||
.drift-focus{font-size:var(--fs-sm);color:var(--primary-ink);line-height:1.6;margin-top:6rpx}
|
||||
.drift-size{font-size:var(--fs-cap);color:var(--primary-dark);opacity:.8;margin-top:6rpx}
|
||||
.drift-cta{margin-top:var(--sp-4)}
|
||||
|
||||
/* 没填到家日期时的天数空态:压成灰、可点去补 */
|
||||
.hero-days-empty{background:var(--surface-2);color:var(--muted)}
|
||||
.hero-days-empty .hd-n{color:var(--muted)}
|
||||
|
||||
/* 门面卡右上角的身份卡入口。原来那里是个 next 箭头(点整卡进编辑),
|
||||
身份卡做成小胶囊,和整卡点击分开 */
|
||||
.hero-idcard{
|
||||
flex:none;align-self:flex-start;display:flex;align-items:center;gap:4rpx;
|
||||
padding:8rpx var(--sp-3);border-radius:var(--r-full);
|
||||
background:var(--primary-soft);color:var(--primary-dark);
|
||||
font-size:var(--fs-cap);font-weight:var(--fw-b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user