index.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view class="lli-develop-expect-page">
  3. <button class="lli-btn" @click="quit">退出登录</button>
  4. </view>
  5. </template>
  6. <script setup>
  7. import {
  8. logout
  9. } from '@/api/login.js'
  10. const quitClick = ()=>{
  11. uni.showModal({
  12. title: '提示',
  13. content: '你确定要执行这个操作吗?',
  14. success: (res) => {
  15. if (res.confirm) {
  16. // 用户点击了确定按钮,执行你的操作
  17. console.log('用户点击了确定');
  18. quit()
  19. } else if (res.cancel) {
  20. // 用户点击了取消按钮
  21. console.log('用户点击了取消');
  22. }
  23. }
  24. });
  25. }
  26. const quit = ()=>{
  27. uni.navigateTo({
  28. url: '/pages/login/index'
  29. });
  30. }
  31. // import { ref, onMounted } from 'vue';
  32. //
  33. // const listData = ref([]);
  34. // const page = ref(1);
  35. // const pageSize = ref(10);
  36. // const isLoading = ref(false);
  37. // const noMoreData = ref(false);
  38. //
  39. // // 加载
  40. // const loadData = async () => {
  41. // if (isLoading.value || noMoreData.value) return;
  42. // isLoading.value = true;
  43. // const newData = await fetchData(page.value, pageSize.value); // 假设 fetchData 是你的请求函数
  44. // if (newData.length > 0) {
  45. // listData.value = listData.value.concat(newData);
  46. // page.value++;
  47. // } else {
  48. // noMoreData.value = true;
  49. // }
  50. // isLoading.value = false;
  51. // };
  52. // onMounted(() => {
  53. // loadData();
  54. // });
  55. //
  56. // // 下拉加载更多
  57. // const loadMore = () => {
  58. // loadData();
  59. // };
  60. </script>
  61. <style>
  62. </style>