|
|
- <template>
- <view class="page__view">
-
- <!-- 导航栏 -->
- <navbar :title="details.title" leftClick @leftClick="$utils.navigateBack" bgColor="#FFFFFF" />
-
- <!-- <image class="img" :src="details.details" mode="widthFix"></image> -->
- <uv-parse :content="details.details"></uv-parse>
-
- </view>
- </template>
-
- <script>
- export default {
- data() {
- return {
- details: {},
- }
- },
- onLoad({ api, id, idKey }) {
- this.getData(api, id, idKey)
- },
- methods: {
- async getData(api, id, idKey) {
- try {
- this.details = await this.$fetch(api, { [idKey]: id })
- } catch (err) {
- console.log('err', err)
- }
- },
- },
- }
- </script>
-
- <style scoped lang="scss">
- .page__view {
- background: $uni-bg-color;
- }
-
- .img {
- width: 100vw;
- height: auto;
- }
-
- </style>
|