useredirectto
This commit is contained in:
@@ -173,7 +173,13 @@ const totalCommentCount = computed(() =>
|
||||
}
|
||||
|
||||
.comment {
|
||||
width: 100%;
|
||||
max-width: 430px;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.commenthead {
|
||||
@@ -398,6 +404,7 @@ const totalCommentCount = computed(() =>
|
||||
|
||||
.interaction {
|
||||
width: 100%;
|
||||
max-width: 430px;
|
||||
border: solid 1px #faf9fb;
|
||||
background-color: #faf9fb;
|
||||
display: flex;
|
||||
@@ -405,6 +412,7 @@ const totalCommentCount = computed(() =>
|
||||
padding: 11.5px 16px;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.editarea {
|
||||
@@ -1,88 +1,31 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<!-- 内容区 -->
|
||||
<view class="maincontent">
|
||||
<!-- <Postpage /> -->
|
||||
<!-- <Videopage /> -->
|
||||
<News />
|
||||
</view>
|
||||
|
||||
<!-- Findmore组件 -->
|
||||
<Findmore />
|
||||
|
||||
<view class="loading-container">
|
||||
<text>页面加载中...</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Postpage from '@/pages/components/postpage/postpage.vue'
|
||||
import Videopage from '@/pages/components/videopage/videopage.vue';
|
||||
import News from '@/pages/components/news/news.vue';
|
||||
import Findmore from '@/pages/components/findmore/findmore.vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
|
||||
// 跳转
|
||||
const redirectTo = (url) => {
|
||||
uni.redirectTo({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
|
||||
// 页面加载时自动跳转
|
||||
onLoad(() => {
|
||||
// 自动跳转
|
||||
setTimeout(() => {
|
||||
redirectTo('/pages/post');
|
||||
}); // 自动跳转
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
page,
|
||||
.page {
|
||||
width: 100%;
|
||||
max-width: 430px;
|
||||
height: auto;
|
||||
.loading-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.head {
|
||||
width: 100%;
|
||||
padding: 14px 16px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .08);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.applogo {
|
||||
width: 128px;
|
||||
height: 33px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.spacerview {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.download {
|
||||
width: 97px;
|
||||
height: 35px;
|
||||
border-radius: 29px;
|
||||
background-image: linear-gradient(156deg, #7c45ed -1%, #7c68ef 19%, #7bd8f8 97%);
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 35px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.maincontent {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
height: auto;
|
||||
min-height: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
/* Webkit浏览器隐藏滚动条 */
|
||||
.maincontent::-webkit-scrollbar {
|
||||
display: none;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
@@ -58,15 +58,18 @@
|
||||
<!-- 评论区域 + 互动区域 -->
|
||||
<Comments :comments="post.comments" :showInteraction="true" :collectsum="post.collectsum" :likesum="post.likesum" />
|
||||
|
||||
|
||||
<!-- Findmore -->
|
||||
<Findmore />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useCommonStore } from '@/stores/common.js'
|
||||
import Head from '@/pages/components/head/head.vue'
|
||||
import Comments from '@/pages/components/comments/comments.vue'
|
||||
import Head from '@/pages/head/head.vue'
|
||||
import Comments from '@/pages/comments/comments.vue'
|
||||
import Findmore from '@/pages/findmore/findmore.vue'
|
||||
const common = useCommonStore()
|
||||
|
||||
// 当前 dot
|
||||
@@ -173,7 +176,7 @@ const handleInteraction = () => {
|
||||
common.openapp();
|
||||
}
|
||||
// 组件挂载时获取数据
|
||||
onMounted(() => {
|
||||
onLoad(() => {
|
||||
fetchPostData()
|
||||
})
|
||||
|
||||
@@ -182,11 +185,13 @@ onMounted(() => {
|
||||
<style scoped>
|
||||
page,
|
||||
.page {
|
||||
width: 100%;
|
||||
max-width: 430px;
|
||||
height: auto;
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
height: 100vh;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -49,15 +49,19 @@
|
||||
<!-- 评论区域 + 互动区域 -->
|
||||
<Comments :comments="post.comments" :showInteraction="true" :collectsum="post.collectsum" :likesum="post.likesum" />
|
||||
|
||||
<!-- Findmore -->
|
||||
<Findmore />
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useCommonStore } from '@/stores/common.js'
|
||||
import Head from '@/pages/components/head/head.vue'
|
||||
import Comments from '@/pages/components/comments/comments.vue'
|
||||
import Head from '@/pages/head/head.vue'
|
||||
import Comments from '@/pages/comments/comments.vue'
|
||||
import Findmore from '@/pages/findmore/findmore.vue'
|
||||
const common = useCommonStore()
|
||||
|
||||
// 当前 dot
|
||||
@@ -160,7 +164,7 @@ const fetchPostData = async () => {
|
||||
}
|
||||
|
||||
// 组件挂载时获取数据
|
||||
onMounted(() => {
|
||||
onLoad(() => {
|
||||
fetchPostData()
|
||||
})
|
||||
|
||||
@@ -169,11 +173,13 @@ onMounted(() => {
|
||||
<style scoped>
|
||||
page,
|
||||
.page {
|
||||
width: 100%;
|
||||
max-width: 430px;
|
||||
height: auto;
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
height: 100vh;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -65,14 +65,18 @@
|
||||
<Comments :comments="videoData.comments" :showInteraction="true" :collectsum="videoData.collectsum"
|
||||
:likesum="videoData.likesum" />
|
||||
|
||||
<!-- Findmore -->
|
||||
<Findmore />
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, getCurrentInstance } from 'vue'
|
||||
import { useCommonStore } from '@/stores/common.js'
|
||||
import Head from '@/pages/components/head/head.vue'
|
||||
import Comments from '@/pages/components/comments/comments.vue'
|
||||
import Head from '@/pages/head/head.vue'
|
||||
import Comments from '@/pages/comments/comments.vue'
|
||||
import Findmore from '@/pages/findmore/findmore.vue'
|
||||
|
||||
const common = useCommonStore()
|
||||
const formatCount = common.formatCount
|
||||
@@ -227,18 +231,20 @@ const toggleMute = () => {
|
||||
<style scoped>
|
||||
.videopage {
|
||||
width: 100%;
|
||||
max-width: 430px;
|
||||
height: 100vh;
|
||||
min-height: 684px;
|
||||
max-height: 932px;
|
||||
max-height: 932px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.videopage video {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
max-width: 430px;
|
||||
height: 100%;
|
||||
min-height: 680px;
|
||||
max-height: 980px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user