You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
2.3 KiB
97 lines
2.3 KiB
<template>
|
|
<view class="">
|
|
<view class="news_info shadow_fg" v-if="dataShow">
|
|
<view class="arc_t_pd">
|
|
<view class="news_tit">{{info.title}}</view>
|
|
</view>
|
|
<view class="">
|
|
<text class="new_adr">阅读 {{info.browsenum}}</text>
|
|
<text class="new_adr" @click="dianzan(info.guid)" v-if="zan == true"><image src="../../../static/images/icn_like.png" class="pic_zan"></image>{{info.upnum}} 赞</text>
|
|
<text class="new_adr" v-if="zan == false"><image src="../../../static/images/zan.png" class="pic_zan"></image>{{info.upnum}} 赞</text>
|
|
</view>
|
|
<view class="">
|
|
<view bindtap="showMap" class="">
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="swiper-tab-wrap" v-if="dataShow">
|
|
<view class="line-show-wrap">
|
|
<view class="line-show-item">
|
|
<view class="nr_cot">
|
|
<u-parse :content="info.content" :loading="loading" @preview="preview" @navigate="navigate" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="isShow" style="color: gray;text-align: center;">暂无数据!</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import uParse from '@/components/gaoyia-parse/parse.vue'
|
|
|
|
export default {
|
|
components: {
|
|
uParse
|
|
},
|
|
data() {
|
|
return {
|
|
info: {},
|
|
isShow: false,
|
|
dataShow: true,
|
|
zan:true
|
|
}
|
|
},
|
|
onLoad: function() {
|
|
this.detailInfo();
|
|
},
|
|
methods: {
|
|
detailInfo: function() {
|
|
console.log("进来")
|
|
var data = {
|
|
"pageno": "1",
|
|
"pagesize": "1",
|
|
"sort": "2",
|
|
"region": "1301",
|
|
"type": "2902"
|
|
}
|
|
this.$Request.post(this.$config.messagelist, data).then(res => {
|
|
if (res.status == 200 && res.data.length > 0) {
|
|
this.info = res.data[0];
|
|
this.isShow = false;
|
|
this.dataShow = true;
|
|
this.jilu(res.data[0].guid)
|
|
} else {
|
|
this.isShow = true;
|
|
this.dataShow = false;
|
|
}
|
|
});
|
|
},
|
|
jilu: function(guid){
|
|
var data = {
|
|
guid: guid,
|
|
};
|
|
this.$Request.post(this.$config.jilu, data).then(res => {
|
|
console.log("已阅读")
|
|
});
|
|
},
|
|
dianzan: function(guid){
|
|
var data = {
|
|
guid: guid,
|
|
};
|
|
this.$Request.post(this.$config.dianzan, data).then(res => {
|
|
if(res.status == 200){
|
|
this.zan = false;
|
|
this.info.upnum+=1;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
@import url("/static/css/common.css");
|
|
@import url("lvfadahui.css");
|
|
</style>
|
|
|