|
|
@@ -25,7 +25,7 @@
|
|
|
<div class="name">{{ $t('common.customerService') }}</div>
|
|
|
<div class="num">WhatsApp: {{ item.phone }}</div>
|
|
|
</div>
|
|
|
- <a :href="`whatsapp://send?phon=${item.phone}`" class="btn-open">{{ $t('common.open') }}</a>
|
|
|
+ <div class="btn-open" @click="open(item.phone)">{{ $t('common.open') }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -49,6 +49,7 @@ import { closeOutline } from 'ionicons/icons'
|
|
|
import { Clipboard as NativeClipboard } from '@capacitor/clipboard'
|
|
|
import { Capacitor } from '@capacitor/core'
|
|
|
import { useClipboard } from '@vueuse/core'
|
|
|
+import { AppLauncher } from '@capacitor/app-launcher'
|
|
|
|
|
|
const store = useSettingsStore()
|
|
|
const { t } = useI18n()
|
|
|
@@ -118,6 +119,9 @@ async function copyText(text) {
|
|
|
}
|
|
|
taost(t('common.copied'))
|
|
|
}
|
|
|
+async function open(phone) {
|
|
|
+ await AppLauncher.openUrl({ url: `whatsapp://send?phone=${phone}` })
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
.consult {
|