<template>
    <view>
        <view class="warning" style="padding-top: 30rpx">如您对开心麻花有建议或意见，</view>
        <view class="warning" style="padding-bottom: 30rpx">请在工作时间拨打下方您所属地区的指定电话</view>
        <view class="line" :data-tel="item.tel" @tap="tel" v-for="(item, index) in service_list" :key="index">
            <view class="area">{{ item.city }}</view>

            <view class="tel">
                {{ item.tel }}
                <image class="custom-icon" src="/static/images/ui/call.png" />
            </view>
        </view>
    </view>
</template>

<script>
// pages/user/auto_service/auto_service.js
export default {
    data() {
        return {
            service_list: [
                {
                    city: '北京',
                    tel: '010-51261058'
                },
                {
                    city: '天津',
                    tel: '022-58015757'
                },
                {
                    city: '太原',
                    tel: '13821809829'
                },
                {
                    city: '青岛',
                    tel: '15963223329'
                },
                {
                    city: '济南',
                    tel: '15269289598'
                },
                {
                    city: '郑州',
                    tel: '17561670037'
                },
                {
                    city: '唐山',
                    tel: '13932088436 '
                },
                {
                    city: '沈阳/大连',
                    tel: '15840406629'
                },
                {
                    city: '石家庄',
                    tel: '13833191514'
                },
                {
                    city: '南京/合肥',
                    tel: '025-52608651 '
                },
                {
                    city: '南京/合肥',
                    tel: '15210740520'
                },
                {
                    city: '武汉',
                    tel: '027-85497758'
                },
                {
                    city: '长沙',
                    tel: '027-85497758'
                },
                {
                    city: '成都',
                    tel: '028-84400172'
                },
                {
                    city: '深圳',
                    tel: '0755-25589333  '
                },
                {
                    city: '广州',
                    tel: '020-88525813'
                },
                {
                    city: '上海',
                    tel: '021-32556698 '
                },
                {
                    city: '上海剧院',
                    tel: '021-69112921'
                },
                {
                    city: '上海剧院',
                    tel: '15810204940'
                },
                {
                    city: '西安',
                    tel: '17802900856'
                },
                {
                    city: '银川',
                    tel: '17802900856 '
                },
                {
                    city: '杭州',
                    tel: '0571-87979007'
                },
                {
                    city: '杭州开心麻花剧场',
                    tel: '0571-88112730'
                }
            ]
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {},
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        tel: function (e) {
            var tel = e.currentTarget.dataset.tel;
            uni.makePhoneCall({
                phoneNumber: tel,
                success: function () {
                    console.log('拨号成功！');
                },
                fail: function () {
                    console.log('拨号失败！');
                }
            });
        }
    }
};
</script>
<style>
.warning {
    text-align: center;
    font-size: 28rpx;

    color: #181818;
}
.line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 30rpx;
    padding: 30rpx 0;
    border-bottom: 1px solid #eeeeee;
    color: #333333;
}
.line .tel {
    display: flex;
    align-items: center;
}
.line .tel .custom-icon {
    padding-left: 20rpx;
    width: 24rpx;
    height: 24rpx;
}
</style>
