Commit e4d0b48a by fengzhaoyu

Merge branch 'dev' of http://gitlab.roboming.com/fengzhaoyu/schedule into dev

parents fbdde5a6 53d2fa47
...@@ -201,19 +201,11 @@ export function getOutlookUrl(data) { ...@@ -201,19 +201,11 @@ export function getOutlookUrl(data) {
method: "POST", method: "POST",
data: "", data: "",
url: `/microsoft/getThirdLoginUrl?state=${data}`, url: `/microsoft/getThirdLoginUrl?state=${data}`,
type: 'binding' type: "binding"
}); });
} }
// 发送给后端outlook code
export function authorizationCodeReplacementToken(data) { // 获取绑定的app
return $http({
method: "get",
data: data,
url: `/microsoft/authorizationCodeReplacementToken`,
type: 'binding'
});
}
// 发送给后端outlook code
export function getThirdUserPlatForm(data) { export function getThirdUserPlatForm(data) {
return $http({ return $http({
method: "get", method: "get",
...@@ -235,17 +227,7 @@ export function getZoomUrl(data) { ...@@ -235,17 +227,7 @@ export function getZoomUrl(data) {
return $http({ return $http({
method: "get", method: "get",
data: "", data: "",
url: "/zoom/auth", url: `/zoom/auth?orgId=${data.orgId}&userId=${data.userId}`,
type: 'binding' type: "binding"
});
}
//
export function sendZoomCode(data) {
return $http({
method: "get",
data: data,
url: "/zoom/notice",
type: 'binding'
}); });
} }
...@@ -2,7 +2,7 @@ import { setGlobalStore } from "dd-store"; ...@@ -2,7 +2,7 @@ import { setGlobalStore } from "dd-store";
import exampleStore from "./stores/exampleStore"; import exampleStore from "./stores/exampleStore";
import { checkFullScren } from "./utils/checkFullScren"; import { checkFullScren } from "./utils/checkFullScren";
setGlobalStore(exampleStore); setGlobalStore(exampleStore);
import login from './api/login'; import login from "./api/login";
App({ App({
onLaunch(options) { onLaunch(options) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/meetingRoomList/meetingRoomList", "pages/meetingRoomList/meetingRoomList",
"pages/bindingApp/bindingApp", "pages/appDetails/appDetails",
"pages/meetingDetail/meetingDetail", "pages/meetingDetail/meetingDetail",
"pages/excutorList/excutorList", "pages/excutorList/excutorList",
"pages/createMeeting/createMeeting", "pages/createMeeting/createMeeting",
...@@ -11,11 +11,10 @@ ...@@ -11,11 +11,10 @@
"pages/uploadFile/uploadFile", "pages/uploadFile/uploadFile",
"pages/participantsDetail/participantsDetail", "pages/participantsDetail/participantsDetail",
"pages/applicationDetails/applicationDetails", "pages/applicationDetails/applicationDetails",
"pages/attendeeList/attendeeList", "pages/attendeeList/attendeeList"
"pages/unbindApp/unbindApp"
], ],
"window": { "window": {
"allowsBounceVertical": "YES" "allowsBounceVertical": "YES"
}, },
"pullRefresh": false "pullRefresh": false
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view class="applicationList" a:for="{{relatedAppList}}" a:if="{{item.platform !== 'dingTalk'}}"> <view class="applicationList" a:for="{{relatedAppList}}" a:if="{{item.platform !== 'dingTalk'}}">
<view class="applicationLogo {{item.platform}}"> <view class="applicationLogo {{item.platform}}">
</view> </view>
<view class="applicationMsg" data-item="{{item}}" catchTap="toAppDetails"> <view class="applicationMsg" data-name="{{item.userName}}" data-platform="{{item.platform}}" catchTap="toAppDetails">
<view> <view>
<view> <view>
{{item.userName}} {{item.userName}}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</view> </view>
</view> </view>
<view class="operateIcon"> <view class="operateIcon">
<text class="iconfont iconicon_setting1"></text> <text class="iconfont iconright"></text>
</view> </view>
</view> </view>
</view> </view>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<view class="applicationList" a:if="{{relatedAppPlatformList.indexOf('outlook') === -1}}"> <view class="applicationList" a:if="{{relatedAppPlatformList.indexOf('outlook') === -1}}">
<view class="applicationLogo outlook"> <view class="applicationLogo outlook">
</view> </view>
<view class="applicationMsg" data-platform="outlook" catchTap="bindingApp"> <view class="applicationMsg" data-name="" data-platform="outlook" catchTap="toAppDetails">
<view> <view>
<view> <view>
Outlook日历 Outlook日历
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<view class="applicationList" a:if="{{relatedAppPlatformList.indexOf('zoom') === -1}}"> <view class="applicationList" a:if="{{relatedAppPlatformList.indexOf('zoom') === -1}}">
<view class="applicationLogo zoom"> <view class="applicationLogo zoom">
</view> </view>
<view class="applicationMsg" data-platform="zoom" catchTap="bindingApp"> <view class="applicationMsg" data-name="" data-platform="zoom" catchTap="toAppDetails">
<view> <view>
<view> <view>
Zoom Zoom
......
...@@ -56,16 +56,9 @@ create.Component({ ...@@ -56,16 +56,9 @@ create.Component({
preventSort() { preventSort() {
return false; return false;
}, },
bindingApp(e) {
dd.navigateTo({
url: `./../bindingApp/bindingApp?platform=${e.target.dataset.platform}`
});
},
toAppDetails(e) { toAppDetails(e) {
dd.navigateTo({ dd.navigateTo({
url: `./../unbindApp/unbindApp?item=${JSON.stringify( url: `./../appDetails/appDetails?userName=${e.target.dataset.name}&platform=${e.target.dataset.platform}`
e.target.dataset.item
)}`
}); });
} }
} }
......
...@@ -47,7 +47,7 @@ create.Component({ ...@@ -47,7 +47,7 @@ create.Component({
complete: throttle( complete: throttle(
function () { function () {
const { currentTask } = this.store.data; const { currentTask } = this.store.data;
if (!currentTask.taskInfos.taskTitle) { if ((currentTask.taskInfos && !currentTask.taskInfos.taskTitle) || !currentTask.taskInfos) {
return return
} }
this.props.onComplete() this.props.onComplete()
......
.platformMsg {
display: flex;
padding: 26rpx 32rpx;
align-items: center;
background: #FFFFFF;
margin-top: 16rpx;
}
.platformImg {
width: 60rpx;
height: 60rpx;
margin-right: 24rpx;
}
.outlook {
background: url(../../assests/outlookLogo.png) center /100% 100%;
}
.zoom {
background: url(../../assests/zoomLogo.png) center /100% 100%;
}
.title {
font-size: 28rpx;
color: rgba(25, 31, 37, 1);
line-height: 34rpx;
}
.tip {
font-size: 20rpx;
line-height: 26rpx;
color: rgba(25, 31, 37, .56)
}
.bindBtn {
height: 112rpx;
line-height: 112rpx;
text-align: center;
margin-top: 16rpx;
background: #FFFFFF;
}
.binding {
color: rgba(10, 10, 10, 1);
}
.unBinding {
color: rgba(242, 86, 67, 1);
}
.loadingBtn {
color: rgba(10, 10, 10, 0.4) !important;
}
.loadingToast {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.loadingToast view {
font-size: 28rpx;
color: #FFFFFF;
padding: 18rpx 26rpx;
border-radius: 40rpx;
background: rgba(0, 0, 0, .59)
}
\ No newline at end of file
<view class="relatedAppPage">
<view class="platformMsg" a:if="{{platform === 'outlook'}}">
<view class="platformImg {{platform}}">
</view>
<view class="platformName" a:if="{{!name}}">
<view class="title">
Outlook日历
</view>
<view class="tip">
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="platformName" a:else>
{{name}}
</view>
</view>
<view class="platformMsg" a:if="{{platform === 'zoom'}}">
<view class="platformImg {{platform}}">
</view>
<view class="platformName" a:if="{{!name}}">
<view class="title">
Zoom
</view>
<view class="tip">
支持快速发起音视频会议
</view>
</view>
<view class="platformName" a:else>
{{name ? name : 'outlook'}}
</view>
</view>
<view class="{{isBind ? 'unBinding': 'binding'}} bindBtn {{isLoading ? 'loadingBtn' : ''}}">
<text onTap="{{isBind ? 'unbind' : 'bindApp'}}">{{isBind ? '解绑' : '绑定'}}</text>
</view>
</view>
<view class="loadingToast" a:if="{{isLoading}}">
<view>
账号关联中···
</view>
</view>
<selectpopup showSelectPopup="{{showSelectPopup}}" selectPopupList="{{selectPopupList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
\ No newline at end of file
import { import {
getOutlookUrl, getOutlookUrl,
getZoomUrl, getZoomUrl,
authorizationCodeReplacementToken, getThirdUserPlatForm,
sendZoomCode, unbindingApp
getThirdUserPlatForm
} from "../../api/request"; } from "../../api/request";
import "dingtalk-jsapi/entry/mobile"; import "dingtalk-jsapi/entry/mobile";
import openLink from "dingtalk-jsapi/api/biz/util/openLink"; import openLink from "dingtalk-jsapi/api/biz/util/openLink";
import create from "dd-store"; import create from "dd-store";
let interval = "";
let requestNum = 0;
create.Page({ create.Page({
data: { data: {
$data: null, $data: null,
url: "", url: "",
platform: "" platform: "",
name: "",
isBind: false,
isLoading: false,
showSelectPopup: false,
selectPopupList: [{ text: "取消关联" }]
}, },
onLoad(e) { onLoad(e) {
console.log(e);
this.setData({ this.setData({
platform: e.platform platform: e.platform,
name: e.userName,
isBind: e.userName ? true : false
}); });
this.webViewContext = dd.createWebViewContext("web-view-1");
if (e.platform === "outlook") {
let data = `${getApp().globalData.userid},${dd.corpId}`;
getOutlookUrl(data).then(res => {
openLink({
url: res.data.data
});
});
} else if (e.platform === "zoom") {
getZoomUrl("").then(res => {
this.setData({
url: res.data.data
});
});
}
}, },
onShow() { onShow() {},
const interval = setInterval(() => { sendRequest() {
let that = this;
interval = setInterval(() => {
if (requestNum >= 300) {
requestNum = 0;
that.setData({
isBind: true,
isLoading: false
});
clearInterval(interval);
}
requestNum++;
getThirdUserPlatForm().then(res => { getThirdUserPlatForm().then(res => {
let relatedAppPlatformList = []; let relatedAppPlatformList = [];
res.data.data.forEach(item => { res.data.data.forEach(item => {
if (item.platform === this.data.platform) { if (item.platform === this.data.platform) {
clearInterval(interval); this.setData({
name: item.userName,
isBind: true,
isLoading: false
});
this.$store.data.relatedAppNeedUpdate = { this.$store.data.relatedAppNeedUpdate = {
name: item.userName, name: item.userName,
platform: this.data.platform platform: this.data.platform
}; };
this.update(); this.update();
dd.navigateBack({
delta: 1
});
} }
}); });
}); });
}, 1000); }, 1000);
}, },
test(e) { bindApp() {
const code = e.detail.code; if (this.data.isLoading) {
const state = e.detail.state; return false;
}
this.setData({
isLoading: true
});
this.sendRequest();
if (this.data.platform === "outlook") { if (this.data.platform === "outlook") {
const data = { let data = `${getApp().globalData.userid},${dd.corpId}`;
code: code, getOutlookUrl(data).then(res => {
state: state openLink({
}; url: res.data.data
authorizationCodeReplacementToken(data).then(res => { });
if (res.data.data) {
this.$store.data.relatedAppNeedUpdate = {
name: res.data.data,
platform: this.data.platform
};
this.update();
dd.navigateBack({
delta: 1
});
}
}); });
} else if (this.data.platform === "zoom") { } else if (this.data.platform === "zoom") {
const data = { let data = {
code: code,
userId: getApp().globalData.userid, userId: getApp().globalData.userid,
orgId: dd.corpId orgId: dd.corpId
}; };
sendZoomCode(data).then(res => { getZoomUrl(data).then(res => {
if (res.data.data) { openLink({
this.$store.data.relatedAppNeedUpdate = { url: res.data.data
name: res.data.data, });
platform: this.data.platform
};
this.update();
dd.navigateBack({
delta: 1
});
}
}); });
} }
},
unbind() {
unbindingApp(this.data.platform).then(res => {
if (res.data.data) {
this.setData({
name: "",
isBind: false
});
this.$store.data.relatedAppNeedUpdate = "1";
this.update();
}
});
},
onSelectPopup(e) {
if (e.target.dataset.item.text === "取消关联") {
this.unbind();
}
},
onSelectPopupCancel() {
this.setData({
showSelectPopup: false
});
},
showPopup() {
this.setData({
showSelectPopup: true
});
},
onUnload() {
clearInterval(interval);
} }
}); });
{
"usingComponents": {
"selectpopup": "../../components/selectPopup/selectPopup"
}
}
<web-view id="web-view-1" src="{{url}}" onMessage="test">
</web-view>
\ No newline at end of file
{}
\ No newline at end of file
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<view class="scheduleTime"> <view class="scheduleTime">
<text a:if="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '0'}}">{{item.value.thisDayStartTime}}</text> <text a:if="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '0'}}">{{item.value.thisDayStartTime}}</text>
<text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '1'}}">全天</text> <text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '1'}}">全天</text>
<text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '2'}}">直到{{item.value.thisDayEndTime}}</text> <text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '2'}}">{{ item.value.thisDayEndTime == '00:00' ? '全天' : '直到'+item.value.thisDayEndTime }}</text>
<text a:else>{{item.value.thisDayStartTime}} - {{item.value.thisDayEndTime}}</text> <text a:else>{{item.value.thisDayStartTime}} - {{item.value.thisDayEndTime}}</text>
</view> </view>
</view> </view>
......
...@@ -89,7 +89,7 @@ create.Page({ ...@@ -89,7 +89,7 @@ create.Page({
this.setData({ this.setData({
listLoading: false listLoading: false
}); });
let scheduleItem = JSON.parse(Object.keys(event)[0].split("=")[1]); const scheduleItem = JSON.parse(Object.keys(event)[0].split("=")[1]);
dd.navigateTo({ dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent( url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
JSON.stringify(scheduleItem) JSON.stringify(scheduleItem)
...@@ -322,7 +322,7 @@ create.Page({ ...@@ -322,7 +322,7 @@ create.Page({
pushItem.duration = nextDateList.length; pushItem.duration = nextDateList.length;
for (let i = 1; i < nextDateList.length; i++) { for (let i = 1; i < nextDateList.length; i++) {
if (DateMap.has(nextDateList[i])) { if (DateMap.has(nextDateList[i])) {
DateMap.get(nextDateList[i]).unshift({ DateMap.get(nextDateList[i]).push({
...pushItem, ...pushItem,
isFewDays: i + 1, isFewDays: i + 1,
isfirstDayOrEndDay: nextDateList.length - 1 === i ? "2" : "1" // 0 第一天,1中间的天,2结束的天 isfirstDayOrEndDay: nextDateList.length - 1 === i ? "2" : "1" // 0 第一天,1中间的天,2结束的天
......
...@@ -36,24 +36,20 @@ export function getExcludeDate(data = []) { ...@@ -36,24 +36,20 @@ export function getExcludeDate(data = []) {
}; };
} }
// 返回跨天数 // 返回跨天数
export function getNextDateList(startTime, endTime) { export function getNextDateList(startTime, endTime) {
let days = 0; let days = 0;
const nextDateList = []; const nextDateList = [];
if (startTime.getDate() !== endTime.getDate()) {
//同一个月 //去掉时分
if (startTime.getMonth() == endTime.getMonth()) { const firstDate = new Date(startTime.toLocaleDateString());
days = endTime.getDate() - startTime.getDate(); const secondDate = new Date(endTime.toLocaleDateString());
} days = parseInt(Math.abs(firstDate.getTime() - secondDate.getTime()) / (1000 * 60 * 60 * 24));
//跨月
else { if (endTime.getHours() == 0 && endTime.getMinutes() == 0) {
// 一个月份有多少天new Date(year, month, 0).getDate() days -= 1;
const startMonth = new Date(startTime.getFullYear(), startTime.getMonth(), 0).getDate();
days = startMonth - startTime.getDate() + endTime.getDate()
}
} else {
//跨一个月 不考虑
} }
//返回跨天的日期数组 //返回跨天的日期数组
for (let i = 0; i <= days; i++) { for (let i = 0; i <= days; i++) {
const newDate = new Date(startTime); const newDate = new Date(startTime);
......
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
</view> </view>
<file-list fileView="{{item.fileView}}" organizer="{{organizer}}" currentPeople="{{currentPeople}}" onDeleteMeetingFile="deleteMeetingFile"/> <file-list fileView="{{item.fileView}}" organizer="{{organizer}}" currentPeople="{{currentPeople}}" onDeleteMeetingFile="deleteMeetingFile"/>
</view> </view>
<view a:if="{{item.content}}" class='simple-column'>{{item.content}} {{item.createTime}}</view> <view a:if="{{item.content && ((item.category == 1 || item.taskViewList && item.taskViewList.length > 0) || ( item.fileView && item.fileView.fileInfos && item.fileView.fileInfos.length > 0 ))}}" class='simple-column'>{{item.content}} {{item.createTime}}</view>
</block> </block>
<view class="affair-placeholder" a:if="{{affairList.length == 1 && affairList[0].logType == 'create_schedule'}}"> <view class="affair-placeholder" a:if="{{affairList.length == 1 && affairList[0].logType == 'create_schedule'}}">
<template is="affair-placeholder" data="{{title: '添加文件', tip: '我们不开无准备的会,快来上传会议文件吧。'}}"/> <template is="affair-placeholder" data="{{title: '添加文件', tip: '我们不开无准备的会,快来上传会议文件吧。'}}"/>
......
...@@ -132,10 +132,12 @@ ...@@ -132,10 +132,12 @@
background: rgba(10, 10, 10, 0.2) !important; background: rgba(10, 10, 10, 0.2) !important;
border: 1rpx solid rgba(27, 38, 61, 0.1) !important; border: 1rpx solid rgba(27, 38, 61, 0.1) !important;
} }
.myOccupied { .myOccupied {
background: rgba(234, 12, 40, 1) !important; background: rgba(234, 12, 40, 1) !important;
border: 1rpx solid rgba(27, 38, 61, 0.1) !important; border: 1rpx solid rgba(27, 38, 61, 0.1) !important;
} }
.myReservation { .myReservation {
background: rgba(234, 12, 40, 1); background: rgba(234, 12, 40, 1);
border: 1rpx solid rgba(27, 38, 61, 0.1); border: 1rpx solid rgba(27, 38, 61, 0.1);
...@@ -179,11 +181,6 @@ ...@@ -179,11 +181,6 @@
height: 32rpx; height: 32rpx;
} }
.modalHeader>view {
flex: 1;
color: #191F25;
}
.changeDay { .changeDay {
width: 100%; width: 100%;
border-bottom: 2rpx solid rgba(25, 31, 37, 0.12); border-bottom: 2rpx solid rgba(25, 31, 37, 0.12);
......
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
<view> <view>
<popup show="{{isShowModal}}" onClose="onCancel" position="bottom"> <popup show="{{isShowModal}}" onClose="onCancel" position="bottom">
<view a:if="{{!isShowCalendar}}" class="modalContent"> <view a:if="{{!isShowCalendar}}" class="modalContent">
<view class="modalHeader" onTap="onDetermine"> <view class="modalHeader">
确定 <text onTap="onDetermine">确定</text>
</view> </view>
<view class="modalTimeSlot"> <view class="modalTimeSlot">
<text a:if="{{!modalFooter.startTime || !modalFooter.endTime}}">请选择会议时间</text> <text a:if="{{!modalFooter.startTime || !modalFooter.endTime}}">请选择会议时间</text>
......
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