63 lines
1.3 KiB
Vue
63 lines
1.3 KiB
Vue
<template>
|
|
<view class="content">
|
|
<u-parse :content="content"></u-parse>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
mapState
|
|
} from "vuex";
|
|
import uParse from '@/uni_modules/u-parse/u-parse.vue'
|
|
export default {
|
|
data() {
|
|
return {
|
|
content: ""
|
|
}
|
|
},
|
|
components: {
|
|
uParse
|
|
},
|
|
computed: {
|
|
...mapState(["HomeContent"]),
|
|
},
|
|
onLoad(option) {
|
|
console.log("content", option)
|
|
let that = this
|
|
this.content = option.content == 1 ? this.HomeContent.privacydesc : this.HomeContent.appdesc
|
|
},
|
|
onShareAppMessage() {
|
|
let that = this
|
|
return {
|
|
title: that.content.title,
|
|
path: '/pageTwo/index/detail?content=' + that.content,
|
|
imageUrl: that.content.headimg,
|
|
success: function(res) {
|
|
console.log("分享到朋友成功")
|
|
},
|
|
fail: function(res) {
|
|
console.log("分享到朋友失败")
|
|
},
|
|
}
|
|
},
|
|
onShareTimeline() {
|
|
let that = this
|
|
return {
|
|
title: that.content.title,
|
|
query: 'content=' + that.content,
|
|
imageUrl: that.content.headimg,
|
|
success: function(res) {
|
|
console.log("分享到朋友圈成功")
|
|
},
|
|
fail: function(res) {
|
|
console.log("分享到朋友圈失败")
|
|
},
|
|
}
|
|
},
|
|
methods: {}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
@import url("@/uni_modules/u-parse/u-parse.css");
|
|
</style> |