问题修复

This commit is contained in:
donqi 2022-06-22 17:38:20 +08:00
parent c8d40a0d16
commit 64a2688d80
3 changed files with 11 additions and 9 deletions

View File

@ -1,14 +1,14 @@
<template> <template>
<view> <view>
<!-- 搜索栏 --> <!-- 搜索栏 -->
<view class="cu-bar search bg-white"> <!-- <view class="cu-bar search bg-white">
<view class="search-form round"> <view class="search-form round">
<text class="cuIcon-search"></text> <text class="cuIcon-search"></text>
<input @confirm="searchGoods" :adjust-position="true" type="text" placeholder="输入搜索内容" <input @confirm="searchGoods" :adjust-position="true" type="text" placeholder="输入搜索内容"
confirm-type="search"></input> confirm-type="search"></input>
</view> </view>
</view> </view> -->
<view class="VerticalBox" :style="'height:calc(' + containerHeight + ' - 100rpx)'"> <view class="VerticalBox" :style="'height:calc(' + containerHeight + ')'">
<scroll-view class="VerticalNav nav" scroll-y scroll-with-animation :scroll-top="verticalNavTop"> <scroll-view class="VerticalNav nav" scroll-y scroll-with-animation :scroll-top="verticalNavTop">
<view class="cu-item" :class="item.goodsCategoryId==tabCur?'text-main-color cur':''" v-for="(item,index) in list" <view class="cu-item" :class="item.goodsCategoryId==tabCur?'text-main-color cur':''" v-for="(item,index) in list"
:key="index" @tap="tabSelect" :data-index="index" :data-id="item.goodsCategoryId" :key="index" @tap="tabSelect" :data-index="index" :data-id="item.goodsCategoryId"

View File

@ -30,9 +30,9 @@
this.offBindEvent(); this.offBindEvent();
}, },
methods: { methods: {
async loadData() { async loadData(params = {}) {
// this.categoryList = await this.$api.data('categoryList'); // this.categoryList = await this.$api.data('categoryList');
let res = await this.$request.getProductCategories({deptId: this.$globalData.deptId}); let res = await this.$request.getProductCategories(params);
this.categoryList = res[1].data.data; this.categoryList = res[1].data.data;
}, },
bindEvent() { bindEvent() {
@ -52,7 +52,9 @@
}) })
}, },
searchType(keyWords) { searchType(keyWords) {
console.log("搜索" + keyWords) this.loadData({
goodsCategoryName: keyWords
});
} }
} }
} }

View File

@ -18,11 +18,11 @@
<!-- 轮播图视频 --> <!-- 轮播图视频 -->
<swiper :class="changeSwiperHeight ? 'sm-screen-swiper' : 'sm-screen-swiper lg-screen-swiper'" @change="changeSwiper"> <swiper :class="changeSwiperHeight ? 'sm-screen-swiper' : 'sm-screen-swiper lg-screen-swiper'" @change="changeSwiper">
<swiper-item v-if="productDetail.goodsVideoUrl"> <swiper-item v-if="productDetail.goodsVideoUrl">
<video id="productVideo" :src="productDetail.goodsVideoUrl" :controls="true" :autoplay="false" <video style="width: 100%; height: 100%;" id="productVideo" :src="productDetail.goodsVideoUrl" :controls="true" :autoplay="false"
:show-center-play-btn="true" :show-fullscreen-btn="false" @click="clickSwiper($event, item, 0)"></video> :show-center-play-btn="true" :show-fullscreen-btn="false" @click="clickSwiper($event, item, 0)"></video>
</swiper-item> </swiper-item>
<swiper-item v-for="(item,index) in swiperList" :key="item.goodsImgsId" @click="clickSwiper($event, item, 1)"> <swiper-item v-for="(item,index) in swiperList" :key="item.goodsImgsId" @click="clickSwiper($event, item, 1)">
<image :src="item.imgUrl" mode="aspectFill"></image> <image style="width: 100%; height: 100%;" :src="item.imgUrl" mode="aspectFit"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
<!-- 价格及活动栏 --> <!-- 价格及活动栏 -->
@ -266,7 +266,7 @@
}, },
clickSwiper(e, item, type) { clickSwiper(e, item, type) {
if (type === 1) { if (type === 1) {
this.viewImage(item.url); this.viewImage(item.imgUrl);
} else if (type === 0) { } else if (type === 0) {
this.pauseVideo(e); this.pauseVideo(e);
} }