|
@@ -22,6 +22,44 @@
|
|
|
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 44px; text-align: center;">
|
|
|
</u-tabs>
|
|
|
</view>
|
|
|
+ <!-- 盲豆筛选 -->
|
|
|
+ <view class="fixed-top-screen" v-if="scrollTop > 50">
|
|
|
+ <view class="fixed-top-screen-content flex">
|
|
|
+ <view class="fixed-top-screen-content__item flex">
|
|
|
+ <view class="title">我的盲豆:</view>
|
|
|
+ <view class="num">{{ initData.coinNum ? `${ initData.coinNum }` : '--' }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="fixed-top-screen-content__item flex" @click="changeScreen(1)">
|
|
|
+ <view class="title">价格</view>
|
|
|
+ <view class="select flex" v-if="screenIndex == 1">
|
|
|
+ <image src="../../static/core/core_up.png" mode="" v-if="priceShow" />
|
|
|
+ <image src="../../static/core/core_down.png" mode="" v-else />
|
|
|
+ </view>
|
|
|
+ <view class="select flex" v-else>
|
|
|
+ <image src="../../static/core/core_null.png" mode="" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="fixed-top-screen-content__item flex" @click="changeScreen(2)">
|
|
|
+ <view class="title" v-if="!coinActionInfo.min && !coinActionInfo.max">盲豆区间</view>
|
|
|
+ <view class="title flex" v-else>
|
|
|
+ <view v-if="coinActionInfo.min">{{ coinActionInfo.min }}</view>
|
|
|
+ <view v-if="coinActionInfo.max">-{{ coinActionInfo.max }}</view>
|
|
|
+ <view>{{ coinActionInfo.desc }}</view>
|
|
|
+ </view>
|
|
|
+ <u-icon name="arrow-up" size="13" color="#fff" v-if="screenShow"></u-icon>
|
|
|
+ <u-icon name="arrow-down" size="13" color="#fff" v-else></u-icon>
|
|
|
+ </view>
|
|
|
+ <view class="fixed-top-screen-content__coin" v-if="screenShow">
|
|
|
+ <view class="fixed-top-screen-content__coin__list">
|
|
|
+ <view class="item flex" :class="{ 'action': coinActionIndex == index }" v-for="(item, index) in coinList" :key="index" @click="selectCoin(item, index)">
|
|
|
+ <text v-if="item.min">{{ item.min }}</text>
|
|
|
+ <text v-if="item.max">-{{ item.max }}</text>
|
|
|
+ <text>{{ item.desc }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="core-none"></view>
|
|
|
|
|
@@ -94,6 +132,12 @@
|
|
|
</view>
|
|
|
<view class="core-goods-list-item"></view>
|
|
|
</view>
|
|
|
+ <view class="flex empty" v-if="!list.length">
|
|
|
+ <view class="center">
|
|
|
+ <image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png" mode=""></image>
|
|
|
+ <view class="center-font">还没有商品</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<custom-tab-bar :activeValue="'core'" />
|
|
@@ -110,20 +154,65 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- imgTop: [],
|
|
|
- goods: [],
|
|
|
- exclusive: [],
|
|
|
- exclusiveSingle: [],
|
|
|
pageNum: 1,
|
|
|
total: 0,
|
|
|
list: [],
|
|
|
-
|
|
|
- /////////
|
|
|
+ exclusiveSingle: [],
|
|
|
+ categoryId: '',
|
|
|
classifyList: [], // 分类列表
|
|
|
classifyIndex: 0, // 分类选中下标
|
|
|
classifyListFilter: [],
|
|
|
swiperList: [], // 轮播图
|
|
|
goodsTitle: '',
|
|
|
+ scrollTop: 0,
|
|
|
+ screenIndex: 0,
|
|
|
+ priceShow: false,
|
|
|
+ priceSort: null,
|
|
|
+ screenShow: false,
|
|
|
+ initData: {},
|
|
|
+ coinNum:{
|
|
|
+ startPrice: null,
|
|
|
+ endPrice: null
|
|
|
+ },
|
|
|
+ coinActionIndex: 0,
|
|
|
+ coinActionInfo: {},
|
|
|
+ coinList:[
|
|
|
+ {
|
|
|
+ min: null,
|
|
|
+ max: null,
|
|
|
+ desc: '全部'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 100,
|
|
|
+ desc: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 101,
|
|
|
+ max: 200,
|
|
|
+ desc: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 201,
|
|
|
+ max: 500,
|
|
|
+ desc: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 501,
|
|
|
+ max: 1000,
|
|
|
+ desc: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1001,
|
|
|
+ max: 5000,
|
|
|
+ desc: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 5000,
|
|
|
+ max: null,
|
|
|
+ desc: '以上'
|
|
|
+ },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -132,6 +221,14 @@
|
|
|
this.getClassify()
|
|
|
this.getSwiper()
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ if(uni.getStorageSync('token')) {
|
|
|
+ this.getBean()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onPageScroll: function(e) {
|
|
|
+ this.scrollTop = e.scrollTop
|
|
|
+ },
|
|
|
methods: {
|
|
|
pageList() {
|
|
|
this.pageNum = 1
|
|
@@ -183,8 +280,7 @@
|
|
|
} else {
|
|
|
this.classifyListFilter =[ [ ...this.classifyList ] ]
|
|
|
}
|
|
|
- this.classifyList.unshift({ name: '全部' })
|
|
|
-
|
|
|
+ this.classifyList.unshift({ name: '全部', categoryId: '' })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -233,7 +329,7 @@
|
|
|
});
|
|
|
let data = {
|
|
|
categoryId: this.categoryId,
|
|
|
- tagIds: this.tagIds,
|
|
|
+ priceSort: this.priceSort,
|
|
|
...this.coinNum,
|
|
|
noToken: true
|
|
|
}
|
|
@@ -254,9 +350,50 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ getBean() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ });
|
|
|
+ $http.post('/api/v1/mp/user/mine/init', {}).then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.initData = res.data
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ uni.hideLoading();
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
// 切换分类
|
|
|
changeClassify(e) {
|
|
|
+ console.log(e);
|
|
|
+ this.categoryId = e.categoryId
|
|
|
this.classifyIndex = e.index
|
|
|
+ this.pageList()
|
|
|
+ },
|
|
|
+
|
|
|
+ // 盲豆筛选切换
|
|
|
+ changeScreen(num) {
|
|
|
+ this.screenIndex = num
|
|
|
+ if(num == 1) {
|
|
|
+ this.priceShow = !this.priceShow
|
|
|
+ this.priceSort = this.priceShow ? 1 : 2
|
|
|
+ this.pageList()
|
|
|
+ } else if (num == 2) {
|
|
|
+ this.screenShow = !this.screenShow
|
|
|
+ this.priceShow = false
|
|
|
+ this.priceSort = null
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ selectCoin(item, index) {
|
|
|
+ this.coinActionIndex = index
|
|
|
+ this.coinActionInfo = item
|
|
|
+ this.screenShow = !this.screenShow
|
|
|
+ this.coinNum.endPrice = item.max
|
|
|
+ this.coinNum.startPrice = item.min
|
|
|
+ this.pageList()
|
|
|
},
|
|
|
|
|
|
// 跳转点击事件
|
|
@@ -407,6 +544,61 @@
|
|
|
&-classify {
|
|
|
padding-bottom: 20rpx;
|
|
|
}
|
|
|
+
|
|
|
+ // 盲豆筛选
|
|
|
+ &-screen {
|
|
|
+ padding: 0 34rpx;
|
|
|
+ height: 64rpx;
|
|
|
+
|
|
|
+ &-content {
|
|
|
+ position: relative;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 0 24rpx;
|
|
|
+ color: #fff;
|
|
|
+ height: 100%;
|
|
|
+ background: #F9822C;
|
|
|
+
|
|
|
+ &__item {
|
|
|
+ .title {
|
|
|
+ margin-right: 14rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .select {
|
|
|
+ flex-direction: column;
|
|
|
+
|
|
|
+ image {
|
|
|
+ width: 18rpx;
|
|
|
+ height: 26rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &__coin {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ bottom: -390rpx;
|
|
|
+ width: 200rpx;
|
|
|
+ height: 390rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
+ box-shadow: 0px 0px 2px 0px rgba(100, 100, 100, 0.1);
|
|
|
+
|
|
|
+ &__list {
|
|
|
+ padding-top: 20rpx;
|
|
|
+ color: #666;
|
|
|
+
|
|
|
+ .item {
|
|
|
+ margin-bottom: 30rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ line-height: 26rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .action {
|
|
|
+ color: #F9822C;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 轮播
|
|
@@ -599,8 +791,7 @@
|
|
|
}
|
|
|
|
|
|
&-coin {
|
|
|
- height: 30rpx;
|
|
|
-
|
|
|
+ height: 34rpx;
|
|
|
font-size: 24rpx;
|
|
|
justify-content: space-between;
|
|
|
margin-bottom: 24rpx;
|
|
@@ -616,7 +807,7 @@
|
|
|
|
|
|
image {
|
|
|
width: 34rpx;
|
|
|
- height: 30rpx;
|
|
|
+ height: 34rpx;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -638,8 +829,22 @@
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .empty {
|
|
|
+ .center {
|
|
|
+ text-align: center;
|
|
|
+ &-img {
|
|
|
+ width: 228rpx;
|
|
|
+ height: 320rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-font {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #999999;
|
|
|
+ margin-bottom: 200rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
-<style lang="scss" scoped>
|
|
|
-
|
|
|
-</style>
|