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
6dd980d1
Commit
6dd980d1
authored
May 06, 2020
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:oss上传
parent
e21095db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
10 deletions
+73
-10
request.js
api/request.js
+17
-0
config.js
config.js
+1
-0
meetingDetail.js
pages/meetingDetail/meetingDetail.js
+55
-10
No files found.
api/request.js
View file @
6dd980d1
...
@@ -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
config.js
View file @
6dd980d1
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/meetingDetail/meetingDetail.js
View file @
6dd980d1
...
@@ -2,7 +2,7 @@ import create from 'dd-store';
...
@@ -2,7 +2,7 @@ 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
{
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
}
from
'./../../utils/utils.js'
import
{
observer
}
from
'/utils/observer.js'
import
{
observer
}
from
'/utils/observer.js'
import
{
resolve
}
from
'path'
;
import
{
resolve
}
from
'path'
;
...
@@ -1610,15 +1610,60 @@ create.Page({
...
@@ -1610,15 +1610,60 @@ create.Page({
},
},
// 上传oss文件
// 上传oss文件
addOssFile
()
{
addOssFile
()
{
// dd.chooseImage({
const
that
=
this
// count: 2,
let
timestamp
=
new
Date
().
getTime
()
// success: (res) => {
console
.
log
(
getApp
().
globalData
.
avatar
)
// dd.alert({
getOssPermission
().
then
(
res
=>
{
// title: '选中的图片',
dd
.
chooseImage
({
// content: JSON.stringify(res.filePaths)
count
:
2
,
// })
sourceType
:
[
'camera'
,
'album'
],
// },
success
:
(
success
)
=>
{
// });
dd
.
uploadFile
({
url
:
res
.
data
.
data
.
host
,
fileType
:
'image'
,
fileName
:
'file'
,
filePath
:
success
.
filePaths
[
0
],
formData
:
{
key
:
res
.
data
.
data
.
dir
+
timestamp
+
getApp
().
globalData
.
userid
,
policy
:
res
.
data
.
data
.
policy
,
OSSAccessKeyId
:
res
.
data
.
data
.
accessId
,
success_action_status
:
200
,
signature
:
res
.
data
.
data
.
signature
},
success
:
()
=>
{
console
.
log
(
11111
)
const
data
=
{
resourceType
:
'accessory'
,
creatorId
:
getApp
().
globalData
.
userid
,
category
:
'2'
,
scheduleId
:
that
.
store
.
data
.
scheduleId
,
groupId
:
that
.
store
.
data
.
groupId
,
creatorInfo
:
getApp
().
globalData
.
userInfo
,
description
:
''
,
logType
:
'schedule_accessory_add'
,
fileKey
:
res
.
data
.
data
.
dir
+
timestamp
+
getApp
().
globalData
.
userid
}
console
.
log
(
JSON
.
stringify
(
data
))
getuploadResource
(
data
).
then
(
su
=>
{
dd
.
alert
({
title
:
'上传成功'
,
content
:
JSON
.
stringify
(
su
)
})
})
},
fail
:
(
err
)
=>
{
dd
.
alert
({
title
:
'上传失败'
,
content
:
JSON
.
stringify
(
err
)
})
}
});
},
});
console
.
log
(
res
)
})
},
},
//隐藏文件操作浮窗
//隐藏文件操作浮窗
hideFileOperate
()
{
hideFileOperate
()
{
...
...
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