景徳镇旅游微信小程序
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

8 months ago
  1. <template>
  2. <uv-action-sheet
  3. ref="actionSheet"
  4. :actions="actionSheet"
  5. @select="select">
  6. </uv-action-sheet>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. actionSheet : [
  13. {
  14. name: '线上客服',
  15. openType: 'contact'
  16. },
  17. {
  18. name: '电话呼叫',
  19. type : 'phone',
  20. },
  21. ],
  22. }
  23. },
  24. methods: {
  25. select(e){
  26. if(e.type == 'phone'){
  27. uni.makePhoneCall({
  28. // 手机号 这里可以直接写号码如 12345 也可以写获取号码的字段如this.mobile
  29. phoneNumber: '123',
  30. // 成功回调
  31. success: (res) => {
  32. console.log('调用成功!')
  33. },
  34. })
  35. }
  36. },
  37. open(){
  38. this.$refs.actionSheet.open()
  39. }
  40. }
  41. }
  42. </script>
  43. <style>
  44. </style>