diff --git a/components-diy/diy-recommend-code.vue b/components-diy/diy-recommend-code.vue index 393712a..db62dc5 100644 --- a/components-diy/diy-recommend-code.vue +++ b/components-diy/diy-recommend-code.vue @@ -214,10 +214,14 @@ 复制推荐码 - - + + 📤 {{ value.buttonText || '立即分享' }} + + 📤 {{ nc.buttonText || '立即分享' }} + {{ formatShareLink }} @@ -368,7 +372,7 @@ export default { textColor: '#FFFFFF', titleColor: '#333333', codeColor: '#E4393C', - buttonBgColor: '#E4393C', + buttonBgColor: '', // 默认空:让 Card 风格的立即分享按钮走「白底红边框」分支,匹配设计参考图 buttonTextColor: '#FFFFFF', shareButtonBgColor: '#67C23A', titleFontSize: 14, @@ -395,6 +399,8 @@ export default { code: '', shareLink: '', qrcodeUrl: '', + /* H5 平台标识:用于在 H5 端用 view 替代 button,避免浏览器 默认样式覆盖 */ + isH5Platform: false, /* 状态机 */ showConsent: false, loadingCode: false, @@ -636,6 +642,12 @@ export default { }, created() { try { + // H5 端检测:避开 默认样式影响(h5 端改用 view 触发) + try { + // #ifdef H5 + this.isH5Platform = true; + // #endif + } catch (e) {} if (this.storeToken) { this._resetAll(); var vm = this;