Goodslist.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  2. <home-base :show="false" style="position: absolute;top:0;right:0;left:0;bottom:0"><view style="height:100%" class="scroll-view-wrapper div">
  3. <home-common-search :from="'store'" :value="params.keyword"></home-common-search>
  4. <view class="scroll-view div" style="position:relative"><goodslist-body></goodslist-body></view>
  5. </view></home-base>
  6. </template>
  7. <script>
  8. import {getFontSize} from '@/util/common'
  9. import HomeBase from '../HomeBase'
  10. import CommonStoreFooter from '../common/CommonStoreFooter'
  11. import HomeCommonSearch from '../common/HomeCommonSearch'
  12. import { mapState, mapMutations } from 'vuex'
  13. import GoodslistBody from './GoodslistBody'
  14. export default {
  15. name: 'StoreGoodslist',
  16. components:{
  17. HomeBase,
  18. HomeCommonSearch,
  19. CommonStoreFooter,
  20. GoodslistBody
  21. },
  22. computed:{
  23. fontSize(){
  24. return getFontSize()
  25. },
  26. },
  27. data(){
  28. return {
  29. store_id: '',
  30. params: {
  31. keyword: ''
  32. }
  33. }
  34. },
  35. onLoad: function (option) {
  36. this.store_id=option.id ? option.id : ''
  37. this.params.keyword=option.keyword ? option.keyword : ''
  38. }
  39. }
  40. </script>
  41. <style scoped lang="scss">
  42. .scroll-view-wrapper{display: flex;flex-direction: column;}
  43. .scroll-view{flex:1}
  44. .common-search{
  45. align-items: center;
  46. display: flex;
  47. padding:0.25rem $pageSpace;
  48. box-sizing: border-box;
  49. height: $headerHeight;
  50. }
  51. .common-search input {
  52. box-sizing: border-box;
  53. width: 100%;
  54. height: 1.6rem;
  55. border-radius:0.2rem;
  56. background: #EDEDED url(../../../static/image/home/icon_search.png) no-repeat 0.6rem center;
  57. background-size:0.55rem;
  58. font-size:$fontSize;
  59. color: #999;
  60. padding-left:1.65rem;
  61. border: 0;
  62. }
  63. </style>