fix:页面修改为VUE3模式。
This commit is contained in:
@@ -1,38 +1,39 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<!-- <uni-navbar title="心路历程详情"></uni-navbar> -->
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="心路历程详情"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ detailInfo.name }}</view>
|
||||
<!-- <uni-cellItem title="标题:" :value="detailInfo.name"></uni-cellItem>
|
||||
<!-- <view class="section-title">{{ detailInfo.name }}</view> -->
|
||||
<uni-cellItem title="标题:" :value="detailInfo.name"></uni-cellItem>
|
||||
<uni-cellItem title="记录时间:" :value="detailInfo.createTime"></uni-cellItem>
|
||||
<uni-cellItem title="内容:"></uni-cellItem> -->
|
||||
<uni-cellItem title="内容:"></uni-cellItem>
|
||||
<view class="content">{{ detailInfo.remark }}</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script setup>
|
||||
import { getHeartJourney} from '@/api/invest/heartJourney'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
detailInfo: {},
|
||||
id: '',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
getInfo() {
|
||||
getHeartJourney(this.id).then(res => {
|
||||
this.detailInfo = res.data
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const id = ref('')
|
||||
const data = reactive({
|
||||
detailInfo: {}
|
||||
})
|
||||
const {detailInfo} = toRefs(data)
|
||||
onLoad((option) => {
|
||||
id.value = option.id
|
||||
getInfo()
|
||||
})
|
||||
function getInfo() {
|
||||
getHeartJourney(id.value).then(res => {
|
||||
detailInfo.value = res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user