Commit 845a5947 authored by 罗林杰's avatar 罗林杰

增加阅读量增加

parent 011ae1c6
...@@ -83,6 +83,8 @@ ...@@ -83,6 +83,8 @@
params: { params: {
businessId: id businessId: id
} }
}).then((res) => {
this.$u.put('/cmsnews/miniProgram/read/'+id)
}) })
} }
}, },
......
...@@ -89,6 +89,8 @@ ...@@ -89,6 +89,8 @@
params: { params: {
businessId: id businessId: id
} }
}).then((res) => {
this.$u.put('/cmsvideo/miniProgram/read/'+id)
}) })
} }
}, },
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<view class="cardtitle" @click="toDetail(item.businessId)"> <view class="cardtitle" @click="toDetail(item.businessId)">
<view class="cardtitle1">{{item.title}}</view> <view class="cardtitle1">{{item.title}}</view>
<view class="cardtitle2">{{item.details.replace(/<[^>]*>/g, '')}}</view> <view class="cardtitle2">{{item.details.replace(/<[^>]*>/g, '')}}</view>
<view class="cardtitle2">总推广量:{{item.readNum || '-'}}</view> <view class="cardtitle2">总推广量:{{formatReadNum(item)}}</view>
<!-- <view class="cardtitle3">{{formatPrice(item.price)}}</view>--> <!-- <view class="cardtitle3">{{formatPrice(item.price)}}</view>-->
</view> </view>
</view> </view>
...@@ -270,8 +270,13 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue"; ...@@ -270,8 +270,13 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
this.$u.put('/cmsvideo/miniProgram/read/'+id) this.$u.put('/cmsvideo/miniProgram/read/'+id)
}) })
} }
},
formatReadNum(item){
if(item.readCount || item.readNum){
return item.readNum + item.readCount
}else {
return '-'
}
} }
}, },
// 触底事件 - 上拉加载 // 触底事件 - 上拉加载
......
...@@ -140,6 +140,8 @@ ...@@ -140,6 +140,8 @@
params: { params: {
businessId: id businessId: id
} }
}).then((res) => {
this.$u.put('/cmsnews/miniProgram/read/'+id)
}) })
} else if (this.curNow === 1){ } else if (this.curNow === 1){
this.$u.route({ this.$u.route({
...@@ -147,6 +149,8 @@ ...@@ -147,6 +149,8 @@
params: { params: {
businessId: id businessId: id
} }
}).then((res) => {
this.$u.put('/cmsvideo/miniProgram/read/'+id)
}) })
} }
......
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