<!-- 积分 -->
<template>
	<view class="container padding-box-all b-e6">
		<view class="integral-list b-f dis-flex m-btm20 p-r" @click="navgateto(integraItem['url'])" v-for="(integraItem,index) in integralList"
		 :key="index">
			<view class="integral-item-left m-right20" :style="{'background-image':'url('+integraItem['thumb']+')'}"></view>
			<view class="integral-item-right flex-box dis-flex flex-dir-column flex-x-between">
				<view class="integral-title twolist-hidden f-28 col-3">{{integraItem['title']}}</view>
				<view class="integral-condition f-24">
					<text class="f-w f-36 m-right10">{{integraItem['use_credit1']}}</text>{{subText['credittext']}}
					<block v-if="integraItem['use_credit2']>0">
						<text class="m-left-right-10">+</text>
						<text class="f-w f-36 m-right10">{{integraItem['use_credit2']}}</text>元
					</block>
				</view>
				<view class="goods-oldPrice col-9 f-24" style="text-decoration:line-through;">市场价:{{integraItem['old_price']}}元</view>
				<view class="integral-btn col-f f-24 t-c" style="background-color: #FF4444;">去兑换</view>
			</view>
		</view>
	</view>
</template>
<script>
	import App from '@/common/js/app.js'
	export default {
		data() {
			return {

			}
		},
		props: {
			integralList: {
				type: Array,
				default: function() {
					return []
				}
			}
		},
		components: {

		},
		computed: {
			subText() {
				return uni.getStorageSync('TextSubstitution');
			}
		},
		onShow() {

		},
		mounted() {
			console.log(this.integralList)
		},
		methods: {
			navgateto(url) {
				App.navigationTo({
					url
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.integral-list:last-child {
		margin-bottom: 0 !important;
	}

	.integral-list {
		padding: 20upx;
		border-radius: 10upx;
	}

	.integral-item-left {
		width: 200upx;
		height: 200upx;
		background-size: 200upx 200upx;
		background-repeat: no-repeat;
		flex-shrink: 0;
		border-radius: 10upx;
	}

	.integral-item-right {
		color: #FF4444;

		.integral-title {
			height: 2.6em;
			line-height: 1.3em;
		}

		.goods-oldPrice {
			text-decoration: line-through;
			margin-top: 8upx;
		}

		.integral-btn {
			position: absolute;
			right: 20upx;
			bottom: 24upx;
			width: 130upx;
			height: 50upx;
			line-height: 50upx;
			border-radius: 26upx;
		}
	}
</style>
