<template>
	<view>
		<myForm ref="nameAndphone"></myForm>
		<u-button type="success" text="确定" color="#0EBB5B" @click="handleSureClick()"></u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name: '',
				phone: '',
			}
		},
		onLoad() {
			this.name = this.$refs.nameAndphone.model.userInfo.name
			this.phone = this.$refs.nameAndphone.model.userInfo.phone
		},
		methods: {
			handleSureClick() {
				this.$apiServe.bindComponyAndUpdate({
					uid: 1,
					type: 1,
					companyPhone: this.phone,
					companyName: this.name
				}).then(res => {
					// console.log('绑定公司', res);
				}).finally(_ => {})
			}
		}
	}
</script>

<style lang="scss">
	.u-button {
		width: 644rpx !important;
		height: 86rpx !important;
		background: #0EBB5B;
		border-radius: 20rpx !important;
		margin-top: 168rpx;
	}
</style>
