<template>
	<view class="page">
		<u-navbar title="客户服务" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
			height='45'></u-navbar>
		<view class="btn" @click="callPhone">
			<image src="https://lxnapi.ccttiot.com/bike/img/static/uEM1RpP3J0K51qTjtnA5" mode=""></image>
			电话咨询：{{areaInfo.servicePhone}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgc: {
					backgroundColor: "#fff",
				},
				areaInfo: {}
			}
		},
		onShow() {
			this.getarea()
		},
		methods: {
			getarea() {
				let id = uni.getStorageSync('areaId');
				this.$u.get("/app/area/" + id).then((res) => {

					if (res.code == 200) {
						this.areaInfo = res.data

					} else {
						// uni.showToast({
						// 	title: res.msg,
						// 	icon: 'none',
						// 	duration: 2000
						// });
					}
				});
			},
			callPhone(){
				uni.makePhoneCall({
					phoneNumber:this.areaInfo.servicePhone
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}

	.page {
		width: 750rpx;

		.btn {
			position: fixed;
			left: 36rpx;
			bottom: 44rpx;
			display: flex;
			align-items: center;
			justify-content: center;


			width: 680rpx;
			height: 118rpx;
			background: #4C97E7;
			border-radius: 59rpx 59rpx 59rpx 59rpx;

			image {
				margin-right: 18rpx;
				width: 34.5rpx;
				height: 33rpx;
			}
			font-weight: 600;
			font-size: 40rpx;
			color: #FFFFFF;
		}
	}
</style>