Commit d201ca55 authored by agping's avatar agping

feed流修改

parent 78dbd1ef
<template> <template>
<div> <div>
<!--<header-pulic :data="headerData"></header-pulic>-->
<div class="story_con"> <div class="story_con">
<img :src="chengjiaoxibao_pic" class="chengjiaoxibao_di_pic"> <img :src="chengjiaoxibao_pic" class="chengjiaoxibao_di_pic">
<div class="story_conent"> <div class="story_conent">
...@@ -10,7 +9,7 @@ ...@@ -10,7 +9,7 @@
热烈祝贺 热烈祝贺
</span> </span>
<span class="story_font_span1"> <span class="story_font_span1">
{{name}} 同联商业
</span> </span>
<span></span> <span></span>
<div class="story_font2"> <div class="story_font2">
...@@ -20,8 +19,8 @@ ...@@ -20,8 +19,8 @@
</div> </div>
<div class="story_font2"> <div class="story_font2">
<span class="story_font_span3"></span> <span class="story_font_span3">成交</span>
<span class="story_font_span4"></span> <span class="story_font_span4">{{name}}</span>
<span class="story_font_span5">商铺一套!</span> <span class="story_font_span5">商铺一套!</span>
</div> </div>
</div> </div>
...@@ -30,17 +29,17 @@ ...@@ -30,17 +29,17 @@
<span class="ic_star_span">好项目就是这么热销</span> <span class="ic_star_span">好项目就是这么热销</span>
<img :src="ic_star" class="ic_star1"> <img :src="ic_star" class="ic_star1">
<p> <p>
<span class="story_font_span6"></span>,值得你信赖的商铺. <span class="story_font_span6">{{name}}</span>,值得你信赖的商铺.
</p> </p>
<img :src="line_down" class="line_down"> <img :src="line_down" class="line_down">
<img :src="zan" class="zan"> <img :src="zan_clickpic" class="zan" @click="clickZan">
<p style="margin-top:-0.35rem" class="story_font_p"></p> <p style="margin-top:-0.35rem" class="story_font_p">{{num}}</p>
</div> </div>
</div> </div>
</div> </div>
<div class="story_font_img" id="story_font_img"> <div class="story_font_img" id="story_font_img">
<img :src="five" id="zan_1"> <img :src="five" id="zan_1" v-show='zan_pic'>
</div> </div>
</div> </div>
</template> </template>
...@@ -52,26 +51,43 @@ ...@@ -52,26 +51,43 @@
import line_down from '@/components/feed/images/line_down.png'; import line_down from '@/components/feed/images/line_down.png';
import zan from '@/components/feed/images/zan.png'; import zan from '@/components/feed/images/zan.png';
import five from '@/components/feed/images/5555.gif'; import five from '@/components/feed/images/5555.gif';
import zan_1 from '@/components/feed/images/zan_1.gif';
export default { export default {
data: () => ({ data: () => ({
headerData: {
'title': '成交喜报',
'noborder': true,
'isBack': false
},
chengjiaoxibao_pic, chengjiaoxibao_pic,
chengjiaojiandan_pic, chengjiaojiandan_pic,
ic_star, ic_star,
line_down, line_down,
zan, zan,
zan_1,
five, five,
name: '', name: '',
time: '', time: '',
zan_clickpic: zan,
click_num: 1,
num: '',
read_num:1,
zan_pic: false,
feed_id:'',
}), }),
created() { created() {
let _this = this; let _this = this;
_this.feed_id = _this.$route.query.id;
_this.ajaxUl(); _this.ajaxUl();
_this.axios({
method: 'post',
url: '/broker/editFeedClick',
responseType: 'json',
data: {
'id': _this.feed_id,
'click_num': 0,
'read_num': _this.read_num,
}
})
}, },
methods: { methods: {
ajaxUl() { ajaxUl() {
...@@ -81,20 +97,71 @@ ...@@ -81,20 +97,71 @@
url: '/broker/getFeedInfo', url: '/broker/getFeedInfo',
responseType: 'json', responseType: 'json',
data: { data: {
'id': 14, 'id': _this.feed_id,
}
})
.then(function(response) {
if(response.data.code == 200) {
_this.time = response.data.data.create_time;
_this.name = response.data.data.house_title;
_this.num = response.data.data.click_num;
} else {}
})
},
clickZan() {
let _this = this;
if(_this.click_num === 1) {
_this.zan_clickpic = zan_1;
_this.zan_pic = five;
_this.click_num = 0;
_this.axios({
method: 'post',
url: '/broker/editFeedClick',
responseType: 'json',
data: {
'id': _this.feed_id,
'click_num': 1,
} }
}) })
.then(function(response) { .then(function(response) {
if(response.data.code == 200) { if(response.data.code == 200) {
_this.zan_pic = true;
_this.num = _this.num + 1;
setTimeout(function() {
_this.zan_pic = false;
},850);
}
})
.catch(function(error) {});
} else { } else {
_this.zan_clickpic = zan;
_this.click_num = 1;
_this.axios({
method: 'post',
url: '/broker/editFeedClick',
responseType: 'json',
data: {
'id': _this.feed_id,
'click_num': 0,
}
})
.then(function(response) {
if(response.data.code == 200) {
_this.zan_pic = false;
_this.num = _this.num - 1;
} }
}) })
.catch(function(error) {});
} }
}, },
},
} }
</script> </script>
...@@ -152,7 +219,7 @@ ...@@ -152,7 +219,7 @@
.story_font_span3 { .story_font_span3 {
float: left; float: left;
margin-left: 0.2rem; margin-left: 0.6rem;
line-height: 0.88rem; line-height: 0.88rem;
} }
...@@ -250,6 +317,6 @@ ...@@ -250,6 +317,6 @@
#zan_1 { #zan_1 {
width: 4rem; width: 4rem;
height: 6rem; height: 6rem;
display: none; /*display: none;*/
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment