import { ref, onMounted } from "vue";
|
import { onLoad } from "@dcloudio/uni-app";
|
|
export function useHomeButton() {
|
const showHomeButton = ref(false);
|
|
const checkAutoLogin = (options) => {
|
console.log(options,'332');
|
if (options.sso) {
|
|
showHomeButton.value = true;
|
}
|
// 也可以检查自定义标记
|
if (options.from === "autoLogin") {
|
showHomeButton.value = true;
|
}
|
};
|
|
const goHome = () => {
|
uni.switchTab({ url: "/pages/index/index" });
|
};
|
|
return { showHomeButton, checkAutoLogin, goHome };
|
}
|