<template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  <home-base :show="false" ><view class="div category">
    <home-common-search :from="'store'"></home-common-search>
    <goodsclass-body></goodsclass-body>
  </view></home-base>
</template>

<script>
import {getFontSize} from '@/util/common'

import { urlencode } from '@/util/common'

import HomeBase from '../HomeBase'

import GoodsclassBody from './GoodsclassBody'
import HomeCommonSearch from '../common/HomeCommonSearch'
export default {
  name:'HomeGoodsclass',
  data () {
    return {
      id:0,
      keyword: ''
    }
  },
  onLoad: function (option) {
    this.id=option.id
  },
  components:{
    HomeBase,
    HomeCommonSearch,
    GoodsclassBody
  },
  computed:{
    fontSize(){
      return getFontSize()
    },
    ifKeywords () {
      if (this.keywords === '') {
        return true
      } else {
        return false
      }
    }
  },
  methods: {
    search () {
      uni.navigateTo({ url: '/pages/home/storegoodslist/Goodslist'+'?'+urlencode( { id:this.id, keyword: this.keyword } )})
    }
  }
}
</script>

<style scoped lang='scss'>

</style>
