wupengfei
2 天以前 e9b63ce57c9cfdcda6c205f0a1de8a6aff4d99cd
1
2
3
4
5
6
7
8
9
10
11
12
13
import Taro from '@tarojs/taro';
import { useUserStoreWithOut } from '@/stores/modules/user';
 
export function useLaunchOptions() {
  const options = Taro.getLaunchOptionsSync();
  const userStore = useUserStoreWithOut();
  console.log('userStore: ', userStore);
  if (userStore.firstLaunch) {
    userStore.setFirstLaunch(false);
    return options;
  }
  return {} as Taro.getLaunchOptionsSync.LaunchOptions;
}