xiaoxin 1 rok temu
rodzic
commit
d7f0254914

+ 4 - 2
components/listView.vue

@@ -24,17 +24,19 @@ onLoad(() => {})
 const goPage = (item) => {
 	// console.log(item)
 
+	let msg = encodeURIComponent(JSON.stringify(item))
+
 	if (props.appType == '学生轨迹') {
 		uni.navigateTo({
 			url: `/pages/track/track?id=${item.id}`
 		})
 	} else if (props.appType == '社交亲密度') {
 		uni.navigateTo({
-			url: `/pages/intimacy/intimacy?msg=${JSON.stringify(item)}`
+			url: `/pages/intimacy/intimacy?msg=${msg}`
 		})
 	} else {
 		uni.navigateTo({
-			url: `/pages/student/student?msg=${JSON.stringify(item)}`
+			url: `/pages/student/student?msg=${msg}`
 		})
 	}
 }

+ 1 - 1
pages/intimacy/intimacy.vue

@@ -66,7 +66,7 @@ const datetimerangeValue = ref()
 const dataList = ref([])
 
 onLoad((options) => {
-	msg.value = JSON.parse(options.msg)
+	msg.value = JSON.parse(decodeURIComponent(options.msg))
 
 	// 获取前一天的时间
 	let temData = Date.now() - 1000 * 60 * 60 * 24

+ 1 - 1
pages/student/student.vue

@@ -49,7 +49,7 @@ import { previewImage } from '@/utils/previewImage.js'
 import NoData from '@/components/noData.vue'
 
 onLoad((options) => {
-	msg.value = JSON.parse(options.msg)
+	msg.value = JSON.parse(decodeURIComponent(options.msg))
 
 	uni.setNavigationBarTitle({
 		title: msg.value.name || msg.value.student?.name