<template>
    <view class="introduceYourselfEdit">
        <view class="u-cell-group">
            <u--textarea placeholderClass="textarea-placeholder" autoHeight v-model="value" placeholder="简单的介绍您自己~"
                class="textareaDef"></u--textarea>
        </view>
        <view class="footer-bar">
            <u-button :customStyle="{
                padding: '24rpx 48rpx',
                color: '#fff',
                background: 'var(--theme-color-gradient)',
                width: '654rpx',
                height: '88rpx',
                background: '#333335',
                borderRadius: '60rpx 60rpx 60rpx 60rpx',
            }" @click="onSubmit">确认修改</u-button>
        </view>
    </view>
</template>

<script>
import { onShow } from '@dcloudio/uni-app';

export default {
    data() {
        return {
            value: '',
        }
    },
    onLoad() {
    },
    onLoad(query) {
        console.log(query, 'query')
        this.value = (query.introduceYourself === undefined || query.introduceYourself === 'undefined') ? '' : decodeURIComponent(query.introduceYourself)
    },
    onShow() {
    },
    methods: {
        goBack() {
            uni.navigateBack()
        },
        onSubmit() {
            // 获取页面栈
            const pages = getCurrentPages()
            // 上一页实例
            const prevPage = pages[pages.length - 2]
            // 直接修改上一页data里的字段
            prevPage.$data.baseInfo.introduceYourself = this.value
            uni.navigateBack()
        }

    }
}
</script>

<style scoped lang="scss">
.introduceYourselfEdit {
    height: 100vh;
    background-color: #F7F8FA;

    .u-cell-group {
        background: #fff;
        min-height: 260rpx;
        box-sizing: border-box;
        border-radius: 8rpx 8rpx 8rpx 8rpx;
        padding: 32rpx;

        .u-textarea {
            background: #F7F8FA;
            min-height: 200rpx !important;
        }

        .textareaDef {

            .uni-textarea-placeholder {
                font-weight: 400;
                font-size: 30rpx;
                color: #C9CDD4;
            }

            .uni-textarea-wrapper {
                font-weight: 400;
                font-size: 30rpx;
                color: #4E5969;
            }

        }
    }


}
</style>
