chore:推荐码4可以正常显示
This commit is contained in:
@@ -40,145 +40,144 @@
|
||||
<text class="loading-text" :style="{ color: value.titleColor || '#999999' }">推荐码加载中...</text>
|
||||
</view>
|
||||
|
||||
<!-- ============ 预设 1:Gradient 渐变风格(默认) ============ -->
|
||||
<view v-else-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>
|
||||
<view class="rc-code-box rc-code-gradient" @tap="copyRecommendCode">
|
||||
<text class="rc-code rc-code-gradient-text" :style="codeTextStyle">{{ code || '暂无' }}</text>
|
||||
</view>
|
||||
<!-- 复制链接按钮:在推荐码下方居中,白色背景 -->
|
||||
<view class="rc-copy-link-row rc-copy-link-gradient">
|
||||
<view class="rc-btn rc-btn-copy rc-btn-copy-gradient" :style="gradientCopyLinkStyle" @tap="copyLink" :disabled="loadingCode">
|
||||
<text>{{ value.placeholderCopyText || '立即分享链接' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rc-action-bar">
|
||||
<view v-if="isFeatureOn(value.showButton)" class="rc-btn rc-btn-share"
|
||||
:style="mainBtnBgStyle()" @tap="onShareClick" open-type="share">
|
||||
<text>{{ value.buttonText || '立即分享' }}</text>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.allowRegenerate)" class="rc-btn rc-btn-regenerate"
|
||||
:style="secondaryBtnStyle" @tap="regenerate">
|
||||
<text>{{ value.placeholderRegenerateText || '换一个新码' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- showLink:是否显示分享链接文字 -->
|
||||
<view v-if="isFeatureOn(value.showLink)" class="rc-link-row">
|
||||
<text class="rc-link-text" @tap="copyLink">{{ formatShareLink}}</text>
|
||||
</view>
|
||||
<!-- showQR:是否显示二维码 -->
|
||||
<view v-if="isFeatureOn(value.showQR)" class="rc-qr-row">
|
||||
<image :src="qrcodeRenderUrl" mode="aspectFit" class="rc-qr-img" />
|
||||
<text class="rc-qr-tip" :style="{ color: 'rgba(92,61,30,0.8)' }">
|
||||
{{ value.posterQrTip || '扫码进入并填写入驻信息' }}
|
||||
</text>
|
||||
<!-- ============ 预设 1:Gradient 渐变风格(默认) ============ -->
|
||||
<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>
|
||||
<view class="rc-code-box rc-code-gradient" @tap="copyRecommendCode">
|
||||
<text class="rc-code rc-code-gradient-text" :style="codeTextStyle">{{ code || '暂无' }}</text>
|
||||
</view>
|
||||
<!-- 复制链接按钮:在推荐码下方居中,白色背景 -->
|
||||
<view class="rc-copy-link-row rc-copy-link-gradient">
|
||||
<view class="rc-btn rc-btn-copy rc-btn-copy-gradient" :style="gradientCopyLinkStyle" @tap="copyLink" :disabled="loadingCode">
|
||||
<text>{{ value.placeholderCopyText || '立即分享链接' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ============ 预设 2:Minimal 极简风格(纯色 + 边框) ============ -->
|
||||
<view v-else-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 class="rc-action-bar">
|
||||
<view v-if="isFeatureOn(value.showButton)" class="rc-btn rc-btn-share"
|
||||
:style="mainBtnBgStyle()" @tap="onShareClick" open-type="share">
|
||||
<text>{{ value.buttonText || '立即分享' }}</text>
|
||||
</view>
|
||||
<view class="rc-code-box rc-code-minimal" @tap="copyRecommendCode" :style="minimalCodeBoxStyle">
|
||||
<text class="rc-code rc-code-minimal-text" :style="codeTextStyle">{{ code || '暂无' }}</text>
|
||||
<text class="rc-copy rc-copy-minimal" :style="minimalCopyBtnStyle" @tap.stop="copyLink">{{ value.placeholderCopyText || '立即分享链接' }}</text>
|
||||
</view>
|
||||
<view class="rc-action-bar rc-action-minimal">
|
||||
<button v-if="isFeatureOn(value.showButton)" class="rc-btn rc-btn-share rc-btn-share-minimal"
|
||||
:style="mainBtnBgStyle()" @tap="onShareClick" open-type="share">
|
||||
<text>{{ value.buttonText || '立即分享' }}</text>
|
||||
</button>
|
||||
<view v-if="isFeatureOn(value.allowRegenerate)" class="rc-btn rc-btn-regenerate"
|
||||
:style="secondaryBtnStyle" @tap="regenerate">
|
||||
<text>{{ value.placeholderRegenerateText || '换一个新码' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.showLink)" class="rc-link-row">
|
||||
<text class="rc-link-text rc-link-minimal" @tap="copyLink">{{ formatShareLink }}</text>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.showQR)" class="rc-qr-row rc-qr-minimal">
|
||||
<image :src="qrcodeRenderUrl" mode="aspectFit" class="rc-qr-img rc-qr-minimal-img" />
|
||||
<text class="rc-qr-tip rc-qr-tip-minimal" :style="{ color: '#8B7355' }">
|
||||
{{ value.posterQrTip || '扫码进入并填写入驻信息' }}
|
||||
</text>
|
||||
<view v-if="isFeatureOn(value.allowRegenerate)" class="rc-btn rc-btn-regenerate"
|
||||
:style="secondaryBtnStyle" @tap="regenerate">
|
||||
<text>{{ value.placeholderRegenerateText || '换一个新码' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ============ 预设 3:Card 金色边框卡片风格 ============ -->
|
||||
<view v-else-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>
|
||||
</view>
|
||||
<view class="rc-code-box rc-code-card" @tap="copyRecommendCode">
|
||||
<text class="rc-code" :style="codeTextStyle">{{ code || '暂无' }}</text>
|
||||
<view class="rc-copy rc-copy-card rc-copy-link-card" :style="{ background: value.accentColor || '#DAA520', color: '#FFFFFF' }" @tap.stop="copyLink">
|
||||
<text>{{ value.placeholderCopyText || '立即分享链接' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rc-action-bar rc-action-card">
|
||||
<button v-if="isFeatureOn(value.showButton)" class="rc-btn rc-btn-share"
|
||||
:style="mainBtnBgStyle()" @tap="onShareClick" open-type="share">
|
||||
<text>{{ value.buttonText || '立即分享' }}</text>
|
||||
</button>
|
||||
<view v-if="isFeatureOn(value.allowRegenerate)" class="rc-btn rc-btn-regenerate"
|
||||
:style="secondaryBtnStyle" @tap="regenerate">
|
||||
<text>{{ value.placeholderRegenerateText || '换一个新码' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.showLink)" class="rc-link-row rc-link-card">
|
||||
<text class="rc-link-text" @tap="copyLink">{{ formatShareLink }}</text>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.showQR)" class="rc-qr-row rc-qr-card">
|
||||
<view class="rc-qr-wrap-card" :style="{ borderColor: value.accentColor || '#F0C040' }">
|
||||
<image :src="qrcodeRenderUrl" mode="aspectFit" class="rc-qr-img rc-qr-card-img" />
|
||||
</view>
|
||||
<text class="rc-qr-tip rc-qr-tip-card" :style="{ color: '#B8860B' }">
|
||||
{{ value.posterQrTip || '扫码进入并填写入驻信息' }}
|
||||
</text>
|
||||
</view>
|
||||
<!-- showLink:是否显示分享链接文字 -->
|
||||
<view v-if="isFeatureOn(value.showLink)" class="rc-link-row">
|
||||
<text class="rc-link-text" @tap="copyLink">{{ formatShareLink}}</text>
|
||||
</view>
|
||||
|
||||
<!-- ============ 预设 4:Bookgold 金棕风格 ============ -->
|
||||
<view v-else-if="stylePreset === 'bookgold'" 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-code" :style="codeTextStyle">{{ code || '暂无' }}</text>
|
||||
<text class="rc-copy rc-copy-bookgold" :style="bookGoldCopyBtnStyle">复制</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">
|
||||
<text>{{ value.placeholderCopyText || '立即分享链接' }}</text>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.allowRegenerate)" class="rc-btn rc-btn-regenerate"
|
||||
:style="secondaryBtnStyle" @tap="regenerate">
|
||||
<text>{{ value.placeholderRegenerateText || '换一个新码' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- showLink:是否显示分享链接文字 -->
|
||||
<view v-if="isFeatureOn(value.showLink)" class="rc-link-row rc-link-bookgold">
|
||||
<text class="rc-link-text" @tap="copyLink">{{ formatShareLink}}</text>
|
||||
</view>
|
||||
<!-- showQR:是否显示二维码 -->
|
||||
<view v-if="isFeatureOn(value.showQR)" class="rc-qr-row rc-qr-bookgold">
|
||||
<image :src="qrcodeRenderUrl" mode="aspectFit" class="rc-qr-img rc-qr-bookgold-img" />
|
||||
<text class="rc-qr-tip rc-qr-tip-bookgold" :style="{ color: '#E8DDD0' }">
|
||||
{{ value.posterQrTip || '扫码进入并填写入驻信息' }}
|
||||
</text>
|
||||
</view>
|
||||
<!-- showQR:是否显示二维码 -->
|
||||
<view v-if="isFeatureOn(value.showQR)" class="rc-qr-row">
|
||||
<image :src="qrcodeRenderUrl" mode="aspectFit" class="rc-qr-img" />
|
||||
<text class="rc-qr-tip" :style="{ color: 'rgba(92,61,30,0.8)' }">
|
||||
{{ value.posterQrTip || '扫码进入并填写入驻信息' }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- ============ 预设 2:Minimal 极简风格(纯色 + 边框) ============ -->
|
||||
<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>
|
||||
<view class="rc-code-box rc-code-minimal" @tap="copyRecommendCode" :style="minimalCodeBoxStyle">
|
||||
<text class="rc-code rc-code-minimal-text" :style="codeTextStyle">{{ code || '暂无' }}</text>
|
||||
<text class="rc-copy rc-copy-minimal" :style="minimalCopyBtnStyle" @tap.stop="copyLink">{{ value.placeholderCopyText || '立即分享链接' }}</text>
|
||||
</view>
|
||||
<view class="rc-action-bar rc-action-minimal">
|
||||
<button v-if="isFeatureOn(value.showButton)" class="rc-btn rc-btn-share rc-btn-share-minimal"
|
||||
:style="mainBtnBgStyle()" @tap="onShareClick" open-type="share">
|
||||
<text>{{ value.buttonText || '立即分享' }}</text>
|
||||
</button>
|
||||
<view v-if="isFeatureOn(value.allowRegenerate)" class="rc-btn rc-btn-regenerate"
|
||||
:style="secondaryBtnStyle" @tap="regenerate">
|
||||
<text>{{ value.placeholderRegenerateText || '换一个新码' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.showLink)" class="rc-link-row">
|
||||
<text class="rc-link-text rc-link-minimal" @tap="copyLink">{{ formatShareLink }}</text>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.showQR)" class="rc-qr-row rc-qr-minimal">
|
||||
<image :src="qrcodeRenderUrl" mode="aspectFit" class="rc-qr-img rc-qr-minimal-img" />
|
||||
<text class="rc-qr-tip rc-qr-tip-minimal" :style="{ color: '#8B7355' }">
|
||||
{{ value.posterQrTip || '扫码进入并填写入驻信息' }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ============ 预设 3:Card 金色边框卡片风格 ============ -->
|
||||
<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>
|
||||
</view>
|
||||
<view class="rc-code-box rc-code-card" @tap="copyRecommendCode">
|
||||
<text class="rc-code" :style="codeTextStyle">{{ code || '暂无' }}</text>
|
||||
<view class="rc-copy rc-copy-card rc-copy-link-card" :style="{ background: value.accentColor || '#DAA520', color: '#FFFFFF' }" @tap.stop="copyLink">
|
||||
<text>{{ value.placeholderCopyText || '立即分享链接' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rc-action-bar rc-action-card">
|
||||
<button v-if="isFeatureOn(value.showButton)" class="rc-btn rc-btn-share"
|
||||
:style="mainBtnBgStyle()" @tap="onShareClick" open-type="share">
|
||||
<text>{{ value.buttonText || '立即分享' }}</text>
|
||||
</button>
|
||||
<view v-if="isFeatureOn(value.allowRegenerate)" class="rc-btn rc-btn-regenerate"
|
||||
:style="secondaryBtnStyle" @tap="regenerate">
|
||||
<text>{{ value.placeholderRegenerateText || '换一个新码' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.showLink)" class="rc-link-row rc-link-card">
|
||||
<text class="rc-link-text" @tap="copyLink">{{ formatShareLink }}</text>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.showQR)" class="rc-qr-row rc-qr-card">
|
||||
<view class="rc-qr-wrap-card" :style="{ borderColor: value.accentColor || '#F0C040' }">
|
||||
<image :src="qrcodeRenderUrl" mode="aspectFit" class="rc-qr-img rc-qr-card-img" />
|
||||
</view>
|
||||
<text class="rc-qr-tip rc-qr-tip-card" :style="{ color: '#B8860B' }">
|
||||
{{ value.posterQrTip || '扫码进入并填写入驻信息' }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ============ 预设 4:Bookgold 金棕风格 ============ -->
|
||||
<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-code" :style="codeTextStyle">{{ code || '暂无' }}</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">
|
||||
<text>{{ value.placeholderCopyText || '立即分享链接' }}</text>
|
||||
</view>
|
||||
<view v-if="isFeatureOn(value.allowRegenerate)" class="rc-btn rc-btn-regenerate"
|
||||
:style="secondaryBtnStyle" @tap="regenerate">
|
||||
<text>{{ value.placeholderRegenerateText || '换一个新码' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- showLink:是否显示分享链接文字 -->
|
||||
<view v-if="isFeatureOn(value.showLink)" class="rc-link-row rc-link-bookgold">
|
||||
<text class="rc-link-text" @tap="copyLink">{{ formatShareLink}}</text>
|
||||
</view>
|
||||
<!-- showQR:是否显示二维码 -->
|
||||
<view v-if="isFeatureOn(value.showQR)" class="rc-qr-row rc-qr-bookgold">
|
||||
<image :src="qrcodeRenderUrl" mode="aspectFit" class="rc-qr-img rc-qr-bookgold-img" />
|
||||
<text class="rc-qr-tip rc-qr-tip-bookgold" :style="{ color: '#E8DDD0' }">
|
||||
{{ value.posterQrTip || '扫码进入并填写入驻信息' }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 登录组件占位(ns-login 全局 mixin 已注册) -->
|
||||
<ns-login ref="nsLoginBox" :popup="true" @getUserInfo="onLoginSuccess"></ns-login>
|
||||
</view>
|
||||
@@ -320,10 +319,10 @@ export default {
|
||||
return merged;
|
||||
},
|
||||
stylePreset() {
|
||||
const s = String(this.nc.stylePreset || 'gradient').toLowerCase();
|
||||
if (['minimal', 'card', 'bookgold'].includes(s)) return s;
|
||||
return 'gradient';
|
||||
},
|
||||
const s = String(this.nc.stylePreset || 'gradient').toLowerCase();
|
||||
if (['minimal', 'card', 'bookgold', 'horizontal'].includes(s)) return s;
|
||||
return 'gradient';
|
||||
},
|
||||
requireConsentComputed() {
|
||||
return this.isFeatureOn(this.nc.requireConsent);
|
||||
},
|
||||
@@ -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;',
|
||||
|
||||
Reference in New Issue
Block a user