bug(轮播):

This commit is contained in:
zhangjing1
2026-03-09 18:34:59 +08:00
parent 7708f44704
commit 98d857cdde
3 changed files with 5 additions and 16 deletions

View File

@@ -3,7 +3,7 @@
* See LICENSE file for license details.
*/
import WgtCoupon from './coupon'
import WgtNearbyShop from './nearby-shop'
// import WgtNearbyShop from './nearby-shop'
import WgtCouponCard from './couponcard/index'
// export { default as HeaderHome } from './header-home'
@@ -27,7 +27,6 @@ export { default as WgtMarquees } from './marquees/index'
export { default as WgtStore } from './store'
export { default as WgtHeadline } from './headline'
// export { default as WgtImgGif } from './img-gif'
export { default as WgtHotTopic } from './hot-topic'
export { default as WgtFloorImg } from './floor-img'
export { default as WgtHomeHeader } from './home-header'
export { default as WgtHomeHeaderShop } from './home-header-shop'
@@ -42,4 +41,4 @@ export { default as WgtHotranking } from './hotranking/index'
export { default as WgtLocationModule } from './location-module/index'
export { default as WgtContentPartition } from './content-partition/index'
export { WgtCoupon, WgtNearbyShop, WgtCouponCard }
export { WgtCoupon, WgtCouponCard }

View File

@@ -106,7 +106,6 @@ function WgtSlider(props) {
className={classNames('wrapper-img', {
'rounded': config.rounded
})}
onClick={() => handleClickItem(item)}
>
<SpImage src={item.imgUrl} lazyLoad />
</View>

View File

@@ -58,7 +58,6 @@ const Slider = (props) => {
linkPage(item)
}
const swiperChange = (e) => {
const { current } = e.detail
const prevIdx = curIdx
@@ -192,9 +191,7 @@ const Slider = (props) => {
rounded: config.rounded
})}
onClick={() => {
if (item.media_type !== 'video') {
handleClickItem(item)
} else {
if (item.media_type == 'video') {
togglePlay(idx)
}
}}
@@ -202,13 +199,7 @@ const Slider = (props) => {
{/* 图片类型 */}
{item.media_type === 'img' && item.imgUrl && (
<>
{needLoginItem ? (
<SpLogin onChange={() => handleClickItem(item)}>
<SpImage src={item.imgUrl} className='slider-item__img' lazyLoad />
</SpLogin>
) : (
<SpImage src={item.imgUrl} className='slider-item__img' lazyLoad />
)}
<SpImage src={item.imgUrl} className='slider-item__img' lazyLoad />
{/* 热区 */}
{renderHotZones(item)}
</>
@@ -219,7 +210,7 @@ const Slider = (props) => {
<>
<Video
src={item.videoUrl}
autoplay={item.autoplay&&curIdx === idx}
autoplay={item.autoplay && curIdx === idx}
objectFit='cover'
showFullscreenBtn={false}
showProgress={false}