| | |
| | | } from './api/index' |
| | | import CustomHook from 'spa-custom-hooks'; |
| | | let globalData = { |
| | | token: wx.getStorageSync('token'), |
| | | // token: wx.getStorageSync('token'), |
| | | token: '', |
| | | primary: '#B08771', |
| | | bottomLift: '' |
| | | } |
| | |
| | | if (WindowInfo.safeArea.top > 20) { |
| | | this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom |
| | | } |
| | | }, |
| | | onShow(op) { |
| | | // 授权登录 |
| | | var userId = null |
| | | if (op.query.scene) { |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | this.globalData.token = token |
| | | // if (op.query.scene) { |
| | | // let temp = op.query.scene.split('_') |
| | | // wx.navigateTo({ |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onShow(options) { |
| | | const token = wx.getStorageSync('token') || '' |
| | | if(token){ |
| | | if (options.query.scene) { |
| | | let temp = options.query.scene.split('_') |
| | | wx.navigateTo({ |
| | | url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`, |
| | | }) |
| | | } |
| | | } |
| | | // const token = wx.getStorageSync('token') || '' |
| | | // if(token){ |
| | | // if (options.query.scene) { |
| | | // let temp = options.query.scene.split('_') |
| | | // wx.navigateTo({ |
| | | // url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`, |
| | | // }) |
| | | // } |
| | | // } |
| | | } |
| | | }) |
| | | CustomHook.install({ |
| | |
| | | import { getCataLogTagList, getZhongTaiWholecasePage, actionDo } from '../../api/index' |
| | | import { eventBus } from '../../utils/eventBus' |
| | | let touchDot = 0 |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | // 动画 |
| | | showTouch: true, |
| | | animationData: {}, |
| | | |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '', |
| | |
| | | attached() { |
| | | this.getCatelist() |
| | | this.getList() |
| | | this.animation = wx.createAnimation({ |
| | | duration: 600, |
| | | timingFunction: 'ease', |
| | | }); |
| | | }, |
| | | methods: { |
| | | bindscrolltoupper() { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | | this.animation.opacity(1).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, |
| | | getCatelist() { |
| | | const { catalogCode } = this.data |
| | | getCataLogTagList({ |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 520rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | .item { |
| | |
| | | } |
| | | |
| | | .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | align-items: center; |
| | |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | | height: calc( 100% - 188rpx); |
| | | .empty{ |
| | | height: 100rpx; |
| | | } |
| | | .item{ |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view> |
| | | <view class="status"> |
| | | <view wx:if="{{ showTouch }}" animation="{{animationData}}" class="status"> |
| | | <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">默认</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">最热</view> |
| | |
| | | <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">最新</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list"> |
| | | <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-id="{{ item.id }}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="{{ item.coverImage }}" class="img"></image> |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 520rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | } |
| | |
| | | z-index: 99; |
| | | } |
| | | .main_content .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | align-items: center; |
| | |
| | | padding: 12rpx 40rpx; |
| | | height: calc(100% - 188rpx); |
| | | } |
| | | .main_content .goods_list .empty { |
| | | height: 100rpx; |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | |
| | | import { getCatalogList, getCataLogTagList, getZhongTaiProductPage } from '../../api/index' |
| | | import { eventBus } from '../../utils/eventBus' |
| | | let touchDot = 0 |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | |
| | | * 组件的初始数据 |
| | | */ |
| | | data: { |
| | | // 动画 |
| | | showTouch: true, |
| | | animationData: {}, |
| | | |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | tagCodes: [], |
| | |
| | | getApp().globalData.catalogCode = '' |
| | | }, 2000) |
| | | } |
| | | this.animation = wx.createAnimation({ |
| | | duration: 600, |
| | | timingFunction: 'ease', |
| | | }); |
| | | }, |
| | | methods: { |
| | | bindscrolltoupper() { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | | this.animation.opacity(1).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, |
| | | getCatelist() { |
| | | getCatalogList({ |
| | | catalogCode: 'product_intro' |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 520rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 154rpx; |
| | |
| | | } |
| | | |
| | | .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | display: flex; |
| | | width: 590rpx; |
| | | padding: 0rpx 40rpx; |
| | | align-items: center; |
| | | height: 92rpx; |
| | |
| | | background-color: #333333; |
| | | } |
| | | } |
| | | |
| | | .goods_list { |
| | | height: calc( 100% - 182rpx); |
| | | width: 590rpx; |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | | .empty{ |
| | | width: 590rpx; |
| | | height: 92rpx; |
| | | } |
| | | .item { |
| | | float: left; |
| | | width: 242rpx; |
| | | flex-shrink: 0; |
| | | margin-right: 26rpx; |
| | | margin-bottom: 32rpx; |
| | | &:nth-of-type(2n){ |
| | | margin-right: 0; |
| | | margin-right: 26rpx; |
| | | } |
| | | .img_wrap { |
| | | width: 242rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | |
| | | .img { |
| | | width: 242rpx; |
| | | max-height: 216rpx; |
| | | height: 136rpx; |
| | | } |
| | | |
| | | .new { |
| | |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view> |
| | | <view class="status"> |
| | | <view wx:if="{{ showTouch }}" animation="{{animationData}}" class="status"> |
| | | <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">默认</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">最热</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">最新</view> |
| | | </view> |
| | | <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list"> |
| | | <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-id="{{item.id}}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="{{ item.coverImage }}" class="img" mode="aspectFit"></image> |
| | | <image src="{{ item.coverImage }}" class="img" mode="aspectFill"></image> |
| | | <image wx:if="{{ item.isNew }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="name">{{ item.title }}</view> |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 520rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .main_right .query_form .list .item { |
| | |
| | | z-index: 99; |
| | | } |
| | | .main_content .main_right .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | display: flex; |
| | | width: 590rpx; |
| | | padding: 0rpx 40rpx; |
| | | align-items: center; |
| | | height: 92rpx; |
| | |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | | } |
| | | .main_content .main_right .goods_list .empty { |
| | | width: 590rpx; |
| | | height: 92rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item { |
| | | float: left; |
| | | width: 242rpx; |
| | | flex-shrink: 0; |
| | | margin-right: 26rpx; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item:nth-of-type(2n) { |
| | | margin-right: 0; |
| | | margin-right: 26rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap { |
| | | width: 242rpx; |
| | |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap .img { |
| | | width: 242rpx; |
| | | max-height: 216rpx; |
| | | height: 136rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap .new { |
| | | width: 72rpx; |
| | |
| | | import { getCataLogTagList, getZhongTaiRealcasePage, actionDo } from '../../api/index' |
| | | import { eventBus } from '../../utils/eventBus' |
| | | let touchDot = 0 |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | // 动画 |
| | | showTouch: true, |
| | | animationData: {}, |
| | | |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '', |
| | |
| | | }, |
| | | attached() { |
| | | this.getCatelist() |
| | | this.animation = wx.createAnimation({ |
| | | duration: 600, |
| | | timingFunction: 'ease', |
| | | }); |
| | | }, |
| | | methods: { |
| | | bindscrolltoupper() { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | | this.animation.opacity(1).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, |
| | | getCatelist(){ |
| | | const { catalogCode } = this.data |
| | | getCataLogTagList({ |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 520rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 202rpx; |
| | |
| | | } |
| | | |
| | | .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | height: 100rpx; |
| | |
| | | padding: 12rpx 40rpx; |
| | | height: calc( 100% - 188rpx); |
| | | box-sizing: border-box; |
| | | .empty{ |
| | | height: 100rpx; |
| | | } |
| | | .item { |
| | | width: 324rpx; |
| | | float: left; |
| | | margin-right: 22rpx; |
| | | margin-bottom: 32rpx; |
| | | &:nth-of-type(2n){ |
| | | margin-right: 0; |
| | | margin-right: 22rpx; |
| | | } |
| | | .img_wrap { |
| | | width: 100%; |
| | |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view> |
| | | <view class="status"> |
| | | <view wx:if="{{ showTouch }}" animation="{{animationData}}" class="status"> |
| | | <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">默认</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">最热</view> |
| | |
| | | <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">最新</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list"> |
| | | <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"> |
| | | <image src="{{ item.coverImage }}" class="img"></image> |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 520rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .query_param .list .item { |
| | |
| | | z-index: 99; |
| | | } |
| | | .main_content .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | height: 100rpx; |
| | |
| | | height: calc(100% - 188rpx); |
| | | box-sizing: border-box; |
| | | } |
| | | .main_content .goods_list .empty { |
| | | height: 100rpx; |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 324rpx; |
| | | float: left; |
| | | margin-right: 22rpx; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | .main_content .goods_list .item:nth-of-type(2n) { |
| | | margin-right: 0; |
| | | margin-right: 22rpx; |
| | | } |
| | | .main_content .goods_list .item .img_wrap { |
| | | width: 100%; |
| | |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | page{ |
| | | overflow: hidden; |
| | | } |
| | | .modal{ |
| | | width: 100%; |
| | | height: calc( 100vh - 200rpx ); |
| | |
| | | .content{ |
| | | height: calc( 100vh - 460rpx ); |
| | | overflow: auto; |
| | | overflow-x: hidden; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .btns{ |
| | |
| | | <van-popup position="bottom" show="{{ showModal }}" round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <view class="content"> |
| | | <mp-html content="{{activeHtml}}"></mp-html> |
| | | <!-- <mp-html content="{{activeHtml}}"></mp-html> --> |
| | | <rich-text nodes="{{activeHtml}}"></rich-text> |
| | | </view> |
| | | <view style="bottom: {{ bottomLift }}px" class="btns"> |
| | | <view data-flag="{{true}}" bindtap="handleJudge" class="agree">同意</view> |
| | |
| | | font-weight: 500; |
| | | font-size: 30rpx; |
| | | } |
| | | page { |
| | | overflow: hidden; |
| | | } |
| | | .modal { |
| | | width: 100%; |
| | | height: calc(100vh - 200rpx); |
| | |
| | | .modal .content { |
| | | height: calc(100vh - 460rpx); |
| | | overflow: auto; |
| | | overflow-x: hidden; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .modal .btns { |
| | |
| | | import { getZhongTaiProductNewsPage, getCatalogList,actionDo } from '../../api/index' |
| | | let touchDot = 0 |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | data: { |
| | | category: [], |
| | | secondCategory: [], |
| | | showCate: true, |
| | | animationData: {}, |
| | | |
| | | catalogCode: '', |
| | | tagCode: '', |
| | |
| | | }, |
| | | onLoad(options) { |
| | | this.getCate() |
| | | this.animation = wx.createAnimation({ |
| | | duration: 500, |
| | | timingFunction: 'ease', |
| | | }); |
| | | }, |
| | | onReachBottom() { |
| | | console.log('触底事件'); |
| | |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | bindscrolltoupper() { |
| | | this.setData({ showCate: true }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showCate: true }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | | this.animation.opacity(1).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showCate: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | let { info } = this.data |
| | | console.log('点击了分享') |
| | | if(info.users && info.users.userId){ |
| | | return { |
| | | path: '/pages/detailDis/product?id=' + info.id + '&userId=' + info.users.id |
| | | } |
| | | } |
| | | } |
| | | }) |
| | |
| | | .container { |
| | | background-color: #fff; |
| | | } |
| | | page{ |
| | | overflow: hidden; |
| | | } |
| | | .home_top{ |
| | | position: fixed; |
| | | width: 100%; |
| | | z-index: 99; |
| | | top: 0; |
| | | height: 96rpx; |
| | | padding-bottom: 24rpx; |
| | | background-color: #fff; |
| | | } |
| | | .search_wrap{ |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | | margin: 0rpx auto; |
| | | margin: 0rpx auto 24rpx; |
| | | border-radius: 8rpx; |
| | | padding: 0 40rpx 0rpx; |
| | | padding: 0 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #F7F7F7; |
| | |
| | | margin-right: 16rpx; |
| | | } |
| | | } |
| | | } |
| | | .cate_wrap{ |
| | | background-color: #fff; |
| | | .cate_one{ |
| | | position: fixed; |
| | | top: 94rpx; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | } |
| | | .cate_two{ |
| | | position: fixed; |
| | | top: 154rpx; |
| | | position: absolute; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | padding-top: 30rpx; |
| | | width: 100%; |
| | | } |
| | | } |
| | | .scroll_cate { |
| | | display: flex; |
| | | align-items: center; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 60rpx; |
| | | height: 88rpx; |
| | | .item { |
| | | margin-right: 48rpx; |
| | | margin-right: 54rpx; |
| | | color: #666666; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .active { |
| | | color: #222222; |
| | | font-weight: 500; |
| | | font-weight: 600; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .second_list { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: 0; |
| | | .item { |
| | | padding: 0 40rpx; |
| | | display: flex; |
| | |
| | | margin-right: 24rpx; |
| | | } |
| | | .active{ |
| | | color: var(--themeColor); |
| | | background: rgba(176,135,113,0.08); |
| | | color: #B08771; |
| | | font-size: 24rpx; |
| | | font-weight: 400; |
| | | } |
| | | } |
| | | .content{ |
| | | padding: 260rpx 40rpx 40rpx; |
| | | padding: 0rpx 40rpx 40rpx; |
| | | height: calc( 100vh - 200rpx ); |
| | | .empty{ |
| | | height: 88rpx; |
| | | } |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | |
| | | <view class="container"> |
| | | <view class="home_top"> |
| | | <view class="search_wrap"> |
| | | <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image> |
| | | <image src="../../static/icon/ic_search@2x.png"></image> |
| | | <input bindconfirm="searchList" model:value="{{ query }}" type="text" placeholder="搜索资讯标题" /> |
| | | </view> |
| | | </view> |
| | | <!-- 分类 --> |
| | | <view class="cate_wrap"> |
| | | <view class="cate_one"> |
| | | <scroll-view scroll-x="true" style="width: 710rpx;margin-bottom: 30rpx;"> |
| | | <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="width: 710rpx;margin-bottom: 24rpx;"> |
| | | <view animation="{{animationData}}" 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 ? 274 : 184 }}rpx;"> |
| | | <scroll-view scroll-y enhanced class="content" bindscrolltolower="bindscrolltolower" bindscrolltoupper="bindscrolltoupper" binddragging="touchmove" binddragstart="touchstart"> |
| | | <view wx:if="{{ secondCategory && secondCategory.length > 0 }}" class="empty"></view> |
| | | <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="math" src="../../utils/math.wxs"></wxs> |
| | |
| | | .container { |
| | | background-color: #fff; |
| | | } |
| | | page { |
| | | overflow: hidden; |
| | | } |
| | | .home_top { |
| | | position: fixed; |
| | | width: 100%; |
| | | z-index: 99; |
| | | top: 0; |
| | | height: 96rpx; |
| | | padding-bottom: 24rpx; |
| | | background-color: #fff; |
| | | } |
| | | .home_top .search_wrap { |
| | | .search_wrap { |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | | margin: 0rpx auto; |
| | | margin: 0rpx auto 24rpx; |
| | | border-radius: 8rpx; |
| | | padding: 0 40rpx 0rpx; |
| | | padding: 0 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #F7F7F7; |
| | | } |
| | | .home_top .search_wrap image { |
| | | .search_wrap image { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | .cate_wrap { |
| | | background-color: #fff; |
| | | } |
| | | .cate_wrap .cate_one { |
| | | position: fixed; |
| | | top: 94rpx; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | } |
| | | .cate_wrap .cate_two { |
| | | position: fixed; |
| | | top: 154rpx; |
| | | position: absolute; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | padding-top: 30rpx; |
| | | width: 100%; |
| | | } |
| | | .scroll_cate { |
| | | display: flex; |
| | | align-items: center; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 60rpx; |
| | | height: 88rpx; |
| | | } |
| | | .scroll_cate .item { |
| | | margin-right: 48rpx; |
| | | margin-right: 54rpx; |
| | | color: #666666; |
| | | flex-shrink: 0; |
| | | } |
| | | .scroll_cate .active { |
| | | color: #222222; |
| | | font-weight: 500; |
| | | font-weight: 600; |
| | | font-size: 30rpx; |
| | | } |
| | | .second_list { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: 0; |
| | | } |
| | | .second_list .item { |
| | | padding: 0 40rpx; |
| | |
| | | margin-right: 24rpx; |
| | | } |
| | | .second_list .active { |
| | | color: var(--themeColor); |
| | | background: rgba(176, 135, 113, 0.08); |
| | | color: #B08771; |
| | | font-size: 24rpx; |
| | | font-weight: 400; |
| | | } |
| | | .content { |
| | | padding: 260rpx 40rpx 40rpx; |
| | | padding: 0rpx 40rpx 40rpx; |
| | | height: calc(100vh - 200rpx); |
| | | } |
| | | .content .empty { |
| | | height: 88rpx; |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | |
| | | import { |
| | | actionDo, |
| | | getWholecaseInfo |
| | | getWholecaseInfo, |
| | | getMemberInfo |
| | | } from '../../api/index' |
| | | import { |
| | | eventBus |
| | |
| | | this.setData({ |
| | | member: res.data |
| | | }) |
| | | wx.setStorageSync('member', res.data) |
| | | }) |
| | | } |
| | | }) |
| | |
| | | if(userId){ |
| | | getMemberInfo().then(res => { |
| | | this.setData({ member: res.data }) |
| | | wx.setStorageSync('member', res.data) |
| | | }) |
| | | }else{ |
| | | this.setData({ member: wx.getStorageSync('member') }) |
| | |
| | | import { |
| | | getRealcaseInfo, |
| | | actionDo |
| | | actionDo, |
| | | getMemberInfo |
| | | } from '../../api/index' |
| | | import { |
| | | eventBus |
| | |
| | | this.setData({ |
| | | member: res.data |
| | | }) |
| | | wx.setStorageSync('member', res.data) |
| | | }) |
| | | } |
| | | }) |
| | |
| | | url: '/pages/design/design' |
| | | }) |
| | | } else { |
| | | wx.setStorageSync('tempPath', '/pages/auth/auth') |
| | | wx.setStorageSync('tempPath', '/pages/design/design') |
| | | wx.navigateTo({ |
| | | url: '/pages/auth/auth', |
| | | }) |
| | |
| | | wxLogOff, |
| | | wxLoginCustomer |
| | | } from '../../api/index' |
| | | import { eventBus } from '../../utils/eventBus' |
| | | import { |
| | | eventBus |
| | | } from '../../utils/eventBus' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | show: false |
| | | show: false, |
| | | showLogout: false |
| | | }, |
| | | |
| | | /** |
| | |
| | | let that = this |
| | | wxLogOff().then(res => { |
| | | wx.clearStorage() |
| | | wx.showToast({ |
| | | title: '注销成功', |
| | | }) |
| | | that.setData({ |
| | | showLogout: true |
| | | }) |
| | | }) |
| | | }, |
| | | appClose() { |
| | | wx.login({ |
| | | timeout: 5000, |
| | | success(res) { |
| | | success: (res) => { |
| | | if (res.code) { |
| | | //发起网络请求 |
| | | wxLoginCustomer({ |
| | |
| | | if (res && res.data.token) { |
| | | wx.setStorageSync('sessionKey', res.data.sessionKey) |
| | | wx.setStorageSync('token', res.data.token) |
| | | wx.showToast({ |
| | | title: '注销成功', |
| | | this.setData({ |
| | | showLogout: false |
| | | }) |
| | | setTimeout(() => { |
| | | eventBus.emit("reloadHome") |
| | |
| | | url: '/pages/index/index', |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | changeDeal(e) { |
| | |
| | | </view> |
| | | </view> |
| | | </van-popup> |
| | | <van-popup show="{{ showLogout }}" round bind:close="appClose"> |
| | | <view class="modal"> |
| | | <view class="title">提醒</view> |
| | | <view class="text">你是否要退出该小程序吗</view> |
| | | <view class="btns"> |
| | | <navigator class="btn cancel" target="miniProgram" open-type="exit">确认退出</navigator> |
| | | <view class="btn" bindtap="appClose">返回首页</view> |
| | | </view> |
| | | </view> |
| | | </van-popup> |
| | | |
| | | </view> |
| | |
| | | <view style="width: 100%;height: auto;padding: 0px 40rpx;"> |
| | | <mp-html content="{{activeHtml}}"> </mp-html> |
| | | <!-- <mp-html content="{{activeHtml}}"> </mp-html> --> |
| | | <rich-text nodes="{{activeHtml}}"></rich-text> |
| | | </view> |
| | |
| | | <view class="container"> |
| | | <image class="avatar" bindtap="selMedia" src="{{ imgurlFull ? imgurlFull : '../../static/images/default_avatar.png' }}"></image> |
| | | <image class="avatar" src="{{ imgurlFull ? imgurlFull : '../../static/images/default_avatar.png' }}"></image> |
| | | <button open-type="chooseAvatar" bindchooseavatar="getBindchooseavatar" class="avatar_btn">更换头像</button> |
| | | <view class="list"> |
| | | <view class="line"> |
| | |
| | | <view class="val"> |
| | | <view class="picker" style="width: 100%"> |
| | | <view class="picker_wrap"> |
| | | <areaSel class="city_picler" bindchange="regionChange" placeholder="请选择所在区域" value="{{ addrValues }}" /> |
| | | <areaSel class="city_picler" bindchange="regionChange" placeholder="请选择所在城市" value="{{ addrValues }}" /> |
| | | <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <!-- <picker class="picker" mode="region" value="{{ addr }}" bindchange="positionChange"> |
| | |
| | | |
| | | |
| | | |
| | | // export const baseUrl = 'http://192.168.0.135:10027' // 本地 |
| | | export const baseUrl = 'http://192.168.0.135:10027' // 本地 |
| | | // export const baseUrl = 'https://dmtest.ahapp.net/web_interface' //测试服务器 |
| | | |
| | | export const baseUrl = 'https://dmdev.zhibang.com:8443/web_interface' |
| | | // export const baseUrl = 'https://dmdev.zhibang.com:8443/web_interface' |
| | | |
| | | // 腾讯地图开发者 key |
| | | export const qqMapKey = 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ' |
| | |
| | | import { getCataLogTagList, getZhongTaiWholecasePage, actionDo } from '../../api/index' |
| | | let touchDot = 0 |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | // 动画 |
| | | showTouch: true, |
| | | animationData: {}, |
| | | |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '', |
| | |
| | | attached() { |
| | | this.getCatelist() |
| | | this.getList() |
| | | this.animation = wx.createAnimation({ |
| | | duration: 600, |
| | | timingFunction: 'ease', |
| | | }); |
| | | }, |
| | | methods: { |
| | | bindscrolltoupper() { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | | this.animation.opacity(1).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, |
| | | refreshCount(){ |
| | | let temData = wx.getStorageSync('conentCountTemp') |
| | | if(temData && this.data.dataList){ |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 400rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | .item { |
| | |
| | | } |
| | | |
| | | .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | align-items: center; |
| | |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | | height: calc( 100% - 188rpx); |
| | | .empty{ |
| | | height: 100rpx; |
| | | } |
| | | .item{ |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view> |
| | | <view class="status"> |
| | | <view wx:if="{{ showTouch }}" animation="{{animationData}}" class="status"> |
| | | <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">默认</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">最热</view> |
| | |
| | | <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">最新</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list"> |
| | | <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-id="{{ item.id }}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="{{ item.coverImage }}" class="img"></image> |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | max-height: 400rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | padding: 30rpx 40rpx; |
| | | } |
| | |
| | | z-index: 99; |
| | | } |
| | | .main_content .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | align-items: center; |
| | |
| | | padding: 12rpx 40rpx; |
| | | height: calc(100% - 188rpx); |
| | | } |
| | | .main_content .goods_list .empty { |
| | | height: 100rpx; |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 100%; |
| | | margin-bottom: 32rpx; |
| | |
| | | import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index' |
| | | let touchDot = 0 |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | // 动画 |
| | | showTouch: true, |
| | | animationData: {}, |
| | | |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | tagCodes: [], |
| | |
| | | getApp().globalData.catalogCode = '' |
| | | }, 2000) |
| | | } |
| | | this.animation = wx.createAnimation({ |
| | | duration: 600, |
| | | timingFunction: 'ease', |
| | | }); |
| | | }, |
| | | methods: { |
| | | bindscrolltoupper() { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | | this.animation.opacity(1).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, |
| | | refreshCount(){ |
| | | let temData = wx.getStorageSync('conentCountTemp') |
| | | if(temData && this.data.datalist){ |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 400rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 154rpx; |
| | |
| | | } |
| | | |
| | | .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | align-items: center; |
| | |
| | | width: 590rpx; |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | | .empty{ |
| | | height: 92rpx; |
| | | } |
| | | .item { |
| | | width: 242rpx; |
| | | float: left; |
| | | margin-bottom: 32rpx; |
| | | margin-right: 26rpx; |
| | | // margin-right: 26rpx; |
| | | &:nth-of-type(2n){ |
| | | margin-right: 0; |
| | | margin-right: 26rpx; |
| | | } |
| | | .img_wrap { |
| | | width: 242rpx; |
| | |
| | | |
| | | .img { |
| | | width: 242rpx; |
| | | max-height: 216rpx; |
| | | height: 136rpx; |
| | | } |
| | | |
| | | .new { |
| | |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view> |
| | | <view class="status"> |
| | | <view wx:if="{{ showTouch }}" animation="{{animationData}}" class="status"> |
| | | <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">默认</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">最热</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">最新</view> |
| | | </view> |
| | | <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list"> |
| | | <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-id="{{item.id}}" class="item" bindtap="handleDetail"> |
| | | <view class="img_wrap"> |
| | | <image src="{{ item.coverImage }}" class="img" mode="aspectFit"></image> |
| | | <image src="{{ item.coverImage }}" class="img" mode="aspectFill"></image> |
| | | <image wx:if="{{ item.isNew }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="name">{{ item.title }}</view> |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 400rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .main_right .query_form .list .item { |
| | |
| | | z-index: 99; |
| | | } |
| | | .main_content .main_right .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | align-items: center; |
| | |
| | | box-sizing: border-box; |
| | | padding: 12rpx 40rpx; |
| | | } |
| | | .main_content .main_right .goods_list .empty { |
| | | height: 92rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item { |
| | | width: 242rpx; |
| | | float: left; |
| | | margin-bottom: 32rpx; |
| | | margin-right: 26rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item:nth-of-type(2n) { |
| | | margin-right: 0; |
| | | margin-right: 26rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap { |
| | | width: 242rpx; |
| | |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap .img { |
| | | width: 242rpx; |
| | | max-height: 216rpx; |
| | | height: 136rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .img_wrap .new { |
| | | width: 72rpx; |
| | |
| | | import { getCataLogTagList, getZhongTaiRealcasePage, actionDo } from '../../api/index' |
| | | let touchDot = 0 |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | // 动画 |
| | | showTouch: true, |
| | | animationData: {}, |
| | | |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | | selParam: '', |
| | |
| | | }, |
| | | attached() { |
| | | this.getCatelist() |
| | | this.animation = wx.createAnimation({ |
| | | duration: 600, |
| | | timingFunction: 'ease', |
| | | }); |
| | | }, |
| | | methods: { |
| | | bindscrolltoupper() { |
| | | this.setData({ showTouch: true }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showTouch: true }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | | this.animation.opacity(1).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showTouch: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, |
| | | refreshCount(){ |
| | | let temData = wx.getStorageSync('conentCountTemp') |
| | | if(temData && this.data.dataList){ |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 400rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | .item { |
| | | width: 202rpx; |
| | |
| | | } |
| | | |
| | | .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | height: 100rpx; |
| | |
| | | padding: 12rpx 40rpx; |
| | | height: calc( 100% - 188rpx); |
| | | box-sizing: border-box; |
| | | .empty{ |
| | | height: 100rpx; |
| | | } |
| | | .item { |
| | | width: 324rpx; |
| | | margin-bottom: 32rpx; |
| | | float: left; |
| | | margin-right: 22rpx; |
| | | &:nth-of-type(2n){ |
| | | margin-right: 0; |
| | | margin-right: 22rpx; |
| | | } |
| | | .img_wrap { |
| | | width: 100%; |
| | |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view> |
| | | <view class="status"> |
| | | <view wx:if="{{ showTouch }}" animation="{{animationData}}" class="status"> |
| | | <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">默认</view> |
| | | <view class="separate"></view> |
| | | <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">最热</view> |
| | |
| | | <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">最新</view> |
| | | </view> |
| | | <!-- goods_list --> |
| | | <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list"> |
| | | <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"> |
| | | <image src="{{ item.coverImage }}" class="img"></image> |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 30rpx 40rpx; |
| | | max-height: 400rpx; |
| | | max-height: 680rpx; |
| | | overflow: auto; |
| | | } |
| | | .main_content .query_param .list .item { |
| | |
| | | z-index: 99; |
| | | } |
| | | .main_content .status { |
| | | position: absolute; |
| | | background-color: #fff; |
| | | z-index: 99; |
| | | width: 100%; |
| | | display: flex; |
| | | padding: 0rpx 40rpx; |
| | | height: 100rpx; |
| | |
| | | height: calc(100% - 188rpx); |
| | | box-sizing: border-box; |
| | | } |
| | | .main_content .goods_list .empty { |
| | | height: 100rpx; |
| | | } |
| | | .main_content .goods_list .item { |
| | | width: 324rpx; |
| | | margin-bottom: 32rpx; |
| | | float: left; |
| | | margin-right: 22rpx; |
| | | } |
| | | .main_content .goods_list .item:nth-of-type(2n) { |
| | | margin-right: 0; |
| | | margin-right: 22rpx; |
| | | } |
| | | .main_content .goods_list .item .img_wrap { |
| | | width: 100%; |
| | |
| | | { |
| | | "name": "wechat_staff", |
| | | "version": "1.0.0", |
| | | "lockfileVersion": 1, |
| | | "lockfileVersion": 3, |
| | | "requires": true, |
| | | "packages": { |
| | | "": { |
| | | "name": "wechat_staff", |
| | | "version": "1.0.0", |
| | | "license": "ISC", |
| | | "dependencies": { |
| | | "@vant/weapp": { |
| | | "@vant/weapp": "^1.11.6", |
| | | "animate.css": "^4.1.1", |
| | | "hy-event-store": "^1.3.1", |
| | | "miniprogram-sm-crypto": "^0.3.13", |
| | | "moment": "^2.30.1", |
| | | "mp-html": "^2.5.0" |
| | | }, |
| | | "devDependencies": {} |
| | | }, |
| | | "node_modules/@vant/weapp": { |
| | | "version": "1.11.6", |
| | | "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.11.6.tgz", |
| | | "integrity": "sha512-a3heReWYT2gNdsyj6x1hBwsM8V8NrjcPAmle86NH2CD2V/i/h0le75piW6KntSfOPCwekVWMBKhysNrBpJeKdw==" |
| | | }, |
| | | "hy-event-store": { |
| | | "node_modules/animate.css": { |
| | | "version": "4.1.1", |
| | | "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz", |
| | | "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==" |
| | | }, |
| | | "node_modules/hy-event-store": { |
| | | "version": "1.3.1", |
| | | "resolved": "https://registry.npmmirror.com/hy-event-store/-/hy-event-store-1.3.1.tgz", |
| | | "integrity": "sha512-uD+14mz4ONiAs9cX/csjUJ2pHTPFciE3JvIbZ+lsbaXopZWbnETEjwJ0a4l5GqNGcltcW3gJjlnUXCJPBoABfg==" |
| | | }, |
| | | "jsbn": { |
| | | "node_modules/jsbn": { |
| | | "version": "1.1.0", |
| | | "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz", |
| | | "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" |
| | | }, |
| | | "miniprogram-sm-crypto": { |
| | | "node_modules/miniprogram-sm-crypto": { |
| | | "version": "0.3.13", |
| | | "resolved": "https://registry.npmmirror.com/miniprogram-sm-crypto/-/miniprogram-sm-crypto-0.3.13.tgz", |
| | | "integrity": "sha512-H7qwbCEmIXZzekCSgEWeHh1mb4cnz0E42YH3U5xqpOaJBB2Sj9ySq0hTGv0f+Jwo5SknABR6fw+EtjnMyJ/O/Q==", |
| | | "requires": { |
| | | "dependencies": { |
| | | "jsbn": "^1.1.0" |
| | | } |
| | | }, |
| | | "moment": { |
| | | "node_modules/moment": { |
| | | "version": "2.30.1", |
| | | "resolved": "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz", |
| | | "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" |
| | | "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", |
| | | "engines": { |
| | | "node": "*" |
| | | } |
| | | }, |
| | | "mp-html": { |
| | | "node_modules/mp-html": { |
| | | "version": "2.5.0", |
| | | "resolved": "https://registry.npmmirror.com/mp-html/-/mp-html-2.5.0.tgz", |
| | | "integrity": "sha512-uvBH5tIaDIlj8qaxsvNXU3RKX0jvXOo3J6FAi/notUv/ds6j79UUTE82aDkxxUk0eLUU0CiCqMrR7WWnytk30Q==" |
| | |
| | | "main": ".eslintrc.js", |
| | | "dependencies": { |
| | | "@vant/weapp": "^1.11.6", |
| | | "animate.css": "^4.1.1", |
| | | "hy-event-store": "^1.3.1", |
| | | "miniprogram-sm-crypto": "^0.3.13", |
| | | "moment": "^2.30.1", |
| | | "mp-html": "^2.5.0", |
| | | "hy-event-store": "^1.3.1" |
| | | "mp-html": "^2.5.0" |
| | | }, |
| | | "devDependencies": {}, |
| | | "scripts": { |
| | | "test": "echo \"Error: no test specified\" && exit 1" |
| | | }, |
| | |
| | | category: [], |
| | | secondCategory: [], |
| | | showCate: true, |
| | | animationData: {}, |
| | | |
| | | catalogCode: '', |
| | | tagCode: '', |
| | |
| | | }, |
| | | onLoad(options) { |
| | | this.getCate() |
| | | this.animation = wx.createAnimation({ |
| | | duration: 500, |
| | | timingFunction: 'ease', |
| | | }); |
| | | }, |
| | | bindscrolltolower() { |
| | | console.log('触底事件'); |
| | | const { total, dataList, pageNum } = this.data |
| | | if(total > dataList.length){ |
| | | this.setData({ pageNum: pageNum + 1 }) |
| | | this.getList(false) |
| | | this.getList() |
| | | }else{ |
| | | wx.showToast({ |
| | | title: '暂无更多数据', |
| | |
| | | }) |
| | | } |
| | | }, |
| | | getList(showCate = true) { |
| | | getList() { |
| | | 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, |
| | | showCate |
| | | total: res.data.total |
| | | }) |
| | | } |
| | | |
| | |
| | | onReady() { |
| | | |
| | | }, |
| | | bindscrolltoupper() { |
| | | this.setData({ showCate: true }) |
| | | this.fadeIn(); |
| | | }, |
| | | touchstart(e){ |
| | | // touchDot = e.touches[0].pageY; |
| | | console.log('开始', e); |
| | | touchDot = e.detail.scrollTop; |
| | | }, |
| | | touchmove(e) { |
| | | // var touchMove = e.touches[0].pageY; |
| | | console.log('touchMove', e); |
| | | // if(touchDot - touchMove > 60){ |
| | | var touchMove = e.detail.scrollTop; |
| | | if(touchMove - touchDot > 60){ |
| | | // this.setData({ showCate: false }) |
| | | // } |
| | | // if(touchMove - touchDot > 60){ |
| | | // this.setData({ showCate: true }) |
| | | // } |
| | | this.fadeOut(); |
| | | } |
| | | if(touchDot - touchMove > 60){ |
| | | this.fadeIn(); |
| | | this.setData({ showCate: true }) |
| | | } |
| | | }, |
| | | fadeIn: function () { |
| | | this.animation.opacity(1).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | }, |
| | | fadeOut: function () { |
| | | this.animation.opacity(0).step(); |
| | | this.setData({ |
| | | animationData: this.animation.export() |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ showCate: false }); |
| | | }, 500); // 动画持续时间 |
| | | }, |
| | | onShow() { |
| | | refreshEnjoy(this) |
| | |
| | | top: 0; |
| | | background-color: #fff; |
| | | } |
| | | .cate_wrap{ |
| | | background-color: #fff; |
| | | .cate_one{ |
| | | background-color: #fff; |
| | | } |
| | | .cate_two{ |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | .search_wrap{ |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | |
| | | background-color: #F7F7F7; |
| | | image{ |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | } |
| | | .cate_wrap{ |
| | | .cate_one{ |
| | | background-color: #fff; |
| | | } |
| | | .cate_two{ |
| | | position: absolute; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | .scroll_cate { |
| | |
| | | .second_list { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: 0; |
| | | .item { |
| | | padding: 0 40rpx; |
| | | display: flex; |
| | |
| | | margin-right: 24rpx; |
| | | } |
| | | .active{ |
| | | color: var(--themeColor); |
| | | background: rgba(176,135,113,0.08); |
| | | color: #fff; |
| | | font-size: 24rpx; |
| | | font-weight: 400; |
| | | } |
| | |
| | | .content{ |
| | | padding: 0rpx 40rpx 40rpx; |
| | | height: calc( 100vh - 200rpx ); |
| | | .empty{ |
| | | height: 88rpx; |
| | | } |
| | | .item{ |
| | | margin-bottom: 60rpx; |
| | | .img{ |
| | |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <view wx:if="{{showCate && secondCategory && secondCategory.length > 0}}" class="cate_two"> |
| | | <view animation="{{animationData}}" 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> |
| | | <!-- content --> |
| | | <scroll-view scroll-y enhanced class="content" bindscrolltolower="bindscrolltolower" binddragging="touchmove" binddragstart="touchstart"> |
| | | <scroll-view scroll-y enhanced class="content" bindscrolltoupper="bindscrolltoupper" bindscrolltolower="bindscrolltolower" binddragging="touchmove" binddragstart="touchstart"> |
| | | <view wx:if="{{ secondCategory && secondCategory.length > 0 }}" class="empty"></view> |
| | | <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> |
| | |
| | | top: 0; |
| | | background-color: #fff; |
| | | } |
| | | .cate_wrap { |
| | | background-color: #fff; |
| | | } |
| | | .cate_wrap .cate_one { |
| | | background-color: #fff; |
| | | } |
| | | .cate_wrap .cate_two { |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | background-color: #fff; |
| | | } |
| | | .search_wrap { |
| | | width: 670rpx; |
| | | height: 72rpx; |
| | |
| | | } |
| | | .search_wrap image { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | .cate_wrap .cate_one { |
| | | background-color: #fff; |
| | | } |
| | | .cate_wrap .cate_two { |
| | | position: absolute; |
| | | line-height: 88rpx; |
| | | margin-left: 40rpx; |
| | | height: 88rpx; |
| | | z-index: 999; |
| | | background-color: #fff; |
| | | } |
| | | .scroll_cate { |
| | | display: flex; |
| | |
| | | .second_list { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: 0; |
| | | } |
| | | .second_list .item { |
| | | padding: 0 40rpx; |
| | |
| | | margin-right: 24rpx; |
| | | } |
| | | .second_list .active { |
| | | color: var(--themeColor); |
| | | background: rgba(176, 135, 113, 0.08); |
| | | color: #fff; |
| | | font-size: 24rpx; |
| | | font-weight: 400; |
| | | } |
| | |
| | | padding: 0rpx 40rpx 40rpx; |
| | | height: calc(100vh - 200rpx); |
| | | } |
| | | .content .empty { |
| | | height: 88rpx; |
| | | } |
| | | .content .item { |
| | | margin-bottom: 60rpx; |
| | | } |
| | |
| | | actionType: 'share', |
| | | id: this.data.info.id |
| | | }) |
| | | console.log(`/pages/consult/detail?id=${this.data.info.id}&origin=b&userId=${wx.getStorageSync('member').id}`); |
| | | return |
| | | wx.navigateToMiniProgram({ |
| | | appId: 'wxcd2b89fd2ff065f8', |
| | | path: `/pages/consult/detail?id=${this.data.info.id}&origin=b&userId=${wx.getStorageSync('member').id}`, |
| | |
| | | <view class="name">{{ item.customerName }}</view> |
| | | <view class="line source"> |
| | | <view class="label">来源</view> |
| | | <view class="val">{{ item.orgName }}</view> |
| | | <view class="val">{{ item.channel }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | .placeholder9{ |
| | | text-align: center; |
| | | } |
| | | page{ |
| | | overflow: hidden; |
| | | } |
| | | .btns{ |
| | | margin-top: 120rpx; |
| | | padding: 0 62rpx; |
| | |
| | | position: relative; |
| | | .content{ |
| | | height: calc( 100% - 180rpx ); |
| | | overflow: auto; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .btns{ |
| | |
| | | <van-popup position="bottom" show="{{ showModal }}" round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <view class="content"> |
| | | <mp-html content="{{activeHtml}}"></mp-html> |
| | | <!-- <mp-html content="{{activeHtml}}"></mp-html> --> |
| | | <rich-text nodes="{{activeHtml}}"></rich-text> |
| | | </view> |
| | | <view style="bottom: {{ bottomLift }}px" class="btns"> |
| | | <view data-flag="{{true}}" bindtap="handleJudge" class="agree">同意</view> |
| | |
| | | .placeholder9 { |
| | | text-align: center; |
| | | } |
| | | page { |
| | | overflow: hidden; |
| | | } |
| | | .btns { |
| | | margin-top: 120rpx; |
| | | padding: 0 62rpx; |
| | |
| | | } |
| | | .modal .content { |
| | | height: calc(100% - 180rpx); |
| | | overflow: auto; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .modal .btns { |
| | |
| | | <!--pages/sets/protocol.wxml--> |
| | | <view style="width: 100%;height: auto;padding: 0px 40rpx;"> |
| | | <mp-html content="{{content}}"> </mp-html> |
| | | <!-- <mp-html content="{{content}}"> </mp-html> --> |
| | | <rich-text nodes="{{content}}"></rich-text> |
| | | </view> |
| | |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | }, |
| | | jumpUser() { |
| | | wx.navigateTo({ |
| | | url: '/pages/userinfo/index', |
| | | }) |
| | | }, |
| | | showQrcode() { |
| | | this.setData({ |
| | | isShow: true |
| | |
| | | top: 0; |
| | | left: 0; |
| | | z-index: -1; |
| | | image{ |
| | | width: 750rpx; |
| | | height: 400rpx; |
| | | } |
| | | } |
| | | .editBtn{ |
| | | position: fixed; |
| | | right: 40rpx; |
| | | top: 304rpx; |
| | | width: 144rpx; |
| | | height: 56rpx; |
| | | line-height: 56rpx; |
| | | text-align: center; |
| | | border-radius: 28rpx; |
| | | border: 1rpx solid #999999; |
| | | color: #999999; |
| | | font-size: 24rpx; |
| | | z-index: 999; |
| | | } |
| | | page{ |
| | | overflow-y: hidden; |
| | |
| | | <view class="app"> |
| | | <back /> |
| | | <image src="../../static/images/design_banner@2x.png" mode="widthFix" class="bg_wrap"></image> |
| | | <view class="bg_wrap"> |
| | | <image src="../../static/images/design_banner@2x.png" mode="widthFix" ></image> |
| | | </view> |
| | | <view bindtap="jumpUser" class="editBtn">编辑资料</view> |
| | | <view class="container"> |
| | | <image class="avatar" src="{{userInfo.imgurlFull ? userInfo.imgurlFull : '../../static/images/default_avatar.png'}}"></image> |
| | | <view class="name_wrap"> |
| | |
| | | left: 0; |
| | | z-index: -1; |
| | | } |
| | | .bg_wrap image { |
| | | width: 750rpx; |
| | | height: 400rpx; |
| | | } |
| | | .editBtn { |
| | | position: fixed; |
| | | right: 40rpx; |
| | | top: 304rpx; |
| | | width: 144rpx; |
| | | height: 56rpx; |
| | | line-height: 56rpx; |
| | | text-align: center; |
| | | border-radius: 28rpx; |
| | | border: 1rpx solid #999999; |
| | | color: #999999; |
| | | font-size: 24rpx; |
| | | z-index: 999; |
| | | } |
| | | page { |
| | | overflow-y: hidden; |
| | | } |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/webView/index", |
| | | "pathName": "pages/login/index", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/consult/detail", |
| | | "query": "id=1813577799402684418", |
| | | "pathName": "pages/work/index", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | } |