<template>
|
|
<view class="home-pages">
|
|
<view class="context">
|
|
<text>名称:{{order.name}}</text>
|
|
</view>
|
|
<view class="context">
|
|
<text>版本:{{order.type}}</text>
|
|
</view>
|
|
<view class="context">
|
|
<text>内容:{{order.content}}</text>
|
|
</view>
|
|
<view class="context">
|
|
<text>原价:{{order.oldPrice}}</text>
|
|
</view>
|
|
<view class="context">
|
|
<text>现价:{{order.price}}</text>
|
|
</view>
|
|
<view class="context">
|
|
|
|
<rich-text :nodes="order.details"></rich-text>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
order:{}
|
|
}
|
|
},
|
|
methods: {
|
|
getById(id){
|
|
this.$api('getKwById', {'id':id}).then(res => {
|
|
if(res.code == 200){
|
|
this.order =res.result;
|
|
}
|
|
})
|
|
}
|
|
},
|
|
onLoad(optons) {
|
|
console.log("optons.id"+optons.id)
|
|
this.getById(optons.id)
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.home-pages {
|
|
padding: 28rpx 29rpx 0;
|
|
min-height: 80vh;
|
|
background-color: #F7F7F7;
|
|
}
|
|
.context {
|
|
padding: 20rpx;
|
|
background-color: #FFF;
|
|
}
|
|
</style>
|