|
@@ -1,10 +1,47 @@
|
|
|
<template>
|
|
|
<view class="lli-develop-expect-page">
|
|
|
- 开发中,敬请期侍!
|
|
|
+ <button class="lli-btn" @click="quit">退出登录</button>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+ import {
|
|
|
+ logout
|
|
|
+ } from '@/api/login.js'
|
|
|
+
|
|
|
+
|
|
|
+ const quitClick = ()=>{
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '你确定要执行这个操作吗?',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ // 用户点击了确定按钮,执行你的操作
|
|
|
+ console.log('用户点击了确定');
|
|
|
+ quit()
|
|
|
+ } else if (res.cancel) {
|
|
|
+ // 用户点击了取消按钮
|
|
|
+ console.log('用户点击了取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ const quit = ()=>{
|
|
|
+ logout().then(res=>{
|
|
|
+ uni.removeStorage({
|
|
|
+ key: 'Mta-Auth',
|
|
|
+ success: function (res) {
|
|
|
+ console.log('success');
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
// import { ref, onMounted } from 'vue';
|
|
|
//
|
|
|
// const listData = ref([]);
|