wupengfei
8 小时以前 47047d626ea8fab28c04e6534fe6ffa3dc61de69
apps/cMiniApp/src/stores/modules/system.ts
@@ -1,6 +1,7 @@
import Taro from '@tarojs/taro';
import { defineStore } from 'pinia';
import { store } from '@/stores';
import * as settingsServices from '@12333/services/apiV2/settings';
export interface Options {
  path: string;
@@ -17,6 +18,7 @@
  redirectPath: string;
  isTabSwitch: boolean;
  isFirstEnter: boolean;
  isWeappCheck: boolean;
}
export const useSystemStore = defineStore({
@@ -51,9 +53,18 @@
    menuButtonTop: 0,
    isFirstEnter: true,
    isWeappCheck: true,
  }),
  actions: {
    async getAppConfig() {
      try {
        let res = await settingsServices.getWxmpSettings({});
        this.isWeappCheck = res.wxmpAuditInProcess;
      } catch (error) {}
    },
    init(options: Options) {
      this.options = options; // 放一下页面相关的数据例如scene等 页面高度之类的不存!
    },