| | |
| | | width: 36rpx; |
| | | } |
| | | } |
| | | .text{ |
| | | flex: 1; |
| | | overflow : hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | } |
| | | } |
| | | .addr{ |
| | | display: flex; |
| | |
| | | <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"> |
| | |
| | | .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; |
| | |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | activeIndex: -1, |
| | |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | query: '', |
| | |
| | | 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){ |
| | |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | } |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ tagCodes, cateList }) |
| | | console.log('tagCodes', tagCodes); |
| | | }, |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #F7F7F7; |
| | | |
| | | image { |
| | | width: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | } |
| | | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | .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; |
| | | .query_wrap_scroll{ |
| | | width: 670rpx; |
| | | padding: 0 40rpx; |
| | |
| | | .status { |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | margin: 20rpx 0; |
| | | align-items: center; |
| | | |
| | | height: 100rpx; |
| | | .active { |
| | | color: var(--themeColor); |
| | | } |
| | | |
| | | .separate { |
| | | margin: 0 12rpx; |
| | | width: 1rpx; |
| | |
| | | } |
| | | .goods_list{ |
| | | padding: 12rpx 40rpx; |
| | | height: calc( 100% - 188rpx); |
| | | .item{ |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | |
| | | <view class="app"> |
| | | <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="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 class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">最新</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <view class="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> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | |
| | | 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; |
| | |
| | | .main_content .status { |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | margin: 20rpx 0; |
| | | align-items: center; |
| | | height: 100rpx; |
| | | } |
| | | .main_content .status .active { |
| | | color: var(--themeColor); |
| | |
| | | } |
| | | .main_content .goods_list { |
| | | padding: 12rpx 40rpx; |
| | | height: calc(100% - 188rpx); |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 100%; |
| | |
| | | import { getCatalogList, getZhongTaiProductPage } from '../../api/index' |
| | | import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | menuButtonInfo: Object |
| | | }, |
| | | |
| | | /** |
| | |
| | | datalist: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: "" |
| | |
| | | }, |
| | | getTag() { |
| | | const catalogCode = this.data.catalogCode |
| | | getCatalogList({ |
| | | getCataLogTagList({ |
| | | catalogCode |
| | | }) |
| | | }, |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | 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) { |
| | |
| | | .home_top{ |
| | | // position: fixed; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | // border: 1px solid red; |
| | | } |
| | | |
| | | |
| | | .search_wrap{ |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #F7F7F7; |
| | | |
| | | image{ |
| | | width: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | } |
| | | |
| | | .app{ |
| | | height: 100%; |
| | | width: 100%; |
| | | .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_left{ |
| | | width: 160rpx; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | border-radius: 0rpx 16rpx 16rpx 0rpx; |
| | | |
| | | .item{ |
| | | width: 160rpx; |
| | | height: 100rpx; |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .active{ |
| | | background-color: #fff; |
| | | font-weight: 500; |
| | |
| | | color: #111111; |
| | | } |
| | | } |
| | | |
| | | .main_right{ |
| | | flex: 1; |
| | | position: relative; |
| | | height: 100%; |
| | | .query_wrap{ |
| | | display: flex; |
| | | .item{ |
| | |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | |
| | | .name{ |
| | | margin-right: 12rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .query_form{ |
| | | position: absolute; |
| | | z-index: 99; |
| | | background-color: #fff; |
| | | |
| | | .list{ |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | |
| | | .item{ |
| | | width: 154rpx; |
| | | height: 72rpx; |
| | |
| | | text-overflow: ellipsis; |
| | | margin-right: 24rpx; |
| | | margin-bottom: 24rpx; |
| | | |
| | | &:nth-of-type(3n){ |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | |
| | | .active{ |
| | | color: var(--themeColor); |
| | | background: rgba(176,135,113,0.08); |
| | | } |
| | | } |
| | | |
| | | .btns{ |
| | | display: flex; |
| | | |
| | | .btn{ |
| | | width: 296rpx; |
| | | height: 88rpx; |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .sub{ |
| | | background: var(--themeColor); |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .status{ |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | margin: 20rpx 0; |
| | | align-items: center; |
| | | height: 92rpx; |
| | | .active{ |
| | | color: var(--themeColor); |
| | | } |
| | | |
| | | .separate{ |
| | | margin: 0 12rpx; |
| | | width: 1rpx; |
| | |
| | | background-color: #333333; |
| | | } |
| | | } |
| | | |
| | | .goods_list{ |
| | | height: calc( 100% - 182rpx); |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | |
| | | width: 50%; |
| | | flex-shrink: 0; |
| | | margin-bottom: 32rpx; |
| | | |
| | | .img_wrap{ |
| | | width: 242rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | | |
| | | .new{ |
| | | width: 72rpx; |
| | | position: absolute; |
| | |
| | | z-index: 10; |
| | | } |
| | | } |
| | | |
| | | .name{ |
| | | margin: 12rpx 0 8rpx; |
| | | display: -webkit-box;//将盒子转换为弹性盒子 |
| | |
| | | -webkit-line-clamp: 1;//设置显示多少行 |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .info{ |
| | | display: flex; |
| | | align-items: center; |
| | | color: #666666; |
| | | |
| | | .icon{ |
| | | width: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | |
| | | .num{ |
| | | margin-right: 16rpx; |
| | | } |
| | | |
| | | .primary{ |
| | | color: var(--themeColor); |
| | | } |
| | |
| | | <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="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;"> |
| | | <view class="main_content"> |
| | | <view class="main_left"> |
| | | <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> |
| | | <!-- </view> --> |
| | | </scroll-view> |
| | | <view class="main_right"> |
| | | <view class="query_wrap"> |
| | | <view class="item" bindtap="changeOne"> |
| | |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">最新</view> |
| | | </view> |
| | | <view class="goods_list"> |
| | | <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> |
| | |
| | | <text>{{ item.viewCount || 0 }}</text> |
| | | </view> |
| | | </view> |
| | | <!-- </view> --> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | </view> |
| | |
| | | .home_top { |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .search_wrap { |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | |
| | | 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 { |
| | |
| | | .main_content .main_right { |
| | | flex: 1; |
| | | position: relative; |
| | | height: 100%; |
| | | } |
| | | .main_content .main_right .query_wrap { |
| | | display: flex; |
| | |
| | | .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); |
| | |
| | | background-color: #333333; |
| | | } |
| | | .main_content .main_right .goods_list { |
| | | height: calc(100% - 182rpx); |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | activeIndex: -1, |
| | |
| | | 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 |
| | |
| | | statusChange(e) { |
| | | const sortType = e.currentTarget.dataset.status |
| | | this.setData({sortType}) |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | handleAction(e){ |
| | |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | } |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ tagCodes, cateList }) |
| | | console.log('tagCodes', tagCodes); |
| | | }, |
| | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | .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; |
| | | |
| | | .query_wrap_scroll { |
| | | width: 670rpx; |
| | |
| | | .status { |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | margin: 20rpx 0; |
| | | height: 100rpx; |
| | | align-items: center; |
| | | |
| | | .active { |
| | | color: var(--themeColor); |
| | | } |
| | |
| | | |
| | | .goods_list { |
| | | padding: 12rpx 40rpx; |
| | | |
| | | height: calc( 100% - 188rpx); |
| | | .item { |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | |
| | | <view class="app"> |
| | | <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="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 class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">最新</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <view class="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> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | |
| | | 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; |
| | |
| | | .main_content .status { |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | margin: 20rpx 0; |
| | | height: 100rpx; |
| | | align-items: center; |
| | | } |
| | | .main_content .status .active { |
| | |
| | | } |
| | | .main_content .goods_list { |
| | | padding: 12rpx 40rpx; |
| | | height: calc(100% - 188rpx); |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 100%; |
| | |
| | | |
| | | 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 => { |
| | |
| | | } |
| | | }, |
| | | 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 |
| | | }) |
| | | } |
| | | |
| | | }) |
| | |
| | | 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 |
| | |
| | | }else{ |
| | | this.setData({ tagCode: code }) |
| | | } |
| | | this.setData({ dataList: [], pageNum: 1 }) |
| | | this.getList() |
| | | }, |
| | | priviewFull(e){ |
| | |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | |
| | | .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; |
| | |
| | | } |
| | | } |
| | | .content{ |
| | | padding: 0 40rpx 40rpx; |
| | | padding: 260rpx 40rpx 40rpx; |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | |
| | | <view class="container"> |
| | | <view class="home_top"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindblur="getList" model:value="{{ search }}" type="text" placeholder="搜索资讯标题" /> |
| | | <input bindblur="getList" model:value="{{ query }}" type="text" placeholder="搜索资讯标题" /> |
| | | </view> |
| | | </view> |
| | | <!-- 分类 --> |
| | | <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> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 28rpx;"> |
| | | </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> |
| | |
| | | .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; |
| | |
| | | font-weight: 400; |
| | | } |
| | | .content { |
| | | padding: 0 40rpx 40rpx; |
| | | padding: 260rpx 40rpx 40rpx; |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | |
| | | data: { |
| | | menuButtonInfo: {}, |
| | | catalogCode: "product_intro", |
| | | activeCate: '' |
| | | activeCate: '', |
| | | |
| | | height: 0, |
| | | top: 0, |
| | | }, |
| | | onLoad(options) { |
| | | let menuButtonInfo = wx.getMenuButtonBoundingClientRect(); |
| | |
| | | .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; |
| | |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .container{ |
| | | } |
| | | .main_content{ |
| | | padding-top: 200rpx; |
| | | } |
| | | |
| | | // .main_content{ |
| | | // padding-top: 200rpx; |
| | | // } |
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | .main_tab { |
| | | position: relative; |
| | | display: flex; |
| | | align-items: flex-end; |
| | | height: 88rpx; |
| | | align-items: center; |
| | | padding: 0 40rpx; |
| | | } |
| | | .main_tab .item { |
| | |
| | | z-index: 999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .main_content { |
| | | padding-top: 200rpx; |
| | | } |
| | |
| | | tagList: [], |
| | | activeCate: '', |
| | | dataList: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | |
| | |
| | | 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 |
| | |
| | | |
| | | }) |
| | | }, |
| | | 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() { |
| | | |
| | | }, |
| | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | |
| | | <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> |
| | |
| | | <!-- <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> |
| | |
| | | <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 }}">啊dasd飒飒安德森啊实打实的{{ 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> |
| | |
| | | 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 |
| | |
| | | // 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 |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | |
| | | <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> |
| | |
| | | |
| | | 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 |
| | |
| | | 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() { |
| | | |
| | | } |
| | | }) |
| | |
| | | "urlCheck": false |
| | | }, |
| | | "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
| | | "libVersion": "3.5.0", |
| | | "libVersion": "3.4.10", |
| | | "condition": { |
| | | "miniprogram": { |
| | | "list": [ |