<template>
	 <view class="cart-fix" @click="toCart">
	 	<u-image width="50rpx" height="50rpx" src="/static/cart.png"></u-image>
	 	<u-badge absolute :offset="[15,10]" type="error" :count="count"></u-badge>
	 </view>
</template>
	<script>
		export default {
			computed: {
				count() {
					return this.$store.state.vuex_cartNums
				}
			},
			methods: {
				toCart() {
					uni.navigateTo({
						url:"/pages/cart/cart"
					})
				}
			},
		}
	</script>

<style lang="scss">
	.cart-fix{
		position: fixed;
		z-index: 100000;
		background: rgba($color: #00aa00, $alpha: 0.9);
		padding: 20upx;
		border-radius: 100%;
		bottom: 15%;
		right: 5%;
		box-shadow: 0upx 3upx 8upx #999;
	}
</style>
