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
353d6790
Commit
353d6790
authored
5 years ago
by
liang ce
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.roboming.com/fengzhaoyu/schedule
into dev
parents
994bb2df
23c8a1a4
release_beta/1.0.0
…
dev
release/1.0.0
release/2.0.0
release/2.1.0
release/dev/2.0.0
release/dev/2.1.0
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
99 additions
and
174 deletions
+99
-174
binding.js
api/binding.js
+0
-66
http.js
api/http.js
+9
-66
login.js
api/login.js
+9
-11
request.js
api/request.js
+12
-10
xFetch.js
api/xFetch.js
+36
-0
app.js
app.js
+6
-6
package-lock.json
package-lock.json
+4
-4
index.acss
pages/index/index.acss
+3
-3
index.axml
pages/index/index.axml
+7
-4
index.js
pages/index/index.js
+13
-4
No files found.
api/binding.js
deleted
100644 → 0
View file @
994bb2df
import
{
login
}
from
"./login"
;
export
default
function
http
(
data
)
{
if
(
getApp
().
globalData
.
token
!==
""
)
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
dd
.
httpRequest
({
headers
:
{
"Content-Type"
:
"application/json;charset=UTF-8"
,
Authorization
:
`Bearer
${
getApp
().
globalData
.
token
}
`
},
url
:
`
${
getApp
().
globalData
.
globalUrl2
}${
data
.
url
}
`
,
method
:
data
.
method
,
dataType
:
"json"
,
data
:
data
.
data
,
success
:
function
(
res
)
{
if
(
res
.
data
.
code
==
0
)
{
resolve
(
res
);
}
else
{
dd
.
alert
({
content
:
"网络异常"
,
buttonText
:
"确定"
});
}
},
fail
:
function
(
res
)
{
dd
.
alert
({
content
:
"网络异常"
,
buttonText
:
"确定"
});
rejects
(
res
);
}
});
});
}
else
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
login
().
then
(
res
=>
{
// const { oapiUser } = res.data.data;
// getApp().globalData.token = res.data.data.accessToken.access_token;
// getApp().globalData.name = res.data.data.oapiUser.name;
// getApp().globalData.userid = res.data.data.oapiUser.userid;
// getApp().globalData.avatar = res.data.data.oapiUser.avatar;
// getApp().globalData.userInfo = JSON.stringify({
// username: oapiUser.name,
// userId: oapiUser.userid,
// headUrl: oapiUser.avatar,
// platform: "dingtalk"
// });
dd
.
httpRequest
({
headers
:
{
"Content-Type"
:
"application/json"
,
Authorization
:
`Bearer
${
getApp
().
globalData
.
token
}
`
},
url
:
`
${
getApp
().
globalData
.
globalUrl
}${
data
.
url
}
`
,
method
:
data
.
method
,
data
:
data
.
data
,
dataType
:
"json"
,
success
:
function
(
res
)
{
resolve
(
res
);
},
fail
:
function
(
res
)
{
rejects
(
res
);
}
});
});
});
}
}
This diff is collapsed.
Click to expand it.
api/http.js
View file @
353d6790
import
{
login
}
from
"./login"
;
import
login
from
"./login"
;
export
default
function
http
(
data
)
{
import
xFetch
from
'./xFetch'
;
if
(
getApp
().
globalData
.
token
!==
""
)
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
export
default
async
function
http
(
options
)
{
dd
.
httpRequest
({
if
(
!
getApp
().
globalData
.
token
)
{
headers
:
{
await
login
();
"Content-Type"
:
"application/json;charset=UTF-8"
,
}
Authorization
:
`Bearer
${
getApp
().
globalData
.
token
}
`
return
xFetch
(
options
);
},
url
:
`
${
getApp
().
globalData
.
globalUrl
}${
data
.
url
}
`
,
method
:
data
.
method
,
dataType
:
"json"
,
data
:
data
.
data
,
success
:
function
(
res
)
{
if
(
res
.
data
.
code
==
0
)
{
resolve
(
res
);
}
else
{
dd
.
alert
({
content
:
res
.
data
.
msg
||
"网络异常"
,
buttonText
:
"确定"
});
}
},
fail
:
function
(
res
)
{
dd
.
alert
({
content
:
"网络异常"
,
buttonText
:
"确定"
});
rejects
(
res
);
}
});
});
}
else
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
login
().
then
(
res
=>
{
// const { oapiUser } = res.data.data;
// getApp().globalData.token = res.data.data.accessToken.access_token;
// // getApp().globalData.token = 'd2563d3a-7723-4f76-ad04-005815893328';
// getApp().globalData.name = res.data.data.oapiUser.name;
// getApp().globalData.userid = res.data.data.oapiUser.userid;
// getApp().globalData.avatar = res.data.data.oapiUser.avatar;
// getApp().globalData.userInfo = JSON.stringify({
// username: oapiUser.name,
// userId: oapiUser.userid,
// headUrl: oapiUser.avatar,
// platform: "dingtalk"
// });
dd
.
httpRequest
({
headers
:
{
"Content-Type"
:
"application/json"
,
Authorization
:
`Bearer
${
getApp
().
globalData
.
token
}
`
},
url
:
`
${
getApp
().
globalData
.
globalUrl
}${
data
.
url
}
`
,
method
:
data
.
method
,
data
:
data
.
data
,
dataType
:
"json"
,
success
:
function
(
res
)
{
resolve
(
res
);
},
fail
:
function
(
res
)
{
rejects
(
res
);
}
});
});
});
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
api/login.js
View file @
353d6790
let
lock
=
false
;
let
lock
=
false
;
export
async
function
login
(
data
)
{
export
default
async
function
login
(
)
{
if
(
lock
==
true
)
{
if
(
lock
==
true
)
{
await
waitLockRelease
(
2
0
);
await
waitLockRelease
(
5
0
);
return
Promise
.
resolve
()
;
return
;
}
}
lock
=
true
;
lock
=
true
;
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -18,11 +18,8 @@ export async function login(data) {
...
@@ -18,11 +18,8 @@ export async function login(data) {
method
:
'POST'
,
method
:
'POST'
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
const
{
oapiUser
}
=
res
.
data
.
data
;
const
{
oapiUser
}
=
res
.
data
.
data
;
getApp
().
globalData
.
token
=
res
.
data
.
data
.
accessToken
.
access_token
;
getApp
().
globalData
.
token
=
res
.
data
.
data
.
accessToken
.
access_token
;
// getApp().globalData.token = 'd2563d3a-7723-4f76-ad04-005815893328';
getApp
().
globalData
.
name
=
res
.
data
.
data
.
oapiUser
.
name
;
getApp
().
globalData
.
name
=
res
.
data
.
data
.
oapiUser
.
name
;
getApp
().
globalData
.
userid
=
res
.
data
.
data
.
oapiUser
.
userid
;
getApp
().
globalData
.
userid
=
res
.
data
.
data
.
oapiUser
.
userid
;
getApp
().
globalData
.
avatar
=
res
.
data
.
data
.
oapiUser
.
avatar
;
getApp
().
globalData
.
avatar
=
res
.
data
.
data
.
oapiUser
.
avatar
;
...
@@ -35,16 +32,17 @@ export async function login(data) {
...
@@ -35,16 +32,17 @@ export async function login(data) {
lock
=
false
;
lock
=
false
;
resolve
(
res
)
resolve
(
res
)
},
},
fail
:
function
(
res
)
{
fail
:
function
(
err
)
{
lock
=
false
;
lock
=
false
;
resolve
(
res
)
reject
(
err
);
console
.
log
(
'err'
,
res
)
console
.
log
(
'err:'
+
err
);
}
}
})
})
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
console
.
log
(
err
)
lock
=
false
;
reject
(
err
);
console
.
log
(
'fail:'
+
err
);
}
}
})
})
})
})
...
...
This diff is collapsed.
Click to expand it.
api/request.js
View file @
353d6790
const
app
=
getApp
();
import
$http
from
"./http"
;
import
$http
from
"./http"
;
import
$binding
from
"./binding"
;
// 区域标签树
// 区域标签树
export
function
getRoomTree
()
{
export
function
getRoomTree
()
{
return
$http
({
return
$http
({
...
@@ -199,18 +197,20 @@ export function meetingCollection(data) {
...
@@ -199,18 +197,20 @@ export function meetingCollection(data) {
}
}
// 获取outlook页面授权地址
// 获取outlook页面授权地址
export
function
getOutlookUrl
(
data
)
{
export
function
getOutlookUrl
(
data
)
{
return
$
binding
({
return
$
http
({
method
:
"POST"
,
method
:
"POST"
,
data
:
""
,
data
:
""
,
url
:
`/microsoft/getThirdLoginUrl?state=
${
data
}
`
url
:
`/microsoft/getThirdLoginUrl?state=
${
data
}
`
,
type
:
'binding'
});
});
}
}
// 发送给后端outlook code
// 发送给后端outlook code
export
function
authorizationCodeReplacementToken
(
data
)
{
export
function
authorizationCodeReplacementToken
(
data
)
{
return
$
binding
({
return
$
http
({
method
:
"get"
,
method
:
"get"
,
data
:
data
,
data
:
data
,
url
:
`/microsoft/authorizationCodeReplacementToken`
url
:
`/microsoft/authorizationCodeReplacementToken`
,
type
:
'binding'
});
});
}
}
// 发送给后端outlook code
// 发送给后端outlook code
...
@@ -232,18 +232,20 @@ export function unbindingApp(data) {
...
@@ -232,18 +232,20 @@ export function unbindingApp(data) {
}
}
// 获取zoom授权页面
// 获取zoom授权页面
export
function
getZoomUrl
(
data
)
{
export
function
getZoomUrl
(
data
)
{
return
$
binding
({
return
$
http
({
method
:
"get"
,
method
:
"get"
,
data
:
""
,
data
:
""
,
url
:
"/zoom/auth"
url
:
"/zoom/auth"
,
type
:
'binding'
});
});
}
}
//
//
export
function
sendZoomCode
(
data
)
{
export
function
sendZoomCode
(
data
)
{
return
$
binding
({
return
$
http
({
method
:
"get"
,
method
:
"get"
,
data
:
data
,
data
:
data
,
url
:
"/zoom/notice"
url
:
"/zoom/notice"
,
type
:
'binding'
});
});
}
}
This diff is collapsed.
Click to expand it.
api/xFetch.js
0 → 100644
View file @
353d6790
export
default
function
xFetch
({
url
,
method
,
data
,
type
})
{
if
(
type
==
'binding'
)
{
url
=
`
${
getApp
().
globalData
.
globalUrl2
}${
url
}
`
}
else
{
url
=
`
${
getApp
().
globalData
.
globalUrl
}${
url
}
`
}
return
new
Promise
((
resolve
,
rejects
)
=>
{
dd
.
httpRequest
({
headers
:
{
"Content-Type"
:
"application/json;charset=UTF-8"
,
Authorization
:
`Bearer
${
getApp
().
globalData
.
token
}
`
},
url
:
url
,
method
:
method
,
dataType
:
"json"
,
data
:
data
,
// timeout: 280,
success
:
function
(
res
)
{
if
(
res
.
data
.
code
==
0
)
{
resolve
(
res
);
}
else
{
rejects
(
res
);
dd
.
alert
({
content
:
res
.
data
.
msg
||
"请求数据异常"
,
buttonText
:
"确定"
});
}
},
fail
:
function
(
err
)
{
rejects
({
refresh
:
true
});
}
});
});
}
This diff is collapsed.
Click to expand it.
app.js
View file @
353d6790
...
@@ -2,19 +2,19 @@ import { setGlobalStore } from "dd-store";
...
@@ -2,19 +2,19 @@ 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'
;
App
({
App
({
onLaunch
(
options
)
{
onLaunch
(
options
)
{
// 第一次打开
// 第一次打开
// options.query == {number:1}
// options.query == {number:1}
// console.info('App onLaunch'
);
login
(
);
this
.
globalData
.
isFullScren
=
checkFullScren
;
this
.
globalData
.
isFullScren
=
checkFullScren
;
},
},
onShow
(
options
)
{
onShow
(
options
)
{
// 从后台被 scheme 重新打开
// 从后台被 scheme 重新打开
// options.query == {number:1}
// options.query == {number:1}
},
},
globalData
:
{
globalData
:
{
isFullScren
:
false
,
isFullScren
:
false
,
loading
:
false
,
loading
:
false
,
...
@@ -23,9 +23,9 @@ App({
...
@@ -23,9 +23,9 @@ App({
userid
:
""
,
userid
:
""
,
name
:
""
,
name
:
""
,
userInfo
:
""
,
userInfo
:
""
,
globalUrl
:
"https://gateway-beta.mingwork.com"
,
//beta地址
//
globalUrl: "https://gateway-beta.mingwork.com", //beta地址
globalUrl2
:
"https://third-authentication-beta.mingwork.com"
//
globalUrl2: "https://third-authentication-beta.mingwork.com"
//
globalUrl: "https://gateway2.mingwork.com", // 线上地址
globalUrl
:
"https://gateway2.mingwork.com"
,
// 线上地址
// globalUrl2: "https://third-authentication.mingwork.com" //beta
地址
globalUrl2
:
"https://third-authentication.mingwork.com"
//线上
地址
}
}
});
});
This diff is collapsed.
Click to expand it.
package-lock.json
View file @
353d6790
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
},
},
"dingtalk-jsapi"
:
{
"dingtalk-jsapi"
:
{
"version"
:
"2.10.3"
,
"version"
:
"2.10.3"
,
"resolved"
:
"https://registry.npm
js.org/dingtalk-jsapi/-
/dingtalk-jsapi-2.10.3.tgz"
,
"resolved"
:
"https://registry.npm
.taobao.org/dingtalk-jsapi/download
/dingtalk-jsapi-2.10.3.tgz"
,
"integrity"
:
"sha
512-ozfuwWzOKx4qgfs+ijdN2XgylB8xZ4zxetDp4ND272YDD5C9GJLo5GKhsFR6kQ/lnU0WIzBo2rYjEwZKtMrJxw=
="
,
"integrity"
:
"sha
1-reXC+Fj0rEEUPSlK4XKzTvrrleI
="
,
"requires"
:
{
"requires"
:
{
"promise-polyfill"
:
"^7.1.0"
"promise-polyfill"
:
"^7.1.0"
}
}
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
},
},
"promise-polyfill"
:
{
"promise-polyfill"
:
{
"version"
:
"7.1.2"
,
"version"
:
"7.1.2"
,
"resolved"
:
"https://registry.npm
js.org/promise-polyfill/-
/promise-polyfill-7.1.2.tgz"
,
"resolved"
:
"https://registry.npm
.taobao.org/promise-polyfill/download
/promise-polyfill-7.1.2.tgz"
,
"integrity"
:
"sha
512-FuEc12/eKqqoRYIGBrUptCBRhobL19PS2U31vMNTfyck1FxPyMfgsXyW4Mav85y/ZN1hop3hOwRlUDok23oYfQ=
="
"integrity"
:
"sha
1-qwUwHYwoU2MBYi1pInYyJppwyjs
="
},
},
"rrule"
:
{
"rrule"
:
{
"version"
:
"2.6.4"
,
"version"
:
"2.6.4"
,
...
...
This diff is collapsed.
Click to expand it.
pages/index/index.acss
View file @
353d6790
...
@@ -388,9 +388,9 @@
...
@@ -388,9 +388,9 @@
.iconicon_days {
.iconicon_days {
position: absolute;
position: absolute;
left:
7
rpx;
left:
10
rpx;
top: 1
0
rpx;
top: 1
2
rpx;
font-size: 2
7
rpx;
font-size: 2
3
rpx;
}
}
.tabBarView .iconicon_days {
.tabBarView .iconicon_days {
...
...
This diff is collapsed.
Click to expand it.
pages/index/index.axml
View file @
353d6790
<import src="../../template/loading/loading.axml"/>
<import src="../../template/loading/loading.axml"/>
<import src="../../template/fullScreen/fullScreen.axml"/>
<import src="../../template/fullScreen/fullScreen.axml"/>
<view hidden="{{$data.tabBarIndex === '1'}}">
<view a:if='{{refresh}}' onTap="onLoad">连接超时,请重试,刷新按钮</view>
<block a:else>
<view hidden="{{$data.tabBarIndex === '1'}}">
<import src="../../template/affairBlank/index.axml"/>
<import src="../../template/affairBlank/index.axml"/>
<view class="{{isStopBodyScroll ? 'scroll-lock' : ''}}" onTap="closeSwipe" onTouchStart="closeSwipe" onTouchMove="closeSwipe" onTouchEnd="closeSwipe">
<view class="{{isStopBodyScroll ? 'scroll-lock' : ''}}" onTap="closeSwipe" onTouchStart="closeSwipe" onTouchMove="closeSwipe" onTouchEnd="closeSwipe">
<block a:if="{{!listLoading}}">
<block a:if="{{!listLoading}}">
...
@@ -42,8 +44,8 @@
...
@@ -42,8 +44,8 @@
<template is="loading" a:else>
<template is="loading" a:else>
</template>
</template>
</view>
</view>
</view>
</view>
<view hidden="{{$data.tabBarIndex === '0'}}">
<view hidden="{{$data.tabBarIndex === '0'}}">
<view a:if="{{!loading}}">
<view a:if="{{!loading}}">
<view class="scheduleHeader">
<view class="scheduleHeader">
<view>{{currentData.split('/')[0]}}年{{currentData.split('/')[1] || '1'}}月</view>
<view>{{currentData.split('/')[0]}}年{{currentData.split('/')[1] || '1'}}月</view>
...
@@ -119,7 +121,8 @@
...
@@ -119,7 +121,8 @@
</view>
</view>
<template is="loading" a:else>
<template is="loading" a:else>
</template>
</template>
</view>
</view>
</block>
<view class="tabBarContent">
<view class="tabBarContent">
<view class="tabBar">
<view class="tabBar">
<view onTap="changeTabBar" data-tabbar='0' data-title='动态'>
<view onTap="changeTabBar" data-tabbar='0' data-title='动态'>
...
...
This diff is collapsed.
Click to expand it.
pages/index/index.js
View file @
353d6790
...
@@ -28,6 +28,7 @@ import create from "dd-store";
...
@@ -28,6 +28,7 @@ import create from "dd-store";
let
maxClickCount
=
5
;
let
maxClickCount
=
5
;
create
.
Page
({
create
.
Page
({
data
:
{
data
:
{
refresh
:
false
,
$data
:
null
,
$data
:
null
,
iconDay
:
currentDate
.
getDate
(),
iconDay
:
currentDate
.
getDate
(),
scheduleList
:
[],
scheduleList
:
[],
...
@@ -184,6 +185,12 @@ create.Page({
...
@@ -184,6 +185,12 @@ create.Page({
if
(
callBack
)
{
if
(
callBack
)
{
callBack
();
callBack
();
}
}
}).
catch
(
err
=>
{
// if (err && err.refresh) {
// this.setData({
// refresh: true
// })
// }
});
});
},
},
//动态置顶
//动态置顶
...
@@ -425,7 +432,7 @@ create.Page({
...
@@ -425,7 +432,7 @@ create.Page({
}
}
// 取出DateMap的value值平铺到DateList
// 取出DateMap的value值平铺到DateList
const
DateList
=
[];
const
DateList
=
[];
DateMap
.
forEach
(
function
(
value
,
key
)
{
DateMap
.
forEach
(
function
(
value
,
key
)
{
const
keyDate
=
new
Date
(
key
);
const
keyDate
=
new
Date
(
key
);
const
year
=
keyDate
.
getFullYear
();
const
year
=
keyDate
.
getFullYear
();
const
month
=
keyDate
.
getMonth
();
const
month
=
keyDate
.
getMonth
();
...
@@ -464,7 +471,7 @@ create.Page({
...
@@ -464,7 +471,7 @@ create.Page({
}
}
// 有日程长度
// 有日程长度
if
(
value
.
length
!==
0
)
{
if
(
value
.
length
!==
0
)
{
value
.
sort
(
function
(
a
,
b
)
{
value
.
sort
(
function
(
a
,
b
)
{
return
a
.
startTime
.
getTime
()
-
b
.
startTime
.
getTime
();
return
a
.
startTime
.
getTime
()
-
b
.
startTime
.
getTime
();
});
});
value
.
forEach
((
item
,
index
)
=>
{
value
.
forEach
((
item
,
index
)
=>
{
...
@@ -508,6 +515,8 @@ create.Page({
...
@@ -508,6 +515,8 @@ create.Page({
),
),
loading
:
false
loading
:
false
});
});
//定位到当前日期
this
.
backToToday
(
"first"
);
},
},
//日程上拉加载
//日程上拉加载
lower
()
{
lower
()
{
...
@@ -690,7 +699,7 @@ create.Page({
...
@@ -690,7 +699,7 @@ create.Page({
createMeeting
()
{
createMeeting
()
{
dd
.
navigateTo
({
url
:
"./../createMeeting/createMeeting"
});
dd
.
navigateTo
({
url
:
"./../createMeeting/createMeeting"
});
},
},
nextDetail
:
throttle
(
function
(
e
)
{
nextDetail
:
throttle
(
function
(
e
)
{
dd
.
navigateTo
({
dd
.
navigateTo
({
url
:
`./../meetingDetail/meetingDetail?scheduleItem=
${
encodeURIComponent
(
url
:
`./../meetingDetail/meetingDetail?scheduleItem=
${
encodeURIComponent
(
JSON
.
stringify
(
e
.
target
.
dataset
.
item
)
JSON
.
stringify
(
e
.
target
.
dataset
.
item
)
...
@@ -773,7 +782,7 @@ create.Page({
...
@@ -773,7 +782,7 @@ create.Page({
maxClickCount
--
;
maxClickCount
--
;
if
(
maxClickCount
==
0
)
{
if
(
maxClickCount
==
0
)
{
dd
.
alert
({
dd
.
alert
({
content
:
"版本号22
0
"
content
:
"版本号22
2
"
});
});
maxClickCount
=
5
;
maxClickCount
=
5
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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