<template>
	<view class="container">
		<view class="big">
			<view class="header flex-start">
				<image class="avaimg" :src="userInfo.avatar || '/static/error/missing-face.png'" mode="">
				</image>
				<view class="nicheng">
					<view class="nc">123</view>
					<view class="sj">1分钟前</view>
				</view>
			</view>
			<view class="tex">
				<textarea v-model="content" auto-focus  maxlength="-1" class="wenzhang" placeholder="请输入内容"></textarea>
			</view>
			<image class="sc" v-for="item in imgArr" :src="item" mode=""></image>
			<image @click="choose" class="sc" src="../../static/user/erweima.png" mode=""></image>
			<view class="">
			 	<button class="btn" @click="pushList">发布素材</button>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		data() {
			return {
				content: '',  // 文章内容
				imgArr: []
			}
		},
		computed: {
			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
		},
		methods: {
			pushList() {
				// 对应的逻辑
				
				uni.showToast({
					title: '发布成功',
					icon: 'success'
				})
			},
			choose() {
				uni.chooseImage({
					count: 9,
					success: res=> {
						this.imgArr = res.tempFilePaths
						console.log('11', res);
					}
				})
			}
		}
	}
</script>

<style>
	.big {
		width: 700rpx;
		background-color: #fff;
		margin-top: 25rpx;
		margin-left: 25rpx;
	}
	.header {
		padding-top: 20rpx;
		padding-left: 20rpx;
		.avaimg {
			width: 97rpx;
			height: 88rpx;
		}
		.nicheng {
			padding-left: 10rpx;
			.nc {
				font-size: 32rpx;
				color: #333333;
			}
			.sj {
				font-size: 24rpx;
				color: #999999;
			}
		}
	}
	.wenzhang {
		font-size: 28rpx;
		color: #666666;
		padding-top: 20rpx;
		padding-left: 20rpx;
	}
	.sc {
		width: 160rpx;
		height: 160rpx;
		margin: 0 10rpx;
	}
	.btn {
		width: 625rpx;
		height: 89rpx;
		background: #FF6F0F;
		border-radius: 15rpx;
		margin-left: 35rpx;
		color: #fff;
		position: fixed;
		bottom: 60rpx;
		z-index: 999;
	}
</style>