|
|
@@ -77,17 +77,14 @@ const toOrderFood = () => {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-// 接口由 App.vue 统一调用;App.vue 在 inDining 为 true 且未登录时会重定向到本页并带 inDining=1,此时需弹出登录
|
|
|
+// 页面加载时仅同步参数到 storage,不自动弹出登录框;未登录时只能在点击「确定」时弹出登录框
|
|
|
onLoad((options) => {
|
|
|
- const inDining = options?.inDining === '1' || options?.inDining === 1;
|
|
|
const tableid = options?.tableid || uni.getStorageSync('currentTableId') || '';
|
|
|
const dinersVal = options?.diners || uni.getStorageSync('currentDiners') || 1;
|
|
|
- const token = userStore.getToken || uni.getStorageSync(TOKEN) || '';
|
|
|
- if (inDining && tableid && !token) {
|
|
|
- uni.setStorageSync('currentTableId', tableid);
|
|
|
+ if (tableid) uni.setStorageSync('currentTableId', tableid);
|
|
|
+ if (dinersVal) {
|
|
|
uni.setStorageSync('currentDiners', dinersVal);
|
|
|
- pendingNavigate.value = { tableid, dinersVal };
|
|
|
- showLoginModal.value = true;
|
|
|
+ currentDiners.value = Number(dinersVal) || 1;
|
|
|
}
|
|
|
});
|
|
|
</script>
|