Merge branch 'feat/camcard' of http://git.aigc-quickapp.com/Uniapp/lucky_shop into feat/camcard
# Conflicts: # components-diy/diy-card-show.vue # tests/diy-card-style-v2.test.js
This commit is contained in:
@@ -121,6 +121,7 @@ export default {
|
||||
qrImage: v.qrImage,
|
||||
// 2.19: 默认动作显隐/文案 + 自定义动作(基件 acts computed 合成)
|
||||
actVis: v.actVis,
|
||||
actDeleted: v.actDeleted,
|
||||
actLabels: v.actLabels,
|
||||
actOrder: v.actOrder,
|
||||
customActs: v.customActs,
|
||||
@@ -211,6 +212,10 @@ export default {
|
||||
this.goSaveContact();
|
||||
return;
|
||||
}
|
||||
// map(导航): value 留空回落名片地址(2.19.3)
|
||||
if (act.type === 'map' && !act.value && this.card && this.card.address) {
|
||||
act = Object.assign({}, act, { value: this.card.address });
|
||||
}
|
||||
if (!act.value) return;
|
||||
if (act.type === 'tel') {
|
||||
uni.makePhoneCall({ phoneNumber: act.value, fail: () => {} });
|
||||
@@ -246,6 +251,36 @@ export default {
|
||||
fail: () => uni.showToast({ title: '打开网站失败', icon: 'none' }),
|
||||
});
|
||||
// #endif
|
||||
} else if (act.type === 'sms') {
|
||||
// #ifdef H5
|
||||
window.location.href = 'sms:' + act.value;
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
uni.setClipboardData({
|
||||
data: act.value,
|
||||
success: () => uni.showToast({ title: '号码已复制,请到短信粘贴', icon: 'none' }),
|
||||
});
|
||||
// #endif
|
||||
} else if (act.type === 'map') {
|
||||
uni.setClipboardData({
|
||||
data: act.value,
|
||||
success: () => uni.showToast({ title: '地址已复制,可粘贴到地图导航', icon: 'none' }),
|
||||
});
|
||||
} else if (act.type === 'link') {
|
||||
var isHttp = act.value.indexOf('http://') === 0 || act.value.indexOf('https://') === 0;
|
||||
if (isHttp) {
|
||||
// #ifdef H5
|
||||
window.location.href = act.value;
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
uni.setClipboardData({
|
||||
data: act.value,
|
||||
success: () => uni.showToast({ title: '链接已复制,请在浏览器打开', icon: 'none' }),
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
this.$util.redirectTo(act.value, {});
|
||||
}
|
||||
} else {
|
||||
uni.setClipboardData({
|
||||
data: act.value,
|
||||
|
||||
Reference in New Issue
Block a user