fix(fe): 按钮长文案撑爆 + 用户主页帖子没样式 + 首字头像空白
三个都是我上一轮引入或没顾上的。
## 「Pro 会员(即将开放)」把按钮撑爆
.btn 同时用了 flex 垂直居中和 line-height:96rpx。flex 已经负责居中了,
line-height 纯属多余,而且文案一换行就被这个固定行高顶到按钮外面——
「我的」页底部那颗按钮正好触发。改成 min-height + line-height:1.3,
按钮能随文案长高,短文案的高度不变。
## 用户主页的帖子没有任何样式
.post-card 那一整套只写在 pages/community/community.wxss 里,而页面级
wxss 不跨页生效,所以用户主页上的帖子退化成裸文本。整块提到 app.wxss。
顺带给主页的帖子补上作者行和标签,和社区保持一致。
## 头像圈里空白
WXML 表达式不支持字符串下标,{{nickname[0]}} 求值为空。改成在 js 里
slice 好再传给模板。
另外确认一下:粉丝列表本来就能点进主页——关注和粉丝共用 pages/relations
一个页面,每行都绑了 goUser,和关注列表走同一个 pages/user 主页。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,39 +1,5 @@
|
||||
.compose-card{margin-bottom:var(--sp-4)}
|
||||
|
||||
.post-card{background:#fff;border-radius:var(--r-lg);box-shadow:var(--sd-1);padding:var(--sp-4);margin-bottom:var(--sp-4)}
|
||||
.post-head{display:flex;align-items:center;gap:var(--sp-3);margin-bottom:var(--sp-3)}
|
||||
.post-avatar{
|
||||
width:80rpx;height:80rpx;border-radius:var(--r-sm);background:var(--primary-soft);
|
||||
display:flex;align-items:center;justify-content:center;font-size:40rpx;flex:none;
|
||||
}
|
||||
.post-user{flex:1;min-width:0}
|
||||
.pu-b{font-size:var(--fs-md);display:block;font-weight:var(--fw-b)}
|
||||
.ai-tag{
|
||||
display:inline-block;margin-left:var(--sp-1);padding:0 var(--sp-1);border-radius:var(--r-xs);
|
||||
background:var(--blue-soft);color:var(--blue-ink);font-size:var(--fs-cap);font-weight:var(--fw-b);vertical-align:1rpx;
|
||||
}
|
||||
.pu-s{font-size:var(--fs-sm);color:var(--muted)}
|
||||
.post-content{font-size:var(--fs-md);line-height:1.62;color:var(--text-2);margin-bottom:var(--sp-3)}
|
||||
|
||||
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--sp-1);margin-bottom:var(--sp-3)}
|
||||
.photo-tile{
|
||||
aspect-ratio:1;border-radius:var(--r-sm);background:var(--primary-soft);
|
||||
display:flex;align-items:center;justify-content:center;font-size:56rpx;
|
||||
}
|
||||
|
||||
/* 三等分。原来是 space-around 排三个宽度不一的项,点赞数一变宽度就跳 */
|
||||
.post-actions{display:flex;border-top:1rpx solid var(--line);padding-top:var(--sp-2)}
|
||||
.pa-btn{
|
||||
flex:1;height:72rpx;
|
||||
display:flex;align-items:center;justify-content:center;gap:var(--sp-1);
|
||||
color:var(--muted);font-weight:var(--fw);font-size:var(--fs-sm);
|
||||
}
|
||||
.pa-n{line-height:1}
|
||||
.pa-btn.liked{color:var(--red-ink)}
|
||||
.pa-btn:active{background:var(--surface-2);border-radius:var(--r-sm)}
|
||||
/* 分享用微信原生 open-type=share,得抹掉 button 默认外观 */
|
||||
.pa-share{background:transparent;border:none;padding:0;margin:0;line-height:inherit}
|
||||
.pa-share::after{border:none}
|
||||
|
||||
/* 关注按钮 */
|
||||
.follow-btn{
|
||||
|
||||
Reference in New Issue
Block a user