From c4246ca910f28014efaace64ebf92f47a673a9cf Mon Sep 17 00:00:00 2001
From: queenwuli <942534046@qq.com>
Date: Mon, 25 Jan 2021 11:47:46 +0800
Subject: [PATCH] gx
---
hive-app/pages/workbench/selectProduct/index.vue | 37 +++++++++++++++++++++++++++----------
1 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/hive-app/pages/workbench/selectProduct/index.vue b/hive-app/pages/workbench/selectProduct/index.vue
index b9b3f7f..ed1bbba 100644
--- a/hive-app/pages/workbench/selectProduct/index.vue
+++ b/hive-app/pages/workbench/selectProduct/index.vue
@@ -5,8 +5,8 @@
<view class="list">
<scroll-view class="list-left" scroll-y="true">
<uni-collapse accordion="true" @change="toggleCollapse">
- <uni-collapse-item :showAnimation="true" :title="item.name" class="list-left-row"
- v-if="item.parentId===0" v-for="item in goodsTypeList">
+ <uni-collapse-item :showAnimation="true" :open="item.id==cateId" :title="item.name" :isShowIcon="isShowIcon(item)" class="list-left-row"
+ v-if="item.parentId===0" v-for="(item, index) in goodsTypeList">
<view class="list-row-wrap">
<view class="list-row" :class="op.id==cateId?'blue':''"
v-for="op in goodsTypeList"
@@ -42,6 +42,7 @@
<view v-if="goodsList.length">
<uni-load-more :status="loadStatus" color="#a5abaf"></uni-load-more>
</view>
+ <no-record :isShow="!goodsList.length" txt="暂无产品/项目"></no-record>
</scroll-view>
</view>
<view class="footer">
@@ -75,6 +76,7 @@
data(){
return{
id: '',
+ tabIndex: '0',
goodsTypeList: [],
goodsList: [],
cateId: null,//当前产品类别id
@@ -117,7 +119,7 @@
onPullDownRefresh(){
this.reloadData();
let timer = setTimeout(function () {
- uni.startPullDownRefresh();
+ uni.stopPullDownRefresh();
clearTimeout(timer);
timer = null;
}, 800);
@@ -131,6 +133,15 @@
},
scrolltolower(){
this.loadGoodsList()
+ },
+ isShowIcon(item){
+ let count = 0;
+ this.goodsTypeList.forEach((op) => {
+ if(op.parentId==item.id){
+ count ++
+ }
+ });
+ return count?true:false;
},
openShoppingCart(){
this.$refs.shopCart.toggle()
@@ -188,6 +199,9 @@
return item.id===this.cateId
})
return arr.length?arr[0].parentId:'';
+ },
+ toggleAll(arr){
+ this.changeGoodsType('');
},
// 打开关闭面板
toggleCollapse(arr){
@@ -287,7 +301,7 @@
display: flex;
flex-direction: column;
height: 100%;
- padding: 10px 0 0;
+ padding-top: 10px;
box-sizing: border-box;
}
.search-bar{
@@ -336,11 +350,11 @@
padding: 10px;
margin: 0 10px 10px;
border: 1px solid #EDEAF4;
- box-shadow:0 6px 6px rgba(237,234,244,0.5);
+ box-shadow:0 6px 6px rgba(237,234,244,0.4);
border-radius: 4px;
font-size: 13px;
}
- .list-right-row:nth-last-of-type(1){
+ .list-row .list-right-row:nth-last-of-type(1){
margin-bottom: 0;
}
.list-right-row .product-img{
@@ -359,8 +373,11 @@
display: flex;
justify-content: space-between;
background: #FFFFFF;
- padding: 10px 10px;
- box-shadow: 0 6px 100px rgba(237,234,244,1);
+ padding: 10px;
+ padding-bottom: 10px;
+ padding-bottom: calc(10px + constant(safe-area-inset-bottom));
+ padding-bottom: calc(10px + env(safe-area-inset-bottom));
+ box-shadow: 0 -6px 6px rgba(237,234,244,0.2);
}
.footer .icon-car-wrap{
position: relative;
@@ -384,8 +401,8 @@
}
.footer .btn{
border-radius: 20px;
- line-height: 34px;
- padding: 0 24px;
+ line-height: 36px;
+ padding: 0 26px;
font-size: 14px;
}
</style>
--
Gitblit v1.9.1