景徳镇旅游微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

47 lines
756 B

<template>
<uv-action-sheet
ref="actionSheet"
:actions="actionSheet"
@select="select">
</uv-action-sheet>
</template>
<script>
export default {
data() {
return {
actionSheet : [
{
name: '线上客服',
openType: 'contact'
},
{
name: '电话呼叫',
type : 'phone',
},
],
}
},
methods: {
select(e){
if(e.type == 'phone'){
uni.makePhoneCall({
// 手机号 这里可以直接写号码如 12345 也可以写获取号码的字段如this.mobile
phoneNumber: '123',
// 成功回调
success: (res) => {
console.log('调用成功!')
},
})
}
},
open(){
this.$refs.actionSheet.open()
}
}
}
</script>
<style>
</style>