Browse Source

合并代码

zys
杨豪 3 years ago
parent
commit
1830820613
  1. 86
      pages/demandHall/enterpriseServer/index.vue
  2. 10
      pages/demandHall/index.vue
  3. 114
      pages/demandHall/supplyHall/index.vue

86
pages/demandHall/enterpriseServer/index.vue

@ -21,32 +21,31 @@
</view> </view>
<view class="supplyHall-box"> <view class="supplyHall-box">
<view class="resource-box" v-if="active == 1"> <view class="resource-box" v-if="active == 1">
<!-- 企业 --> <view class="enterprise-list" v-for="(item,index) in resourceList" :key="index" @tap="toResourceDetail" :data-id="item.id">
<view class="enterprise-list" v-for="(item,index) in 2" :key="index"> <view :class="'business-lable ' + (item.enterpriseType == 1 ? 'bg2' : '')">
<view :class="'business-lable' + (item.enterpriseType == 2 ? ' bg2' : '')">
{{item.enterpriseType == 1 ? '企业' : '个人'}} {{item.enterpriseType == 1 ? '企业' : '个人'}}
</view> </view>
<view class="enterprise-con acea-row"> <view class="enterprise-con acea-row">
<image src="../../../static/images/home/menu6.png" class="enterprise-img"></image> <image :src="item.resourceImgs[0]" class="enterprise-img"></image>
<view class="content-right acea-row row-column-between"> <view class="content-right acea-row row-column-between">
<view>APP开发平台搭建外卖小程序返现H5定制一站式解决</view> <view class="line2">{{item.title}}</view>
<view class="category-box acea-row"> <view class="category-box acea-row">
<view class="tag-item-b tag">商务合作</view> <view class="tag-item-b tag">{{item.cname}}</view>
<view class="tag-item-y tag">场地租赁</view> <!-- <view class="tag-item-y tag">场地租赁</view> -->
</view> </view>
<view class="enterprise-price">20,000</view> <view class="enterprise-price">{{item.totalMoney}}</view>
</view> </view>
</view> </view>
<view class="user-info acea-row row-middle"> <view class="user-info acea-row row-middle">
<image src="../../../static/images/cart.png" mode="" class="head-logo"></image> <image :src="item.enterpriseDto.enterpriseLogo" mode="" class="head-logo"></image>
<view class="user-name">湖北知音动漫有限公司</view> <view class="user-name">{{item.enterpriseName}}</view>
</view> </view>
<view class="todetails">查看详情</view> <view class="todetails" >查看详情</view>
</view> </view>
</view> </view>
<view class="company-box" v-if="active == 2"> <view class="company-box" v-if="active == 2">
<view class="business-list" v-for="(item,index) in companyList" :key="index" @tap="toCompanyDetail" :data-id="item.id"> <view class="business-list" v-for="(item,index) in companyList" :key="index" @tap="toCompanyDetail" :data-id="item.id">
<view :class="'business-lable' + (item.enterpriseType == 2 ? ' bg2' : '')"> <view :class="'business-lable ' + (item.enterpriseType == 1 ? 'bg2' : '')">
{{item.enterpriseType == 1 ? '企业' : '个人'}} {{item.enterpriseType == 1 ? '企业' : '个人'}}
</view> </view>
<view class="business-con acea-row"> <view class="business-con acea-row">
@ -62,10 +61,10 @@
<view class="title-s">{{item.enterpriseTitle}}</view> <view class="title-s">{{item.enterpriseTitle}}</view>
</view> </view>
</view> </view>
<vie class="business-img acea-row row-around"> <view class="business-img acea-row row-around" v-if="item.imgPaths.length > 0">
<image v-for="(item, index2) in item.imgPaths" :key="index2" mode="aspectFill" :src="item" <image v-for="(item, index2) in item.imgPaths" :key="index2" mode="aspectFill" :src="item"
v-if="index2 < 2"></image> v-if="index2 < 2"></image>
</vie> </view>
</view> </view>
</view> </view>
</view> </view>
@ -116,11 +115,16 @@
choseBusiness: '', choseBusiness: '',
cName: "", cName: "",
resourceList: [],
companyList: [], companyList: [],
loading: true,
pageSize: 10,
pageNumber: 0,
} }
}, },
onLoad: function(options) { onLoad: function(options) {
this.getCagetoryList(); // this.getCagetoryList();
this.getPageData();
}, },
methods: { methods: {
tabClick(e) { tabClick(e) {
@ -129,6 +133,8 @@
}); });
if (e.currentTarget.dataset.i == 2) { if (e.currentTarget.dataset.i == 2) {
this.getCompanyList(); this.getCompanyList();
} else{
this.getPageData();
} }
}, },
getCompanyList() { getCompanyList() {
@ -196,6 +202,43 @@
choseCagetory: '', choseCagetory: '',
}); });
}, },
//
getPageData() {
if (this.loading) {
app.http('post', `Resources/listResources?page=${this.pageNumber}&size=${this.pageSize}`, {
resourceType: 1,
resourceCagetoryId: this.resourceCagetoryId,
enterpriseType: this.enterpriseType
}).then(res => {
if (res.data.success) {
uni.stopPullDownRefresh();
if (res.data.data.content.length < this.pageSize) {
this.setData({
loading: false
});
}
if (this.pageNumber > 0) {
this.setData({
resourceList: this.resourceList.concat(res.data.data.content)
});
} else {
this.setData({
resourceList: res.data.data.content
});
}
}
});
} else {
uni.stopPullDownRefresh();
}
},
toResourceDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/demandHall/resourcesDetail/index?id=' + id
});
},
// //
toCompanyDetail(e) { toCompanyDetail(e) {
let id = e.currentTarget.dataset.id; let id = e.currentTarget.dataset.id;
@ -208,11 +251,15 @@
</script> </script>
<style> <style>
image{
border-radius: 8rpx;
}
.supplyHall-page { .supplyHall-page {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background: #F5F5F5; background: #F5F5F5;
font-size: 28rpx; font-size: 28rpx;
padding-bottom: 100rpx;
} }
/* 导航栏 */ /* 导航栏 */
@ -240,7 +287,7 @@
.search { .search {
margin-left: auto; margin-left: auto;
width: 132rpx; width: 132rpx;
height: 68rpx; height: 66rpx;
background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%); background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%);
border-radius: 8rpx; border-radius: 8rpx;
color: #fff; color: #fff;
@ -340,8 +387,8 @@
} }
.tag { .tag {
width: auto; width: auto;
padding: 0rpx 10rpx; padding: 0 10rpx;
line-height: 26rpx; height: 36rpx;
border-radius: 4rpx; border-radius: 4rpx;
font-size: 20rpx; font-size: 20rpx;
margin-right: 8rpx; margin-right: 8rpx;
@ -429,6 +476,7 @@
margin-top: 32rpx; margin-top: 32rpx;
border-radius: 12rpx; border-radius: 12rpx;
position: relative; position: relative;
padding-bottom: 12rpx;
} }
.business-lable { .business-lable {
@ -442,7 +490,7 @@
} }
.bg2 { .bg2 {
background: linear-gradient(141deg, #FFA782 0%, #FF6D31 100%); background: rgba(255, 170, 0, 0.63);
} }

10
pages/demandHall/index.vue

@ -84,14 +84,6 @@
</view> </view>
<!-- 需求 --> <!-- 需求 -->
<view class="company-list-box" v-if="active == 2"> <view class="company-list-box" v-if="active == 2">
<!-- <view class="screen-box acea-row row-between-wrapper">
<view class="screen-result">IT软件 · 企业网站</view>
<view class="screen-result"> </view>
<view class="screen acea-row row-middle" @tap="showDialog">
<text>筛选</text>
<image src="/static/images/home/screen.png"></image>
</view>
</view> -->
<view class="company-list"> <view class="company-list">
<view v-for="(item, index) in list" :key="index" class="company-item" :data-id="item.id" <view v-for="(item, index) in list" :key="index" class="company-item" :data-id="item.id"
@tap="toNeedsDetail"> @tap="toNeedsDetail">
@ -177,7 +169,7 @@
list: [], list: [],
showScreenDialog: false, showScreenDialog: false,
companyList: [], companyList: [],
pageSize: 5, pageSize: 10,
pageNumber: 0, pageNumber: 0,
loading: true, loading: true,
// //

114
pages/demandHall/supplyHall/index.vue

@ -8,8 +8,8 @@
<view class="search acea-row row-center-wrapper">搜一下</view> <view class="search acea-row row-center-wrapper">搜一下</view>
</view> </view>
<view class="resource-tabs acea-row"> <view class="resource-tabs acea-row">
<view :class="'tab ' + (active == 1 ? 'tab-a' : '')" data-i="1" @tap="tabClick">需求广场</view> <view :class="'tab ' + (active == 2 ? 'tab-a' : '')" data-i="2" @tap="tabClick">需求广场</view>
<view :class="'tab ' + (active == 2 ? 'tab-a' : '')" data-i="2" @tap="tabClick">供应广场</view> <view :class="'tab ' + (active == 1 ? 'tab-a' : '')" data-i="1" @tap="tabClick">供应广场</view>
<view class="screen-box acea-row row-between-wrapper"> <view class="screen-box acea-row row-between-wrapper">
<view class="screen acea-row row-middle" @tap="showDialog"> <view class="screen acea-row row-middle" @tap="showDialog">
<text>筛选</text> <text>筛选</text>
@ -20,32 +20,10 @@
</view> </view>
<view class="supplyHall-box"> <view class="supplyHall-box">
<view class="resource-box" v-if="active == 1"> <view class="resource-box" v-if="active == 2">
<!-- 个人 --> <!-- 需求列表 -->
<!-- <view class="personal-list" v-for="(item,index) in 2" :key="index"> <view class="enterprise-list" v-for="(item, index) in list" :key="index" @tap="toNeedsDetail" :data-id="item.id">
<view :class="'tips-item ' + (item.enterpriseType == 2 ? 'bg2' : '' )"> <view :class="'tips-item ' + (item.enterpriseType == 2 ? 'bg2' : '')">
{{item.enterpriseType == 1 ? '企业' : '个人'}}
</view>
<view class="acea-row row-column-between info-box">
<view class="user-info acea-row row-middle">
<image src="../../../static/images/business-img1.png" mode="" class="head-img"></image>
<view class="user-name">大老虎</view>
<view class="user-address">武汉</view>
<view class="user-price">20,000</view>
</view>
<view class="supply-con">李先生需要景区方面资源洽谈相关合作</view>
<view class="category-box acea-row">
<view class="tag-item-b tag">商务合作</view>
<view class="tag-item-y tag">场地租赁</view>
</view>
<view class="time-end">2021.8.30截止报名</view>
</view>
<view class="todetails">查看详情</view>
</view> -->
<!-- 企业 -->
<view class="enterprise-list" v-for="(item, index) in list" :key="index" @tap="toNeedsDetail"
:data-id="item.id">
<view :class="'tips-item' + (item.enterpriseType == 2 ? ' bg2' : '')">
{{item.enterpriseType == 1 ? '企业' : '个人'}} {{item.enterpriseType == 1 ? '企业' : '个人'}}
</view> </view>
<view class="enterprise-box acea-row row-column-between"> <view class="enterprise-box acea-row row-column-between">
@ -58,8 +36,8 @@
<view class="time-end-t">{{item.resourceEndTime}}截止报名</view> <view class="time-end-t">{{item.resourceEndTime}}截止报名</view>
</view> </view>
<view class="enterprise-info acea-row row-middle"> <view class="enterprise-info acea-row row-middle">
<image src="../../../static/images/cart.png" mode="" class="head-logo"></image> <image :src="item.enterpriseDto.enterpriseLogo" mode="aspectFill" class="head-logo"></image>
<view class="user-name">湖北知音动漫有限公司</view> <view class="user-name">{{item.enterpriseName}}</view>
</view> </view>
</view> </view>
@ -67,48 +45,49 @@
</view> </view>
<LoadStatus :loadStatus="loadStatus"></LoadStatus> <LoadStatus :loadStatus="loadStatus"></LoadStatus>
</view> </view>
<view class="company-box" v-if="active == 2"> <!-- 资源列表 -->
<view class="personal-list"> <view class="company-box" v-if="active == 1">
<view :class="'tips-item' + (item.enterpriseType == 2 ? ' bg2' : '' )"> <!-- <view v-for="(item, index) in list" :key="index" @tap="toResourDetail" :data-id="item.id"> -->
{{item.enterpriseType == 1 ? '企业' : '个人'}} <!-- <view class="personal-list" v-if="item.enterpriseType == 1">
</view> <view :class="tips-item">个人</view>
<view class="acea-row row-column-between info-box"> <view class="acea-row row-column-between info-box">
<view class="user-info acea-row row-middle"> <view class="user-info acea-row row-middle">
<image src="../../../static/images/business-img1.png" mode="" class="head-img"></image> <image src="../../../static/images/business-img1.png" mode="" class="head-img"></image>
<view class="user-name">大老虎</view> <view class="user-name">大老虎</view>
<view class="user-address">武汉</view> <view class="user-address">武汉</view>
<view class="user-price">20,000</view> <view class="user-price">{{item.totalMoney}}</view>
</view> </view>
<view class="supply-con">李先生需要景区方面资源洽谈相关合作</view> <view class="supply-con">李先生需要景区方面资源洽谈相关合作</view>
<view class="category-box acea-row">
<view class="tag-item-b tag">商务合作</view>
<view class="tag-item-y tag">场地租赁</view>
</view>
<view class="time-end">2021.8.30截止报名</view>
</view>
<view class="todetails">查看详情</view>
</view>
<view class="enterprise-list">
<view :class="'tips-item' + (item.enterpriseType == 2 ? ' bg2' : '' )">
{{item.enterpriseType == 1 ? '企业' : '个人'}}
</view>
<view class="enterprise-con acea-row">
<image src="../../../static/images/home/menu6.png" class="enterprise-img"></image>
<view class="content-right acea-row row-column-between">
<view>APP开发平台搭建外卖小程序返现H5定制一站式解决</view>
<view class="category-box acea-row"> <view class="category-box acea-row">
<view class="tag-item-b tag">商务合作</view> <view class="tag-item-b tag">商务合作</view>
<view class="tag-item-y tag">场地租赁</view> <view class="tag-item-y tag">场地租赁</view>
</view> </view>
<view class="e-price">20,000</view> <view class="time-end">2021.8.30截止报名</view>
</view> </view>
<view class="todetails">查看详情</view>
</view> -->
<view class="enterprise-list" v-for="(item, index) in list" :key="index" @tap="toResourDetail" :data-id="item.id">
<view :class="'tips-item' + (item.enterpriseType == 2 ? ' bg2' : '' )">
{{item.enterpriseType == 1 ? '企业' : '个人'}}
</view>
<view class="enterprise-con acea-row">
<image :src="item.resourceImgs[0]" class="enterprise-img"></image>
<view class="content-right acea-row row-column-between">
<view class="line2">{{item.title}}</view>
<view class="category-box acea-row">
<view class="tag-item-b tag">{{item.cname}}</view>
<!-- <view class="tag-item-y tag">场地租赁</view> -->
</view>
<view class="e-price">{{item.totalMoney}}</view>
</view>
</view>
<view class="enterprise-info acea-row row-middle mt20">
<image :src="item.enterpriseDto.enterpriseLogo" mode="" class="head-logo"></image>
<view class="user-name">{{item.enterpriseName}}</view>
</view>
<view class="todetails">查看详情</view>
</view> </view>
<view class="enterprise-info acea-row row-middle mt20"> <!-- </view> -->
<image src="../../../static/images/cart.png" mode="" class="head-logo"></image>
<view class="user-name">湖北知音动漫有限公司</view>
</view>
<view class="todetails">查看详情</view>
</view>
<LoadStatus :loadStatus="loadStatus"></LoadStatus> <LoadStatus :loadStatus="loadStatus"></LoadStatus>
</view> </view>
</view> </view>
@ -282,6 +261,9 @@
</script> </script>
<style lang="less"> <style lang="less">
image{
border-radius: 8rpx;
}
.supplyHall-page { .supplyHall-page {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;

Loading…
Cancel
Save