|
@@ -164,9 +164,9 @@ api.reportVisit(Number(route.query.idx)).then((res) => {
|
|
})
|
|
})
|
|
|
|
|
|
const likeCount = ref(null)
|
|
const likeCount = ref(null)
|
|
-// api.getLikeCount(route.query.idx - 1).then((res) => {
|
|
|
|
-// likeCount.value = res
|
|
|
|
-// })
|
|
|
|
|
|
+api.getLikeCount(route.query.idx).then((res) => {
|
|
|
|
+ likeCount.value = res
|
|
|
|
+})
|
|
const hasLiked = computed(() => {
|
|
const hasLiked = computed(() => {
|
|
return likeRecord.value[route.query.idx - 1]
|
|
return likeRecord.value[route.query.idx - 1]
|
|
})
|
|
})
|
|
@@ -175,7 +175,8 @@ function onClickLike(e) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
likeRecord.value[route.query.idx - 1] = true
|
|
likeRecord.value[route.query.idx - 1] = true
|
|
- api.like(route.query.idx - 1)
|
|
|
|
|
|
+ api.like(route.query.idx)
|
|
|
|
+ likeCount.value++ // 从接口拿到的数据不会立刻变化
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
utils.animateCSS(e.target, 'heartBeat')
|
|
utils.animateCSS(e.target, 'heartBeat')
|
|
}, 100)
|
|
}, 100)
|
|
@@ -313,14 +314,14 @@ function onGroupUlWheel(e) {
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
>ul.group-list{
|
|
>ul.group-list{
|
|
- width: 100%;
|
|
|
|
padding-left: calc(19 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
padding-left: calc(19 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
- padding-right: calc(180 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
|
+ margin-right: calc(170 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
padding-bottom: calc(5 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
padding-bottom: calc(5 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
overflow: auto;
|
|
overflow: auto;
|
|
- &::-webkit-scrollbar { height: 0; };
|
|
|
|
|
|
+ &::-webkit-scrollbar { background: #fbf0d8; width: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')); height: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')); } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
|
|
|
|
+ &::-webkit-scrollbar-thumb { background: rgba(215, 173, 13, 1); border-radius: calc(2 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')); }
|
|
>li{
|
|
>li{
|
|
flex: 0 0 auto;
|
|
flex: 0 0 auto;
|
|
display: flex;
|
|
display: flex;
|