46 lines
694 B
Vue
46 lines
694 B
Vue
![]() |
<template>
|
||
|
<view class="contont">
|
||
|
<view v-html="content"></view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import headers from '../../components/header/headers.vue'
|
||
|
import request from '../../utils/request.js'
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
id: null,
|
||
|
content: null
|
||
|
}
|
||
|
},
|
||
|
onLoad(option) {
|
||
|
this.id = option.id
|
||
|
},
|
||
|
onShow() {
|
||
|
this.getDetail()
|
||
|
},
|
||
|
methods: {
|
||
|
getDetail() {
|
||
|
request({
|
||
|
url: 'app/Headlines/one?id=' + this.id,
|
||
|
method: 'get'
|
||
|
}).then(res => {
|
||
|
this.content = res.data.content
|
||
|
|
||
|
})
|
||
|
},
|
||
|
goback() {
|
||
|
uni.navigateBack()
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
.contont {
|
||
|
box-sizing: border-box;
|
||
|
padding: 10px;
|
||
|
}
|
||
|
</style>
|