<template>
	<view class="container clearfix">
		<view class="foot-list">
			<view class="list-cell-item">
				<view class="list-cell" @click="navigator(`/pages/user/setting/phone?phone=${bindMobile}`)" hover-class="cell-hover" :hover-stay-time="50">
					<text class="cell-tit">更换手机号</text>
					<text class="cell-more">
						<text class="txt">{{hidePhone(bindMobile)}}</text>
						<text class="iconfont icon-xiayibu"></text>
					</text>
				</view>
				<view class="list-cell" @click="navigator('/pages/login/password')" hover-class="cell-hover" :hover-stay-time="50">
					<text class="cell-tit">修改密码</text>
					<text class="cell-more iconfont icon-xiayibu"></text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bindMobile:''
			}
		},
		onLoad(option) {
			
		},
		methods:{
			initSetting(){
				this.$api.getStorage().then((resolve) =>{
					this.UserService.PersonalInfo({userID:resolve.userID}).then(response =>{
						this.bindMobile=response.data.user.bindMobile
					}).catch(error =>{
						this.$util.msg(error.msg,2000)
					})
				})
			},
			navigator(url){
				this.$api.navigateTo(url)
			},
			hidePhone(val){
				let phone = this.$reg.hidePhone(val) 
				return phone
			}
		},
		onShow() {
			this.initSetting()
		}
	}
</script>

<style lang='scss'>
	page {
		height: auto;
	}
	page,.container{
		/* padding-bottom: 120upx; */
		background: #F7F7F7;
		border-top: 1px solid #EBEBEB;
	}
	.foot-list{
		width: 100%;
		margin-top: 30rpx;
	}	
	.list-cell-item{
		width: 702rpx;
		height: auto;
		margin-bottom: 24rpx;
		padding:0 24rpx;
		background: $bg-color;
	}
	.list-cell{
		display:flex;
		width: 100%;
		align-items:baseline;
		line-height:100rpx;
		position:relative;
		background: $bg-color;
		justify-content: center;
		// border-bottom: 1px solid #EBEBEB;
		&.cell-hover{
			background:#fafafa;
		}
		.cell-more{
			align-self: baseline;
			font-size:$font-size-28;
			color:$text-color;
			margin-left:10rpx;
			.txt{
				color: #999999;
				padding-right: 10rpx;
			}
		}
		.cell-tit{
			flex: 1;
			font-size: $font-size-28;
			color: $text-color;
			margin-right:10rpx;
		}
		.cell-tip{
			font-size: $font-size-28;
			color: $text-color;
		}
	}	
	.list-cell.last{
		border-bottom: none;
	}
</style>

