<template>
	<view>
		<view class="page">
			<text class="title">以下权限选择后方可生效</text>
			<view class="">
				<u-checkbox-group v-model="radiovalue1" placement="column" @change="groupChange">
					<view class="u-flex u-row-between" style="margin-top:20rpx ;border-top: 2rpx solid #F0F0F0;">
						<view class="">
							<view class="title" style="margin-top: 40rpx;">联系方式</view>
							<text class="mar">开启后，猎头可查看您的联系方式</text>
						</view>
						 <!-- @change="radioChange" -->
						<u-checkbox :customStyle="{marginBottom: '8px'}" :name="1">
						</u-checkbox>
					</view>
				</u-checkbox-group>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		private_setting,
		index
	} from "@/units/inquire.js"
	export default {
		data() {
			return {
				radiovalue1: [],
			}
		},
		onLoad() {
			this.index()
		},
		methods: {
			index() {
				index().then(res=>{
					if(res.data.group_info.is_resume_show==1){
						this.radiovalue1 = [res.data.group_info.is_resume_show]
					}
					 console.log('kkk',this.radiovalue1);
				})
			},
			groupChange(n) {
				this.radiovalue1=n
				private_setting({
					is_resume_show: this.radiovalue1.length == 0 ?  false: true
				}).then(res => {
					if (res.code == 1) {
						this.$u.toast("修改成功")
						this.index()
					}
				})
			},
			// radioChange(n) {  
			// 	console.log('radioChange', n);
			// }
		}
	}
</script>

<style scoped>
	.page {
		padding: 36rpx 32rpx 0;
		height: 100vh;
		box-sizing: border-box;
	}

	.title {
		font-size: 32rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #222222;
	}

	.mar {
		margin-top: 20rpx;
		font-size: 24rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #1A1C24;
		display: block;
	}
</style>