feat(diy-card): 添加链接选择功能,优化名片发送按钮文本
This commit is contained in:
@@ -156,6 +156,16 @@ export default {
|
||||
uni.showToast({ title: '自定义路径需以 / 开头', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
} else if (v.linkMode === 'link') {
|
||||
// 平台统一「选择链接」: link 是个对象({name,title,wap_url,page_key,page_params}),
|
||||
// 走 $util.diyRedirectTo 由平台统一处理(内部页/外链/小程序/拨号 等)
|
||||
const link = v.link && typeof v.link === 'object' ? v.link : null;
|
||||
if (!link || !link.name) {
|
||||
uni.showToast({ title: '请先选择链接', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
this.$util.diyRedirectTo(link);
|
||||
return;
|
||||
} else {
|
||||
url = '/pages_tool/card/list';
|
||||
}
|
||||
|
||||
@@ -229,6 +229,16 @@ export default {
|
||||
uni.showToast({ title: '自定义路径需以 / 开头', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
} else if (mode === 'link') {
|
||||
// 平台统一「选择链接」: moreLink 是个对象({name,title,wap_url,page_key,page_params}),
|
||||
// 走 $util.diyRedirectTo 由平台统一处理(内部页/外链/小程序/拨号 等)
|
||||
const link = this.v.moreLink && typeof this.v.moreLink === 'object' ? this.v.moreLink : null;
|
||||
if (!link || !link.name) {
|
||||
uni.showToast({ title: '请先选择链接', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
this.$util.diyRedirectTo(link);
|
||||
return;
|
||||
}
|
||||
this.$util.redirectTo(url);
|
||||
},
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
<text v-if="showQrTip" class="qr-tip" :style="labelStyle">{{ qrTip || '扫码查看完整名片' }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 查看完整名片 -->
|
||||
<!-- 发送名片 -->
|
||||
<view v-if="showDetailBtn" class="mini-detail" :style="detailBtnStyle" hover-class="btn-press" @tap.stop="onDetail">
|
||||
<text class="detail-text">{{ detailBtnText || '查看完整名片' }}</text>
|
||||
<text class="detail-text">{{ detailBtnText || '发送名片' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user