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