app/pages/tabbar/im/details/index.vue
2025-04-09 17:36:48 +08:00

50 lines
928 B
Vue

<template>
<div class="conent">
<div class="marng">
{{ item.title }}
</div>
<div class="cen">
{{ item.content }}
</div>
</div>
</template>
<script>
export default {
data() {
return {
// 定义一个变量来存储接收到的信息
item: {},
};
},
onLoad(options) {
// 解码并解析传递过来的 JSON 字符串
const item = JSON.parse(decodeURIComponent(options.item));
console.log("接收到的信息:", item);
this.item = item;
// 可以在这里使用接收到的信息进行后续操作
},
methods: {},
};
</script>
<style lang="scss" scoped>
.conent {
padding: 16px;
border: 1px solid #e0e0e0;
border-radius: 8px;
background-color: #f9f9f9;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.marng {
font-size: 18px;
font-weight: bold;
color: #333;
margin-bottom: 8px;
}
.cen {
font-size: 16px;
color: #666;
}
</style>