| | |
| | | return request({ |
| | | url: '/web/customer/actionDo', |
| | | data, |
| | | loading: '0' |
| | | loading: data.actionType == 'view' ? '0' : '1' |
| | | }) |
| | | } |
| | | // 我的 预约列表 |
| | |
| | | --themeColor:#B08771; |
| | | color: #111111; |
| | | } |
| | | image{ |
| | | image,video{ |
| | | display: flex; |
| | | border-radius: 8rpx; |
| | | } |
| | |
| | | observer(selectedValues) { |
| | | if (selectedValues && selectedValues.length) { |
| | | this.resetValus(selectedValues) |
| | | console.log("--------------------",this.data.value) |
| | | this.setLabel(); |
| | | } |
| | | } |
| | |
| | | if (!this.data.value.length) { |
| | | this.initRange(); |
| | | } |
| | | console.log(this.data.addressList) |
| | | }else{ |
| | | getArea({ |
| | | "level": "", |
| | |
| | | label:tlable |
| | | }); |
| | | this.setData({value:temVal,label:tlable}) |
| | | console.log("--------------------",this.data.value) |
| | | } |
| | | }) |
| | | } |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | if(touchDot - touchMove > 16){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | if(touchDot - touchMove > 16){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, 200) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, 200); // 动画持续时间 |
| | | }, |
| | | getCatelist() { |
| | | const { catalogCode } = this.data |
| | |
| | | getZhongTaiWholecasePage({ |
| | | catalogCode, pageNum, pageSize, tagCodes, sortType, query |
| | | }).then(res => { |
| | | if (res.data) { |
| | | if (res.data && res.data.records) { |
| | | this.setData({ |
| | | total: res.data.total, |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 680rpx; |
| | | max-height: 480rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | .item { |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 680rpx; |
| | | max-height: 480rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | } |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | if(touchDot - touchMove > 16){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | if(touchDot - touchMove > 16){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, 200) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, 200); // 动画持续时间 |
| | | }, |
| | | getCatelist() { |
| | | getCatalogList({ |
| | |
| | | getZhongTaiProductPage({ |
| | | catalogCode, pageNum, pageSize, sortType, query, tagCodes |
| | | }).then(res => { |
| | | this.setData({ |
| | | datalist: [...this.data.datalist, ...res.data.records], |
| | | total: res.data.total |
| | | }) |
| | | if (res.data && res.data.records) { |
| | | this.setData({ |
| | | datalist: [...this.data.datalist, ...res.data.records], |
| | | total: res.data.total |
| | | }) |
| | | } |
| | | }).finally(()=>{ |
| | | that.setData({isLoading:false}) |
| | | }) |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 680rpx; |
| | | max-height: 480rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 154rpx; |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 680rpx; |
| | | max-height: 480rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .main_right .query_form .list .item { |
| | |
| | | import { getCataLogTagList, getZhongTaiRealcasePage, actionDo } from '../../api/index' |
| | | import { eventBus } from '../../utils/eventBus' |
| | | import { |
| | | getCataLogTagList, |
| | | getZhongTaiRealcasePage, |
| | | actionDo |
| | | } from '../../api/index' |
| | | import { |
| | | eventBus |
| | | } from '../../utils/eventBus' |
| | | let touchDot = 0 |
| | | Component({ |
| | | /** |
| | |
| | | activeParam: [], |
| | | selParam: '', |
| | | tagCodes: [], |
| | | isLoading:false, |
| | | isLoading: false, |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | |
| | | catalogCode: 'real_case' |
| | | }, |
| | | pageLifetimes: { |
| | | show: function() { |
| | | show: function () { |
| | | // 页面被展示 |
| | | console.log('组件被展示'); |
| | | eventBus.once('realpicDeBack', (info) => { |
| | | const dataList = this.data.dataList |
| | | dataList.forEach(item => { |
| | | if(item.id === info.id){ |
| | | if(item.isCollection != info.isCollection){ |
| | | if(!item.isCollection){ |
| | | item.collectCount = (item.collectCount || 0)+1 |
| | | }else if(item.collectCount >0){ |
| | | item.collectCount = (item.collectCount || 0)-1 |
| | | } |
| | | if (item.id === info.id) { |
| | | if (item.isCollection != info.isCollection) { |
| | | if (!item.isCollection) { |
| | | item.collectCount = (item.collectCount || 0) + 1 |
| | | } else if (item.collectCount > 0) { |
| | | item.collectCount = (item.collectCount || 0) - 1 |
| | | } |
| | | } |
| | | item.isCollection = info.isCollection |
| | | item.viewCount ++ |
| | | item.viewCount++ |
| | | } |
| | | }) |
| | | this.setData({ dataList }) |
| | | this.setData({ |
| | | dataList |
| | | }) |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | bindscrolltoupper() { |
| | | this.setData({ showTouch: true }) |
| | | this.setData({ |
| | | showTouch: true |
| | | }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | touchstart(e) { |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | if (touchDot - touchMove > 16) { |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | if (touchDot - touchMove > 16) { |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, 200) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | this.setData({ |
| | | showTouch: false |
| | | }); |
| | | }, 200); // 动画持续时间 |
| | | }, |
| | | getCatelist(){ |
| | | const { catalogCode } = this.data |
| | | getCatelist() { |
| | | const { |
| | | catalogCode |
| | | } = this.data |
| | | getCataLogTagList({ |
| | | catalogCode |
| | | }).then(res => { |
| | | if(res.data && res.data.length > 0){ |
| | | if (res.data && res.data.length > 0) { |
| | | this.setData({ |
| | | cateList: res.data |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | getList() { |
| | | if(this.data.isLoading){ |
| | | if (this.data.isLoading) { |
| | | return |
| | | } |
| | | this.setData({isLoading:true}) |
| | | const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data |
| | | this.setData({ |
| | | isLoading: true |
| | | }) |
| | | const { |
| | | sortType, |
| | | query, |
| | | tagCodes, |
| | | pageNum, |
| | | pageSize, |
| | | catalogCode |
| | | } = this.data |
| | | getZhongTaiRealcasePage({ |
| | | catalogCode,tagCodes,pageNum,pageSize, sortType,query |
| | | catalogCode, |
| | | tagCodes, |
| | | pageNum, |
| | | pageSize, |
| | | sortType, |
| | | query |
| | | }).then(res => { |
| | | if (res.data && res.data.records) { |
| | | this.setData({ |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | total: res.data.total, |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.setData({ |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | total: res.data.total, |
| | | isLoading: false |
| | | }) |
| | | }).finally(()=>{ |
| | | this.setData({isLoading:false}) |
| | | }) |
| | | }, |
| | | scrolltoupper() { |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.setData({ |
| | | pageNum: 1, |
| | | datalist: [], |
| | | total: 0 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | scrolltolower() { |
| | | console.log('触底事件'); |
| | | const { total, dataList, pageNum } = this.data |
| | | if(total > dataList.length){ |
| | | this.setData({ pageNum: pageNum + 1 }) |
| | | const { |
| | | total, |
| | | dataList, |
| | | pageNum |
| | | } = this.data |
| | | if (total > dataList.length) { |
| | | this.setData({ |
| | | pageNum: pageNum + 1 |
| | | }) |
| | | this.getList() |
| | | }else{ |
| | | } else { |
| | | wx.showToast({ |
| | | title: '暂无更多数据', |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | videoClick(e) { |
| | | const { videourl } = e.currentTarget.dataset |
| | | |
| | | let videoPlay = this.selectComponent('.videoPlay'); |
| | | if(videoPlay){ |
| | | videoPlay.startPlayVideo(videourl,this ); |
| | | } |
| | | console.log(videourl+"-------------------------------------") |
| | | const { |
| | | videourl |
| | | } = e.currentTarget.dataset |
| | | |
| | | let videoPlay = this.selectComponent('.videoPlay'); |
| | | if (videoPlay) { |
| | | videoPlay.startPlayVideo(videourl, this); |
| | | } |
| | | console.log(videourl + "-------------------------------------") |
| | | // wx.previewMedia({ |
| | | // sources: [{ url: videourl, type: 'video' }] |
| | | // }) |
| | | }, |
| | | priviewFull(e){ |
| | | priviewFull(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.openContent, |
| | | success: function(res) { |
| | | success: function (res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent, title: item.title }) |
| | | 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.setData({ |
| | | sortType |
| | | }) |
| | | this.setData({ |
| | | pageNum: 1, |
| | | dataList: [], |
| | | total: 0 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | handleAction(e){ |
| | | handleAction(e) { |
| | | const actionType = e.currentTarget.dataset.code |
| | | const id = e.currentTarget.dataset.id |
| | | actionDo({ |
| | |
| | | handleDetail(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | if(item.openType == 'video'){ |
| | | |
| | | let videoPlay = this.selectComponent('.videoPlay'); |
| | | if(videoPlay){ |
| | | videoPlay.startPlayVideo(item.openContent,this ); |
| | | } |
| | | if (item.openType == 'video') { |
| | | |
| | | let videoPlay = this.selectComponent('.videoPlay'); |
| | | if (videoPlay) { |
| | | videoPlay.startPlayVideo(item.openContent, this); |
| | | } |
| | | // wx.previewMedia({ |
| | | // sources: [{ url: item.openContent, type: 'video' }] |
| | | // }) |
| | | } |
| | | if(item.openType == 'link'){ |
| | | if (item.openType == 'link') { |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index?link=' + item.openContent, |
| | | success: function(res) { |
| | | success: function (res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent}) |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | link: item.openContent |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | if(item.openType == 'page'){ |
| | | if (item.openType == 'page') { |
| | | wx.navigateTo({ |
| | | url: '/pages/detailDis/realpic?id=' + item.id, |
| | | }) |
| | | } |
| | | }, |
| | | tagClick(e) { |
| | | if(this.data.isLoading){ |
| | | if (this.data.isLoading) { |
| | | return |
| | | } |
| | | 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( cateList[activeIndex].tempParamIndex==null || cateList[activeIndex].tempParamIndex != paramIndex){ |
| | | const { |
| | | cateList, |
| | | tagCodes, |
| | | activeParam, |
| | | activeIndex |
| | | } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | if (cateList[activeIndex].tempParamIndex == null || cateList[activeIndex].tempParamIndex != paramIndex) { |
| | | cateList[activeIndex].tempParamIndex = paramIndex |
| | | cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | cateList[activeIndex].tempParamCode = code |
| | | }else{ |
| | | } else { |
| | | // tagCodes.splice(index, 1) |
| | | cateList[activeIndex].tempParamIndex = -1 |
| | | cateList[activeIndex].tempParamName = null |
| | | cateList[activeIndex].tempParamCode = null |
| | | } |
| | | // this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ cateList }) |
| | | this.setData({ |
| | | cateList |
| | | }) |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |
| | | const { |
| | | cateList |
| | | } = this.data |
| | | cateList.forEach(item => { |
| | | item.tempParamIndex = item.paramIndex |
| | | item.tempParamName = item.paramName |
| | | item.tempParamCode = item.paramCode |
| | | item.tempParamName = item.paramName |
| | | item.tempParamCode = item.paramCode |
| | | }) |
| | | this.setData({ activeParam: [],cateList,activeIndex: -1 }) |
| | | this.setData({ |
| | | activeParam: [], |
| | | cateList, |
| | | activeIndex: -1 |
| | | }) |
| | | }, |
| | | bindblur() { |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ |
| | | pageNum: 1, |
| | | dataList: [], |
| | | total: 0 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | | const { cateList } = this.data |
| | | var codes =[] |
| | | cateList.forEach(item => { |
| | | const { |
| | | cateList |
| | | } = this.data |
| | | var codes = [] |
| | | cateList.forEach(item => { |
| | | item.paramIndex = item.tempParamIndex |
| | | item.paramName = item.tempParamName |
| | | item.paramCode = item.tempParamCode |
| | | if(item.tempParamIndex >-1 && item.tempParamCode){ |
| | | item.paramName = item.tempParamName |
| | | item.paramCode = item.tempParamCode |
| | | if (item.tempParamIndex > -1 && item.tempParamCode) { |
| | | codes.push(item.tempParamCode) |
| | | } |
| | | }) |
| | | this.setData({ activeParam: [],tagCodes:codes }) |
| | | this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0}) |
| | | }) |
| | | this.setData({ |
| | | activeParam: [], |
| | | tagCodes: codes |
| | | }) |
| | | this.setData({ |
| | | pageNum: 1, |
| | | activeIndex: -1, |
| | | dataList: [], |
| | | total: 0 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e){ |
| | | const { cateList } = this.data |
| | | 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({ |
| | | if (activeIndex === this.data.activeIndex) { |
| | | this.setData({ |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '' |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: cateList[activeIndex].valueVos |
| | | }) |
| | | } |
| | | |
| | | |
| | | // this.setData({showTwo: false}) |
| | | }, |
| | | changeTwo(){ |
| | | changeTwo() { |
| | | const showTwo = !this.data.showTwo |
| | | this.setData({showTwo}) |
| | | this.setData({showOne: false}) |
| | | this.setData({ |
| | | showTwo |
| | | }) |
| | | this.setData({ |
| | | showOne: false |
| | | }) |
| | | }, |
| | | } |
| | | }) |
| | | }) |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 680rpx; |
| | | max-height: 480rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 202rpx; |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 680rpx; |
| | | max-height: 480rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .query_param .list .item { |
| | |
| | | <view wx:if="{{ isVShow }}" bind:tap="onClose" class="video_content"> |
| | | <view class="video"> |
| | | <video id="myVideo" src="{{videoSrc}}" autoplay show-play-btn ></video> |
| | | <video id="myVideo" src="{{videoSrc}}" show-fullscreen-btn="{{false}}" autoplay show-play-btn ></video> |
| | | </view> |
| | | </view > |
| | |
| | | wx.setStorageSync('member', res.data) |
| | | if (tempPath) { |
| | | wx.setStorageSync('tempPath', '') |
| | | if (tempPath == '/pages/webView/index') { |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | | success: function (res) { |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | link: wx.getStorageSync('testUrl') |
| | | }) |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | wx.redirectTo({ |
| | | url: tempPath, |
| | | }) |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | if(touchDot - touchMove > 16){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showCate: true }) |
| | | if(touchDot - touchMove > 16){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showCate: true }) |
| | | this.fadeIn(); |
| | | }, 200) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showCate: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, 200); // 动画持续时间 |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | |
| | | } |
| | | .cate_two{ |
| | | position: absolute; |
| | | width: 750rpx; |
| | | left: 0rpx; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | padding: 0 40rpx; |
| | | height: 88rpx; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | |
| | | } |
| | | .cate_wrap .cate_two { |
| | | position: absolute; |
| | | width: 750rpx; |
| | | left: 0rpx; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | padding: 0 40rpx; |
| | | height: 88rpx; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | |
| | | onLoadLogin(options) { |
| | | this.getDetail(options.id, options.userId || '') |
| | | }, |
| | | onShow(){ |
| | | this.setData({ member: wx.getStorageSync('member') }) |
| | | }, |
| | | onLoad(options) { |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | |
| | | handleDesign() { |
| | | const { member } = this.data |
| | | if (!member.phone) { |
| | | wx.setStorageSync('tempPath', '/pages/design/design') |
| | | return wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | |
| | | eventBus.emit('caseDeBack', this.data.info) |
| | | }, 500) |
| | | }, |
| | | onShow(){ |
| | | this.setData({ member: wx.getStorageSync('member') }) |
| | | }, |
| | | onLoad(options) { |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | |
| | | handleDesign() { |
| | | const { member } = this.data |
| | | if (!member.phone) { |
| | | wx.setStorageSync('tempPath', '/pages/design/design') |
| | | return wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | |
| | | showShare: false |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | |
| | | id: options.id |
| | | }) |
| | | }, |
| | | onShow(){ |
| | | this.setData({ member: wx.getStorageSync('member') }) |
| | | }, |
| | | onUnload() { |
| | | console.log('详情进行了销毁'); |
| | | setTimeout(() => { |
| | |
| | | handleDesign() { |
| | | const { member } = this.data |
| | | if (!member.phone) { |
| | | wx.setStorageSync('tempPath', '/pages/design/design') |
| | | return wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | |
| | | id: options.id |
| | | }) |
| | | }, |
| | | onShow(){ |
| | | this.setData({ member: wx.getStorageSync('member') }) |
| | | }, |
| | | onUnload() { |
| | | console.log('详情进行了销毁'); |
| | | setTimeout(() => { |
| | |
| | | handleDesign() { |
| | | const { member } = this.data |
| | | if (!member.phone) { |
| | | wx.setStorageSync('tempPath', '/pages/design/design') |
| | | return wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | |
| | | rect.bottom // 节点的下边界坐标 |
| | | }).exec(res => { |
| | | console.log(windowInfo.windowHeight) |
| | | this.setData({ videoTop: res[0].top,windowHeight: windowInfo.windowHeight}) |
| | | this.setData({ |
| | | videoTop: res[0].top, |
| | | windowHeight: windowInfo.windowHeight |
| | | }) |
| | | }) |
| | | }, 2000) |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | onLoad(options) { |
| | | console.log(options) |
| | | this.initDictData() |
| | | // this.initData() |
| | | }, |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | wx.setStorageSync('tempPath', '/pages/webView/index') |
| | | wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | |
| | | initData() { |
| | | // 轮播 |
| | | getHomeBanner().then(res => { |
| | | if(res.data){ |
| | | this.setData({ bannerList: res.data }) |
| | | if (res.data) { |
| | | this.setData({ |
| | | bannerList: res.data |
| | | }) |
| | | } |
| | | }) |
| | | // 产品视频 |
| | |
| | | code: 'WX_MINI_CONFIG', |
| | | label: 'ZBOM_STYLE_TEST_URL' |
| | | }).then(res => { |
| | | this.setData({ |
| | | testUrl: res.data.code |
| | | }) |
| | | if (res.data) { |
| | | this.setData({ |
| | | testUrl: res.data.code |
| | | }) |
| | | wx.setStorageSync('testUrl', res.data.code) |
| | | } |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | bindVideoPlay() { |
| | | const { id } = this.data.productVideo[0] |
| | | const { |
| | | id |
| | | } = this.data.productVideo[0] |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id |
| | | }) |
| | | }, |
| | | hdBtn() { |
| | | this.setData({ showWhiteHead: true, open: true,font_color: "#000000", sty: '',topHeadStyle: 1, desc: false }) |
| | | this.setData({ |
| | | showWhiteHead: true, |
| | | open: true, |
| | | font_color: "#000000", |
| | | sty: '', |
| | | topHeadStyle: 1, |
| | | desc: false |
| | | }) |
| | | }, |
| | | touchStart: function (e) { |
| | | touchStart: function (e) { |
| | | touchDot = e.touches[0].pageY; |
| | | }, |
| | | touchMove: function (e) { |
| | | var touchMove = e.touches[0].pageY; |
| | | if (touchMove - touchDot <= 0 && this.data.top <= 1 && this.data.desc) { |
| | | this.setData({ showWhiteHead: true, open: false, desc: false }) |
| | | this.setData({ |
| | | showWhiteHead: true, |
| | | open: false, |
| | | desc: false |
| | | }) |
| | | setTimeout(() => { |
| | | this.setData({ open: true, sty: '' }) |
| | | this.setData({ |
| | | open: true, |
| | | sty: '' |
| | | }) |
| | | }, 1000) |
| | | } |
| | | if (touchMove - touchDot >= 50 && this.data.top <= 1 && !this.data.desc) { |
| | | this.setData({ showWhiteHead: false, open: false, desc: true, sty: 'overflow: hidden;' }) |
| | | this.setData({ |
| | | showWhiteHead: false, |
| | | open: false, |
| | | desc: true, |
| | | sty: 'overflow: hidden;' |
| | | }) |
| | | } |
| | | }, |
| | | onPageScroll(e) { |
| | | const { videoTop, windowHeight, videoPlay } = this.data |
| | | if(e.scrollTop + 100 > videoTop - (windowHeight / 2) && videoPlay ){ |
| | | this.setData({ videoPlay: false }) |
| | | const { |
| | | videoTop, |
| | | windowHeight, |
| | | videoPlay |
| | | } = this.data |
| | | if (e.scrollTop + 100 > videoTop - (windowHeight / 2) && videoPlay) { |
| | | this.setData({ |
| | | videoPlay: false |
| | | }) |
| | | let videoplay = wx.createVideoContext('myvideo', this) |
| | | videoplay.play(); |
| | | } |
| | |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | tagCodes: [], |
| | | |
| | | videoContext:null, |
| | | category: [], |
| | | videoUrl: '', |
| | |
| | | pageSize: 10, |
| | | pageNum: 1, |
| | | |
| | | }, |
| | | changeShowParams(e) { |
| | | const { category } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | if (activeIndex === this.data.activeIndex) { |
| | | this.setData({ activeIndex: -1, activeParam: [] }) |
| | | } else { |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: category[activeIndex].valueVos |
| | | }) |
| | | } |
| | | }, |
| | | cancelParam() { |
| | | const { category } = this.data |
| | | category.forEach(item => { |
| | | item.tempParamIndex = item.paramIndex |
| | | item.tempParamName = item.paramName |
| | | item.tempParamCode = item.paramCode |
| | | }) |
| | | this.setData({ activeParam: [],activeIndex: -1 ,category}) |
| | | }, |
| | | subParam() { |
| | | const { category } = this.data |
| | | var codes = [] |
| | | category.forEach(item => { |
| | | item.paramIndex = item.tempParamIndex |
| | | item.paramName = item.tempParamName |
| | | item.paramCode = item.tempParamCode |
| | | if( item.paramIndex>-1 && item.tempParamCode){ |
| | | codes.push( item.tempParamCode) |
| | | } |
| | | }) |
| | | this.setData({tagCodes:codes}) |
| | | this.setData({ pageNum: 1, activeParam: [] ,activeIndex: -1, dataList: [], total: 0 }) |
| | | this.getList() |
| | | }, |
| | | tagClick(e) { |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { category, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | if ( category[activeIndex].tempParamIndex==null || category[activeIndex].tempParamIndex != paramIndex) { |
| | | category[activeIndex].tempParamIndex = paramIndex |
| | | category[activeIndex].tempParamCode = code |
| | | category[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | } else { |
| | | category[activeIndex].tempParamIndex = -1 |
| | | category[activeIndex].tempParamCode = '' |
| | | category[activeIndex].tempParamName = '' |
| | | } |
| | | this.setData({ category }) |
| | | }, |
| | | onReachBottom() { |
| | | console.log('触底事件'); |
| | |
| | | getZhongTaiVideoPage({ |
| | | pageSize,pageNum, tagCodes |
| | | }).then(res => { |
| | | this.setData({ |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | total: res.data.total |
| | | }) |
| | | if(res.data && res.data.records){ |
| | | this.setData({ |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | total: res.data.total |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getTagList() { |
| | | getCataLogTagList({ |
| | | catalogCode: 'video_rec' |
| | | }).then(res => { |
| | | this.setData({ category: res.data }) |
| | | if(res.data){ |
| | | this.setData({ category: [...res.data] }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | itemClick(e) { |
| | |
| | | }, |
| | | cateClick(e) { |
| | | const { code, index } = e.target.dataset |
| | | this.setData({ tagCodes: [code], activeIndex: index }) |
| | | if(this.data.activeIndex === index){ |
| | | this.setData({ tagCodes: [], activeIndex: -1 }) |
| | | }else{ |
| | | this.setData({ tagCodes: [code], activeIndex: index }) |
| | | } |
| | | this.setData({ total: 0, dataList: [], pageNum: 1 }) |
| | | this.getList() |
| | | }, |
| | |
| | | top: 50%; |
| | | transform: translate(0, -50%); |
| | | } |
| | | } |
| | | .query_wrap_scroll{ |
| | | width: 750rpx; |
| | | padding-left: 40rpx; |
| | | } |
| | | .query_wrap { |
| | | display: flex; |
| | | flex-wrap: nowrap; |
| | | .item { |
| | | flex-shrink: 0; |
| | | margin-right: 48rpx; |
| | | height: 100rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | .name { |
| | | margin-right: 12rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .query_form { |
| | | position: absolute; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | width: 750rpx; |
| | | overflow: hidden; |
| | | .list { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 210rpx; |
| | | height: 72rpx; |
| | | text-align: center; |
| | | line-height: 70rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 8rpx; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | margin-bottom: 24rpx; |
| | | |
| | | &:nth-of-type(3n) { |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | |
| | | .active { |
| | | color: var(--themeColor); |
| | | background: rgba(176, 135, 113, 0.08); |
| | | } |
| | | } |
| | | |
| | | .btns { |
| | | display: flex; |
| | | width: 750rpx; |
| | | .btn { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | background: #E5E5E5; |
| | | color: #666666; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .sub { |
| | | background: var(--themeColor); |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | .shade{ |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0,0,0,.5); |
| | | z-index: 99; |
| | | } |
| | |
| | | <block wx:if="{{ category.length > 1 }}"> |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | | <view data-index="{{index}}" wx:for="{{ secondCateList }}" class="item" bindtap="changeShowParams"> |
| | | <view data-index="{{index}}" wx:for="{{ category }}" class="item" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.tempParamName || item.labelName }}</view> |
| | | <van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | |
| | | </scroll-view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="query_form"> |
| | | <view class="list"> |
| | | <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ category[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="btn" bindtap="cancelParam">取消</view> |
| | |
| | | top: 50%; |
| | | transform: translate(0, -50%); |
| | | } |
| | | .query_wrap_scroll { |
| | | width: 750rpx; |
| | | padding-left: 40rpx; |
| | | } |
| | | .query_wrap { |
| | | display: flex; |
| | | flex-wrap: nowrap; |
| | | } |
| | | .query_wrap .item { |
| | | flex-shrink: 0; |
| | | margin-right: 48rpx; |
| | | height: 100rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | } |
| | | .query_wrap .item .name { |
| | | margin-right: 12rpx; |
| | | } |
| | | .query_form { |
| | | position: absolute; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | width: 750rpx; |
| | | overflow: hidden; |
| | | } |
| | | .query_form .list { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | } |
| | | .query_form .list .item { |
| | | width: 210rpx; |
| | | height: 72rpx; |
| | | text-align: center; |
| | | line-height: 70rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 8rpx; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .query_form .list .item:nth-of-type(3n) { |
| | | margin-right: 0; |
| | | } |
| | | .query_form .list .active { |
| | | color: var(--themeColor); |
| | | background: rgba(176, 135, 113, 0.08); |
| | | } |
| | | .query_form .btns { |
| | | display: flex; |
| | | width: 750rpx; |
| | | } |
| | | .query_form .btns .btn { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | background: #E5E5E5; |
| | | color: #666666; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .query_form .btns .sub { |
| | | background: var(--themeColor); |
| | | color: #fff; |
| | | } |
| | | .shade { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | z-index: 99; |
| | | } |
| | |
| | | title: '注销成功', |
| | | }) |
| | | that.setData({ |
| | | showLogout: true |
| | | showLogout: true, |
| | | show: false |
| | | }) |
| | | }) |
| | | }, |
| | | appClose() { |
| | | this.setData({ |
| | | showLogout: false |
| | | }) |
| | | }, |
| | | backHome() { |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success: (res) => { |
| | |
| | | <view class="text">你是否要退出该小程序吗</view> |
| | | <view class="btns"> |
| | | <navigator class="btn cancel" target="miniProgram" open-type="exit">确认退出</navigator> |
| | | <view class="btn" bindtap="appClose">返回首页</view> |
| | | <view class="btn" bindtap="backHome">返回首页</view> |
| | | </view> |
| | | </view> |
| | | </van-popup> |
| | |
| | | .main_content { |
| | | position: relative; |
| | | bottom: 80rpx; |
| | | padding: 0 40rpx 240rpx; |
| | | height: 100%; |
| | | padding: 0 40rpx 0rpx; |
| | | height: calc( 100% - 480rpx ); |
| | | overflow: hidden; |
| | | background-color: #fff; |
| | | padding-top: 80rpx; |
| | |
| | | margin-bottom: 38rpx; |
| | | } |
| | | .list { |
| | | height: calc( 100% - 420rpx ); |
| | | height: calc( 100% - 92rpx ); |
| | | padding: 20rpx; |
| | | margin: 0 -40rpx; |
| | | padding-bottom: 12rpx; |
| | |
| | | padding: 0 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | &:nth-last-of-type(1){ |
| | | margin-bottom: 100rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | |
| | |
| | | border: 1rpx solid var(--themeColor); |
| | | } |
| | | } |
| | | .empty{ |
| | | height: 80rpx; |
| | | } |
| | | } |
| | | } |
| | | .empty_wrap{ |
| | |
| | | <view wx:if="{{ info.usersList.length == 0 }}" class="empty_wrap"> |
| | | <image class="default_empty" src="../../static/images/default_empty.png"></image> |
| | | </view> |
| | | <view class="empty"></view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | |
| | | .main_content { |
| | | position: relative; |
| | | bottom: 80rpx; |
| | | padding: 0 40rpx 240rpx; |
| | | height: 100%; |
| | | padding: 0 40rpx 0rpx; |
| | | height: calc(100% - 480rpx); |
| | | overflow: hidden; |
| | | background-color: #fff; |
| | | padding-top: 80rpx; |
| | |
| | | margin-bottom: 38rpx; |
| | | } |
| | | .main_content .list { |
| | | height: calc(100% - 420rpx); |
| | | height: calc(100% - 92rpx); |
| | | padding: 20rpx; |
| | | margin: 0 -40rpx; |
| | | padding-bottom: 12rpx; |
| | |
| | | padding: 0 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .main_content .list .item:nth-last-of-type(1) { |
| | | margin-bottom: 100rpx; |
| | | } |
| | | .main_content .list .item .content { |
| | | flex: 1; |
| | |
| | | color: var(--themeColor); |
| | | border: 1rpx solid var(--themeColor); |
| | | } |
| | | .main_content .list .empty { |
| | | height: 80rpx; |
| | | } |
| | | .empty_wrap { |
| | | padding-top: 100rpx; |
| | | } |
| | |
| | | position: relative; |
| | | z-index: -1; |
| | | } |
| | | .container { |
| | | padding: 0rpx 40rpx 140rpx; |
| | | .containe { |
| | | padding: 0rpx 40rpx 60rpx; |
| | | position: relative; |
| | | bottom: 70rpx; |
| | | z-index: 1; |
| | |
| | | <view class="app"> |
| | | <!-- <navBar></navBar> --> |
| | | <image src="../../static/images/design_banner@2x.png" mode="widthFix" class="bg_wrap"></image> |
| | | <view class="container"> |
| | | <view class="containe"> |
| | | <image class="avatar" src="{{ info.imgurlFull ? info.imgurlFull : '../../static/images/default_avatar.png' }}"></image> |
| | | <view class="name_wrap"> |
| | | <view class="left"> |
| | |
| | | position: relative; |
| | | z-index: -1; |
| | | } |
| | | .container { |
| | | padding: 0rpx 40rpx 140rpx; |
| | | .containe { |
| | | padding: 0rpx 40rpx 60rpx; |
| | | position: relative; |
| | | bottom: 70rpx; |
| | | z-index: 1; |
| | | } |
| | | .container .avatar { |
| | | .containe .avatar { |
| | | width: 140rpx; |
| | | height: 140rpx; |
| | | border-radius: 50%; |
| | | border: 4rpx solid #FFFFFF; |
| | | } |
| | | .container .desc { |
| | | .containe .desc { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 30rpx; |
| | |
| | | color: #333333; |
| | | position: relative; |
| | | } |
| | | .container .desc .text { |
| | | .containe .desc .text { |
| | | width: 100%; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | |
| | | -webkit-line-clamp: 1; |
| | | -webkit-box-orient: vertical; |
| | | } |
| | | .container .desc .icon { |
| | | .containe .desc .icon { |
| | | position: absolute; |
| | | background: #F7F7F7; |
| | | width: 32rpx; |
| | |
| | | top: -16rpx; |
| | | transform: rotate(45deg); |
| | | } |
| | | .container .desc image { |
| | | .containe .desc image { |
| | | width: 32rpx; |
| | | margin-right: 20rpx; |
| | | } |
| | |
| | | export const actionDo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/actionDo', |
| | | data |
| | | data, |
| | | loading: data.actionType == 'view' ? '0' : '1' |
| | | }) |
| | | } |
| | | // 获取客户-潜客列表 |
| | |
| | | if (WindowInfo.safeArea.top > 20) { |
| | | this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom; |
| | | } |
| | | let users = wx.getStorageSync('token') |
| | | if(users ==null){ |
| | | wx.navigateTo({ |
| | | }, |
| | | onShow() { |
| | | let users = wx.getStorageSync('token') |
| | | if (users == null) { |
| | | wx.redirectTo({ |
| | | url: '/pages/login/index', |
| | | }) |
| | | wx.showLoading({title: '授权登录中'}) |
| | | }else{ |
| | | getMemberInfo({goLogin:true}).then(res => { |
| | | }) |
| | | wx.showLoading({ |
| | | title: '授权登录中' |
| | | }) |
| | | } else { |
| | | getMemberInfo({ |
| | | goLogin: true |
| | | }).then(res => {}) |
| | | } |
| | | }, |
| | | }, |
| | | }) |
| | |
| | | --themeColor:#B08771; |
| | | color: #111111; |
| | | } |
| | | image{ |
| | | image,video{ |
| | | display: flex; |
| | | border-radius: 8rpx; |
| | | } |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | if(touchMove - touchDot > 16){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | if(touchDot - touchMove > 20){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, 200); // 动画持续时间 |
| | | }, |
| | | refreshCount(){ |
| | | let temData = wx.getStorageSync('conentCountTemp') |
| | |
| | | getZhongTaiWholecasePage({ |
| | | catalogCode,pageNum,pageSize,tagCodes, sortType,query |
| | | }).then(res => { |
| | | if(res.data){ |
| | | if(res.data || res.data.records){ |
| | | this.setData({ |
| | | total: res.data.total, |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | if(touchMove - touchDot > 16){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | if(touchDot - touchMove > 20){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, 200); // 动画持续时间 |
| | | }, |
| | | refreshCount(){ |
| | | let temData = wx.getStorageSync('conentCountTemp') |
| | |
| | | getZhongTaiProductPage({ |
| | | catalogCode,pageNum,pageSize,sortType,query,tagCodes |
| | | }).then(res => { |
| | | this.setData({ |
| | | datalist: [...this.data.datalist, ...res.data.records], |
| | | total: res.data.total |
| | | }) |
| | | if(res.data || res.data.records){ |
| | | this.setData({ |
| | | datalist: [...this.data.datalist, ...res.data.records], |
| | | total: res.data.total |
| | | }) |
| | | } |
| | | }).finally(()=>{ |
| | | this.setData({isLoading:false}) |
| | | }) |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | if(touchMove - touchDot > 16){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | if(touchDot - touchMove > 16){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, 200); // 动画持续时间 |
| | | }, |
| | | refreshCount(){ |
| | | let temData = wx.getStorageSync('conentCountTemp') |
| | |
| | | if(this.data.isLoading){ |
| | | return |
| | | } |
| | | |
| | | this.setData({isLoading:true}) |
| | | 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, |
| | | }) |
| | | if(res.data || res.data.records){ |
| | | this.setData({ |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | total: res.data.total |
| | | }) |
| | | } |
| | | }).finally(()=>{ |
| | | this.setData({isLoading:false}) |
| | | }) |
| | |
| | | <view wx:if="{{ isVShow }}" bind:tap="onClose" class="video_content"> |
| | | <view class="video"> |
| | | <video id="myVideo" src="{{videoSrc}}" autoplay show-play-btn ></video> |
| | | <video id="myVideo" src="{{videoSrc}}" show-fullscreen-btn="{{false}}" autoplay show-play-btn ></video> |
| | | </view> |
| | | </view > |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | // this.setData({ showCate: false }) |
| | | if(touchMove - touchDot > 16){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showCate: true }) |
| | | if(touchDot - touchMove > 20){ |
| | | setTimeout(() => { |
| | | this.setData({ showCate: true }) |
| | | this.fadeIn(); |
| | | },200) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showCate: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, 200); // 动画持续时间 |
| | | }, |
| | | onShow() { |
| | | refreshEnjoy(this) |
| | |
| | | } |
| | | .cate_two{ |
| | | position: absolute; |
| | | width: 750rpx; |
| | | left: 0; |
| | | padding: 0 40rpx; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | |
| | | } |
| | | .cate_wrap .cate_two { |
| | | position: absolute; |
| | | width: 750rpx; |
| | | left: 0; |
| | | padding: 0 40rpx; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | |
| | | actionType: 'share', |
| | | id: this.data.info.id |
| | | }) |
| | | console.log(`/pages/consult/detail?id=${this.data.info.id}&origin=b&userId=${wx.getStorageSync('member').id}`); |
| | | return |
| | | wx.navigateToMiniProgram({ |
| | | appId: 'wxcd2b89fd2ff065f8', |
| | | path: `/pages/consult/detail?id=${this.data.info.id}&origin=b&userId=${wx.getStorageSync('member').id}`, |
| | |
| | | rect.top // 节点的上边界坐标 |
| | | rect.bottom // 节点的下边界坐标 |
| | | }).exec(res => { |
| | | console.log('res', res); |
| | | console.log(windowInfo.windowHeight) |
| | | this.setData({ videoTop: res[0].top,windowHeight: windowInfo.windowHeight}) |
| | | }) |
| | | }, 2000) |
| | |
| | | fileType: '0' |
| | | }).then(res => { |
| | | this.setData({ |
| | | DailyUpdates: res.data |
| | | DailyUpdates: res.data || {} |
| | | }) |
| | | }) |
| | | // 产品视频 |
| | |
| | | pageSize: 1, |
| | | pageNum: 1 |
| | | }).then(res => { |
| | | if (res.data.records && res.data.records.length > 0) { |
| | | if (res.data && res.data.records && res.data.records.length > 0) { |
| | | this.setData({ |
| | | productVideo: res.data.records |
| | | }) |
| | |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | onShow(){ |
| | | wx.hideHomeButton() |
| | | }, |
| | | handleJudge(e) { |
| | | const flag = e.currentTarget.dataset.flag |
| | | console.log(e); |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | wx.navigateTo({ |
| | | wx.redirectTo({ |
| | | url: '/pages/login/index', |
| | | }) |
| | | wx.hideLoading() |
| | |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | tagCodes: [], |
| | | |
| | | category: [], |
| | | tagCodes: '', |
| | | tagCodes: [], |
| | | acVid:'', |
| | | viewIdList: [], |
| | | |
| | |
| | | pageSize: 10, |
| | | pageNum: 1, |
| | | |
| | | }, |
| | | changeShowParams(e) { |
| | | const { category } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | if (activeIndex === this.data.activeIndex) { |
| | | this.setData({ activeIndex: -1, activeParam: [] }) |
| | | } else { |
| | | this.setData({ |
| | | activeIndex, |
| | | activeParam: category[activeIndex].valueVos |
| | | }) |
| | | } |
| | | }, |
| | | cancelParam() { |
| | | const { category } = this.data |
| | | category.forEach(item => { |
| | | item.tempParamIndex = item.paramIndex |
| | | item.tempParamName = item.paramName |
| | | item.tempParamCode = item.paramCode |
| | | }) |
| | | this.setData({ activeParam: [],activeIndex: -1 ,category}) |
| | | }, |
| | | subParam() { |
| | | const { category } = this.data |
| | | var codes = [] |
| | | category.forEach(item => { |
| | | item.paramIndex = item.tempParamIndex |
| | | item.paramName = item.tempParamName |
| | | item.paramCode = item.tempParamCode |
| | | if( item.paramIndex>-1 && item.tempParamCode){ |
| | | codes.push( item.tempParamCode) |
| | | } |
| | | }) |
| | | this.setData({tagCodes:codes}) |
| | | this.setData({ pageNum: 1, activeParam: [] ,activeIndex: -1, dataList: [], total: 0 }) |
| | | this.getList() |
| | | }, |
| | | tagClick(e) { |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { category, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | if ( category[activeIndex].tempParamIndex==null || category[activeIndex].tempParamIndex != paramIndex) { |
| | | category[activeIndex].tempParamIndex = paramIndex |
| | | category[activeIndex].tempParamCode = code |
| | | category[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | } else { |
| | | category[activeIndex].tempParamIndex = -1 |
| | | category[activeIndex].tempParamCode = '' |
| | | category[activeIndex].tempParamName = '' |
| | | } |
| | | this.setData({ category }) |
| | | }, |
| | | onReachBottom() { |
| | | console.log('触底事件'); |
| | |
| | | getList() { |
| | | const { pageSize, pageNum, tagCodes } = this.data |
| | | getZhongTaiVideoPage({ |
| | | pageSize,pageNum, tagCodes: tagCodes ? [tagCodes] : [] |
| | | pageSize,pageNum, tagCodes |
| | | }).then(res => { |
| | | this.setData({ |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | |
| | | this.setData({ dataList }) |
| | | }, |
| | | cateClick(e) { |
| | | const { code } = e.target.dataset |
| | | this.setData({ tagCodes: code }) |
| | | const { code, index } = e.target.dataset |
| | | if(this.data.activeIndex === index){ |
| | | this.setData({ tagCodes: [], activeIndex: -1 }) |
| | | }else{ |
| | | this.setData({ tagCodes: [code], activeIndex: index }) |
| | | } |
| | | this.setData({ total: 0, dataList: [], pageNum: 1 }) |
| | | this.getList() |
| | | }, |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .query_wrap_scroll{ |
| | | width: 750rpx; |
| | | padding-left: 40rpx; |
| | | } |
| | | .query_wrap { |
| | | display: flex; |
| | | flex-wrap: nowrap; |
| | | .item { |
| | | flex-shrink: 0; |
| | | margin-right: 48rpx; |
| | | height: 100rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | .name { |
| | | margin-right: 12rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .query_form { |
| | | position: absolute; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | width: 750rpx; |
| | | overflow: hidden; |
| | | .list { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 210rpx; |
| | | height: 72rpx; |
| | | text-align: center; |
| | | line-height: 70rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 8rpx; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | margin-bottom: 24rpx; |
| | | |
| | | &:nth-of-type(3n) { |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | |
| | | .active { |
| | | color: var(--themeColor); |
| | | background: rgba(176, 135, 113, 0.08); |
| | | } |
| | | } |
| | | |
| | | .btns { |
| | | display: flex; |
| | | width: 750rpx; |
| | | .btn { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | background: #E5E5E5; |
| | | color: #666666; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .sub { |
| | | background: var(--themeColor); |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | .shade{ |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0,0,0,.5); |
| | | z-index: 99; |
| | | } |
| | |
| | | <buoyClient class="buoyClient"/> |
| | | <!-- 分类 --> |
| | | <view> |
| | | <scroll-view wx:if="{{ category.length > 0 }}" scroll-x="true" style="width: 710rpx;margin-bottom: 30rpx;"> |
| | | <scroll-view wx:if="{{ category.length > 0 && category.length == 1 }}" scroll-x="true" style="width: 710rpx;margin-bottom: 30rpx;"> |
| | | <view class="scroll_cate"> |
| | | <view bindtap="cateClick" data-code="{{item.labelCode}}" wx:for="{{ category }}" class="item {{ tagCodes == item.labelCode ? 'active': '' }}">{{ item.labelName }}</view> |
| | | <view bindtap="cateClick" data-index="{{index}}" data-code="{{item.labelValueCode}}" wx:for="{{ category[0].valueVos }}" class="item {{ activeIndex == index ? 'active': '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- <scroll-view scroll-x="true" style="width: 710rpx;margin-bottom: 28rpx;"> |
| | | <view class="scroll_cate second_list"> |
| | | <view bindtap="seCateClick" data-index="{{index}}" wx:for="{{ secondCategory }}" class="item {{ index == 0 ? 'active': '' }}">{{ index }}{{ item }}</view> |
| | | <block wx:if="{{ category.length > 1 }}"> |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | | <view data-index="{{index}}" wx:for="{{ category }}" class="item" bindtap="changeShowParams"> |
| | | <view class="name">{{ item.tempParamName || item.labelName }}</view> |
| | | <van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" /> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="query_form"> |
| | | <view class="list"> |
| | | <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ category[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="btn" bindtap="cancelParam">取消</view> |
| | | <view class="btn sub" bindtap="subParam">确认</view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> --> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view> |
| | | </block> |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view wx:for="{{ dataList }}" class="item"> |
| | | <!-- <view bindtap="itemClick" data-videourl="{{ item.videoUrl }}" data-id="{{ item.id }}" class="img_wrap"> |
| | | <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image> |
| | | <image class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image> |
| | | </view> --> |
| | | <video id="{{ item.id }}" poster="{{ item.coverImage }}" data-item="{{ item }}" bindplay="itemClick" class="img_wrap" src="{{ item.videoUrl }}" show-center-play-btn show-fullscreen-btn></video> |
| | | |
| | | <view class="title">{{ item.title }}</view> |
| | |
| | | width: 26rpx; |
| | | margin-right: 10rpx; |
| | | } |
| | | .query_wrap_scroll { |
| | | width: 750rpx; |
| | | padding-left: 40rpx; |
| | | } |
| | | .query_wrap { |
| | | display: flex; |
| | | flex-wrap: nowrap; |
| | | } |
| | | .query_wrap .item { |
| | | flex-shrink: 0; |
| | | margin-right: 48rpx; |
| | | height: 100rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #666666; |
| | | } |
| | | .query_wrap .item .name { |
| | | margin-right: 12rpx; |
| | | } |
| | | .query_form { |
| | | position: absolute; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | width: 750rpx; |
| | | overflow: hidden; |
| | | } |
| | | .query_form .list { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | } |
| | | .query_form .list .item { |
| | | width: 210rpx; |
| | | height: 72rpx; |
| | | text-align: center; |
| | | line-height: 70rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 8rpx; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .query_form .list .item:nth-of-type(3n) { |
| | | margin-right: 0; |
| | | } |
| | | .query_form .list .active { |
| | | color: var(--themeColor); |
| | | background: rgba(176, 135, 113, 0.08); |
| | | } |
| | | .query_form .btns { |
| | | display: flex; |
| | | width: 750rpx; |
| | | } |
| | | .query_form .btns .btn { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | background: #E5E5E5; |
| | | color: #666666; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .query_form .btns .sub { |
| | | background: var(--themeColor); |
| | | color: #fff; |
| | | } |
| | | .shade { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | z-index: 99; |
| | | } |
| | |
| | | if (res.data.code && (res.data.code == 5112 || res.data.code == 5111)) { |
| | | if(options.data && options.data.goLogin){ |
| | | console.log("==================") |
| | | wx.navigateTo({ |
| | | url: '/pages/login/index', |
| | | wx.redirectTo({ |
| | | url: '/pages/login/index', |
| | | }) |
| | | } |
| | | } |