Ver código fonte

实习报告

lifanagju_citu 2 meses atrás
pai
commit
cac14bf0e4

+ 1 - 1
pagesA/student/addReport.vue

@@ -72,7 +72,7 @@ const submit = async () => {
       uni.navigateBack({
         delta: 1
       })
-    }, 1000)
+    }, 500)
   } catch (err) {
     uni.showToast({ title: err?.msg || '保存失败', icon: 'none' })
   }

+ 4 - 1
pagesA/student/internshipReport.vue

@@ -46,9 +46,9 @@ const getCompanyList = async () => {
 
 // 实习报告列表
 const getList = async () => {
-	items.value = []
 	try {
 		const { data } = await getStudentReportList(enterpriseId.value ? { enterpriseId: enterpriseId.value } : {})
+    items.value = []
 		if (!data || !Object.keys(data).length) return
 		for (let item in data) {
 			items.value.push({ date: item, arr: data[item].map(e => e.url) })
@@ -57,10 +57,13 @@ const getList = async () => {
 }
 
 onShow(() => {
+  console.log('onShow:', 789)
   getCompanyList()
+  getList()
 })
 
 onLoad((options) => {
+  console.log('onLoad:', 789)
   if (options.enterpriseId) {
     enterpriseId.value = options.enterpriseId
   }