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
e8e05b21
Commit
e8e05b21
authored
May 08, 2020
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into release_beta/1.0.0
# Conflicts: # pages/index/index.js
parents
8a7b8aa5
1c04d685
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
109 additions
and
6 deletions
+109
-6
request.js
api/request.js
+17
-0
fileList.axml
components/fileList/fileList.axml
+1
-1
config.js
config.js
+1
-0
index.js
pages/index/index.js
+1
-1
meetingDetail.axml
pages/meetingDetail/meetingDetail.axml
+6
-0
meetingDetail.js
pages/meetingDetail/meetingDetail.js
+71
-3
utils.js
utils/utils.js
+12
-1
No files found.
api/request.js
View file @
e8e05b21
...
@@ -237,3 +237,19 @@ export function getZoomUrl(data) {
...
@@ -237,3 +237,19 @@ export function getZoomUrl(data) {
type
:
"binding"
type
:
"binding"
});
});
}
}
// oss 上传 获取授权
export
function
getOssPermission
()
{
return
$http
({
method
:
"get"
,
data
:
""
,
url
:
`/meet/meeting-log-resource/getOssUploadSignature`
});
}
// oss 上传 获取授权
export
function
getuploadResource
(
data
)
{
return
$http
({
method
:
"post"
,
data
:
JSON
.
stringify
(
data
),
url
:
`/meet/meeting-log-resource/uploadResource`
});
}
\ No newline at end of file
components/fileList/fileList.axml
View file @
e8e05b21
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<view class="file-title">
<view class="file-title">
<text>{{item.fileName.slice(0, item.fileName.length - 5)}}</text>
<text>{{item.fileName.slice(0, item.fileName.length - 5)}}</text>
<text>{{item.fileName.slice(-5)}}</text></view>
<text>{{item.fileName.slice(-5)}}</text></view>
<view class="file-size">{{(item.fileSize/1024/1024).toFixed(2)}}
KB
</view>
<view class="file-size">{{(item.fileSize/1024/1024).toFixed(2)}}
M
</view>
<view a:if="{{isCanDelete}}" class="iconfont iconicon_noAgreed1" catchTap="removeFile" data-id="{{item.fileId}}"></view>
<view a:if="{{isCanDelete}}" class="iconfont iconicon_noAgreed1" catchTap="removeFile" data-id="{{item.fileId}}"></view>
</view>
</view>
</view>
</view>
...
...
config.js
View file @
e8e05b21
export
const
globalUrl
=
"https://gateway-beta.mingwork.com"
;
export
const
globalUrl
=
"https://gateway-beta.mingwork.com"
;
export
const
globalUrl2
=
"https://third-authentication-beta.mingwork.com"
;
export
const
globalUrl2
=
"https://third-authentication-beta.mingwork.com"
;
pages/index/index.js
View file @
e8e05b21
...
@@ -879,7 +879,7 @@ create.Page({
...
@@ -879,7 +879,7 @@ create.Page({
maxClickCount
--
;
maxClickCount
--
;
if
(
maxClickCount
==
0
)
{
if
(
maxClickCount
==
0
)
{
dd
.
alert
({
dd
.
alert
({
content
:
"0.0.2
2
"
content
:
"0.0.2
3
"
});
});
maxClickCount
=
5
;
maxClickCount
=
5
;
}
}
...
...
pages/meetingDetail/meetingDetail.axml
View file @
e8e05b21
...
@@ -207,6 +207,12 @@
...
@@ -207,6 +207,12 @@
<view onTap="addMeetingFile">
<view onTap="addMeetingFile">
<text class="iconfont iconicon_data"></text>文件
<text class="iconfont iconicon_data"></text>文件
</view>
</view>
<view onTap="addOssFile">
<text class="iconfont iconicon_data"></text>
<view>
oss
</view>
</view>
<text class="devider"></text>
<text class="devider"></text>
<view onTap="onShareAppMessage">
<view onTap="onShareAppMessage">
<text class="iconfont iconicon_share1"></text>
<text class="iconfont iconicon_share1"></text>
...
...
pages/meetingDetail/meetingDetail.js
View file @
e8e05b21
import
create
from
'dd-store'
;
import
create
from
'dd-store'
;
import
{
checkFullScren
}
from
"../../utils/checkFullScren"
;
import
{
checkFullScren
}
from
"../../utils/checkFullScren"
;
import
pageStore
from
'./store'
;
import
pageStore
from
'./store'
;
import
{
getMeetingRoomAffairs
,
createMeetingTask
,
deleteMeetingTask
,
updateMeetingTask
,
uploadPermissions
}
from
'../../api/request'
;
import
{
saveFileInfo
,
getMeetingRoomAffairs
,
createMeetingTask
,
deleteMeetingTask
,
updateMeetingTask
,
uploadPermissions
}
from
'../../api/request'
;
import
{
isParticipate
,
deleteSchedule
,
getScheduleDetail
,
getUserScheduleInTime
,
modifySchedule
,
getMeetingRoomRepeatAffairs
}
from
'../../api/request.js'
import
{
getOssPermission
,
getuploadResource
,
isParticipate
,
deleteSchedule
,
getScheduleDetail
,
getUserScheduleInTime
,
modifySchedule
,
getMeetingRoomRepeatAffairs
}
from
'../../api/request.js'
import
{
throttle
,
getCreateShowTime
}
from
'./../../utils/utils.js'
import
{
throttle
,
getCreateShowTime
,
getRndInteger
}
from
'./../../utils/utils.js'
import
{
observer
}
from
'/utils/observer.js'
import
{
observer
}
from
'/utils/observer.js'
import
{
resolve
}
from
'path'
;
import
{
resolve
}
from
'path'
;
create
.
Page
({
create
.
Page
({
...
@@ -1608,6 +1608,74 @@ create.Page({
...
@@ -1608,6 +1608,74 @@ create.Page({
}
}
})
})
},
},
// 上传oss文件
async
addOssFile
()
{
const
timestamp
=
new
Date
().
getTime
()
const
random
=
getRndInteger
(
1000
,
10000
)
const
permisson
=
await
getOssPermission
()
const
imgInfo
=
await
this
.
getOssImg
()
const
key
=
await
new
Promise
((
resolve
)
=>
{
resolve
(
permisson
.
data
.
data
.
dir
+
timestamp
+
random
+
'.'
+
imgInfo
.
files
[
0
].
fileType
)
})
const
fileName
=
await
new
Promise
((
resolve
)
=>
{
resolve
(
timestamp
+
random
+
'.'
+
imgInfo
.
files
[
0
].
fileType
)
})
await
this
.
uploadOssFile
(
permisson
,
imgInfo
,
key
)
await
this
.
saveOssFileInfo
(
permisson
,
imgInfo
,
key
,
fileName
)
},
// 获取oss上传图片 选择图片 上传图片到oss
getOssImg
()
{
return
new
Promise
((
resolve
,
rejects
)
=>
{
dd
.
chooseImage
({
count
:
1
,
success
:
(
res
)
=>
{
resolve
(
res
)
},
});
})
},
// 获取的图片上传到oss
uploadOssFile
(
permisson
,
imgInfo
,
key
)
{
return
new
Promise
(
resolve
=>
{
dd
.
uploadFile
({
url
:
permisson
.
data
.
data
.
host
,
fileType
:
'image'
,
fileName
:
'file'
,
filePath
:
imgInfo
.
filePaths
[
0
],
formData
:
{
key
:
key
,
policy
:
permisson
.
data
.
data
.
policy
,
OSSAccessKeyId
:
permisson
.
data
.
data
.
accessId
,
success_action_status
:
200
,
signature
:
permisson
.
data
.
data
.
signature
},
success
:
()
=>
{
resolve
()
}
})
})
},
// 上传oss文件
saveOssFileInfo
(
permisson
,
imgInfo
,
key
,
fileName
)
{
const
data
=
{
resourceType
:
'accessory'
,
creatorId
:
getApp
().
globalData
.
userid
,
category
:
'2'
,
scheduleId
:
this
.
store
.
data
.
scheduleId
,
groupId
:
this
.
store
.
data
.
groupId
,
creatorInfo
:
getApp
().
globalData
.
userInfo
,
description
:
''
,
logType
:
'schedule_accessory_add'
,
fileInfos
:
JSON
.
stringify
({
fileId
:
key
,
fileName
:
fileName
,
fileType
:
imgInfo
.
files
[
0
].
fileType
,
fileSize
:
imgInfo
.
files
[
0
].
size
})
}
saveFileInfo
(
data
).
then
(
result
=>
{
dd
.
alert
({
title
:
'上传成功'
,
content
:
JSON
.
stringify
(
result
)
})
})
},
//隐藏文件操作浮窗
//隐藏文件操作浮窗
hideFileOperate
()
{
hideFileOperate
()
{
this
.
store
.
data
.
logId
=
''
;
this
.
store
.
data
.
logId
=
''
;
...
...
utils/utils.js
View file @
e8e05b21
...
@@ -134,7 +134,7 @@ export function getCreateShowTime(createdTime) {
...
@@ -134,7 +134,7 @@ export function getCreateShowTime(createdTime) {
if
(
leftDay
<
1
)
{
if
(
leftDay
<
1
)
{
timeResule
=
(
leftDay
*
24
).
toFixed
(
0
)
+
'小时前'
timeResule
=
(
leftDay
*
24
).
toFixed
(
0
)
+
'小时前'
}
else
{
}
else
{
timeResule
=
letDay
.
toFixed
(
0
)
+
'天前'
timeResule
=
le
f
tDay
.
toFixed
(
0
)
+
'天前'
}
}
}
else
{
}
else
{
timeResule
=
`
${
creatTime
.
substring
(
5
,
7
)}
月
${
creatTime
.
substring
(
8
,
10
)}
日
${
creatTime
.
substring
(
11
,
16
)}
`
timeResule
=
`
${
creatTime
.
substring
(
5
,
7
)}
月
${
creatTime
.
substring
(
8
,
10
)}
日
${
creatTime
.
substring
(
11
,
16
)}
`
...
@@ -150,4 +150,14 @@ export function getCreateShowTime(createdTime) {
...
@@ -150,4 +150,14 @@ export function getCreateShowTime(createdTime) {
export
function
padZero
(
val
)
{
export
function
padZero
(
val
)
{
return
(
"00"
+
val
).
slice
(
-
2
);
return
(
"00"
+
val
).
slice
(
-
2
);
}
/*
获取随机数
min = 0 区间范围 默认0
max = 100 区间范围 默认100
[min, max)
*/
export
function
getRndInteger
(
min
=
0
,
max
=
100
)
{
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
))
+
min
;
}
}
\ No newline at end of file
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