import { computed } from 'vue';
import browser from '/@/utils/browser';

const isUsingMiniApp = computed(() => {
  const res =
    browser.getURLParam('fromMiniApp').length > 0 &&
    Number(browser.getURLParam('fromMiniApp')) === 1;
  return res;
});

export const useMiniApp = () => {
  return {
    isUsingMiniApp,
  };
};
