Goodsclass.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  2. <home-base :show="false" ><view class="div category">
  3. <home-common-search :from="'store'"></home-common-search>
  4. <goodsclass-body></goodsclass-body>
  5. </view></home-base>
  6. </template>
  7. <script>
  8. import {getFontSize} from '@/util/common'
  9. import { urlencode } from '@/util/common'
  10. import HomeBase from '../HomeBase'
  11. import GoodsclassBody from './GoodsclassBody'
  12. import HomeCommonSearch from '../common/HomeCommonSearch'
  13. export default {
  14. name:'HomeGoodsclass',
  15. data () {
  16. return {
  17. id:0,
  18. keyword: ''
  19. }
  20. },
  21. onLoad: function (option) {
  22. this.id=option.id
  23. },
  24. components:{
  25. HomeBase,
  26. HomeCommonSearch,
  27. GoodsclassBody
  28. },
  29. computed:{
  30. fontSize(){
  31. return getFontSize()
  32. },
  33. ifKeywords () {
  34. if (this.keywords === '') {
  35. return true
  36. } else {
  37. return false
  38. }
  39. }
  40. },
  41. methods: {
  42. search () {
  43. uni.navigateTo({ url: '/pages/home/storegoodslist/Goodslist'+'?'+urlencode( { id:this.id, keyword: this.keyword } )})
  44. }
  45. }
  46. }
  47. </script>
  48. <style scoped lang='scss'>
  49. </style>