<template>
    <view>
        <view class="u-cell-group">
            <u--textarea :height="300" v-model="value" autoHeight placeholder="简单的介绍您自己~"></u--textarea>
        </view>
        <view class="footer-bar">
            <u-button shape="circle" :customStyle="{
                color: '#fff',
                background: 'var(--theme-color-gradient)'
            }" @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">
.u-cell-group {
    padding: 30rpx;
}
</style>
