Commit 5847d9c8 by liang ce

接入zoom,取消绑定二次确认

parent 20827664
...@@ -223,3 +223,20 @@ export function unbindingApp(data) { ...@@ -223,3 +223,20 @@ export function unbindingApp(data) {
url: `/admin/third/user/remove/${data}` url: `/admin/third/user/remove/${data}`
}); });
} }
// 获取zoom授权页面
export function getZoomUrl(data) {
return $binding({
method: "get",
data: "",
url: "https://third-authentication-beta.mingwork.com/zoom/auth"
});
}
//
export function sendZoomCode(data) {
return $binding({
method: "get",
data: data,
url: "https://third-authentication-beta.mingwork.com/zoom/notice"
});
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"pages": [ "pages": [
"pages/scheduleList/scheduleList", "pages/scheduleList/scheduleList",
"pages/meetingRoomList/meetingRoomList", "pages/meetingRoomList/meetingRoomList",
"pages/bindingOutlook/bindingOutlook", "pages/bindingApp/bindingApp",
"pages/meetingDetail/meetingDetail", "pages/meetingDetail/meetingDetail",
"pages/excutorList/excutorList", "pages/excutorList/excutorList",
"pages/createMeeting/createMeeting", "pages/createMeeting/createMeeting",
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"pages/participantsDetail/participantsDetail", "pages/participantsDetail/participantsDetail",
"pages/applicationDetails/applicationDetails", "pages/applicationDetails/applicationDetails",
"pages/attendeeList/attendeeList", "pages/attendeeList/attendeeList",
"pages/outlookDetails/outlookDetails" "pages/unbindApp/unbindApp"
], ],
"window": { "window": {
"allowsBounceVertical": "YES" "allowsBounceVertical": "YES"
......
...@@ -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="bindingOutlook"> <view class="applicationMsg" data-platform="outlook" catchTap="bindingApp">
<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"> <view class="applicationMsg" data-platform="zoom" catchTap="bindingApp">
<view> <view>
<view> <view>
Zoom Zoom
......
...@@ -56,14 +56,14 @@ create.Component({ ...@@ -56,14 +56,14 @@ create.Component({
preventSort() { preventSort() {
return false; return false;
}, },
bindingOutlook(e) { bindingApp(e) {
dd.navigateTo({ dd.navigateTo({
url: `./../bindingOutlook/bindingOutlook?platform=${e.target.dataset.platform}` url: `./../bindingApp/bindingApp?platform=${e.target.dataset.platform}`
}); });
}, },
toAppDetails(e) { toAppDetails(e) {
dd.navigateTo({ dd.navigateTo({
url: `./../outlookDetails/outlookDetails?item=${JSON.stringify( url: `./../unbindApp/unbindApp?item=${JSON.stringify(
e.target.dataset.item e.target.dataset.item
)}` )}`
}); });
......
<web-view id="web-view-1" src="{{url}}" onMessage="test">
</web-view>
\ No newline at end of file
import {
getOutlookUrl,
authorizationCodeReplacementToken
} from "../../api/request";
import create from "dd-store";
create.Page({
data: {
$data: null,
url: "",
platform: ''
},
onLoad(e) {
this.setData({
platform: e.platform
})
this.webViewContext = dd.createWebViewContext("web-view-1");
let data = `${getApp().globalData.userid},${dd.corpId}`;
getOutlookUrl(data).then(res => {
this.setData({
url: res.data.data
});
});
},
test(e) {
const code = e.detail.code;
console.log(code);
const data = {
code: code,
state: `${getApp().globalData.userid},${dd.corpId}`
};
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
});
}
});
}
});
.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="{{item.platform === 'outlook'}}">
<view class="platformImg {{item.platform}}">
</view>
<view class="platformName">
{{item.thirdUserIdentify}}
</view>
</view>
<view class="platformMsg" a:if="{{item.platform === 'zoom'}}">
<view class="platformImg {{item.platform}}">
</view>
<view class="platformName">
{{item.thirdUserIdentify}}
</view>
</view>
<view class="unBinding" onTap="unbind">
取消关联
</view>
</view>
\ No newline at end of file
import { unbindingApp } from "../../api/request";
import create from "dd-store";
create.Page({
data: {
$data: null,
item: ""
},
onLoad(e) {
this.setData({
item: JSON.parse(e.item)
});
},
unbind() {
unbindingApp(this.data.item.platform).then(res => {
if (res.data.data) {
this.$store.data.relatedAppNeedUpdate = "1";
this.update();
dd.navigateBack({
delta: 1
});
}
});
}
});
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