chore:合并成一个客服按钮
This commit is contained in:
@@ -146,8 +146,31 @@
|
||||
nsNavbar,
|
||||
toTop
|
||||
},
|
||||
mixins: [diyJs, scroll, indexJs]
|
||||
mixins: [diyJs, scroll, indexJs],
|
||||
methods: {
|
||||
// 新增:电话按钮点击事件-弹出对话框
|
||||
openCallDialog() {
|
||||
uni.showModal({
|
||||
title: "拨打?【仅为模拟】", // 弹窗标题
|
||||
content: "", // 弹窗内容(可留空)
|
||||
confirmText: "确定", // 确定按钮文字
|
||||
cancelText: "取消", // 取消按钮文字
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
// 点击“确定”后的操作(比如实际拨号)
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: "13800138000" // 替换为实际要拨打的号码
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
// 点击“取消”后的操作(可留空)
|
||||
console.log('用户取消拨打');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user