From b178eb54f136b85f15749130f4a7bb2e7dcb1912 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Wed, 19 Jul 2023 13:30:15 +0800 Subject: [PATCH] feat: getLaunchOptionsSync --- .../get-launch-options-sync.uvue | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/pages/API/get-launch-options-sync/get-launch-options-sync.uvue b/pages/API/get-launch-options-sync/get-launch-options-sync.uvue index 8e564834..5c8af357 100644 --- a/pages/API/get-launch-options-sync/get-launch-options-sync.uvue +++ b/pages/API/get-launch-options-sync/get-launch-options-sync.uvue @@ -1,27 +1,30 @@ \ No newline at end of file +export default { + data() { + return { + checked: false, + homePagePath: '/pages/tabBar/component', + launchOptionsPath: '', + } + }, + methods: { + getLaunchOptionsSync: function () { + const launchOptions = uni.getLaunchOptionsSync() + this.launchOptionsPath = launchOptions.path + if (launchOptions.path == this.homePagePath) { + this.checked = true + } + }, + }, +} + -- GitLab