123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <template>
- <view class="lli-develop-expect-page">
- <button class="lli-btn" @click="quitClick">退出登录</button>
- <CustomTabBar></CustomTabBar>
- </view>
- </template>
- <script setup>
- import {
- logout
- } from '@/api/login.js'
- import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
- import { getCurrentInstance } from 'vue';
- import {
- onLoad,
- } from '@dcloudio/uni-app';
- const quitClick = ()=>{
- uni.showModal({
- title: '提示',
- content: '你确定要执行这个操作吗?',
- success: (res) => {
- if (res.confirm) {
- quit();
- } else if (res.cancel) {
- // 用户点击了取消按钮
- console.log('用户点击了取消');
- }
- }
- });
-
- }
- const quit = ()=>{
- uni.navigateTo({
- url: '/pages/login/index'
- });
-
- }
- onLoad((options) => {
- const instance = getCurrentInstance();
- console.log(instance.appContext.config.globalProperties)
- })
- // 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>
|