Browse Source

发布供应需求类型,供应广场筛选

master
杨豪 3 years ago
parent
commit
8045547ec6
  1. 4
      pages/demandHall/companyDetail/index.wxml
  2. 57
      pages/demandHall/index.js
  3. 6
      pages/demandHall/index.wxml
  4. 33
      pages/user/editNeeds/index.js
  5. 33
      pages/user/editNeeds/index.wxml
  6. 16
      pages/user/editNeeds/index.wxss
  7. 134
      project.private.config.json

4
pages/demandHall/companyDetail/index.wxml

@ -54,11 +54,11 @@
</view>
<view class="info-item acea-row-nowrap">
<view class="">法定代表</view>
<view class="colG">张三</view>
<view class="colG">{{detail.legalPersonName}}</view>
</view>
<view class="info-item acea-row-nowrap">
<view class="">企业规模</view>
<view class="colG">300人</view>
<view class="colG">{{detail.enterpriseScale}}人</view>
</view>
<view class="info-item acea-row-nowrap">
<view class="">经营范围</view>

57
pages/demandHall/index.js

@ -15,6 +15,8 @@ Page({
page: 1,
loading: true, //是否加载更多
cagetoryList: [] , // 分类列表
cName:'', //筛选企业/个人
resourceCagetoryId: '' //筛选分类
},
topTabClick(e){
this.setData({
@ -28,10 +30,15 @@ Page({
},
tabClick(e){
this.setData({
tabActive: e.currentTarget.dataset.i
tabActive: e.currentTarget.dataset.i,
loading: true,
page: 1,
size: 10
})
if(e.currentTarget.dataset.i == 2){
this.getCompanyList()
} else{
this.getPageData()
}
},
showDialog(){
@ -39,11 +46,7 @@ Page({
showScreenDialog: true
})
},
finishClick(){
this.setData({
showScreenDialog: false
})
},
toResourceDetail(e){
let id = e.currentTarget.dataset.id;
wx.navigateTo({
@ -67,7 +70,7 @@ Page({
*/
onLoad: function (options) {
app.editTabbar()
this.getPageData()
// this.getPageData()
this.getCagetoryList()
},
getCagetoryList(){
@ -83,7 +86,26 @@ Page({
let item = e.currentTarget.dataset.item
let i = e.currentTarget.dataset.i
this.setData({
cagetoryActive: i
cagetoryActive: i,
resourceCagetoryId: item.id
})
},
businessChange(e){
let type = e.currentTarget.dataset.type
this.setData({cName: type})
},
finishClick(){
this.setData({loading: true,page: 1, size: 10})
this.getPageData()
this.setData({
showScreenDialog: false
})
},
resetClick(){
this.setData({
cName: '',
cagetoryActive: null,
resourceCagetoryId:''
})
},
getPageData(){
@ -91,7 +113,9 @@ Page({
app.http('post','Resources/listResources',{
resourceType: this.data.active,
page: this.data.page,
pagesize:this.data.pagesize
pagesize:this.data.pagesize,
resourceCagetoryId:this.data.resourceCagetoryId,
cName: this.data.cName,
}).then((res)=>{
if(res.data.success){
if(res.data.data.content.length < this.data.pagesize){
@ -99,9 +123,16 @@ Page({
loading: false
})
}
this.setData({
list: this.data.list.concat(res.data.data.content)
})
if(this.data.page > 1){
this.setData({
list: this.data.list.concat(res.data.data.content)
})
} else{
this.setData({
list: res.data.data.content
})
}
}
})
}
@ -129,7 +160,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getPageData()
},
/**

6
pages/demandHall/index.wxml

@ -180,12 +180,12 @@
<view class="screen-item">
<view class="screen-title">商家身份<text class="fz20">(所有商家均实名认证)</text></view>
<view class="acea-row">
<view class="item" bindtap="">个人认证</view>
<view class="item">企业认证</view>
<view class="item {{cName == 2 ? 'item-active' : ''}}" bindtap="businessChange" data-type="2">个人认证</view>
<view class="item {{cName == 1 ? 'item-active' : ''}}" bindtap="businessChange" data-type="1">企业认证</view>
</view>
</view>
<view class="submit-box acea-row">
<view class="btn reset">重置</view>
<view class="btn reset" bindtap="resetClick">重置</view>
<view class="btn finish" bindtap="finishClick">完成</view>
</view>
</view>

33
pages/user/editNeeds/index.js

@ -16,8 +16,9 @@ Page({
resourceStartTime:'',
resourceEndTime: '',
},
typeArr:['供应' , '需求'],
active: 1
active: 1,
resourcesList: [],
resourcesIdx: null
},
tabClick(e){
let i = e.currentTarget.dataset.i;
@ -63,16 +64,35 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
if(options.id){
this.getDetail()
}
if(options.type){
this.setData({
['form.resourceType']: Number(options.type) - 1
['form.resourceType']: Number(options.type)
})
}
this.initValidate()//验证规则函数
this.getResourcesCagetory()
},
//获取供应、需求类型
getResourcesCagetory(){
app.http('GET','ResourcesCagetory/listResourcesCagetory').then((res)=>{
// console.log(res)
if(res.data.success){
this.setData({
resourcesList: res.data.data
})
}
})
},
resourcesChange(e){
// console.log(e)
let idx = Number(e.detail.value)
this.setData({
resourcesIdx: idx,
['form.resourceCagetoryId']: this.data.resourcesList[idx].id
})
},
// 重新发布,获取提交数据
getDetail(){
@ -101,7 +121,7 @@ Page({
required: '请填写标题',
},
resourceCagetoryId: {
required: '请填写需求类型',
required: '请选择需求类型',
},
detailedDescription: {
required: '请填写内容',
@ -128,7 +148,8 @@ Page({
let that = this
let type = e.detail.target.dataset.type
let params = e.detail.value
params.resourceType = that.data.form.resourceType + 1
params.resourceType = that.data.form.resourceType
params.resourceCagetoryId = that.data.form.resourceCagetoryId
params.resourceImgs = that.data.form.resourceImgs
params.capital = that.data.form.capital
if(type == 0){

33
pages/user/editNeeds/index.wxml

@ -4,29 +4,36 @@
<form catchsubmit="submit">
<view class="form-item chose-box acea-row row-between">
<view class="label">我是供应/需求</view>
<view class="pick-box">
<picker bindchange="bindPickerChange" value="{{form.resourceType}}" name="resourceType" range="{{typeArr}}">
<view class="">
{{form.resourceType == 1 ? '供应' : '需求'}}
<!-- <picker bindchange="bindPickerChange" value="{{form.resourceType}}" name="resourceType" range="{{typeArr}}">
<view class="picker">{{typeArr[form.resourceType]}}</view>
</picker>
</picker> -->
</view>
</view>
<view class="form-item">
<view class="label">供应/需求标题<text class="red">*</text></view>
<view class="label">{{form.resourceType == 1 ? '供应' : '需求'}}标题<text class="red">*</text></view>
<view class="inp-box">
<input type="text" placeholder="我供应/需求..." value="{{form.title}}" name="title" />
<input type="text" placeholder="我{{form.resourceType == 1 ? '供应' : '需求'}}..." value="{{form.title}}" name="title" />
</view>
</view>
<view class="form-item">
<view class="label">供应/需求类型<text class="red">*</text></view>
<view class="inp-box"><input type="text" placeholder="我供应/需求..." value="{{form.resourceCagetoryId}}" name="resourceCagetoryId" /></view>
<view class="label">{{form.resourceType == 1 ? '供应' : '需求'}}类型<text class="red">*</text></view>
<!-- <view class="inp-box"><input type="text" placeholder="我供应/需求..." value="{{form.resourceCagetoryId}}" name="resourceCagetoryId" /></view> -->
<view class="inp-box acea-row-nowrap row-between row-middle">
<picker class="pick-box" bindchange="resourcesChange" value="{{idx}}" range="{{resourcesList}}" range-key="{{'cagetoryName'}}" mode="selector">
<view class="picker">{{resourcesList[resourcesIdx].cagetoryName || '请选择'}}</view>
</picker>
<image src="../../../images/home/arrow-r.png" class="arrow-d"></image>
</view>
</view>
<view class="form-item">
<view class="label acea-row row-between">
<view>供应/需求内容<text class="red">*</text></view>
<view class="colO">看看别人怎么写></view>
<view>{{form.resourceType == 1 ? '供应' : '需求'}}内容<text class="red">*</text></view>
<!-- <view class="colO">看看别人怎么写></view> -->
</view>
<view class="area-box">
<textarea placeholder="请详细描述您的供应/需求" value="{{form.detailedDescription}}" name="detailedDescription"></textarea>
<textarea placeholder="请详细描述您的{{form.resourceType == 1 ? '供应' : '需求'}}" value="{{form.detailedDescription}}" name="detailedDescription"></textarea>
</view>
</view>
<view class="form-item">
@ -38,7 +45,7 @@
</view>
<view class="form-item">
<view class="label acea-row row-between">
<view>供应/需求预算<text class="red">*</text></view>
<view>{{form.resourceType == 1 ? '供应' : '需求'}}预算<text class="red">*</text></view>
<view class="tab-box acea-row ">
<view class="tab-item {{active == 1 ? 'tab-a' : ''}}" data-i="1" bindtap="tabClick">明确预算</view>
<view class="tab-item {{active == 2 ? 'tab-a' : ''}}" data-i="2" bindtap="tabClick">价格可议</view>
@ -58,14 +65,14 @@
<picker bindchange="startTimeChange" value="{{form.resourceStartTime}}" name="resourceStartTime" mode="date">
<view class="picker">{{form.resourceStartTime || '请选择'}}</view>
</picker>
<image src="../../../images/home/arrow-r.png"></image>
<image src="../../../images/home/arrow-r.png" class="arrow-d"></image>
</view>
<text class="m14">至</text>
<view class="timepick-box">
<picker bindchange="endTimeChange" value="{{form.resourceEndTime}}" name="resourceEndTime" mode="date">
<view class="picker">{{form.resourceEndTime || '请选择'}}</view>
</picker>
<image src="../../../images/home/arrow-r.png"></image>
<image src="../../../images/home/arrow-r.png" class="arrow-d"></image>
</view>
</view>
</view>

16
pages/user/editNeeds/index.wxss

@ -8,9 +8,7 @@
.form-item{
margin-bottom: 60rpx;
}
.pick-box{
color: #666;
}
.red{
color: #FF0000;
}
@ -25,6 +23,16 @@
color: #666;
margin-top: 36rpx;
}
.pick-box{
width: 92%;
background: #eee;
box-sizing: border-box;
/* padding: 10rpx 22rpx; */
}
.pick-box .picker{
width: 100%;
color: #666666;
}
.inp-box input{
width: 90%;
height: 100%;
@ -83,7 +91,7 @@
.timepick-box picker{
width: 100%;
}
.timepick-box image{
.arrow-d{
width: 14rpx;
height: 24rpx;
transform: rotate(90deg);

134
project.private.config.json

@ -12,142 +12,10 @@
},
"miniprogram": {
"list": [
{
"name": "pages/user/personalData/index",
"pathName": "pages/user/personalData/index",
"query": "",
"scene": null
},
{
"name": "pages/user/completeData/index",
"pathName": "pages/user/completeData/index",
"query": "",
"scene": null
},
{
"name": "pages/user/completeData/index",
"pathName": "pages/user/completeData/index",
"query": "",
"scene": null
},
{
"name": "pages/user/agreement/index",
"pathName": "pages/user/agreement/index",
"query": "id=101",
"scene": null
},
{
"name": "pages/user/agreement/index",
"pathName": "pages/user/agreement/index",
"query": "",
"scene": null
},
{
"name": "pages/user/incomeDetail/index",
"pathName": "pages/user/incomeDetail/index",
"query": "",
"scene": null
},
{
"name": "pages/user/index",
"pathName": "pages/user/index",
"query": "",
"scene": null
},
{
"name": "pages/demandHall/contact/index",
"pathName": "pages/demandHall/contact/index",
"query": "",
"scene": null
},
{
"name": "pages/release/personAuth/index",
"pathName": "pages/release/personAuth/index",
"query": "",
"scene": null
},
{
"name": "pages/release/companyAuth/index",
"pathName": "pages/release/companyAuth/index",
"query": "",
"scene": null
},
{
"name": "pages/release/perfectCompanyInfo/index",
"pathName": "pages/release/perfectCompanyInfo/index",
"query": "",
"scene": null
},
{
"name": "pages/release/perfectPersonInfo/index",
"pathName": "pages/release/perfectPersonInfo/index",
"query": "",
"scene": null
},
{
"name": "pages/user/editNeeds/index",
"pathName": "pages/user/editNeeds/index",
"query": "",
"scene": null
},
{
"name": "pages/demandHall/index",
"pathName": "pages/demandHall/index",
"query": "",
"scene": null
},
{
"name": "pages/demandHall/resourcesDetail/index",
"pathName": "pages/demandHall/resourcesDetail/index",
"query": "id=1",
"scene": null
},
{
"name": "pages/demandHall/needsDetail/index",
"pathName": "pages/demandHall/needsDetail/index",
"query": "id=2",
"scene": null
},
{
"name": "pages/demandHall/needsDetail/index",
"pathName": "pages/demandHall/needsDetail/index",
"query": "id=9",
"scene": null
},
{
"name": "pages/demandHall/createProject/index",
"pathName": "pages/demandHall/createProject/index",
"query": "item=%257B%2522resourcesDto%2522%253A%257B%2522id%2522%253A1%252C%2522resourceType%2522%253A1%252C%2522createUserId%2522%253A823%252C%2522title%2522%253A%2522%25E5%2590%2584%25E7%25A7%258D%25E7%25B1%25BB%25E5%259E%258B%25E7%25BD%2591%25E7%25AB%2599%25E3%2580%2581%25E5%25B0%258F%25E7%25A8%258B%25E5%25BA%258F%25E5%25BC%2580%25E5%258F%2591%2522%252C%2522resourceCagetoryId%2522%253A2%252C%2522capital%2522%253A%252230000%2522%252C%2522detailedDescription%2522%253A%2522%25E5%2590%2584%25E7%25A7%258D%25E7%25B1%25BB%25E5%259E%258B%25E7%25BD%2591%25E7%25AB%2599%25EF%25BC%258C%25E5%2590%2584%25E5%25B9%25B3%25E5%258F%25B0%25E5%25B0%258F%25E7%25A8%258B%25E5%25BA%258F%25E5%25BC%2580%25E5%258F%2591%25EF%25BC%258C%25E6%2595%2588%25E7%258E%2587%25E5%25BF%25AB%25EF%25BC%258C%25E5%258A%259F%25E8%2583%25BD%25E5%2585%25A8%25EF%25BC%258C%25E6%2580%25A7%25E4%25BB%25B7%25E6%25AF%2594%25E9%25AB%2598%2522%252C%2522createTime%2522%253A%25222021-08-31%252013%253A47%253A21%2522%252C%2522updateTime%2522%253Anull%252C%2522isDel%2522%253A0%252C%2522resourceStartTime%2522%253A%25222021-08-31%2522%252C%2522resourceEndTime%2522%253A%25222022-08-31%2522%252C%2522resourceAuditState%2522%253A2%252C%2522resourceState%2522%253A1%252C%2522resourceImgs%2522%253Anull%252C%2522enterpriseName%2522%253Anull%252C%2522enterpriseAddress%2522%253Anull%252C%2522enterprise%2522%253Anull%252C%2522questionsDtos%2522%253Anull%252C%2522user%2522%253Anull%257D%252C%2522communicateDtoList%2522%253A%255B%257B%2522id%2522%253A2%252C%2522type%2522%253Anull%252C%2522resourceId%2522%253A1%252C%2522demandId%2522%253A2%252C%2522content%2522%253Anull%252C%2522initiatorId%2522%253A823%252C%2522createTime%2522%253A%25222021-09-01%252015%253A44%253A33%2522%252C%2522updateTime%2522%253Anull%252C%2522isDel%2522%253A%25220%2522%257D%252C%257B%2522id%2522%253A7%252C%2522type%2522%253Anull%252C%2522resourceId%2522%253A1%252C%2522demandId%2522%253Anull%252C%2522content%2522%253A%2522%25E6%2588%2591%25E6%2583%25B3%25E5%25BC%2580%25E5%258F%2591%25E4%25B8%2580%25E6%25AC%25BE%25E5%25B0%258F%25E7%25A8%258B%25E5%25BA%258F%25EF%25BC%258C%2520%25E5%25B8%258C%25E6%259C%259B%25E8%2583%25BD%25E5%25A4%259F%25E5%25B0%25BD%25E5%25BF%25AB%25E4%25B8%258E%25E6%2582%25A8%25E6%25B2%259F%25E9%2580%259A%2522%252C%2522initiatorId%2522%253A823%252C%2522createTime%2522%253A%25222021-09-02%252010%253A13%253A57%2522%252C%2522updateTime%2522%253Anull%252C%2522isDel%2522%253A%25220%2522%257D%255D%252C%2522open%2522%253Atrue%257D",
"scene": null
},
{
"name": "pages/demandHall/createProject/index",
"pathName": "pages/demandHall/createProject/index",
"query": "id=7",
"scene": null
},
{
"name": "pages/user/needsOrder/index",
"pathName": "pages/user/needsOrder/index",
"query": "",
"scene": null
},
{
"name": "pages/demandHall/applyDetail/index",
"pathName": "pages/demandHall/applyDetail/index",
"query": "data=%257B%2522resourceInfo%2522%253A%257B%2522resourceId%2522%253A12%252C%2522name%2522%253Anull%252C%2522content%2522%253A%2522%25E8%258C%2583%25E5%25BE%25B7%25E8%2590%25A8%25E8%258C%2583%25E5%25BE%25B7%25E8%2590%25A8%25E5%258F%2591%25E7%2594%259F%25E8%258C%2583%25E5%25BE%25B7%25E8%2590%25A8%25E8%258C%2583%25E5%25BE%25B7%25E8%2590%25A8%2522%252C%2522logo%2522%253Anull%252C%2522budget%2522%253Anull%257D%252C%2522partnerInfos%2522%253A%255B%257B%2522communicateId%2522%253A12%252C%2522comminuteState%2522%253A1%252C%2522createTime%2522%253A%25222021-09-07%2522%252C%2522name%2522%253A%2522%25E6%25A5%259A%25E8%25B1%25A1%25E7%25A7%2591%25E6%258A%2580%25E6%259C%2589%25E9%2599%2590%25E5%2585%25AC%25E5%258F%25B8%2522%252C%2522title%2522%253A%2522%25E6%259B%25B4%25E5%25BF%25AB%25EF%25BC%258C%25E6%259B%25B4%25E9%25AB%2598%25EF%25BC%258C%25E6%259B%25B4%25E5%25BC%25BA%2522%252C%2522logo%2522%253A%2522https%253A%252F%252Fqiniu.upload.gznl.top%252Fbc961e15-5030-4580-a273-1cdafe883520.png%2522%252C%2522phone%2522%253A%252207220324234%2522%257D%255D%252C%2522open%2522%253Atrue%257D",
"scene": null
},
{
"name": "pages/index/index",
"pathName": "pages/index/index",
"query": "",
"scene": null
},
{
"name": "pages/index/index",
"pathName": "pages/index/index",
"query": "",
"query": "type=1",
"scene": null
}
]

Loading…
Cancel
Save