Ver código fonte

fix: 我的公益全部/已取消空状态文本显示undefined

Developer 2 semanas atrás
pai
commit
fcca25d7b8
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      pages/nonprofit.vue

+ 6 - 2
pages/nonprofit.vue

@@ -33,7 +33,7 @@
 	const { proxy } = getCurrentInstance()
 	
 	const tidx = ref('')
-	const text = ref('暂无进行中活动')
+	const text = ref('暂无活动')
 	const queryParams = ref({
 		page: 1,
 		limit: 10,
@@ -45,6 +45,10 @@
 		2:'进行中',
 		3:'已结束'
 	})
+	const tabText = ref({
+		'':'活动',
+		'-1':'已取消活动'
+	})
 	const isOver = ref(false)
 	const list = ref([])
 	
@@ -117,7 +121,7 @@
 	}
 	
 	watch(()=>tidx.value,(newVal)=>{
-		text.value = `暂无${statusCfg.value[newVal]}活动`;
+		text.value = `暂无${statusCfg.value[newVal] || tabText.value[newVal] || ''}活动`;
 	})
 	
 	onShow(()=>{