| | |
| | | }) |
| | | } else { |
| | | this.globalData.token = token |
| | | // if (op.query.scene) { |
| | | // let temp = op.query.scene.split('_') |
| | | // wx.navigateTo({ |
| | | // url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`, |
| | | // }) |
| | | // } |
| | | wx.setStorageSync('member', res.data) |
| | | if (op.query.scene) { |
| | | let temp = op.query.scene.split('_') |
| | | wx.navigateTo({ |
| | | url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`, |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | display: flex; |
| | | border-radius: 8rpx; |
| | | } |
| | | |
| | | .container { |
| | | min-height: 100vh; |
| | | padding: 0; |
| | |
| | | |
| | | import { |
| | | getArea |
| | | } from '../../api/index' |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | // wx.setStorageSync('addressList', tl) |
| | | initData(){ |
| | | let list = wx.getStorageSync('addressList') |
| | | let list = wx.getStorageSync('addressList') || [] |
| | | if(list && list.length){ |
| | | this.setData({addressList: list}) |
| | | this.setData({ |
| | | addressList: list |
| | | }) |
| | | this.resetValus(list) |
| | | this.setLabel(); |
| | | if (!this.data.value.length) { |
| | |
| | | }); |
| | | } |
| | | wx.setStorageSync('addressList', tl) |
| | | this.setData({addressList: tl}) |
| | | this.setData({ |
| | | addressList: tl |
| | | }) |
| | | this.resetValus() |
| | | this.setLabel(); |
| | | if (!this.data.value.length) { |
| | |
| | | var v3= selectedValues[2] |
| | | var t1,t2,t3; |
| | | this.data.addressList.forEach(item =>{ |
| | | if(v1 && v1.length ==6 |
| | | &&v2 && v2.length ==6 |
| | | &&v3 && v3.length ==6){ |
| | | if (v1 && v1.length == 6 && |
| | | v2 && v2.length == 6 && |
| | | v3 && v3.length == 6) { |
| | | if(item.value.indexOf(v1) == 0){ |
| | | t1 = item.value |
| | | if(item.children){ |
| | |
| | | value: temVal, |
| | | label:tlable |
| | | }); |
| | | this.setData({value:temVal,label:tlable}) |
| | | this.setData({ |
| | | value: temVal, |
| | | label: tlable |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchDot - touchMove > 16){ |
| | | if(touchMove - touchDot > 24){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 16){ |
| | | if(touchDot - touchMove > 24){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | |
| | | padding: 0 10rpx; |
| | | } |
| | | .name{ |
| | | font-size: 30rpx; |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | |
| | | padding: 0 10rpx; |
| | | } |
| | | .main_content .goods_list .item .name { |
| | | font-size: 30rpx; |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchDot - touchMove > 16){ |
| | | if(touchMove - touchDot > 24){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 16){ |
| | | if(touchDot - touchMove > 24){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | |
| | | |
| | | .main_content { |
| | | display: flex; |
| | | height: 100%; |
| | | height: calc( 100% - 120rpx ); |
| | | .main_left { |
| | | width: 160rpx; |
| | | height: 100%; |
| | | border-radius: 0rpx 16rpx 16rpx 0rpx; |
| | | |
| | | .item { |
| | | width: 160rpx; |
| | | height: 100rpx; |
| | |
| | | } |
| | | } |
| | | .goods_list { |
| | | height: calc( 100% - 222rpx); |
| | | height: 100%; |
| | | width: 590rpx; |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | |
| | | } |
| | | .main_content { |
| | | display: flex; |
| | | height: 100%; |
| | | height: calc(100% - 120rpx); |
| | | } |
| | | .main_content .main_left { |
| | | width: 160rpx; |
| | |
| | | background-color: #333333; |
| | | } |
| | | .main_content .main_right .goods_list { |
| | | height: calc(100% - 222rpx); |
| | | height: 100%; |
| | | width: 590rpx; |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | acVid: '', |
| | | viewIdList: [], |
| | | // 动画 |
| | | showTouch: true, |
| | | animationData: {}, |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if (touchDot - touchMove > 16) { |
| | | if(touchMove - touchDot > 24){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if (touchDot - touchMove > 16) { |
| | | if(touchDot - touchMove > 24){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | |
| | | } |
| | | }, |
| | | videoClick(e) { |
| | | const { |
| | | videourl |
| | | } = e.currentTarget.dataset |
| | | |
| | | let videoPlay = this.selectComponent('.videoPlay'); |
| | | if (videoPlay) { |
| | | videoPlay.startPlayVideo(videourl, this); |
| | | const { id } = e.currentTarget.dataset |
| | | const { dataList, acVid, viewIdList } = this.data |
| | | const index = viewIdList.findIndex(i => i === 'video' + id) |
| | | if(acVid){ |
| | | if('video' + id != acVid){ |
| | | wx.createVideoContext(acVid, this).pause() |
| | | wx.createVideoContext('video' + id, this).play() |
| | | this.setData({ acVid: 'video' + id }) |
| | | } |
| | | console.log(videourl + "-------------------------------------") |
| | | // wx.previewMedia({ |
| | | // sources: [{ url: videourl, type: 'video' }] |
| | | // }) |
| | | }else{ |
| | | this.setData({ acVid: 'video' + id }) |
| | | wx.createVideoContext('video' + id, this).play() |
| | | } |
| | | dataList.forEach(ite => { |
| | | if(id === ite.id && index === -1){ |
| | | ite.viewCount += 1 |
| | | viewIdList.push('video' + id) |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id: id |
| | | }) |
| | | this.setData({ viewIdList }) |
| | | } |
| | | }) |
| | | this.setData({ dataList }) |
| | | }, |
| | | priviewFull(e) { |
| | | const item = e.currentTarget.dataset.item |
| | |
| | | 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); |
| | | } |
| | | // wx.previewMedia({ |
| | | // sources: [{ url: item.openContent, type: 'video' }] |
| | | // }) |
| | | return |
| | | } |
| | | if (item.openType == 'link') { |
| | | wx.navigateTo({ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "videoPlay": "/components/videoPlay/index" |
| | | } |
| | | "component": true |
| | | } |
| | |
| | | height: 100rpx; |
| | | } |
| | | .item { |
| | | width: 324rpx; |
| | | float: left; |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | | margin-right: 0; |
| | | &:nth-of-type(2n){ |
| | | margin-right: 22rpx; |
| | | } |
| | | .img_wrap { |
| | | width: 100%; |
| | | height: 182rpx; |
| | | height: 376rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | |
| | | } |
| | | |
| | | .name { |
| | | font-size: 30rpx; |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | |
| | | <!-- goods_list --> |
| | | <scroll-view bindscrolltoupper="bindscrolltoupper" bindscrolltolower="scrolltolower" binddragging="touchmove" binddragstart="touchstart" scroll-y enhanced class="goods_list"> |
| | | <view class="empty"></view> |
| | | <view wx:for="{{ dataList }}" data-item="{{item}}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <view wx:for="{{ dataList }}" class="item" > |
| | | <view data-item="{{item}}" bindtap="handleDetail" wx:if="{{ item.openType != 'video' }}" class="img_wrap"> |
| | | <image src="{{ item.coverImage }}" class="img"></image> |
| | | <view wx:if="{{ item.openType == 'link' }}" data-item="{{item}}" bindtap="priviewFull" class="full"> |
| | | <text>VR</text> |
| | | </view> |
| | | <image wx:if="{{ item.openType == 'video' }}" bindtap="videoClick" data-videourl="{{ item.openContent }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <video id="video{{item.id}}" class="img_wrap" wx:if="{{ item.openType == 'video' }}" src="{{item.openContent}}" poster="{{ item.coverImage }}" data-id="{{ item.id }}" bindplay="videoClick"></video> |
| | | <view class="content"> |
| | | <view class="name">{{ item.title }}</view> |
| | | </view> |
| | |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <videoPlay class="videoPlay"/> |
| | | </view> |
| | | <wxs module="math" src="../../utils/math.wxs"></wxs> |
| | |
| | | height: 100rpx; |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 324rpx; |
| | | float: left; |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | | margin-right: 0; |
| | | } |
| | | .main_content .goods_list .item:nth-of-type(2n) { |
| | | margin-right: 22rpx; |
| | | } |
| | | .main_content .goods_list .item .img_wrap { |
| | | width: 100%; |
| | | height: 182rpx; |
| | | height: 376rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | |
| | | padding: 0 10rpx; |
| | | } |
| | | .main_content .goods_list .item .name { |
| | | font-size: 30rpx; |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | |
| | | <text data-index="1" bindtap="onOpen" class="primary">《ZBOM用户隐私政策》</text> |
| | | </view> |
| | | </view> |
| | | <button class="btn" wx:if="{{ !agreementFalg }}" bindtap="loginIn">手机号快捷登录</button> |
| | | <button wx:else class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">手机号快捷登录</button> |
| | | <button hover-class="none" class="btn" wx:if="{{ !agreementFalg }}" bindtap="loginIn">手机号快捷登录</button> |
| | | <button hover-class="none" wx:else class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">手机号快捷登录</button> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | |
| | | |
| | | <view class="form-item"> |
| | | <view class="submit-btn" bindtap="submit" wx:if="{{ userPhone != null && userPhone != 'undefined' && userPhone.length === 11 }}">立即计算</view> |
| | | <button class="submit-btn" wx:else |
| | | <button hover-class="none" class="submit-btn" wx:else |
| | | open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">立即计算</button> |
| | | </view> |
| | | </view> |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchDot - touchMove > 16){ |
| | | if(touchMove - touchDot >24){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 16){ |
| | | if(touchDot - touchMove > 24){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showCate: true }) |
| | | this.fadeIn(); |
| | | }, 200) |
| | | }, 300) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showCate: false }); |
| | | }, 200); // 动画持续时间 |
| | | }, 300); // 动画持续时间 |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | |
| | | |
| | | <!-- footer --> |
| | | <view wx:if="{{ origin && origin == 'b' }}"> |
| | | <button open-type="share" style="bottom: {{bottomLift + 6}}px;" class="share_btn">分享</button> |
| | | <button hover-class="none" open-type="share" style="bottom: {{bottomLift + 6}}px;" class="share_btn">分享</button> |
| | | </view> |
| | | <view wx:else class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | |
| | | <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <view class="name">收藏</view> |
| | | </view> --> |
| | | <button open-type="share" class="item" bindtap="handleShare"> |
| | | <button hover-class="none" open-type="share" class="item" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">分享</view> |
| | | </button> |
| | |
| | | </view> |
| | | <!-- footer --> |
| | | <view wx:if="{{ origin && origin == 'b' }}"> |
| | | <button open-type="share" style="bottom: {{bottomLift + 6}}px;" class="share_btn">分享</button> |
| | | <button hover-class="none" open-type="share" style="bottom: {{bottomLift + 6}}px;" class="share_btn">分享</button> |
| | | </view> |
| | | <view wx:else class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button class="item btn"> |
| | | <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <button hover-class="none" data-code="{{ info.isCollection ? 'collect_cancel' : 'collect' }}" bindtap="handleAction" class="item btn"> |
| | | <image wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">收藏</view> |
| | | </button> |
| | | <button open-type="share" class="item btn" bindtap="handleShare"> |
| | | <button hover-class="none" open-type="share" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">分享</view> |
| | | </button> |
| | |
| | | </view> |
| | | <!-- footer --> |
| | | <view wx:if="{{ origin && origin == 'b' }}"> |
| | | <button open-type="share" style="bottom: {{bottomLift + 6}}px;" class="share_btn">分享</button> |
| | | <button hover-class="none" open-type="share" style="bottom: {{bottomLift + 6}}px;" class="share_btn">分享</button> |
| | | </view> |
| | | <view wx:else class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button class="item btn"> |
| | | <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <button hover-class="none" data-code="{{ info.isCollection ? 'collect_cancel' : 'collect' }}" bindtap="handleAction" class="item btn"> |
| | | <image wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">收藏</view> |
| | | </button> |
| | | <button open-type="share" class="item btn" bindtap="handleShare"> |
| | | <button hover-class="none" open-type="share" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">分享</view> |
| | | </button> |
| | |
| | | <image data-url="{{ item }}" bindtap="priviewSpace" class="info_item" wx:for="{{ info.contentImgList }}" src="{{ item }}" mode="widthFix"></image> |
| | | <view class="desc">{{ info.contentText || '' }}</view> |
| | | <view wx:if="{{ origin && origin == 'b' }}"> |
| | | <button open-type="share" style="bottom: {{bottomLift + 6}}px;" class="share_btn">分享</button> |
| | | <button hover-class="none" open-type="share" style="bottom: {{bottomLift + 6}}px;" class="share_btn">分享</button> |
| | | </view> |
| | | <view wx:else class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button class="item btn"> |
| | | <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <button hover-class="none" data-code="{{ info.isCollection ? 'collect_cancel' : 'collect' }}" bindtap="handleAction" class="item btn"> |
| | | <image wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">收藏</view> |
| | | </button> |
| | | <button open-type="share" class="item btn" bindtap="handleShare"> |
| | | <button hover-class="none" open-type="share" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">分享</view> |
| | | </button> |
| | |
| | | <!-- footer --> |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button open-type="share" class="item btn" bindtap="handleShare"> |
| | | <button hover-class="none" open-type="share" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">分享</view> |
| | | </button> |
| | |
| | | import { getMemberInfo, getDictData } from '../../api/index' |
| | | import { |
| | | getMemberInfo, |
| | | getDictData |
| | | } from '../../api/index' |
| | | Page({ |
| | | /** |
| | | * 页面的初始数据 |
| | |
| | | clientTop: 0, |
| | | |
| | | member: {}, |
| | | housetype: '', |
| | | houseType: {}, |
| | | IMG_LIUCHENG: '', |
| | | MINE_BG: '' |
| | | }, |
| | |
| | | */ |
| | | onLoad(options) { |
| | | const res = wx.getMenuButtonBoundingClientRect() |
| | | this.setData({clientHeight: res.height}) |
| | | this.setData({clientTop: res.top}) |
| | | this.setData({ |
| | | clientHeight: res.height |
| | | }) |
| | | this.setData({ |
| | | clientTop: res.top |
| | | }) |
| | | }, |
| | | onShow(){ |
| | | this.initData() |
| | | }, |
| | | initData() { |
| | | getMemberInfo().then(res => { |
| | | this.setData({member: res.data}) |
| | | console.log('res', res); |
| | | if (res.code == 200) { |
| | | this.setData({ |
| | | member: res.data |
| | | }) |
| | | if(res.data.housetype){ |
| | | const temp = res.data.housetype.split('-') |
| | | let houseType = { |
| | |
| | | val4: temp[3], |
| | | val5: temp[4], |
| | | } |
| | | this.setData({houseType}) |
| | | this.setData({ |
| | | houseType |
| | | }) |
| | | }else{ |
| | | this.setData({ houseType: {} }) |
| | | } |
| | | }else{ |
| | | this.setData({ member: {}, houseType: {} }) |
| | | } |
| | | |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'IMG_LIUCHENG' |
| | | }).then(res => { |
| | | this.setData({ IMG_LIUCHENG: res.data.code }) |
| | | this.setData({ |
| | | IMG_LIUCHENG: res.data.code |
| | | }) |
| | | }) |
| | | getDictData({ |
| | | code: 'WEIXIN_DEFAULT_IMGS', |
| | | label: 'MINE_BG' |
| | | }).then(res => { |
| | | this.setData({ MINE_BG: res.data.code }) |
| | | this.setData({ |
| | | MINE_BG: res.data.code |
| | | }) |
| | | }) |
| | | }, |
| | | changePath(e) { |
| | |
| | | if (res && res.data.token) { |
| | | wx.setStorageSync('sessionKey', res.data.sessionKey) |
| | | wx.setStorageSync('token', res.data.token) |
| | | wx.setStorageSync('member', res.data) |
| | | this.setData({ |
| | | showLogout: false |
| | | }) |
| | |
| | | } |
| | | .modal{ |
| | | width: 610rpx; |
| | | height: 450rpx; |
| | | max-height: 450rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 8rpx; |
| | | padding: 60rpx 40rpx 30rpx; |
| | |
| | | </view> |
| | | </view> |
| | | </van-popup> |
| | | <van-popup show="{{ showLogout }}" round bind:close="appClose"> |
| | | <van-popup show="{{ showLogout }}" close-on-click-overlay="{{false}}" round bind:close="appClose"> |
| | | <view class="modal"> |
| | | <view class="title">提醒</view> |
| | | <view class="text">你是否要退出该小程序吗</view> |
| | |
| | | } |
| | | .modal { |
| | | width: 610rpx; |
| | | height: 450rpx; |
| | | max-height: 450rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 8rpx; |
| | | padding: 60rpx 40rpx 30rpx; |
| | |
| | | this.getList() |
| | | }, |
| | | onShow() { |
| | | const dataList = this.data.dataList |
| | | eventBus.once('caseDeBack', (info) => { |
| | | const temp = dataList.filter(item => { |
| | | const temp = this.data.dataList.filter(item => { |
| | | if (item.id === info.id) { |
| | | item.isCollection = info.isCollection |
| | | item.viewCount++ |
| | |
| | | this.setData({ dataList: temp}) |
| | | }) |
| | | eventBus.once('productDeBack', (info) => { |
| | | const temp = dataList.filter(item => { |
| | | const temp = this.data.dataList.filter(item => { |
| | | if (item.id === info.id) { |
| | | item.isCollection = info.isCollection |
| | | item.viewCount++ |
| | |
| | | this.setData({ dataList: temp}) |
| | | }) |
| | | eventBus.once('realpicDeBack', (info) => { |
| | | const temp = dataList.filter(item => { |
| | | const temp = this.data.dataList.filter(item => { |
| | | if (item.id === info.id) { |
| | | item.isCollection = info.isCollection |
| | | item.viewCount++ |
| | |
| | | uploadUrl, |
| | | editMember, |
| | | getMemberInfo, |
| | | getArea, |
| | | getWxMiniPhone |
| | | } from '../../api/index' |
| | | Page({ |
| | |
| | | } |
| | | |
| | | }) |
| | | }) |
| | | getArea().then(res => { |
| | | this.setData({ areaData: res.data }) |
| | | }) |
| | | }, |
| | | regionChange(e) { |
| | |
| | | <view class="container"> |
| | | <image class="avatar" src="{{ imgurlFull ? imgurlFull : '../../static/images/default_avatar.png' }}"></image> |
| | | <button open-type="chooseAvatar" bindchooseavatar="getBindchooseavatar" class="avatar_btn">更换头像</button> |
| | | <button hover-class="none" open-type="chooseAvatar" bindchooseavatar="getBindchooseavatar" class="avatar_btn">更换头像</button> |
| | | <view class="list"> |
| | | <view class="line"> |
| | | <view class="label">昵称</view> |
| | |
| | | <view class="label">电话</view> |
| | | <view class="wechat_phone"> |
| | | <van-field placeholder="请输入电话" class="field" type="number" border="{{ false }}" model:value="{{ phone }}" maxlength="{{ 11 }}" clearable /> |
| | | <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="btn">微信授权</button> |
| | | <button hover-class="none" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="btn">微信授权</button> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/auth/auth", |
| | | "pathName": "pages/userinfo/collect", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/productVideo/index", |
| | | "pathName": "pages/auth/auth", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | |
| | | resolve(res.data || true) |
| | | } else { |
| | | if (options.data && options.data.isAuth && (res.data.code == 5111 || res.data.code == 5112 || res.data.code == 5110)) { |
| | | // wx.switchTab({ |
| | | // url: '/pages/index/index', |
| | | // }) |
| | | resolve(res.data) |
| | | res.data.message && wx.showToast({ |
| | | title: res.data.message || '发生错误', |
| | |
| | | return |
| | | } |
| | | if(res.data.code == 5111 || res.data.code == 5112 || res.data.code == 5110){ |
| | | resolve(res.data) |
| | | return |
| | | } |
| | | res.data.message && wx.showToast({ |
| | |
| | | onShow() { |
| | | let users = wx.getStorageSync('token') |
| | | if (users == null) { |
| | | wx.redirectTo({ |
| | | wx.reLaunch({ |
| | | url: '/pages/login/index', |
| | | }) |
| | | wx.showLoading({ |
| | |
| | | display: flex; |
| | | border-radius: 8rpx; |
| | | } |
| | | button.button-hover { |
| | | box-shadow: none; |
| | | } |
| | | .container { |
| | | min-height: 100vh; |
| | | padding: 0; |
| | |
| | | <!-- --> |
| | | <view wx:if="{{ showShare }}" class="shade_modal" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button class="item" bindtap="handleShare"> |
| | | <button hover-class="none" class="item" bindtap="handleShare"> |
| | | <image src="../../static/icon/wechat.png"></image> |
| | | <view>小程序分享</view> |
| | | </button> |
| | | <button class="item" bindtap="handleDown"> |
| | | <button hover-class="none" class="item" bindtap="handleDown"> |
| | | <image src="../../static/icon/download.png"></image> |
| | | <view>下载海报</view> |
| | | </button> |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 16){ |
| | | if(touchMove - touchDot > 24){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 20){ |
| | | if(touchDot - touchMove > 24){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }) |
| | | }, 200) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | padding: 0 10rpx; |
| | | } |
| | | .name{ |
| | | font-size: 30rpx; |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | |
| | | padding: 0 10rpx; |
| | | } |
| | | .main_content .goods_list .item .name { |
| | | font-size: 30rpx; |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 16){ |
| | | if(touchMove - touchDot > 24){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 20){ |
| | | if(touchDot - touchMove > 24){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }) |
| | | }, 200) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | |
| | | .main_content { |
| | | display: flex; |
| | | height: 100%; |
| | | height: calc( 100% - 120rpx ); |
| | | .main_left { |
| | | width: 160rpx; |
| | | height: 100%; |
| | | border-radius: 0rpx 16rpx 16rpx 0rpx; |
| | | |
| | | .item { |
| | | width: 160rpx; |
| | | height: 100rpx; |
| | |
| | | } |
| | | |
| | | .goods_list { |
| | | height: calc( 100% - 222rpx); |
| | | height: 100%; |
| | | width: 590rpx; |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | |
| | | } |
| | | .main_content { |
| | | display: flex; |
| | | height: 100%; |
| | | height: calc(100% - 120rpx); |
| | | } |
| | | .main_content .main_left { |
| | | width: 160rpx; |
| | |
| | | background-color: #333333; |
| | | } |
| | | .main_content .main_right .goods_list { |
| | | height: calc(100% - 222rpx); |
| | | height: 100%; |
| | | width: 590rpx; |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | acVid: '', |
| | | viewIdList: [], |
| | | // 动画 |
| | | showTouch: true, |
| | | animationData: {}, |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 16){ |
| | | if(touchMove - touchDot > 24){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 16){ |
| | | if(touchDot - touchMove > 24){ |
| | | touchDot = touchMove |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }) |
| | | }, 200) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | |
| | | 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 == 'link'){ |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | |
| | | }) |
| | | } |
| | | }, |
| | | videoClick(e) { |
| | | const { id } = e.currentTarget.dataset |
| | | const { dataList, acVid, viewIdList } = this.data |
| | | const index = viewIdList.findIndex(i => i === 'video' + id) |
| | | console.log('acVid', acVid); |
| | | console.log('id', id); |
| | | if(acVid){ |
| | | if('video' + id != acVid){ |
| | | wx.createVideoContext(acVid, this).pause() |
| | | wx.createVideoContext('video' + id, this).play() |
| | | this.setData({ acVid: 'video' + id }) |
| | | } |
| | | }else{ |
| | | this.setData({ acVid: 'video' + id }) |
| | | wx.createVideoContext('video' + id, this).play() |
| | | } |
| | | dataList.forEach(ite => { |
| | | if(id === ite.id && index === -1){ |
| | | ite.viewCount += 1 |
| | | viewIdList.push('video' + id) |
| | | actionDo({ |
| | | actionType: 'view', |
| | | id: id |
| | | }) |
| | | this.setData({ viewIdList }) |
| | | } |
| | | }) |
| | | this.setData({ dataList }) |
| | | }, |
| | | tagClick(e) { |
| | | if(this.data.isLoading){ |
| | | return |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "videoPlay": "/components/videoPlay/index" |
| | | } |
| | | "component": true |
| | | } |
| | |
| | | height: 100rpx; |
| | | } |
| | | .item { |
| | | width: 324rpx; |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | | float: left; |
| | | &:nth-of-type(2n){ |
| | | margin-right: 22rpx; |
| | | } |
| | | margin-right: 0; |
| | | .img_wrap { |
| | | width: 100%; |
| | | height: 182rpx; |
| | | height: 376rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | |
| | | } |
| | | |
| | | .name { |
| | | font-size: 30rpx; |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | |
| | | <!-- goods_list --> |
| | | <scroll-view bindscrolltoupper="bindscrolltoupper" binddragging="touchmove" binddragstart="touchstart" bindscrolltolower="scrolltolower" scroll-y enhanced class="goods_list"> |
| | | <view class="empty"></view> |
| | | <view wx:for="{{ dataList }}" data-index="index" data-item="{{item}}" class="item {{(index%2 == 0 && index == dataList.length-1)?'lastitem':''}}" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <view wx:for="{{ dataList }}" class="item {{(index%2 == 0 && index == dataList.length-1)?'lastitem':''}}"> |
| | | <view data-item="{{item}}" bindtap="handleDetail" wx:if="{{ item.openType != 'video' }}" class="img_wrap"> |
| | | <image src="{{ item.coverImage }}" class="img"></image> |
| | | <view wx:if="{{ item.openType == 'link' }}" data-item="{{item}}" bindtap="priviewFull" class="full"> |
| | | <text>VR</text> |
| | | </view> |
| | | <image wx:if="{{ item.openType == 'video' }}" bindtap="videoClick" data-videourl="{{ item.openContent }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image> |
| | | <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <video id="video{{item.id}}" class="img_wrap" wx:if="{{ item.openType == 'video' }}" src="{{item.openContent}}" poster="{{ item.coverImage }}" data-id="{{ item.id }}" bindplay="videoClick"></video> |
| | | <view class="content"> |
| | | <view class="name">{{ item.title }}</view> |
| | | </view> |
| | |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | |
| | | <videoPlay class="videoPlay"/> |
| | | </view> |
| | | <wxs module="format" src="../../utils/format.wxs"></wxs> |
| | |
| | | height: 100rpx; |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 324rpx; |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | | float: left; |
| | | } |
| | | .main_content .goods_list .item:nth-of-type(2n) { |
| | | margin-right: 22rpx; |
| | | margin-right: 0; |
| | | } |
| | | .main_content .goods_list .item .img_wrap { |
| | | width: 100%; |
| | | height: 182rpx; |
| | | height: 376rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | |
| | | padding: 0 10rpx; |
| | | } |
| | | .main_content .goods_list .item .name { |
| | | font-size: 30rpx; |
| | | margin: 12rpx 0 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": {}, |
| | | "navigationStyle": "custom" |
| | | } |
| | |
| | | <!--pages/client/index.wxml--> |
| | | <web-view wx:if="{{url !=null && url !=''}}" src="{{url}}"> </web-view> |
| | | <button wx:else style="margin-top: 50%;width: 200rpx;font-size: 14px;" bind:tap="loadData">重新加载</button> |
| | | <button hover-class="none" wx:else style="margin-top: 50%;width: 200rpx;font-size: 14px;" bind:tap="loadData">重新加载</button> |
| | |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 16){ |
| | | if(touchMove - touchDot > 24){ |
| | | touchDot = touchMove |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 20){ |
| | | if(touchDot - touchMove > 24){ |
| | | setTimeout(() => { |
| | | this.setData({ showCate: true }) |
| | | this.fadeIn(); |
| | |
| | | <van-popup position="bottom" show="{{ showShare }}" bind:close="onClose"> |
| | | <view class="share_modal"> |
| | | <view class="btns"> |
| | | <button open-type="share" class="item" bindtap="handleShare"> |
| | | <button hover-class="none" open-type="share" class="item" bindtap="handleShare"> |
| | | <image src="../../static/icon/wechat.png"></image> |
| | | <view>发送好友</view> |
| | | </button> |
| | | <button class="item"> |
| | | <button hover-class="none" class="item"> |
| | | <image src="../../static/icon/download.png"></image> |
| | | <view>下载海报</view> |
| | | </button> |
| | |
| | | <!-- footer --> |
| | | <view class="footer" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button class="item btn"> |
| | | <button hover-class="none" class="item btn"> |
| | | <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image> |
| | | <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image> |
| | | <view class="name">收藏</view> |
| | | </button> |
| | | <button open-type="share" class="item btn" bindtap="handleShare"> |
| | | <button hover-class="none" open-type="share" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">分享</view> |
| | | </button> |
| | |
| | | <!-- --> |
| | | <view wx:if="{{ showShare }}" class="shade_modal" style="padding-bottom: {{bottomLift}}px;"> |
| | | <view class="btns"> |
| | | <button class="item" bindtap="handleShare"> |
| | | <button hover-class="none" class="item" bindtap="handleShare"> |
| | | <image src="../../static/icon/wechat.png"></image> |
| | | <view>小程序分享</view> |
| | | </button> |
| | | <button class="item" bindtap="handleDown"> |
| | | <button hover-class="none" class="item" bindtap="handleDown"> |
| | | <image src="../../static/icon/download.png"></image> |
| | | <view>下载海报</view> |
| | | </button> |
| | |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">分享</view> |
| | | </button> --> |
| | | <button class="item btn" bindtap="handleShare"> |
| | | <button hover-class="none" class="item btn" bindtap="handleShare"> |
| | | <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image> |
| | | <view class="name">分享</view> |
| | | </button> |
| | | <view class="sub_btn" > |
| | | <image class="icon" src="../../static/icon/home_ic_kefu.png" mode="widthFix"></image> |
| | | <button class="sub_btn1" open-type="contact" bindcontact="handleContact">立即咨询客服</button> |
| | | <button hover-class="none" class="sub_btn1" open-type="contact" bindcontact="handleContact">立即咨询客服</button> |
| | | <!-- <view>立即咨询客服</view> --> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | wx.redirectTo({ |
| | | wx.reLaunch({ |
| | | url: '/pages/login/index', |
| | | }) |
| | | wx.hideLoading() |
| | |
| | | <!-- --> |
| | | <view class="btns"> |
| | | <block wx:if="{{ status == '0' }}"> |
| | | <button class="btn speedy" wx:if="{{ !agreementFalg }}" bindtap="loginIn">手机号快捷登录</button> |
| | | <button hover-class="none" class="btn speedy" wx:if="{{ !agreementFalg }}" bindtap="loginIn">手机号快捷登录</button> |
| | | <button wx:else class="btn speedy" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">手机号快捷登录</button> |
| | | <view bindtap="changeStatus" class="btn">手机验证码登录</view> |
| | | </block> |
| | | <block wx:if="{{ status == '1' }}"> |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/login_ic_phone@2x.png" mode="widthFix"></image> |
| | | <van-field class="input" maxlength="{{ 11 }}" border="{{false}}" model:value="{{ phone }}" placeholder="请输入手机号" /> |
| | | <van-field class="input" type="number" maxlength="{{ 11 }}" border="{{false}}" model:value="{{ phone }}" placeholder="请输入手机号" /> |
| | | <view bindtap="getCode" wx:if="{{ countDown === 0 }}" class="get_code primary">获取验证码</view> |
| | | <view wx:else class="placeholder9">{{ countDown }}s</view> |
| | | </view> |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/login_ic_password@2x.png" mode="widthFix"></image> |
| | | <van-field class="input" maxlength="{{ 6 }}" border="{{false}}" model:value="{{ code }}" placeholder="请输入验证码" /> |
| | | <van-field type="number" class="input" maxlength="{{ 6 }}" border="{{false}}" model:value="{{ code }}" placeholder="请输入验证码" /> |
| | | </view> |
| | | <view bindtap="loginPhone" class="btn speedy sub_btn">立即登录</view> |
| | | </block> |
| | |
| | | wx.clearStorageSync() |
| | | setTimeout(() => { |
| | | wx.setStorageSync('sessionKey', sessionKey) |
| | | wx.redirectTo({ |
| | | wx.reLaunch({ |
| | | url: '/pages/login/index', |
| | | }) |
| | | }, 300) |
| | |
| | | </view> --> |
| | | |
| | | <view class="outbut" > |
| | | <button bindtap="showLogout" class="btn">退出登录</button> |
| | | <button hover-class="none" bindtap="showLogout" class="btn">退出登录</button> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | */ |
| | | onShow() { |
| | | this.setData({ |
| | | pageNum: 1 |
| | | pageNum: 1, |
| | | dataList: [] |
| | | }) |
| | | this.getList() |
| | | }, |
| | |
| | | flex: 1; |
| | | color: #111111; |
| | | text-align: right; |
| | | display: -webkit-box; |
| | | overflow: hidden; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | text-overflow: ellipsis; |
| | | .van-cell{ |
| | | padding: 0; |
| | | } |
| | |
| | | <view class="container"> |
| | | <image class="avatar" src="{{ userInfo.imgurlFull ? userInfo.imgurlFull : '../../static/images/default_avatar.png' }}"></image> |
| | | <!-- <button open-type="chooseAvatar" bindchooseavatar="getBindchooseavatar" class="avatar_btn">更换头像</button> --> |
| | | <button bind:tap="selMedia3" class="avatar_btn">更换头像</button> |
| | | <button hover-class="none" bind:tap="selMedia3" class="avatar_btn">更换头像</button> |
| | | <view class="list"> |
| | | <view class="line"> |
| | | <view class="label">姓名</view> |
| | |
| | | flex: 1; |
| | | color: #111111; |
| | | text-align: right; |
| | | white-space: break-spaces; |
| | | word-break: break-word; |
| | | display: -webkit-box; |
| | | overflow: hidden; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | text-overflow: ellipsis; |
| | | } |
| | | .list .line .input .van-cell { |
| | | padding: 0; |
| | |
| | | ] |
| | | } |
| | | }, |
| | | "libVersion": "3.5.1" |
| | | "libVersion": "3.4.10" |
| | | } |
| | |
| | | if (res.data.code && (res.data.code == 5112 || res.data.code == 5111)) { |
| | | if(options.data && options.data.goLogin){ |
| | | console.log("==================") |
| | | wx.redirectTo({ |
| | | wx.reLaunch({ |
| | | url: '/pages/login/index', |
| | | }) |
| | | } |