| 123456789101112131415161718192021222324252627282930 |
- 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)
- }
- },
- }
|