<template>
	<template v-for="(col,index) in list" :key="index">
		<view class="title">{{col.title}}</view>
		<u-cell-group>
			<u-cell-item :title="item.title" v-for="(item,i) in col.columns" :key="i" @click="itemClick(item)"
				:titleStyle="titleStyle"></u-cell-item>
		</u-cell-group>
	</template>
</template>

<script setup lang="ts">
	import { msg, navTo } from '@/utils/utils';

	const titleStyle = { fontSize: '28rpx', color: '#333333' };
	const basePath = "/subpackage/personal-center/setting/";
	const list = [
		{
			title: '账号信息',
			columns: [
				{ title: '账号手机号修改', path: 'change-phone', login: true },
				{ title: '修改EC预留手机号', path: 'personal-information/user-change-list?type=1', login: true },
			]
		},
		{
			title: '基础信息',
			columns: [
				{ title: '用户信息变更', path: 'personal-information/user-change-list?type=2', login: true },
				// {title:'补传身份证',path:'personal-information/user-card',login:true},
			]
		},
	]

	/* item点击 */
	const itemClick = (item) => {
		if (!item.path) {
			msg('找不到该界面哦！');
			return;
		}

		if (item.path === 'phone') {
			msg('小程序唤起手机号更变');
			return;
		}
		navTo(basePath + item.path, item.login);
	}
</script>

<style>
	page {
		background: #EEF7F7;
	}
</style>

<style lang="scss" scoped>
	.title {
		font-size: 26rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #666666;
		height: 80rpx;
		padding-top: 30rpx;
		padding-left: 30rpx
	}
</style>