Merge remote-tracking branch 'origin/master'
| | |
| | | export const actionDo = (data) => { |
| | | return request({ |
| | | url: '/web/customer/actionDo', |
| | | data |
| | | data, |
| | | loading: '0' |
| | | }) |
| | | } |
| | | // æç é¢çº¦å表 |
| | |
| | | <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.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ math.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <wxs module="math" src="../../utils/math.wxs"></wxs> |
| | |
| | | <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> |
| | | <text>{{ math.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ datalist.length == 0 }}" class="empty_wrap"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | </view> |
| | | <wxs module="math" src="../../utils/math.wxs"></wxs> |
| | |
| | | <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png"></image> |
| | | <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" ></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ math.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap"> |
| | |
| | | |
| | | <videoPlay class="videoPlay"/> |
| | | </view> |
| | | <wxs module="math" src="../../utils/math.wxs"></wxs> |
| | |
| | | <view>{{ item.publishDt || '' }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ math.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <wxs module="math" src="../../utils/math.wxs"></wxs> |
| | |
| | | res.result.ad_info.adcode] }) |
| | | } |
| | | }) |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({ |
| | | phone: member.phone |
| | | }) |
| | | }, |
| | | regionChange(e) { |
| | | console.log(e) |
| | |
| | | actionType: 'view', |
| | | id: options.id |
| | | }) |
| | | const member = wx.getStorageSync('member') || {} |
| | | if(!member.id){ |
| | | getMemberInfo().then(res => { |
| | | this.setData({ |
| | | member: res.data |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | onShow() { |
| | | const member = wx.getStorageSync('member') || {} |
| | | if(member && member.id){ |
| | | this.setData({ |
| | | member |
| | | }) |
| | | } |
| | | }, |
| | | onUnload() { |
| | | console.log('详æ
è¿è¡äºéæ¯'); |
| | |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | getMemberInfo().then(res => { |
| | | this.setData({ member: res.data }) |
| | | }) |
| | | }) |
| | | }, |
| | | playVideo() { |
| | |
| | | <view>{{ item.publishDt }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount || 0 }}</text> |
| | | <text>{{ math.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <wxs module="math" src="../../utils/math.wxs"></wxs> |
| | |
| | | getZhongTaiVideoPage, |
| | | getZhongTaiProductNewsPage |
| | | } from '../../api/index' |
| | | import { eventBus } from '../../utils/eventBus' |
| | | import { |
| | | eventBus |
| | | } from '../../utils/eventBus' |
| | | const app = getApp() |
| | | Page({ |
| | | |
| | |
| | | consultList: [], |
| | | consultImgHeight: 0, |
| | | |
| | | videoTop: 0, |
| | | windowHeight: 0, |
| | | videoPlay: true, |
| | | |
| | | productVideo: {}, |
| | | bannerSwiperOption: { |
| | | indicatorDots: true, |
| | |
| | | console.log('é¦é¡µçonLoadLogin',options,`{"token":"${app.globalData.token}"}`); |
| | | this.initData() |
| | | }, |
| | | onReady() { |
| | | const windowInfo = wx.getWindowInfo() |
| | | setTimeout(() => { |
| | | const query = wx.createSelectorQuery() |
| | | query.select('.product_video').boundingClientRect(function (rect) { |
| | | rect.top // èç¹çä¸è¾¹çåæ |
| | | rect.bottom // èç¹çä¸è¾¹çåæ |
| | | }).exec(res => { |
| | | console.log('res', res); |
| | | console.log(windowInfo.windowHeight) |
| | | this.setData({ videoTop: res[0].top,windowHeight: windowInfo.windowHeight}) |
| | | }) |
| | | }, 2000) |
| | | }, |
| | | onShow() { |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({ member }) |
| | | this.setData({ |
| | | member |
| | | }) |
| | | |
| | | eventBus.once("reloadHome", () => { |
| | | console.log('reloadHome'); |
| | |
| | | }, |
| | | videoClick(e) { |
| | | const { |
| | | videourl |
| | | videourl, |
| | | id |
| | | } = e.currentTarget.dataset |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id |
| | | }) |
| | | let videoPlay = this.selectComponent('.videoPlay'); |
| | | if(videoPlay){ |
| | | videoPlay.startPlayVideo(videourl,this ); |
| | |
| | | url: '/pages/webView/index', |
| | | success: function(res) { |
| | | // éè¿eventChannelå被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.content, title: item.title }) |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | link: item.content, |
| | | title: item.title |
| | | }) |
| | | } |
| | | }) |
| | | }else{ |
| | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | |
| | | bindVideoPlay() { |
| | | const { id } = this.data.productVideo[0] |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id |
| | | }) |
| | | }, |
| | | onPageScroll(e) { |
| | | 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(); |
| | | } |
| | | let scrollTop = e.scrollTop / 100 |
| | | if (scrollTop <= 0.1) { |
| | | this.setData({ |
| | |
| | | height: 376rpx; |
| | | } |
| | | } |
| | | video{ |
| | | width: 100%; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | </view> |
| | | <image class="ar_right" src="../../static/icon/home_ar@2x.png"></image> |
| | | </view> |
| | | <view bindtap="videoClick" data-videourl="{{ productVideo[0].videoUrl }}" class="video_wrap"> |
| | | <video bindplay="bindVideoPlay" id="myvideo" src="{{ productVideo[0].videoUrl }}" show-fullscreen-btn></video> |
| | | <!-- <view bindtap="videoClick" data-id="{{ productVideo[0].id }}" data-videourl="{{ productVideo[0].videoUrl }}" class="video_wrap"> |
| | | <image class="img" src="{{ productVideo[0].coverImage }}" mode="aspectFill"></image> |
| | | <image class="play" src="../../static/icon/ic_play.png"></image> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <!-- æ»ç¥ --> |
| | | <view class="strategy"> |
| | |
| | | width: 670rpx; |
| | | height: 376rpx; |
| | | } |
| | | .container .product_video video { |
| | | width: 100%; |
| | | } |
| | | .container .strategy { |
| | | padding: 44rpx 40rpx; |
| | | background: #F7F7F7; |
| | |
| | | <view>{{ item.publishDt }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ math.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view > --> |
| | | <videoPlay class='videoPlay' /> |
| | | </view> |
| | | <wxs module="math" src="../../utils/math.wxs"></wxs> |
| | |
| | | <van-popup show="{{ isShow }}" closeable round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <view class="header"> |
| | | <image class="avatar" src="{{ info.imgurlFull }}"></image> |
| | | <image show-menu-by-longpress class="avatar" src="{{ info.imgurlFull }}"></image> |
| | | <view class="content"> |
| | | <view class="name">{{ info.name }}</view> |
| | | <view class="desc">å¯¼è´ ï½ {{ info.jobDate || 5 }}å¹´ç»éª</view> |
| | |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ math.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <wxs module="math" src="../../utils/math.wxs"></wxs> |
| | |
| | | <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ math.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <wxs module="math" src="../../utils/math.wxs"></wxs> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | var formarCount = function(num) { |
| | | if(!num){ |
| | | return 0 |
| | | }else{ |
| | | if(num > 10000){ |
| | | return (num / 10000).toFixed(0) + 'w+' |
| | | }else if(num > 10000000000){ |
| | | return (num / 10000000000).toFixed(0) + '亿+' |
| | | }else{ |
| | | return num |
| | | } |
| | | } |
| | | } |
| | | module.exports = { |
| | | formarCount: formarCount |
| | | }; |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | sortType: '', |
| | | catalogCode: 'whole_case' |
| | | }, |
| | | attached() { |
| | |
| | | </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="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">é»è®¤</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">æç</view> |
| | | <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">æç</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">ææ°</view> |
| | | <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">ææ°</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list"> |
| | |
| | | <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.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ format.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <wxs module="format" src="../../utils/format.wxs"></wxs> |
| | |
| | | pageSize: 10, |
| | | total: 0, |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | sortType: '', |
| | | catalogCode: "" |
| | | }, |
| | | attached() { |
| | |
| | | </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="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">é»è®¤</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">æç</view> |
| | | <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">æç</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">ææ°</view> |
| | | <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" 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"> |
| | |
| | | <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> |
| | | <text>{{ format.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ datalist.length == 0 }}" class="empty_wrap"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | </view> |
| | | <wxs module="format" src="../../utils/format.wxs"></wxs> |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | sortType: '', |
| | | catalogCode: 'real_case' |
| | | }, |
| | | attached() { |
| | |
| | | </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="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">é»è®¤</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">æç</view> |
| | | <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">æç</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">ææ°</view> |
| | | <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">ææ°</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list"> |
| | |
| | | <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.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ format.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap"> |
| | |
| | | |
| | | <videoPlay class="videoPlay"/> |
| | | </view> |
| | | <wxs module="format" src="../../utils/format.wxs"></wxs> |
| | |
| | | <view>{{ item.publishDt || '' }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ format.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <wxs module="format" src="../../utils/format.wxs"></wxs> |
| | |
| | | item.paddingStatus = 2 |
| | | } |
| | | }) |
| | | this.setData({ downloadList }) |
| | | this.setData({ |
| | | downloadList |
| | | }) |
| | | downloadList.forEach(item => { |
| | | if (item.checked) { |
| | | if (that.data.takeQrcode == 1) { |
| | | getContentShareImg({ |
| | | articleId: `${downloadConfig.id}_${downloadConfig.path}`, |
| | | type: this.takeQrcode ? 0 : 1, |
| | | type: that.data.takeQrcode ? 1 : 0, |
| | | imgurl: item.url |
| | | }).then(res => { |
| | | wx.downloadFile({ |
| | |
| | | success: res => { |
| | | item.paddingStatus = 3 |
| | | item.checked = false |
| | | that.setData({ downloadList }) |
| | | that.setData({ |
| | | downloadList |
| | | }) |
| | | wx.showToast({ |
| | | title: 'ä¿åæå', |
| | | icon: "none" |
| | |
| | | fail: res => { |
| | | item.paddingStatus = 4 |
| | | item.checked = false |
| | | that.setData({ downloadList }) |
| | | that.setData({ |
| | | downloadList |
| | | }) |
| | | wx.showToast({ |
| | | title: 'ä¿å失败', |
| | | icon: "none" |
| | |
| | | } |
| | | }) |
| | | }) |
| | | }else{ |
| | | wx.downloadFile({ |
| | | url: item.url, |
| | | success: res => { |
| | | if (res.statusCode === 200) { |
| | | wx.saveImageToPhotosAlbum({ |
| | | filePath: res.tempFilePath, |
| | | success: res => { |
| | | item.paddingStatus = 3 |
| | | item.checked = false |
| | | that.setData({ |
| | | downloadList |
| | | }) |
| | | wx.showToast({ |
| | | title: 'ä¿åæå', |
| | | icon: "none" |
| | | }) |
| | | }, |
| | | fail: res => { |
| | | item.paddingStatus = 4 |
| | | item.checked = false |
| | | that.setData({ |
| | | downloadList |
| | | }) |
| | | wx.showToast({ |
| | | title: 'ä¿å失败', |
| | | icon: "none" |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | |
| | | itemCheck(e) { |
| | | const i = e.currentTarget.dataset.i |
| | | const { |
| | | downloadList, |
| | | checkedAll |
| | | downloadList |
| | | } = this.data |
| | | let count = 0 |
| | | downloadList.forEach((item, index) => { |
| | | if (index === i) { |
| | | if (item.paddingStatus == 3) { |
| | | item.paddingStatus = 0 |
| | | } |
| | | item.checked = !item.checked |
| | | } |
| | | if (item.checked) { |
| | |
| | | <view> |
| | | <view class="list"> |
| | | <view wx:for="{{ downloadList }}" class="item"> |
| | | <view data-i="{{index}}" bindtap="itemCheck" wx:for="{{ downloadList }}" class="item"> |
| | | <image class="img" src="{{ item.url }}" mode="aspectFill"></image> |
| | | <view wx:if="{{ item.paddingStatus == 2 }}" class="shade">çå¾
ä¸è½½</view> |
| | | <view wx:if="{{ item.paddingStatus == 3 }}" class="shade">ä¸è½½å®æ</view> |
| | | <image data-i="{{index}}" bindtap="itemCheck" wx:if="{{ item.checked }}" class="check" src="../../static/icon/ic_select_sel@2x.png"></image> |
| | | <image wx:else data-i="{{index}}" bindtap="itemCheck" class="check" src="../../static/icon/ic_select.png"></image> |
| | | <image wx:if="{{ item.checked }}" class="check" src="../../static/icon/ic_select_sel@2x.png"></image> |
| | | <image wx:else bindtap="itemCheck" class="check" src="../../static/icon/ic_select.png"></image> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | |
| | | <view>{{ item.publishDt }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount || 0 }}</text> |
| | | <text>{{ format.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <wxs module="format" src="../../utils/format.wxs"></wxs> |
| | |
| | | serviceHeight: 0, |
| | | serviceList: [], |
| | | |
| | | videoTop: 0, |
| | | windowHeight: 0, |
| | | videoPlay: true, |
| | | |
| | | bannerSwiperOption: { |
| | | indicatorDots: true, |
| | | vertical: false, |
| | |
| | | }, |
| | | onShow() { |
| | | this.initData() |
| | | }, |
| | | onReady() { |
| | | const windowInfo = wx.getWindowInfo() |
| | | setTimeout(() => { |
| | | const query = wx.createSelectorQuery() |
| | | query.select('.product_video').boundingClientRect(function (rect) { |
| | | rect.top // èç¹çä¸è¾¹çåæ |
| | | rect.bottom // èç¹çä¸è¾¹çåæ |
| | | }).exec(res => { |
| | | console.log('res', res); |
| | | console.log(windowInfo.windowHeight) |
| | | this.setData({ videoTop: res[0].top,windowHeight: windowInfo.windowHeight}) |
| | | }) |
| | | }, 2000) |
| | | }, |
| | | initData() { |
| | | // æ¯æ¥ä¸æ° |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | bindVideoPlay() { |
| | | const { id } = this.data.productVideo[0] |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id |
| | | }) |
| | | }, |
| | | onPageScroll(e) { |
| | | const { videoTop, windowHeight, videoPlay } = this.data |
| | | if(e.scrollTop > videoTop - (windowHeight / 2) && videoPlay ){ |
| | | this.setData({ videoPlay: false }) |
| | | let videoplay = wx.createVideoContext('myvideo', this) |
| | | videoplay.play(); |
| | | } |
| | | }, |
| | | promotionClick() { |
| | | wx.navigateTo({ |
| | | url: '/pages/promotion/index', |
| | |
| | | height: 376rpx; |
| | | } |
| | | } |
| | | video{ |
| | | width: 100%; |
| | | } |
| | | |
| | | } |
| | | .consult_swiper { |
| | |
| | | </view> |
| | | <image class="ar_right" src="../../static/icon/home_ar@2x.png"></image> |
| | | </view> |
| | | <view bindtap="videoClick" data-videourl="{{ productVideo[0].videoUrl }}" class="video_wrap"> |
| | | <video bindplay="bindVideoPlay" id="myvideo" src="{{ productVideo[0].videoUrl }}" show-fullscreen-btn></video> |
| | | <!-- <view bindtap="videoClick" data-videourl="{{ productVideo[0].videoUrl }}" class="video_wrap"> |
| | | <image class="img" src="{{ productVideo[0].coverImage }}" mode="aspectFill"></image> |
| | | <image class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <!-- æ»ç¥ --> |
| | | <view class="strategy"> |
| | |
| | | width: 670rpx; |
| | | height: 376rpx; |
| | | } |
| | | .product_video video { |
| | | width: 100%; |
| | | } |
| | | .consult_swiper { |
| | | width: 100%; |
| | | } |
| | |
| | | import { getCustomerList, getCrmAuthUrl, batchAddLike } from '../../api/index' |
| | | const { HYEventBus } = require('hy-event-store') |
| | | import { |
| | | getCustomerList, |
| | | getCrmAuthUrl, |
| | | batchAddLike |
| | | } from '../../api/index' |
| | | const { |
| | | HYEventBus |
| | | } = require('hy-event-store') |
| | | const eventBus = new HYEventBus() |
| | | Page({ |
| | | |
| | |
| | | |
| | | }, |
| | | handleSub() { |
| | | const { customer } = this.data |
| | | const { |
| | | customer |
| | | } = this.data |
| | | const enjoyList = wx.getStorageSync('enjoyList') || [] |
| | | if(!customer.userId) return wx.showToast({ |
| | | title: '请å
éæ©è¦å
³èç客æ·', icon: 'none' |
| | | title: '请å
éæ©è¦å
³èç客æ·', |
| | | icon: 'none' |
| | | }) |
| | | batchAddLike({ |
| | | articleIds: enjoyList.filter(i => i.checked).map(i => i.id).join(','), |
| | | customerId: customer.userId |
| | | customerId: customer.platSourceId, |
| | | platSourceId: customer.platSourceId, |
| | | platSource: customer.platSource |
| | | }).then(res => { |
| | | setTimeout(() => { |
| | | wx.showToast({ |
| | | title: 'ç»å®æå',icon: 'none' |
| | | }) |
| | | }, 500) |
| | | this.setData({ |
| | | customer: {} |
| | | }) |
| | | this.setData({ |
| | | total: 0, |
| | | dataList: [], |
| | | page: 1 |
| | | }) |
| | | this.getList() |
| | | }) |
| | | }, |
| | | tabsClick(e) { |
| | | const flag = e.currentTarget.dataset.tab |
| | | this.setData({flag}) |
| | | this.setData({total: 0,dataList: [], page: 1, customer: {}}) |
| | | this.setData({ |
| | | flag |
| | | }) |
| | | this.setData({ |
| | | total: 0, |
| | | dataList: [], |
| | | page: 1, |
| | | customer: {} |
| | | }) |
| | | this.getList() |
| | | }, |
| | | itemCheck(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | this.setData({ customer: item }) |
| | | this.setData({ |
| | | customer: item |
| | | }) |
| | | }, |
| | | reloadList() { |
| | | this.setData({total: 0,dataList: [], page: 1}) |
| | | this.setData({ |
| | | total: 0, |
| | | dataList: [], |
| | | page: 1 |
| | | }) |
| | | this.getList() |
| | | }, |
| | | scrolltolower() { |
| | | console.log('触åºäºä»¶'); |
| | | const { total, dataList, page } = this.data |
| | | const { |
| | | total, |
| | | dataList, |
| | | page |
| | | } = this.data |
| | | if(total > dataList.length){ |
| | | this.setData({ page: page + 1 }) |
| | | this.setData({ |
| | | page: page + 1 |
| | | }) |
| | | this.getList() |
| | | }else{ |
| | | wx.showToast({ |
| | |
| | | } |
| | | }, |
| | | getList() { |
| | | const { flag, page, pageSize, keyWords } = this.data |
| | | const { |
| | | flag, |
| | | page, |
| | | pageSize, |
| | | keyWords |
| | | } = this.data |
| | | getCustomerList({ |
| | | flag, page, pageSize, keyWords |
| | | flag, |
| | | page, |
| | | pageSize, |
| | | keyWords |
| | | }).then(res => { |
| | | if(res.data){ |
| | | this.setData({ |
| | |
| | | }) |
| | | }, |
| | | jumpClient() { |
| | | getCrmAuthUrl({type:1}).then(res => { |
| | | this.setData({ url: res.data }) |
| | | getCrmAuthUrl({ |
| | | type: 1 |
| | | }).then(res => { |
| | | this.setData({ |
| | | url: res.data |
| | | }) |
| | | const url =res.data |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | | success: function(res1) { |
| | | // éè¿eventChannelå被æå¼é¡µé¢ä¼ éæ°æ® |
| | | console.log(url) |
| | | res1.eventChannel.emit('data',{link:url} ); |
| | | res1.eventChannel.emit('data', { |
| | | link: url |
| | | }); |
| | | } |
| | | }) |
| | | }) |
| | |
| | | align-items: center; |
| | | font-size: 32rpx; |
| | | color: #555555; |
| | | margin-right: 60rpx; |
| | | .name{} |
| | | .border{ |
| | | width: 40rpx; |
| | |
| | | <view wx:if="{{ flag == 0 }}" class="item"> |
| | | <view class="item_content"> |
| | | <view class="checked_wrap"> |
| | | <image data-item="{{ item }}" bindtap="itemCheck" wx:if="{{ customer.userId == item.userId }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image> |
| | | <image data-item="{{ item }}" bindtap="itemCheck" wx:if="{{ customer.platSourceId == item.platSourceId }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image> |
| | | <image wx:else data-item="{{ item }}" bindtap="itemCheck" class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image> |
| | | <image class="avatar" src="../../static/images/default_avatar.png"></image> |
| | | </view> |
| | |
| | | <view wx:if="{{ flag == 1 }}" class="item"> |
| | | <view class="item_content"> |
| | | <view class="checked_wrap"> |
| | | <image data-item="{{ item }}" bindtap="itemCheck" wx:if="{{ customer.userId == item.userId }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image> |
| | | <image data-item="{{ item }}" bindtap="itemCheck" wx:if="{{ customer.platSourceId == item.platSourceId }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image> |
| | | <image data-item="{{ item }}" bindtap="itemCheck" wx:else class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image> |
| | | <image class="avatar" src="../../static/images/default_avatar.png"></image> |
| | | </view> |
| | |
| | | align-items: center; |
| | | font-size: 32rpx; |
| | | color: #555555; |
| | | margin-right: 60rpx; |
| | | } |
| | | .main_tab .item .border { |
| | | width: 40rpx; |
| | |
| | | <view>{{ item.publishDt }}</view> |
| | | <view class="df_sb"> |
| | | <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ format.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | <videoPlay class='videoPlay' /> |
| | | </view> |
| | | <wxs module="format" src="../../utils/format.wxs"></wxs> |
| | |
| | | loadShopList(params) { |
| | | loadShopList({}).then(res => { |
| | | if(res.data &&res.data){ |
| | | const t = ''; |
| | | let t = ''; |
| | | res.data.forEach(item => { |
| | | if(item.seqNameList && item.seqNameList.length){ |
| | | const tindex =0; |
| | | let tindex =0; |
| | | item.seqNameList.forEach(element => { |
| | | if(tindex>0){ |
| | | t =t+"ã" |
| | |
| | | getShopInfo(id){ |
| | | getShopDetail(id).then(res => { |
| | | if(res.data && res.data.seqNameList){ |
| | | const t = ''; |
| | | const tindex =0; |
| | | let t = ''; |
| | | let tindex =0; |
| | | res.data.seqNameList.array.forEach(element => { |
| | | if(tindex>0){ |
| | | t =t+"ã" |
| | |
| | | background-color: #f7f7f7; |
| | | padding: 30rpx 40rpx; |
| | | } |
| | | page{ |
| | | background-color: #f7f7f7; |
| | | } |
| | | .list{ |
| | | .item{ |
| | | padding: 30rpx; |
| | |
| | | background-color: #f7f7f7; |
| | | padding: 30rpx 40rpx; |
| | | } |
| | | page { |
| | | background-color: #f7f7f7; |
| | | } |
| | | .list .item { |
| | | padding: 30rpx; |
| | | width: 670rpx; |
| | |
| | | <view class="desc">å¯¼è´ ï½ {{userInfo.jobDate ||'5'}}å¹´ç»éª</view> |
| | | </view> |
| | | </view> |
| | | <image class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image> |
| | | <image show-menu-by-longpress class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image> |
| | | <view class="text">é¿æå¾çè¯å«äºç»´ç </view> |
| | | </view> |
| | | </van-popup> |
| | |
| | | <image wx:else class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text> |
| | | <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image> |
| | | <text>{{ item.viewCount }}</text> |
| | | <text>{{ format.formarCount(item.viewCount) }}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <wxs module="format" src="../../utils/format.wxs"></wxs> |
| | |
| | | <view class="desc">å¯¼è´ ï½ {{userInfo.jobDate ||'0'}}å¹´ç»éª</view> |
| | | </view> |
| | | </view> |
| | | <image class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image> |
| | | <image show-menu-by-longpress class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image> |
| | | <view class="text">é¿æå¾çè¯å«äºç»´ç </view> |
| | | </view> |
| | | </van-popup> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | var formarCount = function(num) { |
| | | if(!num){ |
| | | return 0 |
| | | }else{ |
| | | if(num > 10000){ |
| | | return (num / 10000).toFixed(0) + 'w+' |
| | | }else if(num > 10000000000){ |
| | | return (num / 10000000000).toFixed(0) + '亿+' |
| | | }else{ |
| | | return num |
| | | } |
| | | } |
| | | } |
| | | module.exports = { |
| | | formarCount: formarCount |
| | | }; |