添加设备绑定提示
This commit is contained in:
@@ -18,11 +18,21 @@ const isIos = ref(true);
|
||||
const toPage = (path) => {
|
||||
if (!user.value.id) {
|
||||
showModal.value = true;
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (
|
||||
"/pages/first-try,/pages/practise,/pages/friend-battle".indexOf(path) !== -1
|
||||
) {
|
||||
if (!device.value.deviceId) {
|
||||
return uni.showToast({
|
||||
title: "请先绑定设备",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
|
||||
Reference in New Issue
Block a user