Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
zxn-adputin
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lijin
zxn-adputin
Commits
f858d8b5
Commit
f858d8b5
authored
Dec 18, 2024
by
jiyonggang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换阿里云key
parent
99e614fa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
materiallibrary.vue
src/views/createMaterial/common/materiallibrary.vue
+11
-8
No files found.
src/views/createMaterial/common/materiallibrary.vue
View file @
f858d8b5
...
@@ -980,9 +980,9 @@ export default {
...
@@ -980,9 +980,9 @@ export default {
const
aliyun
=
{
const
aliyun
=
{
// "你的Region 注意 这个只要 空间名 不要 http:// 和 .aliyunoss.com !!",
// "你的Region 注意 这个只要 空间名 不要 http:// 和 .aliyunoss.com !!",
Region
:
"oss-cn-beijing"
,
Region
:
"oss-cn-beijing"
,
AccessKeyId
:
"LTAI
OxFvkIPvgKrc
"
,
AccessKeyId
:
"LTAI
5tJzo2DiQxQqh9EipDNh
"
,
AccessKeySecret
:
"
y5VxsiIviudY6swKWlFySFh3PRCafP
"
,
AccessKeySecret
:
"
JnduhWY5Tr5VfuFHgDOv9XjqYx1mDg
"
,
Bucket
:
"zx-material"
,
Bucket
:
"zx-material
-new
"
,
//"你的SecurityToken"
//"你的SecurityToken"
// SecurityToken: null,
// SecurityToken: null,
};
};
...
@@ -991,19 +991,19 @@ export default {
...
@@ -991,19 +991,19 @@ export default {
AccessKeyId
,
AccessKeyId
,
AccessKeySecret
,
AccessKeySecret
,
Bucket
,
Bucket
,
SecurityToken
,
//
SecurityToken,
}
=
aliyun
;
}
=
aliyun
;
//初始化连接oss参数
//初始化连接oss参数
this
.
uploadConf
.
region
=
Region
;
this
.
uploadConf
.
region
=
Region
;
this
.
uploadConf
.
accessKeyId
=
AccessKeyId
;
this
.
uploadConf
.
accessKeyId
=
AccessKeyId
;
this
.
uploadConf
.
accessKeySecret
=
AccessKeySecret
;
this
.
uploadConf
.
accessKeySecret
=
AccessKeySecret
;
this
.
uploadConf
.
bucket
=
Bucket
;
this
.
uploadConf
.
bucket
=
Bucket
;
this
.
uploadConf
.
stsToken
=
SecurityToken
;
//
this.uploadConf.stsToken = SecurityToken;
},
},
//上传到阿里云OSS
//上传到阿里云OSS
uploadMulFile
(
uploader
)
{
uploadMulFile
(
uploader
)
{
console
.
log
(
"文件信息"
,
uploader
);
//
console.log("文件信息", uploader);
//获取到文件的信息内容
//获取到文件的信息内容
let
file
=
uploader
.
file
;
let
file
=
uploader
.
file
;
//获取文件类型 和 上传文件的日期
//获取文件类型 和 上传文件的日期
...
@@ -1014,7 +1014,7 @@ export default {
...
@@ -1014,7 +1014,7 @@ export default {
let
curTime
=
new
Date
();
let
curTime
=
new
Date
();
//定义上传到云端的路径和文件名字
//定义上传到云端的路径和文件名字
let
upFilePath
=
let
upFilePath
=
file
.
type
.
split
(
"/"
)[
0
]
+
"ad_putin_materials"
+
"/"
+
"/"
+
curTime
.
getFullYear
()
+
curTime
.
getFullYear
()
+
"/"
+
"/"
+
...
@@ -1044,7 +1044,7 @@ export default {
...
@@ -1044,7 +1044,7 @@ export default {
//解析url并替换前缀可访问
//解析url并替换前缀可访问
let
strUrl
=
res
.
res
.
requestUrls
[
0
].
split
(
"?"
)[
0
];
let
strUrl
=
res
.
res
.
requestUrls
[
0
].
split
(
"?"
)[
0
];
strUrl
=
strUrl
.
replace
(
strUrl
=
strUrl
.
replace
(
"http://zx-material.oss-cn-beijing.aliyuncs.com"
,
"http://zx-material
-new
.oss-cn-beijing.aliyuncs.com"
,
"https://cdn.zhangxingames.com"
"https://cdn.zhangxingames.com"
);
);
that
.
fileList
=
[...
that
.
fileList
,
{
uid
:
file
.
uid
,
url
:
strUrl
}];
that
.
fileList
=
[...
that
.
fileList
,
{
uid
:
file
.
uid
,
url
:
strUrl
}];
...
@@ -1161,6 +1161,9 @@ export default {
...
@@ -1161,6 +1161,9 @@ export default {
deleteMaterial
(
index
)
{
deleteMaterial
(
index
)
{
this
.
items
.
splice
(
index
,
1
);
this
.
items
.
splice
(
index
,
1
);
},
},
handleEnsureMaterial
(
newItems
)
{
this
.
selectedMaterials
=
[...
this
.
selectedMaterials
,
...
newItems
];
},
},
},
computed
:
{
computed
:
{
/* 监听日期 */
/* 监听日期 */
...
...
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