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
73bf1636
Commit
73bf1636
authored
Nov 11, 2020
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/2.0.0' of
https://gitlab.mingwork.com/fengzhaoyu/schedule
into release/2.0.0
parents
013b1be9
9768d344
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
9 deletions
+37
-9
login.js
api/login.js
+7
-0
xFetch.js
api/xFetch.js
+4
-3
notes.acss
components/notes/notes.acss
+5
-0
remark.acss
components/remark/remark.acss
+1
-0
config.js
config.js
+1
-1
index.axml
pages/index/index.axml
+1
-1
index.js
pages/index/index.js
+11
-2
meetingDetail.acss
pages/meetingDetail/meetingDetail.acss
+1
-0
index.axml
template/refresh/index.axml
+3
-1
utils.js
utils/utils.js
+3
-1
No files found.
api/login.js
View file @
73bf1636
let
lock
=
false
;
let
lock
=
false
;
import
{
alertOnce
}
from
'./xFetch'
;
export
default
async
function
login
()
{
export
default
async
function
login
()
{
if
(
lock
==
true
)
{
if
(
lock
==
true
)
{
await
waitLockRelease
(
50
);
await
waitLockRelease
(
50
);
...
@@ -19,6 +21,7 @@ export default async function login() {
...
@@ -19,6 +21,7 @@ export default async function login() {
method
:
'POST'
,
method
:
'POST'
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
code
==
0
)
{
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
;
...
@@ -35,6 +38,10 @@ export default async function login() {
...
@@ -35,6 +38,10 @@ export default async function login() {
});
});
lock
=
false
;
lock
=
false
;
resolve
(
res
)
resolve
(
res
)
}
else
if
(
res
.
data
.
code
==
10200
)
{
lock
=
false
;
alertOnce
(
'应用正在开通中,请稍后再试'
,
reject
,
{
...
res
.
data
,
code
:
10200
});
reject
(
res
.
data
);
}
else
{
}
else
{
lock
=
false
;
lock
=
false
;
reject
(
res
.
data
);
reject
(
res
.
data
);
...
...
api/xFetch.js
View file @
73bf1636
...
@@ -31,8 +31,9 @@ export default function xFetch({ url, method, data, type }) {
...
@@ -31,8 +31,9 @@ export default function xFetch({ url, method, data, type }) {
}
else
{
}
else
{
if
(
res
.
data
.
code
==
401
)
{
if
(
res
.
data
.
code
==
401
)
{
login
();
login
();
}
else
{
alertOnce
(
res
.
data
.
msg
||
'请求异常,请重试'
,
rejects
,
{
...
res
.
data
});
}
}
alertOnce
(
res
.
data
.
msg
||
'请求异常,请重试'
,
rejects
,
res
);
}
}
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
...
@@ -51,13 +52,13 @@ export default function xFetch({ url, method, data, type }) {
...
@@ -51,13 +52,13 @@ export default function xFetch({ url, method, data, type }) {
}
}
let
alert
=
false
;
let
alert
=
false
;
function
alertOnce
(
content
,
rejects
,
err
)
{
export
function
alertOnce
(
content
,
rejects
,
err
)
{
if
(
alert
==
false
)
{
if
(
alert
==
false
)
{
dd
.
alert
({
dd
.
alert
({
content
:
content
,
content
:
content
,
buttonText
:
"确定"
,
buttonText
:
"确定"
,
success
:
()
=>
{
success
:
()
=>
{
rejects
({
refresh
:
true
});
rejects
({
refresh
:
true
,
...
err
});
alert
=
false
;
alert
=
false
;
}
}
});
});
...
...
components/notes/notes.acss
View file @
73bf1636
...
@@ -4,6 +4,11 @@
...
@@ -4,6 +4,11 @@
padding: 16rpx;
padding: 16rpx;
margin-top: 16rpx;
margin-top: 16rpx;
margin-bottom: 1rpx;
margin-bottom: 1rpx;
word-break: break-all;
}
.notes>view>text {
word-break: break-all
}
}
.notes-edit {
.notes-edit {
...
...
components/remark/remark.acss
View file @
73bf1636
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
border-radius: 8rpx;
border-radius: 8rpx;
padding: 16rpx;
padding: 16rpx;
margin-top: 16rpx;
margin-top: 16rpx;
word-break: break-all;
}
}
.notes-edit {
.notes-edit {
...
...
config.js
View file @
73bf1636
export
const
globalUrl
=
"https://gateway-ding.mingwork.com"
;
export
const
globalUrl
=
"https://gateway-ding.mingwork.com"
;
export
const
globalUrl2
=
"https://third-authentication.mingwork.com"
;
export
const
globalUrl2
=
"https://third-authentication.mingwork.com"
;
export
const
version
=
0.0
38
;
export
const
version
=
0.0
41
;
export
const
websocketUrl
=
'wss://gateway-ding.mingwork.com'
;
export
const
websocketUrl
=
'wss://gateway-ding.mingwork.com'
;
pages/index/index.axml
View file @
73bf1636
<import src="../../template/loading/loading.axml"/>
<import src="../../template/loading/loading.axml"/>
<import src="../../template/fullScreen/fullScreen.axml"/>
<import src="../../template/fullScreen/fullScreen.axml"/>
<import src="../../template/refresh/index.axml"/>
<import src="../../template/refresh/index.axml"/>
<template is="refresh" a:if='{{refresh}}' ></template>
<template is="refresh" a:if='{{refresh}}'
data="{{refreshCode}}"
></template>
<block a:else>
<block a:else>
<view hidden="{{$data.tabBarIndex === '1'}}">
<view hidden="{{$data.tabBarIndex === '1'}}">
<import src="../../template/affairBlank/index.axml"/>
<import src="../../template/affairBlank/index.axml"/>
...
...
pages/index/index.js
View file @
73bf1636
...
@@ -183,8 +183,12 @@ create.Page({
...
@@ -183,8 +183,12 @@ create.Page({
},
},
connect_start
()
{
connect_start
()
{
const
userId
=
dd
.
getStorageSync
({
key
:
'mwUserId'
}).
data
;
if
(
!
userId
)
{
return
}
dd
.
connectSocket
({
dd
.
connectSocket
({
url
:
`
${
websocketUrl
}
/meet-websocket/websocket/
${
dd
.
getStorageSync
({
key
:
'mwUserId'
}).
data
}
/
${
uuid
}
`
,
url
:
`
${
websocketUrl
}
/meet-websocket/websocket/
${
userId
}
/
${
uuid
}
`
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
...
@@ -285,7 +289,8 @@ create.Page({
...
@@ -285,7 +289,8 @@ create.Page({
if
(
err
&&
err
.
refresh
)
{
if
(
err
&&
err
.
refresh
)
{
this
.
setData
({
this
.
setData
({
loading
:
false
,
loading
:
false
,
refresh
:
true
refresh
:
true
,
refreshCode
:
err
.
code
});
});
}
}
});
});
...
@@ -301,8 +306,12 @@ create.Page({
...
@@ -301,8 +306,12 @@ create.Page({
dd
.
closeSocket
();
dd
.
closeSocket
();
},
},
refresh
()
{
refresh
()
{
//重置数据
DateMap
=
getDateMap
(
this
.
minYear
,
this
.
maxYear
);
this
.
isNeverShowSchedulePage
=
true
;
this
.
isNeverShowSchedulePage
=
true
;
this
.
isLoaded
=
false
;
this
.
isLoaded
=
false
;
//定位到今天,防止上面的不生效
this
.
backToToday
(
'first'
)
this
.
onLoad
();
this
.
onLoad
();
},
},
getPages
(
current
,
callBack
)
{
getPages
(
current
,
callBack
)
{
...
...
pages/meetingDetail/meetingDetail.acss
View file @
73bf1636
...
@@ -68,6 +68,7 @@ page {
...
@@ -68,6 +68,7 @@ page {
color: rgba(27, 38, 61, 1);
color: rgba(27, 38, 61, 1);
font-size: 32rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium;
font-family: PingFangSC-Medium;
overflow: hidden
}
}
.compose-column .title>text {
.compose-column .title>text {
...
...
template/refresh/index.axml
View file @
73bf1636
<template name="refresh">
<template name="refresh">
<view class="refresh-bg">
<view class="refresh-bg">
<view>您的网络好像不给力,请重试</view>
<view a:if="{{refreshCode == 10200}}">应用正在开通中,请稍后再试</view>
<view a:else>您的网络好像不给力,请重试</view>
<button class="btn refresh-btn" onTap="refresh">刷新</button>
<button class="btn refresh-btn" onTap="refresh">刷新</button>
</view>
</view>
</template>
</template>
\ No newline at end of file
utils/utils.js
View file @
73bf1636
...
@@ -328,4 +328,6 @@ export function isJSON(str) {
...
@@ -328,4 +328,6 @@ export function isJSON(str) {
return
false
;
return
false
;
}
}
export
function
removeHtml
(
str
)
{
return
str
.
replace
(
/<
\/?
.+
?
>/g
,
""
)
}
export
function
removeHtml
(
str
)
{
return
str
.
replace
(
/<
\/?
.l>/g
,
""
).
replace
(
/<
\/
.+
?
>/g
,
"
\
n"
).
replace
(
/<.+
?
>/g
,
""
)
}
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