chore:合并成一个客服按钮

This commit is contained in:
2025-12-19 11:59:52 +08:00
parent 8103f4c897
commit 3a455bd644
3 changed files with 40 additions and 5 deletions

View File

@@ -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">