123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <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 = ()=>{
- uni.navigateTo({
- url: '/pages/login'
- });
- /* 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([]);
- // const page = ref(1);
- // const pageSize = ref(10);
- // const isLoading = ref(false);
- // const noMoreData = ref(false);
- //
- // // 加载
- // const loadData = async () => {
- // if (isLoading.value || noMoreData.value) return;
- // isLoading.value = true;
- // const newData = await fetchData(page.value, pageSize.value); // 假设 fetchData 是你的请求函数
- // if (newData.length > 0) {
- // listData.value = listData.value.concat(newData);
- // page.value++;
- // } else {
- // noMoreData.value = true;
- // }
- // isLoading.value = false;
- // };
- // onMounted(() => {
- // loadData();
- // });
- //
- // // 下拉加载更多
- // const loadMore = () => {
- // loadData();
- // };
- </script>
- <style>
- </style>
|