fix: 优化分享按钮布局+去掉重复推广入口
1. 阅读页分享按钮:改为全宽纵向排列 2. 新增复制文案功能 3. 我的页面:去掉顶部推广入口卡片(保留菜单中的推广中心)
This commit is contained in:
@@ -77,21 +77,6 @@
|
||||
|
||||
<!-- 概览内容 - 仅登录用户显示 -->
|
||||
<view class="tab-content" wx:if="{{activeTab === 'overview' && isLoggedIn}}">
|
||||
<!-- 推广入口卡片 -->
|
||||
<view class="promo-entry-card" bindtap="goToReferral">
|
||||
<view class="promo-entry-left">
|
||||
<view class="promo-entry-icon">💰</view>
|
||||
<view class="promo-entry-info">
|
||||
<text class="promo-entry-title">推广中心</text>
|
||||
<text class="promo-entry-desc">邀请好友购买,享90%推广收益</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="promo-entry-right">
|
||||
<text class="promo-entry-earnings" wx:if="{{earnings > 0}}">¥{{earnings}}</text>
|
||||
<text class="promo-entry-arrow">→</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 菜单列表 -->
|
||||
<view class="menu-card card">
|
||||
<view
|
||||
|
||||
@@ -285,6 +285,22 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 复制分享文案
|
||||
copyShareText() {
|
||||
const { section } = this.data
|
||||
const userInfo = app.globalData.userInfo
|
||||
const referralCode = userInfo?.referralCode || ''
|
||||
|
||||
const shareText = `📚《Soul创业派对》推荐阅读\n\n【${section?.title || '精彩内容'}】\n\n来自派对房的真实商业故事,62个创业案例,干货满满!\n\n🎁 通过我的推荐购买立享5%优惠\n👉 邀请码:${referralCode || 'SOUL'}\n\n#创业派对 #私域运营 #商业案例`
|
||||
|
||||
wx.setClipboardData({
|
||||
data: shareText,
|
||||
success: () => {
|
||||
wx.showToast({ title: '文案已复制', icon: 'success' })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 分享到微信 - 自动带分享人ID
|
||||
onShareAppMessage() {
|
||||
const { section, sectionId } = this.data
|
||||
|
||||
@@ -85,16 +85,24 @@
|
||||
<view class="action-header">
|
||||
<text class="action-title">分享这篇内容</text>
|
||||
</view>
|
||||
<view class="action-buttons">
|
||||
<button class="action-btn btn-share" open-type="share">
|
||||
<view class="action-row">
|
||||
<button class="action-btn-full btn-share-full" open-type="share">
|
||||
<text class="action-icon">💬</text>
|
||||
<text class="action-text">分享给好友</text>
|
||||
</button>
|
||||
<view class="action-btn btn-poster" bindtap="generatePoster">
|
||||
</view>
|
||||
<view class="action-row">
|
||||
<view class="action-btn-full btn-poster-full" bindtap="generatePoster">
|
||||
<text class="action-icon">🖼️</text>
|
||||
<text class="action-text">生成海报</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-row">
|
||||
<view class="action-btn-full btn-copy-full" bindtap="copyShareText">
|
||||
<text class="action-icon">📝</text>
|
||||
<text class="action-text">复制文案</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
@@ -414,38 +414,47 @@
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
.action-row {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
flex: 1;
|
||||
.action-row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.action-btn-full {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12rpx;
|
||||
width: 100%;
|
||||
padding: 28rpx 24rpx;
|
||||
border-radius: 20rpx;
|
||||
border: none;
|
||||
background: transparent;
|
||||
line-height: normal;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.action-btn::after {
|
||||
.action-btn-full::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-share {
|
||||
.btn-share-full {
|
||||
background: rgba(7, 193, 96, 0.15);
|
||||
border: 2rpx solid rgba(7, 193, 96, 0.3);
|
||||
}
|
||||
|
||||
.btn-poster {
|
||||
.btn-poster-full {
|
||||
background: rgba(255, 215, 0, 0.15);
|
||||
border: 2rpx solid rgba(255, 215, 0, 0.3);
|
||||
}
|
||||
|
||||
.btn-copy-full {
|
||||
background: rgba(0, 206, 209, 0.15);
|
||||
border: 2rpx solid rgba(0, 206, 209, 0.3);
|
||||
}
|
||||
|
||||
.action-icon {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user