Commit f858d8b5 authored by jiyonggang's avatar jiyonggang

更换阿里云key

parent 99e614fa
......@@ -980,9 +980,9 @@ export default {
const aliyun = {
// "你的Region 注意 这个只要 空间名 不要 http:// 和 .aliyunoss.com !!",
Region: "oss-cn-beijing",
AccessKeyId: "LTAIOxFvkIPvgKrc",
AccessKeySecret: "y5VxsiIviudY6swKWlFySFh3PRCafP",
Bucket: "zx-material",
AccessKeyId: "LTAI5tJzo2DiQxQqh9EipDNh",
AccessKeySecret: "JnduhWY5Tr5VfuFHgDOv9XjqYx1mDg",
Bucket: "zx-material-new",
//"你的SecurityToken"
// SecurityToken: null,
};
......@@ -991,19 +991,19 @@ export default {
AccessKeyId,
AccessKeySecret,
Bucket,
SecurityToken,
// SecurityToken,
} = aliyun;
//初始化连接oss参数
this.uploadConf.region = Region;
this.uploadConf.accessKeyId = AccessKeyId;
this.uploadConf.accessKeySecret = AccessKeySecret;
this.uploadConf.bucket = Bucket;
this.uploadConf.stsToken = SecurityToken;
// this.uploadConf.stsToken = SecurityToken;
},
//上传到阿里云OSS
uploadMulFile(uploader) {
console.log("文件信息", uploader);
// console.log("文件信息", uploader);
//获取到文件的信息内容
let file = uploader.file;
//获取文件类型 和 上传文件的日期
......@@ -1014,7 +1014,7 @@ export default {
let curTime = new Date();
//定义上传到云端的路径和文件名字
let upFilePath =
file.type.split("/")[0] +
"ad_putin_materials" +
"/" +
curTime.getFullYear() +
"/" +
......@@ -1044,7 +1044,7 @@ export default {
//解析url并替换前缀可访问
let strUrl = res.res.requestUrls[0].split("?")[0];
strUrl = strUrl.replace(
"http://zx-material.oss-cn-beijing.aliyuncs.com",
"http://zx-material-new.oss-cn-beijing.aliyuncs.com",
"https://cdn.zhangxingames.com"
);
that.fileList = [...that.fileList, { uid: file.uid, url: strUrl }];
......@@ -1161,6 +1161,9 @@ export default {
deleteMaterial(index) {
this.items.splice(index, 1);
},
handleEnsureMaterial(newItems) {
this.selectedMaterials = [...this.selectedMaterials, ...newItems];
},
},
computed: {
/* 监听日期 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment