Commit f00e3fac by xiexiaoqin

fix:conflit

parents 8cd54638 db4f0d0c
import { getInterTime } from '../../utils/utils'; import { getInterTime } from '../../utils/utils';
const currentDate = new Date(); const currentDate = new Date();
const weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']; const weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const durationList = [{ value: 30, label: '30分钟' }, { value: 60, label: '1小时' }, { value: 120, label: '2小时' }]; const durationList = [{ value: 30, label: '30分钟' }, { value: 60, label: '1小时' }, { value: 90, label: '1.5小时' }, { value: 120, label: '2小时' }];
const timeData = generateDate(365); const timeData = generateDate(365);
const timeHour = generateHour(24); const timeHour = generateHour(24);
const timeMin = generateMin(60); const timeMin = generateMin(60);
...@@ -188,10 +188,10 @@ Component({ ...@@ -188,10 +188,10 @@ Component({
const min = endDate.getMinutes(); const min = endDate.getMinutes();
endDate.setMinutes(min + 30); endDate.setMinutes(min + 30);
// 赋值 // 赋值
if (this.props.startTime && new Date(this.props.startTime).getFullYear()) { if (this.props.startTime) {
startDate = new Date(this.props.startTime); startDate = new Date(this.props.startTime);
} }
if (this.props.endTime && new Date(this.props.endTime).getFullYear()) { if (this.props.endTime) {
endDate = new Date(this.props.endTime); endDate = new Date(this.props.endTime);
} }
......
...@@ -17,24 +17,8 @@ create.Component({ ...@@ -17,24 +17,8 @@ create.Component({
this.getData(); this.getData();
}, },
didUpdate() { didUpdate() {
if (typeof this.$store.data.relatedAppNeedUpdate === "object") { if (this.$store.data.relatedAppNeedUpdate) {
let relatedAppList = this.data.relatedAppList; this.$store.data.relatedAppNeedUpdate = false;
let relatedAppPlatformList = this.data.relatedAppPlatformList;
relatedAppList.push({
userName: this.$store.data.relatedAppNeedUpdate.name,
platform: this.$store.data.relatedAppNeedUpdate.platform
});
relatedAppPlatformList.push(
this.$store.data.relatedAppNeedUpdate.platform
);
this.setData({
relatedAppList: relatedAppList,
relatedAppPlatformList: relatedAppPlatformList
});
this.$store.data.relatedAppNeedUpdate = "";
this.update();
} else if (this.$store.data.relatedAppNeedUpdate === "1") {
this.$store.data.relatedAppNeedUpdate = "";
this.update(); this.update();
this.getData(); this.getData();
} }
......
...@@ -4,7 +4,7 @@ Component({ ...@@ -4,7 +4,7 @@ Component({
}, },
props: { props: {
showToast: false, showToast: false,
duration: 2000, duration: 1000,
title: '保存成功', title: '保存成功',
toastIcon: 'iconcanjia3' toastIcon: 'iconcanjia3'
......
...@@ -63,10 +63,19 @@ ...@@ -63,10 +63,19 @@
justify-content: center; justify-content: center;
} }
.loadingToast view { .loadingToast>view {
font-size: 28rpx; font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
padding: 18rpx 26rpx; padding: 18rpx 26rpx;
border-radius: 40rpx; border-radius: 40rpx;
background: rgba(0, 0, 0, .59) background: rgba(0, 0, 0, .59);
display: flex;
justify-content: center;
align-items: center;
}
.loadingToast image {
width: 36rpx;
height: 36rpx;
margin-right: 8rpx;
} }
\ No newline at end of file
...@@ -29,13 +29,28 @@ ...@@ -29,13 +29,28 @@
{{name ? name : 'outlook'}} {{name ? name : 'outlook'}}
</view> </view>
</view> </view>
<view class="{{isBind ? 'unBinding': 'binding'}} bindBtn {{isLoading ? 'loadingBtn' : ''}}"> <view class="{{isBind ? 'unBinding': 'binding'}} bindBtn {{isLoading ? 'loadingBtn' : ''}}" onTap="{{isBind ? 'showPopup' : 'bindApp'}}">
<text onTap="{{isBind ? 'showPopup' : 'bindApp'}}">{{isBind ? '解绑' : '绑定'}}</text> <text>{{isBind ? '解绑' : '绑定'}}</text>
</view> </view>
</view> </view>
<view class="loadingToast" a:if="{{isLoading}}"> <view class="loadingToast" a:if="{{isLoading}}">
<view a:if="{{bindStatus==='loading'}}">
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindLoading.gif"/>
<view> <view>
账号关联中··· 账号关联中···
</view> </view>
</view>
<view a:elif="{{bindStatus==='success'}}">
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindSuccess.png"/>
<view>
关联成功
</view>
</view>
<view a:else>
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindFail.png"/>
<view>
关联失败
</view>
</view>
</view> </view>
<selectpopup showSelectPopup="{{showSelectPopup}}" selectPopupList="{{selectPopupList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup> <selectpopup showSelectPopup="{{showSelectPopup}}" selectPopupList="{{selectPopupList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
\ No newline at end of file
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
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";
import { fail } from "assert";
let interval = ""; let interval = "";
let requestNum = 0; let requestNum = 0;
create.Page({ create.Page({
...@@ -18,7 +19,8 @@ create.Page({ ...@@ -18,7 +19,8 @@ create.Page({
isBind: false, isBind: false,
isLoading: false, isLoading: false,
showSelectPopup: false, showSelectPopup: false,
selectPopupList: [{ text: "取消关联" }] selectPopupList: [{ text: "取消关联" }],
bindStatus: "loading"
}, },
onLoad(e) { onLoad(e) {
this.setData({ this.setData({
...@@ -31,12 +33,17 @@ create.Page({ ...@@ -31,12 +33,17 @@ create.Page({
sendRequest() { sendRequest() {
let that = this; let that = this;
interval = setInterval(() => { interval = setInterval(() => {
if (requestNum >= 300) { if (requestNum >= 180) {
requestNum = 0; requestNum = 0;
that.setData({ that.setData({
isBind: true, isBind: false,
bindStatus: "fail"
});
setTimeout(() => {
that.setData({
isLoading: false isLoading: false
}); });
}, 2000);
clearInterval(interval); clearInterval(interval);
} }
requestNum++; requestNum++;
...@@ -47,12 +54,15 @@ create.Page({ ...@@ -47,12 +54,15 @@ create.Page({
this.setData({ this.setData({
name: item.userName, name: item.userName,
isBind: true, isBind: true,
bindStatus: "success"
});
setTimeout(() => {
that.setData({
isLoading: false isLoading: false
}); });
this.$store.data.relatedAppNeedUpdate = { }, 2000);
name: item.userName, clearInterval(interval);
platform: this.data.platform this.$store.data.relatedAppNeedUpdate = true;
};
this.update(); this.update();
} }
}); });
...@@ -64,7 +74,8 @@ create.Page({ ...@@ -64,7 +74,8 @@ create.Page({
return false; return false;
} }
this.setData({ this.setData({
isLoading: true isLoading: true,
bindStatus: "loading"
}); });
this.sendRequest(); this.sendRequest();
if (this.data.platform === "outlook") { if (this.data.platform === "outlook") {
...@@ -94,7 +105,7 @@ create.Page({ ...@@ -94,7 +105,7 @@ create.Page({
isBind: false, isBind: false,
showSelectPopup: false showSelectPopup: false
}); });
this.$store.data.relatedAppNeedUpdate = "1"; this.$store.data.relatedAppNeedUpdate = true;
this.update(); this.update();
} }
}); });
......
...@@ -193,8 +193,9 @@ ...@@ -193,8 +193,9 @@
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.today { .date .today {
border-left: 8rpx solid rgba(234, 12, 40, 1); border-left: 8rpx solid rgba(234, 12, 40, 1);
color: rgba(10, 10, 10, 1) !important;
} }
.todayNoData { .todayNoData {
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<!-- 天 --> <!-- 天 -->
<block a:elif="{{item.type == 'day' || item.type == 'today'}}"> <block a:elif="{{item.type == 'day' || item.type == 'today'}}">
<view class="date li" id="{{ item.dateStr}}"> <view class="date li" id="{{ item.dateStr}}">
<view class="hasDateTitle {{item.type == 'today' && item.hasDateLabel ? 'today' : ''}} {{item.value.isBeOverdue ? 'overdueLabel':''}}"> <view class="hasDateTitle {{item.value.isBeOverdue ? 'overdueLabel':''}} {{item.type == 'today' && item.hasDateLabel ? 'today' : ''}}">
<view> <view>
{{item.week}} {{item.week}}
</view> </view>
......
...@@ -810,7 +810,7 @@ create.Page({ ...@@ -810,7 +810,7 @@ create.Page({
maxClickCount--; maxClickCount--;
if (maxClickCount == 0) { if (maxClickCount == 0) {
dd.alert({ dd.alert({
content: "0.0.5" content: "0.0.10"
}); });
maxClickCount = 5; maxClickCount = 5;
} }
......
...@@ -120,7 +120,7 @@ page { ...@@ -120,7 +120,7 @@ page {
} }
.hideTitle { .hideTitle {
font-family: PingFangSC-Medium; font-family: PingFangSC-Regular;
font-size: 40rpx; font-size: 40rpx;
line-height: 56rpx; line-height: 56rpx;
color: #1B263D; color: #1B263D;
......
...@@ -156,10 +156,14 @@ create.Page({ ...@@ -156,10 +156,14 @@ create.Page({
editType: this.$store.data.updateInfo.updateType editType: this.$store.data.updateInfo.updateType
}) })
} else { } else {
if (this.$store.data.participatorList.length < 2) {
this.isChange(this.$store.data.updateInfo.updateType, 'only')
} else {
this.setData({ this.setData({
editType: this.$store.data.updateInfo.updateType, editType: this.$store.data.updateInfo.updateType,
'centerPopup.showCenterPopup': true 'centerPopup.showCenterPopup': true
}) })
}
// this.isChange(this.$store.data.updateInfo.updateType, 'only') // this.isChange(this.$store.data.updateInfo.updateType, 'only')
} }
} else { } else {
...@@ -216,12 +220,6 @@ create.Page({ ...@@ -216,12 +220,6 @@ create.Page({
participatorUserId.push(value.participator.userId) participatorUserId.push(value.participator.userId)
originUsersId.push(value.participator.userId) originUsersId.push(value.participator.userId)
originUsers.push(value.participator) originUsers.push(value.participator)
if (value.userId === getApp().globalData.userid) {
this.setData({
aheadTimes: !!value.aheadList ? value.aheadList : [],
'comListData.aheadTimesListId': !!value.aheadList ? value.aheadList : [-1]
})
}
} }
} }
for (let item of this.data.comListData.repeatList) { for (let item of this.data.comListData.repeatList) {
...@@ -230,6 +228,8 @@ create.Page({ ...@@ -230,6 +228,8 @@ create.Page({
} }
} }
this.setData({ this.setData({
aheadTimes: !!res.data.data.aheadTimes ? res.data.data.aheadTimes : [],
'comListData.aheadTimesListId': !!res.data.data.aheadTimes ? res.data.data.aheadTimes : [-1],
mrReserveStatus: res.data.data.mrReserveStatus, mrReserveStatus: res.data.data.mrReserveStatus,
confirmAttendance: res.data.data.confirmAttendance === null ? -9 : res.data.data.confirmAttendance, confirmAttendance: res.data.data.confirmAttendance === null ? -9 : res.data.data.confirmAttendance,
organizer: res.data.data.organizer, organizer: res.data.data.organizer,
...@@ -356,10 +356,15 @@ create.Page({ ...@@ -356,10 +356,15 @@ create.Page({
editType: 'modify_location' editType: 'modify_location'
}) })
} else { } else {
if (this.$store.data.participatorList.length < 2) {
this.isChange('modify_location', 'only')
} else {
this.setData({ this.setData({
editType: 'modify_location', editType: 'modify_location',
'centerPopup.showCenterPopup': true 'centerPopup.showCenterPopup': true
}) })
}
} }
break break
case 'meetingWayModel': case 'meetingWayModel':
...@@ -476,7 +481,15 @@ create.Page({ ...@@ -476,7 +481,15 @@ create.Page({
editType: 'repeat' editType: 'repeat'
}) })
} else { } else {
if (this.$store.data.participatorList.length < 2) {
this.isChange('repeat', 'only') this.isChange('repeat', 'only')
} else {
this.setData({
editType: 'repeat',
'centerPopup.showCenterPopup': true
})
}
} }
break; break;
} }
...@@ -599,10 +612,14 @@ create.Page({ ...@@ -599,10 +612,14 @@ create.Page({
editType: 'modify_time' editType: 'modify_time'
}) })
} else { } else {
if (this.$store.data.participatorList.length < 2) {
this.isChange('modify_time', 'only')
} else {
this.setData({ this.setData({
editType: 'modify_time', editType: 'modify_time',
'centerPopup.showCenterPopup': true 'centerPopup.showCenterPopup': true
}) })
}
// this.isChange('modify_time', 'only') // this.isChange('modify_time', 'only')
} }
}, },
...@@ -709,10 +726,14 @@ create.Page({ ...@@ -709,10 +726,14 @@ create.Page({
const _that = this const _that = this
switch (this.data.conSelectPopupData.selectType) { switch (this.data.conSelectPopupData.selectType) {
case 'common': case 'common':
if (this.data.editType === 'modify_location' || this.data.editType === 'modify_time') { if (this.data.editType === 'modify_location' || this.data.editType === 'modify_time' || this.data.editType === 'repeat') {
if (this.$store.data.participatorList.length < 2) {
this.isChange(this.data.editType, event.currentTarget.dataset.item.id)
} else {
this.setData({ this.setData({
'centerPopup.showCenterPopup': true 'centerPopup.showCenterPopup': true
}) })
}
} else { } else {
this.isChange(this.data.editType, event.currentTarget.dataset.item.id) this.isChange(this.data.editType, event.currentTarget.dataset.item.id)
} }
...@@ -749,6 +770,8 @@ create.Page({ ...@@ -749,6 +770,8 @@ create.Page({
this.$store.data.indexNeedUpdate = true this.$store.data.indexNeedUpdate = true
this.update() this.update()
this.setData({ this.setData({
aheadTimes: [15],
'comListData.aheadTimesListId': [15],
confirmAttendance: 1 confirmAttendance: 1
}) })
this.conflictPeople() this.conflictPeople()
...@@ -1102,8 +1125,8 @@ create.Page({ ...@@ -1102,8 +1125,8 @@ create.Page({
} }
// this.modifySchedule(data, needNotice) // this.modifySchedule(data, needNotice)
}).catch(err => { }).catch(err => {
this.$store.data.startTime = this.$store.data.originalData.startTime.replace(/'-'/g, '/') this.$store.data.startTime = this.$store.data.originalData.startTime.replace(/-/g, '/')
this.$store.data.endTime = this.$store.data.originalData.endTime.replace(/'-'/g, '/') this.$store.data.endTime = this.$store.data.originalData.endTime.replace(/-/g, '/')
this.update() this.update()
this.setData({ this.setData({
week: this.data.weekList[new Date(this.$store.data.originalData.startTime.replace(/-/g, "/")).getDay()], week: this.data.weekList[new Date(this.$store.data.originalData.startTime.replace(/-/g, "/")).getDay()],
...@@ -1221,6 +1244,8 @@ create.Page({ ...@@ -1221,6 +1244,8 @@ create.Page({
this.$store.data.indexNeedUpdate = true this.$store.data.indexNeedUpdate = true
this.update() this.update()
this.setData({ this.setData({
aheadTimes: [15],
'comListData.aheadTimesListId': [15],
confirmAttendance: 1 confirmAttendance: 1
}) })
this.conflictPeople() this.conflictPeople()
......
...@@ -30,7 +30,7 @@ create.Page({ ...@@ -30,7 +30,7 @@ create.Page({
unbind() { unbind() {
unbindingApp(this.data.item.platform).then(res => { unbindingApp(this.data.item.platform).then(res => {
if (res.data.data) { if (res.data.data) {
this.$store.data.relatedAppNeedUpdate = "1"; this.$store.data.relatedAppNeedUpdate = true;
this.update(); this.update();
dd.navigateBack({ dd.navigateBack({
delta: 1 delta: 1
......
...@@ -7,11 +7,23 @@ dd-store@^1.9.0: ...@@ -7,11 +7,23 @@ dd-store@^1.9.0:
resolved "https://registry.yarnpkg.com/dd-store/-/dd-store-1.9.0.tgz#8f531e28b6991919bc60a17148fa9e1bba142397" resolved "https://registry.yarnpkg.com/dd-store/-/dd-store-1.9.0.tgz#8f531e28b6991919bc60a17148fa9e1bba142397"
integrity sha512-bhIkQMcHjNTDGG03riSeLp4UfdOBqWqg+qFfqqwAvgBiARrYbrEWU/YVE5tOV6XOqyfozp+MpZP3SaFyOtuUrw== integrity sha512-bhIkQMcHjNTDGG03riSeLp4UfdOBqWqg+qFfqqwAvgBiARrYbrEWU/YVE5tOV6XOqyfozp+MpZP3SaFyOtuUrw==
dingtalk-jsapi@^2.10.3:
version "2.10.3"
resolved "https://registry.yarnpkg.com/dingtalk-jsapi/-/dingtalk-jsapi-2.10.3.tgz#ade5c2f858f4ac41143d294ae172b34efaeb95e2"
integrity sha512-ozfuwWzOKx4qgfs+ijdN2XgylB8xZ4zxetDp4ND272YDD5C9GJLo5GKhsFR6kQ/lnU0WIzBo2rYjEwZKtMrJxw==
dependencies:
promise-polyfill "^7.1.0"
luxon@^1.21.3: luxon@^1.21.3:
version "1.22.2" version "1.22.2"
resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.22.2.tgz#799d65cc1ed0ba85b4cb3f7dd38fc08a8d1a6750" resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.22.2.tgz#799d65cc1ed0ba85b4cb3f7dd38fc08a8d1a6750"
integrity sha512-vq6eSaOOw1fKob+JXwfu0e3/UFUT4G4HTFRJab7dch8J1OdOGW/vXqCiJsY7rm2In+5gKNYx0EtnYT0Tc5V4Qw== integrity sha512-vq6eSaOOw1fKob+JXwfu0e3/UFUT4G4HTFRJab7dch8J1OdOGW/vXqCiJsY7rm2In+5gKNYx0EtnYT0Tc5V4Qw==
promise-polyfill@^7.1.0:
version "7.1.2"
resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-7.1.2.tgz#ab05301d8c28536301622d69227632269a70ca3b"
integrity sha512-FuEc12/eKqqoRYIGBrUptCBRhobL19PS2U31vMNTfyck1FxPyMfgsXyW4Mav85y/ZN1hop3hOwRlUDok23oYfQ==
rrule@^2.6.4: rrule@^2.6.4:
version "2.6.4" version "2.6.4"
resolved "https://registry.yarnpkg.com/rrule/-/rrule-2.6.4.tgz#7f4f31fda12bc7249bb176c891109a9bc448e035" resolved "https://registry.yarnpkg.com/rrule/-/rrule-2.6.4.tgz#7f4f31fda12bc7249bb176c891109a9bc448e035"
......
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