Commit 6235ed5efa3159579b48833dde9c87c46afba738
1 parent
41eccf54
add agree button
Showing
3 changed files
with
56 additions
and
13 deletions
src/css/reui.css
| @@ -66,6 +66,12 @@ | @@ -66,6 +66,12 @@ | ||
| 66 | left: 190px; | 66 | left: 190px; |
| 67 | margin-left: 10px; | 67 | margin-left: 10px; |
| 68 | } | 68 | } |
| 69 | +.init-transparent-tooltip { | ||
| 70 | + position: absolute; | ||
| 71 | + left: -80px; | ||
| 72 | + top: 6px; | ||
| 73 | + opacity: 0 | ||
| 74 | +} | ||
| 69 | .diy-button { | 75 | .diy-button { |
| 70 | height: 40px; | 76 | height: 40px; |
| 71 | font-size: 16px; | 77 | font-size: 16px; |
src/html/v2.html
| @@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
| 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> | 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| 7 | <title>CNLive Audio Panel</title> | 7 | <title>CNLive Audio Panel</title> |
| 8 | <meta name=renderer content=webkit> | 8 | <meta name=renderer content=webkit> |
| 9 | + <meta http-equiv="X-UA-Compatible" content="IE=EDGE"/> | ||
| 9 | <meta http-equiv="Expires" CONTENT="0"> | 10 | <meta http-equiv="Expires" CONTENT="0"> |
| 10 | <meta http-equiv="Cache-Control" CONTENT="no-cache"> | 11 | <meta http-equiv="Cache-Control" CONTENT="no-cache"> |
| 11 | <meta http-equiv="Pragma" CONTENT="no-cache"> | 12 | <meta http-equiv="Pragma" CONTENT="no-cache"> |
| @@ -31,21 +32,20 @@ | @@ -31,21 +32,20 @@ | ||
| 31 | <script src="https://cdn.jsdelivr.net/npm/axios@0.17.1/dist/axios.min.js"></script> | 32 | <script src="https://cdn.jsdelivr.net/npm/axios@0.17.1/dist/axios.min.js"></script> |
| 32 | <script src="https://cdn.jsdelivr.net/npm/qiniu-js@2.5.5/dist/qiniu.min.js"></script> | 33 | <script src="https://cdn.jsdelivr.net/npm/qiniu-js@2.5.5/dist/qiniu.min.js"></script> |
| 33 | 34 | ||
| 34 | - <!-- 本公司资源外链备份 2 --> | ||
| 35 | - <!-- <script type="text/javascript"> | 35 | + <script type="text/javascript"> |
| 36 | if (typeof axios == 'undefined') { | 36 | if (typeof axios == 'undefined') { |
| 37 | - // document.write(unescape("%3Cscript src='' type='text/javascript'%3E%3C/script%3E")); | 37 | + document.write(unescape("%3Cscript src='http://gongongku.cnlive.com/axios.min.js' type='text/javascript'%3E%3C/script%3E")); |
| 38 | } | 38 | } |
| 39 | if (typeof Vue == 'undefined') { | 39 | if (typeof Vue == 'undefined') { |
| 40 | - // document.write(unescape("%3Cscript src='' type='text/javascript'%3E%3C/script%3E")); | 40 | + document.write(unescape("%3Cscript src='http://gongongku.cnlive.com/vue.min.js' type='text/javascript'%3E%3C/script%3E")); |
| 41 | } | 41 | } |
| 42 | if (typeof ELEMENT == 'undefined') { | 42 | if (typeof ELEMENT == 'undefined') { |
| 43 | - // document.write(unescape("%3Cscript src='' type='text/javascript'%3E%3C/script%3E")); | 43 | + document.write(unescape("%3Cscript src='https://cdn.jsdelivr.net/npm/element-ui@2.15.5/lib/index.js' type='text/javascript'%3E%3C/script%3E")); |
| 44 | } | 44 | } |
| 45 | if(typeof qiniu == 'undefined') { | 45 | if(typeof qiniu == 'undefined') { |
| 46 | - // document.write(unescape("%3Cscript src='' type='text/javascript'%3E%3C/script%3E")); | 46 | + document.write(unescape("%3Cscript src='http://gongongku.cnlive.com/qiniu.min.js' type='text/javascript'%3E%3C/script%3E")); |
| 47 | } | 47 | } |
| 48 | - </script> --> | 48 | + </script> |
| 49 | 49 | ||
| 50 | <script type="text/javascript"> | 50 | <script type="text/javascript"> |
| 51 | if (typeof axios == 'undefined') { | 51 | if (typeof axios == 'undefined') { |
| @@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
| 67 | var UA = window.navigator.userAgent | 67 | var UA = window.navigator.userAgent |
| 68 | var msie = UA.indexOf("MSIE") | 68 | var msie = UA.indexOf("MSIE") |
| 69 | if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) { | 69 | if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) { |
| 70 | - alert("为了您的数据安全,请使用新版本Chrome内核浏览器阅览本站内容!") | 70 | + alert("为了您的数据安全,请使用新版本谷歌(google chrome)、火狐(Firefox)、QQ、360等浏览器阅览本站内容!") |
| 71 | // location.href = 'version.html' | 71 | // location.href = 'version.html' |
| 72 | } | 72 | } |
| 73 | </script> | 73 | </script> |
| @@ -140,10 +140,24 @@ | @@ -140,10 +140,24 @@ | ||
| 140 | <p>1)可上传的音频格式:mp3/flac/wav/ogg/mpg/wma/aac/acc/m4a。</p> | 140 | <p>1)可上传的音频格式:mp3/flac/wav/ogg/mpg/wma/aac/acc/m4a。</p> |
| 141 | <p>2)音频上传过程中,请勿离开此页面或者刷新此页面,否则会导致音频上传任务失败!</p> | 141 | <p>2)音频上传过程中,请勿离开此页面或者刷新此页面,否则会导致音频上传任务失败!</p> |
| 142 | <p>3)音频文件大小上限:500M,数量上限:1。</p> | 142 | <p>3)音频文件大小上限:500M,数量上限:1。</p> |
| 143 | - </div> | 143 | + </div> |
| 144 | <el-button type="text" size="mini" class="title-small init-tooltip">上传须知</el-button> | 144 | <el-button type="text" size="mini" class="title-small init-tooltip">上传须知</el-button> |
| 145 | </el-tooltip> | 145 | </el-tooltip> |
| 146 | </el-form-item> | 146 | </el-form-item> |
| 147 | + <el-form-item class="diy-flex-50" prop="agree"> | ||
| 148 | + <label slot="label">作曲授权</label> | ||
| 149 | + <el-checkbox-group v-model="form.agree"> | ||
| 150 | + <el-checkbox label="" name="type" :disabled="banAgree"></el-checkbox> | ||
| 151 | + </el-checkbox-group> | ||
| 152 | + <el-tooltip placement="top"> | ||
| 153 | + <div slot="content"> | ||
| 154 | + <p>征歌作品须为作者原创。</p> | ||
| 155 | + <p>未以任何形式公开发表,未参加任何评奖评选,不存在版权纠纷。</p> | ||
| 156 | + <p>报送参加本次征集评选,即视为授权空军拥有该作品完整版权。</p> | ||
| 157 | + </div> | ||
| 158 | + <el-button type="text" size="mini" class="title-small init-transparent-tooltip">作曲授权</el-button> | ||
| 159 | + </el-tooltip> | ||
| 160 | + </el-form-item> | ||
| 147 | <el-divider></el-divider> | 161 | <el-divider></el-divider> |
| 148 | <el-form-item class="diy-flex-50 diy-text-left"> | 162 | <el-form-item class="diy-flex-50 diy-text-left"> |
| 149 | <div> | 163 | <div> |
src/js/audio.js
| @@ -17,6 +17,7 @@ var Main = { | @@ -17,6 +17,7 @@ var Main = { | ||
| 17 | name: null, | 17 | name: null, |
| 18 | audioId: null, | 18 | audioId: null, |
| 19 | audioFile: null, | 19 | audioFile: null, |
| 20 | + agree: [] | ||
| 20 | }, | 21 | }, |
| 21 | labels: all.formLabels, | 22 | labels: all.formLabels, |
| 22 | rules: { | 23 | rules: { |
| @@ -30,6 +31,9 @@ var Main = { | @@ -30,6 +31,9 @@ var Main = { | ||
| 30 | name: [ | 31 | name: [ |
| 31 | { required: true, trigger: "change", message: "请填写联系人姓名" }, | 32 | { required: true, trigger: "change", message: "请填写联系人姓名" }, |
| 32 | ], | 33 | ], |
| 34 | + agree: [ | ||
| 35 | + { required: true, trigger: "change", message: "请进行作曲授权" }, | ||
| 36 | + ], | ||
| 33 | phone: [ | 37 | phone: [ |
| 34 | { | 38 | { |
| 35 | required: true, | 39 | required: true, |
| @@ -80,6 +84,7 @@ var Main = { | @@ -80,6 +84,7 @@ var Main = { | ||
| 80 | percent: 0, | 84 | percent: 0, |
| 81 | curFile: "", | 85 | curFile: "", |
| 82 | errorMsg: "", | 86 | errorMsg: "", |
| 87 | + banAgree: false | ||
| 83 | }; | 88 | }; |
| 84 | }, | 89 | }, |
| 85 | methods: { | 90 | methods: { |
| @@ -172,6 +177,7 @@ var Main = { | @@ -172,6 +177,7 @@ var Main = { | ||
| 172 | this.$refs[formName].validate((valid) => { | 177 | this.$refs[formName].validate((valid) => { |
| 173 | if (valid) { | 178 | if (valid) { |
| 174 | this.errorMsg = '' | 179 | this.errorMsg = '' |
| 180 | + this.banAgree = true | ||
| 175 | this.submitDisabled = true; | 181 | this.submitDisabled = true; |
| 176 | this.btnDisabled = true; | 182 | this.btnDisabled = true; |
| 177 | if (this.form.channelId == 1279) { | 183 | if (this.form.channelId == 1279) { |
| @@ -255,6 +261,7 @@ var Main = { | @@ -255,6 +261,7 @@ var Main = { | ||
| 255 | // that.reset(); | 261 | // that.reset(); |
| 256 | this.submitDisabled = false; | 262 | this.submitDisabled = false; |
| 257 | this.btnDisabled = false; | 263 | this.btnDisabled = false; |
| 264 | + this.banAgree = false | ||
| 258 | return false; | 265 | return false; |
| 259 | } else { | 266 | } else { |
| 260 | let apiComplete = | 267 | let apiComplete = |
| @@ -290,6 +297,7 @@ var Main = { | @@ -290,6 +297,7 @@ var Main = { | ||
| 290 | // that.reset() | 297 | // that.reset() |
| 291 | this.submitDisabled = false; | 298 | this.submitDisabled = false; |
| 292 | this.btnDisabled = false; | 299 | this.btnDisabled = false; |
| 300 | + this.banAgree = false | ||
| 293 | } | 301 | } |
| 294 | }) | 302 | }) |
| 295 | .catch((error) => { | 303 | .catch((error) => { |
| @@ -297,6 +305,7 @@ var Main = { | @@ -297,6 +305,7 @@ var Main = { | ||
| 297 | // that.reset(); | 305 | // that.reset(); |
| 298 | this.submitDisabled = false; | 306 | this.submitDisabled = false; |
| 299 | this.btnDisabled = false; | 307 | this.btnDisabled = false; |
| 308 | + this.banAgree = false | ||
| 300 | }); | 309 | }); |
| 301 | }, | 310 | }, |
| 302 | }; | 311 | }; |
| @@ -326,6 +335,7 @@ var Main = { | @@ -326,6 +335,7 @@ var Main = { | ||
| 326 | // this.reset(); | 335 | // this.reset(); |
| 327 | this.submitDisabled = false; | 336 | this.submitDisabled = false; |
| 328 | this.btnDisabled = false; | 337 | this.btnDisabled = false; |
| 338 | + this.banAgree = false | ||
| 329 | return false; | 339 | return false; |
| 330 | } | 340 | } |
| 331 | fileBaseObj.md5 = n; | 341 | fileBaseObj.md5 = n; |
| @@ -371,6 +381,7 @@ var Main = { | @@ -371,6 +381,7 @@ var Main = { | ||
| 371 | // this.reset(); | 381 | // this.reset(); |
| 372 | this.submitDisabled = false; | 382 | this.submitDisabled = false; |
| 373 | this.btnDisabled = false; | 383 | this.btnDisabled = false; |
| 384 | + this.banAgree = false | ||
| 374 | } | 385 | } |
| 375 | } | 386 | } |
| 376 | }) | 387 | }) |
| @@ -379,6 +390,7 @@ var Main = { | @@ -379,6 +390,7 @@ var Main = { | ||
| 379 | // this.reset() | 390 | // this.reset() |
| 380 | this.submitDisabled = false; | 391 | this.submitDisabled = false; |
| 381 | this.btnDisabled = false; | 392 | this.btnDisabled = false; |
| 393 | + this.banAgree = false | ||
| 382 | }); | 394 | }); |
| 383 | } | 395 | } |
| 384 | } else { | 396 | } else { |
| @@ -386,6 +398,7 @@ var Main = { | @@ -386,6 +398,7 @@ var Main = { | ||
| 386 | this.errorMsg = '请检查表单内容' | 398 | this.errorMsg = '请检查表单内容' |
| 387 | this.submitDisabled = false; | 399 | this.submitDisabled = false; |
| 388 | this.btnDisabled = false; | 400 | this.btnDisabled = false; |
| 401 | + this.banAgree = false | ||
| 389 | return false; | 402 | return false; |
| 390 | } | 403 | } |
| 391 | }); | 404 | }); |
| @@ -455,13 +468,20 @@ var Main = { | @@ -455,13 +468,20 @@ var Main = { | ||
| 455 | }, | 468 | }, |
| 456 | // cms接口提交videoId和表单内容 | 469 | // cms接口提交videoId和表单内容 |
| 457 | postCms() { | 470 | postCms() { |
| 458 | - this.form.lyric = this.addBr(this.form.lyric) | ||
| 459 | all | 471 | all |
| 460 | .request({ | 472 | .request({ |
| 461 | // url: "http://cmstest.cnlive.com:8768/contentApi/audioSave", | 473 | // url: "http://cmstest.cnlive.com:8768/contentApi/audioSave", |
| 462 | url: "https://cms.cnlive.com/api/contentApi/audioSave", | 474 | url: "https://cms.cnlive.com/api/contentApi/audioSave", |
| 463 | method: "post", | 475 | method: "post", |
| 464 | - params: this.form, | 476 | + params: { |
| 477 | + channelId: this.form.channelId, | ||
| 478 | + songName: this.form.songName, | ||
| 479 | + singer: this.form.singer, | ||
| 480 | + lyric: this.addBr(this.form.lyric), | ||
| 481 | + phone: this.form.phone, | ||
| 482 | + name: this.form.name, | ||
| 483 | + audioId: this.form.audioId | ||
| 484 | + }, | ||
| 465 | withCredentials: true, | 485 | withCredentials: true, |
| 466 | headers: { | 486 | headers: { |
| 467 | "X-Requested-With": "XMLHttpRequest", | 487 | "X-Requested-With": "XMLHttpRequest", |
| @@ -490,8 +510,11 @@ var Main = { | @@ -490,8 +510,11 @@ var Main = { | ||
| 490 | }, 1000); | 510 | }, 1000); |
| 491 | }) | 511 | }) |
| 492 | .finally(() => { | 512 | .finally(() => { |
| 493 | - this.btnDisabled = false; | ||
| 494 | - this.submitDisabled = false; | 513 | + setTimeout(() => { |
| 514 | + this.btnDisabled = false; | ||
| 515 | + this.submitDisabled = false; | ||
| 516 | + this.banAgree = false | ||
| 517 | + }, 1000); | ||
| 495 | }); | 518 | }); |
| 496 | }, | 519 | }, |
| 497 | // 获取txt文件内容,暂未启用 | 520 | // 获取txt文件内容,暂未启用 |