Merge remote-tracking branch 'origin/main' into main

main
26947 2024-06-08 18:05:46 +08:00
commit afc161733b
3 changed files with 28 additions and 20 deletions

View File

@ -8,7 +8,7 @@
<!-- 头像 --> <!-- 头像 -->
<div class="avatar-container"> <div class="avatar-container">
<u-avatar class="avatar-1" size="84rpx" :src="postValue.avatar"></u-avatar> <u-avatar class="avatar-1" size="84rpx" :src="postValue.avatar"></u-avatar>
<image v-if="postValue.isOfficial" class="official-1" src="../static/images/icon/tu3-6.png"></image> <image v-if="postValue.isOfficial" class="official-1" src="../../../static/images/icon/tu3-6.png"></image>
</div> </div>
<!-- 用户名 --> <!-- 用户名 -->
<view class="center-content-post-head-title"> <view class="center-content-post-head-title">
@ -54,38 +54,38 @@
<!-- 靠左对齐 --> <!-- 靠左对齐 -->
<view class=""> <view class="">
<view class="p-item"> <view class="p-item">
<image style="width: 40rpx; height: 40rpx;" src="../static/images/icon/tu2-9.png" mode=""></image> <image style="width: 40rpx; height: 40rpx;" src="../../../static/images/icon/tu2-9.png" mode=""></image>
<text class="count">{{ postValue.transmitCount }}</text> <text class="count">{{ postValue.transmitCount }}</text>
</view> </view>
</view> </view>
<!-- 靠右对齐 --> <!-- 靠右对齐 -->
<view class="flex alignCenter"> <view class="flex alignCenter">
<view v-if="postValue.isLike" class="p-item" @click.stop="cancelCollection()"> <view v-if="postValue.isLike" class="p-item" @click.stop="cancelCollection()">
<image style="width: 40rpx; height: 40rpx;" src="../static/images/icon/tu3-8.png" mode=""></image> <image style="width: 40rpx; height: 40rpx;" src="../../../static/images/icon/tu3-8.png" mode=""></image>
<text class="count-like">{{ postValue.likeCount }}</text> <text class="count-like">{{ postValue.likeCount }}</text>
</view> </view>
<!-- 靠右对齐 --> <!-- 靠右对齐 -->
<view v-if="!postValue.isLike" class="p-item" @click.stop="addCollection()"> <view v-if="!postValue.isLike" class="p-item" @click.stop="addCollection()">
<image style="width: 40rpx; height: 40rpx;" src="../static/images/icon/tu3-7.png" mode=""></image> <image style="width: 40rpx; height: 40rpx;" src="../../../static/images/icon/tu3-7.png" mode=""></image>
<text class="count">{{ postValue.likeCount }}</text> <text class="count">{{ postValue.likeCount }}</text>
</view> </view>
<!-- 靠右对齐 --> <!-- 靠右对齐 -->
<view class="p-item margin50"> <view class="p-item margin50">
<image style="width: 40rpx; height: 40rpx;" src="../static/images/icon/tu3-3.png" mode=""></image> <image style="width: 40rpx; height: 40rpx;" src="../../../static/images/icon/tu3-3.png" mode=""></image>
<text class="count">{{ postValue.commentCount }}</text> <text class="count">{{ postValue.commentCount }}</text>
</view> </view>
<!-- 靠右对齐 --> <!-- 靠右对齐 -->
<view class="p-item margin50" v-if="postValue.ifFavorite" @click.stop="cancelFavorite()"> <view class="p-item margin50" v-if="postValue.ifFavorite" @click.stop="cancelFavorite()">
<image style="width: 40rpx; height: 40rpx;" src="../static/images/icon/tu3-2.png" mode=""></image> <image style="width: 40rpx; height: 40rpx;" src="../../../static/images/icon/tu3-2.png" mode=""></image>
<text class="count-favorite">{{ postValue.favoriteCount }}</text> <text class="count-favorite">{{ postValue.favoriteCount }}</text>
</view> </view>
<!-- 靠右对齐 --> <!-- 靠右对齐 -->
<view class="p-item margin50" v-if="!postValue.ifFavorite" @click.stop="addFavorite()"> <view class="p-item margin50" v-if="!postValue.ifFavorite" @click.stop="addFavorite()">
<image style="width: 40rpx; height: 40rpx;" src="../static/images/icon/tu3-1.png" mode=""></image> <image style="width: 40rpx; height: 40rpx;" src="../../../static/images/icon/tu3-1.png" mode=""></image>
<text class="count">{{ postValue.favoriteCount }}</text> <text class="count">{{ postValue.favoriteCount }}</text>
</view> </view>
</view> </view>

View File

@ -14,14 +14,13 @@
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<template class="img2Box" #center> <template class="img2Box" #center>
<view class="qiehuanBox"> <view class="qiehuanBox">
<u-tabs lineColor="#B3D7FF" lineWidth="24" lineHeight="4" <u-tabs lineColor="#B3D7FF" lineWidth="24" lineHeight="4"
:activeStyle="{ fontWeight: '600rpx',fontSize:'40rpx',color: '#000000'}" :activeStyle="{ fontWeight: '600rpx',fontSize:'40rpx',color: '#000000'}"
:inactiveStyle="{fontWeight: '400rpx',fontSize:'36rpx',color: '#999999'}" :inactiveStyle="{fontWeight: '400rpx',fontSize:'36rpx',color: '#999999'}"
:list="list1" @click="click"></u-tabs> :list="list1" :current="viewIndex" @click="click"></u-tabs>
</view> </view>
</template> </template>
@ -139,7 +138,7 @@ import PostView from "@/pages/common/postview/index.vue";
console.log('触底了') console.log('触底了')
}) })
const viewIndex = ref(0); const viewIndex = ref(1);
const searchOpen = ref(false); const searchOpen = ref(false);
const lefther = ref(0); const lefther = ref(0);
const searchPrerequisite = ref('热门'); const searchPrerequisite = ref('热门');

View File

@ -4,7 +4,7 @@
<view class="center-content-focus-line"></view> <view class="center-content-focus-line"></view>
<view class="comment"> <view class="comment">
<view class="flex justifyBetween alignCenter commentTop"> <view class="flex justifyBetween alignCenter commentTop">
<text class="commentLabel">全部评论</text> <text class="commentLabel">全部评论4</text>
<text class="report">举报</text> <text class="report">举报</text>
</view> </view>
<view v-if="!postList" class="no-comment"> <view v-if="!postList" class="no-comment">
@ -111,20 +111,29 @@
</template> </template>
<script setup> <script setup>
import { ref, reactive, computed, onMounted, getCurrentInstance } from 'vue'; import { ref, reactive, computed, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue';
import PostView from "@/pages/common/postview/index.vue"; import PostView from "@/pages/common/postview/index.vue";
const bottomVal = ref(0); const bottomVal = ref(0);
// //
uni.onKeyboardHeightChange(res => { onMounted(async () => {
if(res.height == 0) { // if (!data.value) {
bottomVal.value = 0; uni.onKeyboardHeightChange(res => {
return; if(res.height == 0) {
} bottomVal.value = 0;
bottomVal.value = res.height - 20; return;
console.log(bottomVal.value) }
}); bottomVal.value = res.height - 20;
console.log(bottomVal.value)
});
// }
})
onBeforeUnmount(async () => {
uni.offKeyboardHeightChange();
});
const postList = reactive([{ const postList = reactive([{
avatar: 'https://k.sinaimg.cn/n/sports/transform/400/w600h600/20220130/dd38-eed53ba750d1d8c87eca8b57eda879a5.jpg/w700d1q75cms.jpg?by=cms_fixed_width', avatar: 'https://k.sinaimg.cn/n/sports/transform/400/w600h600/20220130/dd38-eed53ba750d1d8c87eca8b57eda879a5.jpg/w700d1q75cms.jpg?by=cms_fixed_width',