| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <template>
- <view class="container">
- <!-- 页面标题区域 -->
- <view class="header" :style="{ height: customBarH * 2 + 'rpx', paddingTop: statusBarH * 2 + 'rpx' }">
- <img src="../../static/index/left2.png" :style="{ paddingTop: statusBarH * 2 + 'rpx' }" />
- <view class="header_text">发推文</view>
- </view>
- <!-- 图片视频上传展示区域 -->
- <view class="upload">
- <view class="upload_img">
- <img src="../../static/index/upload-img.png" />
- 添加图片
- </view>
- <view class="upload_video">
- <img src="../../static/index/upload-video.png" />
- 添加视频
- </view>
- </view>
- <!-- 标题输入区域 -->
- <view class="title">
- <input class="input" type="text" placeholder-style="color:#B3B3B3" placeholder="请输入标题" v-model="titleValue" />
- </view>
- <!-- 推文内容输入区域 -->
- <view class="content">
- <textarea class="textarea" placeholder-style="color:#B3B3B3" maxlength="3000" placeholder="请分享你的故事吧~" v-model="contentValue"></textarea>
- <!-- 内容长度 -->
- <view class="textarea_length">{{ contentValue.length }}/3000</view>
- </view>
- <!-- 添加地点区域 -->
- <view class="add_place">
- <img class="img" src="../../static/index/send-address.png" />
- 添加地点
- <img class="img2" src="../../static/index/send-right.png" />
- </view>
- <!-- 关联民宿区域 -->
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- // 状态栏高度
- statusBarH: 0,
- // 胶囊按钮栏高度
- customBarH: 0,
- // 标题数据
- titleValue: '',
- // 推文内容区域
- contentValue: ''
- }
- },
- created() {
- // 获取系统信息
- uni.getSystemInfo({
- success: (e) => {
- // 获取状态栏高度
- this.statusBarH = e.statusBarHeight + 10
- // // 获取菜单按钮栏高度
- let custom = uni.getMenuButtonBoundingClientRect()
- this.customBarH = custom.height + 10
- }
- })
- }
- }
- </script>
- <style lang="scss">
- .container {
- height: 100vh;
- background-color: #fff;
- .header {
- display: flex;
- justify-content: center;
- position: relative;
- background-color: #fff;
- img {
- position: absolute;
- top: 0;
- left: 0;
- width: 47rpx;
- height: 47rpx;
- }
- .header_text {
- font-size: 34rpx;
- }
- }
- .upload {
- padding: 30rpx 0 10rpx;
- display: flex;
- .upload_img {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin-left: 20rpx;
- width: 186rpx;
- height: 283rpx;
- color: #999999;
- font-size: 28rpx;
- border-radius: 8rpx;
- background-color: #e6e6e6;
- img {
- margin-top: 10rpx;
- width: 68rpx;
- height: 68rpx;
- }
- }
- .upload_video {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin-left: 26rpx;
- width: 186rpx;
- height: 283rpx;
- color: #999999;
- font-size: 28rpx;
- border-radius: 8rpx;
- background-color: #e6e6e6;
- img {
- margin-top: 12rpx;
- width: 68rpx;
- height: 68rpx;
- }
- }
- }
- .title {
- margin: auto;
- width: 710rpx;
- height: 100rpx;
- border-bottom: 1rpx solid #e5e5e5;
- .input {
- box-sizing: border-box;
- padding-right: 20rpx;
- width: 100%;
- height: 100%;
- font-size: 32rpx;
- }
- }
- .content {
- margin: auto;
- width: 710rpx;
- height: 290rpx;
- font-size: 28rpx;
- color: #b3b3b3;
- border-bottom: 1rpx solid #e5e5e5;
- .textarea {
- margin-top: 25rpx;
- width: 100%;
- height: 240rpx;
- }
- .textarea_length {
- margin-top: 5rpx;
- text-align: end;
- }
- }
- .add_place {
- display: flex;
- align-items: center;
- margin: auto;
- width: 710rpx;
- height: 100rpx;
- font-size: 28rpx;
- border-bottom: 1rpx solid #e5e5e5;
- .img {
- margin-right: 10rpx;
- width: 55rpx;
- height: 55rpx;
- }
- .img2 {
- margin-left: auto;
- width: 40rpx;
- height: 40rpx;
- }
- }
- }
- </style>
|