|
@@ -0,0 +1,45 @@
|
|
|
|
+<template>
|
|
|
|
+ <view class="detail">
|
|
|
|
+ <uv-parse :content="content" :preview-img="false" />
|
|
|
|
+ </view>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { detail } from '@/api/devices'
|
|
|
|
+export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ content: ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onLoad(e) {
|
|
|
|
+ this.getDetail(e)
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ getDetail(e) {
|
|
|
|
+ detail(e).then(res => {
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
+ this.content = res.data.data.content
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.data.message,
|
|
|
|
+ icon: 'error',
|
|
|
|
+ mask: true,
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.detail {
|
|
|
|
+ white-space: pre-wrap;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+::v-deep img {
|
|
|
|
+ display: block;
|
|
|
|
+}
|
|
|
|
+</style>
|