| | |
| | | data |
| | | }) |
| | | } |
| | | // 中台 分享 |
| | | export const shareContent = (data) => { |
| | | return request({ |
| | | url: '/web/customer/shareContent', |
| | | data |
| | | }) |
| | | } |
| | | // 志说装修 内容 |
| | | export const pageZSZXContentList = (data) => { |
| | | return request({ |
| | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y:hidden; |
| | | .home_content{ |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | .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; |
| | |
| | | <view class="app"> |
| | | <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px"> |
| | | <view class="home_top"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindconfirm="bindblur" model:value="{{ query }}" type="text" placeholder="搜索案例名称" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;"> |
| | | <view class="home_content"> |
| | | <view class="main_content"> |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y: hidden; |
| | | } |
| | | .app .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 .query_wrap_scroll { |
| | | width: 750rpx; |
| | |
| | | total: 0, |
| | | query: '', |
| | | sortType: '', |
| | | catalogCode: "" |
| | | catalogCode: "", |
| | | scrollTop: 0 |
| | | }, |
| | | pageLifetimes: { |
| | | show: function() { |
| | |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | scrolltoupper() { |
| | | this.setData({ pageNum: 1, datalist: [], total: 0 }) |
| | | this.getList() |
| | | }, |
| | | cateClick(e) { |
| | | var {isLoading} = this.data |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #F7F7F7; |
| | | |
| | | image { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | |
| | | } |
| | | } |
| | | |
| | | .home_top { |
| | | position: fixed; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .main_content { |
| | | display: flex; |
| | | padding-top: 120rpx; |
| | | height: 100%; |
| | | .main_left { |
| | | width: 160rpx; |
| | |
| | | <view class="app"> |
| | | <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px"> |
| | | <view class="home_top"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindconfirm="bindblur" model:value="{{ query }}" type="text" placeholder="搜索产品名称" /> |
| | | </view> |
| | | </view> |
| | | <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;"> |
| | | <view class="home_content"> |
| | | <view class="main_content"> |
| | | <scroll-view class="main_left" enable-flex scroll-y> |
| | | <!-- <view class="main_left"> --> |
| | |
| | | .app .home_content { |
| | | height: 100%; |
| | | } |
| | | .home_top { |
| | | position: fixed; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .main_content { |
| | | display: flex; |
| | | padding-top: 120rpx; |
| | | height: 100%; |
| | | } |
| | | .main_content .main_left { |
| | |
| | | margin-right: 16rpx; |
| | | } |
| | | } |
| | | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y:hidden; |
| | | .home_content{ |
| | | height: 100%; |
| | | } |
| | | } |
| | | .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; |
| | |
| | | <view class="app"> |
| | | <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px"> |
| | | <view class="home_top"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindconfirm="bindblur" model:value="{{ query }}" type="text" placeholder="搜索实景名称" /> |
| | |
| | | </view> |
| | | |
| | | <!-- --> |
| | | <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;"> |
| | | <view class="home_content"> |
| | | <view class="main_content"> |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y: hidden; |
| | | } |
| | | .app .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 .query_wrap_scroll { |
| | | width: 750rpx; |
| | |
| | | privacyHtml: '', |
| | | activeHtml: '' |
| | | }, |
| | | initData(){ |
| | | initData() { |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | |
| | | handleJudge(e) { |
| | | const flag = e.currentTarget.dataset.flag |
| | | console.log(e); |
| | | this.setData({ agreementFalg: flag, showModal: false }) |
| | | this.setData({ |
| | | agreementFalg: flag, |
| | | showModal: false |
| | | }) |
| | | }, |
| | | loginIn() { |
| | | const { agreementFalg } = this.data |
| | | if(!agreementFalg) return wx.showToast({ |
| | | const { |
| | | agreementFalg |
| | | } = this.data |
| | | if (!agreementFalg) return wx.showToast({ |
| | | title: '请先阅读并同意相关协议', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | }, |
| | | getPhoneNumber (e) { |
| | | getPhoneNumber(e) { |
| | | console.log(e.detail) |
| | | console.log(e.detail.iv) |
| | | console.log(e.detail.encryptedData) |
| | | const data = { ...e.detail } |
| | | getWxMiniPhone({ |
| | | encryptedData: data.encryptedData, |
| | | iv: data.iv, |
| | | sessionKey: wx.getStorageSync('sessionKey') || data.iv, |
| | | }).then(res => { |
| | | binDingPhone({ |
| | | phone: res.data |
| | | }).then((res) => { |
| | | if(res.code == 200){ |
| | | wx.setStorageSync('member', res.data) |
| | | wx.navigateBack() |
| | | } |
| | | const data = { |
| | | ...e.detail |
| | | } |
| | | if (e.detail && e.detail.iv) { |
| | | getWxMiniPhone({ |
| | | encryptedData: data.encryptedData, |
| | | iv: data.iv, |
| | | sessionKey: wx.getStorageSync('sessionKey') || data.iv, |
| | | }).then(res => { |
| | | binDingPhone({ |
| | | phone: res.data |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | const tempPath = wx.getStorageSync('tempPath') || '' |
| | | wx.setStorageSync('member', res.data) |
| | | if (tempPath) { |
| | | wx.redirectTo({ |
| | | url: tempPath, |
| | | }) |
| | | } else { |
| | | wx.navigateBack() |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | onOpen(e){ |
| | | onOpen(e) { |
| | | console.log('e', e); |
| | | const { serviceHtml, privacyHtml } = this.data |
| | | const { index } = e.target.dataset |
| | | const { |
| | | serviceHtml, |
| | | privacyHtml |
| | | } = this.data |
| | | const { |
| | | index |
| | | } = e.target.dataset |
| | | let activeHtml = index == '0' ? serviceHtml : privacyHtml |
| | | this.setData({ |
| | | activeHtml, |
| | | showModal: true |
| | | }) |
| | | }, |
| | | onClose(){ |
| | | this.setData({showModal: false}) |
| | | onClose() { |
| | | this.setData({ |
| | | showModal: false |
| | | }) |
| | | }, |
| | | agreementChange(e) { |
| | | this.setData({ |
| | |
| | | import { shareContent, getProductNewsInfo } from '../../api/index' |
| | | import { actionDo, getProductNewsInfo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | }, |
| | | handleShare() { |
| | | console.log('点击了分享'); |
| | | shareContent(this.data.info.id) |
| | | 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' |
| | | // } |
| | | // }, |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | }, |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <van-popup position="bottom" show="{{ showShare }}" bind:close="onClose"> |
| | | <view class="share_modal"> |
| | | <view class="btns"> |
| | | <button open-type="share" class="item" bindtap="handleShare"> |
| | | <image src="../../static/icon/wechat.png"></image> |
| | | <view>发送好友</view> |
| | | </button> |
| | | <button class="item"> |
| | | <image src="../../static/icon/download.png"></image> |
| | | <view>下载海报</view> |
| | | </button> |
| | | </view> |
| | | <view bindtap="onClose" class="cancel">取消</view> |
| | | </view> |
| | | </van-popup> |
| | | </view> |
| | |
| | | import { actionDo, getWholecaseInfo } from '../../api/index' |
| | | import { eventBus } from '../../utils/eventBus' |
| | | import { |
| | | actionDo, |
| | | getWholecaseInfo |
| | | } from '../../api/index' |
| | | import { |
| | | eventBus |
| | | } from '../../utils/eventBus' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | origin: '', |
| | | showShare: false |
| | | }, |
| | | onLoadLogin(options){ |
| | | onLoadLogin(options) { |
| | | this.getDetail(options.id, options.userId || '') |
| | | actionDo({ |
| | | actionType: 'view', |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | |
| | | if(options.origin && options.origin == 'b'){ |
| | | this.setData({ origin: 'b' }) |
| | | |
| | | if (options.origin && options.origin == 'b') { |
| | | this.setData({ |
| | | origin: 'b' |
| | | }) |
| | | } |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({id: options.id, member}) |
| | | this.setData({ |
| | | id: options.id, |
| | | member |
| | | }) |
| | | }, |
| | | priviewFull(){ |
| | | let { panorama: link, title } = this.data.info |
| | | priviewFull() { |
| | | let { |
| | | panorama: link, |
| | | title |
| | | } = this.data.info |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | | success: function(res) { |
| | | success: function (res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { link, title }) |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | link, |
| | | title |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | openShare() { |
| | | this.setData({showShare: true}) |
| | | this.setData({ |
| | | showShare: true |
| | | }) |
| | | }, |
| | | handleShare() { |
| | | console.log('点击了分享'); |
| | | actionDo({ actionType: 'share', id: this.data.info.id }) |
| | | actionDo({ |
| | | actionType: 'share', |
| | | id: this.data.info.id |
| | | }) |
| | | }, |
| | | onShareAppMessage: function () { |
| | | let { info } = this.data |
| | | let { |
| | | info |
| | | } = this.data |
| | | console.log('点击了分享') |
| | | return { |
| | | path: '/pages/detailDis/case?id=' + info.id + '&userId=' + info.users.id |
| | | } |
| | | }, |
| | | handleAction(e){ |
| | | handleAction(e) { |
| | | const actionType = e.currentTarget.dataset.code |
| | | const { info } = this.data |
| | | const { |
| | | info |
| | | } = this.data |
| | | const member = wx.getStorageSync('member') |
| | | if (member.authStatus == '0') { |
| | | return wx.navigateTo({ |
| | |
| | | id: this.data.info.id |
| | | }).then(res => { |
| | | info.isCollection = !info.isCollection |
| | | this.setData({info}) |
| | | this.setData({ |
| | | info |
| | | }) |
| | | wx.showToast({ |
| | | title: actionType == 'collect' ? '收藏成功' : '取消收藏', |
| | | icon: "none" |
| | |
| | | priviewSpace(e) { |
| | | const url = e.currentTarget.dataset.url |
| | | const index = e.currentTarget.dataset.index |
| | | const { info } = this.data |
| | | const { |
| | | info |
| | | } = this.data |
| | | wx.previewImage({ |
| | | urls: info.apiSpaceCaseVos[index].imgList, |
| | | current: url |
| | | }) |
| | | }, |
| | | getDetail(id, userId) { |
| | | getWholecaseInfo({id, salesId: userId || null}).then(res => { |
| | | this.setData({ info: res.data }) |
| | | getWholecaseInfo({ |
| | | id, |
| | | salesId: userId || null |
| | | }).then(res => { |
| | | this.setData({ |
| | | info: res.data |
| | | }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | }) |
| | | if (userId) { |
| | | getMemberInfo().then(res => { |
| | | this.setData({ |
| | | member: res.data |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleDesign() { |
| | |
| | | }, |
| | | playVideo() { |
| | | wx.previewMedia({ |
| | | sources: [{ url: this.data.info.video, type: 'video' }] |
| | | sources: [{ |
| | | url: this.data.info.video, |
| | | type: 'video' |
| | | }] |
| | | }) |
| | | }, |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | this.setData({ |
| | | showShare: false |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | getMemberInfo().then(res => { |
| | | this.setData({ member: res.data }) |
| | | }) |
| | | if(userId){ |
| | | getMemberInfo().then(res => { |
| | | this.setData({ member: res.data }) |
| | | }) |
| | | }else{ |
| | | this.setData({ member: wx.getStorageSync('member') }) |
| | | } |
| | | }) |
| | | }, |
| | | playVideo() { |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <van-popup position="bottom" show="{{ showShare }}" bind:close="onClose"> |
| | | <view class="share_modal"> |
| | | <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> |
| | | </van-popup> |
| | | |
| | | </view> |
| | |
| | | import { getRealcaseInfo, actionDo } from '../../api/index' |
| | | import { eventBus } from '../../utils/eventBus' |
| | | import { |
| | | getRealcaseInfo, |
| | | actionDo |
| | | } from '../../api/index' |
| | | import { |
| | | eventBus |
| | | } from '../../utils/eventBus' |
| | | Page({ |
| | | data: { |
| | | bottomLift: 0, |
| | |
| | | showShare: false |
| | | }, |
| | | |
| | | onLoadLogin(options){ |
| | | onLoadLogin(options) { |
| | | this.getDetail(options.id, options.userId || '') |
| | | actionDo({ |
| | | actionType: 'view', |
| | |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | if(options.origin && options.origin == 'b'){ |
| | | this.setData({ origin: 'b' }) |
| | | if (options.origin && options.origin == 'b') { |
| | | this.setData({ |
| | | origin: 'b' |
| | | }) |
| | | } |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({id: options.id, member}) |
| | | this.setData({ |
| | | id: options.id, |
| | | member |
| | | }) |
| | | }, |
| | | handleAction(e){ |
| | | handleAction(e) { |
| | | const actionType = e.currentTarget.dataset.code |
| | | const { info } = this.data |
| | | const { |
| | | info |
| | | } = this.data |
| | | const member = wx.getStorageSync('member') |
| | | if (member.authStatus == '0') { |
| | | return wx.navigateTo({ |
| | |
| | | title: actionType == 'collect' ? '收藏成功' : '取消收藏', |
| | | icon: "none" |
| | | }) |
| | | this.setData({info}) |
| | | this.setData({ |
| | | info |
| | | }) |
| | | }) |
| | | }, |
| | | getDetail(id, userId) { |
| | | getRealcaseInfo({id, salesId: userId || null}).then(res => { |
| | | this.setData({ info: res.data }) |
| | | getRealcaseInfo({ |
| | | id, |
| | | salesId: userId || null |
| | | }).then(res => { |
| | | this.setData({ |
| | | info: res.data |
| | | }) |
| | | wx.setNavigationBarTitle({ |
| | | title: res.data.title |
| | | }) |
| | | }) |
| | | if (userId) { |
| | | getMemberInfo().then(res => { |
| | | this.setData({ |
| | | member: res.data |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | priviewSpace(e) { |
| | | const url = e.currentTarget.dataset.url |
| | | const { info } = this.data |
| | | const { |
| | | info |
| | | } = this.data |
| | | wx.previewImage({ |
| | | urls: info.contentImgList, |
| | | current: url |
| | |
| | | }, |
| | | playVideo() { |
| | | wx.previewMedia({ |
| | | sources: [{ url: this.data.info.video, type: 'video' }] |
| | | sources: [{ |
| | | url: this.data.info.video, |
| | | type: 'video' |
| | | }] |
| | | }) |
| | | }, |
| | | bannerbindload(e) { |
| | | const { height, width } = e.detail |
| | | const { |
| | | height, |
| | | width |
| | | } = e.detail |
| | | let activeHeight = height * 670 / width |
| | | this.setData({ |
| | | bannerHeight: activeHeight |
| | |
| | | }) |
| | | }, |
| | | openShare() { |
| | | this.setData({showShare: true}) |
| | | this.setData({ |
| | | showShare: true |
| | | }) |
| | | }, |
| | | handleShare() { |
| | | console.log('点击了分享'); |
| | | actionDo({ actionType: 'share', id: this.data.info.id }) |
| | | actionDo({ |
| | | actionType: 'share', |
| | | id: this.data.info.id |
| | | }) |
| | | // shareContent({id: this.data.info.id || this.data.id}).then(res => { |
| | | // this.setData({showShare: false}) |
| | | // }) |
| | |
| | | // } |
| | | // }, |
| | | onClose() { |
| | | this.setData({showShare: false}) |
| | | this.setData({ |
| | | showShare: false |
| | | }) |
| | | }, |
| | | handleDown() { |
| | | let { info } = this.data |
| | | let { |
| | | info |
| | | } = this.data |
| | | wx.showToast({ |
| | | title: '下载中', |
| | | icon: 'loading' |
| | |
| | | console.log('info.picUrls', info) |
| | | wx.downloadFile({ |
| | | url: info.picUrls, |
| | | success (res) { |
| | | success(res) { |
| | | // console.log(res) |
| | | wx.saveImageToPhotosAlbum({ |
| | | filePath: res.tempFilePath, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | fail (err) { |
| | | fail(err) { |
| | | console.log(err.errMsg) |
| | | wx.showToast({ |
| | | title: '下载失败', |
| | |
| | | |
| | | }, |
| | | onShareAppMessage: function () { |
| | | let { info } = this.data |
| | | let { |
| | | info |
| | | } = this.data |
| | | console.log('点击了分享') |
| | | return { |
| | | path: '/pages/detailDis/realpic?id=' + info.id + '&userId=' + info.users.id |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 40rpx; |
| | | // border: 1px solid red; |
| | | .item{ |
| | | width: 76rpx; |
| | | font-size: 32rpx; |
| | |
| | | } |
| | | } |
| | | .home_tab{ |
| | | position: fixed; |
| | | z-index: 999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | // .main_content{ |
| | | // padding-top: 200rpx; |
| | | // } |
| | | .container{ |
| | | height: 100vh; |
| | | .main_content{ |
| | | overflow: hidden; |
| | | } |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content" style="height: 100vh"> |
| | | <view class="main_content" style="height: calc( 100% - {{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px );"> |
| | | <disProduct menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'product_intro' }}" /> |
| | | <disCase menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'whole_case' }}" /> |
| | | <disRealpic menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'real_case' }}" /> |
| | |
| | | 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; |
| | | } |
| | | .container { |
| | | height: 100vh; |
| | | } |
| | | .container .main_content { |
| | | overflow: hidden; |
| | | } |
| | |
| | | } |
| | | } |
| | | .content{ |
| | | padding: 80rpx 40rpx 40rpx; |
| | | padding: 0rpx 40rpx 40rpx; |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | |
| | | <view class="container"> |
| | | |
| | | <!-- 分类 --> |
| | | <view class="home_tabs"> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;"> |
| | | <view wx:if="{{ tagList && tagList.length > 0 }}" class="home_tabs"> |
| | | <scroll-view scroll-x="true" style="width: 710rpx;margin-bottom: 30rpx;"> |
| | | <view class="scroll_cate"> |
| | | <view bindtap="cateClick" data-code="{{item.labelValueCode}}" wx:for="{{ tagList }}" class="item {{ tagCodes == item.labelValueCode ? 'active': '' }}">{{ item.labelValueName }}</view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view class="content" style="padding-top: {{ tagList && tagList.length > 0 ? 80 : 0 }}rpx;"> |
| | | <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-item="{{item}}"> |
| | | <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image> |
| | | <view class="title">{{ item.title }}</view> |
| | |
| | | background-color: #fff; |
| | | } |
| | | .home_tabs { |
| | | width: 100%; |
| | | height: 80rpx; |
| | | position: fixed; |
| | | background-color: #fff; |
| | |
| | | font-weight: 400; |
| | | } |
| | | .content { |
| | | padding: 80rpx 40rpx 40rpx; |
| | | padding: 0rpx 40rpx 40rpx; |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | |
| | | eventBus |
| | | } from '../../utils/eventBus' |
| | | const app = getApp() |
| | | var touchDot = 0; //触摸时的原点 |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | // 顶部nav |
| | | topHeadStyle: 1, |
| | | top: 0, |
| | | open: false, |
| | | desc: true, |
| | | font_color: '#ffffff', |
| | | ZSZXCata: {}, |
| | | |
| | |
| | | // 已经登录,可以走依赖token的逻辑了 |
| | | console.log('首页的onLoadLogin', options, `{"token":"${app.globalData.token}"}`); |
| | | this.initData() |
| | | const member = wx.getStorageSync('member') |
| | | this.setData({ |
| | | member |
| | | }) |
| | | }, |
| | | onReady() { |
| | | const windowInfo = wx.getWindowInfo() |
| | |
| | | this.setData({ |
| | | member |
| | | }) |
| | | |
| | | eventBus.once("reloadHome", () => { |
| | | console.log('reloadHome'); |
| | | this.onLoad() |
| | |
| | | url: '/pages/design/design' |
| | | }) |
| | | } else { |
| | | wx.setStorageSync('tempPath', '/pages/auth/auth') |
| | | wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | |
| | | id |
| | | }) |
| | | }, |
| | | hdBtn() { |
| | | this.setData({ showWhiteHead: true, open: true,font_color: "#000000", sty: '',topHeadStyle: 1, desc: false }) |
| | | }, |
| | | 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 }) |
| | | setTimeout(() => { |
| | | 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;' }) |
| | | } |
| | | }, |
| | | onPageScroll(e) { |
| | | const { videoTop, windowHeight, videoPlay } = this.data |
| | | if(e.scrollTop - 100 > videoTop - (windowHeight / 2) && videoPlay ){ |
| | |
| | | overflow-x: hidden; |
| | | min-height: 100vh; |
| | | |
| | | .banner_swiper { |
| | | height: 600rpx; |
| | | .banner-bax { |
| | | position: relative; |
| | | width: 100%; |
| | | |
| | | image { |
| | | margin: 0 auto 0; |
| | | .banner_swiper { |
| | | transition: height 1s; |
| | | height: 100vh; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: block; |
| | | |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: block; |
| | | } |
| | | } |
| | | .on{ |
| | | height: calc(100vh - 300rpx); |
| | | } |
| | | } |
| | | |
| | | .wxImg { |
| | | width: 54rpx; |
| | | height: 54rpx; |
| | | display: block; |
| | | position: absolute; |
| | | bottom: 50rpx; |
| | | left: 50%; |
| | | z-index: 1; |
| | | margin-left: -27rpx; |
| | | } |
| | | |
| | | |
| | | .consult_swiper { |
| | | width: 100%; |
| | | |
| | | image { |
| | | width: 670rpx; |
| | | height: 376rpx; |
| | | } |
| | | .scroll_text{ |
| | | |
| | | .scroll_text { |
| | | height: 100rpx; |
| | | width: 670rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden;//文本超出隐藏 |
| | | overflow: hidden; //文本超出隐藏 |
| | | text-overflow: ellipsis; |
| | | padding-top: 22rpx; |
| | | font-size: 32rpx; |
| | | } |
| | | |
| | | .wx-swiper-dots.wx-swiper-dots-horizontal { |
| | | position: absolute; |
| | | right: 0; |
| | | bottom: 0rpx; |
| | | } |
| | | |
| | | /* 指示点的样式 */ |
| | | .wx-swiper-dots .wx-swiper-dot { |
| | | width: 60rpx; |
| | |
| | | margin-left: -16rpx; |
| | | border-radius: 5rpx; |
| | | } |
| | | |
| | | |
| | | .wx-swiper-dot.wx-swiper-dot-active { |
| | | background: #666666; |
| | | } |
| | | } |
| | | .consult_wrap{ |
| | | |
| | | .consult_wrap { |
| | | height: 476rpx; |
| | | |
| | | .wx-swiper-dots.wx-swiper-dots-horizontal { |
| | | position: absolute; |
| | | right: 0; |
| | |
| | | align-items: center; |
| | | padding: 0 0 60rpx; |
| | | background-color: #fff; |
| | | |
| | | .logo { |
| | | width: 246rpx; |
| | | } |
| | |
| | | right: 28rpx; |
| | | bottom: 60rpx; |
| | | width: 146rpx; |
| | | height: 146rpx; |
| | | } |
| | | |
| | | .function_wrap { |
| | |
| | | justify-content: space-between; |
| | | background-color: #fff; |
| | | padding: 40rpx; |
| | | |
| | | .item { |
| | | width: 214rpx; |
| | | height: 232rpx; |
| | |
| | | .product_video { |
| | | padding: 34rpx 40rpx 44rpx; |
| | | background-color: #fff; |
| | | |
| | | .video_wrap { |
| | | width: 670rpx; |
| | | position: relative; |
| | |
| | | height: 376rpx; |
| | | } |
| | | } |
| | | video{ |
| | | |
| | | video { |
| | | width: 100%; |
| | | } |
| | | |
| | |
| | | .strategy { |
| | | padding: 44rpx 40rpx; |
| | | background: #F7F7F7; |
| | | .item{ |
| | | |
| | | .item { |
| | | position: relative; |
| | | |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | } |
| | | text{ |
| | | |
| | | text { |
| | | color: #fff; |
| | | position: absolute; |
| | | bottom: 40rpx; |
| | |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | |
| | | |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | |
| | | .line_left { |
| | | width: 324rpx; |
| | | height: 340rpx; |
| | | } |
| | | |
| | | |
| | | .line_right { |
| | | .item { |
| | | width: 322rpx; |
| | | height: 160rpx; |
| | | |
| | | &:nth-last-child(1) { |
| | | margin-top: 20rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | .home_id { |
| | | width: 670rpx; |
| | | height: 240rpx; |
| | |
| | | align-items: center; |
| | | width: 670rpx; |
| | | margin-bottom: 42rpx; |
| | | |
| | | .left { |
| | | font-weight: 600; |
| | | font-size: 34rpx; |
| | | color: #111111; |
| | | line-height: 34rpx; |
| | | flex: 1; |
| | | |
| | | .name { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 10rpx; |
| | | |
| | | .icon { |
| | | width: 36rpx; |
| | | height: 36rpx; |
| | |
| | | |
| | | } |
| | | } |
| | | .auth{ |
| | | |
| | | .auth { |
| | | background-color: #fff; |
| | | } |
| | | .home_title{ |
| | | |
| | | .home_title { |
| | | font-weight: 600; |
| | | font-size: 38rpx; |
| | | } |
| | |
| | | font-weight: bold; |
| | | font-size: 40rpx; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | <van-nav-bar wx:else border="{{ topHeadBorder }}" custom-class="top-head-transparent" fixed> |
| | | <view slot="left" class="flex-cc search"> |
| | | <text class="home_title" style="color: {{font_color}};">志邦家选</text> |
| | | </view> |
| | | </view>ƒ |
| | | </van-nav-bar> |
| | | <!-- banner轮播 --> |
| | | <swiper class="banner_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" style="height:{{bannerImgHeight}}rpx" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ bannerList }}" wx:key="index"> |
| | | <swiper-item> |
| | | <image data-item="{{ item }}" data-id="{{ item.id }}" bindtap="bannerClick" bindload="bannerbindload" mode="widthFix" src="{{ item.coverImage }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | <view class="banner-bax"> |
| | | <image wx:if="{{ !showWhiteHead }}" src="/static/icon/wx.gif" class="wxImg" mode="widthFix" bindtap="hdBtn"></image> |
| | | <swiper class="banner_swiper {{showWhiteHead?'on':''}}" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ bannerList }}" wx:key="index"> |
| | | <swiper-item> |
| | | <image data-item="{{ item }}" data-id="{{ item.id }}" bindtap="bannerClick" mode="aspectFill" src="{{ item.coverImage }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | </view> |
| | | <!-- --> |
| | | <view class="function_wrap"> |
| | | <view class="item" data-type="0" bindtap="changePath"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view data-item="{{ ZSZXCata.jdId }}" bindtap="changeStrategy" class="home_id item"> |
| | | <!-- <view data-item="{{ ZSZXCata.jdId }}" bindtap="changeStrategy" class="home_id item"> |
| | | <image src="{{HOME_CLASS_C}}"></image> |
| | | <!-- <text>{{ ZSZXCata.jdId.name }}</text> --> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <!-- 咨询 --> |
| | | <view class="consult"> |
| | |
| | | <image class="ar_right" src="../../static/icon/home_ar@2x.png"></image> |
| | | </view> |
| | | <swiper class="consult_swiper consult_wrap" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ consultList }}" wx:key="index"> |
| | | <swiper-item data-id="{{ item }}" bindtap="consultClick"> |
| | | <image bindload="consultbindload" mode="aspectFill" src="{{ item.coverImage }}"></image> |
| | | <view class="scroll_text">{{ item.title }}</view> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | <block wx:for="{{ consultList }}" wx:key="index"> |
| | | <swiper-item data-id="{{ item }}" bindtap="consultClick"> |
| | | <image bindload="consultbindload" mode="aspectFill" src="{{ item.coverImage }}"></image> |
| | | <view class="scroll_text">{{ item.title }}</view> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | </view> |
| | | <!-- service --> |
| | | <view class="consult"> |
| | |
| | | </view> |
| | | </view> |
| | | <swiper class="consult_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" style="height:{{serviceHeight + 22}}rpx" duration="{{ bannerSwiperOption.duration }}"> |
| | | <block wx:for="{{ serviceList }}" wx:key="index"> |
| | | <swiper-item> |
| | | <image bindload='goserHeight' data-id="{{ item.id }}" data-title="{{item.title}}" bindtap="seriveClick" mode="widthFix" src="{{ item.fileList[0].fileurlFull }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | <block wx:for="{{ serviceList }}" wx:key="index"> |
| | | <swiper-item> |
| | | <image bindload='goserHeight' data-id="{{ item.id }}" data-title="{{item.title}}" bindtap="seriveClick" mode="widthFix" src="{{ item.fileList[0].fileurlFull }}"></image> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | </view> |
| | | <!-- logo --> |
| | | <view class="logo_wrap"> |
| | | <image src="../../static/icon/home_logo@2x.png" class="logo" mode="widthFix"></image> |
| | | </view> |
| | | <!-- active --> |
| | | <image class="active_baoming" data-type="2" bindtap="changePath" src="../../static/icon/ic_float_baoming@2x.png" mode="widthFix"></image> |
| | | <videoPlay class="videoPlay"/> |
| | | <image class="active_baoming" data-type="2" bindtap="changePath" src="../../static/icon/ic_float_baoming@2x.png"></image> |
| | | <videoPlay class="videoPlay" /> |
| | | </view> |
| | |
| | | overflow-x: hidden; |
| | | min-height: 100vh; |
| | | } |
| | | .container .banner_swiper { |
| | | height: 600rpx; |
| | | .container .banner-bax { |
| | | position: relative; |
| | | width: 100%; |
| | | margin: 0 auto 0; |
| | | } |
| | | .container .banner-bax .banner_swiper { |
| | | transition: height 1s; |
| | | height: 100vh; |
| | | width: 100%; |
| | | } |
| | | .container .banner_swiper image { |
| | | .container .banner-bax .banner_swiper image { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: block; |
| | | } |
| | | .container .banner-bax .on { |
| | | height: calc(100vh - 300rpx); |
| | | } |
| | | .container .wxImg { |
| | | width: 54rpx; |
| | | height: 54rpx; |
| | | display: block; |
| | | position: absolute; |
| | | bottom: 50rpx; |
| | | left: 50%; |
| | | z-index: 1; |
| | | margin-left: -27rpx; |
| | | } |
| | | .container .consult_swiper { |
| | | width: 100%; |
| | |
| | | right: 28rpx; |
| | | bottom: 60rpx; |
| | | width: 146rpx; |
| | | height: 146rpx; |
| | | } |
| | | .container .function_wrap { |
| | | width: 100%; |
| | |
| | | }) |
| | | }, |
| | | itemClick(e) { |
| | | const { videourl ,id} = e.currentTarget.dataset.item |
| | | const { id} = e.currentTarget.dataset.item |
| | | const { dataList } = this.data |
| | | dataList.forEach(ite => { |
| | | if(id === ite.id){ |
| | |
| | | title: '保存成功', |
| | | icon: 'none' |
| | | }) |
| | | setTimeout(() => { |
| | | wx.navigateBack() |
| | | }, 500) |
| | | }) |
| | | }, |
| | | initData() { |
| | |
| | | flex: 1; |
| | | } |
| | | } |
| | | .df_ac{ |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | width: 480rpx; |
| | | } |
| | | .label{ |
| | | width: 110rpx; |
| | | font-size: 30rpx; |
| | |
| | | <view class="line"> |
| | | <view class="label">地址</view> |
| | | <view class="val" bindtap="changeAddr"> |
| | | <view class="df_ac" wx:if="{{address}}">{{ address }}</view> |
| | | <view class="df_ac placeholder9">请选择地址</view> |
| | | <view class="df_ac" wx:if="{{address}}">{{ address }}{{ address }}</view> |
| | | <view wx:else class="df_ac placeholder9">请选择地址</view> |
| | | <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | |
| | | .list .line .picker .text { |
| | | flex: 1; |
| | | } |
| | | .list .line .df_ac { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | width: 480rpx; |
| | | } |
| | | .list .line .label { |
| | | width: 110rpx; |
| | | font-size: 30rpx; |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/productVideo/index", |
| | | "pathName": "pages/detailDis/product", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | |
| | | import { |
| | | getContentShareImg |
| | | getContentShareImg, |
| | | actionDo |
| | | } from '../../api/index' |
| | | Component({ |
| | | /** |
| | |
| | | '/pages/consult/detail',//资讯详情 |
| | | ] |
| | | const { info, path} = this.data |
| | | actionDo({ |
| | | actionType: 'share', |
| | | id: info.id |
| | | }) |
| | | wx.navigateToMiniProgram({ |
| | | appId: 'wxcd2b89fd2ff065f8', |
| | | path: `${map[path]}?origin=b&id=${info.id}&userId=${wx.getStorageSync('member').id}`, |
| | |
| | | info, |
| | | path |
| | | } = this.data |
| | | let that = this |
| | | |
| | | getContentShareImg({ |
| | | articleId: `${info.id}_${path}`, |
| | | type: '0', |
| | |
| | | wx.setStorageSync('downloadConfig', { |
| | | path: this.data.path,id: this.data.info.id |
| | | }) |
| | | actionDo({ |
| | | actionType: 'download', |
| | | id: this.data.info.id |
| | | }) |
| | | wx.navigateTo({ |
| | | url: '/pages/download/index', |
| | | }, 1000) |
| | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y:hidden; |
| | | .home_content{ |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | .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; |
| | |
| | | <view class="app"> |
| | | <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px"> |
| | | <view class="home_top"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindconfirm="bindblur" model:value="{{ query }}" type="text" placeholder="搜索案例名称" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;"> |
| | | <view class="home_content"> |
| | | <view class="main_content"> |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y: hidden; |
| | | } |
| | | .app .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 .query_wrap_scroll { |
| | | width: 750rpx; |
| | |
| | | } |
| | | } |
| | | |
| | | .home_top { |
| | | position: fixed; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .main_content { |
| | | display: flex; |
| | | padding-top: 120rpx; |
| | | height: 100%; |
| | | .main_left { |
| | | width: 160rpx; |
| | |
| | | <view class="app"> |
| | | <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px"> |
| | | <view class="home_top"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindconfirm="bindblur" model:value="{{ query }}" type="text" placeholder="搜索产品名称" /> |
| | | </view> |
| | | </view> |
| | | <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;"> |
| | | <view class="home_content"> |
| | | <view class="main_content"> |
| | | <scroll-view class="main_left" enable-flex scroll-y> |
| | | <!-- <view class="main_left"> --> |
| | |
| | | .app .home_content { |
| | | height: 100%; |
| | | } |
| | | .home_top { |
| | | position: fixed; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .main_content { |
| | | display: flex; |
| | | padding-top: 120rpx; |
| | | height: 100%; |
| | | } |
| | | .main_content .main_left { |
| | |
| | | margin-right: 16rpx; |
| | | } |
| | | } |
| | | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y:hidden; |
| | | .home_content{ |
| | | height: 100%; |
| | | } |
| | | } |
| | | .home_top{ |
| | | position: fixed; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | .main_content{ |
| | | height: 100%; |
| | | padding-top: 120rpx; |
| | | |
| | | .query_wrap_scroll { |
| | | width: 750rpx; |
| | |
| | | <view class="app"> |
| | | <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px"> |
| | | <view class="home_top"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <input bindconfirm="bindblur" model:value="{{ query }}" type="text" placeholder="搜索实景名称" /> |
| | |
| | | </view> |
| | | |
| | | <!-- --> |
| | | <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;"> |
| | | <view class="home_content"> |
| | | <view class="main_content"> |
| | | <scroll-view class="query_wrap_scroll" scroll-x> |
| | | <view class="query_wrap"> |
| | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y: hidden; |
| | | } |
| | | .app .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 .query_wrap_scroll { |
| | | width: 750rpx; |
| | |
| | | import { getZhongTaiProductNewsPage, getCatalogList,actionDo,refreshEnjoy } from '../../api/index' |
| | | let touchDot = 0 |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | data: { |
| | | category: [], |
| | | secondCategory: [], |
| | | showCate: true, |
| | | |
| | | catalogCode: '', |
| | | tagCode: '', |
| | |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | scrollTop: 0 |
| | | |
| | | // height: 0, |
| | | // top: 0, |
| | |
| | | onLoad(options) { |
| | | this.getCate() |
| | | }, |
| | | onReachBottom() { |
| | | bindscrolltolower() { |
| | | console.log('触底事件'); |
| | | const { total, dataList, pageNum } = this.data |
| | | if(total > dataList.length){ |
| | | this.setData({ pageNum: pageNum + 1 }) |
| | | this.getList() |
| | | this.getList(false) |
| | | }else{ |
| | | wx.showToast({ |
| | | title: '暂无更多数据', |
| | |
| | | }) |
| | | } |
| | | }, |
| | | getList() { |
| | | getList(showCate = true) { |
| | | const { pageNum, pageSize, catalogCode, tagCode, query } = this.data |
| | | getZhongTaiProductNewsPage({ |
| | | pageNum, pageSize, query, catalogCode: tagCode || catalogCode |
| | |
| | | if(res.data){ |
| | | this.setData({ |
| | | dataList: [ ...this.data.dataList, ...res.data.records ], |
| | | total: res.data.total |
| | | total: res.data.total, |
| | | showCate |
| | | }) |
| | | } |
| | | |
| | |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | touchstart(e){ |
| | | // touchDot = e.touches[0].pageY; |
| | | console.log('开始', e); |
| | | }, |
| | | touchmove(e) { |
| | | // var touchMove = e.touches[0].pageY; |
| | | console.log('touchMove', e); |
| | | // if(touchDot - touchMove > 60){ |
| | | // this.setData({ showCate: false }) |
| | | // } |
| | | // if(touchMove - touchDot > 60){ |
| | | // this.setData({ showCate: true }) |
| | | // } |
| | | }, |
| | | onShow() { |
| | | refreshEnjoy(this) |
| | | }, |
| | |
| | | .container { |
| | | background-color: #fff; |
| | | } |
| | | page{ |
| | | overflow: hidden; |
| | | } |
| | | .home_top{ |
| | | position: fixed; |
| | | width: 100%; |
| | | z-index: 99; |
| | | top: 0; |
| | |
| | | .cate_wrap{ |
| | | background-color: #fff; |
| | | .cate_one{ |
| | | position: fixed; |
| | | top: 96rpx; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | } |
| | | .cate_two{ |
| | | position: fixed; |
| | | top: 156rpx; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | background-color: #fff; |
| | | padding-top: 30rpx; |
| | | width: 100%; |
| | | } |
| | | } |
| | | .search_wrap{ |
| | |
| | | } |
| | | .scroll_cate { |
| | | display: flex; |
| | | align-items: center; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 60rpx; |
| | | height: 88rpx; |
| | | .item { |
| | | margin-right: 54rpx; |
| | | color: #666666; |
| | |
| | | } |
| | | |
| | | .second_list { |
| | | display: flex; |
| | | align-items: center; |
| | | .item { |
| | | padding: 0 40rpx; |
| | | display: flex; |
| | |
| | | margin-right: 24rpx; |
| | | } |
| | | .active{ |
| | | background-color: var(--themeColor); |
| | | background: rgba(176,135,113,0.08); |
| | | color: #fff; |
| | | font-size: 24rpx; |
| | | font-weight: 400; |
| | | } |
| | | } |
| | | .content{ |
| | | padding: 260rpx 40rpx 40rpx; |
| | | padding: 0rpx 40rpx 40rpx; |
| | | height: calc( 100vh - 200rpx ); |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | |
| | | </view> |
| | | <!-- 分类 --> |
| | | <view class="cate_wrap"> |
| | | <view class="cate_one"> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;"> |
| | | <view wx:if="{{ category && category.length > 0 }}" class="cate_one"> |
| | | <scroll-view scroll-x="true"> |
| | | <view class="scroll_cate"> |
| | | <view bindtap="cateClick" data-code="{{item.code}}" wx:for="{{ category }}" class="item {{ catalogCode == item.code ? 'active': '' }}">{{ item.name }}</view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <view class="cate_two"> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 24rpx;"> |
| | | <view wx:if="{{showCate && secondCategory && secondCategory.length > 0}}" class="cate_two"> |
| | | <scroll-view scroll-x="true"> |
| | | <view class="scroll_cate second_list"> |
| | | <view bindtap="seCateClick" data-code="{{item.code}}" wx:for="{{ secondCategory }}" class="item {{ tagCode == item.code ? 'active': '' }}">{{ item.name }}</view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content" style="padding-top: {{ secondCategory.length > 0 ? 276 : 186 }}rpx;"> |
| | | <scroll-view scroll-y enhanced class="content" bindscrolltolower="bindscrolltolower" binddragging="touchmove" binddragstart="touchstart"> |
| | | <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-item="{{item}}"> |
| | | <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image> |
| | | <view class="title">{{ item.title }}</view> |
| | |
| | | <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap"> |
| | | <image class="default_empty" src="../../static/images/default_empty.png"></image> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <wxs module="format" src="../../utils/format.wxs"></wxs> |
| | |
| | | .container { |
| | | background-color: #fff; |
| | | } |
| | | page { |
| | | overflow: hidden; |
| | | } |
| | | .home_top { |
| | | position: fixed; |
| | | width: 100%; |
| | | z-index: 99; |
| | | top: 0; |
| | |
| | | background-color: #fff; |
| | | } |
| | | .cate_wrap .cate_one { |
| | | position: fixed; |
| | | top: 96rpx; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | } |
| | | .cate_wrap .cate_two { |
| | | position: fixed; |
| | | top: 156rpx; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | background-color: #fff; |
| | | padding-top: 30rpx; |
| | | width: 100%; |
| | | } |
| | | .search_wrap { |
| | | width: 670rpx; |
| | |
| | | } |
| | | .scroll_cate { |
| | | display: flex; |
| | | align-items: center; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 60rpx; |
| | | height: 88rpx; |
| | | } |
| | | .scroll_cate .item { |
| | | margin-right: 54rpx; |
| | |
| | | color: #222222; |
| | | font-weight: 500; |
| | | font-size: 30rpx; |
| | | } |
| | | .second_list { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .second_list .item { |
| | | padding: 0 40rpx; |
| | |
| | | margin-right: 24rpx; |
| | | } |
| | | .second_list .active { |
| | | background-color: var(--themeColor); |
| | | background: rgba(176, 135, 113, 0.08); |
| | | color: #fff; |
| | | font-size: 24rpx; |
| | | font-weight: 400; |
| | | } |
| | | .content { |
| | | padding: 260rpx 40rpx 40rpx; |
| | | padding: 0rpx 40rpx 40rpx; |
| | | height: calc(100vh - 200rpx); |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | |
| | | import { shareContent, getProductNewsInfo } from '../../api/index' |
| | | import { shareContent, getProductNewsInfo, actionDo } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | this.getDetail(options.id) |
| | | }, |
| | | handleDesign() { |
| | | actionDo({ |
| | | actionType: 'share', |
| | | id: this.data.info.id |
| | | }) |
| | | wx.navigateToMiniProgram({ |
| | | appId: 'wxcd2b89fd2ff065f8', |
| | | path: `/pages/consult/detail?id=${this.data.info.id}&origin=b&userId=${wx.getStorageSync('member').id}`, |
| | |
| | | } |
| | | } |
| | | .home_tab{ |
| | | position: fixed; |
| | | z-index: 999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | // .main_content{ |
| | | // padding-top: 200rpx; |
| | | // } |
| | | .container{ |
| | | height: 100vh; |
| | | .main_content{ |
| | | overflow: hidden; |
| | | } |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content" style="height: 100vh"> |
| | | <view class="main_content" style="height: calc( 100% - {{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px );"> |
| | | <disProduct class="disProduct" menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'product_intro' }}" /> |
| | | <disCase class="disCase" menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'whole_case' }}" /> |
| | | <disRealpic class="disRealpic" menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'real_case' }}" /> |
| | |
| | | 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; |
| | | } |
| | | .container { |
| | | height: 100vh; |
| | | } |
| | | .container .main_content { |
| | | overflow: hidden; |
| | | } |
| | |
| | | } |
| | | } |
| | | .content{ |
| | | padding: 80rpx 40rpx 40rpx; |
| | | padding: 0rpx 40rpx 40rpx; |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | |
| | | <view class="container"> |
| | | |
| | | <!-- 分类 --> |
| | | <view class="home_tabs" style="width: 100%;"> |
| | | <view wx:if="{{tagList && tagList.length > 0 }}" class="home_tabs" style="width: 100%;"> |
| | | <scroll-view scroll-x="true" style="width: 710rpx;margin-bottom: 30rpx;"> |
| | | <view class="scroll_cate"> |
| | | <view bindtap="cateClick" data-code="{{item.labelValueCode}}" wx:for="{{ tagList }}" class="item {{ tagCodes == item.labelValueCode ? 'active': '' }}">{{ item.labelValueName }}</view> |
| | |
| | | </scroll-view> |
| | | </view> |
| | | <!-- content --> |
| | | <view class="content"> |
| | | <view class="content" style="padding-top: {{ tagList && tagList.length > 0 ? 80 : 0 }}rpx;"> |
| | | <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-item="{{item}}"> |
| | | <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image> |
| | | <view class="title">{{ item.title }}</view> |
| | |
| | | font-weight: 400; |
| | | } |
| | | .content { |
| | | padding: 80rpx 40rpx 40rpx; |
| | | padding: 0rpx 40rpx 40rpx; |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view data-item="{{ ZSZXCata.jdId }}" bindtap="changeStrategy" class="home_id item"> |
| | | <!-- <view data-item="{{ ZSZXCata.jdId }}" bindtap="changeStrategy" class="home_id item"> |
| | | <image src="{{HOME_CLASS_C}}"></image> |
| | | <!-- <text>{{ ZSZXCata.jdId.name }}</text> --> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <!-- service --> |
| | | <view class="consult"> |
| | |
| | | } |
| | | }) |
| | | }, |
| | | batchDown() { |
| | | setTimeout(() => { |
| | | eventBus.emit('batchDown', [1,2,3]) |
| | | }, 800) |
| | | wx.navigateTo({ |
| | | url: '/pages/download/index', |
| | | }) |
| | | }, |
| | | closeCard() { |
| | | this.setData({ isShowPoster: false }) |
| | | }, |
| | |
| | | platId: customer.platSourceId, |
| | | platSource: customer.platSource |
| | | }).then(res => { |
| | | setTimeout(() => { |
| | | wx.showToast({ |
| | | title: '绑定成功',icon: 'none' |
| | | if (res.code == 200) { |
| | | setTimeout(() => { |
| | | wx.showToast({ |
| | | title: '绑定成功', |
| | | icon: 'none' |
| | | }) |
| | | }, 500) |
| | | }else{ |
| | | return wx.showToast({ |
| | | title: res.message, |
| | | icon: 'none' |
| | | }) |
| | | }, 500) |
| | | } |
| | | this.setData({ |
| | | customer: {} |
| | | }) |
| | |
| | | } |
| | | .val{ |
| | | color: #333333; |
| | | width: 420rpx; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | | .source{ |
| | |
| | | <view class="checked_wrap"> |
| | | <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> |
| | | <image class="avatar" src="{{ item.headPortrait ? item.headPortrait : '../../static/images/default_avatar.png' }}"></image> |
| | | </view> |
| | | <!-- --> |
| | | <view class="content"> |
| | |
| | | } |
| | | .list .item .line .val { |
| | | color: #333333; |
| | | width: 420rpx; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | .list .item .source { |
| | | margin-top: 12rpx; |
| | |
| | | }) |
| | | }, |
| | | itemClick(e) { |
| | | const { videourl, id } = e.currentTarget.dataset |
| | | const { id } = e.currentTarget.dataset.item |
| | | const { dataList } = this.data |
| | | dataList.forEach(ite => { |
| | | if(id === ite.id){ |
| | | ite.viewCount += 1 |
| | | } |
| | | }) |
| | | this.setData({ dataList }) |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id: id |
| | | }) |
| | | var dataList = this.data.dataList; |
| | | dataList.forEach(item =>{ |
| | | if(item.id == id){ |
| | | item.viewCount = (item.viewCount||0) +1 |
| | | } |
| | | }) |
| | | this.setData({dataList:dataList}) |
| | | let videoPlay = this.selectComponent('.videoPlay'); |
| | | if(videoPlay){ |
| | | videoPlay.startPlayVideo(videourl,this ); |
| | | } |
| | | // wx.previewMedia({ |
| | | // sources: [{ url: videourl, type: 'video' }] |
| | | // }) |
| | | }, |
| | | cateClick(e) { |
| | | const { code } = e.target.dataset |
| | |
| | | <buoyClient class="buoyClient"/> |
| | | <!-- 分类 --> |
| | | <view> |
| | | <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;"> |
| | | <scroll-view wx:if="{{ category.length > 0 }}" 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> |
| | | </scroll-view> |
| | | <!-- <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 28rpx;"> |
| | | <!-- <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> |
| | | </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"> |
| | | <!-- <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> |
| | | </view> --> |
| | | <video 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> |
| | | <view class="df_sb static"> |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/kefu/fond", |
| | | "pathName": "pages/consult/consult", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | |
| | | ] |
| | | } |
| | | }, |
| | | "libVersion": "3.3.5" |
| | | "libVersion": "3.5.1" |
| | | } |