|
|
|
@ -1,10 +1,11 @@ |
|
|
|
|
<template> |
|
|
|
|
<view style="height: 100%;"> |
|
|
|
|
<!-- perspective: 1000; --> |
|
|
|
|
<scroll-view v-if="typeList=='classify'" class="scroll-view goods-list" :scroll-top="scrollTop" @scroll="handleScroll" :scroll-y="true" |
|
|
|
|
:lower-threshold="lowerThreshold" @scrolltolower="handleScrolltolower" @touchstart="handleTouchStart" |
|
|
|
|
@touchmove.stop.prevent="handleTouchMove" @touchend="handleTouchEnd" @touch.stop> |
|
|
|
|
<!-- @touchmove.stop.prevent --> |
|
|
|
|
<scroll-view v-if="typeList=='classify'" class="scroll-view goods-list" :scroll-top="scrollTop" |
|
|
|
|
@scroll="handleScroll" scroll-y="true" :lower-threshold="lowerThreshold" |
|
|
|
|
@scrolltolower="handleScrolltolower" @touchstart="handleTouchStart" |
|
|
|
|
@touchmove.stop.prevent="handleTouchMove" @touchend="handleTouchEnd"> |
|
|
|
|
<!-- @touchmove.stop.prevent @touch.stop --> |
|
|
|
|
<view class="scroll-content1" :style="[scrollContentStyle]"> |
|
|
|
|
<!-- 下拉 --> |
|
|
|
|
<view class="pull-down-view"> |
|
|
|
@ -75,43 +76,43 @@ |
|
|
|
|
|
|
|
|
|
<!--search-List --> |
|
|
|
|
|
|
|
|
|
<scroll-view v-if="typeList=='goodsSearch'" :scroll-y="true" class="ht-auto goods-list" |
|
|
|
|
@scroll="handleScroll" :scroll-top="scrollTop" @scrolltolower="scroll_lower" lower-threshold="30"> |
|
|
|
|
<scroll-view v-if="typeList=='goodsSearch'" scroll-y="true" class="ht-auto goods-list" @scroll="handleScroll" |
|
|
|
|
:scroll-top="scrollTop" @scrolltolower="scroll_lower" lower-threshold="30"> |
|
|
|
|
<!-- <view class="right-content-actual pr bs" :style="'padding-bottom:'+paddBottom+'px;'"> --> |
|
|
|
|
<view v-if="(propData || null) != null && propData.length > 0" > |
|
|
|
|
|
|
|
|
|
<view v-for="(item, index) in propData" :key="index"> |
|
|
|
|
<view @click="goGoodsDetail(item.id)" class="goods-item bs"> |
|
|
|
|
<image :src="imageUrl+item.listImg" mode="aspectFill" class="goods-img bs"></image> |
|
|
|
|
<view class="goods-detail"> |
|
|
|
|
<view class="goods-title"> |
|
|
|
|
<view class="goods-text">{{item.name}}</view> |
|
|
|
|
<!-- <view v-if="(item.simple_desc || null) != null" class="goods-desc">{{item.simple_desc}}</view> --> |
|
|
|
|
<view class="goods-desc">{{item.listDescribe || ''}}</view> |
|
|
|
|
<view v-if="(propData || null) != null && propData.length > 0"> |
|
|
|
|
|
|
|
|
|
<view v-for="(item, index) in propData" :key="index"> |
|
|
|
|
<view @click="goGoodsDetail(item.id)" class="goods-item bs"> |
|
|
|
|
<image :src="imageUrl+item.listImg" mode="aspectFill" class="goods-img bs"></image> |
|
|
|
|
<view class="goods-detail"> |
|
|
|
|
<view class="goods-title"> |
|
|
|
|
<view class="goods-text">{{item.name}}</view> |
|
|
|
|
<!-- <view v-if="(item.simple_desc || null) != null" class="goods-desc">{{item.simple_desc}}</view> --> |
|
|
|
|
<view class="goods-desc">{{item.listDescribe || ''}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="goods-item-bottom"> |
|
|
|
|
<view class="goods-price"> |
|
|
|
|
<view class="new-price">¥{{item.price}}</view> |
|
|
|
|
<view class="old-price">¥{{item.originalPrice}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="goods-item-bottom"> |
|
|
|
|
<view class="goods-price"> |
|
|
|
|
<view class="new-price">¥{{item.price}}</view> |
|
|
|
|
<view class="old-price">¥{{item.originalPrice}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="goods-num"> |
|
|
|
|
<view class="icon cart cart-class" @click.stop="cartIconChoose(item.id)"> |
|
|
|
|
</view> |
|
|
|
|
<view class="goods-num"> |
|
|
|
|
<view class="icon cart cart-class" @click.stop="cartIconChoose(item.id)"> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<noMore :bgColor="'#ffffff'"></noMore> |
|
|
|
|
</view> |
|
|
|
|
<!-- 空 --> |
|
|
|
|
<view class=" empty-content" v-else> |
|
|
|
|
<image class="empty-text" mode="widthFix" :src="imagewxUrl+imgadres"></image> |
|
|
|
|
<!-- <text class="empty-text">{{ emptyText }}</text> --> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<noMore :bgColor="'#ffffff'"></noMore> |
|
|
|
|
</view> |
|
|
|
|
<!-- 空 --> |
|
|
|
|
<view class=" empty-content" v-else> |
|
|
|
|
<image class="empty-text" mode="widthFix" :src="imagewxUrl+imgadres"></image> |
|
|
|
|
<!-- <text class="empty-text">{{ emptyText }}</text> --> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- </view> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -129,7 +130,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 选择类别 --> |
|
|
|
|
<wybPopup ref="popup" type="bottom" height="500" width="500" scrollY="true" radius="6" :showCloseIcon="true"> |
|
|
|
|
<wybPopup ref="popup" type="bottom" height="500" width="500" :scrollY="true" radius="6" :showCloseIcon="true"> |
|
|
|
|
|
|
|
|
|
<cart-choose @refreshCartNum="refreshCartNum" :specificationList="specificationList" @close="close"> |
|
|
|
|
</cart-choose> |
|
|
|
@ -155,8 +156,8 @@ |
|
|
|
|
imageUrl: app.globalData.imgUrl, //图片地址 |
|
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
|
imgadres: 'goods_default_pages.png', |
|
|
|
|
scrollTop:0, |
|
|
|
|
currentScrollTop:0, |
|
|
|
|
scrollTop: 0, |
|
|
|
|
currentScrollTop: 0, |
|
|
|
|
// start |
|
|
|
|
refresherThreshold: 50, |
|
|
|
|
lowerThreshold: 50, |
|
|
|
@ -205,7 +206,9 @@ |
|
|
|
|
props: { |
|
|
|
|
propData: { |
|
|
|
|
type: Array, |
|
|
|
|
default: null |
|
|
|
|
default () { |
|
|
|
|
return [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
paddBottom: { |
|
|
|
|
type: Number, |
|
|
|
@ -213,18 +216,22 @@ |
|
|
|
|
}, |
|
|
|
|
pageData: { |
|
|
|
|
type: Object, |
|
|
|
|
default: { |
|
|
|
|
pageStart: 1, |
|
|
|
|
pageNum: 0, |
|
|
|
|
allData: 0 |
|
|
|
|
default() { |
|
|
|
|
return { |
|
|
|
|
pageStart: 1, |
|
|
|
|
pageNum: 0, |
|
|
|
|
allData: 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
selectObject: { |
|
|
|
|
type: Object, |
|
|
|
|
default: { |
|
|
|
|
selectIndex: 0, |
|
|
|
|
length: 0 |
|
|
|
|
} |
|
|
|
|
default(){ |
|
|
|
|
return { |
|
|
|
|
selectIndex: 0, |
|
|
|
|
length: 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
typeList: { |
|
|
|
|
type: String, |
|
|
|
@ -261,8 +268,8 @@ |
|
|
|
|
pullUpHeight, |
|
|
|
|
pullingUp |
|
|
|
|
} = this; |
|
|
|
|
style.transform = pullingDown&&!pullingUp ? `translateY(${pullDownHeight}px)` : `translateY(0px)`; |
|
|
|
|
style.transition = pullingDown&&!pullingUp ? `transform .1s linear` : |
|
|
|
|
style.transform = pullingDown && !pullingUp ? `translateY(${pullDownHeight}px)` : `translateY(0px)`; |
|
|
|
|
style.transition = pullingDown && !pullingUp ? `transform .1s linear` : |
|
|
|
|
`transform 0.3s cubic-bezier(0.19,1.64,0.42,0.72)`; |
|
|
|
|
return style; |
|
|
|
|
}, |
|
|
|
@ -486,14 +493,16 @@ |
|
|
|
|
width: 35px; |
|
|
|
|
height: 35px; |
|
|
|
|
color: #3DA7E7 !important; |
|
|
|
|
.font40{ |
|
|
|
|
|
|
|
|
|
.font40 { |
|
|
|
|
font-size: 35px !important; |
|
|
|
|
color: #F0AD4E; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.searchCart{ |
|
|
|
|
.searchCart { |
|
|
|
|
|
|
|
|
|
bottom: 27px !important; |
|
|
|
|
right: 30px !important; |
|
|
|
|
} |
|
|
|
@ -636,6 +645,7 @@ |
|
|
|
|
.scroll-content1 { |
|
|
|
|
width: 100%; |
|
|
|
|
padding-bottom: 40px; |
|
|
|
|
|
|
|
|
|
// position: relative; |
|
|
|
|
// height: inherit; |
|
|
|
|
.empty-view { |
|
|
|
|