<template>
	<u-row gutter="24">
		<u-col span="6" v-for="(x, i) in g" :key="i">
			<view class="good_study_two" @click="openGood(x.ID,x.MallBaseId)" :style="{ borderRadius: '20rpx' }">
				<view class="img-box">
					<view class="img-show">
						<image style="
                    width: 100%;
                    height: 100%;
                    border-radius: 20rpx 20rpx 0 0;
                  " mode="aspectFill" :src="x.BannerList[0]" />
						<!-- <view class="imgNum" v-if="x.AreaRequirement>0||x.EndAreaRequirement>0||x.ShopNum>0">
                  <span class="imgN" style="margin-bottom: 10rpx;"
                  :style="{'text-align':!x.ShopNum||x.ShopNum==''?'right':'left'}">
                    <span v-if="x.AreaRequirement>0||x.EndAreaRequirement>0">
                      面积： {{x.AreaRequirement}}
                    </span>
                    <span v-if="x.EndAreaRequirement>0&&u.MallBaseId==18">-{{x.EndAreaRequirement }}</span>
                    <template v-if="x.AreaRequirement>0||x.EndAreaRequirement>0">
                      ㎡
                    </template>
                  </span>
                  <span class="imgN" v-if="x.ShopNum>0">
                    店铺： {{x.ShopNum}}个
                  </span>
                </view> -->
					</view>
				</view>
				<view class="good-info">
					<view class="good-name">{{ x.BrandName }}</view>
					<view class="good-price-info">
						<span class="price">{{ x.FullBrandName }}</span>
					</view>
				</view>
			</view>
		</u-col>

	</u-row>
</template>
<script>
	export default {
		props: ['g'],
		data() {
			return {
				u: {},
				replace: null
			}
		},
		onLoad(options) {

		},
		mounted() {
			let use = uni.getStorageSync("mall_UserInfo")
			this.u = use
			this.replace = uni.getStorageSync('replace_page_index')
		},
		methods: {
			openGood(id, MallBaseId) {
				if (MallBaseId == 8) {
					uni.navigateTo({
						url: "/pages/kotra/brand/detail?id=" + id,
					});
					return
				}
				if (this.replace.state == '1') {
					uni.navigateTo({
						url: "/pages/kotra/brand/detail_brand?id=" + id,
					});
				} else {
					uni.navigateTo({
						url: "/pages/kotra/brand/detail_company?id=" + id,
					});
				}
			},
		}
	}
</script>
<style scoped>
	.img-show {
		position: relative;
	}

	.imgNum {
		width: 100%;
		position: absolute;
		bottom: 0;
		padding: 15rpx 27rpx 5rpx 27rpx;
		z-index: 2;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		color: #fff;
		font-size: 20rpx;
		background: rgba(23, 23, 23, 0.4);
	}

	.imgN {
		flex: 1;
	}

	.imgN:nth-child(2) {
		text-align: right;
	}
</style>