From d0567119abbb5706316142749eecd77b0d1163d9 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 24 Nov 2023 17:31:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=BF=E9=87=8C=E4=BA=91oss=E5=B0=81?= =?UTF-8?q?=E8=A3=85=E7=BB=84=E4=BB=B6=E5=8F=8A=E5=A4=96=E9=83=A8js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/upload/config.js | 15 +++++++ src/components/upload/index.vue | 18 ++++----- src/components/upload/upload.js | 37 ++++++++++++++++++ src/views/course/contentSettings.vue | 9 ++--- src/views/match/add/step1.vue | 39 ++++++++++++------- src/views/match/manage/matchArchList.vue | 6 +-- src/views/parnerOperation/learnMg.vue | 2 + src/views/shop/addProduct/index.vue | 2 + .../contentSettings/index.vue | 2 + 9 files changed, 96 insertions(+), 34 deletions(-) create mode 100644 src/components/upload/config.js create mode 100644 src/components/upload/upload.js diff --git a/src/components/upload/config.js b/src/components/upload/config.js new file mode 100644 index 0000000..f8a1254 --- /dev/null +++ b/src/components/upload/config.js @@ -0,0 +1,15 @@ +/** + * 阿里云oss配置 + * */ + + export default { + // oss账号信息 + config: { + region: 'oss-cn-shenzhen', + accessKeyId: 'LTAI4FzqQHnk4rozqLZ8jCNj', + accessKeySecret: 'mveW7B1OyFoKUkHm8WsxmrjHmkJWHq', + bucket: 'huoran' + }, + // 上传成功url前置部分(成功回调没有返回url) + preUrl: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/' +} \ No newline at end of file diff --git a/src/components/upload/index.vue b/src/components/upload/index.vue index 7493705..a33f14a 100644 --- a/src/components/upload/index.vue +++ b/src/components/upload/index.vue @@ -29,7 +29,8 @@