Commit 6235ed5efa3159579b48833dde9c87c46afba738

Authored by 杨泽宇
1 parent 41eccf54

add agree button

src/css/reui.css
... ... @@ -66,6 +66,12 @@
66 66 left: 190px;
67 67 margin-left: 10px;
68 68 }
  69 +.init-transparent-tooltip {
  70 + position: absolute;
  71 + left: -80px;
  72 + top: 6px;
  73 + opacity: 0
  74 +}
69 75 .diy-button {
70 76 height: 40px;
71 77 font-size: 16px;
... ...
src/html/v2.html
... ... @@ -6,6 +6,7 @@
6 6 <meta name="viewport" content="width=device-width,initial-scale=1.0">
7 7 <title>CNLive Audio Panel</title>
8 8 <meta name=renderer content=webkit>
  9 + <meta http-equiv="X-UA-Compatible" content="IE=EDGE"/>
9 10 <meta http-equiv="Expires" CONTENT="0">
10 11 <meta http-equiv="Cache-Control" CONTENT="no-cache">
11 12 <meta http-equiv="Pragma" CONTENT="no-cache">
... ... @@ -31,21 +32,20 @@
31 32 <script src="https://cdn.jsdelivr.net/npm/axios@0.17.1/dist/axios.min.js"></script>
32 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 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 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 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 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 50 <script type="text/javascript">
51 51 if (typeof axios == 'undefined') {
... ... @@ -67,7 +67,7 @@
67 67 var UA = window.navigator.userAgent
68 68 var msie = UA.indexOf("MSIE")
69 69 if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
70   - alert("为了您的数据安全,请使用新版本Chrome内核浏览器阅览本站内容!")
  70 + alert("为了您的数据安全,请使用新版本谷歌(google chrome)、火狐(Firefox)、QQ、360等浏览器阅览本站内容!")
71 71 // location.href = 'version.html'
72 72 }
73 73 </script>
... ... @@ -140,10 +140,24 @@
140 140 <p>1)可上传的音频格式:mp3/flac/wav/ogg/mpg/wma/aac/acc/m4a。</p>
141 141 <p>2)音频上传过程中,请勿离开此页面或者刷新此页面,否则会导致音频上传任务失败!</p>
142 142 <p>3)音频文件大小上限:500M,数量上限:1。</p>
143   - </div>
  143 + </div>
144 144 <el-button type="text" size="mini" class="title-small init-tooltip">上传须知</el-button>
145 145 </el-tooltip>
146 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 161 <el-divider></el-divider>
148 162 <el-form-item class="diy-flex-50 diy-text-left">
149 163 <div>
... ...
src/js/audio.js
... ... @@ -17,6 +17,7 @@ var Main = {
17 17 name: null,
18 18 audioId: null,
19 19 audioFile: null,
  20 + agree: []
20 21 },
21 22 labels: all.formLabels,
22 23 rules: {
... ... @@ -30,6 +31,9 @@ var Main = {
30 31 name: [
31 32 { required: true, trigger: "change", message: "请填写联系人姓名" },
32 33 ],
  34 + agree: [
  35 + { required: true, trigger: "change", message: "请进行作曲授权" },
  36 + ],
33 37 phone: [
34 38 {
35 39 required: true,
... ... @@ -80,6 +84,7 @@ var Main = {
80 84 percent: 0,
81 85 curFile: "",
82 86 errorMsg: "",
  87 + banAgree: false
83 88 };
84 89 },
85 90 methods: {
... ... @@ -172,6 +177,7 @@ var Main = {
172 177 this.$refs[formName].validate((valid) => {
173 178 if (valid) {
174 179 this.errorMsg = ''
  180 + this.banAgree = true
175 181 this.submitDisabled = true;
176 182 this.btnDisabled = true;
177 183 if (this.form.channelId == 1279) {
... ... @@ -255,6 +261,7 @@ var Main = {
255 261 // that.reset();
256 262 this.submitDisabled = false;
257 263 this.btnDisabled = false;
  264 + this.banAgree = false
258 265 return false;
259 266 } else {
260 267 let apiComplete =
... ... @@ -290,6 +297,7 @@ var Main = {
290 297 // that.reset()
291 298 this.submitDisabled = false;
292 299 this.btnDisabled = false;
  300 + this.banAgree = false
293 301 }
294 302 })
295 303 .catch((error) => {
... ... @@ -297,6 +305,7 @@ var Main = {
297 305 // that.reset();
298 306 this.submitDisabled = false;
299 307 this.btnDisabled = false;
  308 + this.banAgree = false
300 309 });
301 310 },
302 311 };
... ... @@ -326,6 +335,7 @@ var Main = {
326 335 // this.reset();
327 336 this.submitDisabled = false;
328 337 this.btnDisabled = false;
  338 + this.banAgree = false
329 339 return false;
330 340 }
331 341 fileBaseObj.md5 = n;
... ... @@ -371,6 +381,7 @@ var Main = {
371 381 // this.reset();
372 382 this.submitDisabled = false;
373 383 this.btnDisabled = false;
  384 + this.banAgree = false
374 385 }
375 386 }
376 387 })
... ... @@ -379,6 +390,7 @@ var Main = {
379 390 // this.reset()
380 391 this.submitDisabled = false;
381 392 this.btnDisabled = false;
  393 + this.banAgree = false
382 394 });
383 395 }
384 396 } else {
... ... @@ -386,6 +398,7 @@ var Main = {
386 398 this.errorMsg = '请检查表单内容'
387 399 this.submitDisabled = false;
388 400 this.btnDisabled = false;
  401 + this.banAgree = false
389 402 return false;
390 403 }
391 404 });
... ... @@ -455,13 +468,20 @@ var Main = {
455 468 },
456 469 // cms接口提交videoId和表单内容
457 470 postCms() {
458   - this.form.lyric = this.addBr(this.form.lyric)
459 471 all
460 472 .request({
461 473 // url: "http://cmstest.cnlive.com:8768/contentApi/audioSave",
462 474 url: "https://cms.cnlive.com/api/contentApi/audioSave",
463 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 485 withCredentials: true,
466 486 headers: {
467 487 "X-Requested-With": "XMLHttpRequest",
... ... @@ -490,8 +510,11 @@ var Main = {
490 510 }, 1000);
491 511 })
492 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 520 // 获取txt文件内容,暂未启用
... ...