Update business-card.vue
This commit is contained in:
parent
8d28d909dc
commit
c0a108ec23
@ -113,7 +113,8 @@
|
||||
<view class="service-list-item" v-if="businessCard && businessCard.externalContact">
|
||||
<view class="service-list-text">{{ businessCard.externalContact }}</view>
|
||||
<view class="flex">
|
||||
<view class="text-base text-primary mr-10" @click="setClipboardData(businessCard.externalContact)">
|
||||
<view class="text-base text-primary mr-10"
|
||||
@click="setClipboardData(businessCard.externalContact, 'mobile')">
|
||||
复制
|
||||
</view>
|
||||
<view class="text-base text-primary" @click="makePhoneCall(businessCard.externalContact)">拨打</view>
|
||||
@ -137,10 +138,9 @@
|
||||
</view>
|
||||
<view class="service-modal-body">
|
||||
<view class="service-list">
|
||||
<view class="service-list-item" v-if="businessCard.externalEmail"
|
||||
@click="copyEmail(businessCard.externalEmail)">
|
||||
<view class="service-list-item" v-if="businessCard.externalEmail">
|
||||
<text class="service-list-text">{{ businessCard.externalEmail }}</text>
|
||||
<view class="text-base text-primary mr-10" @click="setClipboardData(businessCard.externalEmail)">
|
||||
<view class="text-base text-primary mr-10" @click="setClipboardData(businessCard.externalEmail, 'email')">
|
||||
复制
|
||||
</view>
|
||||
</view>
|
||||
@ -152,32 +152,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 地址弹窗 -->
|
||||
<view v-if="showAddressModal" class="modal-mask" @click="closeAddressModal">
|
||||
<view class="service-modal-content" @click.stop>
|
||||
<view class="service-modal-header">
|
||||
<text class="service-modal-close" @click="closeAddressModal">×</text>
|
||||
<text class="service-modal-title">地址</text>
|
||||
</view>
|
||||
<view class="service-modal-body">
|
||||
<view class="service-list">
|
||||
<view class="service-list-item" v-if="businessCard.externalAddress"
|
||||
@click="setClipboardData(businessCard.externalAddress)">
|
||||
<text class="service-list-text">{{ businessCard.externalAddress }}</text>
|
||||
<view class="text-base text-primary" @click="setClipboardData(businessCard.externalAddress)">
|
||||
复制
|
||||
</view>
|
||||
</view>
|
||||
<view class="service-list-item" v-else>
|
||||
<text class="service-list-text no-data">暂无地址信息</text>
|
||||
<view class="service-list-icon">📍</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<teams-popup :visible="showTeamPopup" :teams="teams" @close="showTeamPopup = false" />
|
||||
</template>
|
||||
|
||||
@ -234,7 +208,12 @@ function makePhoneCall(phone) {
|
||||
})
|
||||
}
|
||||
|
||||
function setClipboardData(data) {
|
||||
function setClipboardData(data, type) {
|
||||
if (type === 'mobile') {
|
||||
showPhoneModal.value = false
|
||||
} else if (type === 'email') {
|
||||
showEmailModal.value = false
|
||||
}
|
||||
uni.setClipboardData({
|
||||
data: data,
|
||||
success: () => {
|
||||
@ -392,27 +371,6 @@ const closeAddressModal = () => {
|
||||
showAddressModal.value = false
|
||||
}
|
||||
|
||||
|
||||
// 复制邮箱地址
|
||||
const copyEmail = (email) => {
|
||||
closeEmailModal()
|
||||
uni.setClipboardData({
|
||||
data: email,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '邮箱已复制',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '复制失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user