WXL
11 小时以前 05c363fdd7ab04e3bd9a753e2c5d5bfff04d681c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 };
}