<!-- 个人中心 -->
<template>
	<view>
		<u-navbar :autoBack="false" title="我的"></u-navbar>
		<u--image src="/static/my/wo_icon_bj1.png" width="750rpx" height="349rpx">
		</u--image>
		<myAvatar></myAvatar>
		<view class="table">
			<u-cell-group>
				<u-cell size="large" title="绑定公司" icon="/static/my/wo_icon_bd.png" :isLink="true" value="未绑定公司"
					@click="bindCompany()">
				</u-cell>
				<u-cell size="large" title="会员中心" icon="/static/my/wo_icon_hyzx.png" :isLink="true"
					@click="toMemberCenter()"></u-cell>
				<u-cell size="large" title="浏览记录" icon="/static/my/wo_icon_lljl.png" :isLink="true"
					@click="toBrowseHistory()"></u-cell>
				<u-cell size="large" title="我的收藏" icon="/static/my/wo_icon_sc.png" :isLink="true"
					@click="toMyCollect()"></u-cell>
				<u-cell size="large" title="联系客服" icon="/static/my/wo_icon_lxkf.png" :isLink="true"
					@click="showModal()">
				</u-cell>
			</u-cell-group>
			<u-modal :show="showM" showCancelButton closeOnClickOverlay confirmText="是" cancelText="否"
				@confirm="confirm" @cancel="cancel" @close="close">
				<rich-text :nodes="content"></rich-text>
			</u-modal>
		</view>

	</view>
</template>
<script>
	export default {
		data() {
			return {

				showM: false,
				content: `138 1222 222<br>
								是否拨打客服电话`,

			}
		},
		methods: {
			//跳转到绑定公司页面
			bindCompany() {
				uni.navigateTo({
					url: '../../packageMy/bindCompony/bindCompony'
				})
			},
			//跳转到会员中心页面
			toMemberCenter() {
				uni.navigateTo({
					url: '../../packageMy/memberCenter/memberCenter'
				})
			},
			//跳转到浏览记录页面
			toBrowseHistory() {
				uni.navigateTo({
					url: '../../packageMy/browseHistory/browseHistory?id=' + 1
				})
			},
			//跳转到我的收藏页面
			toMyCollect() {
				uni.navigateTo({
					url: '../../packageMy/browseHistory/browseHistory?id=' + 2
				})
			},
			// 联系客服模态框
			showModal() {
				this.showM = true
			},
			confirm() {
				this.showM = false
				let phone = '‭1381222222‬'
				uni.makePhoneCall({
					phoneNumber: phone,
					success: function() {
						console.log('拨打电话成功');
					},
					fail() {
						console.log('打电话失败了');
					}
				})
			},
			cancel() {
				this.showM = false
			},
			close() {
				this.showM = false
			},
		}
	}
</script>

<style lang="scss">
	.table {
		background-color: #fff;
		margin-top: 50rpx;
	}

	.u-line {
		display: none !important;
	}

	.u-cell--clickable {
		background-color: #fff !important;
	}

	.u-cell {
		border-bottom: 1rpx solid #EEEEEE;

	}

	.u-icon__icon--info {
		font-size: 28rpx !important;
	}

	.u-cell__title-text {
		margin-left: 20rpx;
		font-size: 24rpx !important;
		color: #252421;
		line-height: 33rpx !important;
	}

	.u-cell__value {
		font-size: 24rpx !important;
		color: #CCCCCC !important;
	}

	.u-modal {
		width: 472rpx !important;

	}

	.u-modal__button-group__wrapper--cancel {

		background: #D8D8D8;

		.u-modal__button-group__wrapper__text {
			color: #fff !important;
		}
	}

	.u-modal__content {
		padding: 43rpx 104rpx !important;
		text-indent: 25rpx;
	}

	.u-modal__content__text {
		font-size: 32rpx !important;
		font-weight: 400;
		color: #252421 !important;
	}

	.u-modal__button-group__wrapper--confirm {
		background: #0EBB5B;

		.u-modal__button-group__wrapper__text {
			color: #fff !important;
		}
	}
</style>
