|
@@ -37,12 +37,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+ import cacheManager from '@/utils/cacheManager.js';
|
|
|
import {logout} from '@/api/login.js'
|
|
|
import {myInfo} from '@/api/my.js'
|
|
|
import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
|
|
|
import {getCurrentInstance} from 'vue';
|
|
|
import {onLoad} from '@dcloudio/uni-app';
|
|
|
- import {getAuth} from '@/utils/auth.js';
|
|
|
import {reactive,ref} from "vue";
|
|
|
import { toast } from "../../utils/common";
|
|
|
import exitDialog from './exitDialog.vue'
|
|
@@ -61,14 +61,9 @@
|
|
|
}
|
|
|
|
|
|
const exitBtn = () => {
|
|
|
- uni.removeStorage({
|
|
|
- key: 'Mta-Auth',
|
|
|
- success: function(res) {
|
|
|
- console.log('success');
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/login/index'
|
|
|
- });
|
|
|
- }
|
|
|
+ cacheManager.clearAll();
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login/index'
|
|
|
});
|
|
|
|
|
|
}
|
|
@@ -127,7 +122,8 @@
|
|
|
|
|
|
// 判断是否登陆
|
|
|
function myGetAuth(){
|
|
|
- if (getAuth()) {
|
|
|
+ let LocalStorage = cacheManager.get('auth');
|
|
|
+ if (LocalStorage) {
|
|
|
// 已登录
|
|
|
loginFlag.value = true;
|
|
|
console.log(loginFlag.value,'已登录');
|