From 4eaf6d8835d4e9b204f13d012f13bbd8a94a21cc Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期日, 21 七月 2024 22:52:37 +0800
Subject: [PATCH] lll
---
wechat_jiaxuan/pages/discover/discover.js | 5
wechat_jiaxuan/pages/userinfo/mysub.js | 73 +---
wechat_jiaxuan/pages/consult/consult.wxss | 26 +
wechat_jiaxuan/pages/consult/consult.wxml | 36 +
wechat_jiaxuan/components/disProduct/index.js | 22 +
wechat_jiaxuan/components/disProduct/index.less | 127 ++++--
wechat_jiaxuan/components/disRealpic/index.less | 20
wechat_jiaxuan/pages/discover/discover.less | 13
wechat_jiaxuan/pages/userinfo/collect.js | 12
wechat_jiaxuan/components/authCard/authCard.less | 8
wechat_jiaxuan/pages/discover/discover.wxss | 6
wechat_jiaxuan/pages/homeId/index.js | 47 +-
wechat_jiaxuan/pages/discover/discover.wxml | 12
wechat_jiaxuan/pages/consult/consult.js | 46 +-
wechat_jiaxuan/pages/store/staff.wxml | 2
wechat_jiaxuan/pages/store/store.wxml | 2
wechat_jiaxuan/pages/userinfo/favorite.wxml | 42 -
wechat_jiaxuan/pages/consult/consult.less | 26 +
wechat_jiaxuan/components/disCase/index.js | 23 +
wechat_jiaxuan/components/disCase/index.wxml | 93 ++--
wechat_jiaxuan/components/disCase/index.wxss | 15
wechat_jiaxuan/pages/userinfo/favorite.js | 80 +++
wechat_jiaxuan/components/authCard/authCard.wxss | 8
wechat_jiaxuan/components/authCard/authCard.wxml | 2
wechat_jiaxuan/components/disRealpic/index.js | 22 +
wechat_jiaxuan/project.private.config.json | 2
wechat_jiaxuan/components/disCase/index.less | 25
wechat_jiaxuan/components/disRealpic/index.wxml | 104 +++--
wechat_jiaxuan/pages/store/info.wxml | 2
wechat_jiaxuan/components/disRealpic/index.wxss | 15
wechat_jiaxuan/components/disProduct/index.wxss | 22
wechat_jiaxuan/components/disProduct/index.wxml | 129 +++---
32 files changed, 642 insertions(+), 425 deletions(-)
diff --git a/wechat_jiaxuan/components/authCard/authCard.less b/wechat_jiaxuan/components/authCard/authCard.less
index 532c928..dfadc94 100644
--- a/wechat_jiaxuan/components/authCard/authCard.less
+++ b/wechat_jiaxuan/components/authCard/authCard.less
@@ -113,6 +113,14 @@
width: 36rpx;
}
}
+ .text{
+ flex: 1;
+ overflow : hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ }
}
.addr{
display: flex;
diff --git a/wechat_jiaxuan/components/authCard/authCard.wxml b/wechat_jiaxuan/components/authCard/authCard.wxml
index 06601ff..2754790 100644
--- a/wechat_jiaxuan/components/authCard/authCard.wxml
+++ b/wechat_jiaxuan/components/authCard/authCard.wxml
@@ -32,7 +32,7 @@
<view class="icon">
<image src="../../static/icon/mendian_item.png" mode="widthFix"></image>
</view>
- <text>{{ item.name }}</text>
+ <text class="text">{{ item.name }}</text>
</view>
<view class="addr">
<view class="left">
diff --git a/wechat_jiaxuan/components/authCard/authCard.wxss b/wechat_jiaxuan/components/authCard/authCard.wxss
index 60a6a1b..c03535e 100644
--- a/wechat_jiaxuan/components/authCard/authCard.wxss
+++ b/wechat_jiaxuan/components/authCard/authCard.wxss
@@ -114,6 +114,14 @@
.wrap2 .list .item .name .icon image {
width: 36rpx;
}
+.wrap2 .list .item .name .text {
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+}
.wrap2 .list .item .addr {
display: flex;
justify-content: space-between;
diff --git a/wechat_jiaxuan/components/disCase/index.js b/wechat_jiaxuan/components/disCase/index.js
index f10577b..835f66a 100644
--- a/wechat_jiaxuan/components/disCase/index.js
+++ b/wechat_jiaxuan/components/disCase/index.js
@@ -4,7 +4,7 @@
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
-
+ menuButtonInfo: Object
},
data: {
activeIndex: -1,
@@ -15,6 +15,7 @@
cateList: [],
dataList: [],
+ total: 0,
pageNum: 1,
pageSize: 10,
query: '',
@@ -46,13 +47,30 @@
catalogCode,pageNum,pageSize,tagCodes, sortType,query
}).then(res => {
if(res.data){
- this.setData({ dataList: res.data.records })
+ this.setData({
+ total: res.data.total,
+ dataList: [...this.data.dataList, ...res.data.records],
+ })
}
})
+ },
+ scrolltolower() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, pageNum } = this.data
+ if(total > dataList.length){
+ this.setData({ pageNum: pageNum + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
},
statusChange(e) {
const sortType = e.currentTarget.dataset.status
this.setData({sortType})
+ this.setData({ pageNum: 1,dataList: [],total: 0})
this.getList()
},
handleAction(e){
@@ -86,6 +104,7 @@
cateList[activeIndex].paramIndex = -1
cateList[activeIndex].paramName = ''
}
+ this.setData({ pageNum: 1,dataList: [],total: 0})
this.setData({ tagCodes, cateList })
console.log('tagCodes', tagCodes);
},
diff --git a/wechat_jiaxuan/components/disCase/index.less b/wechat_jiaxuan/components/disCase/index.less
index 0585800..6e72dc4 100644
--- a/wechat_jiaxuan/components/disCase/index.less
+++ b/wechat_jiaxuan/components/disCase/index.less
@@ -1,4 +1,4 @@
-.search_wrap {
+.search_wrap{
width: 670rpx;
height: 72rpx;
margin: 24rpx auto;
@@ -8,20 +8,28 @@
display: flex;
align-items: center;
background-color: #F7F7F7;
-
- image {
+ image{
width: 28rpx;
margin-right: 16rpx;
}
}
-
.app {
height: 100%;
width: 100%;
+ .home_content{
+ height: 100%;
+ }
}
-.main_content {
- height: calc(100% - 120rpx);
+.home_top{
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
+.main_content{
+ height: 100%;
+ padding-top: 120rpx;
.query_wrap_scroll{
width: 670rpx;
padding: 0 40rpx;
@@ -97,13 +105,11 @@
.status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
align-items: center;
-
+ height: 100rpx;
.active {
color: var(--themeColor);
}
-
.separate {
margin: 0 12rpx;
width: 1rpx;
@@ -113,6 +119,7 @@
}
.goods_list{
padding: 12rpx 40rpx;
+ height: calc( 100% - 188rpx);
.item{
width: 100%;
margin-bottom: 32rpx;
diff --git a/wechat_jiaxuan/components/disCase/index.wxml b/wechat_jiaxuan/components/disCase/index.wxml
index e4ffba0..e571ee8 100644
--- a/wechat_jiaxuan/components/disCase/index.wxml
+++ b/wechat_jiaxuan/components/disCase/index.wxml
@@ -1,54 +1,59 @@
<view class="app">
- <view class="search_wrap">
- <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
- <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储妗堜緥鍚嶇О" />
+ <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px">
+ <view class="search_wrap">
+ <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
+ <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储妗堜緥鍚嶇О" />
+ </view>
</view>
<!-- -->
- <view class="main_content">
- <scroll-view class="query_wrap_scroll" scroll-x>
- <view class="query_wrap">
- <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams">
- <view class="name">{{ item.paramName || item.labelName }}</view>
- <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- </view>
- </scroll-view>
- <!-- param -->
- <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param">
- <view class="list">
- <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
- </view>
- <view class="btns">
- <view class="btn" bindtap="cancelParam">鍙栨秷</view>
- <view bindtap="subParam" class="btn sub">纭</view>
- </view>
- </view>
- <view class="status">
- <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">榛樿</view>
- <view class="separate"></view>
- <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
- <view class="separate"></view>
- <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">鏈�鏂�</view>
- </view>
- <!-- goods_list -->
- <view class="goods_list">
- <view wx:for="{{ dataList }}" data-id="{{ item.id }}" class="item" bindtap="handleDetail">
- <view class="img_wrap">
- <image src="{{ item.coverImage }}" class="img"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="content">
- <view class="name">{{ item.title }}</view>
- <view class="info">
- <image wx:if="{{ !item.isCollection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>{{ item.viewCount }}</text>
+ <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;">
+ <view class="main_content">
+ <scroll-view class="query_wrap_scroll" scroll-x>
+ <view class="query_wrap">
+ <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams">
+ <view class="name">{{ item.paramName || item.labelName }}</view>
+ <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" />
</view>
</view>
+ </scroll-view>
+ <!-- param -->
+ <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param">
+ <view class="list">
+ <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
+ </view>
+ <view class="btns">
+ <view class="btn" bindtap="cancelParam">鍙栨秷</view>
+ <view bindtap="subParam" class="btn sub">纭</view>
+ </view>
</view>
+ <view class="status">
+ <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">榛樿</view>
+ <view class="separate"></view>
+ <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
+ <view class="separate"></view>
+ <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">鏈�鏂�</view>
+ </view>
+ <!-- goods_list -->
+ <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list">
+ <view wx:for="{{ dataList }}" data-id="{{ item.id }}" class="item" bindtap="handleDetail">
+ <view class="img_wrap">
+ <image src="{{ item.coverImage }}" class="img"></image>
+ <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ </view>
+ <view class="content">
+ <view class="name">{{ item.title }}</view>
+ <view class="info">
+ <image wx:if="{{ !item.isCollection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
+ <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
+ <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text>
+ <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
+ <text>{{ item.viewCount }}</text>
+ </view>
+ </view>
+ </view>
+ </scroll-view>
</view>
</view>
+
</view>
\ No newline at end of file
diff --git a/wechat_jiaxuan/components/disCase/index.wxss b/wechat_jiaxuan/components/disCase/index.wxss
index 247742c..f297271 100644
--- a/wechat_jiaxuan/components/disCase/index.wxss
+++ b/wechat_jiaxuan/components/disCase/index.wxss
@@ -17,8 +17,18 @@
height: 100%;
width: 100%;
}
+.app .home_content {
+ height: 100%;
+}
+.home_top {
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
.main_content {
- height: calc(100% - 120rpx);
+ height: 100%;
+ padding-top: 120rpx;
}
.main_content .query_wrap_scroll {
width: 670rpx;
@@ -92,8 +102,8 @@
.main_content .status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
align-items: center;
+ height: 100rpx;
}
.main_content .status .active {
color: var(--themeColor);
@@ -106,6 +116,7 @@
}
.main_content .goods_list {
padding: 12rpx 40rpx;
+ height: calc(100% - 188rpx);
}
.main_content .goods_list .item {
width: 100%;
diff --git a/wechat_jiaxuan/components/disProduct/index.js b/wechat_jiaxuan/components/disProduct/index.js
index e932f66..6fd1dbd 100644
--- a/wechat_jiaxuan/components/disProduct/index.js
+++ b/wechat_jiaxuan/components/disProduct/index.js
@@ -1,9 +1,10 @@
-import { getCatalogList, getZhongTaiProductPage } from '../../api/index'
+import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index'
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
+ menuButtonInfo: Object
},
/**
@@ -17,6 +18,7 @@
datalist: [],
pageNum: 1,
pageSize: 10,
+ total: 0,
query: '',
sortType: 'NORMAL',
catalogCode: ""
@@ -52,7 +54,7 @@
},
getTag() {
const catalogCode = this.data.catalogCode
- getCatalogList({
+ getCataLogTagList({
catalogCode
})
},
@@ -70,14 +72,30 @@
})
})
},
+ scrolltolower() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, datalist, pageNum } = this.data
+ if(total > datalist.length){
+ this.setData({ pageNum: pageNum + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
+ },
cateClick(e) {
const catalogCode = e.currentTarget.dataset.code
this.setData({ catalogCode })
+ this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.getTag()
this.getList()
},
statusChange(e) {
const sortType = e.currentTarget.dataset.status
this.setData({sortType})
+ this.setData({ pageNum: 1,datalist: [],total: 0})
this.getList()
},
handleDetail(e) {
diff --git a/wechat_jiaxuan/components/disProduct/index.less b/wechat_jiaxuan/components/disProduct/index.less
index 7da90da..ccb6a20 100644
--- a/wechat_jiaxuan/components/disProduct/index.less
+++ b/wechat_jiaxuan/components/disProduct/index.less
@@ -1,11 +1,6 @@
-.home_top{
- // position: fixed;
- z-index: 9999;
- width: 100%;
- background-color: #fff;
- // border: 1px solid red;
-}
-.search_wrap{
+
+
+.search_wrap {
width: 670rpx;
height: 72rpx;
margin: 24rpx auto;
@@ -15,24 +10,38 @@
display: flex;
align-items: center;
background-color: #F7F7F7;
- image{
+
+ image {
width: 28rpx;
margin-right: 16rpx;
}
}
-.app{
+
+.app {
height: 100%;
width: 100%;
+ .home_content{
+ height: 100%;
+ }
}
-.main_content{
+
+.home_top {
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
+
+.main_content {
display: flex;
- height: calc( 100% - 120rpx );
- .main_left{
+ padding-top: 120rpx;
+ height: 100%;
+ .main_left {
width: 160rpx;
height: 100%;
- overflow-y: auto;
border-radius: 0rpx 16rpx 16rpx 0rpx;
- .item{
+
+ .item {
width: 160rpx;
height: 100rpx;
background: #F7F7F7;
@@ -43,40 +52,47 @@
justify-content: center;
align-items: center;
}
- .active{
+
+ .active {
background-color: #fff;
font-weight: 500;
font-size: 30rpx;
color: #111111;
}
}
- .main_right{
+
+ .main_right {
flex: 1;
position: relative;
- .query_wrap{
+ height: 100%;
+ .query_wrap {
display: flex;
- .item{
+ .item {
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
- color: #666666;
+ color: #666666;
flex: 1;
- .name{
+
+ .name {
margin-right: 12rpx;
}
}
}
- .query_form{
+
+ .query_form {
position: absolute;
z-index: 99;
background-color: #fff;
- .list{
+
+ .list {
width: 100%;
display: flex;
flex-wrap: wrap;
padding: 30rpx 40rpx;
- .item{
+
+ .item {
width: 154rpx;
height: 72rpx;
text-align: center;
@@ -90,18 +106,22 @@
text-overflow: ellipsis;
margin-right: 24rpx;
margin-bottom: 24rpx;
- &:nth-of-type(3n){
+
+ &:nth-of-type(3n) {
margin-right: 0;
}
}
- .active{
+
+ .active {
color: var(--themeColor);
- background: rgba(176,135,113,0.08);
+ background: rgba(176, 135, 113, 0.08);
}
}
- .btns{
+
+ .btns {
display: flex;
- .btn{
+
+ .btn {
width: 296rpx;
height: 88rpx;
background: #E5E5E5;
@@ -110,45 +130,53 @@
justify-content: center;
align-items: center;
}
- .sub{
+
+ .sub {
background: var(--themeColor);
color: #fff;
}
}
}
- .status{
+
+ .status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
align-items: center;
- .active{
+ height: 92rpx;
+ .active {
color: var(--themeColor);
}
- .separate{
+
+ .separate {
margin: 0 12rpx;
width: 1rpx;
height: 28rpx;
background-color: #333333;
}
}
- .goods_list{
+
+ .goods_list {
+ height: calc( 100% - 182rpx);
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 12rpx 40rpx;
- .item{
+ .item {
width: 50%;
flex-shrink: 0;
margin-bottom: 32rpx;
- .img_wrap{
+
+ .img_wrap {
width: 242rpx;
border-radius: 8rpx;
overflow: hidden;
position: relative;
- .img{
+
+ .img {
width: 100%;
}
- .new{
+
+ .new {
width: 72rpx;
position: absolute;
left: 0;
@@ -156,25 +184,30 @@
z-index: 10;
}
}
- .name{
+
+ .name {
margin: 12rpx 0 8rpx;
- display: -webkit-box;//灏嗙洅瀛愯浆鎹负寮规�х洅瀛�
- -webkit-box-orient: vertical;//鏂囨湰鏄剧ず鏂瑰紡锛岄粯璁ゆ按骞�
- -webkit-line-clamp: 1;//璁剧疆鏄剧ず澶氬皯琛�
+ display: -webkit-box; //灏嗙洅瀛愯浆鎹负寮规�х洅瀛�
+ -webkit-box-orient: vertical; //鏂囨湰鏄剧ず鏂瑰紡锛岄粯璁ゆ按骞�
+ -webkit-line-clamp: 1; //璁剧疆鏄剧ず澶氬皯琛�
overflow: hidden;
}
- .info{
+
+ .info {
display: flex;
align-items: center;
color: #666666;
- .icon{
+
+ .icon {
width: 28rpx;
margin-right: 8rpx;
}
- .num{
+
+ .num {
margin-right: 16rpx;
}
- .primary{
+
+ .primary {
color: var(--themeColor);
}
}
diff --git a/wechat_jiaxuan/components/disProduct/index.wxml b/wechat_jiaxuan/components/disProduct/index.wxml
index a1ef8ea..d993b9d 100644
--- a/wechat_jiaxuan/components/disProduct/index.wxml
+++ b/wechat_jiaxuan/components/disProduct/index.wxml
@@ -1,76 +1,83 @@
<view class="app">
- <view class="home_top">
+ <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px">
<view class="search_wrap">
<image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
<input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储浜у搧鍚嶇О" />
</view>
</view>
- <view class="main_content">
- <view class="main_left">
- <view data-code="{{item.code}}" bindtap="cateClick" wx:for="{{cateList}}" class="item {{ catalogCode == item.code ? 'active' : '' }}">{{ item.name }}</view>
- </view>
- <view class="main_right">
- <view class="query_wrap">
- <view class="item" bindtap="changeOne">
- <view class="name">瑁呬慨椋庢牸</view>
- <van-icon name="{{ showOne ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeTwo">
- <view class="name">绌洪棿鍚嶇О</view>
- <van-icon name="{{ showTwo ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- </view>
- <view wx:if="{{ showOne }}" class="query_form">
- <view class="list">
- <view class="item active">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鍟婄殑鏃舵拻鐨勪唬鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- </view>
- <view class="btns">
- <view class="btn" bindtap="changeOne">鍙栨秷</view>
- <view class="btn sub">纭</view>
- </view>
- </view>
- <view wx:if="{{ showTwo }}" class="query_form">
- <view class="list">
- <view class="item active">瀹滃</view>
- <view class="item">瀹滃</view>
- <view class="item">瀹滃</view>
- <view class="item">瀹滃</view>
- <view class="item">瀹滃</view>
- </view>
- <view class="btns">
- <view class="btn" bindtap="changeTwo">鍙栨秷</view>
- <view class="btn sub">纭</view>
- </view>
- </view>
- <view class="status">
- <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">榛樿</view>
- <view class="separate"></view>
- <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
- <view class="separate"></view>
- <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">鏈�鏂�</view>
- </view>
- <view class="goods_list">
- <view wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail">
- <view class="img_wrap">
- <image src="{{ item.coverImage }}" class="img" mode="widthFix"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;">
+ <view class="main_content">
+ <scroll-view class="main_left" enable-flex scroll-y>
+ <!-- <view class="main_left"> -->
+ <view data-code="{{item.code}}" bindtap="cateClick" wx:for="{{cateList}}" class="item {{ catalogCode == item.code ? 'active' : '' }}">{{ item.name }}</view>
+ <!-- </view> -->
+ </scroll-view>
+ <view class="main_right">
+ <view class="query_wrap">
+ <view class="item" bindtap="changeOne">
+ <view class="name">瑁呬慨椋庢牸</view>
+ <van-icon name="{{ showOne ? 'arrow-up' : 'arrow-down' }}" />
</view>
- <view class="name">{{ item.title }}</view>
- <view class="info">
- <image wx:if="{{ !item.isCollection }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount || 0 }}</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>{{ item.viewCount || 0 }}</text>
+ <view class="item" bindtap="changeTwo">
+ <view class="name">绌洪棿鍚嶇О</view>
+ <van-icon name="{{ showTwo ? 'arrow-up' : 'arrow-down' }}" />
</view>
</view>
+ <view wx:if="{{ showOne }}" class="query_form">
+ <view class="list">
+ <view class="item active">涓滆姖鐢佃</view>
+ <view class="item">涓滆姖鍟婄殑鏃舵拻鐨勪唬鐢佃</view>
+ <view class="item">涓滆姖鐢佃</view>
+ <view class="item">涓滆姖鐢佃</view>
+ <view class="item">涓滆姖鐢佃</view>
+ </view>
+ <view class="btns">
+ <view class="btn" bindtap="changeOne">鍙栨秷</view>
+ <view class="btn sub">纭</view>
+ </view>
+ </view>
+ <view wx:if="{{ showTwo }}" class="query_form">
+ <view class="list">
+ <view class="item active">瀹滃</view>
+ <view class="item">瀹滃</view>
+ <view class="item">瀹滃</view>
+ <view class="item">瀹滃</view>
+ <view class="item">瀹滃</view>
+ </view>
+ <view class="btns">
+ <view class="btn" bindtap="changeTwo">鍙栨秷</view>
+ <view class="btn sub">纭</view>
+ </view>
+ </view>
+ <view class="status">
+ <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">榛樿</view>
+ <view class="separate"></view>
+ <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
+ <view class="separate"></view>
+ <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">鏈�鏂�</view>
+ </view>
+ <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list">
+ <!-- <view class="goods_list"> -->
+ <view wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail">
+ <view class="img_wrap">
+ <image src="{{ item.coverImage }}" class="img" mode="widthFix"></image>
+ <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ </view>
+ <view class="name">{{ item.title }}</view>
+ <view class="info">
+ <image wx:if="{{ !item.isCollection }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
+ <image wx:else class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
+ <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount || 0 }}</text>
+ <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
+ <text>{{ item.viewCount || 0 }}</text>
+ </view>
+ </view>
+ <!-- </view> -->
+ </scroll-view>
</view>
</view>
</view>
+
</view>
\ No newline at end of file
diff --git a/wechat_jiaxuan/components/disProduct/index.wxss b/wechat_jiaxuan/components/disProduct/index.wxss
index 7393c12..65c6fa3 100644
--- a/wechat_jiaxuan/components/disProduct/index.wxss
+++ b/wechat_jiaxuan/components/disProduct/index.wxss
@@ -1,8 +1,3 @@
-.home_top {
- z-index: 9999;
- width: 100%;
- background-color: #fff;
-}
.search_wrap {
width: 670rpx;
height: 72rpx;
@@ -22,14 +17,23 @@
height: 100%;
width: 100%;
}
+.app .home_content {
+ height: 100%;
+}
+.home_top {
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
.main_content {
display: flex;
- height: calc(100% - 120rpx);
+ padding-top: 120rpx;
+ height: 100%;
}
.main_content .main_left {
width: 160rpx;
height: 100%;
- overflow-y: auto;
border-radius: 0rpx 16rpx 16rpx 0rpx;
}
.main_content .main_left .item {
@@ -52,6 +56,7 @@
.main_content .main_right {
flex: 1;
position: relative;
+ height: 100%;
}
.main_content .main_right .query_wrap {
display: flex;
@@ -119,8 +124,8 @@
.main_content .main_right .status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
align-items: center;
+ height: 92rpx;
}
.main_content .main_right .status .active {
color: var(--themeColor);
@@ -132,6 +137,7 @@
background-color: #333333;
}
.main_content .main_right .goods_list {
+ height: calc(100% - 182rpx);
display: flex;
flex-wrap: wrap;
justify-content: space-between;
diff --git a/wechat_jiaxuan/components/disRealpic/index.js b/wechat_jiaxuan/components/disRealpic/index.js
index e836e5e..0d4116a 100644
--- a/wechat_jiaxuan/components/disRealpic/index.js
+++ b/wechat_jiaxuan/components/disRealpic/index.js
@@ -4,7 +4,7 @@
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
-
+ menuButtonInfo: Object
},
data: {
activeIndex: -1,
@@ -45,8 +45,24 @@
getZhongTaiRealcasePage({
catalogCode,tagCodes,pageNum,pageSize, sortType,query
}).then(res => {
- this.setData({ dataList: res.data.records })
+ this.setData({
+ dataList: [...this.data.dataList, ...res.data.records],
+ total: res.data.total,
+ })
})
+ },
+ scrolltolower() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, pageNum } = this.data
+ if(total > dataList.length){
+ this.setData({ pageNum: pageNum + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
},
videoClick(e) {
const { videourl } = e.currentTarget.dataset
@@ -68,6 +84,7 @@
statusChange(e) {
const sortType = e.currentTarget.dataset.status
this.setData({sortType})
+ this.setData({ pageNum: 1,dataList: [],total: 0})
this.getList()
},
handleAction(e){
@@ -114,6 +131,7 @@
cateList[activeIndex].paramIndex = -1
cateList[activeIndex].paramName = ''
}
+ this.setData({ pageNum: 1,dataList: [],total: 0})
this.setData({ tagCodes, cateList })
console.log('tagCodes', tagCodes);
},
diff --git a/wechat_jiaxuan/components/disRealpic/index.less b/wechat_jiaxuan/components/disRealpic/index.less
index 67e577d..219773c 100644
--- a/wechat_jiaxuan/components/disRealpic/index.less
+++ b/wechat_jiaxuan/components/disRealpic/index.less
@@ -18,10 +18,19 @@
.app {
height: 100%;
width: 100%;
+ .home_content{
+ height: 100%;
+ }
}
-
-.main_content {
- height: calc(100% - 120rpx);
+.home_top{
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
+.main_content{
+ height: 100%;
+ padding-top: 120rpx;
.query_wrap_scroll {
width: 670rpx;
@@ -107,9 +116,8 @@
.status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
+ height: 100rpx;
align-items: center;
-
.active {
color: var(--themeColor);
}
@@ -124,7 +132,7 @@
.goods_list {
padding: 12rpx 40rpx;
-
+ height: calc( 100% - 188rpx);
.item {
width: 100%;
margin-bottom: 32rpx;
diff --git a/wechat_jiaxuan/components/disRealpic/index.wxml b/wechat_jiaxuan/components/disRealpic/index.wxml
index c33f636..c887463 100644
--- a/wechat_jiaxuan/components/disRealpic/index.wxml
+++ b/wechat_jiaxuan/components/disRealpic/index.wxml
@@ -1,59 +1,65 @@
<view class="app">
- <view class="search_wrap">
- <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
- <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储瀹炴櫙鍚嶇О" />
+ <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px">
+ <view class="search_wrap">
+ <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
+ <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储瀹炴櫙鍚嶇О" />
+ </view>
</view>
+
<!-- -->
- <view class="main_content">
- <scroll-view class="query_wrap_scroll" scroll-x>
- <view class="query_wrap">
- <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams">
- <view class="name">{{ item.paramName || item.labelName }}</view>
- <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- </view>
- </scroll-view>
- <!-- param -->
- <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param">
- <view class="list">
- <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
- </view>
- <view class="btns">
- <view class="btn" bindtap="cancelParam">鍙栨秷</view>
- <view bindtap="subParam" class="btn sub">纭</view>
- </view>
- </view>
- <view class="status">
- <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">榛樿</view>
- <view class="separate"></view>
- <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
- <view class="separate"></view>
- <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">鏈�鏂�</view>
- </view>
- <!-- goods_list -->
- <view class="goods_list">
- <view wx:for="{{ dataList }}" data-item="{{item}}" class="item" bindtap="handleDetail">
- <view class="img_wrap">
- <image src="{{ item.coverImage }}" class="img"></image>
- <view wx:if="{{ item.openType == 'link' }}" data-item="{{item}}" bindtap="priviewFull" class="full">
- <image class="icon" src="../../static/icon/ic_720.png" mode="widthFix"></image>
- <text>鍏ㄦ櫙</text>
- </view>
- <image wx:if="{{ item.openType == 'video' }}" bindtap="videoClick" data-videourl="{{ item.openContent }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="content">
- <view class="name">{{ item.title }}</view>
- <view class="info">
- <image wx:if="{{ !item.isCollection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>{{ item.viewCount }}</text>
+ <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;">
+ <view class="main_content">
+ <scroll-view class="query_wrap_scroll" scroll-x>
+ <view class="query_wrap">
+ <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams">
+ <view class="name">{{ item.paramName || item.labelName }}</view>
+ <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" />
</view>
</view>
+ </scroll-view>
+ <!-- param -->
+ <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param">
+ <view class="list">
+ <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
+ </view>
+ <view class="btns">
+ <view class="btn" bindtap="cancelParam">鍙栨秷</view>
+ <view bindtap="subParam" class="btn sub">纭</view>
+ </view>
</view>
+ <view class="status">
+ <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">榛樿</view>
+ <view class="separate"></view>
+ <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
+ <view class="separate"></view>
+ <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">鏈�鏂�</view>
+ </view>
+ <!-- goods_list -->
+ <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list">
+ <view wx:for="{{ dataList }}" data-item="{{item}}" class="item" bindtap="handleDetail">
+ <view class="img_wrap">
+ <image src="{{ item.coverImage }}" class="img"></image>
+ <view wx:if="{{ item.openType == 'link' }}" data-item="{{item}}" bindtap="priviewFull" class="full">
+ <image class="icon" src="../../static/icon/ic_720.png" mode="widthFix"></image>
+ <text>鍏ㄦ櫙</text>
+ </view>
+ <image wx:if="{{ item.openType == 'video' }}" bindtap="videoClick" data-videourl="{{ item.openContent }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image>
+ <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ </view>
+ <view class="content">
+ <view class="name">{{ item.title }}</view>
+ <view class="info">
+ <image wx:if="{{ !item.isCollection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
+ <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
+ <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text>
+ <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
+ <text>{{ item.viewCount }}</text>
+ </view>
+ </view>
+ </view>
+ </scroll-view>
</view>
</view>
+
</view>
\ No newline at end of file
diff --git a/wechat_jiaxuan/components/disRealpic/index.wxss b/wechat_jiaxuan/components/disRealpic/index.wxss
index dc05f2c..808b1c8 100644
--- a/wechat_jiaxuan/components/disRealpic/index.wxss
+++ b/wechat_jiaxuan/components/disRealpic/index.wxss
@@ -17,8 +17,18 @@
height: 100%;
width: 100%;
}
+.app .home_content {
+ height: 100%;
+}
+.home_top {
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
.main_content {
- height: calc(100% - 120rpx);
+ height: 100%;
+ padding-top: 120rpx;
}
.main_content .query_wrap_scroll {
width: 670rpx;
@@ -92,7 +102,7 @@
.main_content .status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
+ height: 100rpx;
align-items: center;
}
.main_content .status .active {
@@ -106,6 +116,7 @@
}
.main_content .goods_list {
padding: 12rpx 40rpx;
+ height: calc(100% - 188rpx);
}
.main_content .goods_list .item {
width: 100%;
diff --git a/wechat_jiaxuan/pages/consult/consult.js b/wechat_jiaxuan/pages/consult/consult.js
index 4b2b005..4ea967a 100644
--- a/wechat_jiaxuan/pages/consult/consult.js
+++ b/wechat_jiaxuan/pages/consult/consult.js
@@ -10,14 +10,30 @@
catalogCode: '',
tagCode: '',
- search: '',
+ query: '',
dataList: [],
total: 0,
pageNum: 1,
pageSize: 10,
+
+ // height: 0,
+ // top: 0,
},
onLoad(options) {
this.getCate()
+ },
+ onReachBottom() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, pageNum } = this.data
+ if(total > dataList.length){
+ this.setData({ pageNum: pageNum + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
},
getCate() {
getCatalogList({catalogCode: 'product_info'}).then(res => {
@@ -56,12 +72,15 @@
}
},
getList() {
- const { pageNum, pageSize, catalogCode, tagCode, search } = this.data
+ const { pageNum, pageSize, catalogCode, tagCode, query } = this.data
getZhongTaiProductNewsPage({
- pageNum, pageSize, search, catalogCode: tagCode || catalogCode
+ pageNum, pageSize, query, catalogCode: tagCode || catalogCode
}).then(res => {
if(res.data){
- this.setData({ dataList: res.data.records,total: res.data.records.total })
+ this.setData({
+ dataList: [ ...this.data.dataList, ...res.data.records ],
+ total: res.data.total
+ })
}
})
@@ -71,8 +90,7 @@
this.setData({ catalogCode: code,secondCategory: [], tagCode: '' })
this.gettag()
this.getList()
- console.log('e', e.currentTarget.dataset);
- console.log('catalogCode', this.data.catalogCode);
+ this.setData({ dataList: [], pageNum: 1 })
},
seCateClick(e) {
const { code } = e.currentTarget.dataset
@@ -81,6 +99,7 @@
}else{
this.setData({ tagCode: code })
}
+ this.setData({ dataList: [], pageNum: 1 })
this.getList()
},
priviewFull(e){
@@ -112,21 +131,6 @@
onUnload() {
},
-
- /**
- * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
- */
- onReachBottom() {
-
- },
-
/**
* 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
*/
diff --git a/wechat_jiaxuan/pages/consult/consult.less b/wechat_jiaxuan/pages/consult/consult.less
index 89e55d3..14e1a4b 100644
--- a/wechat_jiaxuan/pages/consult/consult.less
+++ b/wechat_jiaxuan/pages/consult/consult.less
@@ -1,11 +1,33 @@
.container {
background-color: #fff;
}
+.home_top{
+ position: fixed;
+ width: 100%;
+ z-index: 99;
+ top: 0;
+ background-color: #fff;
+}
+.cate_wrap{
+ background-color: #fff;
+ .cate_one{
+ position: fixed;
+ top: 96rpx;
+ background-color: #fff;
+ width: 100%;
+ }
+ .cate_two{
+ position: fixed;
+ top: 156rpx;
+ background-color: #fff;
+ padding-top: 30rpx;
+ width: 100%;
+ }
+}
.search_wrap{
width: 670rpx;
height: 72rpx;
margin: 0rpx auto 24rpx;
- background: #F7F7F7;
border-radius: 8rpx;
padding: 0 40rpx;
display: flex;
@@ -54,7 +76,7 @@
}
}
.content{
- padding: 0 40rpx 40rpx;
+ padding: 260rpx 40rpx 40rpx;
.item{
margin-bottom: 60rpx;
.img{
diff --git a/wechat_jiaxuan/pages/consult/consult.wxml b/wechat_jiaxuan/pages/consult/consult.wxml
index 3857a0f..06a8342 100644
--- a/wechat_jiaxuan/pages/consult/consult.wxml
+++ b/wechat_jiaxuan/pages/consult/consult.wxml
@@ -1,23 +1,29 @@
<view class="container">
- <view class="search_wrap">
- <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
- <input bindblur="getList" model:value="{{ search }}" type="text" placeholder="鎼滅储璧勮鏍囬" />
+ <view class="home_top">
+ <view class="search_wrap">
+ <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
+ <input bindblur="getList" model:value="{{ query }}" type="text" placeholder="鎼滅储璧勮鏍囬" />
+ </view>
</view>
<!-- 鍒嗙被 -->
- <view>
- <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;">
- <view class="scroll_cate">
- <view bindtap="cateClick" data-code="{{item.code}}" wx:for="{{ category }}" class="item {{ catalogCode == item.code ? 'active': '' }}">{{ item.name }}</view>
- </view>
- </scroll-view>
- <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 28rpx;">
- <view class="scroll_cate second_list">
- <view bindtap="seCateClick" data-code="{{item.code}}" wx:for="{{ secondCategory }}" class="item {{ tagCode == item.code ? 'active': '' }}">{{ item.name }}</view>
- </view>
- </scroll-view>
+ <view class="cate_wrap">
+ <view class="cate_one">
+ <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;">
+ <view class="scroll_cate">
+ <view bindtap="cateClick" data-code="{{item.code}}" wx:for="{{ category }}" class="item {{ catalogCode == item.code ? 'active': '' }}">{{ item.name }}</view>
+ </view>
+ </scroll-view>
+ </view>
+ <view class="cate_two">
+ <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 24rpx;">
+ <view class="scroll_cate second_list">
+ <view bindtap="seCateClick" data-code="{{item.code}}" wx:for="{{ secondCategory }}" class="item {{ tagCode == item.code ? 'active': '' }}">{{ item.name }}</view>
+ </view>
+ </scroll-view>
+ </view>
</view>
<!-- content -->
- <view class="content">
+ <view class="content" style="padding-top: {{ secondCategory.length > 0 ? 276 : 186 }}rpx;">
<view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-item="{{item}}">
<image class="img" src="{{ item.coverImage }}" mode="widthFix"></image>
<view class="title">{{ item.title }}</view>
diff --git a/wechat_jiaxuan/pages/consult/consult.wxss b/wechat_jiaxuan/pages/consult/consult.wxss
index 726cbf0..f8dba92 100644
--- a/wechat_jiaxuan/pages/consult/consult.wxss
+++ b/wechat_jiaxuan/pages/consult/consult.wxss
@@ -1,11 +1,33 @@
.container {
background-color: #fff;
}
+.home_top {
+ position: fixed;
+ width: 100%;
+ z-index: 99;
+ top: 0;
+ background-color: #fff;
+}
+.cate_wrap {
+ background-color: #fff;
+}
+.cate_wrap .cate_one {
+ position: fixed;
+ top: 96rpx;
+ background-color: #fff;
+ width: 100%;
+}
+.cate_wrap .cate_two {
+ position: fixed;
+ top: 156rpx;
+ background-color: #fff;
+ padding-top: 30rpx;
+ width: 100%;
+}
.search_wrap {
width: 670rpx;
height: 72rpx;
margin: 0rpx auto 24rpx;
- background: #F7F7F7;
border-radius: 8rpx;
padding: 0 40rpx;
display: flex;
@@ -50,7 +72,7 @@
font-weight: 400;
}
.content {
- padding: 0 40rpx 40rpx;
+ padding: 260rpx 40rpx 40rpx;
}
.content .item {
margin-bottom: 60rpx;
diff --git a/wechat_jiaxuan/pages/discover/discover.js b/wechat_jiaxuan/pages/discover/discover.js
index 055b1e7..81d364b 100644
--- a/wechat_jiaxuan/pages/discover/discover.js
+++ b/wechat_jiaxuan/pages/discover/discover.js
@@ -7,7 +7,10 @@
data: {
menuButtonInfo: {},
catalogCode: "product_intro",
- activeCate: ''
+ activeCate: '',
+
+ height: 0,
+ top: 0,
},
onLoad(options) {
let menuButtonInfo = wx.getMenuButtonBoundingClientRect();
diff --git a/wechat_jiaxuan/pages/discover/discover.less b/wechat_jiaxuan/pages/discover/discover.less
index f18b957..06df3a0 100644
--- a/wechat_jiaxuan/pages/discover/discover.less
+++ b/wechat_jiaxuan/pages/discover/discover.less
@@ -1,9 +1,9 @@
.main_tab{
position: relative;
display: flex;
- align-items: flex-end;
- height: 88rpx;
+ align-items: center;
padding: 0 40rpx;
+ // border: 1px solid red;
.item{
width: 76rpx;
font-size: 32rpx;
@@ -31,8 +31,7 @@
width: 100%;
background-color: #fff;
}
-.container{
-}
-.main_content{
- padding-top: 200rpx;
-}
\ No newline at end of file
+
+// .main_content{
+// padding-top: 200rpx;
+// }
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/discover/discover.wxml b/wechat_jiaxuan/pages/discover/discover.wxml
index 8fe99f2..9aa518a 100644
--- a/wechat_jiaxuan/pages/discover/discover.wxml
+++ b/wechat_jiaxuan/pages/discover/discover.wxml
@@ -1,7 +1,7 @@
<view class="container">
<view class="home_tab">
- <view style="height: {{ menuButtonInfo.top }}px;"></view>
- <view class="main_tab">
+ <view style="height: {{ menuButtonInfo.top - 6 }}px;"></view>
+ <view class="main_tab" style="height: {{ menuButtonInfo.height + 12 }}px;">
<view class="item {{ catalogCode == 'product_intro' ? 'active' : '' }}" data-code="product_intro" bindtap="tabsClick">
<view class="name">浜у搧</view>
<view class="border"></view>
@@ -17,9 +17,9 @@
</view>
</view>
<!-- -->
- <view class="main_content" style="height: calc( 100vh - {{menuButtonInfo.top}}px - 88rpx )">
- <disProduct catalogCode="{{activeCate}}" wx:if="{{ catalogCode == 'product_intro' }}" />
- <disCase wx:if="{{ catalogCode == 'whole_case' }}" />
- <disRealpic wx:if="{{ catalogCode == 'real_case' }}" />
+ <view class="main_content" style="height: 100vh">
+ <disProduct menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'product_intro' }}" />
+ <disCase menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'whole_case' }}" />
+ <disRealpic menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'real_case' }}" />
</view>
</view>
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/discover/discover.wxss b/wechat_jiaxuan/pages/discover/discover.wxss
index a6b3fa5..9ac8a0c 100644
--- a/wechat_jiaxuan/pages/discover/discover.wxss
+++ b/wechat_jiaxuan/pages/discover/discover.wxss
@@ -1,8 +1,7 @@
.main_tab {
position: relative;
display: flex;
- align-items: flex-end;
- height: 88rpx;
+ align-items: center;
padding: 0 40rpx;
}
.main_tab .item {
@@ -29,7 +28,4 @@
z-index: 999;
width: 100%;
background-color: #fff;
-}
-.main_content {
- padding-top: 200rpx;
}
diff --git a/wechat_jiaxuan/pages/homeId/index.js b/wechat_jiaxuan/pages/homeId/index.js
index 7d96c8d..19d5dd9 100644
--- a/wechat_jiaxuan/pages/homeId/index.js
+++ b/wechat_jiaxuan/pages/homeId/index.js
@@ -8,6 +8,7 @@
tagList: [],
activeCate: '',
dataList: [],
+ total: 0,
pageNum: 1,
pageSize: 10,
@@ -21,6 +22,33 @@
this.setData({ code: options.code})
this.getTabList()
this.getList()
+ },
+ onReachBottom() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, pageNum } = this.data
+ if(total > dataList.length){
+ this.setData({ pageNum: pageNum + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
+ },
+ getList(){
+ const { code, tagCodes, pageSize, pageNum } = this.data
+ pageZSZXContentList({
+ catalogCode: code,
+ tagCodes: tagCodes ? [tagCodes] : [],
+ pageSize,
+ pageNum
+ }).then(res => {
+ this.setData({
+ total: res.data.total,
+ dataList: [ ...this.data.dataList, ...res.data.records ]
+ })
+ })
},
itemClick(e) {
const item = e.currentTarget.dataset.item
@@ -63,22 +91,6 @@
})
},
- getList(){
- const { code, tagCodes, pageSize, pageNum } = this.data
- pageZSZXContentList({
- catalogCode: code,
- tagCodes: tagCodes ? [tagCodes] : [],
- pageSize,
- pageNum
- }).then(res => {
- this.setData({
- dataList: [ ...this.data.dataList, ...res.data.records ]
- })
- })
- },
- onReachBottom() {
-
- },
onReady() {
},
@@ -114,9 +126,6 @@
/**
* 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
*/
- onReachBottom() {
-
- },
/**
* 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
diff --git a/wechat_jiaxuan/pages/store/info.wxml b/wechat_jiaxuan/pages/store/info.wxml
index fae06da..d985f2e 100644
--- a/wechat_jiaxuan/pages/store/info.wxml
+++ b/wechat_jiaxuan/pages/store/info.wxml
@@ -14,7 +14,7 @@
<view class="title">闂ㄥ簵瀵艰喘</view>
<view class="list">
<view class="item" data-id="{{ item.iamId }}" bindtap="handleDetail" wx:for="{{ info.usersList }}">
- <image src="{{ item.imgurlFull }}" class="avatar"></image>
+ <image src="{{ item.imgurlFull ? item.imgurlFull : '../../static/images/default_avatar.png' }}" class="avatar"></image>
<view class="content">
<view class="name">{{ item.name }}</view>
<view class="desc">瀵艰喘锝渰{ info.jobDate || '-'}}骞寸粡楠�</view>
diff --git a/wechat_jiaxuan/pages/store/staff.wxml b/wechat_jiaxuan/pages/store/staff.wxml
index 9afdc2c..fb49595 100644
--- a/wechat_jiaxuan/pages/store/staff.wxml
+++ b/wechat_jiaxuan/pages/store/staff.wxml
@@ -2,7 +2,7 @@
<!-- <navBar></navBar> -->
<image src="../../static/images/design_banner@2x.png" mode="widthFix" class="bg_wrap"></image>
<view class="container">
- <image class="avatar" src="{{ info.imgurlFull }}"></image>
+ <image class="avatar" src="{{ info.imgurlFull ? info.imgurlFull : '../../static/images/default_avatar.png' }}"></image>
<view class="name_wrap">
<view class="left">
<view class="name">{{ info.name }}</view>
diff --git a/wechat_jiaxuan/pages/store/store.wxml b/wechat_jiaxuan/pages/store/store.wxml
index 74ba7fc..4717bd0 100644
--- a/wechat_jiaxuan/pages/store/store.wxml
+++ b/wechat_jiaxuan/pages/store/store.wxml
@@ -15,7 +15,7 @@
<view class="left">
<view class="title" data-id="{{ item.id }}" bindtap="handleDetail">{{ item.name }}</view>
<view class="address" data-id="{{ item.id }}" bindtap="handleDetail">
- <text wx:if="{{ item.distanceStr }}">鍟奷asd椋掗瀹夊痉妫晩瀹炴墦瀹炵殑{{ item.distanceStr }} | {{ item.address || '' }}</text>
+ <text wx:if="{{ item.distanceStr }}">{{ item.distanceStr }} | {{ item.address || '' }}</text>
<text wx:else>--</text>
<image src="../../static/icon/arrow_right.png" mode="widthFix"></image>
</view>
diff --git a/wechat_jiaxuan/pages/userinfo/collect.js b/wechat_jiaxuan/pages/userinfo/collect.js
index 48a16c4..d7ad2b8 100644
--- a/wechat_jiaxuan/pages/userinfo/collect.js
+++ b/wechat_jiaxuan/pages/userinfo/collect.js
@@ -18,11 +18,17 @@
this.getList()
},
onReachBottom() {
- if(this.data.total > this.data.dataset.length){
- this.setData({ pageNum: this.data.pageNum + 1 })
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, pageNum } = this.data
+ if(total > dataList.length){
+ this.setData({ pageNum: pageNum + 1 })
this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
}
- // this.pageN
},
tabsChange(e) {
const activeTabs = e.currentTarget.dataset.val
diff --git a/wechat_jiaxuan/pages/userinfo/favorite.js b/wechat_jiaxuan/pages/userinfo/favorite.js
index 633951c..88fe16a 100644
--- a/wechat_jiaxuan/pages/userinfo/favorite.js
+++ b/wechat_jiaxuan/pages/userinfo/favorite.js
@@ -1,24 +1,77 @@
-// pages/userinfo/collect.js
+import {
+ collectLikePage
+} from '../../api/index'
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- activeTabs: '0'
- },
+ activeTabs: 'product_intro',
- tabsChange(e) {
- const activeTabs = e.currentTarget.dataset.val
- this.setData({ activeTabs })
- },
- handleDetail(e) {
- wx.navigateTo({
- url: '/pages/detailDis/product',
- })
+ dataList: [],
+ total: 0,
+ pageNum: 1,
+ pageSize: 10,
},
onLoad(options) {
-
+ this.getList()
+ },
+ onReachBottom() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, pageNum } = this.data
+ if(total > dataList.length){
+ this.setData({ pageNum: pageNum + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
+ },
+ tabsChange(e) {
+ const activeTabs = e.currentTarget.dataset.val
+ this.setData({
+ activeTabs,
+ dataList: [],total: 0,pageNum: 1
+ })
+ this.getList()
+ },
+ handleDetail(e) {
+ const id = e.currentTarget.dataset.id
+ const { activeTabs } = this.data
+ let url = ''
+ if(activeTabs == 'product_intro'){
+ url = '/pages/detailDis/product'
+ }else if(activeTabs == 'whole_case'){
+ url = '/pages/detailDis/case'
+ }else{
+ url = '/pages/detailDis/realpic'
+ }
+ wx.navigateTo({
+ url: `${url}?id=${id}`,
+ })
+ },
+ getList() {
+ const {
+ pageSize,
+ pageNum,
+ activeTabs
+ } = this.data
+ collectLikePage({
+ businessCategory: 'like',
+ businessType: activeTabs,
+ pageSize,
+ pageNum
+ }).then(res => {
+ if (res.data) {
+ this.setData({
+ dataList: [...this.data.dataset, ...res.data.records || []],
+ total: res.data.total
+ })
+ }
+ })
},
/**
@@ -59,9 +112,6 @@
/**
* 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
*/
- onReachBottom() {
-
- },
/**
* 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
diff --git a/wechat_jiaxuan/pages/userinfo/favorite.wxml b/wechat_jiaxuan/pages/userinfo/favorite.wxml
index bbce2ec..f9869e6 100644
--- a/wechat_jiaxuan/pages/userinfo/favorite.wxml
+++ b/wechat_jiaxuan/pages/userinfo/favorite.wxml
@@ -1,53 +1,25 @@
<view class="container">
<view class="tabs">
- <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-val="0" bindtap="tabsChange">
+ <view class="item {{ activeTabs == 'product_intro' ? 'active' : '' }}" data-val="product_intro" bindtap="tabsChange">
<view class="name">浜у搧</view>
<view class="border"></view>
</view>
- <view class="item {{ activeTabs == '1' ? 'active' : '' }}" data-val="1" bindtap="tabsChange">
+ <view class="item {{ activeTabs == 'whole_case' ? 'active' : '' }}" data-val="whole_case" bindtap="tabsChange">
<view class="name">妗堜緥</view>
<view class="border"></view>
</view>
- <view class="item {{ activeTabs == '2' ? 'active' : '' }}" data-val="2" bindtap="tabsChange">
+ <view class="item {{ activeTabs == 'real_case' ? 'active' : '' }}" data-val="real_case" bindtap="tabsChange">
<view class="name">瀹炴櫙</view>
<view class="border"></view>
</view>
</view>
<view class="list">
- <view class="item" bindtap="handleDetail">
+ <view data-id="{{ item.id }}" wx:for="{{ dataList }}" class="item" bindtap="handleDetail">
<view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ <image src="{{ item.thumbnailUrl }}" class="img"></image>
+ <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
</view>
- <view class="name">閽㈢惔鏇�</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
- </view>
- </view>
- <view class="item" bindtap="handleDetail">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="name">閽㈢惔鏇�</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
- </view>
- </view>
- <view class="item" bindtap="handleDetail">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="name">閽㈢惔鏇�</view>
+ <view class="name">{{ item.displayName }}</view>
<view class="info">
<image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
<image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
diff --git a/wechat_jiaxuan/pages/userinfo/mysub.js b/wechat_jiaxuan/pages/userinfo/mysub.js
index 8d090c3..c545e33 100644
--- a/wechat_jiaxuan/pages/userinfo/mysub.js
+++ b/wechat_jiaxuan/pages/userinfo/mysub.js
@@ -9,15 +9,24 @@
dataList: [],
total: 0,
- page: 0,
+ page: 1,
capacity: 10,
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
- */
onLoad(options) {
this.getList()
+ },
+ onReachBottom() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, page } = this.data
+ if(total > dataList.length){
+ this.setData({ page: page + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
},
getList() {
const { page, capacity, activeTabs} = this.data
@@ -26,61 +35,15 @@
type: activeTabs
},page,capacity
}).then(res => {
- this.setData({ dataList: res.data.records })
+ this.setData({
+ dataList: res.data.records,
+ total: res.data.total,
+ })
})
},
tabsChange(e) {
const activeTabs = e.currentTarget.dataset.val
this.setData({ activeTabs, dataList: [], total: 0, page: 0, })
this.getList()
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
- */
- onReady() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
- */
- onShow() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
- */
- onHide() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
- */
- onUnload() {
-
- },
-
- /**
- * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
- */
- onReachBottom() {
-
- },
-
- /**
- * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
- */
- onShareAppMessage() {
-
}
})
\ No newline at end of file
diff --git a/wechat_jiaxuan/project.private.config.json b/wechat_jiaxuan/project.private.config.json
index 902199d..6960984 100644
--- a/wechat_jiaxuan/project.private.config.json
+++ b/wechat_jiaxuan/project.private.config.json
@@ -5,7 +5,7 @@
"urlCheck": false
},
"description": "椤圭洰绉佹湁閰嶇疆鏂囦欢銆傛鏂囦欢涓殑鍐呭灏嗚鐩� project.config.json 涓殑鐩稿悓瀛楁銆傞」鐩殑鏀瑰姩浼樺厛鍚屾鍒版鏂囦欢涓�傝瑙佹枃妗o細https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "libVersion": "3.5.0",
+ "libVersion": "3.4.10",
"condition": {
"miniprogram": {
"list": [
--
Gitblit v1.9.3