import Apis from '@/common/apis/index' export default { login() { try { uni.showModal({ title: '提示', content: '确定退出登录吗?', async success(res) { if (res.confirm) { console.log('用户点击确定'); uni.showLoading({ title: '退出中...' }); const res = await Apis.PostLogout() uni.hideLoading(); uni.clearStorageSync() uni.switchTab({ url: '../my/index' }) } else if (res.cancel) { console.log('用户点击取消'); } } }); } catch (error) { console.log(error) } }, }