diff --git a/src/const/oss.js b/src/const/oss.js new file mode 100644 index 0000000..f8a1254 --- /dev/null +++ b/src/const/oss.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/pages/match/details/index.vue b/src/pages/match/details/index.vue index 64b9cbe..d13c777 100644 --- a/src/pages/match/details/index.vue +++ b/src/pages/match/details/index.vue @@ -692,6 +692,7 @@ import util from '@/libs/util' import Setting from "@/setting" import Const from '@/const/match' import OSS from 'ali-oss' +import OssConfig from '@/const/oss' export default { name: 'matchdetail', data () { @@ -945,7 +946,7 @@ export default { this.statusList[4] = '进入' + e.stageName curStage = e } - } else if (this.offlineCanEntry(e)) { // 线下(输入了系统链接或者上传文件选择了是,才需要显示进入按钮) + } else if (this.offlineCanEntry(e) && form.competitionRegistration) { // 线下(输入了系统链接或者上传文件选择了是,才需要显示进入按钮) // 当系统链接为空,且上传文件为否时,无需展示入口 // 当系统链接不为空,且上传文件为否时,点击入口,直接跳转到链接页面,无需弹窗 // 当上传文件为是时,点击入口需弹窗,共两种样式 @@ -1154,6 +1155,7 @@ export default { }, // 定时调获取排名接口 intervalRank () { + this.getRank() // this.rankTimer = setInterval(this.getRank, 1000) }, @@ -1437,12 +1439,7 @@ export default { }, initOss () { - this.client = new OSS({ - region: 'oss-cn-shenzhen', - accessKeyId: 'LTAI4FzqQHnk4rozqLZ8jCNj', - accessKeySecret: 'mveW7B1OyFoKUkHm8WsxmrjHmkJWHq', - bucket: 'huoran' - }) + this.client = new OSS(OssConfig.config) }, // 附件上传前 beforeUpload (file) { diff --git a/src/pages/match/list/index.vue b/src/pages/match/list/index.vue index 5bda1e8..5460d0f 100644 --- a/src/pages/match/list/index.vue +++ b/src/pages/match/list/index.vue @@ -338,6 +338,7 @@ import Setting from "@/setting" import util from "@/libs/util" import Bus from '@/libs/bus' import OSS from 'ali-oss' +import OssConfig from '@/const/oss' export default { name: "match", data () { @@ -768,12 +769,7 @@ export default { initOss () { - this.client = new OSS({ - region: 'oss-cn-shenzhen', - accessKeyId: 'LTAI4FzqQHnk4rozqLZ8jCNj', - accessKeySecret: 'mveW7B1OyFoKUkHm8WsxmrjHmkJWHq', - bucket: 'huoran' - }) + this.client = new OSS(OssConfig.config) }, // 附件上传前 beforeUpload (file) {