hookehuyr

fix: 在页面显示时重新获取反馈列表数据

1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-07-18 16:11:04 4 + * @LastEditTime: 2025-07-18 16:27:29
5 * @FilePath: /jgdl/src/pages/feedBackList/index.vue 5 * @FilePath: /jgdl/src/pages/feedBackList/index.vue
6 * @Description: 意见反馈列表页面 6 * @Description: 意见反馈列表页面
7 --> 7 -->
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
108 108
109 <script setup> 109 <script setup>
110 import { ref, computed, onMounted } from 'vue' 110 import { ref, computed, onMounted } from 'vue'
111 -import Taro from '@tarojs/taro' 111 +import Taro, { useDidShow } from '@tarojs/taro'
112 import { Toast } from '@nutui/nutui-taro' 112 import { Toast } from '@nutui/nutui-taro'
113 import './index.less' 113 import './index.less'
114 // 导入接口 114 // 导入接口
...@@ -302,6 +302,14 @@ const goToFeedback = () => { ...@@ -302,6 +302,14 @@ const goToFeedback = () => {
302 onMounted(() => { 302 onMounted(() => {
303 getFeedbackList(true) 303 getFeedbackList(true)
304 }) 304 })
305 +
306 +// 页面onShow时获取数据
307 +useDidShow(() => {
308 + // 如果不是首次加载,重新获取数据
309 + if (feedbackList.value.length) {
310 + getFeedbackList(true)
311 + }
312 +})
305 </script> 313 </script>
306 314
307 <script> 315 <script>
......