Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
0a8e7a13
提交
0a8e7a13
编写于
6月 23, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
环境变量等
上级
340e5c4e
变更
7
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
2418 行增加
和
194 行删除
+2418
-194
edit-course-dialog copy 11.vue
.../education/custom-resource/edit-course-dialog copy 11.vue
+1094
-0
edit-course-dialog copy 2.vue
...s/education/custom-resource/edit-course-dialog copy 2.vue
+1223
-0
edit-course-dialog.vue
...mponents/education/custom-resource/edit-course-dialog.vue
+42
-181
env-config.js
src/utils/env-config.js
+22
-3
index.js
src/utils/index.js
+27
-1
fetch.js
src/utils/oss/fetch.js
+1
-5
ossUtil.js
src/utils/oss/ossUtil.js
+9
-4
未找到文件。
src/components/education/custom-resource/edit-course-dialog copy 11.vue
0 → 100644
浏览文件 @
0a8e7a13
此差异已折叠。
点击以展开。
src/components/education/custom-resource/edit-course-dialog copy 2.vue
0 → 100644
浏览文件 @
0a8e7a13
此差异已折叠。
点击以展开。
src/components/education/custom-resource/edit-course-dialog.vue
浏览文件 @
0a8e7a13
此差异已折叠。
点击以展开。
src/utils/env-config.js
浏览文件 @
0a8e7a13
...
...
@@ -37,7 +37,11 @@ export const envConfig = {
excelUrl
:
'https://dev-file.yunqueyi.com/File/template/portal/'
,
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
cmsUrl
:
' https://dev-cms.yunqueyi.com/'
,
// resource_url: "https://test-file.yunqueyi.com",
ossImgUrl
:
'https://test-file.yunqueyi.com/'
,
stsUrl
:
"https://dev-api.yunqueyi.com/middle/oss/token/"
,
//sts服务器
bucketName
:
"pica-test-huabei2"
,
endpoint
:
"oss-cn-beijing.aliyuncs.com"
,
},
dev
:
{
baseUrl
:
'https://dev-sc.yunqueyi.com/'
,
...
...
@@ -57,6 +61,9 @@ export const envConfig = {
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
cmsUrl
:
' https://dev-cms.yunqueyi.com/'
,
ossImgUrl
:
'https://test-file.yunqueyi.com/'
,
stsUrl
:
"https://dev-api.yunqueyi.com/middle/oss/token/"
,
//sts服务器
bucketName
:
"pica-test-huabei2"
,
endpoint
:
"oss-cn-beijing.aliyuncs.com"
,
},
test
:
{
baseUrl
:
'https://test1-sc.yunqueyi.com/'
,
...
...
@@ -76,6 +83,9 @@ export const envConfig = {
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
cmsUrl
:
' https://test1-cms.yunqueyi.com/'
,
ossImgUrl
:
'https://test-file.yunqueyi.com/'
,
stsUrl
:
"https://test1-api.yunqueyi.com/middle/oss/token/"
,
//sts服务器
bucketName
:
"pica-test-huabei2"
,
endpoint
:
"oss-cn-beijing.aliyuncs.com"
,
},
test2
:
{
baseUrl
:
'https://test2-work.yunqueyi.com/sc/'
,
...
...
@@ -94,6 +104,9 @@ export const envConfig = {
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
cmsUrl
:
' https://test2-cms.yunqueyi.com/'
,
ossImgUrl
:
'https://test-file.yunqueyi.com/'
,
stsUrl
:
"https://test2-api.yunqueyi.com/middle/oss/token/"
,
//sts服务器
bucketName
:
"pica-test-huabei2"
,
endpoint
:
"oss-cn-beijing.aliyuncs.com"
,
},
uat
:
{
baseUrl
:
'https://uat-sc.yunqueyi.com/'
,
...
...
@@ -112,8 +125,11 @@ export const envConfig = {
excelUrl
:
'https://test-file.yunqueyi.com/File/template/portal/'
,
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
cmsUrl
:
' https://uat-cms.yunqueyi.com/'
,
ossImgUrl
:
'https://test-file.yunqueyi.com/'
,
},
ossImgUrl
:
'https://file.yunqueyi.com/'
,
stsUrl
:
"https://uat-api.yunqueyi.com/middle/oss/token/"
,
//sts服务器
bucketName
:
"pica-pro"
,
endpoint
:
"oss-cn-shanghai.aliyuncs.com"
,
},
pro
:
{
baseUrl
:
'https://sc.yunqueyi.com/'
,
apiUrl
:
'https://api.yunqueyi.com/'
,
...
...
@@ -132,5 +148,8 @@ export const envConfig = {
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
cmsUrl
:
' https://cms.yunqueyi.com/'
,
ossImgUrl
:
'https://file.yunqueyi.com/'
,
}
stsUrl
:
"https://api.yunqueyi.com/middle/oss/token/"
,
//sts服务器
bucketName
:
"pica-pro"
,
endpoint
:
"oss-cn-shanghai.aliyuncs.com"
}
}
src/utils/index.js
浏览文件 @
0a8e7a13
...
...
@@ -201,12 +201,36 @@ export function getWorkDomain(url) {
return
getConfigByEnvType
(
'workApiSrc'
)
+
url
}
/*
* OSS相关参数
*/
// 获取OSS域名
export
function
getOSSImgUrl
()
{
return
getConfigByEnvType
(
'ossImgUrl'
)
}
// 获取stsUrl域名
export
function
getSTSUrl
()
{
return
getConfigByEnvType
(
'stsUrl'
)
}
// 获取bucketName
export
function
getBucketName
()
{
return
getConfigByEnvType
(
'bucketName'
)
}
// 获取endpoint
export
function
getEndpoint
()
{
return
getConfigByEnvType
(
'endpoint'
)
}
// 根据不同环境,生成URL
function
getConfigByEnvType
(
urlType
)
{
return
envConfig
[
process
.
env
.
BUILD_ENV
][
urlType
]
}
// 获取report服务器域名地址
export
function
getReportUrl
(
url
)
{
return
getConfigByEnvType
(
'reportUrl'
)
+
url
...
...
@@ -227,6 +251,8 @@ export function getCmsUrl(url) {
return
getConfigByEnvType
(
'cmsUrl'
)
+
url
}
// 转换时间格式
export
function
convertTime
(
time
,
isToSlash
=
true
)
{
console
.
log
(
'#########time'
,
time
);
...
...
src/utils/oss/fetch.js
浏览文件 @
0a8e7a13
...
...
@@ -9,11 +9,7 @@ export default async(url = '', data = {}, type = 'POST', method = 'fetch',server
url
=
localStorage
.
getItem
(
"Url"
)
+
url
;
}
// url =
console
.
log
(
'@@@@@@@@@@@@@in oss fetch'
,
url
);
// @@@@@@@@@@@@@in oss fetch null/5DF4291EDDA34BA08AD234C6BB7BE65D
// https://dev-api.yunqueyi.com/middle/oss/token/B1A7745D85D74EB4966125A4E0979ACE
console
.
log
(
"完整url:"
,
url
)
if
(
type
==
'GET'
&&
data
)
{
let
dataStr
=
''
;
//数据拼接字符串
...
...
src/utils/oss/ossUtil.js
浏览文件 @
0a8e7a13
import
{
isEmptyUtils
,
isNotEmptyUtils
,
subString
}
from
"@/utils/index"
;
import
{
isEmptyUtils
,
isNotEmptyUtils
,
subString
,
getBucketName
,
getEndpoint
,
getSTSUrl
}
from
"@/utils/index"
;
import
fetch
from
'./fetch.js'
;
/**
...
...
@@ -15,8 +15,11 @@ contentTypeMap.set("xlsx", "application/vnd.openxmlformats-officedocument.spread
// let bucketName = localStorage.getItem("bucketName");
// let endpoint = localStorage.getItem("endpoint");
let
bucketName
=
'pica-test-huabei2'
;
let
endpoint
=
'oss-cn-beijing.aliyuncs.com'
;
// let bucketName = 'pica-test-huabei2';
// let endpoint = 'oss-cn-beijing.aliyuncs.com';
let
bucketName
=
getBucketName
();
let
endpoint
=
getEndpoint
();
console
.
log
(
bucketName
,
endpoint
);
...
...
@@ -39,9 +42,11 @@ const doOSSAction = () => {
//sts服务器
// let stsUrl = localStorage.getItem("stsUrl") + "/" + localStorage.getItem("token");
// let stsUrl = 'https://dev-api.yunqueyi.com/middle/oss/token/' + localStorage.getItem("token");
let
stsUrl
=
'https://dev-api.yunqueyi.com/middle/oss/token/D1AA498C1C1C4298B712B3678EF9BD07'
//
let stsUrl = 'https://dev-api.yunqueyi.com/middle/oss/token/D1AA498C1C1C4298B712B3678EF9BD07'
// let stsUrl = 'https://dev-api.yunqueyi.com/middle/oss/token/' + localStorage.getItem("token");
let
stsUrl
=
getSTSUrl
()
+
localStorage
.
getItem
(
"token"
);
return
new
Promise
(
function
(
resolve
,
reject
)
{
fetch
(
stsUrl
,
{},
'GET'
).
then
(
function
(
result
)
{
let
client
=
null
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录