<template>
	<view class="padding-30">
		<textarea name="" class="text-area" cols="30" rows="10" v-model="value"
			placeholder="请提出您遇到的问题,或者反馈意见~"></textarea>
		<!-- <view class="imgg">
			<view class="chooseImg" v-for="(item,index) in imgList">
				<image :src="item" mode=""></image>
				<image src="../../static/user/delete.png" class="del" mode="" @click="dele(index)"></image>
			</view>
			<view class="chooseImg" @click="shangchaun">
				<image src="../../static/img/chooseImg.png" mode=""></image>
			</view>
		</view> -->
		<view class="button" @click="proposal">
			提交
		</view>

	</view>

</template>

<script>
	import {proposal} from '@/api/user.js'
	import { upload } from '@/api/order.js';
	export default {
		data() {
			return {
				value: '', //反馈内容
				imgList: [] ,//照片
				up:false
			}
		},
		methods: {
			proposal(){
				proposal({
					content:this.value,
				}).then(()=>{
					uni.showModal({
						title: '提示',
						content: '提交成功',
						showCancel: false,
						success: res => {},
						fail: () => {},
						complete: () => {}
					});
				})
			},
			//上传图片
			shangchaun() {
				const that = this;
				upload({
					filename: ''
				}).then(res => {
					that.imgList.push(res[0].url)
				});
			},
			dele(index) {
				console.log('删除');
				this.imgList.splice(index, 1)
				console.log(this.imgList);


			}
		}
	}
</script>

<style lang="scss">
	page {
		width: 750rpx;
		height: 100%;
		margin: 0;
		padding: 0;
		background: #111111;

		.text-area {
			color: aliceblue;
			width: 750rpx;
			height: 400rpx;
			background: #181818;
			padding: 40rpx 20rpx;
		}

		.imgg {

			display: flex;
			flex-grow: 4;
			flex-grow: 4;


		}

		

		.chooseImg {
			position: relative;
			border-radius: 20rpx;
			width: 160rpx;
			height: 160rpx;
			margin: 20rpx;
			.del {
				width: 40rpx;
				height: 40rpx;
				position: absolute;
				z-index: 1000;
				top:0;
				right: 0;
			}

			image {
				width: 100%;
				height: 100%;
			}
		}
	}
	.button{
		width: 560rpx;
		height: 90rpx;
		background: $bgBaseBg;
		border-radius: 45rpx;
		font-size: 36rpx;
		font-weight: 500;
		color: #FFFFFF;
		margin: 50rpx auto;
		text-align: center;
		line-height: 90rpx;
	}
</style>
