| | |
| | | data |
| | | }) |
| | | } |
| | | // å类产å å页å表 ä¸å° |
| | | export const getZhongTaiProductPage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiProductPage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // ä¸å° å类产å详æ
|
| | | export const getProductInfo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getProductInfo', |
| | | data |
| | | }) |
| | | } |
| | | // åç±»æ¡ä¾ å页å表 ä¸å° |
| | | export const getZhongTaiWholecasePage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiWholecasePage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // åç±»æ¡ä¾ 详æ
|
| | | export const getWholecaseInfo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getWholecaseInfo', |
| | | data |
| | | }) |
| | | } |
| | | // åç±»å®æ¯ å页å表 ä¸å° |
| | | export const getZhongTaiRealcasePage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiRealcasePage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // åç±»å®æ¯ 详æ
|
| | | export const getRealcaseInfo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getRealcaseInfo', |
| | | data |
| | | }) |
| | | } |
| | | // 产åèµè®¯ å页å表 ä¸å° |
| | | export const getZhongTaiProductNewsPage = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getZhongTaiProductNewsPage', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // 产åèµè®¯ 详æ
|
| | | export const getProductNewsInfo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/getProductNewsInfo', |
| | | method: 'GET', |
| | | data |
| | | }) |
| | | } |
| | | // å
容 æ¶è |
| | | export const collectContent = (data) => { |
| | | return request({ |
| | | url: '/web/customer/collectContent', |
| | | method: 'GET', |
| | | data |
| | | }) |
| | | } |
| | | // 0å
å®å¶ä¿¡æ¯ |
| | | export const saveFreeCustomizationApply = (data) => { |
| | | return request({ |
| | |
| | | // components/buoyClient/index.js |
| | | import { getCrmAuthUrl } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | showPurpose: { |
| | | type: String, |
| | | value: '0' |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | jumpPage(e) { |
| | | const urls = [ '/pages/kefu/fond', '/pages/store/staff' ] |
| | | const i = e.currentTarget.dataset.i |
| | | if(i == 2){ |
| | | getCrmAuthUrl({type:1}).then(res => { |
| | | console.log(res.data) |
| | | this.setData({ url: res.data }) |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + res.data, |
| | | }) |
| | | }) |
| | | } |
| | | console.log('i', i); |
| | | wx.navigateTo({ |
| | | url: urls[i], |
| | |
| | | .wrap{ |
| | | width: 100rpx; |
| | | height: 232rpx; |
| | | background: rgba(255,255,255,0.86); |
| | | box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,0,0,0.2); |
| | | border-radius: 8rpx 0rpx 0rpx 8rpx; |
| | |
| | | <image src="../../static/icon/ic_kehuxihuan.png" mode="widthFix"></image> |
| | | <view>客æ·å欢</view> |
| | | </view> |
| | | <view wx:if="{{ showPurpose && showPurpose == '1' }}" class="item" data-i="2" bindtap="jumpPage"> |
| | | <image src="../../static/icon/ic_yixiang.png" mode="widthFix"></image> |
| | | <view>æåç»è®°</view> |
| | | </view> |
| | | <view class="item" data-i="1" bindtap="jumpPage"> |
| | | <image src="../../static/icon/ic_mingpian.png" mode="widthFix"></image> |
| | | <view>个人åç</view> |
| | |
| | | .wrap { |
| | | width: 100rpx; |
| | | height: 232rpx; |
| | | background: rgba(255, 255, 255, 0.86); |
| | | box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.2); |
| | | border-radius: 8rpx 0rpx 0rpx 8rpx; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // components/detailFooter/index.js |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bottomLift: 0, |
| | | showShare: false |
| | | }, |
| | | attached() { |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | }, |
| | | methods: { |
| | | openShare() { |
| | | console.log('ç¹å»æå¼'); |
| | | this.setData({ showShare: true }) |
| | | }, |
| | | onClose() { |
| | | console.log('ç¹å»å
³é'); |
| | | this.setData({ showShare: false }) |
| | | }, |
| | | } |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": {} |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .main_wrap{ |
| | | |
| | | } |
| | | .footer_wrap { |
| | | position: fixed; |
| | | z-index: 999; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 750rpx; |
| | | padding: 0rpx 40rpx; |
| | | background-color: #fff; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE; |
| | | .content{ |
| | | height: 100rpx; |
| | | align-items: center; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .btns{ |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100rpx; |
| | | .btn{ |
| | | padding: 0; |
| | | margin-top: 16rpx; |
| | | } |
| | | } |
| | | .share { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 72rpx; |
| | | width: 188rpx; |
| | | background-color: var(--themeColor); |
| | | font-weight: 500; |
| | | color: #FFFFFF; |
| | | border-radius: 8rpx; |
| | | .sheji{ |
| | | width: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | } |
| | | .item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 20rpx; |
| | | color: #666666; |
| | | margin-right: 48rpx; |
| | | image { |
| | | width: 44rpx; |
| | | height: 40rpx; |
| | | margin-bottom: 2rpx; |
| | | } |
| | | } |
| | | } |
| | | .shade_modal{ |
| | | position: fixed; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: 9999; |
| | | background-color: #fff; |
| | | border-radius: 24rpx 24rpx 0rpx 0rpx; |
| | | .btns{ |
| | | display: flex; |
| | | height: 264rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 40rpx; |
| | | .item{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | image{ |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | } |
| | | } |
| | | .cancel{ |
| | | height: 100rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | } |
| | | .shade{ |
| | | position: fixed; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 1000; |
| | | background-color: rgba(0,0,0,.5); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <view class="main_wrap"> |
| | | <view class="footer_wrap" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="content"> |
| | | <view class="btns"> |
| | | <view class="item"> |
| | | <image src="../../static/icon/detail_nav_like_sel@2x.png"></image> |
| | | <text>忬¢</text> |
| | | </view> |
| | | <view class="item"> |
| | | <image src="../../static/icon/detail_nav_collected.png"></image> |
| | | <text>æ¶è</text> |
| | | </view> |
| | | <view class="item"> |
| | | <image src="../../static/icon/detail_nav_download@2x.png"></image> |
| | | <text>ä¸è½½</text> |
| | | </view> |
| | | </view> |
| | | <view bindtap="openShare" class="share">å享</view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="shade_modal" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button open-type="share" class="item" bindtap="handleShare"> |
| | | <image src="../../static/icon/wechat.png"></image> |
| | | <view>å°ç¨åºå享</view> |
| | | </button> |
| | | <button class="item" bindtap="handleDown"> |
| | | <image src="../../static/icon/download.png"></image> |
| | | <view>ä¸è½½æµ·æ¥</view> |
| | | </button> |
| | | </view> |
| | | <view bindtap="onClose" class="cancel">åæ¶</view> |
| | | </view> |
| | | <view class="shade" bindtap="onClose"></view> |
| | | </view> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .footer_wrap { |
| | | position: fixed; |
| | | z-index: 999; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 750rpx; |
| | | padding: 0rpx 40rpx; |
| | | background-color: #fff; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE; |
| | | } |
| | | .footer_wrap .content { |
| | | height: 100rpx; |
| | | align-items: center; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .footer_wrap .btns { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100rpx; |
| | | } |
| | | .footer_wrap .btns .btn { |
| | | padding: 0; |
| | | margin-top: 16rpx; |
| | | } |
| | | .footer_wrap .share { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 72rpx; |
| | | width: 188rpx; |
| | | background-color: var(--themeColor); |
| | | font-weight: 500; |
| | | color: #FFFFFF; |
| | | border-radius: 8rpx; |
| | | } |
| | | .footer_wrap .share .sheji { |
| | | width: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | .footer_wrap .item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 20rpx; |
| | | color: #666666; |
| | | margin-right: 48rpx; |
| | | } |
| | | .footer_wrap .item image { |
| | | width: 44rpx; |
| | | height: 40rpx; |
| | | margin-bottom: 2rpx; |
| | | } |
| | | .shade_modal { |
| | | position: fixed; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: 9999; |
| | | background-color: #fff; |
| | | border-radius: 24rpx 24rpx 0rpx 0rpx; |
| | | } |
| | | .shade_modal .btns { |
| | | height: 264rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 40rpx; |
| | | } |
| | | .shade_modal .btns .item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | } |
| | | .shade_modal .btns .item image { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .shade_modal .cancel { |
| | | height: 100rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | .shade { |
| | | position: fixed; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 1000; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | } |
| | |
| | | // components/disCase/index.js |
| | | import { getCataLogTagList, getZhongTaiWholecasePage, actionDo } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | showParams: false, |
| | | activeStatus: '0' |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '', |
| | | tagCodes: [], |
| | | |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: 'whole_case' |
| | | }, |
| | | attached() { |
| | | this.getCatelist() |
| | | }, |
| | | methods: { |
| | | handleDetail(e) { |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/case', |
| | | getCatelist(){ |
| | | const { catalogCode } = this.data |
| | | getCataLogTagList({ |
| | | catalogCode |
| | | }).then(res => { |
| | | if(res.data && res.data.length > 0){ |
| | | this.setData({ |
| | | cateList: res.data |
| | | }) |
| | | setTimeout(() => { |
| | | this.getList() |
| | | }, 300) |
| | | } |
| | | }) |
| | | }, |
| | | changeShowParams(){ |
| | | const showParams = !this.data.showParams |
| | | this.setData({showParams}) |
| | | getList() { |
| | | const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data |
| | | getZhongTaiWholecasePage({ |
| | | catalogCode,pageNum,pageSize,tagCodes, sortType,query |
| | | }).then(res => { |
| | | if(res.data){ |
| | | 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){ |
| | | const actionType = e.currentTarget.dataset.code |
| | | const id = e.currentTarget.dataset.id |
| | | actionDo({ |
| | | actionType, |
| | | id |
| | | }).then(res => { |
| | | this.getList() |
| | | }) |
| | | }, |
| | | handleDetail(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/case?id=' + id, |
| | | }) |
| | | }, |
| | | tagClick(e) { |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { cateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | |
| | | if(index === -1){ |
| | | // åparamécodeéå¤ |
| | | if(activeParam && activeParam.length > 0){ |
| | | activeParam.forEach(item => { |
| | | const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | if(indexTemp > -1){ |
| | | tagCodes.splice(indexTemp, 1) |
| | | } |
| | | }) |
| | | } |
| | | tagCodes.push(code) |
| | | cateList[activeIndex].paramIndex = paramIndex |
| | | cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName |
| | | }else{ |
| | | tagCodes.splice(index, 1) |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | } |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ tagCodes, cateList }) |
| | | console.log('tagCodes', tagCodes); |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | | bindblur() { |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e){ |
| | | const { cateList } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | if(activeIndex === this.data.activeIndex){ |
| | | this.setData({ activeIndex: -1, activeParam: [], selParam: '' }) |
| | | }else{ |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: cateList[activeIndex].valueVos |
| | | }) |
| | | } |
| | | |
| | | // this.setData({showTwo: false}) |
| | | }, |
| | | changeTwo(){ |
| | |
| | | this.setData({showTwo}) |
| | | this.setData({showOne: false}) |
| | | }, |
| | | statusChange(e) { |
| | | const activeStatus = e.currentTarget.dataset.status |
| | | this.setData({activeStatus}) |
| | | } |
| | | } |
| | | }) |
| | |
| | | .search_wrap { |
| | | .search_wrap{ |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | | margin: 24rpx auto; |
| | |
| | | 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: 750rpx; |
| | | padding: 0 40rpx; |
| | | } |
| | | .query_wrap { |
| | | display: flex; |
| | | padding: 0 16rpx; |
| | | .item { |
| | | margin-right: 36rpx; |
| | | height: 88rpx; |
| | | display: flex; |
| | | flex-shrink: 0; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | .name { |
| | | margin-right: 6rpx; |
| | | } |
| | |
| | | } |
| | | .query_param { |
| | | position: absolute; |
| | | z-index: 99; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | .list { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | .item { |
| | | width: 202rpx; |
| | |
| | | } |
| | | } |
| | | } |
| | | .shade{ |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0,0,0,.5); |
| | | z-index: 99; |
| | | } |
| | | |
| | | .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{ |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | | height: calc( 100% - 188rpx); |
| | | .item{ |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | |
| | | <view class="app"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input 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 bindconfirm="bindblur" bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="æç´¢æ¡ä¾åç§°" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content"> |
| | | <view class="query_wrap"> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">飿 ¼</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">空é´</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">é´å</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">é´ç§°</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">空称</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ showParams }}" class="query_param"> |
| | | <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="changeShowParams">åæ¶</view> |
| | | <view class="btn sub">确认</view> |
| | | </view> |
| | | </view> |
| | | <view class="status"> |
| | | <view class="item {{ activeStatus == '0' ? 'active' : '' }}" data-status="0" bindtap="statusChange">é»è®¤</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ activeStatus == '1' ? 'active' : '' }}" data-status="1" bindtap="statusChange">æç</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ activeStatus == '2' ? 'active' : '' }}" data-status="2" bindtap="statusChange">ææ°</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <view class="goods_list"> |
| | | <view class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" 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">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</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 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> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </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="content"> |
| | | <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 class="btns"> |
| | | <view class="btn" bindtap="cancelParam">åæ¶</view> |
| | | <view bindtap="subParam" class="btn sub">确认</view> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="shade"></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.collection }}" 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 {{item.collection ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" 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">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</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> |
| | | <view class="item"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" 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">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</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> |
| | | </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: 750rpx; |
| | | padding: 0 40rpx; |
| | | } |
| | | .main_content .query_wrap { |
| | | display: flex; |
| | | padding: 0 16rpx; |
| | | } |
| | | .main_content .query_wrap .item { |
| | | margin-right: 36rpx; |
| | | height: 88rpx; |
| | | display: flex; |
| | | flex-shrink: 0; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | } |
| | | .main_content .query_wrap .item .name { |
| | | margin-right: 6rpx; |
| | | } |
| | | .main_content .query_param { |
| | | position: absolute; |
| | | z-index: 99; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | } |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | } |
| | | .main_content .query_param .list .item { |
| | |
| | | background: var(--themeColor); |
| | | color: #fff; |
| | | } |
| | | .main_content .shade { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | z-index: 99; |
| | | } |
| | | .main_content .status { |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | margin: 20rpx 0; |
| | | align-items: center; |
| | | height: 100rpx; |
| | | } |
| | | .main_content .status .active { |
| | | color: var(--themeColor); |
| | |
| | | background-color: #333333; |
| | | } |
| | | .main_content .goods_list { |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | | height: calc(100% - 188rpx); |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 100%; |
| | |
| | | // components/disProduct/index.js |
| | | import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | menuButtonInfo: Object |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | showOne: false, |
| | | showTwo: false, |
| | | activeStatus: '0' |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | tagCodes: [], |
| | | |
| | | cateList: [], |
| | | secondCateList: [], |
| | | datalist: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: "" |
| | | }, |
| | | attached() { |
| | | this.getCatelist() |
| | | var app = getApp() |
| | | console.log('globalData', app.globalData); |
| | | if(app.globalData.catalogCode){ |
| | | this.setData({ catalogCode: app.globalData.catalogCode }) |
| | | setTimeout(() => { |
| | | console.log('catalogCode', this.data.catalogCode); |
| | | getApp().globalData.catalogCode = '' |
| | | }, 2000) |
| | | } |
| | | }, |
| | | methods: { |
| | | handleDetail(e) { |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/product', |
| | | getCatelist(){ |
| | | getCatalogList({ |
| | | catalogCode: 'product_intro' |
| | | }).then(res => { |
| | | if(res.data && res.data.length > 0){ |
| | | this.setData({ |
| | | catalogCode: this.data.catalogCode || res.data[0].code, |
| | | cateList: res.data |
| | | }) |
| | | this.getTag() |
| | | setTimeout(() => { |
| | | this.getList() |
| | | }, 300) |
| | | } |
| | | }) |
| | | }, |
| | | changeOne(){ |
| | | const showOne = !this.data.showOne |
| | | this.setData({showOne}) |
| | | this.setData({showTwo: false}) |
| | | getTag() { |
| | | const catalogCode = this.data.catalogCode |
| | | getCataLogTagList({ |
| | | catalogCode |
| | | }).then(res => { |
| | | this.setData({ |
| | | secondCateList: res.data || [], |
| | | activeParam: [] |
| | | }) |
| | | }) |
| | | }, |
| | | changeTwo(){ |
| | | const showTwo = !this.data.showTwo |
| | | this.setData({showTwo}) |
| | | this.setData({showOne: false}) |
| | | bindblur() { |
| | | console.log('失å»ç¦ç¹'); |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | getList() { |
| | | const { catalogCode,tagCodes, pageNum, pageSize, sortType, query } = this.data |
| | | getZhongTaiProductPage({ |
| | | catalogCode,pageNum,pageSize,sortType,query,tagCodes |
| | | }).then(res => { |
| | | 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' |
| | | }) |
| | | } |
| | | }, |
| | | cateClick(e) { |
| | | const catalogCode = e.currentTarget.dataset.code |
| | | this.setData({ catalogCode, tagCodes: [] }) |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.getTag() |
| | | this.getList() |
| | | }, |
| | | statusChange(e) { |
| | | const activeStatus = e.currentTarget.dataset.status |
| | | this.setData({activeStatus}) |
| | | } |
| | | const sortType = e.currentTarget.dataset.status |
| | | this.setData({sortType}) |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | handleDetail(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/product?id=' + id, |
| | | }) |
| | | }, |
| | | tagClick(e) { |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { secondCateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | console.log('code', code); |
| | | console.log('tagCodes', tagCodes); |
| | | if(index === -1){ |
| | | // åparamécodeéå¤ |
| | | if(activeParam && activeParam.length > 0){ |
| | | activeParam.forEach(item => { |
| | | const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | if(indexTemp > -1){ |
| | | tagCodes.splice(indexTemp, 1) |
| | | } |
| | | }) |
| | | } |
| | | tagCodes.push(code) |
| | | secondCateList[activeIndex].paramIndex = paramIndex |
| | | secondCateList[activeIndex].paramName = activeParam[paramIndex].labelValueName |
| | | }else{ |
| | | tagCodes.splice(index, 1) |
| | | secondCateList[activeIndex].paramIndex = -1 |
| | | secondCateList[activeIndex].paramName = '' |
| | | } |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.setData({ tagCodes, secondCateList }) |
| | | }, |
| | | changeShowParams(e){ |
| | | const { secondCateList } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | console.log('activeIndex', activeIndex); |
| | | console.log('secondCateList', secondCateList); |
| | | if(activeIndex === this.data.activeIndex){ |
| | | this.setData({ activeIndex: -1, activeParam: [] }) |
| | | }else{ |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: secondCateList[activeIndex].valueVos |
| | | }) |
| | | } |
| | | console.log('activeParam', this.data.activeParam); |
| | | // this.setData({showTwo: false}) |
| | | }, |
| | | cancelParam() { |
| | | const { secondCateList } = this.data |
| | | secondCateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 }) |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | } |
| | | }) |
| | |
| | | .search_wrap{ |
| | | |
| | | |
| | | .search_wrap { |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | | margin: 24rpx auto; |
| | |
| | | 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; |
| | |
| | | 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{ |
| | | width: 100%; |
| | | .item { |
| | | width: 50%; |
| | | height: 100rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | .name{ |
| | | color: #666666; |
| | | .name { |
| | | margin-right: 12rpx; |
| | | } |
| | | } |
| | | } |
| | | .query_form{ |
| | | |
| | | .query_form { |
| | | position: absolute; |
| | | z-index: 99; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | .list{ |
| | | |
| | | .list { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | .item{ |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 154rpx; |
| | | height: 72rpx; |
| | | text-align: center; |
| | |
| | | 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; |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .sub{ |
| | | |
| | | .sub { |
| | | background: var(--themeColor); |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | .status{ |
| | | .shade{ |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0,0,0,.5); |
| | | z-index: 99; |
| | | } |
| | | |
| | | .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); |
| | | width: 590rpx; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | box-sizing: border-box; |
| | | justify-content: space-between; |
| | | padding: 12rpx 40rpx; |
| | | .item{ |
| | | .item { |
| | | width: 242rpx; |
| | | flex-shrink: 0; |
| | | margin-bottom: 32rpx; |
| | | .img_wrap{ |
| | | .img_wrap { |
| | | width: 242rpx; |
| | | height: 136rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | .img{ |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .img { |
| | | width: 242rpx; |
| | | height: 216rpx; |
| | | } |
| | | .new{ |
| | | |
| | | .new { |
| | | width: 72rpx; |
| | | position: absolute; |
| | | left: 0; |
| | |
| | | z-index: 10; |
| | | } |
| | | } |
| | | .name{ |
| | | |
| | | .name { |
| | | margin: 12rpx 0 8rpx; |
| | | 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{ |
| | | margin-right: 16rpx; |
| | | |
| | | .num { |
| | | margin-right: 28rpx; |
| | | } |
| | | .primary{ |
| | | |
| | | .primary { |
| | | color: var(--themeColor); |
| | | } |
| | | } |
| | |
| | | <view class="app"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢äº§ååç§°" /> |
| | | </view> |
| | | <view class="main_content"> |
| | | <view class="main_left"> |
| | | <view class="item active">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <view class="item">å
¨å±å®å¶</view> |
| | | <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 bindconfirm="bindblur" bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="æç´¢äº§ååç§°" /> |
| | | </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 {{ activeStatus == '0' ? 'active' : '' }}" data-status="0" bindtap="statusChange">é»è®¤</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ activeStatus == '1' ? 'active' : '' }}" data-status="1" bindtap="statusChange">æç</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ activeStatus == '2' ? 'active' : '' }}" data-status="2" bindtap="statusChange">ææ°</view> |
| | | </view> |
| | | <view class="goods_list"> |
| | | <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 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 data-index="{{index}}" wx:for="{{ secondCateList }}" class="item" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.paramName || item.labelName }}</view> |
| | | <van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <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 wx:if="{{ activeParam.length > 0 }}" class="query_form"> |
| | | <view class="list"> |
| | | <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | </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 class="btns"> |
| | | <view class="btn" bindtap="cancelParam">åæ¶</view> |
| | | <view class="btn sub" bindtap="subParam">确认</view> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <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 wx:if="{{ activeParam.length > 0 }}" class="shade"></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 wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="{{ item.coverImage }}" class="img" mode="aspectFit"></image> |
| | | <image wx:if="{{ item.isNew }}" 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> |
| | | </scroll-view> |
| | | </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 { |
| | | 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; |
| | | width: 100%; |
| | | } |
| | | .main_content .main_right .query_wrap .item { |
| | | width: 50%; |
| | | height: 100rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | } |
| | | .main_content .main_right .query_wrap .item .name { |
| | | margin-right: 12rpx; |
| | | } |
| | | .main_content .main_right .query_form { |
| | | position: absolute; |
| | | z-index: 99; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | } |
| | | .main_content .main_right .query_form .list { |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .main_right .query_form .list .item { |
| | | width: 154rpx; |
| | |
| | | background: var(--themeColor); |
| | | color: #fff; |
| | | } |
| | | .main_content .main_right .shade { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | z-index: 99; |
| | | } |
| | | .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); |
| | | width: 590rpx; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | box-sizing: border-box; |
| | | justify-content: space-between; |
| | | padding: 12rpx 40rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item { |
| | | width: 242rpx; |
| | | flex-shrink: 0; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap { |
| | | width: 242rpx; |
| | | height: 136rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap .img { |
| | | width: 100%; |
| | | height: 100%; |
| | | width: 242rpx; |
| | | height: 216rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap .new { |
| | | width: 72rpx; |
| | |
| | | } |
| | | .main_content .main_right .goods_list .item .name { |
| | | margin: 12rpx 0 8rpx; |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 1; |
| | | overflow: hidden; |
| | | } |
| | | .main_content .main_right .goods_list .item .info { |
| | | display: flex; |
| | |
| | | margin-right: 8rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .info .num { |
| | | margin-right: 16rpx; |
| | | margin-right: 28rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .info .primary { |
| | | color: var(--themeColor); |
| | |
| | | // components/disCase/index.js |
| | | import { getCataLogTagList, getZhongTaiRealcasePage, actionDo } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | showParams: false, |
| | | activeStatus: '0' |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '', |
| | | tagCodes: [], |
| | | |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: 'real_case' |
| | | }, |
| | | attached() { |
| | | this.getCatelist() |
| | | }, |
| | | methods: { |
| | | handleDetail(e) { |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/realpic', |
| | | getCatelist(){ |
| | | const { catalogCode } = this.data |
| | | getCataLogTagList({ |
| | | catalogCode |
| | | }).then(res => { |
| | | if(res.data && res.data.length > 0){ |
| | | this.setData({ |
| | | cateList: res.data |
| | | }) |
| | | setTimeout(() => { |
| | | this.getList() |
| | | }, 300) |
| | | } |
| | | }) |
| | | }, |
| | | changeShowParams(){ |
| | | const showParams = !this.data.showParams |
| | | this.setData({showParams}) |
| | | getList() { |
| | | const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data |
| | | getZhongTaiRealcasePage({ |
| | | catalogCode,tagCodes,pageNum,pageSize, sortType,query |
| | | }).then(res => { |
| | | 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 |
| | | wx.previewMedia({ |
| | | sources: [{ url: videourl, type: 'video' }] |
| | | }) |
| | | }, |
| | | priviewFull(e){ |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.openContent, |
| | | success: function(res) { |
| | | // éè¿eventChannelå被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent, title: item.title }) |
| | | } |
| | | }) |
| | | }, |
| | | statusChange(e) { |
| | | const sortType = e.currentTarget.dataset.status |
| | | this.setData({sortType}) |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | handleAction(e){ |
| | | const actionType = e.currentTarget.dataset.code |
| | | const id = e.currentTarget.dataset.id |
| | | actionDo({ |
| | | actionType, |
| | | id |
| | | }).then(res => { |
| | | this.getList() |
| | | }) |
| | | }, |
| | | handleDetail(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | if(item.openType == 'video'){ |
| | | wx.previewMedia({ |
| | | sources: [{ url: item.openContent, type: 'video' }] |
| | | }) |
| | | } |
| | | if(item.openType == 'link'){ |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.openContent, |
| | | }) |
| | | } |
| | | if(item.openType == 'page'){ |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/realpic?id=' + item.id, |
| | | }) |
| | | } |
| | | }, |
| | | tagClick(e) { |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { cateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | |
| | | if(index === -1){ |
| | | if(activeParam && activeParam.length > 0){ |
| | | activeParam.forEach(item => { |
| | | const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | if(indexTemp > -1){ |
| | | tagCodes.splice(indexTemp, 1) |
| | | } |
| | | }) |
| | | } |
| | | tagCodes.push(code) |
| | | cateList[activeIndex].paramIndex = paramIndex |
| | | cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName |
| | | }else{ |
| | | tagCodes.splice(index, 1) |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | } |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ tagCodes, cateList }) |
| | | console.log('tagCodes', tagCodes); |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | | bindblur() { |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e){ |
| | | const { cateList } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | if(activeIndex === this.data.activeIndex){ |
| | | this.setData({ activeIndex: -1, activeParam: [], selParam: '' }) |
| | | }else{ |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: cateList[activeIndex].valueVos |
| | | }) |
| | | } |
| | | |
| | | // this.setData({showTwo: false}) |
| | | }, |
| | | changeTwo(){ |
| | |
| | | this.setData({showTwo}) |
| | | this.setData({showOne: false}) |
| | | }, |
| | | statusChange(e) { |
| | | const activeStatus = e.currentTarget.dataset.status |
| | | this.setData({activeStatus}) |
| | | } |
| | | } |
| | | }) |
| | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | .home_content{ |
| | | height: 100%; |
| | | } |
| | | } |
| | | .home_top{ |
| | | position: fixed; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .main_content{ |
| | | height: 100%; |
| | | padding-top: 120rpx; |
| | | |
| | | .main_content { |
| | | height: calc(100% - 120rpx); |
| | | .query_wrap_scroll { |
| | | width: 750rpx; |
| | | padding: 0 40rpx; |
| | | } |
| | | |
| | | .query_wrap { |
| | | display: flex; |
| | | padding: 0 16rpx; |
| | | |
| | | .item { |
| | | margin-right: 36rpx; |
| | | height: 88rpx; |
| | | display: flex; |
| | | flex-shrink: 0; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | |
| | | .name { |
| | | margin-right: 6rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .query_param { |
| | | position: absolute; |
| | | z-index: 99; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | |
| | | .list { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 202rpx; |
| | | height: 72rpx; |
| | |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | |
| | | .active { |
| | | color: var(--themeColor); |
| | | background: rgba(176, 135, 113, 0.08); |
| | | } |
| | | } |
| | | |
| | | .btns { |
| | | display: flex; |
| | | |
| | | .btn { |
| | | flex: 1; |
| | | height: 88rpx; |
| | |
| | | } |
| | | } |
| | | } |
| | | .shade{ |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0,0,0,.5); |
| | | z-index: 99; |
| | | } |
| | | |
| | | .status { |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | margin: 20rpx 0; |
| | | height: 100rpx; |
| | | align-items: center; |
| | | |
| | | .active { |
| | | color: var(--themeColor); |
| | | } |
| | |
| | | background-color: #333333; |
| | | } |
| | | } |
| | | .goods_list{ |
| | | |
| | | .goods_list { |
| | | padding: 12rpx 40rpx; |
| | | height: calc( 100% - 188rpx); |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | .item{ |
| | | justify-content: space-around; |
| | | .item { |
| | | width: 324rpx; |
| | | margin-bottom: 60rpx; |
| | | .img_wrap{ |
| | | margin-bottom: 32rpx; |
| | | |
| | | .img_wrap { |
| | | width: 100%; |
| | | height: 182rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | .img{ |
| | | |
| | | .play { |
| | | width: 60rpx; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | z-index: 1; |
| | | } |
| | | |
| | | .full { |
| | | position: absolute; |
| | | top: 32rpx; |
| | | right: 32rpx; |
| | | font-size: 20rpx; |
| | | color: rgba(255, 255, 255, 0.8); |
| | | width: 112rpx; |
| | | height: 42rpx; |
| | | background: rgba(0, 0, 0, 0.54); |
| | | border-radius: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .icon { |
| | | width: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | |
| | | .img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .tag{ |
| | | padding: 0 10rpx; |
| | | height: 46rpx; |
| | | line-height: 46rpx; |
| | | text-align: center; |
| | | background: rgba(0,0,0,0.4); |
| | | border-radius: 8rpx; |
| | | |
| | | .new { |
| | | width: 72rpx; |
| | | position: absolute; |
| | | left: 12rpx; |
| | | top: 16rpx; |
| | | color: #fff; |
| | | font-size: 24rpx; |
| | | left: 0; |
| | | top: 0; |
| | | z-index: 10; |
| | | } |
| | | } |
| | | .name{ |
| | | |
| | | .content { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 0 10rpx; |
| | | } |
| | | |
| | | .name { |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | flex: 1; |
| | | } |
| | | .info{ |
| | | |
| | | .info { |
| | | display: flex; |
| | | align-items: center; |
| | | color: #666666; |
| | | margin-left: 12rpx; |
| | | .icon{ |
| | | |
| | | .icon { |
| | | width: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | .num{ |
| | | |
| | | .num { |
| | | margin-right: 28rpx; |
| | | } |
| | | .primary{ |
| | | |
| | | .primary { |
| | | color: var(--themeColor); |
| | | } |
| | | } |
| | |
| | | <view class="app"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input 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 bindconfirm="bindblur" bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="æç´¢å®æ¯åç§°" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- --> |
| | | <view class="main_content"> |
| | | <view class="query_wrap"> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">飿 ¼</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">空é´</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">é´å</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">é´ç§°</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | <view class="item" bindtap="changeShowParams"> |
| | | <view class="name">空称</view> |
| | | <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ showParams }}" class="query_param"> |
| | | <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="changeShowParams">åæ¶</view> |
| | | <view class="btn sub">确认</view> |
| | | </view> |
| | | </view> |
| | | <view class="status"> |
| | | <view class="item {{ activeStatus == '0' ? 'active' : '' }}" data-status="0" bindtap="statusChange">é»è®¤</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ activeStatus == '1' ? 'active' : '' }}" data-status="1" bindtap="statusChange">æç</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ activeStatus == '2' ? 'active' : '' }}" data-status="2" bindtap="statusChange">ææ°</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <view class="goods_list"> |
| | | <view class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <view class="tag">宿</view> |
| | | </view> |
| | | <view class="content"> |
| | | <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 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> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" class="img"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </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="content"> |
| | | <view class="name">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</view> |
| | | <view class="btns"> |
| | | <view class="btn" bindtap="cancelParam">åæ¶</view> |
| | | <view bindtap="subParam" class="btn sub">确认</view> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="shade"></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> |
| | | <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 wx:if="{{ !item.collection }}" 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 {{item.collection ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>1000</text> |
| | | <text>{{ item.viewCount }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" 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">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</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> |
| | | <view class="item"> |
| | | <view class="img_wrap"> |
| | | <image src="../../static/icon/test.png" 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">é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²é¢ç´æ²</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> |
| | | </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: 750rpx; |
| | | padding: 0 40rpx; |
| | | } |
| | | .main_content .query_wrap { |
| | | display: flex; |
| | | padding: 0 16rpx; |
| | | } |
| | | .main_content .query_wrap .item { |
| | | margin-right: 36rpx; |
| | | height: 88rpx; |
| | | display: flex; |
| | | flex-shrink: 0; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | flex: 1; |
| | | } |
| | | .main_content .query_wrap .item .name { |
| | | margin-right: 6rpx; |
| | | } |
| | | .main_content .query_param { |
| | | position: absolute; |
| | | z-index: 99; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | } |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 400rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .query_param .list .item { |
| | | width: 202rpx; |
| | |
| | | background: var(--themeColor); |
| | | color: #fff; |
| | | } |
| | | .main_content .shade { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | z-index: 99; |
| | | } |
| | | .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); |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | justify-content: space-around; |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 324rpx; |
| | | margin-bottom: 60rpx; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | .main_content .goods_list .item .img_wrap { |
| | | width: 100%; |
| | |
| | | overflow: hidden; |
| | | position: relative; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .play { |
| | | width: 60rpx; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | z-index: 1; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .full { |
| | | position: absolute; |
| | | top: 32rpx; |
| | | right: 32rpx; |
| | | font-size: 20rpx; |
| | | color: rgba(255, 255, 255, 0.8); |
| | | width: 112rpx; |
| | | height: 42rpx; |
| | | background: rgba(0, 0, 0, 0.54); |
| | | border-radius: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .full .icon { |
| | | width: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .tag { |
| | | padding: 0 10rpx; |
| | | height: 46rpx; |
| | | line-height: 46rpx; |
| | | text-align: center; |
| | | background: rgba(0, 0, 0, 0.4); |
| | | border-radius: 8rpx; |
| | | .main_content .goods_list .item .img_wrap .new { |
| | | width: 72rpx; |
| | | position: absolute; |
| | | left: 12rpx; |
| | | top: 16rpx; |
| | | color: #fff; |
| | | font-size: 24rpx; |
| | | left: 0; |
| | | top: 0; |
| | | z-index: 10; |
| | | } |
| | | .main_content .goods_list .item .content { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 0 10rpx; |
| | | } |
| | | .main_content .goods_list .item .name { |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | |
| | | { |
| | | "name": "wechat_staff", |
| | | "version": "1.0.0", |
| | | "lockfileVersion": 1, |
| | | "lockfileVersion": 3, |
| | | "requires": true, |
| | | "dependencies": { |
| | | "@vant/weapp": { |
| | | "packages": { |
| | | "": { |
| | | "name": "wechat_staff", |
| | | "version": "1.0.0", |
| | | "license": "ISC", |
| | | "dependencies": { |
| | | "@vant/weapp": "^1.11.6", |
| | | "hy-event-store": "^1.3.1", |
| | | "miniprogram-sm-crypto": "^0.3.13", |
| | | "moment": "^2.30.1", |
| | | "mp-html": "^2.5.0" |
| | | }, |
| | | "devDependencies": {} |
| | | }, |
| | | "node_modules/@vant/weapp": { |
| | | "version": "1.11.6", |
| | | "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.11.6.tgz", |
| | | "integrity": "sha512-a3heReWYT2gNdsyj6x1hBwsM8V8NrjcPAmle86NH2CD2V/i/h0le75piW6KntSfOPCwekVWMBKhysNrBpJeKdw==" |
| | | }, |
| | | "jsbn": { |
| | | "node_modules/hy-event-store": { |
| | | "version": "1.3.1", |
| | | "resolved": "https://registry.npmjs.org/hy-event-store/-/hy-event-store-1.3.1.tgz", |
| | | "integrity": "sha512-uD+14mz4ONiAs9cX/csjUJ2pHTPFciE3JvIbZ+lsbaXopZWbnETEjwJ0a4l5GqNGcltcW3gJjlnUXCJPBoABfg==" |
| | | }, |
| | | "node_modules/jsbn": { |
| | | "version": "1.1.0", |
| | | "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz", |
| | | "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" |
| | | }, |
| | | "miniprogram-sm-crypto": { |
| | | "node_modules/miniprogram-sm-crypto": { |
| | | "version": "0.3.13", |
| | | "resolved": "https://registry.npmmirror.com/miniprogram-sm-crypto/-/miniprogram-sm-crypto-0.3.13.tgz", |
| | | "integrity": "sha512-H7qwbCEmIXZzekCSgEWeHh1mb4cnz0E42YH3U5xqpOaJBB2Sj9ySq0hTGv0f+Jwo5SknABR6fw+EtjnMyJ/O/Q==", |
| | | "requires": { |
| | | "dependencies": { |
| | | "jsbn": "^1.1.0" |
| | | } |
| | | }, |
| | | "moment": { |
| | | "node_modules/moment": { |
| | | "version": "2.30.1", |
| | | "resolved": "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz", |
| | | "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" |
| | | "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", |
| | | "engines": { |
| | | "node": "*" |
| | | } |
| | | }, |
| | | "mp-html": { |
| | | "node_modules/mp-html": { |
| | | "version": "2.5.0", |
| | | "resolved": "https://registry.npmmirror.com/mp-html/-/mp-html-2.5.0.tgz", |
| | | "integrity": "sha512-uvBH5tIaDIlj8qaxsvNXU3RKX0jvXOo3J6FAi/notUv/ds6j79UUTE82aDkxxUk0eLUU0CiCqMrR7WWnytk30Q==" |
| | |
| | | "@vant/weapp": "^1.11.6", |
| | | "miniprogram-sm-crypto": "^0.3.13", |
| | | "moment": "^2.30.1", |
| | | "mp-html": "^2.5.0" |
| | | "mp-html": "^2.5.0", |
| | | "hy-event-store": "^1.3.1" |
| | | }, |
| | | "devDependencies": {}, |
| | | "scripts": { |
| | |
| | | // pages/detailDis/case.js |
| | | import { actionDo, getWholecaseInfo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bottomLift: 0 |
| | | bottomLift: 0, |
| | | showShare: false |
| | | }, |
| | | |
| | | /** |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.getDetail(options.id) |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id: options.id |
| | | }) |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({id: options.id, member}) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | priviewFull(){ |
| | | let { panorama: link, title } = this.data.info |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | | success: function(res) { |
| | | // éè¿eventChannelå被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link, title }) |
| | | } |
| | | }) |
| | | }, |
| | | openShare() { |
| | | this.setData({showShare: true}) |
| | | }, |
| | | handleShare() { |
| | | console.log('ç¹å»äºå享'); |
| | | actionDo({ actionType: 'share', id: this.data.info.id }) |
| | | }, |
| | | // onShareAppMessage: function () { |
| | | // // let { productDetail, userInfo } = this.data |
| | | // return { |
| | | // title: productDetail.title, |
| | | // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0' |
| | | // } |
| | | // }, |
| | | handleAction(e){ |
| | | const actionType = e.currentTarget.dataset.code |
| | | const { info } = this.data |
| | | actionDo({ |
| | | actionType, |
| | | id: this.data.info.id |
| | | }).then(res => { |
| | | info.collection = !info.collection |
| | | this.setData({info}) |
| | | wx.showToast({ |
| | | title: actionType == 'collect' ? 'æ¶èæå' : 'åæ¶æ¶è', |
| | | }) |
| | | }) |
| | | }, |
| | | getDetail(id) { |
| | | getWholecaseInfo({id}).then(res => { |
| | | this.setData({ info: res.data }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | }) |
| | | }, |
| | | handleDesign() { |
| | | wx.navigateTo({ |
| | | url: '/pages/design/design', |
| | | }) |
| | | }, |
| | | playVideo() { |
| | | wx.previewMedia({ |
| | | sources: [{ url: this.data.info.video, type: 'video' }] |
| | | }) |
| | | }, |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | }, |
| | | |
| | | /** |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "navigationBarTitleText": "æ¡ä¾è¯¦æ
" |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "mp-html": "mp-html", |
| | | "buoyClient": "../../components/buoyClient/index" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | } |
| | | |
| | | .fullview_wrap { |
| | | position: relative; |
| | | .banner { |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | } |
| | | .full{ |
| | | position: absolute; |
| | | top: 32rpx; |
| | | right: 32rpx; |
| | | font-size: 20rpx; |
| | | color: rgba(255,255,255,0.8); |
| | | width: 112rpx; |
| | | height: 42rpx; |
| | | background: rgba(0,0,0,0.54); |
| | | border-radius: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | .icon{ |
| | | width: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | .list{ |
| | | .item{ |
| | | .content{ |
| | | margin-top: 20rpx; |
| | | font-weight: 300; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | .spaceList{ |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .name{ |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | } |
| | | .img{ |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | .footer { |
| | | position: fixed; |
| | |
| | | width: 44rpx; |
| | | } |
| | | } |
| | | } |
| | | .share_modal{ |
| | | .btns{ |
| | | display: flex; |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | .item{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | image{ |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | } |
| | | } |
| | | .cancel{ |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | } |
| | |
| | | <view class="container"> |
| | | <view class="main_title">ç®æ¬§é£æ ¼70m²两å±
室</view> |
| | | <view class="time">å叿¶é´ï¼2021-08-21 10:0</view> |
| | | <buoyClient showPurpose="1" /> |
| | | <view class="main_title">{{ info.title }}</view> |
| | | <view class="time">å叿¶é´ï¼{{ info.publishDt }}</view> |
| | | <view class="fullview_wrap"> |
| | | <image class="banner" src="../../static/icon/test.png" mode="widthFix"></image> |
| | | <view bindtap="priviewFull" wx:if="{{ info.panorama }}" class="full"> |
| | | <image class="icon" src="../../static/icon/ic_720.png" mode="widthFix"></image> |
| | | <text>å
¨æ¯</text> |
| | | </view> |
| | | <image class="banner" src="{{ info.coverImage }}" mode="widthFix"></image> |
| | | </view> |
| | | <view class="h1">å¸ç½®å¾</view> |
| | | <image class="img" src="../../static/icon/test.png" mode="widthFix"></image> |
| | | <image class="img" src="{{ info.layoutUlr }}" mode="widthFix"></image> |
| | | <view class="analysis"> |
| | | <view class="h2">æ¡ä¾è§£æ</view> |
| | | <view class="text">为ä¿çå
¥æ·çå¨çº³ç©ºé´ï¼å°å«çé´çé¨ç§»å¨ä¸æ®µè·ç¦»ï¼æ¹ä¾¿äºå
¥æ·è´µç设置ï¼å¨ç©é´å°éå主å§è¡£å¸½é´ï¼å¢å 空é´ä½¿ç¨çåæ¿å±æ´ä½æ§ã客å
çæ ¼å±è®¾è®¡å¢å äºç©ºé´ç屿¬¡æã</view> |
| | | <view class="text">{{ info.caseInfo }}</view> |
| | | </view> |
| | | <view class="list"> |
| | | <view class="item"> |
| | | <view class="h1">01.客å
</view> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="h1">01.客å
</view> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="h1">01.客å
</view> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | <view wx:for="{{ info.apiSpaceCaseVos }}" class="item"> |
| | | <view class="h1">{{ item.spaceName }}</view> |
| | | <image class="img" wx:for="{{ item.imgList }}" wx:for-item="img" src="{{ img }}" mode="widthFix" /> |
| | | <view class="content">{{ item.spaceDesc }}</view> |
| | | </view> |
| | | </view> |
| | | <!-- footer --> |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <view class="item"> |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <button class="item btn"> |
| | | <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.collection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">æ¶è</view> |
| | | </view> |
| | | <view class="item"> |
| | | </button> |
| | | <button open-type="share" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">å享</view> |
| | | </view> |
| | | <view class="sub_btn"> |
| | | </button> |
| | | <view class="sub_btn" bindtap="handleDesign"> |
| | | <image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image> |
| | | <view>å
è´¹é¢çº¦ä¸å±è®¾è®¡</view> |
| | | </view> |
| | |
| | | color: #999999; |
| | | margin-bottom: 48rpx; |
| | | } |
| | | .container .fullview_wrap { |
| | | position: relative; |
| | | } |
| | | .container .fullview_wrap .banner { |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | } |
| | | .container .fullview_wrap .full { |
| | | position: absolute; |
| | | top: 32rpx; |
| | | right: 32rpx; |
| | | font-size: 20rpx; |
| | | color: rgba(255, 255, 255, 0.8); |
| | | width: 112rpx; |
| | | height: 42rpx; |
| | | background: rgba(0, 0, 0, 0.54); |
| | | border-radius: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .container .fullview_wrap .full .icon { |
| | | width: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | .container .img { |
| | | width: 100%; |
| | |
| | | color: #333333; |
| | | } |
| | | .container .list .item .content { |
| | | margin-top: 20rpx; |
| | | font-weight: 300; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | .container .list .item .img { |
| | | width: 100%; |
| | | } |
| | | .spaceList .item { |
| | | margin-bottom: 60rpx; |
| | | } |
| | | .spaceList .item .name { |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | } |
| | | .spaceList .item .img { |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | } |
| | | .footer { |
| | | position: fixed; |
| | |
| | | .footer .item .icon { |
| | | width: 44rpx; |
| | | } |
| | | .share_modal .btns { |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .share_modal .btns .item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | } |
| | | .share_modal .btns .item image { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .share_modal .cancel { |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | |
| | | // pages/detailDis/product.js |
| | | import { |
| | | shareContent, |
| | | getProductInfo, |
| | | actionDo |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bottomLift: 0 |
| | | bottomLift: 0, |
| | | id: '', |
| | | info: {}, |
| | | member: {}, |
| | | showShare: false |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.getDetail(options.id) |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id: options.id |
| | | }) |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({ |
| | | id: options.id, |
| | | member |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | handleAction(e) { |
| | | const actionType = e.currentTarget.dataset.code |
| | | const { |
| | | info |
| | | } = this.data |
| | | actionDo({ |
| | | actionType, |
| | | id: this.data.info.id |
| | | }).then(res => { |
| | | info.collection = !info.collection |
| | | this.setData({ |
| | | info |
| | | }) |
| | | wx.showToast({ |
| | | title: actionType == 'collect' ? 'æ¶èæå' : 'åæ¶æ¶è', |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | getDetail(id) { |
| | | getProductInfo({ |
| | | id |
| | | }).then(res => { |
| | | this.setData({ |
| | | info: res.data |
| | | }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | playVideo() { |
| | | wx.previewMedia({ |
| | | sources: [{ |
| | | url: this.data.info.video, |
| | | type: 'video' |
| | | }] |
| | | }) |
| | | }, |
| | | bannerbindload(e) { |
| | | const { |
| | | height, |
| | | width |
| | | } = e.detail |
| | | let activeHeight = height * 670 / width |
| | | this.setData({ |
| | | bannerHeight: activeHeight |
| | | }) |
| | | }, |
| | | handleDesign() { |
| | | wx.navigateTo({ |
| | | url: '/pages/design/design', |
| | | }) |
| | | }, |
| | | openShare() { |
| | | this.setData({ |
| | | showShare: true |
| | | }) |
| | | }, |
| | | handleShare() { |
| | | console.log('ç¹å»äºå享'); |
| | | actionDo({ |
| | | actionType: 'share', |
| | | id: this.data.info.id |
| | | }) |
| | | // shareContent({id: this.data.info.id || this.data.id}).then(res => { |
| | | // this.setData({showShare: false}) |
| | | // }) |
| | | }, |
| | | // onShareAppMessage: function () { |
| | | // // let { productDetail, userInfo } = this.data |
| | | // return { |
| | | // title: productDetail.title, |
| | | // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0' |
| | | // } |
| | | // }, |
| | | onClose() { |
| | | this.setData({ |
| | | showShare: false |
| | | }) |
| | | }, |
| | | handleDown() { |
| | | let { |
| | | info |
| | | } = this.data |
| | | wx.showToast({ |
| | | title: 'ä¸è½½ä¸', |
| | | icon: 'loading' |
| | | }) |
| | | console.log('info.picUrls', info) |
| | | wx.downloadFile({ |
| | | url: info.picUrls, |
| | | success(res) { |
| | | // console.log(res) |
| | | wx.saveImageToPhotosAlbum({ |
| | | filePath: res.tempFilePath, |
| | | success(data) { |
| | | that.toSaveCaseShare() |
| | | wx.showToast({ |
| | | title: 'ä¸è½½æå', |
| | | }) |
| | | }, |
| | | fail(error) { |
| | | console.log(error) |
| | | wx.showToast({ |
| | | title: 'ä¸è½½å¤±è´¥', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | fail(err) { |
| | | console.log(err.errMsg) |
| | | wx.showToast({ |
| | | title: 'ä¸è½½å¤±è´¥', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "mp-html": "mp-html", |
| | | "buoyClient": "../../components/buoyClient/index", |
| | | "detailFooter": "../../components/detailFooter/index" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .main_app{ |
| | | padding-bottom: 160rpx; |
| | | } |
| | | page { |
| | | background-color: #f7f7f7; |
| | | } |
| | | .banner_swiper{ |
| | | image{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | .main_content { |
| | |
| | | border-radius: 16rpx 16rpx 0rpx 0rpx; |
| | | background-color: #fff; |
| | | margin-bottom: 20rpx; |
| | | |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 36rpx; |
| | | margin-bottom: 16rpx; |
| | | } |
| | | |
| | | .desc { |
| | | font-size: 26rpx; |
| | | color: #555555; |
| | | margin: 16rpx 0 26rpx; |
| | | margin-bottom: 26rpx; |
| | | } |
| | | |
| | | .text { |
| | |
| | | margin-bottom: 40rpx; |
| | | } |
| | | } |
| | | |
| | | .spaceList{ |
| | | .item{ |
| | | .name{ |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | } |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | .counselor { |
| | | width: 670rpx; |
| | | padding: 0 0 0 30rpx; |
| | |
| | | font-size: 36rpx; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | |
| | | video { |
| | | .img_wrap{ |
| | | width: 100%; |
| | | border: 1px solid; |
| | | border-radius: 8rpx; |
| | | position: relative; |
| | | .img{ |
| | | width: 100%; |
| | | } |
| | | .play{ |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | width: 136rpx; |
| | | height: 58rpx; |
| | | line-height: 56rpx; |
| | | text-align: center; |
| | | background: rgba(0,0,0,0.54); |
| | | border-radius: 30rpx; |
| | | font-size: 26rpx; |
| | | color: rgba(255,255,255,0.8); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | .line { |
| | | display: flex; |
| | | height: 62rpx; |
| | | height: 32rpx; |
| | | margin-bottom: 24rpx; |
| | | |
| | | .label { |
| | | width: 120rpx; |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | |
| | | .val { |
| | | flex: 1; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | } |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100rpx; |
| | | .btn{ |
| | | padding: 0; |
| | | margin-top: 16rpx; |
| | | } |
| | | } |
| | | .sub_btn { |
| | | display: flex; |
| | |
| | | <view> |
| | | <view class="user"> |
| | | <view class="main_app"> |
| | | <buoyClient showPurpose="1" /> |
| | | <detailFooter /> |
| | | <view class="user" wx:if="{{ false }}"> |
| | | <view class="avatar"></view> |
| | | <view class="content"> |
| | | <view class="name">䏿¢æ</view> |
| | |
| | | </view> |
| | | <view class="btn">èç³»TA</view> |
| | | </view> |
| | | <!-- bannerè½®æ --> |
| | | <swiper class="banner_swiper" circular indicator-dots autoplay style="height:{{bannerHeight}}rpx" duration> |
| | | <block wx:for="{{ info.bannerImgList }}"> |
| | | <swiper-item> |
| | | <image bindload="bannerbindload" mode="widthFix" src="{{ item }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | <view class="main_content"> |
| | | <view class="title">è«è¥¿åæ¥-é¤å
</view> |
| | | <view class="desc">ç®æ¬§é£æ ¼</view> |
| | | <view class="text">å®¶å±
飿 ¼ä¸å¿äºåºæå½¢å¼ï¼å¨æ¿åè½ä¸å±éäºä¸æ¥ä¸é¤ã |
| | | å
ç´ ä¸æè´¨ç¢°æåºçä¸ä»
æ¯è®¾è®¡æï¼æ´æ¯ä¸ç§é²æç䏿 |
| | | 䏿 ¼çç°ä»£æåº¦ï¼èåå½ä¸æµè¡ç¾å¦ï¼æè®¾ç©ºé´çæ 飿 ¼ |
| | | åã</view> |
| | | <view class="user counselor"> |
| | | <view class="avatar_wrap"> |
| | | <image class="avatar" mode="widthFix" src="../../static/icon/home_ic_guwen@2x.png"></image> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="name">æ¨çä¸å±å®¶å±
顾é®</view> |
| | | <view class="desc">æ¨èº«è¾¹çå
¨å±è®¾è®¡ä¸å®¶</view> |
| | | </view> |
| | | <view class="btn">å»çç</view> |
| | | </view> |
| | | <view class="title">{{ info.title }}</view> |
| | | <view class="desc" wx:if="{{ info.subtitle }}">{{ info.subtitle }}</view> |
| | | <view class="text">{{ info.intro }}</view> |
| | | </view> |
| | | <!-- video --> |
| | | <view class="video"> |
| | | <view wx:if="{{ info.video }}" class="video"> |
| | | <view class="title">产åè§é¢</view> |
| | | <video src=""></video> |
| | | <view class="img_wrap"> |
| | | <image class="img" src="{{ info.coverImage }}" mode="widthFix"></image> |
| | | <view bindtap="playVideo" class="play">ææ¾</view> |
| | | </view> |
| | | </view> |
| | | <view class="detail"> |
| | | <view class="title">产å详æ
</view> |
| | | <view class="line"> |
| | | <view class="label">ååï¼</view> |
| | | <view class="val">è«è¥¿åæ¥-é¤å
</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">å·¥èºï¼</view> |
| | | <view class="val">è«è¥¿åæ¥-é¤å
</view> |
| | | <view class="line" wx:for="{{ info.productParamList }}"> |
| | | <view class="label">{{ item.paramName }}ï¼</view> |
| | | <view class="val">{{ item.paramValue }}</view> |
| | | </view> |
| | | </view> |
| | | <!-- footer --> |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <view class="item"> |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <view class="name">æ¶è</view> |
| | | </view> |
| | | <view class="item"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">å享</view> |
| | | </view> |
| | | <view class="sub_btn"> |
| | | <image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image> |
| | | <view>å
è´¹é¢çº¦ä¸å±è®¾è®¡</view> |
| | | </view> |
| | | <!-- å¯ææ¬ --> |
| | | <view> |
| | | <mp-html content="{{info.content}}"></mp-html> |
| | | </view> |
| | | <view class="spaceList"> |
| | | <view class="item" wx:for="{{ info.spaceList }}"> |
| | | <!-- <view class="name">{{ item.spaceName }}</view> --> |
| | | <image src="{{ item.spaceImg }}" mode="widthFix" class="img"></image> |
| | | <!-- <mp-html content="{{item.spaceContent}}"></mp-html> --> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | font-size: 26rpx; |
| | | color: #fff; |
| | | } |
| | | .main_app { |
| | | padding-bottom: 160rpx; |
| | | } |
| | | page { |
| | | background-color: #f7f7f7; |
| | | } |
| | | .banner_swiper image { |
| | | width: 100%; |
| | | } |
| | | .main_content { |
| | | padding: 52rpx 40rpx 40rpx; |
| | |
| | | .main_content .title { |
| | | font-weight: 500; |
| | | font-size: 36rpx; |
| | | margin-bottom: 16rpx; |
| | | } |
| | | .main_content .desc { |
| | | font-size: 26rpx; |
| | | color: #555555; |
| | | margin: 16rpx 0 26rpx; |
| | | margin-bottom: 26rpx; |
| | | } |
| | | .main_content .text { |
| | | font-size: 26rpx; |
| | | color: #555555; |
| | | margin-bottom: 40rpx; |
| | | } |
| | | .spaceList .item .name { |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | } |
| | | .spaceList .item .img { |
| | | width: 100%; |
| | | } |
| | | .counselor { |
| | | width: 670rpx; |
| | |
| | | font-size: 36rpx; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | .video video { |
| | | .video .img_wrap { |
| | | width: 100%; |
| | | border: 1px solid; |
| | | border-radius: 8rpx; |
| | | position: relative; |
| | | } |
| | | .video .img_wrap .img { |
| | | width: 100%; |
| | | } |
| | | .video .img_wrap .play { |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | width: 136rpx; |
| | | height: 58rpx; |
| | | line-height: 56rpx; |
| | | text-align: center; |
| | | background: rgba(0, 0, 0, 0.54); |
| | | border-radius: 30rpx; |
| | | font-size: 26rpx; |
| | | color: rgba(255, 255, 255, 0.8); |
| | | } |
| | | .detail { |
| | | padding: 52rpx 40rpx 40rpx; |
| | |
| | | } |
| | | .detail .line { |
| | | display: flex; |
| | | height: 62rpx; |
| | | height: 32rpx; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .detail .line .label { |
| | | width: 120rpx; |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .detail .line .val { |
| | | flex: 1; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | } |
| | |
| | | align-items: center; |
| | | height: 100rpx; |
| | | } |
| | | .footer .btns .btn { |
| | | padding: 0; |
| | | margin-top: 16rpx; |
| | | } |
| | | .footer .sub_btn { |
| | | display: flex; |
| | | justify-content: center; |
| | |
| | | // pages/detailDis/realpic.js |
| | | import { getRealcaseInfo, actionDo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bottomLift: 0 |
| | | bottomLift: 0, |
| | | id: '', |
| | | info: {}, |
| | | member: {}, |
| | | showShare: false |
| | | }, |
| | | |
| | | /** |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.getDetail(options.id) |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id: options.id |
| | | }) |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({id: options.id, member}) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | handleAction(e){ |
| | | const actionType = e.currentTarget.dataset.code |
| | | const { info } = this.data |
| | | actionDo({ |
| | | actionType, |
| | | id: this.data.info.id |
| | | }).then(res => { |
| | | info.collection = !info.collection |
| | | wx.showToast({ |
| | | title: actionType == 'collect' ? 'æ¶èæå' : 'åæ¶æ¶è', |
| | | }) |
| | | this.setData({info}) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | getDetail(id) { |
| | | getRealcaseInfo({id}).then(res => { |
| | | this.setData({ info: res.data }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | playVideo() { |
| | | wx.previewMedia({ |
| | | sources: [{ url: this.data.info.video, type: 'video' }] |
| | | }) |
| | | }, |
| | | bannerbindload(e) { |
| | | const { height, width } = e.detail |
| | | let activeHeight = height * 670 / width |
| | | this.setData({ |
| | | bannerHeight: activeHeight |
| | | }) |
| | | }, |
| | | handleDesign() { |
| | | wx.navigateTo({ |
| | | url: '/pages/design/design', |
| | | }) |
| | | }, |
| | | openShare() { |
| | | this.setData({showShare: true}) |
| | | }, |
| | | handleShare() { |
| | | console.log('ç¹å»äºå享'); |
| | | actionDo({ actionType: 'share', id: this.data.info.id }) |
| | | // shareContent({id: this.data.info.id || this.data.id}).then(res => { |
| | | // this.setData({showShare: false}) |
| | | // }) |
| | | }, |
| | | // onShareAppMessage: function () { |
| | | // // let { productDetail, userInfo } = this.data |
| | | // return { |
| | | // title: productDetail.title, |
| | | // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0' |
| | | // } |
| | | // }, |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | }, |
| | | handleDown() { |
| | | let { info } = this.data |
| | | wx.showToast({ |
| | | title: 'ä¸è½½ä¸', |
| | | icon: 'loading' |
| | | }) |
| | | console.log('info.picUrls', info) |
| | | wx.downloadFile({ |
| | | url: info.picUrls, |
| | | success (res) { |
| | | // console.log(res) |
| | | wx.saveImageToPhotosAlbum({ |
| | | filePath: res.tempFilePath, |
| | | success(data) { |
| | | that.toSaveCaseShare() |
| | | wx.showToast({ |
| | | title: 'ä¸è½½æå', |
| | | }) |
| | | }, |
| | | fail(error) { |
| | | console.log(error) |
| | | wx.showToast({ |
| | | title: 'ä¸è½½å¤±è´¥', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | fail (err) { |
| | | console.log(err.errMsg) |
| | | wx.showToast({ |
| | | title: 'ä¸è½½å¤±è´¥', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "navigationBarTitleText": "宿¯è¯¦æ
" |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "buoyClient": "../../components/buoyClient/index" |
| | | }, |
| | | "navigationBarTitleText": "" |
| | | } |
| | |
| | | .container { |
| | | padding: 0 40rpx 220rpx; |
| | | |
| | | .info_item{ |
| | | width: 100%; |
| | | } |
| | | .main_title { |
| | | font-weight: 500; |
| | | font-size: 44rpx; |
| | | color: #222222; |
| | | margin: 32rpx 0; |
| | | } |
| | | |
| | | .desc{ |
| | | margin-top: 24rpx; |
| | | line-height: 42rpx; |
| | | } |
| | | .time { |
| | | font-size: 26rpx; |
| | | color: #999999; |
| | |
| | | width: 44rpx; |
| | | } |
| | | } |
| | | } |
| | | .share_modal{ |
| | | .btns{ |
| | | display: flex; |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | .item{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | image{ |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | } |
| | | } |
| | | .cancel{ |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | } |
| | |
| | | <view class="container"> |
| | | <view class="main_title">ç®æ¬§é£æ ¼70m²两å±
室</view> |
| | | <view class="time">å叿¶é´ï¼2021-08-21 10:0</view> |
| | | <view class="list"> |
| | | <buoyClient showPurpose="1" /> |
| | | <view class="main_title">{{ info.title }}</view> |
| | | <view class="time">å叿¶é´ï¼{{ info.publishDt }}</view> |
| | | <image class="info_item" wx:for="{{ info.contentImgList }}" src="{{ item }}" mode="widthFix"></image> |
| | | <view class="desc">{{ info.contentText || '' }}</view> |
| | | <!-- <view class="list"> |
| | | <view class="item"> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | <view class="item"> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | <view class="item"> |
| | | <image src="" mode="widthFix" /> |
| | | <view class="content">çæ¯äºæ´é½åä¸çç»çåæï¼éè²æ¡åç»é¨åæåæ¯ä¸ä¸æ ·ç审ç¾ï¼è¾¹æ¡å¾®æåå
¥ï¼å·¦å³å¯¹ç§°åå¸ï¼ç¯å
æ 衬ä¸ï¼ç¾å³ç»ä¸½å¤å§¿</view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <!-- footer --> |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <view class="item"> |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <button class="item btn"> |
| | | <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.collection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">æ¶è</view> |
| | | </view> |
| | | <view class="item"> |
| | | </button> |
| | | <button open-type="share" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">å享</view> |
| | | </view> |
| | | <view class="sub_btn"> |
| | | </button> |
| | | <view class="sub_btn" bindtap="handleDesign"> |
| | | <image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image> |
| | | <view>å
è´¹é¢çº¦ä¸å±è®¾è®¡</view> |
| | | </view> |
| | |
| | | .container { |
| | | padding: 0 40rpx 220rpx; |
| | | } |
| | | .container .info_item { |
| | | width: 100%; |
| | | } |
| | | .container .main_title { |
| | | font-weight: 500; |
| | | font-size: 44rpx; |
| | | color: #222222; |
| | | margin: 32rpx 0; |
| | | } |
| | | .container .desc { |
| | | margin-top: 24rpx; |
| | | line-height: 42rpx; |
| | | } |
| | | .container .time { |
| | | font-size: 26rpx; |
| | |
| | | .footer .item .icon { |
| | | width: 44rpx; |
| | | } |
| | | .share_modal .btns { |
| | | min-height: 320rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .share_modal .btns .item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | background-color: #fff; |
| | | } |
| | | .share_modal .btns .item image { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .share_modal .cancel { |
| | | height: 80rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | |
| | | // pages/discover/discover.js |
| | | import { getCataLogTagList, getCatalogList } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | */ |
| | | data: { |
| | | menuButtonInfo: {}, |
| | | activeTabs: '0' |
| | | }, |
| | | catalogCode: "product_intro", |
| | | activeCate: '', |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | height: 0, |
| | | top: 0, |
| | | }, |
| | | onLoad(options) { |
| | | let menuButtonInfo = wx.getMenuButtonBoundingClientRect(); |
| | | this.setData({menuButtonInfo}) |
| | | console.log('WindowInfo', menuButtonInfo); |
| | | }, |
| | | tabsClick(e) { |
| | | const activeTabs = e.currentTarget.dataset.tab |
| | | this.setData({activeTabs}) |
| | | const catalogCode = e.currentTarget.dataset.code |
| | | this.setData({catalogCode}) |
| | | }, |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | |
| | | "usingComponents": { |
| | | "disProduct": "../../components/disProduct", |
| | | "disCase": "../../components/disCase", |
| | | "disRealpic": "../../components/disRealpic" |
| | | "disRealpic": "../../components/disRealpic", |
| | | "buoyClient": "../../components/buoyClient/index" |
| | | }, |
| | | "navigationStyle": "custom", |
| | | "navigationBarTextStyle": "white" |
| | |
| | | .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; |
| | |
| | | } |
| | | } |
| | | } |
| | | .container{ |
| | | .home_tab{ |
| | | position: fixed; |
| | | z-index: 999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .main_content{ |
| | | } |
| | | |
| | | // .main_content{ |
| | | // padding-top: 200rpx; |
| | | // } |
| | |
| | | <view class="container"> |
| | | <view style="height: {{ menuButtonInfo.top }}px;"></view> |
| | | <view class="main_tab"> |
| | | <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-tab="0" bindtap="tabsClick"> |
| | | <view class="name">产å</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ activeTabs == '1' ? 'active' : '' }}" data-tab="1" bindtap="tabsClick"> |
| | | <view class="name">æ¡ä¾</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ activeTabs == '2' ? 'active' : '' }}" data-tab="2" bindtap="tabsClick"> |
| | | <view class="name">宿¯</view> |
| | | <view class="border"></view> |
| | | <buoyClient /> |
| | | <view class="home_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 class="item {{ catalogCode == 'whole_case' ? 'active' : '' }}" data-code="whole_case" bindtap="tabsClick"> |
| | | <view class="name">æ¡ä¾</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | <view class="item {{ catalogCode == 'real_case' ? 'active' : '' }}" data-code="real_case" bindtap="tabsClick"> |
| | | <view class="name">宿¯</view> |
| | | <view class="border"></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content" style="height: calc( 100vh - {{menuButtonInfo.top}}px - 88rpx )"> |
| | | <disProduct wx:if="{{ activeTabs == '0' }}" /> |
| | | <disCase wx:if="{{ activeTabs == '1' }}" /> |
| | | <disRealpic wx:if="{{ activeTabs == '2' }}" /> |
| | | <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 { |
| | |
| | | .main_tab .active .border { |
| | | background: linear-gradient(270deg, rgba(255, 255, 255, 0.56) 0%, rgba(206, 144, 111, 0.88) 100%); |
| | | } |
| | | .home_tab { |
| | | position: fixed; |
| | | z-index: 999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | |
| | | import { getCustomerList } from '../../api/index' |
| | | import { getCustomerList, getCrmAuthUrl } from '../../api/index' |
| | | const { HYEventBus } = require('hy-event-store') |
| | | const eventBus = new HYEventBus() |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | } |
| | | }) |
| | | }, |
| | | jumpClient() { |
| | | |
| | | wx.switchTab({ |
| | | url: '/pages/client/index', |
| | | }) |
| | | jumpClient() { |
| | | getCrmAuthUrl({type:1}).then(res => { |
| | | console.log(res.data) |
| | | this.setData({ url: res.data }) |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + res.data, |
| | | }) |
| | | }) |
| | | }, |
| | | handleSub() { |
| | | console.log('ç¹å»é¥¿äº'); |
| | |
| | | </view> |
| | | </view> |
| | | <view class="desc"> |
| | | <view>å建æ¶é´ï¼</view> |
| | | <view>å建æ¶é´ï¼{{ item.creationDate }}</view> |
| | | <view>导è´ï¼{{ item.dgName }}</view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="desc"> |
| | | <view>å建æ¶é´ï¼</view> |
| | | <view>å建æ¶é´ï¼{{ item.creationDate }}</view> |
| | | <view>导è´ï¼{{ item.dgName }}</view> |
| | | </view> |
| | | </view> |
| | |
| | | */ |
| | | onLoad(options) { |
| | | var app = getApp().globalData |
| | | var userType = options.userType |
| | | |
| | | var userType = options.userType || 1 |
| | | if (userType == 1) { |
| | | //妿æ¥è¯¢èªå·±çä¿¡æ¯ |
| | | this.setData({ |
| | |
| | | const eventChannel = this.getOpenerEventChannel() |
| | | |
| | | if (options.link) { |
| | | that.setData({ link: options.link, id: options.id }) |
| | | that.setData({ link: options.link, id: options.id || '' }) |
| | | } else { |
| | | // çå¬acceptDataFromOpenerPageäºä»¶ï¼è·åä¸ä¸é¡µé¢éè¿eventChannelä¼ éå°å½å页é¢çæ°æ® |
| | | eventChannel.on('acceptDataFromOpenerPage', function(data) { |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/work/index", |
| | | "pathName": "pages/discover/discover", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | |
| | | |
| | | |
| | | export const baseUrl = 'http://192.168.0.135:10027' |
| | | // export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // æ¬å° |
| | | // export const baseUrl = 'http://192.168.0.135:10027' |
| | | export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // æ¬å° |
| | | // export const baseUrl = 'http://zbtest.ahapp.net/zbom_interface/jx/wechat/' //æµè¯æå¡å¨ |
| | | |
| | | // export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/' |