Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
schedule
Commits
dd6a90e2
Commit
dd6a90e2
authored
Apr 21, 2020
by
xiexiaoqin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
ssh://gitlab.roboming.com:2018/fengzhaoyu/schedule
into dev
parents
286393b2
38cb4896
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
77 deletions
+82
-77
request.js
api/request.js
+5
-23
app.js
app.js
+1
-1
bindingApp.acss
pages/bindingApp/bindingApp.acss
+37
-0
bindingApp.axml
pages/bindingApp/bindingApp.axml
+21
-3
bindingApp.js
pages/bindingApp/bindingApp.js
+13
-48
bindingApp.json
pages/bindingApp/bindingApp.json
+5
-2
No files found.
api/request.js
View file @
dd6a90e2
...
...
@@ -201,19 +201,11 @@ export function getOutlookUrl(data) {
method
:
"POST"
,
data
:
""
,
url
:
`/microsoft/getThirdLoginUrl?state=
${
data
}
`
,
type
:
'binding'
type
:
"binding"
});
}
// 发送给后端outlook code
export
function
authorizationCodeReplacementToken
(
data
)
{
return
$http
({
method
:
"get"
,
data
:
data
,
url
:
`/microsoft/authorizationCodeReplacementToken`
,
type
:
'binding'
});
}
// 发送给后端outlook code
// 获取绑定的app
export
function
getThirdUserPlatForm
(
data
)
{
return
$http
({
method
:
"get"
,
...
...
@@ -235,17 +227,7 @@ export function getZoomUrl(data) {
return
$http
({
method
:
"get"
,
data
:
""
,
url
:
"/zoom/auth"
,
type
:
'binding'
});
}
//
export
function
sendZoomCode
(
data
)
{
return
$http
({
method
:
"get"
,
data
:
data
,
url
:
"/zoom/notice"
,
type
:
'binding'
url
:
`/zoom/auth?orgId=
${
data
.
orgId
}
&userId=
${
data
.
userId
}
`
,
type
:
"binding"
});
}
app.js
View file @
dd6a90e2
...
...
@@ -2,7 +2,7 @@ import { setGlobalStore } from "dd-store";
import
exampleStore
from
"./stores/exampleStore"
;
import
{
checkFullScren
}
from
"./utils/checkFullScren"
;
setGlobalStore
(
exampleStore
);
import
login
from
'./api/login'
;
import
login
from
"./api/login"
;
App
({
onLaunch
(
options
)
{
...
...
pages/bindingApp/bindingApp.acss
View file @
dd6a90e2
.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
pages/bindingApp/bindingApp.axml
View file @
dd6a90e2
<web-view id="web-view-1" src="{{url}}" onMessage="test">
</web-view>
\ 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
pages/bindingApp/bindingApp.js
View file @
dd6a90e2
import
{
getOutlookUrl
,
getZoomUrl
,
authorizationCodeReplacementToken
,
sendZoomCode
,
getThirdUserPlatForm
}
from
"../../api/request"
;
import
"dingtalk-jsapi/entry/mobile"
;
...
...
@@ -12,27 +10,14 @@ create.Page({
data
:
{
$data
:
null
,
url
:
""
,
platform
:
""
platform
:
""
,
appName
:
""
},
onLoad
(
e
)
{
this
.
setData
({
platform
:
e
.
platform
platform
:
e
.
platform
,
appName
:
e
.
platform
});
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
()
{
const
interval
=
setInterval
(()
=>
{
...
...
@@ -54,43 +39,23 @@ create.Page({
});
},
1000
);
},
test
(
e
)
{
const
code
=
e
.
detail
.
code
;
const
state
=
e
.
detail
.
state
;
bindApp
()
{
if
(
this
.
data
.
platform
===
"outlook"
)
{
const
data
=
{
code
:
code
,
state
:
state
};
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
let
data
=
`
${
getApp
().
globalData
.
userid
}
,
${
dd
.
corpId
}
`
;
getOutlookUrl
(
data
).
then
(
res
=>
{
openLink
({
url
:
res
.
data
.
data
});
}
});
}
else
if
(
this
.
data
.
platform
===
"zoom"
)
{
const
data
=
{
code
:
code
,
let
data
=
{
userId
:
getApp
().
globalData
.
userid
,
orgId
:
dd
.
corpId
};
sendZoomCode
(
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
getZoomUrl
(
data
).
then
(
res
=>
{
openLink
({
url
:
res
.
data
.
data
});
}
});
}
}
...
...
pages/bindingApp/bindingApp.json
View file @
dd6a90e2
{}
\ No newline at end of file
{
"usingComponents"
:
{
"selectpopup"
:
"../../components/selectPopup/selectPopup"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment