Browse Source

上传发布、动态详情

master
前端-胡立永 11 months ago
parent
commit
eed6ec43c7
10 changed files with 242 additions and 14 deletions
  1. +1
    -1
      components/base/navbar.vue
  2. +1
    -0
      components/post/postList.vue
  3. +18
    -1
      pages.json
  4. +1
    -0
      pages/index/index.vue
  5. +76
    -10
      pages/index/publish.vue
  6. +8
    -1
      pages/publish/actorRelease.vue
  7. +132
    -0
      pages/publish/postDetail.vue
  8. +5
    -1
      pages/publish/publishPost.vue
  9. BIN
      static/image/publish/p1.png
  10. BIN
      static/image/publish/p2.png

+ 1
- 1
components/base/navbar.vue View File

@ -79,7 +79,7 @@
.navbar{
width: 100%;
height: 100rpx;
padding-top: calc(var(--status-bar-height));
padding-top: calc(var(--status-bar-height) + 20rpx);
}
.title{
position: fixed;


+ 1
- 0
components/post/postList.vue View File

@ -1,6 +1,7 @@
<template>
<view class="postList">
<view class="item" v-for="(item, index) in list"
@click="$utils.navigateTo('/publish/postDetail')"
:key="index">
<image src="/static/image/index/p1.png" mode="aspectFill"></image>
<view class="text">


+ 18
- 1
pages.json View File

@ -103,6 +103,13 @@
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/publish/postDetail",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
"globalStyle": {
@ -112,5 +119,15 @@
"backgroundColor": "#F8F8F8",
"navigationStyle": "custom"
},
"uniIdRouter": {}
"uniIdRouter": {},
"condition" : { //
"current": 0, //(list )
"list": [
{
"name": "", //
"path": "", //
"query": "" //onLoad
}
]
}
}

+ 1
- 0
pages/index/index.vue View File

@ -138,6 +138,7 @@
<style scoped lang="scss">
.content{
padding-bottom: 150rpx;
.top{
background-image: $uni-linear-gradient-bg-color;
padding: 0 20rpx;


+ 76
- 10
pages/index/publish.vue View File

@ -1,30 +1,96 @@
<template>
<view>
{{ count }}
<tabber :select="1"/>
<view class="publish">
<view class="top">
<view class="title">
发布
</view>
<view class="type">
<view class="post"
@click="$utils.navigateTo('/publish/publishPost')">
发布帖子
<image src="/static/image/publish/p2.png" mode=""></image>
</view>
<view class=""
@click="$utils.navigateTo('/publish/actorRelease')">
发布名片
<image src="/static/image/publish/p1.png" mode=""></image>
</view>
</view>
</view>
<tabber :select="1" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import { mapState } from 'vuex'
import {
mapState
} from 'vuex'
export default {
components : {
components: {
tabber
},
computed : {
computed: {
...mapState(['count']),
},
data() {
return {
};
}
}
</script>
<style lang="scss">
.publish {
.top {
height: 600rpx;
background-image: $uni-linear-gradient-bg-color;
padding: 0 20rpx;
padding-top: calc(var(--status-bar-height) + 100rpx);
.title {
display: flex;
color: #fff;
justify-content: space-between;
</style>
&>view {
display: flex;
justify-content: center;
align-items: center;
}
}
}
.type{
display: flex;
justify-content: center;
margin-top: 30rpx;
&>view{
width: 310rpx;
height: 120rpx;
background-color: #fff;
margin: 10rpx;
position: relative;
border-radius: 20rpx;
overflow: hidden;
color: #fdcc4b;
align-items: center;
padding: 20rpx;
display: flex;
font-weight: 900;
image{
position: absolute;
bottom: 0;
right: 0;
width: 100rpx;
height: 100rpx;
}
}
.post{
background-color: #b7a6f6;
color: #603af5;
}
}
}
</style>

+ 8
- 1
pages/publish/actorRelease.vue View File

@ -1,6 +1,13 @@
<template>
<view>
<view class="actorRelease">
<navbar
leftClick
@leftClick="$utils.navigateBack"
title="演员发布"/>
演员发布
</view>
</template>


+ 132
- 0
pages/publish/postDetail.vue View File

@ -0,0 +1,132 @@
<template>
<view class="postDetail">
<navbar
leftClick
@leftClick="$utils.navigateBack"/>
<view class="swipe">
<uv-swiper
:list="list"
keyName="url"
indicator
height="320rpx"></uv-swiper>
</view>
<view class="box">
<view class="title">
{{ item.title }}
</view>
<view class="createBy">
<view class="">
发布人{{ item.createBy }}
</view>
<view class="">
发布时间{{ item.createTime }}
</view>
</view>
<view class="controls">
<view class="">
<uv-icon
size="35rpx"
name="bell"></uv-icon>
举报
</view>
<view class="">
<uv-icon
size="35rpx"
name="thumb-up"></uv-icon>
点赞
</view>
<view class="">
<uv-icon
size="35rpx"
name="share"></uv-icon>
分享
</view>
<view class="">
<uv-icon
size="35rpx"
name="thumb-down"></uv-icon>
</view>
</view>
<view class="content">
<uv-parse :content="item.content"></uv-parse>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list : [
{
url : '/static/image/index/123123.png'
},
{
url : '/static/image/index/a1.png'
},
],
item : {
title : "这是一条动态",
createTime : '2024-08-22 09:00:00',
createBy : "小飞",
content : '这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态',
},
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.postDetail{
.box{
padding: 20rpx;
.title{
font-size: 30rpx;
font-weight: 600;
color: #000;
}
.createBy{
display: flex;
margin-top: auto;
margin-bottom: 10rpx;
font-size: 26rpx;
margin-top: 20rpx;
color: #555;
&>view{
display: flex;
align-items: center;
justify-content: center;
padding-right: 20rpx;
}
}
.controls{
display: flex;
margin-top: 30rpx;
&>view{
display: flex;
justify-content: center;
align-items: center;
margin-right: 40rpx;
}
}
.content{
margin-top: 30rpx;
color: #777;
}
}
}
</style>

+ 5
- 1
pages/publish/publishPost.vue View File

@ -1,5 +1,9 @@
<template>
<view>
<view class="publishPost">
<navbar
leftClick
@leftClick="$utils.navigateBack"
title="发布帖子"/>
发布帖子
</view>
</template>


BIN
static/image/publish/p1.png View File

Before After
Width: 100  |  Height: 100  |  Size: 5.6 KiB

BIN
static/image/publish/p2.png View File

Before After
Width: 100  |  Height: 100  |  Size: 6.7 KiB

Loading…
Cancel
Save