60 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Vue
		
	
	
		
		
			
		
	
	
			60 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Vue
		
	
	
|  | <template> | ||
|  | 	<view> | ||
|  | 		<view class="customer-service flex" @tap="toService" :style="{right:right+'rpx',bottom:bottom+'rpx'}"> | ||
|  | 			<image src="/static/public/icon-service.png" mode="widthFix" lazy-load></image> | ||
|  | 		</view> | ||
|  | 	</view> | ||
|  | </template> | ||
|  | 
 | ||
|  | <script> | ||
|  | 	export default { | ||
|  | 		name:"customer-service", | ||
|  | 		props:{ | ||
|  | 			right:{//距离右边多宽
 | ||
|  | 				type:Number, | ||
|  | 				default:28 | ||
|  | 			}, | ||
|  | 			bottom:{//距离底部多高
 | ||
|  | 				type:Number, | ||
|  | 				default:172 | ||
|  | 			} | ||
|  | 		}, | ||
|  | 		computed: { | ||
|  | 			// 主题颜色
 | ||
|  | 			publicColor() { | ||
|  | 				return '#0073bc' | ||
|  | 			} | ||
|  | 		}, | ||
|  | 		data() { | ||
|  | 			return {}; | ||
|  | 		}, | ||
|  | 		methods:{ | ||
|  | 			toService(){ | ||
|  | 				console.log('咨询客服') | ||
|  | 			} | ||
|  | 		} | ||
|  | 	} | ||
|  | </script> | ||
|  | 
 | ||
|  | <style> | ||
|  | .customer-service{ | ||
|  | 	justify-content: center; | ||
|  | 	align-items: center; | ||
|  | 	width: 120rpx; | ||
|  | 	height: 120rpx; | ||
|  | 	border-radius: 100%; | ||
|  | 	background-color: #FFFFFF; | ||
|  | 	box-shadow: 0 0 16rpx rgba(0,0,0,.4); | ||
|  | 	animation: scale_name 1s linear alternate infinite; | ||
|  | 	position: fixed; | ||
|  | } | ||
|  | .customer-service image{ | ||
|  | 	width: 68rpx; | ||
|  | 	height: 68rpx; | ||
|  | } | ||
|  | @keyframes scale_name{ | ||
|  | 	from{transform: scale(1);} | ||
|  | 	to{transform: scale(1.1);} | ||
|  | } | ||
|  | </style> |