<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>
            </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 {
                replace: null
            }
        },
        onLoad(options) {
            
        },
        mounted() {
            let uid = uni.getStorageSync("mall_UserInfo")
            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>