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
4692889f
Commit
4692889f
authored
5 years ago
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into release/1.0.0
# Conflicts: # config.js
parents
af61ab7b
ae97d638
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
27 deletions
+12
-27
config.js
config.js
+0
-8
meetingDetail.axml
pages/meetingDetail/meetingDetail.axml
+1
-1
meetingDetail.js
pages/meetingDetail/meetingDetail.js
+2
-3
uploadFile.js
pages/meetingDetail/uploadFile.js
+9
-15
No files found.
config.js
View file @
4692889f
export
const
globalUrl
=
"https://gateway2.mingwork.com"
;
export
const
globalUrl
=
"https://gateway2.mingwork.com"
;
export
const
globalUrl2
=
"https://third-authentication.mingwork.com"
;
export
const
globalUrl2
=
"https://third-authentication.mingwork.com"
;
/*
isShowOss 控制oss上传是否展示
true 展示
false 不能展示
测试环境为 true
线上环境为 false
*/
export
const
isShowOss
=
false
This diff is collapsed.
Click to expand it.
pages/meetingDetail/meetingDetail.axml
View file @
4692889f
...
@@ -203,7 +203,7 @@
...
@@ -203,7 +203,7 @@
<text class="iconfont iconicon_task1"></text>任务
<text class="iconfont iconicon_task1"></text>任务
</view>
</view>
<!--<view onTap="addMeetingFile"><text class="iconfont iconicon_data"></text>文件</view> -->
<!--<view onTap="addMeetingFile"><text class="iconfont iconicon_data"></text>文件</view> -->
<view onTap="addOssFile"
a:if="{{isShowOss}}"
>
<view onTap="addOssFile">
<text class="iconfont iconicon_data"></text>
<text class="iconfont iconicon_data"></text>
<view>
<view>
文件
文件
...
...
This diff is collapsed.
Click to expand it.
pages/meetingDetail/meetingDetail.js
View file @
4692889f
...
@@ -6,7 +6,6 @@ import { getOssPermission, getuploadResource, isParticipate, deleteSchedule, get
...
@@ -6,7 +6,6 @@ import { getOssPermission, getuploadResource, isParticipate, deleteSchedule, get
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'
;
import
{
isShowOss
}
from
'../../config.js'
;
import
{
getFileInfoFromOss
}
from
'./uploadFile'
;
import
{
getFileInfoFromOss
}
from
'./uploadFile'
;
import
{
comShareData
}
from
'./const.js'
;
import
{
comShareData
}
from
'./const.js'
;
create
.
Page
({
create
.
Page
({
...
@@ -114,7 +113,6 @@ create.Page({
...
@@ -114,7 +113,6 @@ create.Page({
isExpand
:
false
,
isExpand
:
false
,
placeholder
:
''
,
placeholder
:
''
,
mrReserveStatus
:
''
,
mrReserveStatus
:
''
,
isShowOss
:
isShowOss
},
},
onShow
()
{
onShow
()
{
// this.conflictPeople()
// this.conflictPeople()
...
@@ -1681,7 +1679,8 @@ create.Page({
...
@@ -1681,7 +1679,8 @@ create.Page({
const
res
=
await
getFileInfoFromOss
();
const
res
=
await
getFileInfoFromOss
();
if
(
res
.
code
===
-
1
)
{
if
(
res
.
code
===
-
1
)
{
dd
.
alert
({
dd
.
alert
({
content
:
res
.
msg
content
:
res
.
msg
,
buttonText
:
'确定'
})
})
return
return
}
}
...
...
This diff is collapsed.
Click to expand it.
pages/meetingDetail/uploadFile.js
View file @
4692889f
...
@@ -12,7 +12,7 @@ function getImg() {
...
@@ -12,7 +12,7 @@ function getImg() {
resolve
(
res
)
resolve
(
res
)
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
rejects
({
code
:
-
1
,
...
err
})
rejects
({
code
:
-
1
,
msg
:
'选择图片失败'
,
...
err
})
}
}
});
});
})
})
...
@@ -39,7 +39,6 @@ async function uploadImg(imgInfo) {
...
@@ -39,7 +39,6 @@ async function uploadImg(imgInfo) {
signature
:
permisson
.
data
.
data
.
signature
signature
:
permisson
.
data
.
data
.
signature
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
JSON
.
stringify
(
res
))
resolve
([{
resolve
([{
fileId
:
key
,
fileId
:
key
,
fileName
:
fileName
,
fileName
:
fileName
,
...
@@ -48,24 +47,18 @@ async function uploadImg(imgInfo) {
...
@@ -48,24 +47,18 @@ async function uploadImg(imgInfo) {
}])
}])
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
rejects
({
code
:
-
1
,
...
err
})
rejects
({
code
:
-
1
,
msg
:
'选上传图片失败'
,
...
err
})
}
}
})
})
})
})
}
}
// 从OSS获取fileInfo
// 从OSS获取fileInfo
export
async
function
getFileInfoFromOss
()
{
export
async
function
getFileInfoFromOss
()
{
// 选择图片
try
{
const
imgInfo
=
await
getImg
()
const
imgInfo
=
await
getImg
();
if
(
imgInfo
.
code
===
-
1
)
{
const
fileInfo
=
await
uploadImg
(
imgInfo
);
return
{
code
:
-
1
,
msg
:
'选择图片失败'
}
}
// 上传图片
const
fileInfo
=
await
uploadImg
(
imgInfo
)
if
(
fileInfo
.
code
===
-
1
)
{
return
{
code
:
-
1
,
msg
:
'选上传图片失败'
}
}
// 返回fileInfo
return
{
code
:
0
,
msg
:
'success'
,
data
:
fileInfo
}
return
{
code
:
0
,
msg
:
'success'
,
data
:
fileInfo
}
}
catch
(
err
)
{
return
err
}
}
}
\ No newline at end of file
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