After Width: | Height: | Size: 280 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 4.4 KiB |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,6 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "申请详情", |
||||
"navigationBarBackgroundColor": "#FF5100", |
||||
"navigationBarTextStyle": "white" |
||||
} |
@ -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> |
@ -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; |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,4 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "发布项目" |
||||
} |
@ -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> |
@ -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; |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,4 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "申请沟通" |
||||
} |
@ -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> |
@ -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; |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,4 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "平台介入" |
||||
} |
@ -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> |
@ -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; |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,4 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "申请沟通" |
||||
} |
@ -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> |
@ -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; |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -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> |
@ -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; |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,4 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "供应/需求编辑" |
||||
} |
@ -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> |
@ -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; |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,4 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "需求管理" |
||||
} |
@ -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> |
@ -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%); |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,4 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "需求订单" |
||||
} |
@ -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> |
@ -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; |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,5 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "资源管理" |
||||
|
||||
} |
@ -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> |
@ -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; |
||||
} |
||||
|
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,4 @@
|
||||
{ |
||||
"usingComponents": {}, |
||||
"navigationBarTitleText": "资源订单" |
||||
} |
@ -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> |
@ -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; |
||||
} |
@ -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 () { |
||||
|
||||
} |
||||
}) |
@ -0,0 +1,2 @@
|
||||
<!--pages/webview/index.wxml--> |
||||
<web-view src="{{src}}"></web-view> |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 729 B After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 729 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |