|
@@ -94,6 +94,7 @@
|
|
|
import { fetchContact } from "@/api";
|
|
import { fetchContact } from "@/api";
|
|
|
import { fetchProfile } from "@/api/user";
|
|
import { fetchProfile } from "@/api/user";
|
|
|
import { login } from "@/api/auth";
|
|
import { login } from "@/api/auth";
|
|
|
|
|
+import { fetchToken } from "@/api/auth";
|
|
|
import { onLoad, onShow } from "@dcloudio/uni-app";
|
|
import { onLoad, onShow } from "@dcloudio/uni-app";
|
|
|
import { ref } from "vue";
|
|
import { ref } from "vue";
|
|
|
const containerStyle = ref({});
|
|
const containerStyle = ref({});
|
|
@@ -187,6 +188,9 @@ onLoad(() => {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
onShow(() => {
|
|
onShow(() => {
|
|
|
|
|
+ if (!getApp<any>().globalData.token) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
fetchProfile().then((res) => {
|
|
fetchProfile().then((res) => {
|
|
|
res.mobilePhoneFormat =
|
|
res.mobilePhoneFormat =
|
|
|
res.mobilePhone.slice(0, 3) + "****" + res.mobilePhone.slice(7);
|
|
res.mobilePhone.slice(0, 3) + "****" + res.mobilePhone.slice(7);
|