| | |
| | | }) |
| | | }, |
| | | scrolltolower() { |
| | | console.log('触底事件'); |
| | | console.log('触底事件') |
| | | const { total, dataList, pageNum } = this.data |
| | | if(total > dataList.length){ |
| | | this.setData({ pageNum: pageNum + 1 }) |
| | |
| | | } |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ tagCodes, cateList }) |
| | | console.log('tagCodes', tagCodes); |
| | | console.log('tagCodes', tagCodes) |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | item.paramName = item.paramName || '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ pageNum: 1, activeIndex: -1, dataList: [], total: 0 }) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e){ |
| | |
| | | if(app.globalData.catalogCode){ |
| | | this.setData({ catalogCode: app.globalData.catalogCode }) |
| | | setTimeout(() => { |
| | | console.log('catalogCode', this.data.catalogCode); |
| | | console.log('catalogCode', this.data.catalogCode) |
| | | getApp().globalData.catalogCode = '' |
| | | }, 2000) |
| | | } |
| | |
| | | }) |
| | | }, |
| | | scrolltolower() { |
| | | console.log('触底事件'); |
| | | console.log('触底事件') |
| | | const { total, datalist, pageNum } = this.data |
| | | if(total > datalist.length){ |
| | | this.setData({ pageNum: pageNum + 1 }) |
| | |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { secondCateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | console.log('code', code); |
| | | console.log('tagCodes', tagCodes); |
| | | console.log('code', code) |
| | | console.log('tagCodes', tagCodes) |
| | | if(index === -1){ |
| | | // 同param里code重复 |
| | | if(activeParam && activeParam.length > 0){ |
| | |
| | | changeShowParams(e){ |
| | | const { secondCateList } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | console.log('activeIndex', activeIndex); |
| | | console.log('secondCateList', secondCateList); |
| | | console.log('activeIndex', activeIndex) |
| | | console.log('secondCateList', secondCateList) |
| | | if(activeIndex === this.data.activeIndex){ |
| | | this.setData({ activeIndex: -1, activeParam: [] }) |
| | | }else{ |
| | |
| | | const { secondCateList } = this.data |
| | | secondCateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | item.paramName = item.paramName || '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 }) |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.setData({ pageNum: 1, activeIndex: -1, datalist: [], total: 0 }) |
| | | this.getList() |
| | | }, |
| | | } |
| | |
| | | const { cateList } = this.data |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | item.paramName = item.paramName || '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e){ |
| | |
| | | data: { |
| | | agreementFalg: false, |
| | | primary: '', |
| | | bottomLift: 0, |
| | | |
| | | showModal: false, |
| | | serviceHtml: '', |
| | |
| | | activeHtml: '' |
| | | }, |
| | | initData(){ |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | getDictData({ |
| | | code: 'ZBOM_CUSTOMIZED', |
| | | label: 'SERVER_AGREEMENT' |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | handleJudge(e) { |
| | | const flag = e.currentTarget.dataset.flag |
| | | console.log(e); |
| | | this.setData({ agreementFalg: flag, showModal: false }) |
| | | }, |
| | | loginIn() { |
| | | const { agreementFalg } = this.data |
| | | if(!agreementFalg) return wx.showToast({ |
| | |
| | | } |
| | | .modal{ |
| | | width: 100%; |
| | | max-height: 1120rpx; |
| | | min-height: 600rpx; |
| | | height: calc( 100vh - 200rpx ); |
| | | padding: 40rpx; |
| | | position: relative; |
| | | .content{ |
| | | height: calc( 100vh - 460rpx ); |
| | | overflow: auto; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .btns{ |
| | | position: fixed; |
| | | padding: 20rpx 0rpx; |
| | | width: 100%; |
| | | z-index: 999; |
| | | border-top: 1px solid #e5e5e5; |
| | | .btn{ |
| | | width: 670rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #999999; |
| | | text-align: center; |
| | | margin-top: 30rpx; |
| | | } |
| | | .agree{ |
| | | width: 670rpx; |
| | | height: 88rpx; |
| | | background: #B08771; |
| | | border-radius: 8rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | .title{ |
| | | font-weight: 600; |
| | |
| | | <!-- --> |
| | | <van-popup position="bottom" show="{{ showModal }}" round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <view class="content"> |
| | | <mp-html content="{{activeHtml}}"></mp-html> |
| | | </view> |
| | | <view style="bottom: {{ bottomLift }}px" class="btns"> |
| | | <view data-flag="{{true}}" bindtap="handleJudge" class="agree">同意</view> |
| | | <view data-flag="{{false}}" bindtap="handleJudge" class="btn">不同意并退出</view> |
| | | </view> |
| | | </view> |
| | | </van-popup> |
| | | </view> |
| | |
| | | } |
| | | .modal { |
| | | width: 100%; |
| | | max-height: 1120rpx; |
| | | min-height: 600rpx; |
| | | height: calc(100vh - 200rpx); |
| | | padding: 40rpx; |
| | | position: relative; |
| | | } |
| | | .modal .content { |
| | | height: calc(100vh - 460rpx); |
| | | overflow: auto; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .modal .btns { |
| | | position: fixed; |
| | | padding: 20rpx 0rpx; |
| | | width: 100%; |
| | | z-index: 999; |
| | | border-top: 1px solid #e5e5e5; |
| | | } |
| | | .modal .btns .btn { |
| | | width: 670rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #999999; |
| | | text-align: center; |
| | | margin-top: 30rpx; |
| | | } |
| | | .modal .btns .agree { |
| | | width: 670rpx; |
| | | height: 88rpx; |
| | | background: #B08771; |
| | | border-radius: 8rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #fff; |
| | | } |
| | | .title { |
| | | font-weight: 600; |
| | |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |
| | | console.log('cateList', cateList); |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | item.paramName = item.paramName || '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e){ |
| | |
| | | margin-left: 12rpx; |
| | | .icon{ |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | .num{ |
| | |
| | | } |
| | | .main_content .goods_list .item .info .icon { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | .main_content .goods_list .item .info .num { |
| | |
| | | const { secondCateList } = this.data |
| | | const activeIndex = e.currentTarget.dataset.index |
| | | console.log('activeIndex', activeIndex); |
| | | console.log('activeIndex', this.data.activeIndex); |
| | | console.log('secondCateList', secondCateList); |
| | | if(activeIndex === this.data.activeIndex){ |
| | | this.setData({ activeIndex: -1, activeParam: [] }) |
| | |
| | | const { secondCateList } = this.data |
| | | secondCateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | item.paramName = item.paramName || '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 }) |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.setData({ pageNum: 1,activeIndex: -1, datalist: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | } |
| | |
| | | |
| | | .icon { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | |
| | |
| | | .app { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y: hidden; |
| | | } |
| | | .app .home_content { |
| | | height: 100%; |
| | |
| | | } |
| | | .main_content .main_right .goods_list .item .info .icon { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | .main_content .main_right .goods_list .item .info .num { |
| | |
| | | const { cateList } = this.data |
| | | cateList.forEach(item => { |
| | | item.paramIndex = -1 |
| | | item.paramName = '' |
| | | item.paramName = item.paramName || '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 }) |
| | | }, |
| | |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | changeShowParams(e){ |
| | |
| | | |
| | | .icon { |
| | | width: 24rpx; |
| | | height: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | |
| | | |
| | | .icon { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | |
| | |
| | | } |
| | | .main_content .goods_list .item .img_wrap .full .icon { |
| | | width: 24rpx; |
| | | height: 24rpx; |
| | | margin-right: 4rpx; |
| | | } |
| | | .main_content .goods_list .item .img_wrap .img { |
| | |
| | | } |
| | | .main_content .goods_list .item .info .icon { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | .main_content .goods_list .item .info .num { |