This commit is contained in:
@@ -66,6 +66,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
|
import { onHide, onShow, onUnload } from '@dcloudio/uni-app';
|
||||||
import { authApi, wechatApi } from '@/api/index.js';
|
import { authApi, wechatApi } from '@/api/index.js';
|
||||||
import { useUserStore } from '@/store/index.js';
|
import { useUserStore } from '@/store/index.js';
|
||||||
import { initWxConfig, wxScan, isInWechat } from '@/utils/wxsdk.js';
|
import { initWxConfig, wxScan, isInWechat } from '@/utils/wxsdk.js';
|
||||||
@@ -80,6 +81,10 @@
|
|||||||
const showError = ref(false);
|
const showError = ref(false);
|
||||||
const wechatAppId = ref('');
|
const wechatAppId = ref('');
|
||||||
|
|
||||||
|
const resetLoadingState = () => {
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
if (token) {
|
if (token) {
|
||||||
@@ -104,6 +109,18 @@
|
|||||||
// #endif
|
// #endif
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
resetLoadingState();
|
||||||
|
});
|
||||||
|
|
||||||
|
onHide(() => {
|
||||||
|
resetLoadingState();
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnload(() => {
|
||||||
|
resetLoadingState();
|
||||||
|
});
|
||||||
|
|
||||||
const showPostBindReloginNotice = () => {
|
const showPostBindReloginNotice = () => {
|
||||||
if (uni.getStorageSync(POST_BIND_RELOGIN_NOTICE_KEY) !== '1') {
|
if (uni.getStorageSync(POST_BIND_RELOGIN_NOTICE_KEY) !== '1') {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export const BASE_URL = 'https://cmp-api.boss160.cn';
|
export const BASE_URL = 'https://cmp-api.xm-iot.cn';
|
||||||
|
|
||||||
export const APP_TYPE = 'official_account';
|
export const APP_TYPE = 'official_account';
|
||||||
|
|||||||
Reference in New Issue
Block a user