杨豪 3 years ago
parent
commit
313784f047
  1. 19
      pages/demandHall/index.js
  2. 16
      pages/demandHall/index.wxml

19
pages/demandHall/index.js

@ -11,20 +11,22 @@ Page({
list: [], list: [],
showScreenDialog: false, showScreenDialog: false,
companyList: [], companyList: [],
pagesize: 10, pagesize: 3,
page: 1, page: 1,
loading: true, //是否加载更多 loading: true, //是否加载更多
cagetoryList: [] , // 分类列表 cagetoryList: [] , // 分类列表
cName:'', //筛选企业/个人 enterpriseType:'', //筛选企业/个人
resourceCagetoryId: '' //筛选分类 resourceCagetoryId: '' //筛选分类
}, },
topTabClick(e){ topTabClick(e){
this.setData({ this.setData({
active: e.currentTarget.dataset.i, active: e.currentTarget.dataset.i,
loading: true, loading: true,
pagesize: 10,
page: 1, page: 1,
list: [] list: [],
enterpriseType: '',
cagetoryActive: null,
resourceCagetoryId:''
}) })
this.getPageData() this.getPageData()
}, },
@ -33,7 +35,10 @@ Page({
tabActive: e.currentTarget.dataset.i, tabActive: e.currentTarget.dataset.i,
loading: true, loading: true,
page: 1, page: 1,
size: 10 size: 10,
enterpriseType: '',
cagetoryActive: null,
resourceCagetoryId:''
}) })
if(e.currentTarget.dataset.i == 2){ if(e.currentTarget.dataset.i == 2){
this.getCompanyList() this.getCompanyList()
@ -92,7 +97,7 @@ Page({
}, },
businessChange(e){ businessChange(e){
let type = e.currentTarget.dataset.type let type = e.currentTarget.dataset.type
this.setData({cName: type}) this.setData({enterpriseType: type})
}, },
finishClick(){ finishClick(){
this.setData({loading: true,page: 1, size: 10}) this.setData({loading: true,page: 1, size: 10})
@ -115,7 +120,7 @@ Page({
page: this.data.page, page: this.data.page,
pagesize:this.data.pagesize, pagesize:this.data.pagesize,
resourceCagetoryId:this.data.resourceCagetoryId, resourceCagetoryId:this.data.resourceCagetoryId,
cName: this.data.cName, enterpriseType: this.data.enterpriseType,
}).then((res)=>{ }).then((res)=>{
if(res.data.success){ if(res.data.success){
if(res.data.data.content.length < this.data.pagesize){ if(res.data.data.content.length < this.data.pagesize){

16
pages/demandHall/index.wxml

@ -28,7 +28,7 @@
<view class="resource-info"> <view class="resource-info">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="tags-box"> <view class="tags-box">
<view class="tag-item">网站建设</view> <view class="tag-item">{{item.cname}}</view>
</view> </view>
<view class="desc line1">{{item.detailedDescription}}</view> <view class="desc line1">{{item.detailedDescription}}</view>
<view class="price">¥{{item.capital}}</view> <view class="price">¥{{item.capital}}</view>
@ -60,9 +60,9 @@
<view class="resource-info"> <view class="resource-info">
<view class="title">{{item.enterpriseName}}</view> <view class="title">{{item.enterpriseName}}</view>
<view class="tags-box"> <view class="tags-box">
<view class="tag-item">网站建设</view> <view class="tag-item">{{item.cname}}</view>
<view class="tag-item bgG">IT软件</view> <!-- <view class="tag-item bgG">IT软件</view>
<view class="tag-item bgO">APP开发</view> <view class="tag-item bgO">APP开发</view> -->
</view> </view>
<view class="desc line2">{{item.enterpriseTitle}}</view> <view class="desc line2">{{item.enterpriseTitle}}</view>
<view class="anli-list acea-row row-between"> <view class="anli-list acea-row row-between">
@ -120,9 +120,7 @@
<view class="price">{{item.capital}}</view> <view class="price">{{item.capital}}</view>
</view> </view>
<view class="tags-box"> <view class="tags-box">
<view class="tag-item">网站建设</view> <view class="tag-item">{{item.cname}}</view>
<view class="tag-item bgG">IT软件</view>
<view class="tag-item bgO">APP开发</view>
</view> </view>
<view class="desc line2">{{item.detailedDescription}}</view> <view class="desc line2">{{item.detailedDescription}}</view>
<view class="btn-box acea-row row-between row-middle"> <view class="btn-box acea-row row-between row-middle">
@ -180,8 +178,8 @@
<view class="screen-item"> <view class="screen-item">
<view class="screen-title">商家身份<text class="fz20">(所有商家均实名认证)</text></view> <view class="screen-title">商家身份<text class="fz20">(所有商家均实名认证)</text></view>
<view class="acea-row"> <view class="acea-row">
<view class="item {{cName == 2 ? 'item-active' : ''}}" bindtap="businessChange" data-type="2">个人认证</view> <view class="item {{enterpriseType == 2 ? 'item-active' : ''}}" bindtap="businessChange" data-type="2">个人认证</view>
<view class="item {{cName == 1 ? 'item-active' : ''}}" bindtap="businessChange" data-type="1">企业认证</view> <view class="item {{enterpriseType == 1 ? 'item-active' : ''}}" bindtap="businessChange" data-type="1">企业认证</view>
</view> </view>
</view> </view>
<view class="submit-box acea-row"> <view class="submit-box acea-row">

Loading…
Cancel
Save