<template>
	<view class="wrapper">
		<view class="header text-center">
			<fui-icon name="arrowleft" color="#fff" :size="50" @tap="goBack"></fui-icon>
			<text>服务支持</text>
		</view>
		<view class="body">
			<view class="bg">
				<image src="/static/images/support.png" mode="widthFix"></image>
			</view>
			<fui-list>
				<fui-list-cell :marginTop="10" @tap="callPhone('18163608038')">
					<view>
						<text class="mr-8">业务服务热线</text>
						<text class="primary bold">18163608038（周巍警官）</text>
					</view>
					<fui-icon name="telephone" :size="50" color="#4E5FC8" style="vertical-align: top;"></fui-icon>
				</fui-list-cell>
				<fui-list-cell :marginTop="20" @tap="callPhone('18867391894')">
					<view>
						<text class="mr-8">技术服务热线</text>
						<text class="primary bold">18867391894 （杨姣）</text>
					</view>
					<fui-icon name="telephone" :size="50" color="#4E5FC8" style="vertical-align: top;"></fui-icon>
				</fui-list-cell>
				<fui-list-cell @tap="callPhone('13787166867')">
					<view>
						<text style="margin-left: 104px;" class="primary bold">13787166867 (李经理)</text>
					</view>
					<fui-icon name="telephone" :size="50" color="#4E5FC8" style="vertical-align: top;"></fui-icon>
				</fui-list-cell>
			</fui-list>
		</view>
	</view>
</template>

<script setup>
	function goBack() {
		uni.switchTab({
			url: '/pages/my/my'
		});
	}
	
	function callPhone(phoneNumber) {
		try {
			uni.makePhoneCall({
				phoneNumber: phoneNumber // 电话号码
			});
		} catch(e) {
			uni.showToast({
			    title: 'error：' + e,
				icon: 'none',
			    duration: 300000
			})
		}
	}
</script>

<style lang="scss" scoped>
	.wrapper {
		.header {
			padding-top: 40px;
			background-color: var(--primary-color);
			color: #fff;
			height: 46px;
			line-height: 46px;
			position: relative;
			.fui-icon {
				position: absolute;
				left: 10px;
			}
		}
		.body {
			.bg {
				image {
					width: 100%;
				}
			}
			.fui-list__cell {
				border-bottom: 1px solid #E5E5E5;
			}
		}
		.footer {
			background-color: #fff;
			padding: 9px 12px;
		}
		
	}
</style>
