Commit 3f63a050 by liang ce

修改绑定第三方账号流程

parent 38cb4896
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"pages/index/index", "pages/index/index",
"pages/aa/aa", "pages/aa/aa",
"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",
...@@ -12,11 +12,10 @@ ...@@ -12,11 +12,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
)}`
}); });
} }
} }
......
.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,
getThirdUserPlatForm getThirdUserPlatForm,
unbindingApp
} 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: "",
appName: "" 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,
appName: e.platform name: e.userName,
isBind: e.userName ? true : false
}); });
}, },
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);
}, },
bindApp() { bindApp() {
if (this.data.isLoading) {
return false;
}
this.setData({
isLoading: true
});
this.sendRequest();
if (this.data.platform === "outlook") { if (this.data.platform === "outlook") {
let data = `${getApp().globalData.userid},${dd.corpId}`; let data = `${getApp().globalData.userid},${dd.corpId}`;
getOutlookUrl(data).then(res => { getOutlookUrl(data).then(res => {
...@@ -58,5 +86,35 @@ create.Page({ ...@@ -58,5 +86,35 @@ create.Page({
}); });
}); });
} }
},
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);
} }
}); });
.relatedAppPage {
height: 100vh;
background: #FFFFFF;
}
.platformMsg {
display: flex;
padding: 34rpx 32rpx;
align-items: center;
}
.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%;
}
.unBinding {
width: 686rpx;
height: 96rpx;
margin: 22rpx auto;
border-radius: 48rpx;
border: 2rpx solid rgba(222, 222, 222, 1);
text-align: center;
line-height: 0.96rem;
font-size: 34rpx;
color: rgba(242, 86, 67, 1);
}
\ No newline at end of file
<view class="relatedAppPage">
<view class="platformMsg" a:if="{{platform === 'outlook'}}">
<view class="platformImg {{platform}}">
</view>
<view class="platformName">
{{appName}}
</view>
</view>
<view class="platformMsg" a:if="{{platform === 'zoom'}}">
<view class="platformImg {{platform}}">
</view>
<view class="platformName">
{{zoom}}
</view>
</view>
<view class="unBinding" onTap="bindApp">
关联{{platform}}
</view>
</view>
<selectpopup showSelectPopup="{{showSelectPopup}}" selectPopupList="{{selectPopupList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
\ No newline at end of file
...@@ -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