123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template>
- <view class="detail">
- <view class="title">{{ item.title }}</view>
- <view class="desc">
- <text class="time">发布于:{{ item.createTime }}</text>
- <button class="fx" open-type="share">
- <text class="icon"></text>
- <text>分享</text>
- </button>
- </view>
- <view class="con">
- <u-divider :dot="true"></u-divider>
- <u-parse :content="item.content"></u-parse>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- item: {}
- };
- },
- onLoad(e) {
- this.http.request({
- url: '/app/knowledge/detail/' + e.id,
- success: (res) => {
- this.item = res.data.data;
- this.item.content = res.data.data.content.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
- }
- });
- },
- methods: {},
- //分享
- onShareAppMessage: function (res) {
- return {
- title: this.item.title,
- path: '/pages/knowledge/detail?id=' + this.item.id,
- success: (res) => {},
- fail: (res) => {}
- };
- }
- };
- </script>
- <style lang="scss">
- page {
- background-color: white;
- }
- </style>
|