<template>
	<view class="right-nav row">
		<view class="right-nav-button col-12" v-for="(item,index) in buttonGroup" :style="{backgroundImage:'url('+item.image+')'}"></view>
	</view>
</template>

<script>
	import { imghost } from '@/config/host.js'
	export default{
		data() {
			return {
				title: 'Hello',
				loading: true,
				buttonGroup:[
					{
						image:imghost+"/static/image/right-button-wechat.png",
						type:'wechat'
					},{
						image:imghost+"/static/image/right-button-chat.png",
						type:'chat'
					},{
						image:imghost+"/static/image/right-button-phone.png",
						type:'phone'
					},
				]
			}
		},
		onLoad() {
		
		},
		methods: {
      callPhone(phone){
        uni.makePhoneCall({
          phoneNumber: phone.toString()
        });
      },
			handle(type){
					switch (type) {
						case 'chat':
							uni.navigateTo({
								url:"/pages/ChatDetail/index?id=" + 0
							})
					}
			}
		}
	}
</script>

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