Commit 5729d18a by fengzhaoyu

会议详情页接口

parent e51e72c7
......@@ -170,3 +170,11 @@ export function getUserScheduleInTime (data) {
url: `/meet/schedule/getUserScheduleInTime`
})
}
// 获取日程详情
export function getScheduleDetail (data) {
return $http({
method: 'post',
data: JSON.stringify(data),
url: `/meet/schedule/getScheduleDetail`
})
}
\ No newline at end of file
{
"pages": [
"pages/index/index",
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/scheduleDetail/scheduleDetail",
"pages/attendingSituation/attendingSituation",
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/place/place",
"pages/participantsDetail/participantsDetail"
],
......
@import "../../font/iconfont.acss";
page {
background: #f6f6f6;
font-family: PingFangSC-Regular;
font-size: 30rpx;
color: #191F25;
padding-bottom: 128rpx;
}
.list {
background: #fff;
height: 112rpx;
line-height: 112rpx;
display: flex;
padding-left: 32rpx;
}
.headImg {
position: relative;
margin-right: 24rpx;
margin-top: 24rpx;
width: 64rpx;
height: 64rpx;
background: #3296FA;
border-radius: 50%;
color: white;
line-height: 64rpx;
text-align: center;
}
.headImg image {
vertical-align: middle;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
}
.info {
width: 630rpx;
line-height: 112rpx;
height: 112rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.close {
position: absolute;
right: 32rpx;
color: #D8D8D8;
}
.button {
position: fixed;
bottom: 0;
display: flex;
margin-left: 32rpx;
padding-bottom: 32rpx;
background: white;
}
.button view {
width: 335rpx;
height: 96rpx;
border: 1px solid #3296FA;
border-radius: 48px;
text-align: center;
line-height: 96rpx;
font-size: 36rpx;
}
.add {
color: #0080FF;
margin-right: 16rpx;
}
.button .save {
color: white;
background: #3296FA;
border: 1px solid rgba(25, 31, 37, 0.12);
}
.tip {
text-align: center;
line-height: 20rpx;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background: #F25643;
position: absolute;
bottom: 4rpx;
right: -2rpx;
}
\ No newline at end of file
<view>
<view class="list">
<view class="headImg">
<image mode="scaleToFill" src=""/>
<text class="tip"></text>
<!-- <text >dddd</text> -->
</view>
<view class="info">
<text class="name">哈哈哈哈1</text>
</view>
</view>
<view class="list">
<view class="headImg">
<image mode="scaleToFill" src=""/>
<!-- <text >dddd</text> -->
</view>
<view class="info">
<text class="name">哈哈哈哈1</text>
</view>
</view>
<view class="list">
<view class="headImg">
<image mode="scaleToFill" src=""/>
<!-- <text >dddd</text> -->
</view>
<view class="info">
<text class="name">哈哈哈哈1</text>
</view>
</view>
</view>
\ No newline at end of file
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
create.Page({
store: exampleStore,
useAll: true,
data: {
},
onLoad() {
dd.setNavigationBar({
title: `参会人(${this.store.data.participatorList.length}人)`
})
},
});
......@@ -43,7 +43,8 @@
<text>{{locationName}}</text>
<text class="iconshanchu iconfont" catchTap="closePlace"></text>
</view>
<text a:else>添加地点</text>
<text a:else>添加地点
</text>
</view>
</view>
<!-- 参会人 -->
......@@ -70,7 +71,7 @@
</view>
</view>
<view class="tip">
<text class="noConflict" a:if="{{conflictPeope === []}}">
<text class="noConflict" a:if="{{!conflictPeople.length}}">
所有参与者都有空
</text>
<text class="conflict" a:else>
......
......@@ -19,7 +19,7 @@ create.Page({
this.store.data.conflictPeople = []
this.store.data.participatorList = []
this.store.data.locationName = ''
this.store.data.participatorUserId.push(getApp().globalData.userid)
this.store.data.participatorUserId = [getApp().globalData.userid]
this.update()
dd.setNavigationBar({
title: '创建会议'
......@@ -57,6 +57,7 @@ create.Page({
// 选择时间组件回调
changeSelectTime(e) {
if (e.status === 1) {
var date1 = new Date(e.time);
var weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
var w1 = weekList[date1.getDay()];
......@@ -77,6 +78,7 @@ create.Page({
week1: w1,
week2: w2
})
this.conflict()
} else {
this.setData({
......@@ -84,6 +86,7 @@ create.Page({
isShowModal: false,
week1: w1
})
this.conflict()
}
} else {
if (new Date(e.time).getTime() < new Date(this.data.time1).getTime()) {
......@@ -100,6 +103,7 @@ create.Page({
isShowModal: false,
week2: w1
})
this.conflict()
}
}
} else {
......@@ -200,6 +204,7 @@ create.Page({
},
// 会议冲突
conflict() {
this.store.data.conflictPeople = []
let data = {
startTime: `${this.data.time1.replace(/\//g, "-")}:00`,
endTime: `${this.data.time2.replace(/\//g, "-")}:00`,
......
......@@ -83,6 +83,7 @@ create.Page({
},
// 会议冲突
conflict() {
this.store.data.conflictPeople = []
let data = {
startTime: `${this.data.time1}:00`,
endTime: `${this.data.time2}:00`,
......
......@@ -59,7 +59,12 @@ page {
max-width: 400rpx;
}
.scroll>image {
.scroll .imageGroup {
font-size: 24rpx;
color: #fff;
text-align: center;
line-height: 58rpx;
display: inline-block;
vertical-align: top;
border-radius: 50%;
width: 58rpx;
......
......@@ -4,21 +4,27 @@
<view class="icon icondidianmiaoshu iconfont">
</view>
<view class="text">
产品技术评估
{{title}}
</view>
</view>
<view class="place">
<view class="place" a:if="{{!!location.locationName}}">
<view class="icon icondingwei iconfont">
</view>
<view class="text">
西城广场星巴克
{{location.locationName}}
</view>
</view>
<view class="time">
<view class="icon iconshijian iconfont">
</view>
<view class="text">
01月29日 周三 09:00-10:00
<view class="text" a:if="{{isAcrossDay}}">
{{`
${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${startTime.substring(11, 16)} 至
${endTime.substring(5, 7)}月${endTime.substring(8, 10)}日 ${endTime.substring(11, 16)}
`}}
</view>
<view class="text" a:else>
{{`${startTime.substring(5, 7)}月${startTime.substring(8, 10)}日 ${week} ${startTime.substring(11, 16)}-${endTime.substring(11, 16)}`}}
</view>
</view>
</view>
......@@ -26,14 +32,12 @@
<view class="icon iconcanhuiren1 iconfont">
</view>
<view class="scroll">
<image mode="scaleToFill" src=""/>
<image mode="scaleToFill" src=""/>
<image mode="scaleToFill" src=""/>
<image mode="scaleToFill" src=""/>
<image mode="scaleToFill" src=""/>
<image mode="scaleToFill" src=""/>
<image mode="scaleToFill" src=""/>
<image mode="scaleToFill" src=""/>
<text class="imageGroup" a:for="{{userList}}" a:for-item="item">
<text>
<image a:if="{{!!item.participator.headUrl}}" mode="scaleToFill" src="{{item.participator.headUrl}}"/>
<text a:else class="name">{{item.participator.username.substring(item.participator.username.length - 2, item.participator.username.length)}}</text>
</text>
</text>
</view>
<view class="right">
<text class="number">3人参与</text>
......@@ -81,6 +85,5 @@
<text class="icondidianmiaoshu iconfont"></text>
<text>编辑</text>
</view>
</view>
</view>
\ No newline at end of file
import { getScheduleDetail } from '../../api/request.js'
Page({
data: {},
data: {
title: '',
location: '',
startTime: '',
endTime: '',
weeks: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
week: '',
userList: [],
isAcrossDay: true
},
onLoad() {
dd.setNavigationBar({
title: '会议详情'
})
let data = {
id: '1172'
}
getScheduleDetail(data).then(res => {
this.setData({
title: res.data.data.title,
location: res.data.data.location,
startTime: res.data.data.startTime,
endTime: res.data.data.endTime,
userList: res.data.data.userList,
week: this.data.weeks[new Date(res.data.data.startTime).getDay()- 1]
})
this.acrossDay(res.data.data.startTime, res.data.data.endTime)
})
},
// 是否跨天
acrossDay(time1, time2) {
console.log(this.dealTime(time1))
console.log(this.dealTime(time2))
let isAcrossDay = ''
if (JSON.stringify(this.dealTime(time1)) === JSON.stringify(this.dealTime(time2))) {
isAcrossDay = false
} else {
isAcrossDay = true
}
this.setData({
isAcrossDay: isAcrossDay
})
},
// 处理时间
dealTime(time) {
let time1 = time.replace(/-/g,"/")
let date = new Date(time1)
let day = date.getDate()
let year = date.getFullYear()
let month = date.getMonth() + 1
return {
year: year,
month: month,
day: day
}
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment