chore:推荐码4可以正常显示

This commit is contained in:
2026-08-05 11:48:34 +08:00
parent 37d72381c7
commit 66deecdcf8

View File

@@ -41,7 +41,7 @@
</view>
<!-- ============ 预设 1:Gradient 渐变风格(默认) ============ -->
<view v-else-if="stylePreset === 'gradient'" class="style-gradient" :style="gradientStyle">
<view v-if="stylePreset === 'gradient'" class="style-gradient" :style="gradientStyle">
<view class="rc-header">
<text class="rc-title" :style="{ color: value.titleColor || '#5C3D1E' }">{{ value.title || '我的推荐码' }}</text>
</view>
@@ -78,7 +78,7 @@
</view>
<!-- ============ 预设 2:Minimal 极简风格(纯色 + 边框) ============ -->
<view v-else-if="stylePreset === 'minimal'" class="style-minimal" :style="minimalStyle">
<view v-if="stylePreset === 'minimal'" class="style-minimal" :style="minimalStyle">
<view class="rc-header">
<text class="rc-title" :style="{ color: value.titleColor || '#5C3D1E' }">{{ value.title || '我的推荐码' }}</text>
</view>
@@ -108,7 +108,7 @@
</view>
<!-- ============ 预设 3:Card 金色边框卡片风格 ============ -->
<view v-else-if="stylePreset === 'card'" class="style-card" :style="cardStyleBox">
<view v-if="stylePreset === 'card'" class="style-card" :style="cardStyleBox">
<view class="rc-accent-bar" :style="{ background: value.accentColor || '#F0C040' }"></view>
<view class="rc-header rc-header-card">
<text class="rc-title" :style="{ color: value.titleColor || '#B8860B' }">{{ value.title || '我的推荐码' }}</text>
@@ -143,21 +143,21 @@
</view>
<!-- ============ 预设 4:Bookgold 金棕风格 ============ -->
<view v-else-if="stylePreset === 'bookgold'" class="style-bookgold" :style="bookGoldStyle">
<view v-if="stylePreset === 'horizontal'" class="style-bookgold" :style="bookGoldStyle">
<view class="rc-header rc-header-bookgold">
<text class="rc-title" :style="{ color: value.titleColor || '#FFFFFF' }">{{ value.title || '我的推荐码' }}</text>
</view>
<view class="rc-code-box rc-code-bookgold" @tap="copyRecommendCode" :style="bookGoldCodeBoxStyle">
<text class="rc-prefix" :style="{ color: 'rgba(255,255,255,0.7)' }">推荐码</text>
<text class="rc-prefix" :style="{ color: 'rgba(255,255,255,0.7)' }"></text>
<text class="rc-code" :style="codeTextStyle">{{ code || '暂无' }}</text>
<text class="rc-copy rc-copy-bookgold" :style="bookGoldCopyBtnStyle">复制</text>
<text class="rc-copy rc-copy-bookgold" :style="bookGoldCopyBtnStyle" @tap.stop="copyLink"></text>
</view>
<view class="rc-action-bar rc-action-bookgold">
<view v-if="isFeatureOn(value.showButton)" class="rc-btn rc-btn-share rc-btn-share-bookgold"
:style="mainBtnBgStyle()" @tap="onShareClick" open-type="share">
<text>{{ value.buttonText || '立即分享' }}</text>
</view>
<view class="rc-btn rc-btn-copy" :style="secondaryBtnStyle" @tap="copyLink" :disabled="secondaryBtnStyle">
<view class="rc-btn rc-btn-copy" :style="secondaryBtnStyle" @tap="copyLink">
<text>{{ value.placeholderCopyText || '立即分享链接' }}</text>
</view>
<view v-if="isFeatureOn(value.allowRegenerate)" class="rc-btn rc-btn-regenerate"
@@ -177,8 +177,7 @@
</text>
</view>
</view>
</view>
</view>
<!-- 登录组件占位(ns-login 全局 mixin 已注册) -->
<ns-login ref="nsLoginBox" :popup="true" @getUserInfo="onLoginSuccess"></ns-login>
</view>
@@ -321,7 +320,7 @@ export default {
},
stylePreset() {
const s = String(this.nc.stylePreset || 'gradient').toLowerCase();
if (['minimal', 'card', 'bookgold'].includes(s)) return s;
if (['minimal', 'card', 'bookgold', 'horizontal'].includes(s)) return s;
return 'gradient';
},
requireConsentComputed() {
@@ -445,7 +444,7 @@ export default {
codeTextStyle() {
const v = this.nc;
return [
`color:${v.codeColor || (this.stylePreset === 'bookgold' ? '#FFFFFF' : (this.stylePreset === 'card' ? '#B8860B' : '#5C3D1E'))};`,
`color:${v.codeColor || (this.stylePreset === 'horizontal' ? '#FFFFFF' : (this.stylePreset === 'card' ? '#B8860B' : '#5C3D1E'))};`,
`font-size:${this.px2rpx(v.codeFontSize)}rpx;`,
`letter-spacing:${this.px2rpx(1)}rpx;`,
'font-weight:800;',