老白干小程序
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.
 
 
 
 

190 lines
4.4 KiB

<template>
<view class="mt_1">
<!-- <swiper :autoplay="autoplay" class="lh-swiper" :duration="duration" :indicator-dots="indicatorDots" :interval="interval">
<swiper-item v-for="(item,index) in imgList" :key="index">
<image class="slide-image" height="187" :src="item" width="375"></image>
</swiper-item>
</swiper> -->
<view class="news_info shadow_fg">
<view class="arc_t_pd">
<view class="news_tit">{{info.title}}</view>
</view>
<view>
<view class="dly_flex zxun_tit">
<view class="half_unit" >
<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="lis_time half_unit">{{info.createtime}}</view>
</view>
<view class="">
<view bindtap="showMap" class="">
<!-- <view class="pic">
<image src="../../../static/images/list-icon1.png" style="width:30rpx;height:37rpx;"></image>
</view> -->
<!-- <view ><text class="new_adr">{{info.address}}</text></view> -->
<!-- <view class="more"></view> -->
</view>
<!--<view class="info-list">
<view class="pic">
<image src="../../../static/images/list-icon6.png" style="width:30rpx;height:37rpx;"></image>
</view>
<view>
<text class="address">参与时间:</text>
<text class="txt">{{info.jointime}}</text>
</view>
</view>-->
<!--<view class="info-list">
<view class="pic">
<image src="../../../static/images/list-icon6.png" style="width:30rpx;height:37rpx;"></image>
</view>
<view>
<text class="address">举办单位:</text>
<text class="txt">{{info.holdcompany}}</text>
</view>
</view>-->
</view>
</view>
</view>
<view class="swiper-tab-wrap">
<view class="line-show-wrap">
<view class="line-show-item">
<!-- <view class="item-title">概况</view> -->
<view class="nr_cot">
<u-parse :content="info.content" />
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import uParse from '@/components/gaoyia-parse/parse.vue'
export default {
components: {
uParse
},
data() {
return {
priceSymbol: "",
indicatorDots: false,
autoplay: true,
interval: 3000,
duration: 500,
info: {},
imgList: [],
zan: true,
netType:true
}
},
onLoad: function(options) {
var that = this;
this.$util.getNetworkType(
function(res){
if(res.networkType === 'none'){
uni.showToast({
title:that.$param.netMsg,
icon:"none",
duration:2000
})
that.netType = false;
}
},function(){
uni.showToast({
title:that.$param.netMsg,
icon:"none",
duration:2000
})
that.netType = false;
}
)
if(!that.netType){
return;
}
this.$util.hideLoadingByTime();
this.detailInfo(options.id);
this.jilu(options.id);
that.$util.saveOperatorLog(that,"ZIXUN",options.id);
},
methods: {
detailInfo: function(id) {
var that = this;
var data = {
"userkey":this.$param.userkey,
"type":this.$param.zixunType,
"guid":id
}
this.$Request.post(this.$config.getMessgeInfoDetailFormId, data).then(res => {
if(!that.$util.isSuccess(res)){
return;
}
this.info = res.data;
var imgList = res.data.imagelist;
if (imgList != null) {
for (var i = 0; i < imgList.length; i++) {
imgList[i] = "" + this.$config.ROOTPATH + imgList[i];
}
}
this.imgList = imgList;
})
},
jilu: function(id) {
var that = this;
var data = {
guid: id,
browsenum:"1"
};
this.$Request.post(this.$config.updateMessageInfoUBFeildFormId, data).then(res => {
if(that.$util.isSuccess(res)){
console.log("已阅读");
}
});
},
dianzan: function(guid) {
var that = this;
var data = {
guid: guid,
upnum:"1"
};
this.$Request.post(this.$config.updateMessageInfoUBFeildFormId, data).then(res => {
if(that.$util.isSuccess(res)){
this.zan = false;
this.info.upnum+=1;
}
});
}
}
}
</script>
<style>
@import url("/static/css/common.css");
@import url("zixundetail.css");
</style>