| | |
| | | <template> |
| | | <view class="container"> |
| | | <top-bar selectedTitleIndex="shop" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <input type="text" v-show="false" v-model="flushDom" /> |
| | | <view class="search"> |
| | | <u-search class="nav-search" @blur='searchGoods' placeholder="搜索商品" :show-action="false"></u-search> |
| | |
| | | :controls="false" object-fit="contain" :show-play-btn="false" :show-center-play-btn="false" |
| | | @loadedmetadata="getvideoInfo($event,'goodsList1',index)" :ref="'video'+item.id" |
| | | :style="{width:item.width,height:item.height}"></video> --> |
| | | <image :src="item.thumbnail" |
| | | <image :src="item.thumbnail" |
| | | mode="aspectFill" class="goodsImg"> |
| | | </image> |
| | | <view class="goodsInfo"> |
| | |
| | | :controls="false" object-fit="contain" :show-play-btn="false" :show-center-play-btn="false" |
| | | @loadedmetadata="getvideoInfo($event,'goodsList2',index)" :ref="'video'+item.id" |
| | | :style="{width:item.width,height:item.height}"></video> --> |
| | | <image :src="item.thumbnail" |
| | | <image :src="item.thumbnail" |
| | | mode="aspectFill" class="goodsImg"> |
| | | </image> |
| | | <view class="goodsInfo"> |
| | |
| | | </view> |
| | | <view style="display: flex;align-items: center;justify-content: center;margin-top: 20rpx;" v-if="canLoadMore"> |
| | | 没有更多数据了.................</view> |
| | | <custom-tabbar bgColor="#ffffff" selected="shop"></custom-tabbar> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import TopBar from "@/components/TopBar.vue"; |
| | | import { |
| | | getCategoryList, |
| | | getGoodsList |
| | |
| | | getSTSToken |
| | | } from '@/api/common.js' |
| | | export default { |
| | | components: {TopBar}, |
| | | data() { |
| | | return { |
| | | //记录两列高度 |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | topBarChange(titleObj) { |
| | | if (titleObj.index === 'home') { |
| | | uni.switchTab({ |
| | | url: titleObj.pagePath |
| | | }); |
| | | } else { |
| | | uni.redirectTo({ |
| | | url: titleObj.pagePath |
| | | }); |
| | | } |
| | | }, |
| | | async searchGoods(keyWard) { |
| | | this.getGoodsParam.keyword = keyWard |
| | | this.getGoodsParam.pageNumber = 1 |
| | |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | | .topBar { |
| | | position: fixed; |
| | | top: 20rpx; |
| | | left: 20rpx; |
| | | z-index: 1000 |
| | | } |
| | | </style> |