<template>
	<text v-if="userInfo.show_price && token">
		<text class="price-symbol price-font">¥</text>
		<template v-if="goodsSkuDetail.discount_price > 0">
			<text class="price price-font">{{ goodsSkuDetail.discount_price }}</text>
		</template>
		<template v-else>
			<template v-if="goodsSkuDetail.member_price > 0">
				<text class="price price-font">{{ goodsSkuDetail.member_price }}</text>
			</template>
			<template v-else>
				<text class="price price-font">{{ goodsSkuDetail.price}}</text>
			</template>
			
		</template>
	</text>
</template>

<script>
import { mapGetters } from 'vuex';
export default {
	props: {
		goodsSkuDetail: {
			type: Object
		}
	},
	data() {
		return {
			token: uni.getStorageSync('token')
		};
	},
	computed: {
		...mapGetters(['userInfo'])
	},
	// inject: ['showDiscount']
};
</script>

<style lang="scss" scoped></style>
