<template>
	<view class="container">
		<navBar title="客服中心" :back="true" color="#333333" background="#FFFFFF" />
		
		
		<view class="server">
			<image src="../../../static/other/yhk.png" mode=""></image>
		</view>
		<view v-if="phone" class="kefu">
			<view class="dian"></view>
			<view class="">客服手机号：{{phone}}</view>
			<view class="yijian"><u-button @click="call(phone)" color="#207CF7" size="mini" type="primary" shape="circle"
					text="一键拨号"></u-button></view>
		</view>
		<view v-if="weiChat" class="kefu">
			<view class="dian"></view>
			<view>客服微信号：{{weiChat}}</view>
			<view class="yijian"><u-button @click="fhuzhi" color="#207CF7" size="mini" type="primary" shape="circle"
					text="一键复制"></u-button></view>
		
		</view>
		<!-- <view class="sds">dfhsfsdh25</view> -->
		<block v-if="code">
			<view class="kefu">
				<view class="dian"></view>
				<view class="">客服二维码</view>
			</view>
			<view class="qrcode_path">
				<image @click="viewsave(code)" :src="code" mode="widthFix"></image>
				<!-- <image src="@/static/images/head.jpg" mode="widthFix"></image> -->
			</view>
		</block>
		
	</view>
</template>

<script>
	// import navBar from '@/components/navBar/index.vue'
	export default {
		// components: {
		// 	navBar
		// },
		data() {
			return {
			phone:'15609038522',
			weiChat:'qweqwe',
			code:'https://img0.baidu.com/it/u=3232582821,3516640051&fm=253&fmt=auto&app=138&f=JPEG?w=625&h=500'
			}
		},
		onLoad() {

		},
		methods: {
			viewsave(e) {
				uni.previewImage({
					urls: [e],
					current: 0
				})
			},
			fhuzhi() {
				var that = this;
				uni.setClipboardData({
					data: that.weiChat,
					success: function() {
						uni.showToast({
							title: '微信号已复制'
						})
					}
				});
			},
 call(e){
    wx.makePhoneCall({
      phoneNumber: e //仅为示例，并非真实的电话号码
    })
  },
		}
	}
</script>

<style lang="scss" scoped>
	@import "./index.scss";
</style>