优化:点击我的工单-有就直接未解决tab

This commit is contained in:
Zy
2026-08-17 09:50:59 +08:00
parent 10bbc8a782
commit 0a835ecc41
2 changed files with 23 additions and 9 deletions

View File

@@ -80,7 +80,7 @@
<script setup> <script setup>
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import { onReady, onShow } from '@dcloudio/uni-app' import { onReady, onShow, onLoad } from '@dcloudio/uni-app'
import TabsComponents from '@/components/tabs/tabs.vue' import TabsComponents from '@/components/tabs/tabs.vue'
import NavBar from '@/components/navbar/navbar.vue' import NavBar from '@/components/navbar/navbar.vue'
import { getUserTicketlist } from '@/api/ticket.js' import { getUserTicketlist } from '@/api/ticket.js'
@@ -120,6 +120,17 @@ function scrolltolower() {
queryParmas.value.pageNum += 1 queryParmas.value.pageNum += 1
getlist() getlist()
} }
onLoad(data => {
if (data.MyOrderNum === '0') {
activeStatus.value = 0
queryParmas.value.problemStatus = undefined
} else {
activeStatus.value = 1
queryParmas.value.problemStatus = 1
}
})
function getlist() { function getlist() {
if (isLoading.value || !hasMore.value) return if (isLoading.value || !hasMore.value) return
isLoading.value = true isLoading.value = true

View File

@@ -186,7 +186,7 @@ const goToTicketHall = () => {
// 我的工单 // 我的工单
const goToMyTicket = () => { const goToMyTicket = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pageSubPack/ticket/myticket' url: '/pageSubPack/ticket/myticket?MyOrderNum=' + MyOrderNum.value
}) })
} }
// 跳转到 今日巡检 // 跳转到 今日巡检
@@ -373,10 +373,13 @@ function getbannarData(forceRefresh = false) {
bannerList.value = newData bannerList.value = newData
} }
// 写入缓存 // 写入缓存
uni.setStorageSync(BANNER_CACHE_KEY, JSON.stringify({ uni.setStorageSync(
BANNER_CACHE_KEY,
JSON.stringify({
data: newData, data: newData,
time: Date.now() time: Date.now()
})) })
)
} else { } else {
bannerList.value = [] bannerList.value = []
} }