<template>
    <div class="conts">
        <div style="margin: 0 auto ;width: 90% ;margin-top: 5vh">
            <div style="margin-bottom: 2vh">反馈内容：</div>
            <el-input
                    type="textarea"
                    placeholder="请留下您的宝贵意见和建议..."
                    v-model=" content"
                    maxlength="200"
                    show-word-limit
            >
            </el-input>
            <el-image class="submit" :src="require('../../assets/submit.png')" @click="submit"></el-image>
            <el-button style="margin-top: 20px" size="small" type="primary" @click="goBack">返回上一页</el-button>
        </div>

    </div>
</template>

<script>
    import {
        addYiJian
    } from "../../api";

    export default {
        name: "aboutme",
        data() {
            return {
                currentWordNumber: 0,
                max: 0,
                content: '',
            };
        },
        methods: {
            submit() {
                this.noReadMessage();
            },
            async noReadMessage() {
                const result = await addYiJian({content:this.content});
                console.log(result,"000")
                if(result.code == 0){
                    this.$router.replace("/my/index");
                }
            },
            goBack() {
                this.$router.replace("/my/index");
            }
        },
        mounted() {

        },

    };
</script>

<style scoped>
    .submit {
        margin-top: 20px;
    }

    /deep/ .el-textarea, /deep/ .el-textarea__inner {
        height: 200px;

    }
    /deep/ .el-button {
        width: 100%;
    }


</style>
