Browse Source

上传代码

master
杨豪 3 years ago
parent
commit
0622aa2e22
  1. 118
      app.js
  2. 38
      app.json
  3. 30
      app.wxss
  4. BIN
      images/arrow-d.png
  5. BIN
      images/home/call.png
  6. BIN
      images/home/progress.png
  7. BIN
      images/home/组 221@2x.png
  8. BIN
      images/home/组 668@2x.png
  9. BIN
      images/no-needs.png
  10. BIN
      images/no-order.png
  11. BIN
      images/user/header.png
  12. 140
      pages/demandHall/applyDetail/index.js
  13. 6
      pages/demandHall/applyDetail/index.json
  14. 66
      pages/demandHall/applyDetail/index.wxml
  15. 173
      pages/demandHall/applyDetail/index.wxss
  16. 39
      pages/demandHall/companyDetail/index.js
  17. 69
      pages/demandHall/companyDetail/index.wxml
  18. 8
      pages/demandHall/companyDetail/index.wxss
  19. 254
      pages/demandHall/createProject/index.js
  20. 4
      pages/demandHall/createProject/index.json
  21. 111
      pages/demandHall/createProject/index.wxml
  22. 188
      pages/demandHall/createProject/index.wxss
  23. 105
      pages/demandHall/index.js
  24. 98
      pages/demandHall/index.wxml
  25. 22
      pages/demandHall/index.wxss
  26. 119
      pages/demandHall/needsContact/index.js
  27. 4
      pages/demandHall/needsContact/index.json
  28. 57
      pages/demandHall/needsContact/index.wxml
  29. 175
      pages/demandHall/needsContact/index.wxss
  30. 31
      pages/demandHall/needsDetail/index.js
  31. 48
      pages/demandHall/needsDetail/index.wxml
  32. 59
      pages/demandHall/needsDetail/index.wxss
  33. 99
      pages/demandHall/platform/index.js
  34. 4
      pages/demandHall/platform/index.json
  35. 10
      pages/demandHall/platform/index.wxml
  36. 36
      pages/demandHall/platform/index.wxss
  37. 126
      pages/demandHall/resourcesContact/index.js
  38. 4
      pages/demandHall/resourcesContact/index.json
  39. 49
      pages/demandHall/resourcesContact/index.wxml
  40. 171
      pages/demandHall/resourcesContact/index.wxss
  41. 38
      pages/demandHall/resourcesDetail/index.js
  42. 29
      pages/demandHall/resourcesDetail/index.wxml
  43. 31
      pages/demandHall/resourcesDetail/index.wxss
  44. 90
      pages/index/index.js
  45. 48
      pages/index/index.wxml
  46. 17
      pages/index/index.wxss
  47. 172
      pages/login/index.js
  48. 3
      pages/login/index.json
  49. 17
      pages/login/index.wxml
  50. 46
      pages/login/index.wxss
  51. 228
      pages/release/companyAuth/index.js
  52. 47
      pages/release/companyAuth/index.wxml
  53. 122
      pages/release/index.js
  54. 16
      pages/release/index.wxml
  55. 21
      pages/release/index.wxss
  56. 146
      pages/release/perfectCompanyInfo/index.js
  57. 40
      pages/release/perfectCompanyInfo/index.wxml
  58. 21
      pages/release/perfectCompanyInfo/index.wxss
  59. 132
      pages/release/perfectPersonInfo/index.js
  60. 104
      pages/release/perfectPersonInfo/index.wxml
  61. 18
      pages/release/perfectPersonInfo/index.wxss
  62. 106
      pages/release/personAuth/index.js
  63. 17
      pages/release/personAuth/index.wxml
  64. 8
      pages/user/agreement/index.js
  65. 33
      pages/user/agreement/index.wxml
  66. 220
      pages/user/editNeeds/index.js
  67. 4
      pages/user/editNeeds/index.json
  68. 77
      pages/user/editNeeds/index.wxml
  69. 105
      pages/user/editNeeds/index.wxss
  70. 48
      pages/user/index.js
  71. 48
      pages/user/index.wxml
  72. 10
      pages/user/index.wxss
  73. 145
      pages/user/needsManage/index.js
  74. 4
      pages/user/needsManage/index.json
  75. 74
      pages/user/needsManage/index.wxml
  76. 116
      pages/user/needsManage/index.wxss
  77. 240
      pages/user/needsOrder/index.js
  78. 4
      pages/user/needsOrder/index.json
  79. 108
      pages/user/needsOrder/index.wxml
  80. 67
      pages/user/needsOrder/index.wxss
  81. 143
      pages/user/resourcesManage/index.js
  82. 5
      pages/user/resourcesManage/index.json
  83. 70
      pages/user/resourcesManage/index.wxml
  84. 113
      pages/user/resourcesManage/index.wxss
  85. 180
      pages/user/resourcesOrder/index.js
  86. 4
      pages/user/resourcesOrder/index.json
  87. 170
      pages/user/resourcesOrder/index.wxml
  88. 235
      pages/user/resourcesOrder/index.wxss
  89. 68
      pages/webview/index.js
  90. 3
      pages/webview/index.json
  91. 2
      pages/webview/index.wxml
  92. 1
      pages/webview/index.wxss
  93. 3
      project.config.json
  94. 96
      project.private.config.json
  95. 0
      tabbarComponent/icon/home.png
  96. BIN
      tabbarComponent/icon/icon_release.png
  97. BIN
      tabbarComponent/icon/icon_release2.png
  98. 0
      tabbarComponent/icon/tab2-a.png
  99. 0
      tabbarComponent/icon/tab2.png
  100. 0
      tabbarComponent/icon/tab3-a.png
  101. Some files were not shown because too many files have changed in this diff Show More

118
app.js

@ -4,11 +4,52 @@ App({
var that = this;
//获取设备信息
this.setMenuHeight()
this.autoUpdate()
},
autoUpdate:function(){
console.log(new Date())
var self=this
// 获取小程序更新机制兼容
if (wx.canIUse('getUpdateManager')) {
const updateManager = wx.getUpdateManager()
//1. 检查小程序是否有新版本发布
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
if (res.hasUpdate) {
//2. 小程序有新版本,则静默下载新版本,做好更新准备
updateManager.onUpdateReady(function () {
console.log(new Date())
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function (res) {
if (res.confirm) {
//3. 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
// 新的版本下载失败
wx.showModal({
title: '已经有新版本了哟~',
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
})
})
}
})
} else {
// 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
wx.showModal({
title: '提示',
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
},
onShow(e){
//隐藏系统tabbar
wx.hideTabBar();
var query = {};
if(e.query.q){
//通过扫码进来获取二维码上的参数并存入storage
@ -61,44 +102,26 @@ App({
tabbar: tabbar
});
},
getToken(){
// console.log('getToken')
var tokentime = wx.getStorageSync('tokentime') || '';//过期时间
var timestamp = Date.parse(new Date());// 当前时间
var expiration = timestamp + 60000 * 60 * 12; //缓存12小时
var token = wx.getStorageSync('token') || '';
this.login(expiration);
},
login(expiration){
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
// console.log('code:',res.code)
this.http('GET','wechat/auth',{code : res.code,spread:0,login_type:0}).then(
response =>{
if(response.data.isSuccess){
wx.setStorageSync('token', 'Bearer '+ response.data.data.token);
wx.setStorageSync('uid', response.data.data.userId);
wx.setStorageSync('tokentime', expiration);
} else{
wx.showToast({
title: response.data.msg,
icon : 'none'
})
}
}
)
}
})
},
getInfo(){
this.http('get','userinfo').then((res)=>{
if(res.data.success){
// console.log(res.data)
wx.setStorageSync('userInfo',res.data.data)
var pages = getCurrentPages().pop();//当前页面
if (pages.getUser){
pages.getUser();
}
} else{
wx.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
})
setTimeout(()=>{
wx.navigateTo({
url: '/pages/login/index',
})
},2000)
}
})
},
@ -120,10 +143,13 @@ App({
data: params || {}, //请求参数
success: res => {
wx.hideLoading();
console.log(res)
//判断token是否过期 res.data.code == 40001
if(!res.data.isSuccess && res.data.code == 40001){
console.log('token过期')
that.getToken()
if(!res.data.success && res.data.status == 401){
console.log('登陆失效')
wx.navigateTo({
url: '/pages/login/index',
})
}
resolve(res);
//成功执行方法,参数值为res.data,直接将返回的数据传入
@ -142,8 +168,8 @@ App({
)
},
globalData: {
// baseURL : 'http://192.168.0.114:8092/api/',
baseURL : 'https://www.cyjyyjy.com:8093/api/',
baseURL : 'http://192.168.0.114:8092/api/',
// baseURL : 'https://www.cyjyyjy.com:8093/api/',
userInfo: null,
navHeight : 0,
navTopHeight: 0,
@ -155,18 +181,18 @@ App({
tabBar: {
"backgroundColor": "#ffffff",
"color": "#979795",
"selectedColor": "#1c1c1b",
"selectedColor": "#FF6F34",
"list": [
{
"pagePath": "/pages/index/index",
"iconPath": "icon/icon_home.png",
"selectedIconPath": "icon/icon_home_HL.png",
"iconPath": "icon/home.png",
"selectedIconPath": "icon/home-a.png",
"text": "首页"
},
{
"pagePath": "/pages/demandHall/index",
"iconPath": "icon/icon_home.png",
"selectedIconPath": "icon/icon_home_HL.png",
"iconPath": "icon/tab2.png",
"selectedIconPath": "icon/tab2-a.png",
"text": "供需大厅"
},
{
@ -177,14 +203,14 @@ App({
},
{
"pagePath": "/pages/life/index",
"iconPath": "icon/icon_mine.png",
"selectedIconPath": "icon/icon_mine_HL.png",
"text": "购物车"
"iconPath": "icon/tab3.png",
"selectedIconPath": "icon/tab3-a.png",
"text": "生活"
},
{
"pagePath": "/pages/user/index",
"iconPath": "icon/icon_mine.png",
"selectedIconPath": "icon/icon_mine_HL.png",
"iconPath": "icon/tab4.png",
"selectedIconPath": "icon/tab4-a.png",
"text": "我的"
}
]

38
app.json

@ -1,23 +1,34 @@
{
"pages":[
"pages/index/index",
"pages/user/index",
"pages/login/index",
"pages/webview/index",
"pages/demandHall/createProject/index",
"pages/demandHall/needsContact/index",
"pages/user/needsOrder/index",
"pages/user/resourcesOrder/index",
"pages/user/needsManage/index",
"pages/user/resourcesManage/index",
"pages/user/editNeeds/index",
"pages/demandHall/needsDetail/index",
"pages/demandHall/resourcesDetail/index",
"pages/demandHall/companyDetail/index",
"pages/demandHall/resourcesContact/index",
"pages/demandHall/applyDetail/index",
"pages/demandHall/platform/index",
"pages/demandHall/index",
"pages/release/index",
"pages/release/personAuth/index",
"pages/release/companyAuth/index",
"pages/release/perfectPersonInfo/index",
"pages/release/perfectCompanyInfo/index",
"pages/index/index",
"pages/life/index",
"pages/user/mine/index",
"pages/user/agreement/index",
"pages/user/incomeDetail/index",
"pages/user/profession/index",
"pages/user/completeData/index",
"pages/user/personalData/index",
"pages/user/industry/index"
@ -36,29 +47,34 @@
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "tabbarComponent/icon/icon_home.png",
"selectedIconPath": "tabbarComponent/icon/icon_home_HL.png"
"iconPath": "tabbarComponent/icon/home.png",
"selectedIconPath": "tabbarComponent/icon/home-a.png"
},
{
"pagePath": "pages/demandHall/index",
"text": "供需大厅",
"iconPath": "tabbarComponent/icon/icon_home.png",
"selectedIconPath": "tabbarComponent/icon/icon_home_HL.png"
"iconPath": "tabbarComponent/icon/tab2.png",
"selectedIconPath": "tabbarComponent/icon/tab2-a.png"
},
{
"pagePath": "pages/life/index",
"text": "生活",
"iconPath": "tabbarComponent/icon/icon_mine.png",
"selectedIconPath": "tabbarComponent/icon/icon_mine_HL.png"
"iconPath": "tabbarComponent/icon/tab3.png",
"selectedIconPath": "tabbarComponent/icon/tab3-a.png"
},
{
"pagePath": "pages/user/index",
"text": "我的",
"iconPath": "tabbarComponent/icon/icon_mine.png",
"selectedIconPath": "tabbarComponent/icon/icon_mine_HL.png"
"iconPath": "tabbarComponent/icon/tab4.png",
"selectedIconPath": "tabbarComponent/icon/tab4-a.png"
}
]
},
"style": "v2",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"sitemapLocation": "sitemap.json"
}

30
app.wxss

@ -9,7 +9,10 @@ label,
navigator,
image {
-webkit-box-sizing: border-box;
box-sizing: border-box;
box-sizing: border-box;
}
image{
/* border-radius: 8rpx; */
}
/* layout */
.acea-row-nowrap {
@ -121,3 +124,28 @@ radio .wx-radio-input.wx-radio-input-checked::before {
transform: translate(-50%, -50%) scale(1);
-webkit-transform: translate(-50%, -50%) scale(1);
}
.no-list{
display: flex;
flex-direction: column;
align-items: center;
font-size: 46rpx;
color: #D8D8D8;
font-weight: 500;
padding-top: 20%;
}
.no-list image{
width: 536rpx;
height: 490rpx;
}
.no-list .to-btn{
width: 458rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: linear-gradient(134deg, #FFA782 0%, #FF6D31 100%);
border-radius: 44rpx;
font-size: 40rpx;
color: #fff;
margin-top: 160rpx;
}

BIN
images/arrow-d.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

BIN
images/home/call.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/home/progress.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

BIN
images/home/组 221@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/home/组 668@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/no-needs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
images/no-order.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
images/user/header.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

140
pages/demandHall/applyDetail/index.js

@ -0,0 +1,140 @@
// pages/demandHall/applyDetail/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
active: 0,
detail: [],
userList: [],
communicateId: '',
content: null
},
itemClick(e){
let i = e.currentTarget.dataset.i
let id = e.currentTarget.dataset.id
this.setData({
active: i,
communicateId: id
})
this.getApplyDetail();
},
getApplyDetail(){
app.http('get','Communicate/getCommunicateInfo',{communicateId: this.data.communicateId}).then((res)=>{
if(res.data.success){
this.setData({
content: res.data.data
})
}
})
},
getUserList(){
// console.log(this.data.detail)
app.http('get','Communicate/communicateHeadList',{resourceId: this.data.detail.resourceInfo.resourceId}).then((res)=>{
if(res.data.success){
this.setData({
userList: res.data.data,
communicateId: res.data.data[0].communicateId
})
this.getApplyDetail();
}
})
},
toNeedDetail(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/demandHall/needsDetail/index?id=' + id,
})
},
//查看立项书
toCreateProject(){
let content = this.data.content
wx.navigateTo({
url: '/pages/demandHall/createProject/index?state=' + content.comminuteState+ '&id=' + content.communicateId,
})
},
// 立项
createProject(){
let id = this.data.communicateId
wx.showModal({
title: "提示!",
content: '是否确认发起项目?',
success(res){
if(res.confirm){
wx.navigateTo({
url: '/pages/demandHall/createProject/index?id='+ id,
})
}
}
})
},
call(){
console.log()
wx.makePhoneCall({
phoneNumber: this.data.content.phone,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let data = JSON.parse(decodeURIComponent(options.data));
this.setData({
detail: data
})
// console.log(this.data.detail)
this.getUserList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

6
pages/demandHall/applyDetail/index.json

@ -0,0 +1,6 @@
{
"usingComponents": {},
"navigationBarTitleText": "申请详情",
"navigationBarBackgroundColor": "#FF5100",
"navigationBarTextStyle": "white"
}

66
pages/demandHall/applyDetail/index.wxml

@ -0,0 +1,66 @@
<!--pages/demandHall/applyDetail/index.wxml-->
<view class="applyDetail-page">
<view class="top-box">
<view class="company-card-box acea-row-nowrap">
<image src="{{detail.resourceInfo.logo}}" class="company-logo"></image>
<view class="info">
<view class="company-name line1">{{detail.resourceInfo.name}}</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
</view>
<view class="slogan">{{detail.resourceInfo.content}}</view>
</view>
</view>
</view>
<view class="content-box acea-row">
<view class="content-l">
<scroll-view style="height:100%;" scroll-y="true" scroll-into-view="{{toView}}">
<view class="l-item {{active == index ? 'l-item-a' : ''}}" wx:for="{{userList}}" wx:key="index" bindtap="itemClick" data-i="{{index}}" data-id="{{item.communicateId}}">
<view class="headerImg-box">
<image src="{{item.headImg}}"></image>
</view>
</view>
</scroll-view>
</view>
<view class="content-r">
<view class="copany-info-box">
<view class="c-name">
<text>{{content.name}}</text>
</view>
<view class="apply-word">{{content.demandInfo.content}}</view>
<view class="need-item" wx:if="{{content.demandInfo}}" bindtap="toNeedDetail" data-id="{{content.demandInfo.resourceId}}">
<view class="n-title-box acea-row row-between row-middle">
<view class="word line1">{{content.demandInfo.name}}</view>
<view class="colO">详情</view>
</view>
<view class="n-tags acea-row">
<view class="n-tag-item">场地租赁</view>
</view>
<view class="price-box acea-row row-between row-middle">
<view>需求预算 <text class="colO">{{content.demandInfo.budget}}</text></view>
<view>{{content.createTime}}</view>
</view>
</view>
<view class="need-item" wx:if="{{content.projectListDto != null}}" bindtap="toCreateProject">
<view class="n-title-box acea-row row-between row-middle">
<view class="word line1">{{content.projectListDto.projectName}}</view>
<view class="colO">详情</view>
</view>
<view class="n-tags acea-row">
<view class="n-tag-item">场地租赁</view>
</view>
<view class="price-box acea-row row-between row-middle">
<view class="desc line1">{{content.projectListDto.partner}}</view>
<view>{{content.createTime}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="btn-box acea-row row-right">
<view class="btn-item bgO" bindtap="createProject" wx:if="{{content.comminuteState == 2}}">发起项目</view>
<view class="btn-item bgO" bindtap="call" wx:if="{{content.comminuteState == 2}}">立即沟通</view>
<view class="btn-item" wx:if="{{content.comminuteState == 1}}">忽略</view>
<view class="btn-item" wx:if="{{content.comminuteState == 4}}">项目已取消</view>
</view>
</view>

173
pages/demandHall/applyDetail/index.wxss

@ -0,0 +1,173 @@
/* pages/demandHall/applyDetail/index.wxss */
page{
width: 100%;
height: 100%;
}
.applyDetail-page{
height: 100%;
}
.top-box{
width: 100%;
padding: 40rpx 40rpx 62rpx;
background: linear-gradient(180deg, #FF5100 0%, #FFA782 100%);
}
.company-card-box {
width: 100%;
padding: 30rpx 12rpx;
background: #FFFFFF;
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 12rpx;
}
.info{
width: 70%;
}
.company-logo{
width: 154rpx;
height: 154rpx;
margin-right: 20rpx;
}
.company-name{
font-size: 28rpx;
line-height: 56rpx;
font-weight: 500;
color: #1D1D1D;
}
.slogan{
font-size: 24rpx;
line-height: 34rpx;
color: #666;
margin: 4rpx 0 12rpx;
}
.tags-box{
margin: 6rpx 0 10rpx;
}
.tag-item{
width: 112rpx;
height: 36rpx;
line-height: 34rpx;
text-align: center;
border: 1rpx solid #FFAA00;
color: #FFAA00;
border-radius: 4rpx;
margin-right: 8rpx;
font-size: 24rpx;
}
.content-box{
width: 100%;
height: calc(100% - 490rpx);
overflow: hidden;
}
.content-l{
width: 152rpx;
height: 100%;
padding-left: 22rpx;
background: #EEEEEE;
overflow: hidden;
}
.l-item{
width: 100%;
height: 136rpx;
display: flex;
align-items: center;
justify-content: center;
}
.headerImg-box{
border-radius: 50%;
overflow: hidden;
position: absolute;
}
.headerImg-box image{
width: 92rpx;
height: 92rpx;
}
.l-item-a{
background: #fff;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
}
.content-r{
width: calc(100% - 152rpx);
padding: 46rpx 30rpx;
font-size: 28rpx;
}
.apply-word{
color: #666;
line-height: 44rpx;
margin-top: 24rpx;
}
.btn-box{
width: 100%;
height: 160rpx;
padding-top: 24rpx;
position: absolute;
bottom: 0;
}
.btn-item{
width: 190rpx;
height: 76rpx;
line-height: 76rpx;
text-align: center;
font-size: 32rpx;
color: #fff;
font-weight: 400;
background: #BFBFBF;
border-radius: 12rpx;
margin-right: 16rpx;
}
.bgO{
background: linear-gradient(144deg, #FFA782 0%, #FF5100 100%);
}
.need-item{
width: 100%;
padding: 10rpx 0;
background: #FFFFFF;
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 12rpx;
margin: 32rpx 0;
}
.n-title-box{
padding: 0 26rpx 10rpx;
font-size: 28rpx;
color: #1D1D1D;
margin: 16rpx 0 12rpx;
border-bottom: 2px solid #E2E2E2;
}
.word{
width: 340rpx;
font-size: 28rpx;
}
.colO{
color: #FF5100;
font-size: 500;
}
.n-tags{
padding: 0 26rpx;
margin-bottom: 10rpx;
}
.n-tag-item{
width: 112rpx;
height: 36rpx;
line-height: 34rpx;
text-align: center;
border: 1rpx solid #FFAA00;
color: #FFAA00;
border-radius: 4rpx;
margin-right: 8rpx;
font-size: 24rpx;
}
.bgG{
border: 1rpx solid #3A9EFA;
color: #3A9EFA;
}
.bgR{
border: 1rpx solid #FC9367;
color: #FC9367;
}
.price-box{
color: #707070;
padding: 0 20rpx;
}
.desc{
width: 370rpx;
}

39
pages/demandHall/companyDetail/index.js

@ -1,11 +1,13 @@
// pages/demandHall/companyDetail/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
tabActive: 3,
id: '',
detail: {},
tabActive: 1,
swiperImgUrls: [
'../../../images/home/item-bg.png',
'../../../images/home/company-top-bg.png'
@ -23,13 +25,42 @@ Page({
swiperIndex: e.detail.current,
})
},
toNeedsDetail(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/demandHall/needsDetail/index?id='+ id,
})
},
toResourcesDetail(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/demandHall/resourcesDetail/index?id='+ id,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
id: options.id
})
this.getDetail()
},
getDetail(){
app.http('get','Enterprise/enterpriseInfo',{id:this.data.id}).then((res)=>{
if(res.data.success){
this.setData({
detail: res.data.data
})
}
})
},
toWebview(){
wx.navigateTo({
url: '/pages/webview/index?src='+ this.data.detail.enterpriseNet,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

69
pages/demandHall/companyDetail/index.wxml

@ -1,14 +1,14 @@
<!--pages/demandHall/companyDetail/index.wxml-->
<view class="companyDetail-page">
<view class="top-box">
<image class="top-bg-img" src="../../../images/home/company-top-bg.png"></image>
<image class="top-bg-img" src="{{detail.enterpriseLogo}}" mode="aspectFill"></image>
<view class="top-bg"></view>
<view class="top-content">
<view class="company-info-box acea-row">
<image src="../../../images/home/company-img.png" class="company-logo"></image>
<image src="{{detail.enterpriseLogo}}" class="company-logo" mode="aspectFill"></image>
<view class="info">
<view class="company-name">楚牛科技</view>
<view class="slogan">让全世界牛起来。</view>
<view class="company-name">{{detail.enterpriseName}}</view>
<view class="slogan">{{detail.enterpriseTitle}}</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
<view class="tag-item bgG">IT软件</view>
@ -18,23 +18,23 @@
<view class="company-contact-box">
<view class="contact-item">
<image src="../../../images/home/c-location.png"></image>
<text>武汉市CBD国际大厦A座</text>
<text>{{detail.enterpriseAddress}}</text>
</view>
<view class="contact-item">
<image src="../../../images/home/c-site.png"></image>
<text>武汉市CBD国际大厦A座</text>
<text>{{detail.enterpriseNet}}</text>
</view>
<view class="contact-item">
<image src="../../../images/home/c-phone.png"></image>
<text>9466-9466</text>
<text>{{detail.enterprisePhone}}</text>
</view>
</view>
</view>
</view>
<view class="tabs-box acea-row row-between">
<view class="tab {{tabActive == 1 ? 'tab-a' : ''}}"data-i="1" bindtap="tabClick">首页</view>
<view class="tab {{tabActive == 2 ? 'tab-a' : ''}}"data-i="2" bindtap="tabClick">资源</view>
<view class="tab {{tabActive == 3 ? 'tab-a' : ''}}" data-i="3" bindtap="tabClick">需求</view>
<view class="tab {{tabActive == 2 ? 'tab-a' : ''}}"data-i="2" bindtap="tabClick">资源({{detail.resourceList.length || 0}})</view>
<view class="tab {{tabActive == 3 ? 'tab-a' : ''}}" data-i="3" bindtap="tabClick">需求({{detail.demandList.length || 0}})</view>
</view>
<view class="tab-content-box">
<!-- 首页 -->
@ -46,7 +46,7 @@
<view class="info-box">
<view class="info-item acea-row-nowrap">
<view class="">企业名称</view>
<view class="colG">湖北楚牛科技有限公司</view>
<view class="colG">{{detail.enterpriseName}}</view>
</view>
<view class="info-item acea-row-nowrap">
<view class="">所属类型</view>
@ -62,7 +62,7 @@
</view>
<view class="info-item acea-row-nowrap">
<view class="">经营范围</view>
<view class="colG">计算机系统服务;软件开发;游戏开发;会议会展服务;广告设计;设计服务;计算机软硬件及配件、电子产品设计。</view>
<view class="colG">{{detail.businessNature}}</view>
</view>
</view>
<view class="about-box">
@ -71,7 +71,7 @@
<text>关于我们</text>
</view>
<view class="about">
<text class="">湖北楚牛科技有限公司成立于2010年3月,核心团队成员均来自业内相关的顶尖公司。楚牛的愿景是让我们的技术和产品能与合作伙伴一起拥抱全球化!公司法定代表人为刘戴辉,注册资本为200万元人民币,统一社会信用代码为946946946694464T,企业地址位于湖北省武汉市江汉区东风路街道蚌塘街37号航线大厦2811号,所属行业为商务服务业,经营范围包含计算机系统服务;软件开发;游戏开发;会议会展服务;广告设计;设计服务;计算机软硬件及配件、电子产品设计。</text>
<text class="">{{detail.resourceIntroduction}}</text>
</view>
</view>
<view class="company-show-box">
@ -81,7 +81,7 @@
</view>
<view class="">
<swiper class='swiper-block' autoplay='true' circular='true' previous-margin='90rpx' next-margin='90rpx' current='0' bindchange='swiperChange'>
<block wx:key='img' wx:for='{{swiperImgUrls}}'>
<block wx:key='img' wx:for='{{detail.imgPaths}}'>
<swiper-item class='swiper-item'>
<image mode='aspectFill' src='{{item}}' class='slide-image {{swiperIndex == index ? "active" : ""}}' />
</swiper-item>
@ -89,12 +89,29 @@
</swiper>
</view>
</view>
<view class="toSite"><text>更多信息请见官网></text></view>
<view class="toSite" bindtap="toWebview"><text>更多信息请见官网></text></view>
</view>
<!-- 资源 -->
<view class="resources-box" wx:if="{{tabActive == 2}}">
<view class="resources-list">
<view class="resources-item">
<view class="resources-item" wx:for="{{detail.resourceList}}" wx:key="index" data-id="{{item.id}}" bindtap="toResourcesDetail">
<view class="item-top acea-row-nowrap">
<image src="{{item.resourceImgs[0]}}"></image>
<view class="info">
<view class="r-title line1">{{item.title}}</view>
<view class="r-price">资金需求:{{item.capital}}</view>
<view class="r-tips">{{item.detailedDescription}}</view>
</view>
</view>
<view class="btn-box acea-row row-middle row-between">
<view>
<view>发布日期 {{item.resourceStartTime}} </view>
<view>{{item.enterpriseAddress}}</view>
</view>
<view class="toMore-btn">了解详情</view>
</view>
</view>
<!-- <view class="resources-item" bindtap="toResourcesDetail">
<view class="item-top acea-row-nowrap">
<image src="../../../images/home/welfare2.png"></image>
<view class="info">
@ -110,13 +127,29 @@
</view>
<view class="toMore-btn">了解详情</view>
</view>
</view>
</view> -->
</view>
</view>
<!-- 需求 -->
<view class="needs-box" wx:if="{{tabActive == 3}}">
<view class="company-list">
<view class="company-item">
<view class="company-item" wx:for="{{detail.demandList}}" wx:key="index" data-id="{{item.id}}" bindtap="toNeedsDetail">
<view class="title-box acea-row row-between">
<view class="title line1">{{item.title}}</view>
<view class="price">{{item.capital}}</view>
</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
<view class="tag-item bgG">IT软件</view>
<view class="tag-item bgO">APP开发</view>
</view>
<view class="desc line2">{{item.detailedDescription}}</view>
<view class="btn-box acea-row row-between row-middle">
<view class="end-time">{{item.resourceEndTime}}截止报名</view>
<view class="toMore-btn">了解详情</view>
</view>
</view>
<!-- <view class="company-item" >
<view class="title-box acea-row row-between">
<view class="title line1">我需要公司官网设计需要公司官网设计需要公司官网设计</view>
<view class="price">¥20,000</view>
@ -131,7 +164,7 @@
<view class="end-time">2021.8.30截止报名</view>
<view class="toMore-btn">了解详情</view>
</view>
</view>
</view> -->
</view>
</view>
</view>

8
pages/demandHall/companyDetail/index.wxss

@ -30,6 +30,7 @@
width: 150rpx;
height: 150rpx;
margin-right: 20rpx;
border-radius: 8rpx;
}
.name{
font-size: 32rpx;
@ -117,7 +118,7 @@ box-shadow: 0px -6px 20px rgba(0, 0, 0, 0.11);
}
.info-box,.about-box{
padding-bottom: 34rpx;
border-bottom: 2rpx solid #BFBFBF;
border-bottom: 2rpx solid #eee;
}
.title-box{
padding: 34rpx 40rpx;
@ -190,6 +191,7 @@ box-shadow: 0px -6px 20px rgba(0, 0, 0, 0.11);
.resources-item{
width: 100%;
background: #fff;
margin-bottom: 20rpx;
}
.item-top{
width: 100%;
@ -200,6 +202,7 @@ box-shadow: 0px -6px 20px rgba(0, 0, 0, 0.11);
width: 196rpx;
height: 196rpx;
margin-right: 24rpx;
border-radius: 8rpx;
}
.info{
width: 370rpx;
@ -245,12 +248,13 @@ box-shadow: 0px -6px 20px rgba(0, 0, 0, 0.11);
.company-list{
width: 100%;
background: #fff;
}
.company-item{
width: 100%;
padding: 26rpx;
background: #fff;
border-bottom: 2rpx solid #EEEEEE;
margin-bottom: 20rpx;
}
.company-item .title-box{
padding: 0;

254
pages/demandHall/createProject/index.js

@ -0,0 +1,254 @@
// pages/demandHall/createProject/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
state: 0, //未申请
communicateId: null,
projectId: null,
detail: [],
projectInfo: {},
modeList: [],
modeActive: 1,
projectName: '',
resultContent: '' ,
totalMoney: '',
stageResultsDtoList: []
},
inpChange(e){
let t = e.currentTarget.dataset.t
let value = e.detail.value
if(t == 'n'){
this.setData({
projectName: value
})
} else if(t == 't'){
this.setData({
totalMoney: value
})
} else if(t == 'c'){
this.setData({
resultContent: value
})
}
},
modeClick(e){
let id = e.currentTarget.dataset.id
let nums = e.currentTarget.dataset.nums
if(this.data.state != 0){
return
}
this.setData({
stageResultsDtoList: []
})
let p = this.data.stageResultsDtoList
for(var j = 0; j < nums; j++){
p.push({name: j+1, money: '', content: '' })
}
this.setData({
modeActive: id,
stageResultsDtoList: p
})
},
changePrice(e){
let idx = Number(e.currentTarget.dataset.i)
let stageResultsDtoList = this.data.stageResultsDtoList
stageResultsDtoList[idx].money = e.detail.value
this.setData({
stageResultsDtoList
})
},
changeContent(e){
let idx = Number(e.currentTarget.dataset.i)
let stageResultsDtoList = this.data.stageResultsDtoList
stageResultsDtoList[idx].content = e.detail.value
this.setData({
stageResultsDtoList
})
},
submit(){
let data = {
resourcesId: this.data.projectInfo.projectResource.resourceId,
projectName: this.data.projectName,
projectCode: this.data.projectInfo.projectCode,
cooperationModeId: this.data.modeActive,
resultContent: this.data.resultContent,
stageResultsDtoList: this.data.stageResultsDtoList,
totalMoney: this.data.totalMoney,
providerId: this.data.projectInfo.projectProvider.prividerId,
receiverId: this.data.projectInfo.projectReceiver.receiverId,
communicateId: this.data.communicateId
}
if(data.projectName == ''){
wx.showToast({
title: '请填写项目名称!',
icon: 'none'
})
return
} else if(data.totalMoney == ''){
wx.showToast({
title: '请填写项目总金额!',
icon: 'none'
})
return
} else if(data.resultContent == ''){
wx.showToast({
title: '请描述交付成果!',
icon: 'none'
})
return
}
app.http('post','Project/create',data).then((res)=>{
if(res.data.success){
wx.showToast({
title: '操作成功!',
duration: 2000
})
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},2000)
}
})
// console.log(this.data.stageResultsDtoList)
},
//获取合作模式
getModeList(){
app.http('get','CooperationMode/listCooperationMode').then((res)=>{
if(res.data.success){
this.setData({
modeList: res.data.data
})
}
})
},
//获取资源信息
getProjectInfo(){
console.log(this.data.communicateId)
app.http('get','Project/toCreateProject',{communicateId:this.data.communicateId}).then((res)=>{
if(res.data.success){
this.setData({
projectInfo: res.data.data
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
let id = options.id // 立项
let state = options.state // 项目书状态,1已申请,2等待立项,3已成立
this.setData({
communicateId: id,
state: state || 0
})
this.getModeList()
if(state == 0 ){
this.getProjectInfo()
} else{
this.getProjectDetail()
}
},
//获取立项书详情
getProjectDetail(){
app.http('get','Communicate/getProjectInfo',{ communicateId: this.data.communicateId }).then((res)=>{
if(res.data.success){
let data = res.data.data
this.setData({
projectName: data.projectName,
stageResultsDtoList: data.stageResultsDtoList,
modeActive: data.stageResultsDtoList.length,
resultContent: data.resultContent,
totalMoney: data.totalMoney,
['projectInfo.projectResource']: data.projectResource,
['projectInfo.projectProvider']: data.projectProvider,
['projectInfo.projectReceiver']: data.projectReceiver,
})
}
})
},
confirm(){
let that = this;
wx.showModal({
title: '提示!',
content:'是否确认立项?',
success(res){
if(res.confirm){
app.http('get','Communicate/aggreProject',{projectId: that.data.projectId}).then((res)=>{
if(res.data.success){
wx.showToast({
title: '操作成功!',
duration: 2000
})
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},2000)
}
})
}
}
})
},
call(e){
wx.makePhoneCall({
phoneNumber: e.currentTarget.dataset.phone,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/demandHall/createProject/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "发布项目"
}

111
pages/demandHall/createProject/index.wxml

@ -0,0 +1,111 @@
<!--pages/demandHall/createProject/index.wxml-->
<view class="createProject-page">
<view class="resource-info-box">
<view class="title">资源信息</view>
<view class="company-card-box acea-row-nowrap">
<image src="{{projectInfo.projectResource.logo}}" class="company-logo"></image>
<view class="info">
<view class="company-name line1">{{projectInfo.projectResource.name}}</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
</view>
<view class="slogan">{{projectInfo.projectResource.content}}</view>
</view>
</view>
</view>
<view class="project-name-box">
<view class="title">项目名称</view>
<view class="inp-box" wx:if="{{state == 1 || !state}}">
<input type="text" placeholder="请填写项目名称" value="{{projectName}}" bindinput="inpChange" data-t="n" />
</view>
<view wx:if="{{state == 3 || state == 2}}">{{projectName}}</view>
</view>
<view class="project-name-box">
<view class="title acea-row row-middle">项目编号 <view class="num">{{projectInfo.projectCode}}</view></view>
</view>
<view class="project-name-box">
<view class="title acea-row row-middle">
<text>合作模式</text>
<view class="mode-box acea-row">
<view class="mode-item {{modeActive == item.id ? 'mode-item-a' : ''}}" data-id="{{item.id}}" data-nums="{{item.stageNums}}" bindtap="modeClick" wx:for="{{modeList}}" wx:key="index">{{item.name}}</view>
</view>
</view>
<view class="mode-detail">
<view class="m-tit">合作规则-定金尾款模式</view>
<text>{{modeList[modeActive - 1].content}}</text>
</view>
</view>
<view class="project-name-box">
<view class="title acea-row row-middle">交付成果</view>
<view class="area-box" style="{{projectId ? 'background:#fff;border:4rpx solid #EEEEEE;' : ''}}">
<view class="p-title acea-row row-middle">
<view>总金额</view>
<input type="text" disabled="{{ state != 0 }}" value="{{totalMoney}}" bindinput="inpChange" data-t="t" />
<text>元</text>
</view>
<textarea placeholder="请描述交付成果" disabled="{{ state != 0 }}" class="area" value="{{resultContent}}" bindinput="inpChange" data-t="c"></textarea>
<view clsas="progress-box" wx:if="{{ modeActive > 1 }}">
<view class="progress-item" wx:for="{{ stageResultsDtoList }}" wx:for-item="mode" wx:key="index">
<view class="p-title acea-row row-middle">
<view>阶段{{index+1}}</view>
<input type="text" value="{{mode.money}}" disabled="{{ state != 0 }}" bindinput="changePrice" data-i="{{index}}" />
<text>元</text>
</view>
<input type="text" class="desc" placeholder="本阶段将提供。" disabled="{{ state != 0 }}" value="{{mode.content}}" bindinput="changeContent" data-i="{{index}}" />
</view>
</view>
</view>
</view>
<!-- <view class="project-name-box">
<view class="title acea-row row-middle">项目资金</view>
<view class="item acea-row row-between row-middle">
<view class="label">总金额</view>
<view class="item-r acea-row row-between row-middle">
<input type="text" placeholder="请输入总金额" />
<text>元</text>
</view>
</view>
<view class="item acea-row row-between row-middle">
<view class="label">定金</view>
<view class="item-r acea-row row-between row-middle">
<input type="text" placeholder="请输入总定金" />
<text>元</text>
</view>
</view>
<view class="item acea-row row-between row-middle">
<view class="label">尾款</view>
<view class="item-r acea-row row-between row-middle">
<input type="text" placeholder="请输入总尾款" />
<text>元</text>
</view>
</view>
</view> -->
<view class="project-name-box">
<view class="title acea-row row-middle">项目发起方(供方)</view>
<view class="fqifang-box">
<view class="f-name">{{projectInfo.projectProvider.name}}</view>
<view class="f-item acea-row row-middle">
<view class="f-item-label">银行账户</view>
<view>{{projectInfo.projectProvider.bankNum}}</view>
</view>
<view class="f-item acea-row row-middle">
<view class="f-item-label">开户信息</view>
<view>{{projectInfo.projectProvider.bankInfo}}</view>
</view>
</view>
</view>
<view class="project-name-box">
<view class="title acea-row row-middle">合作方</view>
<view class="hezuofang-box acea-row row-middle row-between">
<view class="header-box acea-row row-middle">
<image src="{{projectInfo.projectReceiver.photoPath}}"></image>
<view>{{projectInfo.projectReceiver.name}}</view>
</view>
<view class="call" bindtap="call" data-phone="{{projectInfo.projectReceiver.phone}}"><image src="../../../images/home/call.png"></image></view>
</view>
</view>
<view class="btn-box acea-row row-right" wx:if="{{state != 3}}">
<view class="submit-btn" bindtap="submit" wx:if="{{ state == 0 || state == 1}}">确认并发起</view>
<view class="submit-btn" bindtap="confirm" wx:if="{{ state == 2 }}">待确认</view>
</view>
</view>

188
pages/demandHall/createProject/index.wxss

@ -0,0 +1,188 @@
/* pages/demandHall/createProject/index.wxss */
.createProject-page{
width: 100%;
padding: 0 40rpx 180rpx;
font-size: 28rpx;
}
.company-card-box {
width: 100%;
padding: 30rpx 12rpx;
background: #FFFFFF;
border: 2px solid #EEEEEE;
border-radius: 12rpx;
margin-bottom: 32rpx;
}
.info{
width: 70%;
}
.company-logo{
width: 154rpx;
height: 154rpx;
margin-right: 20rpx;
}
.company-name{
font-size: 28rpx;
line-height: 56rpx;
font-weight: 500;
color: #1D1D1D;
}
.slogan{
font-size: 24rpx;
line-height: 34rpx;
color: #666;
margin: 4rpx 0 12rpx;
}
.tags-box{
margin: 6rpx 0 10rpx;
}
.tag-item{
width: 112rpx;
height: 36rpx;
line-height: 34rpx;
text-align: center;
border: 1rpx solid #FFAA00;
color: #FFAA00;
border-radius: 4rpx;
margin-right: 8rpx;
font-size: 24rpx;
}
.title{
margin-bottom: 26rpx;
font-weight: 500;
line-height: 40rpx;
color: #1D1D1D;
}
.num,.mode-box{
margin-left: 38rpx;
}
.project-name-box{
margin-bottom: 32rpx;
}
.inp-box{
width: 100%;
height: 60rpx;
padding: 10rpx 20rpx;
background: #eee;
}
.inp-box input{
width: 100%;
height: 100%;
}
.mode-item{
width: 122rpx;
height: 40rpx;
border: 1rpx solid #707070;
text-align: center;
line-height: 38rpx;
font-size: 24rpx;
color: #707070;
border-radius: 8rpx;
margin-right: 10rpx;
}
.mode-item:nth-last-child(1){
margin-right: 0;
}
.mode-item-a{
border-color: #FF6D31;
color: #FF6D31;
}
.mode-detail{
width: 670rpx;
height: 176rpx;
background: #FFF5F0;
border: 2rpx solid #FF5100;
border-radius: 12rpx;
font-size: 24rpx;
color: #666;
padding: 24rpx 20rpx;
}
.m-tit{
font-weight: 500;
line-height: 34rpx;
color: #707070;
margin-bottom: 20rpx;
}
.area-box{
width: 100%;
/* height: 446rpx; */
background: #eee;
border-radius: 8rpx;
padding:28rpx 22rpx;
font-size: 24rpx;
}
.area-box textarea{
width: 100%;
height: 116rpx;
border-bottom: 2rpx solid #BFBFBF;
margin-top: 24rpx;
}
.progress-item{
width: 100%;
height: 138rpx;
border-bottom: 2rpx solid #BFBFBF;
padding: 24rpx 0;
}
.p-title input{
width: 115rpx;
margin-left: 14rpx;
text-align: center;
border-bottom: 2rpx solid #BFBFBF;
}
.desc{
width: 100%;
margin-top: 20rpx;
}
.item{
color: #666;
margin-bottom: 26rpx;
}
.item-r{
width: 538rpx;
height: 60rpx;
padding: 10rpx 20rpx;
background: #eee;
}
.faqifang-box{
color: #1D1D1D;
}
.f-item{
margin-top: 22rpx;
}
.f-item-label{
color: #707070;
margin-right: 28rpx;
}
.header-box image{
width: 92rpx;
height: 92rpx;
margin-right: 24rpx;
}
.call image{
width: 54rpx;
height: 54rpx;
}
.btn-box{
width: 750rpx;
height: 160rpx;
background: #FFFFFF;
box-shadow: 0px -6px 12px rgba(0, 0, 0, 0.04);
padding-top: 24rpx;
padding-right: 40rpx;
position: fixed;
bottom: 0;
left: 0;
z-index: 99;
}
.submit-btn{
width: 223rpx;
height: 76rpx;
background: linear-gradient(144deg, #FFA782 0%, #FF5100 100%);
border-radius: 38rpx;
text-align: center;
line-height: 76rpx;
font-size: 32rpx;
color: #fff;
font-weight: 500;
}

105
pages/demandHall/index.js

@ -1,25 +1,38 @@
// pages/demandHall/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
tabbar: {},
active: 2,
tabActive: 2,
showScreenDialog: false
active: '1', // 1资源供应,2需求广场
tabActive: '1', // 1资源列表,2企业列表
list: [],
showScreenDialog: false,
companyList: [],
pagesize: 10,
page: 1,
loading: true, //是否加载更多
cagetoryList: [] , // 分类列表
},
topTabClick(e){
this.setData({
active: e.currentTarget.dataset.i
active: e.currentTarget.dataset.i,
loading: true,
pagesize: 10,
page: 1,
list: []
})
this.getPageData()
},
tabClick(e){
this.setData({
tabActive: e.currentTarget.dataset.i
})
if(e.currentTarget.dataset.i == 2){
this.getCompanyList()
}
},
showDialog(){
this.setData({
@ -31,20 +44,87 @@ Page({
showScreenDialog: false
})
},
toResourceDetail(e){
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/demandHall/resourcesDetail/index?id='+id,
})
},
toCompanyDetail(e){
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/demandHall/companyDetail/index?id='+id,
})
},
toNeedsDetail(e){
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/demandHall/needsDetail/index?id='+id,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
app.editTabbar();
app.editTabbar()
this.getPageData()
this.getCagetoryList()
},
getCagetoryList(){
app.http('get','ResourcesCagetory/listResourcesCagetory').then((res)=>{
if(res.data.success){
this.setData({
cagetoryList: res.data.data
})
}
})
},
cagetoryClick(e){
let item = e.currentTarget.dataset.item
let i = e.currentTarget.dataset.i
this.setData({
cagetoryActive: i
})
},
getPageData(){
if(this.data.loading){
app.http('post','Resources/listResources',{
resourceType: this.data.active,
page: this.data.page,
pagesize:this.data.pagesize
}).then((res)=>{
if(res.data.success){
if(res.data.data.content.length < this.data.pagesize){
this.setData({
loading: false
})
}
this.setData({
list: this.data.list.concat(res.data.data.content)
})
}
})
}
},
getCompanyList(){
app.http('post','Enterprise/listEnterprise',{}).then((res)=>{
if(res.data.success){
this.setData({
companyList: res.data.data.content
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
* 页面上拉触底事件的处理函数
*/
onReady: function () {
onReachBottom: function () {
this.setData({
page: this.data.page + 1
})
this.getPageData()
},
/**
* 生命周期函数--监听页面显示
*/
@ -73,12 +153,7 @@ Page({
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享

98
pages/demandHall/index.wxml

@ -16,14 +16,30 @@
<view class="tab {{tabActive == 2 ? 'tab-a' : ''}}" data-i="2" bindtap="tabClick">企业列表</view>
</view>
<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" bindtap="showDialog">
<text>筛选</text>
<image src="../../images/home/screen.png"></image>
</view>
</view>
<view class="resource-list">
<view class="resource-item acea-row-nowrap" wx:for="{{3}}" wx:key="index" wx:if="{{tabActive == 1}}">
<view class="resource-item acea-row-nowrap" bindtap="toResourceDetail" data-id="{{item.id}}" wx:for="{{list}}" wx:key="index" wx:if="{{tabActive == 1}}">
<image src="{{item.resourceImgs[0]}}"></image>
<view class="resource-info">
<view class="title">{{item.title}}</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
</view>
<view class="desc line1">{{item.detailedDescription}}</view>
<view class="price">¥{{item.capital}}</view>
<view class="company-info">
<text>{{item.enterpriseName}}</text>
<!-- <text>武汉</text> -->
</view>
<view class="toMore-btn">了解详情</view>
</view>
</view>
<!-- <view class="resource-item acea-row-nowrap" wx:if="{{tabActive == 1}}" wx:for="{{4}}">
<image src="../../images/home/welfare2.png"></image>
<view class="resource-info">
<view class="title">教育类学校官网网站建设</view>
@ -38,43 +54,83 @@
</view>
<view class="toMore-btn">了解详情</view>
</view>
</view> -->
<view class="resource-item acea-row-nowrap" wx:if="{{tabActive == 2}}" bindtap="toCompanyDetail" data-id="{{item.id}}" wx:for="{{companyList}}" wx:key="index">
<image src="{{item.enterpriseLogo}}" mode="aspectFill"></image>
<view class="resource-info">
<view class="title">{{item.enterpriseName}}</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
<view class="tag-item bgG">IT软件</view>
<view class="tag-item bgO">APP开发</view>
</view>
<view class="desc line2">{{item.enterpriseTitle}}</view>
<view class="anli-list acea-row row-between">
<view class="anli-item acea-row">
<image mode="aspectFill" src="{{item}}" wx:for="{{item.imgPaths}}" wx:key="index" wx:if="{{index < 2}}"></image>
<!-- <text>购物商城优秀资源</text> -->
</view>
<!-- <view class="anli-item acea-row row-column">
<image src="../../images/home/item-bg.png"></image>
<text>购物商城优秀资源</text>
</view> -->
</view>
<!-- <view class="comment">“非常有责任心” , “老板阅历和经验很丰富”,“很好”</view> -->
</view>
</view>
<view class="resource-item acea-row-nowrap" wx:if="{{tabActive == 2}}" wx:for="{{3}}" wx:key="index">
<image src="../../images/home/welfare2.png"></image>
<!-- <view class="resource-item acea-row-nowrap" wx:if="{{tabActive == 2}}" bindtap="toCompanyDetail" wx:for="{{companyList}}" wx:key="index">
<image src="../../images/home/company-img.png"></image>
<view class="resource-info">
<view class="title">教育类学校官网网站建设</view>
<view class="title">出牛科技</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
<view class="tag-item bgG">IT软件</view>
<view class="tag-item bgO">APP开发</view>
</view>
<view class="desc line2">针对中小学教育机构、课外培训辅导教育机构、课学教育机构、课外培训辅导教育机构、课外培训辅导机构。</view>
<view class="desc line2">专注微信小程序及微信公众号开发,模板定制化服务,十年经...</view>
<view class="anli-list acea-row row-between">
<view class="anli-item acea-row row-column">
<image src="../../images/home/item-bg.png"></image>
<image mode="aspectFill" src="../../images/home/company-img.png"></image>
<text>购物商城优秀资源</text>
</view>
<view class="anli-item acea-row row-column">
<image src="../../images/home/item-bg.png"></image>
<image mode="aspectFill" src="../../images/home/item-bg.png"></image>
<text>购物商城优秀资源</text>
</view>
</view>
<view class="comment">“非常有责任心” , “老板阅历和经验很丰富”,“很好”</view>
</view>
</view>
</view> -->
</view>
</view>
<!-- 企业列表 -->
<view class="company-list-box">
<!-- 需求 -->
<view class="company-list-box" wx:if="{{active == 2}}">
<view class="screen-box acea-row row-between-wrapper">
<view class="screen-result">IT软件 · 企业网站</view>
<!-- <view class="screen-result">IT软件 · 企业网站</view> -->
<view class="screen-result"> </view>
<view class="screen acea-row row-middle" bindtap="showDialog">
<text>筛选</text>
<image src="../../images/home/screen.png"></image>
</view>
</view>
<view class="company-list">
<view class="company-item">
<view class="company-item" wx:for="{{list}}" wx:key="index" data-id="{{item.id}}" bindtap="toNeedsDetail">
<view class="title-box acea-row row-between">
<view class="title line1">{{item.title}}</view>
<view class="price">{{item.capital}}</view>
</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
<view class="tag-item bgG">IT软件</view>
<view class="tag-item bgO">APP开发</view>
</view>
<view class="desc line2">{{item.detailedDescription}}</view>
<view class="btn-box acea-row row-between row-middle">
<view class="end-time">{{item.resourceEndTime}}截止报名</view>
<view class="toMore-btn">了解详情</view>
</view>
</view>
<!-- <view class="company-item" bindtap="toNeedsDetail">
<view class="title-box acea-row row-between">
<view class="title line1">我需要公司官网设计需要公司官网设计需要公司官网设计</view>
<view class="price">¥20,000</view>
@ -89,7 +145,7 @@
<view class="end-time">2021.8.30截止报名</view>
<view class="toMore-btn">了解详情</view>
</view>
</view>
</view> -->
</view>
</view>
<view class="mask-box" wx:if="{{showScreenDialog}}">
@ -98,29 +154,29 @@
<view class="screen-item">
<view class="screen-title">所有服务</view>
<view class="acea-row">
<view class="item" wx:for="{{9}}" wx:key="index">IT软件</view>
<view class="item {{cagetoryActive == index ? 'item-active' : ''}}" wx:for="{{cagetoryList}}" wx:key="index" bindtap="cagetoryClick" data-i="{{index}}" data-item="{{item}}">{{item.cagetoryName}}</view>
</view>
</view>
<view class="screen-item">
<!-- <view class="screen-item">
<view class="screen-title">主题</view>
<view class="acea-row">
<view class="item" wx:for="{{9}}" wx:key="index">网站开发</view>
</view>
</view>
<view class="screen-item">
</view> -->
<!-- <view class="screen-item">
<view class="screen-title">选择城市</view>
<view class="acea-row">
<view class="item" wx:for="{{5}}" wx:key="index">武汉</view>
</view>
</view>
<view class="screen-item">
</view> -->
<!-- <view class="screen-item">
<view class="screen-title">区间价格</view>
<view class="price-box acea-row row-middle">
<view class="low-price"><input type="text" placeholder="最低价" /></view>
<view class="across-line"></view>
<view class="low-price"><input type="text" placeholder="最高价" /></view>
</view>
</view>
</view> -->
<view class="screen-item">
<view class="screen-title">商家身份<text class="fz20">(所有商家均实名认证)</text></view>
<view class="acea-row">

22
pages/demandHall/index.wxss

@ -1,4 +1,7 @@
/* pages/demandHall/index.wxss */
image{
border-radius: 8rpx;
}
.dmandhall-page{
padding-bottom: 130rpx;
min-height: 100vh;
@ -174,9 +177,9 @@
margin: 24rpx 0 20rpx;
}
.anli-item image{
width: 222rpx;
width: 220rpx;
height: 136rpx;
margin-right: 0rpx;
margin-right: 8rpx;
}
.comment{
font-size: 20rpx;
@ -220,18 +223,17 @@
position:fixed;
top: 0;
left: 0;
z-index: 9999;
}
.screen-dialog-box{
width: 602rpx;
height: 100%;
padding-bottom: 160rpx;
/* padding-bottom: 160rpx; */
overflow-y: scroll;
background-color: #fff;
position: absolute;
top: 0;
right: 0rpx;
/* transform: translateX(800rpx); */
/* transition: all 1000ms ease; */
animation: move 200ms ease;
}
/* .move{
@ -275,6 +277,11 @@
.screen-item .item:nth-child(3n){
margin-right: 0;
}
.screen-item .item-active{
border: 2rpx solid #FF6E33;
color: #FE7D26;
background: #FDEFE6;
}
.across-line{
width: 44rpx;
height: 2rpx;
@ -297,9 +304,12 @@
color: #393939;
}
.submit-box{
width: 100%;
width: 602rpx;
height: 100rpx;
box-shadow: 2rpx 0px 12rpx rgba(0, 0, 0, 0.16);
position: fixed;
bottom: 0;
right: 0;
}
.submit-box .btn{
width: 50%;

119
pages/demandHall/needsContact/index.js

@ -0,0 +1,119 @@
// pages/demandHall/contact/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
active: null,
needsDetail: {},
needsList: [],
content: '',
},
needItemClick(e){
let id = e.currentTarget.dataset.id
this.setData({
active: e.currentTarget.dataset.id
})
},
inpChange(e){
console.log(e)
this.setData({content: e.detail.value})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options)
let data = JSON.parse(decodeURIComponent(options.detail));
this.setData({
needsDetail: data
})
console.log(this.data.needsDetail)
this.getList()
},
getList(){
app.http('post','Resources/listMyResourcesPublish',{
resourceType: 2
}).then((res)=>{
if(res.data.success){
res.data.data.content.length > 0 ? this.setData({active: res.data.data.content[0].id}) : this.setData({active: null})
this.setData({
needsList: res.data.data.content,
})
}
})
},
submit(){
if(this.data.content == '' && this.demandId == null){
wx.showToast({
title: '请填写您的申请内容!',
icon: 'none'
})
return
}
let data = {
resourceId: this.data.active,
demandId: this.data.needsDetail.id,
content: this.data.content
}
app.http('post','Communicate/create',data).then((res)=>{
if(res.data.success){
wx.showToast({
title: '提交成功!',
duration: 2000
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/demandHall/needsContact/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "申请沟通"
}

57
pages/demandHall/needsContact/index.wxml

@ -0,0 +1,57 @@
<!--pages/demandHall/contact/index.wxml-->
<view class="contact-page">
<view class="company-card-box acea-row-nowrap">
<image src="{{needsDetail.enterprise.enterpriseLogo}}" class="company-logo"></image>
<view class="info">
<view class="n-title-box acea-row row-between row-middle">
<view class="line1">{{needsDetail.title}}</view>
</view>
<view class="n-tags acea-row">
<view class="n-tag-item">场地租赁</view>
</view>
<view class="price">需求预算<text class="n-title-a">{{needsDetail.capital}}</text></view>
</view>
</view>
<view class="tips acea-row row-middle">
<view class="t-icon">!</view>
<text>请明确您可提供的资源!</text>
</view>
<view class="needs-list" wx:if="{{needsList.length > 0}}">
<view class="need-item" wx:for="{{needsList}}" wx:key="index" bindtap="needItemClick" data-id="{{item.id}}">
<view class="n-title {{active == item.id ? 'n-title-a' : ''}} acea-row row-middle">
<view class="dot"></view>
<text>发送资源给企业(个人)</text>
</view>
<view class="company-card-box acea-row-nowrap">
<image src="../../../images/home/company-img.png" class="company-logo"></image>
<view class="info">
<view class="company-name line1">{{item.title}}</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
</view>
<view class="slogan">{{item.enterprise.enterpriseName}}</view>
</view>
</view>
</view>
<!-- <view class="need-item">
<view class="n-title {{active == index ? 'n-title-a' : ''}} acea-row row-middle">
<view class="dot"></view>
<text>发送需求给企业(个人)</text>
</view>
<view class="company-card-box acea-row-nowrap">
<image src="../../../images/home/company-img.png" class="company-logo"></image>
<view class="info">
<view class="company-name line1">教育类学校官网校官网网站建设</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
</view>
<view class="slogan">出牛科技 武汉</view>
</view>
</view>
</view> -->
</view>
<view class="area-box" wx:if="{{needsList.length == 0}}">
<textarea placeholder="请输入您的资源信息" value="{{content}}" bindinput="inpChange"></textarea>
</view>
<view class="submit-btn" bindtap="submit">提交申请</view>
</view>

175
pages/demandHall/needsContact/index.wxss

@ -0,0 +1,175 @@
/* pages/demandHall/contact/index.wxss */
.contact-page{
width: 100%;
min-height: 100vh;
padding: 40rpx;
background: #EFEFEF;
}
.company-card-box {
width: 100%;
height: 210rpx;
padding: 30rpx 12rpx;
background: #FFFFFF;
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 12rpx;
}
.info{
width: 70%;
}
.company-logo{
width: 150rpx;
height: 150rpx;
margin-right: 20rpx;
}
.company-name{
font-size: 36rpx;
line-height: 56rpx;
font-weight: 500;
color: #1D1D1D;
}
.slogan{
font-size: 24rpx;
line-height: 34rpx;
color: #666;
margin: 4rpx 0 12rpx;
}
.tags-box{
margin: 6rpx 0 10rpx;
}
.tag-item{
width: 112rpx;
height: 36rpx;
display: inline-block;
line-height: 36rpx;
text-align: center;
font-size: 20rpx;
background: linear-gradient(314deg, #FF5100 0%, #FF8800 100%);
color: #fff;
border-radius: 8rpx;
margin-right: 8rpx;
}
.tips{
margin: 32rpx 0;
font-size: 24rpx;
color: #1D1D1D;
}
.t-icon{
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 1px solid #1D1D1D;
text-align: center;
line-height: 25rpx;
color: #1D1D1D;
font-size: 24rpx;
font-weight: bold;
margin-right: 10rpx;
}
.needs-list{
width: 100%;
}
.need-item{
width: 100%;
padding: 20rpx 0;
background: #FFFFFF;
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 12rpx;
margin-bottom: 32rpx;
}
.n-title{
width: 100%;
padding: 18rpx 26rpx;
border-bottom: 2rpx solid #E2E2E2;
font-size: 24rpx;
color: #979797;
font-weight: 500;
}
.dot{
width: 28rpx;
height: 28rpx;
border: 2rpx solid #979797;
border-radius: 50%;
margin-right: 6rpx;
}
.n-title-a .dot{
position: relative;
border-color: #FF7E42;
}
.n-title-a .dot::before{
content: '';
display: inline-block;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
border-color: #FF7E42;
background: #FF7E42;
position: absolute;
top: 2rpx;
left: 2rpx;
}
.n-title-a{
color: #FF7E42;
}
.price{
font-size: 28rpx;
color: #707070;
margin-top: 20rpx;
}
.n-title-box{
/* padding: 0 26rpx; */
font-size: 28rpx;
color: #1D1D1D;
margin: 16rpx 0 8rpx;
}
.colO{
color: #FF5100;
font-size: 500;
}
.n-tags{
/* padding: 0 26rpx; */
}
.n-tag-item{
width: 112rpx;
height: 36rpx;
line-height: 34rpx;
text-align: center;
border: 1rpx solid #FFAA00;
color: #FFAA00;
border-radius: 4rpx;
margin-right: 8rpx;
font-size: 24rpx;
}
.bgG{
border: 1rpx solid #3A9EFA;
color: #3A9EFA;
}
.bgO{
border: 1rpx solid #FC9367;
color: #FC9367;
}
.area-box{
width: 100%;
height: 900rpx;
padding: 42rpx 24rpx;
background: #fff;
border-radius: 12rpx;
}
.area-box textarea{
width: 100%;
height: 50%;
}
.submit-btn{
width: 240rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: linear-gradient(134deg, #FFA782 0%, #FF6D31 100%);
border-radius: 12rpx;
font-size: 32rpx;
color: #fff;
/* margin: 32rpx auto; */
position: absolute;
bottom: 80rpx;
left: 50%;
margin-left: -120rpx;
}

31
pages/demandHall/needsDetail/index.js

@ -1,20 +1,45 @@
// pages/demandHall/needsDetail/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
isCompany: true
isCompany: true,
id: '',
detail: {},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id: options.id
})
this.getDetail()
},
toCompanyDetail(){
wx.navigateTo({
url: '/pages/demandHall/companyDetail/index?id=' + this.data.detail.enterprise.id,
})
},
getDetail(){
app.http('get','Resources/resourceInfo',{id:this.data.id}).then((res)=>{
if(res.data.success){
this.setData({
detail: res.data.data
})
}
})
},
toNeedsContact(){
let str = encodeURIComponent(JSON.stringify(this.data.detail));
wx.navigateTo({
url: '/pages/demandHall/needsContact/index?detail=' + str,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

48
pages/demandHall/needsDetail/index.wxml

@ -1,11 +1,11 @@
<!--pages/demandHall/needsDetail/index.wxml-->
<view class="needsDetail-box">
<view class="top-box">
<view class="count-down-box">10天20小时60分60秒后截止报名</view>
<!-- <view class="count-down-box">10天20小时60分60秒后截止报名</view> -->
<view class="needs-info">
<view class="info-item">
<view class="item-l">需求标题:</view>
<view class="item-r">我需要举办大型会议的场地</view>
<view class="item-r">{{detail.title}}</view>
</view>
<view class="info-item">
<view class="item-l">需求类型:</view>
@ -13,24 +13,24 @@
</view>
<view class="info-item">
<view class="item-l">需求预算:</view>
<view class="item-r">10000元</view>
<view class="item-r">{{detail.capital}}</view>
</view>
<view class="info-item">
<view class="item-l">需求描述:</view>
<view class="item-r">本人于十一期间(10.1-10.4)需要武汉周边能够举办百人大型会议的场地。需要酒水食品供应与住宿供应。</view>
<view class="item-r">{{detail.detailedDescription}}</view>
</view>
</view>
</view>
<view class="content-box">
<view class="company-info-box" wx:if="{{isCompany}}">
<view class="company-info-box" wx:if="{{detail.enterprise.enterpriseType == 1}}">
<view class="title-box acea-row row-middle">
<view class="col-line"></view>
<text>发布公司</text>
</view>
<view class="company-card-box acea-row-nowrap row-middle">
<image src="../../../images/home/company-img.png" class="company-logo"></image>
<image src="{{detail.enterprise.enterpriseLogo}}" class="company-logo" mode="aspectFill"></image>
<view class="info">
<view class="company-name">楚牛科技</view>
<view class="company-name">{{detail.enterprise.enterpriseName}}</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
<view class="tag-item bgG">IT软件</view>
@ -39,37 +39,51 @@
</view>
</view>
</view>
<view class="company-info-box" wx:if="{{!isCompany}}">
<view class="company-info-box" wx:if="{{detail.enterprise.enterpriseType == 2}}">
<view class="title-box acea-row row-middle">
<view class="col-line"></view>
<text>发布人</text>
</view>
<view class="company-card-box acea-row-nowrap row-middle">
<image src="../../../images/home/company-img.png" class="header-img"></image>
<image src="{{detail.user.photo}}" class="header-img"></image>
<view class="info">
<view class="user-name acea-row">
<view>禅易家人</view>
<image class="" src="../../../images/home/cyrz.png"></image>
<image class="tyg-tag" src="../../../images/home/tyg.png"></image>
<view>{{detail.user.name}}</view>
<image class="" src="../../../images/home/cyrz.png" wx:if="{{detail.user.isAuthentication}}"></image>
<image class="tyg-tag" src="../../../images/home/tyg.png" wx:if="{{detail.user.isVip}}"></image>
</view>
<view class="slogan">广州·能量大使</view>
<view class="slogan">{{detail.user.address}}·{{detail.user.level}}</view>
</view>
</view>
</view>
<view class="">
<view class="add-content-box">
<view class="title-box mt40 acea-row row-middle">
<view class="col-line"></view>
<text>补充内容</text>
</view>
<view class="">
<scroll-view scroll-x="true" class="scroll-view_H">
<view wx:for='{{detail.resourceImgs}}'>
<image mode='aspectFill' src='{{item}}' />
</view>
</scroll-view>
<!-- <swiper class='swiper-block' autoplay='true' circular='true' previous-margin='90rpx' next-margin='90rpx' current='0' bindchange='swiperChange'>
<block wx:key='img' wx:for='{{detail.resourceImgs}}'>
<swiper-item class='swiper-item'>
<image mode='aspectFill' src='{{item}}' class='slide-image {{swiperIndex == index ? "active" : ""}}' />
</swiper-item>
</block>
</swiper> -->
</view>
</view>
<view class="">
<!-- <view class="answer-box">
<view class="title-box mt40 acea-row row-middle">
<view class="col-line"></view>
<text>有关问答</text>
</view>
</view>
</view> -->
</view>
<view class="btn-box">
<view class="contact-btn">立即报名</view>
<view class="contact-btn" bindtap="toNeedsContact">立即报名</view>
</view>
</view>

59
pages/demandHall/needsDetail/index.wxss

@ -1,7 +1,10 @@
/* pages/demandHall/needsDetail/index.wxss */
.needsDetail-box{
padding-bottom: 190rpx;
}
.top-box{
width: 100%;
padding: 0 40rpx 40rpx;
padding: 40rpx 40rpx;
background: linear-gradient(180deg, #FF5100 0%, #FFA782 100%);
}
.count-down-box{
@ -33,7 +36,13 @@
}
.content-box{
width: 100%;
padding: 40rpx;
padding: 40rpx 0;
}
.company-info-box{
padding: 0 40rpx;
}
.add-content-box{
padding-left: 40rpx;
}
.tag{
width: 216rpx;
@ -72,6 +81,7 @@
width: 150rpx;
height: 150rpx;
margin-right: 20rpx;
border-radius: 8rpx;
}
.name{
font-size: 32rpx;
@ -141,3 +151,48 @@
font-size: 32rpx;
color: #fff;
}
.scroll-view_H{
white-space: nowrap;
width: 100%;
margin-top: 28rpx;
}
.scroll-view_H view{
display: inline-block;
width: 216rpx;
height: 216rpx;
margin-right: 10rpx;
}
.scroll-view_H view image{
width: 100%;
height: 100%;
border-radius: 8rpx;
}
.swiper-block {
height: 300rpx;
width: 100%;
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
overflow: unset;
}
.slide-image {
height: 250rpx;
width: 520rpx;
border-radius: 9rpx;
margin: 0rpx 30rpx;
z-index: 1;
}
.active {
/* transform: scale(1.14);
transition: all 0.2s ease-in 0s;
z-index: 20; */
}
.answer-box{
padding: 0 40rpx;
}

99
pages/demandHall/platform/index.js

@ -0,0 +1,99 @@
// pages/demandHall/platform/index.js
const util = require('../../../utils/util.js')
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
projectId: '',
content: '',
imgPaths: [],
},
contentChange(e){
this.setData({
content: e.detail.value
})
},
upImgs(){
util.chooseImages2(img => {
let imgs = this.data.form.imgPaths
imgs.push(img)
this.setData({
imgPaths: imgs
})
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
projectCode: options.code
})
},
submit(){
let data = {
projectCode: this.data.projectCode,
content: this.data.content,
imgPaths: this.data.imgPaths
}
app.http('post','Project/applyPlatform',data).then((res)=>{
if(res.data.success){
wx.showToast({
title: '提交成功!',
duration: 2000
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/demandHall/platform/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "平台介入"
}

10
pages/demandHall/platform/index.wxml

@ -0,0 +1,10 @@
<!--pages/demandHall/platform/index.wxml-->
<view class="page">
<view class="area-box">
<textarea value="{{content}}" bindinput="contentChange" placeholder="介入原因"></textarea>
<view class="upload-box">
<image src="../../../images/upload.png"></image>
</view>
</view>
<view class="submit" bindtap="submit">提交</view>
</view>

36
pages/demandHall/platform/index.wxss

@ -0,0 +1,36 @@
/* pages/demandHall/platform/index.wxss */
.page{
width: 100%;
height: 100vh;
background: #EFEFEF;
padding: 40rpx;
}
.area-box{
width: 100%;
background: #fff;
padding: 32rpx;
font-size: 32rpx;
border-radius: 12rpx;
}
.area-box textarea{
width: 100%;
height: 300rpx;
color: #707070;
font-size: 28rpx;
}
.area-box image{
width: 152rpx;
height: 152rpx;
margin-right: 12rpx;
}
.submit{
width: 223rpx;
height: 76rpx;
background: linear-gradient(144deg, #FFA782 0%, #FF5100 100%);
border-radius: 38rpx;
font-size: 32rpx;
color: #fff;
line-height: 76rpx;
text-align: center;
margin: 90rpx auto;
}

126
pages/demandHall/resourcesContact/index.js

@ -0,0 +1,126 @@
// pages/demandHall/contact/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
active: null,
resourcesDetail: {},
resourcesList: [],
content: '',
},
needItemClick(e){
let id = e.currentTarget.dataset.id
console.log(id)
this.setData({
active: e.currentTarget.dataset.id
})
},
inpChange(e){
console.log(e)
this.setData({content: e.detail.value})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
let data = JSON.parse(decodeURIComponent(options.detail));
this.setData({
resourcesDetail: data
})
console.log(this.data.resourcesDetail)
this.getList()
},
getList(){
app.http('post','Resources/listMyResourcesPublish',{
resourceType: 1
}).then((res)=>{
if(res.data.success){
res.data.data.content.length > 0 ? this.setData({active: res.data.data.content[0].id}) : this.setData({active: null})
this.setData({
resourcesList: res.data.data.content,
})
}
})
},
submit(){
if(this.data.content == '' && this.data.active == null){
wx.showToast({
title: '请填写您的申请内容!',
icon: 'none'
})
return
}
let data = {
resourceId: this.data.resourcesDetail.id,
demandId: this.data.active,
content: this.data.content
}
app.http('post','Communicate/create',data).then((res)=>{
if(res.data.success){
wx.showToast({
title: '提交成功!',
duration: 2000
})
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},2000)
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/demandHall/resourcesContact/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "申请沟通"
}

49
pages/demandHall/resourcesContact/index.wxml

@ -0,0 +1,49 @@
<!--pages/demandHall/contact/index.wxml-->
<view class="contact-page">
<view class="company-card-box acea-row-nowrap">
<image src="{{resourcesDetail.enterprise.enterpriseLogo}}" class="company-logo"></image>
<view class="info">
<view class="company-name line1">{{resourcesDetail.title}}</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
</view>
<view class="slogan">{{resourcesDetail.enterprise.enterpriseName}}</view>
</view>
</view>
<view class="tips acea-row row-middle">
<view class="t-icon">!</view>
<text>请明确您的需求!</text>
</view>
<view class="needs-list" wx:if="{{resourcesList.length > 0}}">
<view class="need-item" wx:for="{{resourcesList}}" wx:key="index" bindtap="needItemClick" data-id="{{item.id}}">
<view class="n-title {{active == item.id ? 'n-title-a' : ''}} acea-row row-middle">
<view class="dot"></view>
<text>发送需求给企业(个人)</text>
</view>
<view class="n-title-box acea-row row-between row-middle">
<view class="">我需要公司官网设计-网红餐饮网红餐饮</view>
<view class="colO">发布中</view>
</view>
<view class="n-tags acea-row">
<view class="n-tag-item">场地租赁</view>
</view>
</view>
<!-- <view class="need-item">
<view class="n-title {{active == index ? 'n-title-a' : ''}} acea-row row-middle">
<view class="dot"></view>
<text>发送需求给企业(个人)</text>
</view>
<view class="n-title-box acea-row row-between row-middle">
<view class="">我需要公司官网设计-网红餐饮网红餐饮</view>
<view class="colO">发布中</view>
</view>
<view class="n-tags acea-row">
<view class="n-tag-item">场地租赁</view>
</view>
</view> -->
</view>
<view class="area-box" wx:if="{{resourcesList.length == 0}}">
<textarea placeholder="请输入您的申请内容" value="{{content}}" bindinput="inpChange"></textarea>
</view>
<view class="submit-btn" bindtap="submit">提交申请</view>
</view>

171
pages/demandHall/resourcesContact/index.wxss

@ -0,0 +1,171 @@
/* pages/demandHall/contact/index.wxss */
.contact-page{
width: 100%;
min-height: 100vh;
padding: 40rpx;
background: #EFEFEF;
}
.company-card-box {
width: 100%;
height: 210rpx;
padding: 30rpx 12rpx;
background: #FFFFFF;
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 12rpx;
}
.info{
width: 70%;
}
.company-logo{
width: 150rpx;
height: 150rpx;
margin-right: 20rpx;
}
.company-name{
font-size: 36rpx;
line-height: 56rpx;
font-weight: 500;
color: #1D1D1D;
}
.slogan{
font-size: 24rpx;
line-height: 34rpx;
color: #666;
margin: 4rpx 0 12rpx;
}
.tags-box{
margin: 6rpx 0 10rpx;
}
.tag-item{
width: 112rpx;
height: 36rpx;
display: inline-block;
line-height: 36rpx;
text-align: center;
font-size: 20rpx;
background: linear-gradient(314deg, #FF5100 0%, #FF8800 100%);
color: #fff;
border-radius: 8rpx;
margin-right: 8rpx;
}
.tips{
margin: 32rpx 0;
font-size: 24rpx;
color: #1D1D1D;
}
.t-icon{
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 1px solid #1D1D1D;
text-align: center;
line-height: 25rpx;
color: #1D1D1D;
font-size: 24rpx;
font-weight: bold;
margin-right: 10rpx;
}
.needs-list{
width: 100%;
}
.need-item{
width: 100%;
padding: 20rpx 0;
background: #FFFFFF;
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 12rpx;
margin-bottom: 32rpx;
}
.n-title{
width: 100%;
padding: 18rpx 26rpx;
border-bottom: 2rpx solid #E2E2E2;
font-size: 24rpx;
color: #979797;
font-weight: 500;
}
.dot{
width: 28rpx;
height: 28rpx;
border: 2rpx solid #979797;
border-radius: 50%;
margin-right: 6rpx;
}
.n-title-a .dot{
position: relative;
border-color: #FF7E42;
}
.n-title-a .dot::before{
content: '';
display: inline-block;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
border-color: #FF7E42;
background: #FF7E42;
position: absolute;
top: 2rpx;
left: 2rpx;
}
.n-title-a{
color: #FF7E42;
}
.n-title-box{
padding: 0 26rpx;
font-size: 28rpx;
color: #1D1D1D;
margin: 16rpx 0 8rpx;
}
.colO{
color: #FF5100;
font-size: 500;
}
.n-tags{
padding: 0 26rpx;
}
.n-tag-item{
width: 112rpx;
height: 36rpx;
line-height: 34rpx;
text-align: center;
border: 1rpx solid #FFAA00;
color: #FFAA00;
border-radius: 4rpx;
margin-right: 8rpx;
font-size: 24rpx;
}
.bgG{
border: 1rpx solid #3A9EFA;
color: #3A9EFA;
}
.bgO{
border: 1rpx solid #FC9367;
color: #FC9367;
}
.area-box{
width: 100%;
height: 900rpx;
padding: 42rpx 24rpx;
background: #fff;
border-radius: 12rpx;
}
.area-box textarea{
width: 100%;
height: 50%;
}
.submit-btn{
width: 240rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: linear-gradient(134deg, #FFA782 0%, #FF6D31 100%);
border-radius: 12rpx;
font-size: 32rpx;
color: #fff;
/* margin: 32rpx auto; */
position: absolute;
bottom: 80rpx;
left: 50%;
margin-left: -120rpx;
}

38
pages/demandHall/resourcesDetail/index.js

@ -1,20 +1,52 @@
// pages/demandHall/resourcesDetail/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
id: '',
detail: {},
swiperIndex: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id: options.id
})
this.getDetail()
},
toCompanyDetail(){
wx.navigateTo({
url: '/pages/demandHall/companyDetail/index?id=' + this.data.detail.enterprise.id,
})
},
getDetail(){
app.http('get','Resources/resourceInfo',{id:this.data.id}).then((res)=>{
if(res.data.success){
this.setData({
detail: res.data.data
})
}
})
},
// 立即沟通
toResourcesContact(e){
let str = encodeURIComponent(JSON.stringify(this.data.detail));
wx.navigateTo({
url: '/pages/demandHall/resourcesContact/index?detail=' + str,
})
},
swiperChange(e) {
const that = this;
that.setData({
swiperIndex: e.detail.current,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

29
pages/demandHall/resourcesDetail/index.wxml

@ -1,10 +1,10 @@
<!--pages/demandHall/resourcesDetail/index.wxml-->
<view class="resourcesDetail-page">
<view class="img-box">
<image src="../../../images/home/company-top-bg.png" mode="aspectFill"></image>
<image src="{{detail.resourceImgs[0]}}" mode="aspectFill"></image>
</view>
<view class="detail-box">
<view class="r-name">教育类学校官网网站建设</view>
<view class="r-name">{{detail.title}}</view>
<view class="tag">IT开发·网站建设</view>
<view class="title-box acea-row row-middle">
<view class="col-line"></view>
@ -13,26 +13,26 @@
<view class="info-box">
<view class="info-item acea-row-nowrap">
<view class="label">标题</view>
<view class="colG">教育类学校官网网站建设</view>
<view class="colG">{{detail.title}}</view>
</view>
<view class="info-item acea-row-nowrap">
<view class="label">资金需求</view>
<view class="colG">100万~150万</view>
<view class="colG">{{detail.capital}}</view>
</view>
</view>
<view class="title-box mt40 acea-row row-middle">
<view class="col-line"></view>
<text>发布信息</text>
</view>
<view class="company-card-box acea-row-nowrap">
<image src="../../../images/home/company-img.png" class="company-logo"></image>
<view class="company-card-box acea-row-nowrap" bindtap="toCompanyDetail">
<image src="{{detail.enterprise.enterpriseLogo}}" class="company-logo" mode="aspectFill"></image>
<view class="info">
<view class="company-name">楚牛科技</view>
<view class="company-name line1">{{detail.enterprise.enterpriseName}}</view>
<view class="tags-box">
<view class="tag-item">网站建设</view>
<view class="tag-item bgG">IT软件</view>
</view>
<view class="slogan">让全世界全世界牛起全世界牛起全世界牛起牛起来。</view>
<view class="slogan">{{detail.enterprise.enterpriseTitle}}</view>
</view>
</view>
<view class="title-box mt40 acea-row row-middle">
@ -40,14 +40,23 @@
<text>详细描述</text>
</view>
<view class="desc-box">
<text>湖北楚牛科技有限公司成立于2010年3月,核心团队成员均来自业内相关的顶尖公司。楚牛的愿景是让我们的技术和产品能与合作伙伴一起拥抱全球化!\n\n\n本项目仅为有网站建设需求的中小学教育机构、幼儿课外培训辅导机构提供服务,对网站业务人群存在要求。本公司也提供其他业务,请另咨询客服。</text>
<text>{{detail.detailedDescription}}</text>
</view>
<view class="title-box mt40 acea-row row-middle">
<view class="col-line"></view>
<text>补充内容</text>
</view>
</view>
<view class="">
<swiper class='swiper-block' autoplay='true' circular='true' previous-margin='90rpx' next-margin='90rpx' current='0' bindchange='swiperChange'>
<block wx:key='img' wx:for='{{detail.resourceImgs}}'>
<swiper-item class='swiper-item'>
<image mode='aspectFill' src='{{item}}' class='slide-image {{swiperIndex == index ? "active" : ""}}' />
</swiper-item>
</block>
</swiper>
</view>
<view class="btn-box">
<view class="contact-btn">立即沟通</view>
<view class="contact-btn" bindtap="toResourcesContact">立即沟通</view>
</view>
</view>

31
pages/demandHall/resourcesDetail/index.wxss

@ -87,8 +87,12 @@
width: 150rpx;
height: 150rpx;
margin-right: 20rpx;
border-radius: 8rpx;
}
.info{
width: 70%;
}
.name{
.company-name{
font-size: 32rpx;
line-height: 44rpx;
}
@ -125,3 +129,28 @@
color: #707070;
line-height: 40rpx;
}
.swiper-block {
height: 300rpx;
width: 100%;
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
overflow: unset;
}
.slide-image {
height: 250rpx;
width: 520rpx;
border-radius: 9rpx;
margin: 0rpx 30rpx;
z-index: 1;
}
.active {
transform: scale(1.14);
transition: all 0.2s ease-in 0s;
z-index: 20;
}

90
pages/index/index.js

@ -1,7 +1,8 @@
// index.js
// 获取应用实例
const app = getApp()
var QQMapWX = require('../../utils/qqmap-wx-jssdk.min.js');
var qqmapsdk;
Page({
data: {
tabbar: {},
@ -21,10 +22,19 @@ Page({
menuHeight: app.globalData.menuHeight,
navHeight: app.globalData.navHeight,
menuTop: app.globalData.menuTop,
active: 2
active: 1,
demandList: [],
resourcesList: [],
province: '',
city: '',
},
onLoad() {
app.editTabbar();
app.editTabbar()
this.getCagetoryList()
qqmapsdk = new QQMapWX({
key: 'UVEBZ-M3VRS-CO4OH-6F5QZ-X7FB7-SVFOX' //这里自己的key秘钥进行填充
});
this.getLocation()
},
tabClick(e){
this.setData({
@ -36,4 +46,78 @@ Page({
url: '/pages/demandHall/index',
})
},
getCagetoryList(){
app.http('get','index').then((res)=>{
if(res.data.success){
this.setData({
demandList: res.data.data.demandList,
resourcesList: res.data.data.resourcesDtos,
cagetoryList: res.data.data.cagetoryDtos
})
}
})
},
toResourcesDetail(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/demandHall/resourcesDetail/index?id='+id,
})
},
toCompanyDetail(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/demandHall/companyDetail/index?id='+id,
})
},
toNeedDetail(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/demandHall/needsDetail/index?id='+id,
})
},
getLocation(){
let vm = this;
wx.getLocation({
type: 'wgs84',
success: function (res) {
// console.log(JSON.stringify(res))
var latitude = res.latitude
var longitude = res.longitude
var speed = res.speed
var accuracy = res.accuracy;
vm.getLocal(latitude, longitude)
},
fail: function (res) {
console.log('fail' + JSON.stringify(res))
}
})
},
// 获取当前地理位置
getLocal: function (latitude, longitude) {
let vm = this;
qqmapsdk.reverseGeocoder({
location: {
latitude: latitude,
longitude: longitude
},
success: function (res) {
// console.log(JSON.stringify(res));
let province = res.result.ad_info.province
let city = res.result.ad_info.city
vm.setData({
province: province,
city: city,
latitude: latitude,
longitude: longitude
})
// console.log(city)
},
fail: function (res) {
console.log(res);
},
complete: function (res) {
// console.log(res);
}
});
},
})

48
pages/index/index.wxml

@ -6,7 +6,7 @@
<view class="search-box acea-row row-between-wrapper">
<view class="localtion-box acea-row row-middle">
<image src="../../images/home/localtion.png"></image>
<text>定位</text>
<text>{{city}}</text>
</view>
<view class="search acea-row row-middle">
<image src="../../images/home/search.png"></image>
@ -104,7 +104,31 @@
<view class="tab-item {{active == 3 ? 'tab-item-a' : ''}}" data-i="3" bindtap="tabClick">金牌投资人</view>
</view>
<view class="list-box" wx:if="{{active == 1}}">
<view class="item">
<view class="item" wx:for="{{resourcesList}}" wx:key="index">
<view class="item-top">
<view class="project-name line1">{{item.title}}</view>
<view class="tag">IT软件·网站建设</view>
<view class="desc">{{item.detailedDescription}}</view>
<view class="buy-btn" bindtap="toResourcesDetail" data-id="{{item.id}}">了解详情</view>
</view>
<view class="company-box acea-row">
<image src="../../images/home/company-img.png"></image>
<view class="company-info acea-row row-column row-between">
<view class="company-name fz28">{{item.enterpriseName}}</view>
<view class="company-name fz24">成为奋斗者的家园</view>
<view class="tags-box acea-row">
<view class="tag-item fz20">网站建设</view>
<view class="tag-item fz20 bgG">网站建设</view>
<view class="tag-item fz20 bgO">网站建设</view>
</view>
</view>
<view class="into-btn acea-row row-center-wrapper" bindtap="toCompanyDetail" data-id="{{item.enterpriseId}}">
<image src="../../images/home/company-icon.png"></image>
<text>进入企业</text>
</view>
</view>
</view>
<!-- <view class="item">
<view class="item-top">
<view class="project-name">公司企业网站建设 wab网站...</view>
<view class="tag">IT软件·网站建设</view>
@ -127,10 +151,22 @@
<text>进入企业</text>
</view>
</view>
</view>
</view> -->
</view>
<view class="list-box" wx:if="{{active == 2}}">
<view class="item">
<view class="item" wx:for="{{demandList}}" wx:key="index" bindtap="toNeedDetail" data-id="{{item.id}}">
<view class="item-top">
<view class="project-name">{{item.title}}</view>
<view class="desc">{{item.detailedDescription}}</view>
<view class="tags-box tags-box2 acea-row">
<view class="tag-item fz20">网站建设</view>
<view class="tag-item fz20 bgG">网站建设</view>
<view class="tag-item fz20 bgO">网站建设</view>
</view>
<view class="price">{{item.capital}}</view>
</view>
</view>
<!-- <view class="item">
<view class="item-top">
<view class="project-name">公司企业网站建设 wab网站...</view>
<view class="desc">可在现有网站基础上进行界面与功能的优化升级,多种视觉风格可供挑选。</view>
@ -140,8 +176,8 @@
<view class="tag-item fz20 bgO">网站建设</view>
</view>
<view class="price">¥20,000</view>
</view>
</view>
</view>
</view> -->
</view>
</view>
<view class="to-demandhall acea-row row-center row-middle" bindtap="toTab2">

17
pages/index/index.wxss

@ -1,6 +1,6 @@
.home-page{
padding-bottom: 130rpx;
padding-bottom: 190rpx;
}
.page-top-box{
width: 100%;
@ -62,8 +62,8 @@
font-size: 24rpx;
}
.menu-item{
width: 98rpx;
margin-right:16rpx;
width: 20%;
/* margin-right:16rpx; */
margin-bottom: 34rpx;
}
.menu-item:nth-child(5n){
@ -269,18 +269,23 @@
box-shadow: 0px 6rpx 12rpx rgba(190, 190, 190, 0.3);
border-radius: 12rpx;
padding: 28rpx 20rpx 18rpx;
margin-bottom: 32rpx;
}
.item-top{
padding-bottom: 24rpx;
position: relative;
}
.item-top .buy-btn{
right: 0;
}
.project-name{
width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
font-size: 28rpx;
line-height: 40rpx;
font-size: 32rpx;
font-weight: 500;
line-height: 58rpx;
color: #1D1D1D;
}
.tags-box2{
@ -303,11 +308,11 @@
font-size: 24rpx;
line-height: 34rpx;
color: #666666;
margin-top: 8rpx;
}
.company-box{
padding-top: 12rpx;
position: relative;
border-top: 2rpx solid #ECECEC;
}
.company-box image{

172
pages/login/index.js

@ -0,0 +1,172 @@
// pages/login/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
login: false,
canIUseGetUserProfilefalse: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let userInfo = wx.getStorageSync('userInfo')
if(userInfo.phone && userInfo.phone != ''){
this.setData({
login: true
})
}
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
this.setData({
code: res.code
})
}
})
},
setUserInfo(){
},
getUserProfile(e) {
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (response) => {
wx.showLoading({
title: '登陆中...',
})
let data = {
code: this.data.code,
iv: response.iv,
encryptedData:response.encryptedData,
spread: 0,
login_type: 0
}
app.http('POST','wxapp/auth',data).then(
result =>{
if(result.data.success){
wx.hideLoading()
wx.setStorageSync('token', 'Bearer '+ result.data.data.token)
wx.setStorageSync('userInfo', result.data.data.user)
wx.showToast({
title: '授权成功!',
duration: 1500
})
if(!result.data.data.user.phone){
this.setData({
login: true
})
} else{
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},1500)
}
} else{
wx.showToast({
title: result.data.msg,
icon : 'none'
})
}
}
)
}
})
},
getPhoneNumber(e) {
if(e.detail.errMsg == 'getPhoneNumber:ok'){
app.http('post','wxapp/binding',
{encryptedData: e.detail.encryptedData,
iv: e.detail.iv
}).then((res)=>{
if(res.data.success){
app.getInfo();
wx.showToast({
title: res.data.msg,
duration: 1500
})
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},1500)
} else{
wx.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
})
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},2000)
}
})
}
},
back(){
wx.navigateBack({
delta: 1,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

3
pages/login/index.json

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

17
pages/login/index.wxml

@ -0,0 +1,17 @@
<!--pages/login/index.wxml-->
<view class="authorization">
<open-data class="user-avatar" type="userAvatarUrl"></open-data>
<open-data class="user-name" type="userNickName"></open-data>
<view class="login-notice">为了提供更优质的服务,需要您授权基本信息</view>
<button class="wx-btn" bindtap='getUserProfile' wx:if="{{!login && canIUseGetUserProfile}}">
<text>微信授权登录</text>
</button>
<button open-type="getPhoneNumber" class="wx-btn" bindgetphonenumber="getPhoneNumber" wx:if="{{login}}">
<text>绑定手机号</text>
</button>
<view class="login-notice" wx:if="{{!login && !canIUseGetUserProfile}}">请升级微信版本后再授权</view>
<button class="wx-btn btn" bindtap="back">
<text>暂不授权</text>
</button>
</view>

46
pages/login/index.wxss

@ -0,0 +1,46 @@
/* pages/login/index.wxss */
.authorization {
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
padding-top: 190rpx;
}
.user-avatar {
width: 192rpx;
height: 192rpx;
border-radius: 50%;
overflow: hidden;
}
.user-name{
margin: 40rpx 0;
}
.login-notice{
font-size: 28rpx;
font-weight: 500;
line-height: 40rpx;
color: #000;
padding-bottom: 90rpx;
}
.authorization .wx-btn {
width: 640rpx !important;
height: 86rpx!important;
background: linear-gradient(144deg, #FFA782 0%, #FF5100 100%) !important;
border-radius: 60rpx!important;
text-align: center!important;
line-height: 86rpx!important;
margin-bottom: 36rpx!important;
display: flex!important;
align-items: center!important;
justify-content: center!important;
color: #fff;
font-weight: 500 !important;
}
.authorization .btn{
background: #fff !important;
border: 4rpx solid #FFA782;
color: #FFA782 !important;
}

228
pages/release/companyAuth/index.js

@ -1,13 +1,30 @@
// pages/release/companyAuth/index.js
const util = require('../../../utils/util.js')
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
isLegal: 0,
form: { scale: '请选择'},
scaleArr: []
form: {
isLegalPerson: 0, //是否为企业法人
authorizationPath: '', // 授权书图片
enterpriseName: '', //企业名称
creditCode: '', //信用代码
enterpriseScale: '请选择', //企业规模
businessLicense: '', //营业执照照片
bankAccount: '', //银行账号
bankName: '', // 开户银行
bankBranch: '', // 开户网点
legalPersonName: '', //法人姓名
legalPhone: '', //法人手机号
legalPersonIdcard: '', // 法人身份证
idcardPicFront: '',// 法人身份证正面照
idcardPicBehind: '',// 法人身份证背面照
idcardPicHold: '',// 法人手持身份证
},
scaleArr: ['0-25','25-99','99-200','200-500','500及以上']
},
/**
@ -16,12 +33,211 @@ Page({
onLoad: function (options) {
},
radioClick(e){
checkBank(e){
console.log(e.detail.value)
app.http('get','EnterpriseAuthentication/getBankName',{bankAccount: e.detail.value}).then((res)=>{
if(res.data.success){
this.setData({
['form.bankName']: res.data.data
})
}
})
},
inpChange(e){
let type = e.currentTarget.dataset.type
let value = e.detail.value
switch (type){
case 'enterpriseName':
this.setData({
['form.enterpriseName']: value
})
break;
case 'creditCode':
this.setData({
['form.creditCode']: value
})
break;
case 'bankAccount':
this.setData({
['form.bankAccount']: value
})
break;
case 'bankName':
this.setData({
['form.bankName']: value
})
break;
case 'bankBranch':
this.setData({
['form.bankBranch']: value
})
break;
case 'name':
this.setData({
['form.legalPersonName']: value
})
break;
case 'phone':
this.setData({
['form.legalPhone']: value
})
break;
case 'idcard':
this.setData({
['form.legalPersonIdcard']: value
})
break;
}
},
upCard(e){
let type = e.currentTarget.dataset.type;
util.chooseImages(img => {
if(type == 'f'){
this.setData({
['form.idcardPicFront']: img
})
} else if(type == 'b'){
this.setData({
['form.idcardPicBehind']: img
})
} else if(type == 'h'){
this.setData({
['form.idcardPicHold']: img
})
} else if(type == 'ap'){
this.setData({
['form.authorizationPath']: img
})
} else if(type == 'bl'){
this.setData({
['form.businessLicense']: img
})
}
})
},
bindPickerChange(e){
this.setData({
isLegal: e.detail.value
['form.enterpriseScale']: this.data.scaleArr[e.detail.value]
})
},
radioClick(e){
this.setData({
['form.isLegalPerson']: e.detail.value
})
},
prevImg(e){
// let url = e.currentTarget.dataset.url;
// wx.previewImage({
// urls: [url],
// })
},
submit(){
let form = this.data.form
if(form.isLegalPerson == 0 && form.authorizationPath == ''){
wx.showToast({
title: '请上传授权书!',
icon: 'none'
})
return
} else if(form.enterpriseName == ''){
wx.showToast({
title: '请填写企业名称',
icon: 'none'
})
return
} else if(form.creditCode == ''){
wx.showToast({
title: '请填写信用代码',
icon: 'none'
})
return
} else if(form.enterpriseScale == '请选择'){
wx.showToast({
title: '请选择企业规模',
icon: 'none'
})
return
} else if(form.businessLicense == ''){
wx.showToast({
title: '请上传营业执照',
icon: 'none'
})
return
} else if(form.bankAccount == ''){
wx.showToast({
title: '请输入银行账号',
icon: 'none'
})
return
} else if(form.bankName == ''){
wx.showToast({
title: '请输入银行名称',
icon: 'none'
})
return
} else if(form.bankName == ''){
wx.showToast({
title: '请输入开户网点',
icon: 'none'
})
return
} else if(form.legalPersonName == ''){
wx.showToast({
title: '请填写姓名',
icon: 'none'
})
return
} else if(form.legalPhone == ''){
wx.showToast({
title: '请填写手机号',
icon: 'none'
})
return
} else if(form.legalPersonIdcard == ''){
wx.showToast({
title: '请填写身份证号',
icon: 'none'
})
return
} else if(form.idcardPicFront == ''){
wx.showToast({
title: '请上传身份证正面照',
icon: 'none'
})
return
} else if(form.idcardPicBehind == ''){
wx.showToast({
title: '请上传身份证反面面照',
icon: 'none'
})
return
} else if(form.idcardPicHold == ''){
wx.showToast({
title: '请上传手持身份证照',
icon: 'none'
})
return
} else{
app.http('post','EnterpriseAuthentication/createAuthenticInfoTwo',this.data.form).then((res)=>{
if(res.data.success){
wx.showModal({
title: '提示!',
content: '提交成功!请等待审核',
success(res) {
wx.switchTab({
url: '/pages/index/index',
})
}
})
} else{
wx.showToast({
title: res.data.msg,
icon: 'none'
})
}
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

47
pages/release/companyAuth/index.wxml

@ -5,18 +5,19 @@
<view>申请人是否为企业法人</view>
<radio-group bindchange="radioClick" class="acea-row row-between row-middle">
<label>
<radio value="1" checked="{{isLegal == 1}}"></radio>是
<radio value="1" checked="{{form.isLegalPerson == 1}}"></radio>是
</label>
<label>
<radio value="0" checked="{{isLegal == 0}}"></radio>否
<radio value="0" checked="{{form.isLegalPerson == 0}}"></radio>否
</label>
</radio-group>
</view>
<view class="authbook-box" wx:if="{{isLegal == 0}}">
<view class="authbook-box" wx:if="{{form.isLegalPerson == 0}}">
<view class="tips">非法人申请需上传加盖公章的申请授权书</view>
<view class="upload-box acea-row row-between">
<image src="../../../images/renzheng/sq.png"></image>
<image src="../../../images/renzheng/sqs.png"></image>
<image src="../../../images/renzheng/sq.png" wx:if="{{form.authorizationPath == ''}}" bindtap="upCard" data-type="ap"></image>
<image src="{{form.authorizationPath}}" wx:else bindtap="upCard" data-type="ap"></image>
<image src="../../../images/renzheng/sqs.png" bindtap="prevImg"></image>
</view>
</view>
</view>
@ -32,13 +33,13 @@
<view class="form-item acea-row row-between row-middle">
<view class="label">企业名称</view>
<view class="inp-box">
<input type="text" value="" placeholder="请填写企业名称" />
<input type="text" value="{{form.enterpriseName}}" bindinput="inpChange" data-type="enterpriseName" placeholder="请填写企业名称" />
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">信用代码</view>
<view class="inp-box">
<input type="text" value="" placeholder="13位或18位数字及大写字母" />
<input type="text" value="{{form.creditCode}}" bindinput="inpChange" data-type="creditCode" placeholder="13位或18位数字及大写字母" />
</view>
</view>
<view class="form-item acea-row row-between row-middle">
@ -50,15 +51,16 @@
<view class="form-item acea-row row-between row-middle">
<view class="label">企业规模</view>
<view class="inp-box">
<picker bindchange="bindPickerChange" value="{{form.scale}}" range="{{scaleArr}}">
<view class="picker">{{form.scale}}</view>
<picker bindchange="bindPickerChange" value="{{form.enterpriseScale}}" range="{{scaleArr}}">
<view class="picker">{{form.enterpriseScale}}</view>
</picker>
</view>
</view>
<view class="form-item noBorder">
<view class="label">营业执照</view>
<view class="inp-box yyzz">
<image src="../../../images/renzheng/yyzz.png"></image>
<image src="../../../images/renzheng/yyzz.png" wx:if="{{form.businessLicense == ''}}" bindtap="upCard" data-type="bl"></image>
<image src="{{form.businessLicense}}" wx:else bindtap="upCard" data-type="bl"></image>
</view>
</view>
</view>
@ -68,21 +70,19 @@
<view class="form-item acea-row row-between row-middle">
<view class="label">银行账号</view>
<view class="inp-box">
<input type="text" value="" placeholder="银行账号" />
<input type="text" value="{{form.bankAccount}}" bindinput="inpChange" bindblur="checkBank" data-type="bankAccount" placeholder="银行账号" />
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">开户银行</view>
<view class="inp-box">
<picker bindchange="bindPickerChange" value="{{form.scale}}" range="{{scaleArr}}">
<view class="picker">{{form.scale}}</view>
</picker>
<input type="text" value="{{form.bankName}}" bindinput="inpChange" data-type="bankName" placeholder="请填写开户银行"/>
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">开户网点</view>
<view class="inp-box">
<input type="text" placeholder="请填写开户网点"/>
<input type="text" value="{{form.bankBranch}}" bindinput="inpChange" data-type="bankBranch" placeholder="请填写开户网点"/>
</view>
</view>
</view>
@ -92,38 +92,41 @@
<view class="form-item acea-row row-between row-middle">
<view class="label">姓名</view>
<view class="inp-box">
<input type="text" value="" placeholder="请填写姓名" />
<input type="text" value="{{form.legalPersonName}}" bindinput="inpChange" data-type="name" placeholder="请填写姓名" />
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">手机号</view>
<view class="inp-box">
<input type="text" value="" placeholder="请填写手机号" />
<input type="text" value="{{form.legalPhone}}" bindinput="inpChange" data-type="phone" placeholder="请填写手机号" />
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">身份证号</view>
<view class="inp-box">
<input type="text" value="" placeholder="请填写身份证号" />
<input type="text" value="{{form.legalPersonIdcard}}" bindinput="inpChange" data-type="idcard" placeholder="请填写身份证号" />
</view>
</view>
<view class="form-item noBorder">
<view class="label">身份证</view>
<view class="inp-box sfz">
<view class="acea-row row-between-wrapper">
<image src="../../../images/renzheng/sfz1.png"></image>
<image src="../../../images/renzheng/sfz1.png" bindtap="upCard" data-type="b" wx:if="{{form.idcardPicBehind == ''}}"></image>
<image src="{{form.idcardPicBehind}}" bindtap="upCard" data-type="b" wx:else></image>
<image src="../../../images/renzheng/sfzb.png"></image>
</view>
<view class="acea-row row-between-wrapper">
<image src="../../../images/renzheng/sfz2.png"></image>
<image src="../../../images/renzheng/sfz2.png" bindtap="upCard" data-type="f" wx:if="{{form.idcardPicFront == ''}}"></image>
<image src="{{form.idcardPicFront}}" bindtap="upCard" data-type="f" wx:else></image>
<image src="../../../images/renzheng/sfzz.png"></image>
</view>
<view class="acea-row row-between-wrapper">
<image src="../../../images/renzheng/sfz3.png"></image>
<image src="../../../images/renzheng/sfz3.png" bindtap="upCard" data-type="h" wx:if="{{form.idcardPicHold == ''}}"></image>
<image src="{{form.idcardPicHold}}" bindtap="upCard" data-type="h" wx:else></image>
<image src="../../../images/renzheng/sfzs.png"></image>
</view>
</view>
</view>
</view>
<view class="submit-btn">保存并提交</view>
<view class="submit-btn" bindtap="submit">保存并提交</view>
</view>

122
pages/release/index.js

@ -1,32 +1,134 @@
// pages/release/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
userInfo: {},
authStatus: 0,
authType: null,
completeState: null
},
back(){
wx.switchTab({
url: '/pages/index/index',
})
},
toPersonlAuth(){
if(this.data.authStatus == 0){
wx.navigateTo({
url: '/pages/release/personAuth/index',
})
} else if(this.data.authStatus == 1){
wx.showToast({
title: '认证申请审核中,请等待!',
icon: 'none'
})
}
},
toCompanyAuth(){
if(this.data.authStatus == 0){
wx.navigateTo({
url: '/pages/release/companyAuth/index',
})
} else if(this.data.authStatus == 1){
wx.showToast({
title: '认证申请审核中,请等待!',
icon: 'none'
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
isAuthentication(){
app.http('get','user/isAuthentication').then((res)=>{
console.log(res)
if(res.data.success){
this.setData({
authStatus: res.data.data.authenticationState,
authType: res.data.data.authorizationType,
completeState: res.data.data.completeState
})
}
})
},
toResources(){
let that = this;
if(this.data.authStatus == 2 && this.data.authType == 1 && this.data.completeState == true){
wx.navigateTo({
url: '/pages/user/editNeeds/index?type=1',
})
} else if(this.data.authStatus == 2 && this.data.authType == 1 && this.data.completeState == false){
wx.showModal({
title: '提示!',
content: '您还未完善企业信息,点击确定去完善吧~',
success(res){
if(res.confirm){
wx.navigateTo({
url: '/pages/release/perfectCompanyInfo/index?status=' + that.data.authStatus,
})
}
}
})
} else if(this.data.authStatus == 3 && this.data.authType == 1 && this.data.completeState == false){
wx.showModal({
title: '提示!',
content: '您提交的企业信息未通过审核,点击确定去修改吧~',
success(res){
wx.navigateTo({
url: '/pages/release/perfectCompanyInfo/index?status=' + that.data.authStatus,
})
}
})
}
},
toNeeds(){
if(this.data.authStatus == 2 && (this.data.authType == 2 || this.data.authType == 1) && this.data.completeState == true){
wx.navigateTo({
url: '/pages/user/editNeeds/index?type=2',
})
} else if((this.data.authStatus == 2 || this.data.authStatus == 3) && this.data.authType == 2 && this.data.completeState == false){
wx.showModal({
title: '提示!',
content: '您还未完善个人信息,点击确定去完善吧~',
success(res){
wx.navigateTo({
url: '/pages/release/perfectPersonInfo/index',
})
}
})
} else if((this.data.authStatus == 2 || this.data.authStatus == 3) && this.data.authType == 1 && this.data.completeState == false){
wx.showModal({
title: '提示!',
content: '您还未完善企业信息,点击确定去完善吧~',
success(res){
wx.navigateTo({
url: '/pages/release/perfectCompanyInfo/index',
})
}
})
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let userInfo = wx.getStorageSync('userInfo')
if(userInfo.phone && userInfo.phone != ''){
this.isAuthentication();
} else{
wx.navigateTo({
url: '/pages/login/index',
})
}
},
/**

16
pages/release/index.wxml

@ -1,8 +1,8 @@
<!--pages/release/index.wxml-->
<view class="release-page">
<view class="auth-btn-box acea-row row-column row-middle">
<view class="auth-btn">企业认证<image src="../../images/back.png"></image></view>
<view class="auth-btn bgG">个人认证<image src="../../images/back.png"></image></view>
<view class="auth-btn" bindtap="toCompanyAuth">企业认证<image src="../../images/back.png"></image></view>
<view class="auth-btn bgG" bindtap="toPersonlAuth">个人认证<image src="../../images/back.png"></image></view>
</view>
<view class="posi">
<view class="tips-box">
@ -16,13 +16,15 @@
</view>
</view>
<view class="btn-box acea-row row-between">
<view class="btn">
<image src="../../images/yrz1.png"></image>
<view class="btn {{authStatus == 2 && authType == 1 ? 'auth' : '' }}" bindtap="toResources">
<view class="tip">我能提供...</view>
<image class="{{authStatus == 2 && authType == 1 ? '' : 'default' }}" src="../../images/yrz1.png"></image>
</view>
<view class="btn">
<image class="default" src="../../images/yrz2.png"></image>
<view class="btn {{authStatus == 2 ? 'auth' : '' }}" bindtap="toNeeds">
<view class="tip">我有需求...</view>
<image class="{{authStatus == 2 ? '' : 'default' }}" src="../../images/yrz2.png"></image>
</view>
</view>
<view class="close"><image src="../../images/fabu-close.png"></image></view>
<view class="close" bindtap="back"><image src="../../images/fabu-close.png"></image></view>
</view>
</view>

21
pages/release/index.wxss

@ -51,13 +51,34 @@
padding: 0 36rpx;
margin-top: 28rpx;
}
.btn{
width: 320rpx;
height: 378rpx;
position: relative;
}
.btn-box image{
width: 320rpx;
height: 378rpx;
position: absolute;
left: 0;
top: 0;
}
.btn-box .default{
filter: grayscale(1);
}
.btn .tip{
color: #9C9C9C;
font-weight: 500;
font-size: 32rpx;
position: relative;
left: 0;
top: 70rpx;
text-align: center;
z-index: 3;
}
.btn .auth{
color: #1D1D1D;
}
.close {
text-align: center;
}

146
pages/release/perfectCompanyInfo/index.js

@ -1,20 +1,160 @@
// pages/release/perfectCompanyInfo/index.js
const util = require('../../../utils/util.js')
const app = getApp()
import WxValidate from '../../../utils/WxValidate.js'
Page({
/**
* 页面的初始数据
*/
data: {
form: {
enterpriseType: 1,
enterpriseAddress: '',
latitude: '',
longitude: '',
enterpriseLogo: '',
enterpriseTitle: '',
enterpriseLabel: '',
enterpriseNet: '',
enterprisePhone: '',
aboutUs: '',
imgPaths:[],
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.initValidate()//验证规则函数
},
initValidate(){
const rules = {
enterpriseAddress: {
required: true,
},
enterpriseLogo: {
required: true,
},
enterpriseTitle: {
required: true,
},
businessNature: {
required: true,
},
enterpriseNet: {
required: true,
},
enterprisePhone:{
required:true,
}
}
const messages = {
enterpriseAddress: {
required: '请选择或填写地址',
},
enterpriseLogo: {
required: '请上传企业Logo',
},
enterpriseTitle: {
required: '请填写企业slogan',
},
businessNature: {
required: '请填写企业经营范围',
},
enterpriseNet: {
required: '请填写企业网站',
},
enterprisePhone:{
required: '请填写客服电话',
}
}
this.WxValidate = new WxValidate(rules, messages)
},
showMap(){
let that = this;
wx.getLocation({
type: 'gcj02', //返回可以用于wx.openLocation的经纬度
success: function(res) {
wx.chooseLocation({
latitude: res.latitude,
longitude: res.longitude,
scale: 28,
success: (result)=>{
that.setData({
['form.enterpriseAddress']: result.address,
['form.latitude']: result.latitude,
['form.longitude']: result.longitude,
})
}
})
}
})
},
uploadImg(e){
let type = e.currentTarget.dataset.type;
util.chooseImages(img => {
if(type == 'logo'){
this.setData({
['form.enterpriseLogo']: img
})
}
});
},
upImgs(){
util.chooseImages2(img => {
let imgs = this.data.form.imgPaths
imgs.push(img)
this.setData({
['form.imgPaths']: imgs
})
});
},
submit(e){
let that = this;
console.log(e.detail.value)
wx.showModal({
title: '提示!',
content: '是否确认提交?',
success(res){
if(res.confirm){
const params = e.detail.value
params.enterpriseType = 1
params.latitude = that.data.form.latitude
params.longitude = that.data.form.longitude
params.enterpriseLogo = that.data.form.enterpriseLogo
params.imgPaths = that.data.form.imgPaths
if (!that.WxValidate.checkForm(params)) {
const error = that.WxValidate.errorList[0]
that.showModal(error)
return false
}
app.http('post','Enterprise/completeEnterprise',params).then((res)=>{
if(res.data.success){
wx.showToast({
title: '提交成功',
duration: 2000
})
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},2000)
}
})
} else{
console.log('已取消')
}
}
})
},
showModal(error) {
wx.showModal({
content: error.msg,
showCancel: false,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

40
pages/release/perfectCompanyInfo/index.wxml

@ -2,13 +2,15 @@
<view class="perfect-companyInfo-page">
<view class="title acea-row row-middle"> 企业简介 </view>
<view class="form-box">
<form catchsubmit="submit">
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>企业地址<text class="red">*</text></view>
<view class="chose">去选择地址</view>
<!-- <view class="chose">去选择地址</view> -->
<button bindtap="showMap" class="chose">去选择地址</button>
</view>
<view class="inp-box">
<input type="text" placeholder="企业详细地址" value="" />
<input type="text" placeholder="企业详细地址" name="enterpriseAddress" value="{{form.enterpriseAddress}}" />
</view>
</view>
<view class="form-item">
@ -16,7 +18,8 @@
<view>企业logo<text class="red">*</text></view>
</view>
<view class="upload-box">
<image src="../../../images/upload.png"></image>
<image src="../../../images/upload.png" wx:if="{{form.enterpriseLogo == ''}}" bindtap="uploadImg" data-type="logo"></image>
<image src="{{form.enterpriseLogo}}" wx:else bindtap="uploadImg" data-type="logo"></image>
</view>
</view>
<view class="form-item">
@ -24,7 +27,23 @@
<view>企业slogan<text class="red">*</text></view>
</view>
<view class="inp-box">
<input type="text" placeholder="企业slogan" value="" />
<input type="text" placeholder="企业slogan" name="enterpriseTitle" value="{{form.enterpriseTitle}}" />
</view>
</view>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>企业经营范围<text class="red">*</text></view>
</view>
<view class="inp-box">
<input type="text" placeholder="请填写企业经营范围,可用','分开" value="{{form.businessNature}}" name="businessNature" />
</view>
</view>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>企业网站<text class="red">*</text></view>
</view>
<view class="inp-box">
<input type="text" placeholder="https://*******" value="{{form.enterpriseNet}}" name="enterpriseNet" />
</view>
</view>
<view class="form-item">
@ -32,7 +51,7 @@
<view>客服电话<text class="red">*</text></view>
</view>
<view class="inp-box">
<input type="text" placeholder="客服电话" value="" />
<input type="text" placeholder="客服电话" value="{{form.enterprisePhone}}" name="enterprisePhone" />
</view>
</view>
<view class="form-item">
@ -40,7 +59,7 @@
<view>关于我们</view>
</view>
<view class="textarea-box">
<textarea value="" placeholder=""></textarea>
<textarea value="{{form.resourceIntroduction}}" name="resourceIntroduction"></textarea>
</view>
</view>
<view class="form-item">
@ -48,9 +67,14 @@
<view>公司展示</view>
</view>
<view class="upload-box">
<image src="../../../images/upload.png"></image>
<image src="{{item}}" wx:for="{{form.imgPaths}}" wx:key="index"></image>
<image src="../../../images/upload.png" bindtap="upImgs"></image>
</view>
</view>
<button formType="submit" class="submit-btn">保存并提交</button>
<!-- <view class="submit-btn" bindtap="submit">保存并提交</view> -->
</form>
</view>
<view class="submit-btn">保存并提交</view>
</view>

21
pages/release/perfectCompanyInfo/index.wxss

@ -24,6 +24,15 @@
.form-item{
margin-top: 22rpx;
}
.chose{
padding: 0 !important;
margin: 0 !important;
width: auto !important;
background: #fff;
font-size: 26rpx;
color: #666;
font-weight: normal;
}
.red{
color: #FF0000;
}
@ -48,6 +57,7 @@
.upload-box image{
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
}
.textarea-box{
width: 100%;
@ -63,13 +73,14 @@
line-height: 40rpx;
}
.submit-btn{
width: 670rpx;
height: 76rpx;
width: 670rpx !important;
height: 76rpx !important;
background: linear-gradient(144deg, #FFA782 0%, #FF5100 100%);
border-radius: 38rpx;
color: #fff;
font-size: 28rpx;
line-height: 76rpx;
font-size: 28rpx !important;
line-height: 76rpx !important;
text-align: center;
margin:40rpx auto;
margin:40rpx auto !important;
padding: 0 !important;
}

132
pages/release/perfectPersonInfo/index.js

@ -1,20 +1,142 @@
// pages/release/perfectPersonInfo/index.js
const util = require('../../../utils/util.js')
const app = getApp()
import WxValidate from '../../../utils/WxValidate.js'
Page({
/**
* 页面的初始数据
*/
data: {
form: {
enterpriseType: 2,
enterpriseScale: '',
businessNature: '',
establishmentTime: '',
enterpriseAddress: '',
latitude: '',
longitude: '',
enterprisePhone: '',
imgPaths: [],
}
},
showMap(){
let that = this;
wx.getLocation({
type: 'gcj02', //返回可以用于wx.openLocation的经纬度
success: function(res) {
wx.chooseLocation({
latitude: res.latitude,
longitude: res.longitude,
scale: 28,
success: (result)=>{
console.log(result)
that.setData({
['form.enterpriseAddress']: result.address,
['form.latitude']: result.latitude,
['form.longitude']: result.longitude,
})
}
})
}
})
},
timeChange(e){
this.setData({
['form.establishmentTime']: e.detail.value
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.initValidate()//验证规则函数
},
initValidate(){
const rules = {
enterpriseScale: {
required: true,
},
industryId: {
required: true,
},
establishmentTime: {
required: true,
},
enterpriseAddress: {
required: true,
},
enterprisePhone:{
required:true,
}
}
const messages = {
enterpriseAddress: {
required: '请选择或填写地址',
},
enterpriseScale: {
required: '请填写团队规模',
},
industryId: {
required: '请填写承接类型',
},
establishmentTime: {
required: '请选择组建时间',
},
enterprisePhone:{
required: '请填写客服电话',
}
}
this.WxValidate = new WxValidate(rules, messages)
},
upImgs(){
util.chooseImages2(img => {
let imgs = this.data.form.imgPaths
imgs.push(img)
this.setData({
['form.imgPaths']: imgs
})
});
},
submit(e){
let that = this;
wx.showModal({
title: '提示!',
content: '是否确认提交?',
success(res){
if(res.confirm){
const params = e.detail.value
params.enterpriseType = 2
params.imgPaths = that.data.form.imgPaths
if (!that.WxValidate.checkForm(params)) {
const error = that.WxValidate.errorList[0]
that.showModal(error)
return false
}
app.http('post','Enterprise/completeEnterprise',params).then((res)=>{
if(res.data.success){
wx.showToast({
title: '提交成功',
duration: 2000
})
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},2000)
}
})
} else{
console.log('已取消')
}
}
})
},
showModal(error) {
wx.showModal({
content: error.msg,
showCancel: false,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

104
pages/release/perfectPersonInfo/index.wxml

@ -2,62 +2,68 @@
<view class="perfect-companyInfo-page">
<view class="title acea-row row-middle">个人(团队)简介</view>
<view class="form-box">
<view class="introduction-box">
<view class="introduction-item acea-row row-between-wrapper">
<view>团队规模<text class="red">*</text></view>
<view class="acea-row row-middle">
<input type="text" placeholder="请填写(人)" />
<image src="../../../images/home/arrow-r.png"></image>
<form catchsubmit="submit">
<view class="introduction-box">
<view class="introduction-item acea-row row-between-wrapper">
<view>团队规模<text class="red">*</text></view>
<view class="acea-row row-middle">
<input type="number" placeholder="请填写(人数)" value="{{form.enterpriseScale}}" name="enterpriseScale" />
<image src="../../../images/home/arrow-r.png"></image>
</view>
</view>
</view>
<view class="introduction-item acea-row row-between-wrapper">
<view>主要承接类型<text class="red">*</text></view>
<view class="acea-row row-middle">
<input type="text" placeholder="请填写(人)" />
<image src="../../../images/home/arrow-r.png"></image>
<view class="introduction-item acea-row row-between-wrapper">
<view>主要承接类型<text class="red">*</text></view>
<view class="acea-row row-middle">
<input type="text" placeholder="请填写" valaue="{{form.industryId}}" name="industryId" />
<image src="../../../images/home/arrow-r.png"></image>
</view>
</view>
</view>
<view class="introduction-item acea-row row-between-wrapper">
<view>承接时间<text class="red">*</text></view>
<view class="acea-row row-middle">
<input type="text" placeholder="请填写(人)" />
<image src="../../../images/home/arrow-r.png"></image>
<view class="introduction-item acea-row row-between-wrapper">
<view>组建时间<text class="red">*</text></view>
<view class="acea-row row-middle">
<picker bindchange="timeChange" value="{{form.establishmentTime}}" name="establishmentTime" mode="date">
<view class="picker">{{form.establishmentTime || '请选择'}}</view>
</picker>
<!-- <input type="text" placeholder="请填写" value="{{form.establishmentTime}}" name="establishmentTime" /> -->
<!-- <image src="../../../images/home/arrow-r.png"></image> -->
</view>
</view>
</view>
</view>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>办公地址<text class="red">*</text></view>
<view class="chose">去选择地址</view>
</view>
<view class="inp-box">
<input type="text" placeholder="企业详细地址" value="" />
</view>
</view>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>客服电话<text class="red">*</text></view>
</view>
<view class="inp-box">
<input type="text" placeholder="客服电话" value="" />
</view>
</view>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>关于我们</view>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>办公地址<text class="red">*</text></view>
<view class="chose" bindtap="showMap">去选择地址</view>
</view>
<view class="inp-box">
<input type="text" placeholder="企业详细地址" value="{{form.enterpriseAddress}}" name="enterpriseAddress" />
</view>
</view>
<view class="textarea-box">
<textarea value="" placeholder=""></textarea>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>客服电话<text class="red">*</text></view>
</view>
<view class="inp-box">
<input type="text" placeholder="客服电话" value="{{form.enterprisePhone}}" name="enterprisePhone" />
</view>
</view>
</view>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>团队展示</view>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>关于我们</view>
</view>
<view class="textarea-box">
<textarea value="{{form.resourceIntroduction}}" name="resourceIntroduction" placeholder=""></textarea>
</view>
</view>
<view class="upload-box">
<image src="../../../images/upload.png"></image>
<view class="form-item">
<view class="label-box acea-row row-between-wrapper">
<view>团队展示</view>
</view>
<view class="upload-box">
<image src="{{item}}" wx:for="{{form.imgPaths}}" wx:key="index"></image>
<image src="../../../images/upload.png" bindtap="upImgs"></image>
</view>
</view>
</view>
<button class="submit-btn" formType="submit">保存并提交</button>
</form>
</view>
<view class="submit-btn">保存并提交</view>
</view>

18
pages/release/perfectPersonInfo/index.wxss

@ -14,7 +14,7 @@
margin-top: 20rpx;
}
.introduction-item input{
width: 100rpx;
/* width: 100rpx; */
text-align: right;
}
@ -40,6 +40,10 @@
font-size: 28rpx;
color: #666666;
}
.picker{
font-size: 28rpx;
color: #666666;
}
.form-item{
margin-top: 22rpx;
}
@ -67,6 +71,7 @@
.upload-box image{
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
}
.textarea-box{
width: 100%;
@ -82,13 +87,14 @@
line-height: 40rpx;
}
.submit-btn{
width: 670rpx;
height: 76rpx;
width: 670rpx !important;
height: 76rpx !important;
background: linear-gradient(144deg, #FFA782 0%, #FF5100 100%);
border-radius: 38rpx;
color: #fff;
font-size: 28rpx;
line-height: 76rpx;
font-size: 28rpx !important;
line-height: 76rpx !important;
text-align: center;
margin:40rpx auto;
margin:40rpx auto !important;
padding: 0 !important;
}

106
pages/release/personAuth/index.js

@ -1,11 +1,20 @@
// pages/release/personAuth/index.js
const util = require('../../../utils/util.js')
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
form: {
legalPersonName: '',
legalPhone: '',
legalPersonIdcard: '',
idcardPicFront: '',
idcardPicBehind: '',
idcardPicHold: ''
}
},
/**
@ -14,7 +23,100 @@ Page({
onLoad: function (options) {
},
inpChange(e){
let type = e.currentTarget.dataset.type
let value = e.detail.value
if(type == 'name'){
this.setData({
['form.legalPersonName']: value
})
} else if(type == 'phone'){
this.setData({
['form.legalPhone']: value
})
} else if(type == 'idcard'){
this.setData({
['form.legalPersonIdcard']: value
})
}
},
upCard(e){
let type = e.currentTarget.dataset.type;
util.chooseImages(img => {
if(type == 'f'){
this.setData({
['form.idcardPicFront']: img
})
} else if(type == 'b'){
this.setData({
['form.idcardPicBehind']: img
})
} else{
this.setData({
['form.idcardPicHold']: img
})
}
});
},
submit(){
let form = this.data.form;
if(form.legalPersonName == ''){
wx.showToast({
title: '请填写姓名',
icon: 'none'
})
return
} else if(form.legalPhone == ''){
wx.showToast({
title: '请填写手机号',
icon: 'none'
})
return
} else if(form.legalPersonIdcard == ''){
wx.showToast({
title: '请填写身份证号',
icon: 'none'
})
return
} else if(form.idcardPicFront == ''){
wx.showToast({
title: '请上传身份证正面照',
icon: 'none'
})
return
} else if(form.idcardPicBehind == ''){
wx.showToast({
title: '请上传身份证反面面照',
icon: 'none'
})
return
} else if(form.idcardPicHold == ''){
wx.showToast({
title: '请上传手持身份证照',
icon: 'none'
})
return
} else{
app.http('post','EnterpriseAuthentication/createAuthenticInfoOne',this.data.form).then((res)=>{
if(res.data.success){
wx.showModal({
title: '提示!',
content: '提交成功!请等待审核',
success(res) {
wx.switchTab({
url: '/pages/index/index',
})
}
})
} else{
wx.showToast({
title: res.data.msg,
icon: 'none'
})
}
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

17
pages/release/personAuth/index.wxml

@ -4,38 +4,41 @@
<view class="form-item acea-row row-between row-middle">
<view class="label">姓名</view>
<view class="inp-box">
<input type="text" value="" placeholder="请填写姓名" />
<input type="text" value="{{form.legalPersonName}}" bindinput="inpChange" data-type="name" placeholder="请填写姓名" />
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">手机号</view>
<view class="inp-box">
<input type="text" value="" placeholder="请填写手机号" />
<input type="text" value="{{form.legalPhone}}" bindinput="inpChange" data-type="phone" placeholder="请填写手机号" />
</view>
</view>
<view class="form-item acea-row row-between row-middle">
<view class="label">身份证号</view>
<view class="inp-box">
<input type="text" value="" placeholder="请填写身份证号" />
<input type="text" value="{{form.legalPersonIdcard}}" bindinput="inpChange" data-type="idcard" placeholder="请填写身份证号" />
</view>
</view>
<view class="form-item noBorder">
<view class="label">身份证</view>
<view class="inp-box sfz">
<view class="acea-row row-between-wrapper">
<image src="../../../images/renzheng/sfz1.png"></image>
<image src="../../../images/renzheng/sfz1.png" bindtap="upCard" data-type="b" wx:if="{{form.idcardPicBehind == ''}}"></image>
<image src="{{form.idcardPicBehind}}" bindtap="upCard" data-type="b" wx:else></image>
<image src="../../../images/renzheng/sfzb.png"></image>
</view>
<view class="acea-row row-between-wrapper">
<image src="../../../images/renzheng/sfz2.png"></image>
<image src="../../../images/renzheng/sfz2.png" bindtap="upCard" data-type="f" wx:if="{{form.idcardPicFront == ''}}"></image>
<image src="{{form.idcardPicFront}}" bindtap="upCard" data-type="f" wx:else></image>
<image src="../../../images/renzheng/sfzz.png"></image>
</view>
<view class="acea-row row-between-wrapper">
<image src="../../../images/renzheng/sfz3.png"></image>
<image src="../../../images/renzheng/sfz3.png" bindtap="upCard" data-type="h" wx:if="{{form.idcardPicHold == ''}}"></image>
<image src="{{form.idcardPicHold}}" bindtap="upCard" data-type="h" wx:else></image>
<image src="../../../images/renzheng/sfzs.png"></image>
</view>
</view>
</view>
</view>
<view class="submit-btn">保存并提交</view>
<view class="submit-btn" bindtap="submit">保存并提交</view>
</view>

8
pages/user/agreement/index.js

@ -39,13 +39,11 @@ Page({
})
}
}).then(()=>{
console.log(pages.length)
console.log(pages[0].route)
if(pages[pages.length - 2]){
if(this.data.userInfo.isRecharge && pages[pages.length - 2].route !== 'pages/user/index'){
setTimeout(()=>{
wx.reLaunch({
url: '/pages/user/index',
url: '/pages/user/mine/index',
})
},3000)
}
@ -54,7 +52,7 @@ Page({
if(this.data.userInfo.isRecharge == 1){
setTimeout(()=>{
wx.reLaunch({
url: '/pages/user/index',
url: '/pages/user/mine/index',
})
},3000)
}
@ -63,7 +61,7 @@ Page({
if(this.data.userInfo.isRecharge){
setTimeout(()=>{
wx.reLaunch({
url: '/pages/user/index',
url: '/pages/user/mine/index',
})
},2000)
}

33
pages/user/agreement/index.wxml

@ -1,21 +1,22 @@
<!--pages/user/agreement/index.wxml-->
<view class="pay-box" wx:if="{{ userInfo.nickname != '' && userInfo.isRecharge == 1}}">
<image src="../../../images/pay1.png" class="img1"></image>
<image src="../../../images/pay2.png" class="img2"></image>
<view>
<view class="back-btn" style="top:{{navTopHeight}}rpx" bindtap="backPage">
<image src="../../../images/back.png" mode=""></image>
</view>
<view class="pay-box" wx:if="{{ userInfo.nickname != '' && userInfo.isRecharge == 1}}">
<image src="../../../images/pay1.png" class="img1"></image>
<image src="../../../images/pay2.png" class="img2"></image>
</view>
<view class="agreement-box" wx:else>
<image src="../../../images/agreement1.png" class="img1"></image>
<image src="../../../images/agreement2.png" class="img2"></image>
<image src="../../../images/agreement3.png" class="img3"></image>
<!-- <image src="../../../images/agreement.png" class="img"></image> -->
<view class="btn-box" bindtap="toPay" wx:if="{{userInfo.nickname}}"></view>
<block wx:else>
<button class="btn-box" wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"></button>
<button class="btn-box" wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"></button>
<view wx:else> 请使用1.4.4及以上版本基础库 </view>
</block>
</view>
</view>
<view class="agreement-box" wx:else>
<image src="../../../images/agreement1.png" class="img1"></image>
<image src="../../../images/agreement2.png" class="img2"></image>
<image src="../../../images/agreement3.png" class="img3"></image>
<!-- <image src="../../../images/agreement.png" class="img"></image> -->
<view class="btn-box" bindtap="toPay" wx:if="{{userInfo.nickname}}"></view>
<block wx:else>
<button class="btn-box" wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"></button>
<button class="btn-box" wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"></button>
<view wx:else> 请使用1.4.4及以上版本基础库 </view>
</block>
</view>

220
pages/user/editNeeds/index.js

@ -0,0 +1,220 @@
// pages/user/editNeeds/index.js
const util = require('../../../utils/util.js')
const app = getApp()
import WxValidate from '../../../utils/WxValidate.js'
Page({
/**
* 页面的初始数据
*/
data: {
form: {
resourceType: 0,
title: '',
detailedDescription: '',
resourceImgs: [],
capital:'',
resourceStartTime:'',
resourceEndTime: '',
},
typeArr:['供应' , '需求'],
active: 1
},
tabClick(e){
let i = e.currentTarget.dataset.i;
if(i == 2){
this.setData({
['form.capital']: '价格可议'
})
}
this.setData({
active: e.currentTarget.dataset.i
})
},
startTimeChange(e){
this.setData({
['form.resourceStartTime']: e.detail.value
})
},
endTimeChange(e){
this.setData({
['form.resourceEndTime']: e.detail.value
})
},
bindPickerChange(e){
this.setData({
['form.resourceType']: this.data.typeArr[e.detail.value]
})
},
upImgs(){
util.chooseImages2(img => {
let imgs = this.data.form.imgPaths
imgs.push(img)
this.setData({
['form.resourceImgs']: imgs
})
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
if(options.id){
this.getDetail()
}
if(options.type){
this.setData({
['form.resourceType']: Number(options.type) - 1
})
}
this.initValidate()//验证规则函数
},
// 重新发布,获取提交数据
getDetail(){
},
initValidate(){
const rules = {
title: {
required: true,
},
resourceCagetoryId: {
required: true,
},
detailedDescription: {
required: true,
},
resourceStartTime:{
required:true,
},
resourceEndTime:{
required:true,
}
}
const messages = {
title: {
required: '请填写标题',
},
resourceCagetoryId: {
required: '请填写需求类型',
},
detailedDescription: {
required: '请填写内容',
},
resourceEndTime:{
required: '请设置展示开始时间',
},
resourceEndTime:{
required: '请设置展示结束时间',
}
}
this.WxValidate = new WxValidate(rules, messages)
},
upImgs(){
util.chooseImages2(img => {
let imgs = this.data.form.resourceImgs
imgs.push(img)
this.setData({
['form.resourceImgs']: imgs
})
});
},
submit(e){
let that = this
let type = e.currentTarget.dataset.type
wx.showModal({
title: '提示!',
content: '是否确认提交?',
success(res){
if(res.confirm){
const params = e.detail.value
params.resourceType = that.data.form.resourceType + 1
params.resourceImgs = that.data.form.resourceImgs
params.capital = that.data.form.capital
params.resourceAuditState = type
if (!that.WxValidate.checkForm(params)) {
const error = that.WxValidate.errorList[0]
that.showModal(error)
return false
}
app.http('post','Resources/create',params).then((res)=>{
if(res.data.success){
wx.showToast({
title: '提交成功',
duration: 2000
})
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},2000)
} else{
wx.showToast({
title: '请求失败',
duration: 2000,
icon: 'none'
})
}
})
} else{
console.log('已取消')
}
}
})
},
showModal(error) {
wx.showModal({
content: error.msg,
showCancel: false,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/user/editNeeds/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "供应/需求编辑"
}

77
pages/user/editNeeds/index.wxml

@ -0,0 +1,77 @@
<!--pages/user/editNeeds/index.wxml-->
<view class="edit-needs-box">
<view class="form-box">
<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="picker">{{typeArr[form.resourceType]}}</view>
</picker>
</view>
</view>
<view class="form-item">
<view class="label">供应/需求标题<text class="red">*</text></view>
<view class="inp-box">
<input type="text" placeholder="我供应/需求..." 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>
<view class="form-item">
<view class="label acea-row row-between">
<view>供应/需求内容<text class="red">*</text></view>
<view class="colO">看看别人怎么写></view>
</view>
<view class="area-box">
<textarea placeholder="请详细描述您的供应/需求" value="{{form.detailedDescription}}" name="detailedDescription"></textarea>
</view>
</view>
<view class="form-item">
<view class="label">补充内容/添加图片</view>
<view class="upload-box acea-row">
<image src="{{item}}" mode='aspectFill' wx:for="{{form.resourceImgs}}" wx:key="index"></image>
<image src="../../../images/upload.png" bindtap="upImgs"></image>
</view>
</view>
<view class="form-item">
<view class="label acea-row row-between">
<view>供应/需求预算<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>
</view>
</view>
<view class="inp-box acea-row-nowrap" wx:if="{{active == 1}}">
<input type="text" placeholder="请输入预算" value="{{form.capital}}" name="capital" />
<text>元</text>
</view>
</view>
<view class="form-item">
<view class="label acea-row row-between">
<view>展示时间</view>
</view>
<view class="time-box acea-row row-middle">
<view class="timepick-box">
<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>
</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>
</view>
</view>
</view>
<button class="submit-btn" formType="submit" data-type="1">保存并提交</button>
<button class="submit-btn" formType="submit" data-type="0">保存到草稿箱</button>
</form>
</view>
</view>

105
pages/user/editNeeds/index.wxss

@ -0,0 +1,105 @@
/* pages/user/editNeeds/index.wxss */
.form-box{
width: 100%;
padding: 32rpx 38rpx;
font-size: 28rpx;
color:#666666;
}
.form-item{
margin-bottom: 60rpx;
}
.pick-box{
color: #666;
}
.red{
color: #FF0000;
}
.colO{
color: #FF6D31;
font-size: 24rpx;
}
.inp-box{
width: 100%;
padding: 10rpx 22rpx;
background: #eee;
color: #666;
margin-top: 36rpx;
}
.inp-box input{
width: 90%;
height: 100%;
}
.area-box{
width: 100%;
height: 290rpx;
padding: 24rpx 22rpx;
background: #eee;
color: #666;
margin-top: 36rpx;
}
.area-box textarea{
width: 100%;
height: 100%;
}
.upload-box{
width: 100%;
height: 140rpx;
margin-top: 26rpx;
}
.upload-box image{
width: 140rpx;
height: 140rpx;
margin-right: 12rpx;
}
.tab-item{
width: 122rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
border: 1px solid #707070;
border-radius: 8rpx;
color: #666;
font-size: 22rpx;
margin-left: 20rpx;
}
.tab-a{
background: linear-gradient(341deg, #FF5100 0%, #FFA782 100%);
color: #fff;
border: none;
}
.time-box{
margin-top: 24rpx;
}
.timepick-box{
width: 308rpx;
height: 60rpx;
background: #eee;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20rpx;
}
.timepick-box picker{
width: 100%;
}
.timepick-box image{
width: 14rpx;
height: 24rpx;
transform: rotate(90deg);
}
.m14{
margin: 0 14rpx;
}
.submit-btn{
width: 670rpx !important;
height: 76rpx !important;
background: linear-gradient(144deg, #FFA782 0%, #FF5100 100%);
border-radius: 38rpx;
color: #fff;
font-size: 28rpx !important;
line-height: 76rpx !important;
text-align: center;
margin:40rpx auto 20rpx !important;
padding: 0 !important;
}

48
pages/user/index.js

@ -7,6 +7,7 @@ Page({
*/
data: {
tabbar: {},
userInfo: {},
CustomBar: app.globalData.CustomBar,
menuHeight: app.globalData.menuHeight,
navHeight: app.globalData.navHeight,
@ -19,7 +20,52 @@ Page({
onLoad: function (options) {
app.editTabbar();
},
getUser(){
let userInfo = wx.getStorageSync('userInfo');
this.setData({
userInfo
})
console.log(this.data.userInfo)
},
// 跳转首席体验官
toMine(){
if(this.data.isRecharge){
wx.navigateTo({
url: '/pages/user/mine/index'
})
} else{
wx.navigateTo({
url: '/pages/user/agreement/index'
})
}
},
//跳转资源订单
toResourcesOrder(){
wx.navigateTo({
url: '/pages/user/resourcesOrder/index'
})
},
//跳转需求订单
toNeedsOrder(){
wx.navigateTo({
url: '/pages/user/needsOrder/index'
})
},
//跳转需求管理
toNeedsManage(e){
let type = e.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/user/needsManage/index?type=' + type,
})
},
//跳转资源管理
toResourcesManage(e){
let type = e.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/user/resourcesManage/index?type=' + type,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -31,7 +77,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
app.getInfo();
},
/**

48
pages/user/index.wxml

@ -2,8 +2,8 @@
<view class="page-top-box">
<image src="../../images/home/top-bg.png" class="top-bg"></image>
<view class="page-title" style="top:{{menuTop}}px;height:{{menuHeight}}px;line-height: {{menuHeight}}px;">禅意云生态</view>
<view class="top-box-content" style="top: {{CustomBar}}rpx;">
<view class="top-set-box acea-row row-between">
<view class="top-box-content" style="top: {{CustomBar + 10}}rpx;">
<view class="top-set-box acea-row row-between row-middle">
<view class="set-box-l">企业中心</view>
<view class="set-box-r acea-row">
<image src="../../images/user/set-icon.png" class="setIcon"></image>
@ -11,30 +11,32 @@
</view>
</view>
<view class="userInfo-box acea-row row-middle">
<image src="../../images/user/header.png" class="header-img"></image>
<image src="{{userInfo.avatar || '../../images/user/header.png'}}" class="header-img"></image>
<view class="userInfo-r">
<view class="name">刘海柱</view>
<!-- <view class="name" wx:if="{{userInfo.nickname == ''}}"></view> -->
<view class="name">{{userInfo.nickname || '微信用户'}}</view>
<view class="img-tags acea-row row-middle">
<image src="../../images/user/vip.png" class="vip-tag"></image>
<image src="../../images/user/tyg-tag.png" class="tyg-tag"></image>
<view class="level">{{userInfo.levelName || '普通会员'}}</view>
<!-- <image src="../../images/user/vip.png" class="vip-tag"></image> -->
<image src="../../images/user/tyg-tag.png" class="tyg-tag" wx:if="{{userInfo.isRecharge}}"></image>
</view>
</view>
</view>
<view class="my-reminds-box acea-row row-around ">
<view class="remind-item">
<view class="count">20</view>
<view class="remind-item" bindtap="toResourcesOrder">
<view class="count">0</view>
<view>资源订单</view>
</view>
<view class="remind-item">
<view class="count">203</view>
<view class="count">0</view>
<view>我的审核</view>
</view>
<view class="remind-item">
<view class="count">2</view>
<view class="remind-item" bindtap="toNeedsOrder">
<view class="count">0</view>
<view>需求订单</view>
</view>
</view>
<view class="to-tyg-box">
<view class="to-tyg-box" bindtap="toMine">
<image src="../../images/user/tyg-img.png"></image>
</view>
</view>
@ -44,30 +46,30 @@
<view class="needs-menu-list">
<view class="title-box acea-row row-between-wrapper">
<view>需求管理</view>
<view class="acea-row row-middle seemore">
<!-- <view class="acea-row row-middle seemore">
<text>查看全部</text>
<image src="../../images/user/arror-r.png"></image>
</view>
</view> -->
</view>
<view class="menu-list acea-row row-between">
<view class="menu-item acea-row row-column row-center-wrapper">
<view class="menu-item acea-row row-column row-center-wrapper" bindtap="toNeedsManage" data-type="1">
<image src="../../images/user/xuqiu1.png"></image>
<text>发布中</text>
</view>
<view class="menu-item acea-row row-column row-center-wrapper">
<view class="menu-item acea-row row-column row-center-wrapper" bindtap="toNeedsManage" data-type="2">
<image src="../../images/user/xuqiu2.png"></image>
<text>审核中</text>
</view>
<view class="menu-item acea-row row-column row-center-wrapper">
<view class="menu-item acea-row row-column row-center-wrapper" bindtap="toNeedsManage" data-type="3">
<image src="../../images/user/xuqiu3.png"></image>
<text>草稿箱</text>
</view>
<view class="menu-item acea-row row-column row-center-wrapper">
<view class="menu-item acea-row row-column row-center-wrapper" bindtap="toNeedsManage" data-type="4">
<image src="../../images/user/xuqiu4.png"></image>
<text>已结束</text>
</view>
</view>
<view class="torelease-img">
<view class="torelease-img" bindtap="">
<image src="../../images/user/fbxq.png"></image>
<view class="to-btn">发布需求</view>
</view>
@ -78,19 +80,19 @@
<view>资源管理</view>
</view>
<view class="menu-list acea-row row-between">
<view class="menu-item acea-row row-column row-center-wrapper">
<view class="menu-item acea-row row-column row-center-wrapper" bindtap="toResourcesManage" data-type="1">
<image src="../../images/user/xuqiu1.png"></image>
<text>发布中</text>
</view>
<view class="menu-item acea-row row-column row-center-wrapper">
<view class="menu-item acea-row row-column row-center-wrapper" bindtap="toResourcesManage" data-type="2">
<image src="../../images/user/xuqiu2.png"></image>
<text>审核中</text>
</view>
<view class="menu-item acea-row row-column row-center-wrapper">
<view class="menu-item acea-row row-column row-center-wrapper" bindtap="toResourcesManage" data-type="3">
<image src="../../images/user/xuqiu3.png"></image>
<text>草稿箱</text>
</view>
<view class="menu-item acea-row row-column row-center-wrapper">
<view class="menu-item acea-row row-column row-center-wrapper" bindtap="toResourcesManage" data-type="4">
<image src="../../images/user/xuqiu4.png"></image>
<text>已结束</text>
</view>

10
pages/user/index.wxss

@ -58,6 +58,16 @@
font-size: 36rpx;
line-height: 50rpx;
}
.level{
padding: 2rpx 20rpx;
font-size: 24rpx;
background: #FEC313;
text-align: center;
border-radius: 25px;
}
.img-tags {
margin-top: 14rpx;
}
.userInfo-r image{
width: 132rpx;
height: 48rpx;

145
pages/user/needsManage/index.js

@ -0,0 +1,145 @@
// pages/user/NeedsManage/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
tabActive: 1,
list: [],
resourceType: 2,
resourceState: null,
resourceAuditState: null,
},
tabClick(e){
let i = e.currentTarget.dataset.i
this.setParams(i)
},
setParams(i){
if(i == 1){
this.setData({
tabActive: i,
resourceState: 1,
resourceAuditState: [2],
})
} else if(i == 2){
this.setData({
tabActive: i,
resourceState: 0,
resourceAuditState: [1],
})
} else if(i == 3){
this.setData({
tabActive: i,
resourceState: 0,
resourceAuditState: [0,3],
})
} else if(i == 4){
this.setData({
tabActive: i,
resourceState: 2,
resourceAuditState: [],
})
}
this.getList()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
tabActive: options.type
})
this.setParams(options.type)
},
toRelease(){
wx.navigateTo({
url: '/pages/release/index',
})
},
getList(){
app.http('post','Resources/listMyResources',{
resourceType: this.data.resourceType,
resourceState: this.data.resourceState,
resourceAuditState : this.data.resourceAuditState
}).then((res)=>{
if(res.data.success){
this.setData({
list: res.data.data.content
})
}
})
},
// 下架
xiajiaClick(e){
let id = e.currentTarget.dataset.id;
console.log(id)
},
// 撤回
withdrawClick(e){
let id = e.currentTarget.dataset.id;
console.log(id)
},
// 编辑
editClick(e){
let id = e.currentTarget.dataset.id;
console.log(id)
wx.navigateTo({
url: '/pages/user/editNeeds/index?id=' + id,
})
},
// 删除
delClick(e){
let id = e.currentTarget.dataset.id;
console.log(id)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/user/needsManage/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "需求管理"
}

74
pages/user/needsManage/index.wxml

@ -0,0 +1,74 @@
<!--pages/user/NeedsManage/index.wxml-->
<view class="manage-page">
<view class="tabs-box acea-row row-between">
<view class="tab {{tabActive == 1 ? 'tab-a' : ''}}" data-i="1" bindtap="tabClick">发布中</view>
<view class="tab {{tabActive == 2 ? 'tab-a' : ''}}" data-i="2" bindtap="tabClick">审核中</view>
<view class="tab {{tabActive == 3 ? 'tab-a' : ''}}" data-i="3" bindtap="tabClick">草稿箱</view>
<view class="tab {{tabActive == 4 ? 'tab-a' : ''}}" data-i="4" bindtap="tabClick">已结束</view>
</view>
<view class="list">
<view class="no-list" wx:if="{{list.length == 0}}">
<image src="../../../images/no-needs.png"></image>
<view>暂无需求</view>
<view class="to-btn" bindtap="toRelease">去发布吧</view>
</view>
<view class="list-item" wx:if="{{list.length > 0}}" wx:for="{{list}}" wx:key="index">
<view class="item-top acea-row row-between">
<view class="top-l">
<view class="n-title">{{item.title}}</view>
<view class="tags-box acea-row">
<view class="tag-item">公司起名</view>
<view class="tag-item colG">LOGO</view>
</view>
</view>
<view class="top-r">
<view class="status" wx:if="{{tabActive == 1}}">发布中</view>
<view class="status" wx:if="{{tabActive == 2}}">审核中</view>
<view class="status" wx:if="{{tabActive == 3}}">编辑未完成</view>
<view class="status" wx:if="{{tabActive == 4}}">项目已圆满结束</view>
<view class="time" wx:if="{{tabActive == 1}}">展示至{{item.resourceEndTime}}</view>
</view>
</view>
<view class="fz28">需求预算<text class="colR">{{item.capital}}</text></view>
<view class="desc">{{item.detailedDescription}}</view>
<view class="btn-box acea-row row-between row-middle">
<view class="time">{{item.resourceStartTime}}申请</view>
<view class="btns acea-row row-middle">
<view class="btn" wx:if="{{tabActive == 1}}" bindtap="xiajiaClick" data-id="{{item.id}}">下架需求</view>
<view class="btn" wx:if="{{tabActive == 2}}" bindtap="withdrawClick" data-id="{{item.id}}">撤回审核</view>
<view class="btn" wx:if="{{tabActive == 3}}" bindtap="editClick" data-id="{{item.id}}">编辑发布</view>
<view class="btn default" wx:if="{{tabActive == 3}}" bindtap="delClick" data-id="{{item.id}}">删除需求</view>
</view>
</view>
</view>
<!-- <view class="list-item">
<view class="item-top acea-row row-between">
<view class="top-l">
<view class="n-title">我需要公司官网设计</view>
<view class="tags-box acea-row">
<view class="tag-item">公司起名</view>
<view class="tag-item colG">LOGO</view>
</view>
</view>
<view class="top-r">
<view class="status" wx:if="{{tabActive == 1}}">发布中</view>
<view class="status" wx:if="{{tabActive == 2}}">审核中</view>
<view class="status" wx:if="{{tabActive == 3}}">编辑未完成</view>
<view class="status" wx:if="{{tabActive == 4}}">项目已圆满结束</view>
<view class="time" wx:if="{{tabActive == 1}}">展示至21/08/31</view>
</view>
</view>
<view class="fz28">需求预算<text class="colR">20000</text>元</view>
<view class="desc">各位禅易才子佳人,本公司业务领域是母婴用品,现在需要设计公司官网,设计风格需要针对国内母婴市场审美。</view>
<view class="btn-box acea-row row-between row-middle">
<view class="time">2021.8.21申请</view>
<view class="btns acea-row row-middle">
<view class="btn" wx:if="{{tabActive == 1}}">下架需求</view>
<view class="btn" wx:if="{{tabActive == 2}}">撤回审核</view>
<view class="btn" wx:if="{{tabActive == 3}}">编辑发布</view>
<view class="btn default" wx:if="{{tabActive == 3}}">删除需求</view>
</view>
</view>
</view> -->
</view>
</view>

116
pages/user/needsManage/index.wxss

@ -0,0 +1,116 @@
/* pages/user/NeedsManage/index.wxss */
.manage-page{
width: 100%;
min-height: 100vh;
background: #EEEEEE;
}
.tabs-box{
width: 100%;
padding: 18rpx 58rpx;
background: #fff;
}
.tab{
text-align: center;
font-size: 28rpx;
color: #707070;
position: relative;
}
.tab::after{
display: block;
content: '';
width: 100%;
height: 8rpx;
border-radius: 8rpx;
background: #FF6D31;
position: absolute;
bottom: -22rpx;
left: 50%;
margin-left: -41rpx;
opacity: 0;
transform: scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.tab-a::after{
opacity: 1;
transform: scaleX(1);
}
.list{
width: 100%;
padding: 32rpx 40rpx;
}
.list-item{
width: 100%;
padding: 20rpx 20rpx 32rpx;
background: #fff;
border-radius: 12rpx;
margin-bottom: 20rpx;
}
.n-title{
font-size: 28rpx;
color: #1D1D1D;
font-weight: 500;
margin-bottom: 18rpx;
}
.tag-item{
width: 114rpx;
height: 36rpx;
line-height: 34rpx;
text-align: center;
color: #FC9367;
border: 1rpx solid #FC9367;
background: #fff;
border-radius: 4rpx;
font-size: 24rpx;
margin-right: 8rpx;
}
.colG{
color: #3A9EFA;
border-color: #3A9EFA;
}
.top-r{
color: #FF5100;
font-size: 20rpx;
font-weight: 600;
line-height: 40rpx;
}
.status{
font-size: 30rpx;
}
.fz28{
color:#707070;
line-height: 40rpx;
margin: 18rpx 0 10rpx;
}
.colR{
color: #FF5100;
}
.desc{
font-size: 24rpx;
line-height: 34rpx;
color: #333;
}
.time{
font-size: 24rpx;
color: #707070;
}
.btn-box{
font-size: 30rpx;
font-weight: 500;
line-height: 40px;
color: #FF5100;
}
.btn{
font-size: 28rpx;
width: 150rpx;
height: 56rpx;
line-height: 56rpx;
text-align: center;
background: linear-gradient(134deg, #FFA782 0%, #FF6D31 100%);
border-radius: 12rpx;
color: #fff;
margin-left: 16rpx;
}
.default{
background: linear-gradient(134deg, #BFBFBF 0%, #BFBFBF 100%);
}

240
pages/user/needsOrder/index.js

@ -0,0 +1,240 @@
// pages/user/needsOrder/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
tabActive: 1,
list: []
},
toDemandHall(){
wx.switchTab({
url: '/pages/demandHall/index',
})
},
tabClick(e){
let i = e.currentTarget.dataset.i
this.setData({
tabActive: i
})
if(i == 1){
this.getCommunicates()
} else{
this.getProjectList()
}
},
// 获取 沟通中
getCommunicates(){
app.http('get','Communicate/demandCommunicates').then((res)=>{
if(res.data.success){
if(res.data.data.length > 0){
res.data.data.map((item)=>{
item.open = false
})
res.data.data[0].open = true
}
console.log(res.data.data)
this.setData({
list: res.data.data
})
}
})
},
//点击展开
openClick(e){
let idx = e.currentTarget.dataset.idx
console.log(idx)
let list = this.data.list
list[idx].open = !list[idx].open
this.setData({
list: list
})
},
//获取进行中、已结束列表
getProjectList(){
app.http('get','Project/listProject',{projectState: this.data.tabActive -1, projectType: 2}).then((res)=>{
if(res.data.success){
res.data.data.map((item)=>{
item.stageResultsDtoList.map((stage)=>{
if(stage.state == 1){
item.showBtn = true
}
})
})
this.setData({
list: res.data.data
})
}
})
},
//同意开启下一阶段
agreenOpen(e){
let item = e.currentTarget.dataset.item
console.log(item)
const stage = item.stageResultsDtoList.filter((item)=>{
return item.state == 1
})
wx.showModal({
title: '提示!',
content: '是否同意开启下阶段?',
success(res){
if(res.confirm){
app.http('get','Project/startNextStage',{stageResultId: stage[0].id}).then((res)=>{
if(res.data.success){
wx.showToast({
title: '操作成功!',
duration: 2000
})
this.getProjectList()
}
})
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getCommunicates()
},
// 平台介入
toPlatform(e){
let code = e.currentTarget.dataset.item.projectCode
wx.navigateTo({
url: '/pages/demandHall/platform/index?code=' + code,
})
},
// 取消沟通
cancelCommunicate(e){
let info = e.currentTarget.dataset.info
console.log(info)
let that = this;
wx.showModal({
title: '提示!',
content:'是否取消沟通?',
success(res){
if(res.confirm){
app.http('get','Communicate/cancelCommunicates',{communicateId: info.communicateId}).then((res)=>{
if(res.data.success){
wx.showToast({
title: '操作成功!',
duration: 1500
})
setTimeout(()=>{
that.getCommunicates()
},1500)
}
})
}
}
})
},
//查看立项书
toCreateProject(e){
let item = e.currentTarget.dataset.item
wx.navigateTo({
url: '/pages/demandHall/createProject/index?state=' + item.comminuteState+ '&id=' + item.communicateId,
})
},
confirm(e){
let item = e.currentTarget.dataset.item
let communicateId = e.currentTarget.dataset.id
let that = this;
wx.showModal({
title: '提示!',
content:'是否确认立项?',
success(res){
if(res.confirm){
app.http('post','Communicate/aggreProject',{
communicateId: communicateId,
partnerInfos: item.info
}).then((res)=>{
if(res.data.success){
wx.showToast({
title: '操作成功!',
duration: 2000
})
that.getCommunicates()
}
})
}
}
})
},
cancelProject(e){
let item = e.currentTarget.dataset.item
let communicateId = e.currentTarget.dataset.id
let that = this;
wx.showModal({
title: '提示!',
content:'是否确认取消立项?',
success(res){
if(res.confirm){
app.http('post','Communicate/cancelProject',{
communicateId: communicateId,
partnerInfos: item.partnerInfos
}).then((res)=>{
if(res.data.success){
wx.showToast({
title: '操作成功!',
duration: 2000
})
that.getCommunicates()
}
})
}
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/user/needsOrder/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "需求订单"
}

108
pages/user/needsOrder/index.wxml

@ -0,0 +1,108 @@
<!--pages/user/resourcesOrder/index.wxml-->
<view class="order-page">
<view class="tabs-box acea-row row-between">
<view class="tab {{tabActive == 1 ? 'tab-a' : ''}}" data-i="1" bindtap="tabClick">沟通中</view>
<view class="tab {{tabActive == 2 ? 'tab-a' : ''}}" data-i="2" bindtap="tabClick">进行中</view>
<view class="tab {{tabActive == 3 ? 'tab-a' : ''}}" data-i="3" bindtap="tabClick">已结束</view>
</view>
<view class="list">
<view class="no-list" wx:if="{{list.length == 0}}">
<image src="../../../images/no-needs.png"></image>
<view>暂无订单</view>
<view class="to-btn" bindtap="toDemandHall">去需求广场</view>
</view>
<view class="item" wx:if="{{ tabActive == 1 }}" wx:for="{{list}}" wx:key="index">
<view class="needs-info-box">
<view class="n-title-box acea-row row-between">
<view>{{item.resourceInfo.name}}</view>
<!-- <view class="status" wx:if="{{item.comminuteState == 3}}">项目已成立</view> -->
</view>
<view class="n-price">需求预算 <text class="colO">{{item.resourceInfo.budget}}</text></view>
<view class="n-desc">{{item.resourceInfo.content}}</view>
</view>
<view class="concat-list-box">
<view class="open-btn acea-row row-middle" bindtap="openClick" data-idx="{{index}}">
<text>{{!item.open ? '展开' : '收起'}}</text>
<image class="arrow-down {{!item.open ? '' : 'arrow-up'}}" src="../../../images/arrow-d.png"></image>
</view>
<view class="concat-list {{item.open ? 'list-open' : ''}}" >
<view class="info-item" wx:for="{{item.partnerInfos}}" wx:for-item="info" wx:key="index">
<view class=" acea-row row-middle">
<image src="{{info.logo}}"></image>
<view class="info2">
<view class="projectinfo-box acea-row-nowrap row-between">
<view class="acea-row row-middle line1" >
<view class="p-label">合作方:</view>
<view>{{info.name}}</view>
</view>
<view class="status" wx:if="{{info.comminuteState == 1}}">已申请</view>
<view class="status" wx:if="{{info.comminuteState == 2}}">等待立项</view>
<view class="status" wx:if="{{info.comminuteState == 3}}">项目成立中</view>
<view class="status" wx:if="{{info.comminuteState == 4}}">已取消立项</view>
</view>
<view class="tag-item" wx:if="{{info.comminuteState == 1}}">定金尾款</view>
</view>
</view>
<view class="btn-box acea-row row-between row-middle">
<view class="start-time">{{info.createTime}}项目开启</view>
<view class="btns acea-row">
<view class="btn-item" wx:if="{{info.comminuteState == 1 }}" bindtap="cancelCommunicate" data-info="{{info}}">取消沟通</view>
<view class="btn-item" wx:if="{{info.comminuteState == 2 || info.comminuteState == 3}}" bindtap="toCreateProject" data-item="{{info}}">查看立项书</view>
<view class="btn-item" wx:if="{{info.comminuteState == 2}}" bindtap="confirm" data-item="{{item}}" data-id="{{info.communicateId}}">确认立项</view>
<view class="btn-item default" wx:if="{{info.comminuteState == 2}}" bindtap="cancelProject" data-item="{{item}}" data-id="{{info.communicateId}}">取消立项</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="item" wx:if="{{tabActive != 1}}" wx:for="{{list}}" wx:key="index">
<view class="number acea-row row-between row-middle">
<text>项目编号 {{item.projectCode}}</text>
<!-- <view class="status">{{tabActive == 2 ? '进行中' : '已结束'}}</view> -->
<view class="status" wx:if="{{item.projectState != 5}}">{{tabActive == 1 ? '沟通中' : tabActive == 2 ? '进行中' : '已结束'}}</view>
<view class="status" wx:else>平台介入中</view>
</view>
<view class="info-box acea-row row-middle" >
<image src="{{item.projectResource.logo}}"></image>
<view class="info">
<view class="i-title line1">{{item.resourcesDto.title || item.projectResource.name}}</view>
<view class="tag-item">定金尾款</view>
<view class="i-desc" wx:if="{{tabActive == 1}}">{{item.resourcesDto.detailedDescription}}</view>
<view class="projectinfo-box">
<view class="acea-row row-middle" wx:if="{{tabActive != 1}}">
<view class="p-label">项目名称:</view>
<view>{{item.projectName}}</view>
</view>
<view class="acea-row row-middle line1" wx:if="{{tabActive != 1}}">
<view class="p-label">合作方:</view>
<view>{{item.partner}}</view>
</view>
</view>
</view>
</view>
<view class="progress-box" wx:if="{{ tabActive != 1 }}">
<view class="progress-item acea-row row-between row-middle" wx:for="{{item.stageResultsDtoList}}" wx:for-item="progress">
<view class="acea-row row-middle">
<image src="../../../images/home/progress.png"></image>
<text>{{progress.name}} ¥{{progress.money}}</text>
</view>
<view class="progress-status" wx:if="{{progress.state == 0 }}">未开始</view>
<view class="progress-status" wx:if="{{progress.state == 1 }}">申请开启</view>
<view class="progress-status" wx:if="{{progress.state == 2 }}">进行中</view>
<view class="progress-status colorO" wx:if="{{progress.state == 3 }}">已结束</view>
</view>
</view>
<view class="btn-box acea-row row-between row-bottom" wx:if="{{ tabActive != 1 }}">
<view class="start-time" wx:if="{{ tabActive == 2 }}">{{item.examineTime}}项目开启</view>
<view class="" wx:if="{{ tabActive == 3 }}">项目已圆满结束</view>
<view class="btns acea-row">
<view class="btn-item" wx:if="{{ tabActive == 2 && item.showBtn }}"bindtap="agreenOpen" data-item="{{item}}">同意开启</view>
<view class="btn-item" wx:if="{{ tabActive == 2 }}" bindtap="toPlatform" data-item="{{item}}">平台介入</view>
<view class="btn-item default" wx:if="{{ tabActive == 2 }}">同意交付</view>
<!-- <view class="btn-item" wx:if="{{ tabActive == 3 }}">合作反馈</view> -->
</view>
</view>
</view>
</view>
</view>

67
pages/user/needsOrder/index.wxss

@ -0,0 +1,67 @@
/* pages/user/needsOrder/index.wxss */
@import '../resourcesOrder/index.wxss';
.needs-info-box{
border: none !important;
margin-bottom: 0 !important;
}
.info2{
width: calc(100% - 120rpx);
}
.info-item image{
width: 90rpx;
height: 90rpx;
margin-right: 24rpx;
}
.info-item{
font-size: 24rpx;
border-top: 2rpx solid #F0F0F0;
padding: 20rpx 0;
}
.projectinfo-box{
font-size: 20rpx;
margin: 2rpx 0;
}
.tag-item{
transform: scale(0.8);
margin: 0;
}
.needs-info-box{
/* padding-bottom: 22rpx; */
border-bottom: 2rpx solid #F0F0F0;
margin-bottom: 22rpx;
}
.n-title{
color: #1D1D1D;
font-size: 32rpx;
line-height: 44rpx;
}
.n-price{
color: #707070;
font-size: 28rpx;
margin: 8rpx 0;
}
.n-desc{
font-size: 24rpx;
line-height: 34rpx;
color: #333333;
}
.btn-box{
margin-top: 10rpx;
}
.btn-item {
font-size: 24rpx;
width: 130rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
background: linear-gradient(134deg, #FFA782 0%, #FF6D31 100%);
border-radius: 12rpx;
color: #fff;
margin-left: 8rpx;
}
.status {
min-width: 150rpx;
text-align: right;
}

143
pages/user/resourcesManage/index.js

@ -0,0 +1,143 @@
// pages/user/NeedsManage/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
tabActive: 1,
list: [],
resourceType: 1,
resourceState: null,
resourceAuditState: null,
},
toRelease(){
wx.navigateTo({
url: '/pages/release/index',
})
},
tabClick(e){
let i = e.currentTarget.dataset.i
this.setParams(i)
},
setParams(i){
if(i == 1){
this.setData({
tabActive: i,
resourceState: 1,
resourceAuditState: [2],
})
} else if(i == 2){
this.setData({
tabActive: i,
resourceState: 0,
resourceAuditState: [1],
})
} else if(i == 3){
this.setData({
tabActive: i,
resourceState: 0,
resourceAuditState: [0,3],
})
} else if(i == 4){
this.setData({
tabActive: i,
resourceState: 2,
resourceAuditState: [],
})
}
this.getList()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
tabActive: options.type
})
this.setParams(options.type)
},
getList(){
app.http('post','Resources/listMyResources',{
resourceType: this.data.resourceType,
resourceState: this.data.resourceState,
resourceAuditState : this.data.resourceAuditState
}).then((res)=>{
if(res.data.success){
this.setData({
list: res.data.data.content
})
}
})
},
// 下架
xiajiaClick(e){
let id = e.currentTarget.dataset.id;
console.log(id)
},
// 撤回
withdrawClick(e){
let id = e.currentTarget.dataset.id;
},
// 编辑
editClick(e){
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/user/editNeeds/index?id=' + id,
})
},
// 删除
delClick(e){
let id = e.currentTarget.dataset.id;
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/user/resourcesManage/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTitleText": "资源管理"
}

70
pages/user/resourcesManage/index.wxml

@ -0,0 +1,70 @@
<!--pages/user/resourcesManage/index.wxml-->
<view class="manage-page">
<view class="tabs-box acea-row row-between">
<view class="tab {{tabActive == 1 ? 'tab-a' : ''}}" data-i="1" bindtap="tabClick">发布中</view>
<view class="tab {{tabActive == 2 ? 'tab-a' : ''}}" data-i="2" bindtap="tabClick">审核中</view>
<view class="tab {{tabActive == 3 ? 'tab-a' : ''}}" data-i="3" bindtap="tabClick">草稿箱</view>
<view class="tab {{tabActive == 4 ? 'tab-a' : ''}}" data-i="4" bindtap="tabClick">已结束</view>
</view>
<view class="list">
<view class="no-list" wx:if="{{list.length == 0}}">
<image src="../../../images/no-order.png"></image>
<view>暂无资源</view>
<view class="to-btn" bindtap="toRelease">去发布吧</view>
</view>
<view class="list-item" wx:if="{{list.length > 0}}" wx:for="{{list}}" wx:key="index">
<view class="number acea-row row-between row-middle">
<text>项目编号 17262626272727</text>
<view class="status" wx:if="{{tabActive == 2 || tabActive == 3}}">{{tabActive == 2 ? '等待审核' : '未编辑完成'}}</view>
</view>
<view class="info-box acea-row row-middle">
<image src="{{item.resourceImgs[0]}}"></image>
<view class="info">
<view class="i-title">{{item.title}}</view>
<view class="i-desc">{{item.detailedDescription}}</view>
</view>
</view>
<view class="colO" wx:if="{{tabActive == 1 || tabActive == 4 }}">项目合作数量(6)</view>
<view class="btn-box acea-row row-between row-middle">
<view wx:if="{{tabActive == 1}}">成交金额 50000元</view>
<view wx:if="{{tabActive == 4}}">赚取 50000元</view>
<view class="time" wx:if="{{tabActive == 2 || tabActive == 3}}">{{item.createTime}}申请</view>
<view class="btns acea-row">
<view class="btn" wx:if="{{tabActive == 1}}" data-id="{{item.id}}" bindtap="xiajiaClick">下架资源</view>
<view class="btn" wx:if="{{tabActive == 2}}" data-id="{{item.id}}" bindtap="withdrawClick">撤回审核</view>
<view class="btn" wx:if="{{tabActive == 3}}" data-id="{{item.id}}" bindtap="editClick">编辑发布</view>
<view class="btn default" wx:if="{{tabActive == 3}}" data-id="{{item.id}}" bindtap="delClick">删除项目</view>
<view class="text" wx:if="{{tabActive == 4}}" data-id="{{item.id}}">项目已圆满结束</view>
</view>
</view>
</view>
<!-- <view class="list-item">
<view class="number acea-row row-between row-middle">
<text>项目编号 17262626272727</text>
<view class="status" wx:if="{{tabActive == 2 || tabActive == 3}}">{{tabActive == 2 ? '等待审核' : '未编辑完成'}}</view>
</view>
<view class="info-box acea-row row-middle">
<image src="../../../images/home/company-img.png"></image>
<view class="info">
<view class="i-title">教育类学校官网网站建设</view>
<view class="i-desc">针对中小学教育机构、课外培训辅导机构,提供官网升级优化和专业的网站建设定制化服务。</view>
</view>
</view>
<view class="colO" wx:if="{{tabActive == 1 || tabActive == 4 }}">项目合作数量(6)</view>
<view class="btn-box acea-row row-between row-middle">
<view wx:if="{{tabActive == 1}}">成交金额 50000元</view>
<view wx:if="{{tabActive == 4}}">赚取 50000元</view>
<view class="time" wx:if="{{tabActive == 2 || tabActive == 3}}">2021.8.21申请</view>
<view class="btns acea-row">
<view class="btn" wx:if="{{tabActive == 1}}">下架资源</view>
<view class="btn" wx:if="{{tabActive == 2}}">撤回审核</view>
<view class="btn" wx:if="{{tabActive == 3}}">编辑发布</view>
<view class="btn default" wx:if="{{tabActive == 3}}">删除项目</view>
<view class="text" wx:if="{{tabActive == 4}}">项目已圆满结束</view>
</view>
</view>
</view> -->
</view>
</view>

113
pages/user/resourcesManage/index.wxss

@ -0,0 +1,113 @@
/* pages/user/resourcesManage/index.wxss */
.manage-page{
width: 100%;
min-height: 100vh;
background: #EEEEEE;
}
.tabs-box{
width: 100%;
padding: 18rpx 58rpx;
background: #fff;
}
.tab{
text-align: center;
font-size: 28rpx;
color: #707070;
position: relative;
}
.tab::after{
display: block;
content: '';
width: 100%;
height: 8rpx;
border-radius: 8rpx;
background: #FF6D31;
position: absolute;
bottom: -22rpx;
left: 50%;
opacity: 0;
transform: translateX(-50%) scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.tab-a::after{
opacity: 1;
left: 0;
transform: translateX(0%) scaleX(1);
}
.list{
width: 100%;
padding: 32rpx 40rpx;
}
.list-item{
width: 100%;
padding: 20rpx 20rpx 32rpx;
background: #fff;
border-radius: 12rpx;
margin-bottom: 20rpx;
}
.number{
margin-bottom: 24rpx;
color: #666666;
font-size: 28rpx;
}
.status{
font-weight: 500;
font-size: 28rpx;
color: #FF5100;
}
.info-box image{
width: 154rpx;
height: 154rpx;
border-radius: 8rpx;
margin-right: 12rpx;
}
.info{
width: 450rpx;
font-size: 28rpx;
}
.i-title{
font-weight: 500;
line-height: 40rpx;
color: #1D1D1D;
}
.i-desc{
font-size: 24rpx;
font-weight: 400;
line-height: 34rpx;
color: #666666;
min-height: 112rpx;
}
.time{
color: #A7A7A7;
font-size: 24rpx;
}
.colO{
font-size: 28rpx;
margin: 24rpx 0 4rpx;
color: #FF5100;
}
.btn-box{
font-size: 30rpx;
font-weight: 500;
line-height: 40px;
color: #FF5100;
}
.btn{
font-size: 28rpx;
width: 150rpx;
height: 56rpx;
line-height: 56rpx;
text-align: center;
background: linear-gradient(134deg, #FFA782 0%, #FF6D31 100%);
border-radius: 12rpx;
color: #fff;
margin-left: 16rpx;
}
.default{
background: linear-gradient(134deg, #BFBFBF 0%, #BFBFBF 100%);
}
.text{
font-size: 28rpx;
color: #666;
}

180
pages/user/resourcesOrder/index.js

@ -0,0 +1,180 @@
// pages/user/resourcesOrder/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
tabActive: 1,
list: []
},
toDemandHall(){
wx.switchTab({
url: '/pages/demandHall/index',
})
},
tabClick(e){
let i = e.currentTarget.dataset.i
this.setData({
tabActive: i
})
if(i == 1){
this.getCommunicates()
} else{
this.getProjectList()
}
},
// 获取 沟通中
getCommunicates(){
app.http('get','Communicate/resourceCommunicates').then((res)=>{
if(res.data.success){
if(res.data.data.length > 0){
res.data.data.map((item)=>{
item.open = false
})
res.data.data[0].open = true
}
this.setData({
list: res.data.data
})
}
})
},
//获取进行中、已结束列表
getProjectList(){
app.http('get','Project/listProject',{projectState: this.data.tabActive -1, projectType: 1}).then((res)=>{
if(res.data.success){
res.data.data.map((item)=>{
item.stageResultsDtoList.map((stage)=>{
if(stage.state == 1){
item.showBtn = true
}
})
})
this.setData({
list: res.data.data
})
}
})
},
// 开启下一阶段
openNextProgress(e){
let item = e.currentTarget.dataset.item
console.log(item)
wx.showModal({
title: '提示!',
content: '是否申请开启下阶段?',
success(res){
if(res.confirm){
app.http('get','Project/applyNextStage',{projectCode: item.projectCode}).then((res)=>{
if(res.data.success){
wx.showToast({
title: '操作成功!',
duration: 2000
})
}
})
}
}
})
},
//点击展开
openClick(e){
let idx = e.currentTarget.dataset.idx
console.log(idx)
let list = this.data.list
list[idx].open = !list[idx].open
this.setData({
list: list
})
},
// 跳转申请详情
toApplyDetail(e){
let data = encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item));
wx.navigateTo({
url: '/pages/demandHall/applyDetail/index?data=' + data,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getCommunicates()
},
// 拨打电话
call(e){
console.log(e.currentTarget.dataset.item)
},
// 立项
createProject(e){
let id = e.currentTarget.dataset.id
wx.showModal({
title: "提示!",
content: '是否确认立项?',
success(res){
if(res.confirm){
wx.navigateTo({
url: '/pages/demandHall/createProject/index?id='+ id,
})
}
}
})
},
// 平台介入
toPlatform(e){
let code = e.currentTarget.dataset.item.projectCode
wx.navigateTo({
url: '/pages/demandHall/platform/index?code=' + code,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/user/resourcesOrder/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "资源订单"
}

170
pages/user/resourcesOrder/index.wxml

@ -0,0 +1,170 @@
<!--pages/user/resourcesOrder/index.wxml-->
<view class="order-page">
<view class="tabs-box acea-row row-between">
<view class="tab {{tabActive == 1 ? 'tab-a' : ''}}" data-i="1" bindtap="tabClick">沟通中</view>
<view class="tab {{tabActive == 2 ? 'tab-a' : ''}}" data-i="2" bindtap="tabClick">进行中</view>
<view class="tab {{tabActive == 3 ? 'tab-a' : ''}}" data-i="3" bindtap="tabClick">已结束</view>
</view>
<view class="list">
<view class="no-list" wx:if="{{list.length == 0}}">
<image src="../../../images/no-needs.png"></image>
<view>暂无订单</view>
<view class="to-btn" bindtap="toDemandHall">去需求广场</view>
</view>
<view wx:if="{{list.length > 0 }}" class="item" wx:for="{{list}}" wx:key="index">
<view class="number acea-row row-between row-middle">
<text wx:if="{{tabActive == 1}}"></text>
<text wx:else>项目编号 {{item.projectCode}}</text>
<view class="status" wx:if="{{item.projectState != 5}}">{{tabActive == 1 ? '沟通中' : tabActive == 2 ? '进行中' : '已结束'}}</view>
<view class="status" wx:else>平台介入中</view>
</view>
<view class="info-box acea-row" >
<image src="{{item.resourceInfo.logo}}" wx:if="{{tabActive == 1}}"></image>
<image src="{{item.projectResource.logo}}" wx:else></image>
<view class="info">
<view class="i-title line1">{{item.resourceInfo.name || item.projectResource.name}}</view>
<view class="tag-item" wx:if="{{tabActive != 1}}">定金尾款</view>
<view class="i-desc" wx:if="{{tabActive == 1}}">{{item.resourceInfo.content}}</view>
<view class="projectinfo-box">
<view class="acea-row row-middle" wx:if="{{tabActive != 1}}">
<view class="p-label">项目名称:</view>
<view>{{item.projectName}}</view>
</view>
<view class="acea-row row-middle line1" wx:if="{{tabActive != 1}}">
<view class="p-label">合作方:</view>
<view>{{item.partner}}</view>
</view>
</view>
</view>
</view>
<view class="concat-list-box" wx:if="{{ tabActive == 1 }}">
<view class="open-btn acea-row row-middle" bindtap="openClick" data-idx="{{index}}">
<text>{{!item.open ? '展开' : '收起'}}</text>
<image class="arrow-down {{!item.open ? '' : 'arrow-up'}}" src="../../../images/arrow-d.png"></image>
</view>
<view class="concat-list {{item.open ? 'list-open' : ''}}">
<view class="concat-item acea-row row-middle row-between" wx:for="{{item.partnerInfos}}" wx:for-item="c" wx:key="index" bindtap="toApplyDetail" data-item="{{item}}">
<image src="{{c.logo}}" class="logo"></image>
<view class="name-box acea-row">
<view class="name acea-row row-middle">
<view class="company-name line1">{{c.name}}</view>
<!-- <text class="concat-status">未沟通</text> -->
</view>
<view class="desc line1">{{c.content}}</view>
</view>
<image src="../../../images/home/call.png" class="call" catchtap="call" data-item="{{c}}"></image>
<view class="create-btn" catchtap="createProject" data-item="{{item}}" data-id="{{c.communicateId}}">立项</view>
</view>
</view>
</view>
<view class="progress-box" wx:if="{{ tabActive != 1 }}">
<view class="progress-item acea-row row-between row-middle" wx:for="{{item.stageResultsDtoList}}" wx:for-item="progress" wx:key="index">
<view class="acea-row row-middle">
<image src="../../../images/home/progress.png"></image>
<text>{{progress.name}} ¥{{progress.money}}</text>
</view>
<view class="progress-status" wx:if="{{progress.state == 0 }}">未开始</view>
<view class="progress-status" wx:if="{{progress.state == 1 }}">申请开启</view>
<view class="progress-status" wx:if="{{progress.state == 2 }}">进行中</view>
<view class="progress-status colorO" wx:if="{{progress.state == 3 }}">已结束</view>
</view>
<!-- <view class="progress-item acea-row row-between row-middle">
<view class="acea-row row-middle">
<image src="../../../images/home/progress.png"></image>
<text>阶段2 定金</text>
</view>
<view class="progress-status">已结束</view>
</view>
<view class="progress-item acea-row row-between row-middle">
<view class="acea-row row-middle">
<image src="../../../images/home/progress.png"></image>
<text>阶段3 尾款</text>
</view>
<view class="progress-status colorO">已结束</view>
</view> -->
</view>
<view class="btn-box acea-row row-between row-bottom" wx:if="{{ tabActive != 1 }}">
<view class="start-time" wx:if="{{ tabActive == 2 }}">{{item.examineTime}}项目开启</view>
<view class="" wx:if="{{ tabActive == 3 }}">项目已圆满结束</view>
<view class="btns acea-row">
<view class="btn-item" wx:if="{{ tabActive == 2 && item.showBtn}}" bindtap="openNextProgress" data-item="{{item}}">开启下阶段</view>
<view class="btn-item" wx:if="{{ tabActive == 2 }}" bindtap="toPlatform" data-item="{{item}}">平台介入</view>
<view class="btn-item default" wx:if="{{ tabActive == 2 }}">申请交付</view>
</view>
</view>
</view>
<!-- <view class="item">
<view class="number acea-row row-between row-middle">
<text>项目编号 17262626272727</text>
<view class="status">{{tabActive == 1 ? '沟通中' : tabActive == 2 ? '进行中' : '已结束'}}</view>
</view>
<view class="info-box acea-row row-middle" >
<image src="../../../images/home/company-img.png"></image>
<view class="info">
<view class="i-title line1">教育类学校官网网站建设</view>
<view class="tag-item">定金尾款</view>
<view class="i-desc" wx:if="{{tabActive == 1}}">针对中小学教育机构、课外培训辅导机构,提供官网升级优化和专业的网站建设定制化服务。</view>
<view class="projectinfo-box">
<view class="acea-row row-middle" wx:if="{{tabActive != 1}}">
<view class="p-label">项目名称:</view>
<view>武汉大学武汉大学网建设</view>
</view>
<view class="acea-row row-middle line1" wx:if="{{tabActive != 1}}">
<view class="p-label">合作方:</view>
<view>武汉楚象科技有限公司</view>
</view>
</view>
</view>
</view>
<view class="concat-list-box" wx:if="{{ tabActive == 1 }}">
<view class="open-btn" bindtap="openClick">展开/收起</view>
<view class="concat-list {{open ? 'list-open' : ''}}">
<view class="concat-item acea-row row-middle row-between" wx:for="{{7}}" wx:key="index" bindtap="toApplyDetail">
<image src="../../../images/user/header.png" class="logo"></image>
<view class="name-box acea-row">
<view class="name acea-row row-middle">
<view class="company-name line1">武汉出牛科技科技有限公有限公司</view>
<text class="concat-status">未沟通</text>
</view>
<view class="desc line1">您好,我对您发布的信息很感兴的信息很感兴趣</view>
</view>
<image src="../../../images/home/call.png" class="call"></image>
<view class="create-btn">立项</view>
</view>
</view>
</view>
<view class="progress-box" wx:if="{{ tabActive != 1 }}">
<view class="progress-item acea-row row-between row-middle">
<view class="acea-row row-middle">
<image src="../../../images/home/progress.png"></image>
<text>阶段1 定金</text>
</view>
<view class="progress-status">已结束</view>
</view>
<view class="progress-item acea-row row-between row-middle">
<view class="acea-row row-middle">
<image src="../../../images/home/progress.png"></image>
<text>阶段2 定金</text>
</view>
<view class="progress-status">已结束</view>
</view>
<view class="progress-item acea-row row-between row-middle">
<view class="acea-row row-middle">
<image src="../../../images/home/progress.png"></image>
<text>阶段3 尾款</text>
</view>
<view class="progress-status colorO">已结束</view>
</view>
</view>
<view class="btn-box acea-row row-between row-bottom" wx:if="{{ tabActive != 1 }}">
<view class="start-time" wx:if="{{ tabActive == 2 }}">2021/08/31项目开启</view>
<view class="" wx:if="{{ tabActive == 3 }}">项目已圆满结束</view>
<view class="btns acea-row">
<view class="btn-item" wx:if="{{ tabActive == 2 }}">开启下阶段</view>
<view class="btn-item default" wx:if="{{ tabActive == 2 }}">申请交付</view>
<view class="btn-item" wx:if="{{ tabActive == 3 }}">合作反馈</view>
</view>
</view>
</view> -->
</view>
</view>

235
pages/user/resourcesOrder/index.wxss

@ -0,0 +1,235 @@
/* pages/user/resourcesOrder/index.wxss */
.order-page{
width: 100%;
min-height: 100vh;
background: #EEEEEE;
}
.tabs-box{
width: 100%;
padding: 18rpx 72rpx;
background: #fff;
}
.tab{
text-align: center;
font-size: 28rpx;
color: #707070;
position: relative;
}
.tab::after{
display: block;
content: '';
width: 100%;
height: 8rpx;
border-radius: 8rpx;
background: #FF6D31;
position: absolute;
bottom: -22rpx;
left: 50%;
opacity: 0;
transform: translateX(-50%) scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.tab-a::after{
opacity: 1;
left: 0;
transform: translateX(0%) scaleX(1);
}
.list{
width: 100%;
padding: 32rpx 40rpx;
}
.no-order{
text-align: center;
line-height: 50rpx;
font-size: 28rpx;
color: #666666;
}
.item{
width: 100%;
padding: 20rpx 20rpx 32rpx;
background: #fff;
border-radius: 12rpx;
margin-bottom: 20rpx;
}
.number{
margin-bottom: 24rpx;
color: #666666;
font-size: 28rpx;
}
.status{
font-weight: 500;
font-size: 28rpx;
color: #FF5100;
}
.info-box image{
width: 154rpx;
height: 154rpx;
border-radius: 8rpx;
margin-right: 12rpx;
}
.info{
width: 450rpx;
font-size: 28rpx;
}
.i-title{
font-weight: 500;
line-height: 40rpx;
color: #1D1D1D;
}
.i-desc{
font-size: 24rpx;
font-weight: 400;
line-height: 34rpx;
color: #666666;
}
.projectinfo-box{
font-size: 24rpx;
color: #1D1D1D;
}
.p-label{
color: #666666;
}
.time{
color: #A7A7A7;
font-size: 24rpx;
}
.colO{
font-size: 28rpx;
margin: 24rpx 0 4rpx;
color: #FF5100;
}
.tag-item{
width: 114rpx;
height: 36rpx;
line-height: 34rpx;
text-align: center;
color: #FF5100;
border: 1rpx solid #FF5100;
background: #fff;
border-radius: 4rpx;
font-size: 24rpx;
margin: 12rpx 0;
}
.open-btn{
color: #FF5100;
font-weight: 500;
font-size: 28rpx;
margin: 20rpx 0;
}
.arrow-down{
width: 25rpx;
height: 14rpx;
margin-left: 12rpx;
}
.arrow-up{
transform: rotate(180deg);
}
.concat-list{
height: 0rpx;
padding-bottom: 0rpx;
margin-bottom: 0rpx;
overflow:hidden;
transition: height 200ms ease;
}
.list-open{
height: 500rpx;
padding-bottom: 28rpx;
margin-bottom: 12rpx;
overflow-y: scroll;
transition: height 300ms ease;
}
.concat-item{
width: 100%;
height: 154rpx;
border-top: 2px solid #EEEEEE;
}
.logo{
width: 92rpx;
height: 92rpx;
}
.call{
width: 54rpx;
height: 54rpx;
}
.name-box{
width: 360rpx;
font-size: 28rpx;
}
.concat-status{
font-size: 24rpx;
display: inline-block;
margin-left: 2rpx;
color: #FF5100;
}
.name{
width: 100%;
font-weight: 500;
line-height: 40rpx;
color: #1D1D1D;
}
.company-name{
width: 78%;
}
.desc{
font-size: 20rpx;
color: #707070;
margin-top: 16rpx;
}
.create-btn{
width: 92rpx;
height: 56rpx;
background: linear-gradient(134deg, #FFA782 0%, #FF6D31 100%);
border-radius: 12rpx;
text-align: center;
line-height: 56rpx;
color: #fff;
}
.progress-box{
margin-top: 32rpx;
padding-top: 32rpx;
border-top: 1px solid #EEEEEE;
}
.progress-item{
width: 100%;
height: 54rpx;
background: #f8f8f8;
padding: 0rpx 20rpx;
font-size: 26rpx;
font-weight: 500;
margin-bottom: 16rpx;
}
.progress-item image{
width: 24rpx;
height: 24rpx;
margin-right: 8rpx;
}
.colorO{
color: #FF8350;
}
.btn-box{
margin-top: 20rpx;
color: #FF5100;
}
.btn-item{
font-size: 28rpx;
width: 162rpx;
height: 56rpx;
line-height: 56rpx;
text-align: center;
background: linear-gradient(134deg, #FFA782 0%, #FF6D31 100%);
border-radius: 12rpx;
color: #fff;
margin-left: 16rpx;
}
.default{
background: linear-gradient(134deg, #BFBFBF 0%, #BFBFBF 100%);
}
.btn-box .start-time{
font-size: 22rpx;
color: #1D1D1D;
}

68
pages/webview/index.js

@ -0,0 +1,68 @@
// pages/webview/index.js
Page({
/**
* 页面的初始数据
*/
data: {
src: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
src: `https://${options.src}`
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

3
pages/webview/index.json

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

2
pages/webview/index.wxml

@ -0,0 +1,2 @@
<!--pages/webview/index.wxml-->
<web-view src="{{src}}"></web-view>

1
pages/webview/index.wxss

@ -0,0 +1 @@
/* pages/webview/index.wxss */

3
project.config.json

@ -30,7 +30,6 @@
"outputPath": ""
},
"enableEngineNative": false,
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
@ -40,7 +39,7 @@
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.17.0",
"libVersion": "2.19.1",
"appid": "wx5348e39dcbbefe1e",
"projectname": "zhaoshangMiniApp",
"debugOptions": {

96
project.private.config.json

@ -53,6 +53,102 @@
"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": "",
"scene": null
}
]
}

0
tabbarComponent/icon/组 1051@2x.png → tabbarComponent/icon/home.png

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
tabbarComponent/icon/icon_release.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
tabbarComponent/icon/icon_release2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

0
tabbarComponent/icon/组 1048@2x.png → tabbarComponent/icon/tab2-a.png

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

0
images/home/组 227@2x.png → tabbarComponent/icon/tab2.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
tabbarComponent/icon/组 1049@2x.png → tabbarComponent/icon/tab3-a.png

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save