正在显示
9 个修改的文件
包含
674 行增加
和
644 行删除
dist.zip
0 → 100644
不能预览此文件类型
@@ -164,10 +164,10 @@ | @@ -164,10 +164,10 @@ | ||
164 | > | 164 | > |
165 | <!-- v-clipboard:error="onError" --> | 165 | <!-- v-clipboard:error="onError" --> |
166 | </div> | 166 | </div> |
167 | - <div class="flexone dianitem" @click="save(item)"> | 167 | + <!-- <div class="flexone dianitem" @click="save(item)"> |
168 | <img src="../../../assets/download.png" alt class="dianzanimg" /> | 168 | <img src="../../../assets/download.png" alt class="dianzanimg" /> |
169 | <span class="number">一键保存</span> | 169 | <span class="number">一键保存</span> |
170 | - </div> | 170 | + </div> --> |
171 | </div> | 171 | </div> |
172 | </div> | 172 | </div> |
173 | </van-list> | 173 | </van-list> |
@@ -280,15 +280,15 @@ export default { | @@ -280,15 +280,15 @@ export default { | ||
280 | images: [], | 280 | images: [], |
281 | startPosition: 0, | 281 | startPosition: 0, |
282 | showcomment: false, | 282 | showcomment: false, |
283 | - socialId: '', | 283 | + socialId: "", |
284 | comment_id: "", | 284 | comment_id: "", |
285 | - textcomment: '', | 285 | + textcomment: "", |
286 | shortcomment: [], | 286 | shortcomment: [], |
287 | allcomment: [], | 287 | allcomment: [], |
288 | showcommentlist: [], | 288 | showcommentlist: [], |
289 | defaultlen: false, | 289 | defaultlen: false, |
290 | - dateinit: '请输入', | ||
291 | - fasong: '', | 290 | + dateinit: "请输入", |
291 | + fasong: "", | ||
292 | navarrsec: [], | 292 | navarrsec: [], |
293 | selnavsec: -1 | 293 | selnavsec: -1 |
294 | }; | 294 | }; |
@@ -308,7 +308,7 @@ export default { | @@ -308,7 +308,7 @@ export default { | ||
308 | this.images = item.images_arr; | 308 | this.images = item.images_arr; |
309 | if (this.images.length == 0) { | 309 | if (this.images.length == 0) { |
310 | this.nophoto = true; | 310 | this.nophoto = true; |
311 | - setTimeout(function () { | 311 | + setTimeout(function() { |
312 | that.nophoto = false; | 312 | that.nophoto = false; |
313 | }, 1500); | 313 | }, 1500); |
314 | } else { | 314 | } else { |
@@ -337,10 +337,10 @@ export default { | @@ -337,10 +337,10 @@ export default { | ||
337 | 337 | ||
338 | // 显示消息弹出层 | 338 | // 显示消息弹出层 |
339 | messageshow(index, item) { | 339 | messageshow(index, item) { |
340 | - console.log(item) | 340 | + console.log(item); |
341 | this.showcomment = true; | 341 | this.showcomment = true; |
342 | - this.socialId = item.id | ||
343 | - this.getcommentlist() | 342 | + this.socialId = item.id; |
343 | + this.getcommentlist(); | ||
344 | }, | 344 | }, |
345 | // 获取消息列表 | 345 | // 获取消息列表 |
346 | getcommentlist() { | 346 | getcommentlist() { |
@@ -352,45 +352,41 @@ export default { | @@ -352,45 +352,41 @@ export default { | ||
352 | 352 | ||
353 | that.$axios | 353 | that.$axios |
354 | .post(url, param) | 354 | .post(url, param) |
355 | - .then(function (res) { | 355 | + .then(function(res) { |
356 | console.log(res); | 356 | console.log(res); |
357 | that.allcomment = res.data.social; | 357 | that.allcomment = res.data.social; |
358 | - console.log('434', that.allcomment) | 358 | + console.log("434", that.allcomment); |
359 | that.shortcomment = res.data.social.slice(0, 5); | 359 | that.shortcomment = res.data.social.slice(0, 5); |
360 | 360 | ||
361 | if (that.fasong == 1) { | 361 | if (that.fasong == 1) { |
362 | if (that.defaultlen == true) { | 362 | if (that.defaultlen == true) { |
363 | that.defaultlen = true; | 363 | that.defaultlen = true; |
364 | - that.showcommentlist = that.shortcomment | 364 | + that.showcommentlist = that.shortcomment; |
365 | } else { | 365 | } else { |
366 | that.defaultlen = false; | 366 | that.defaultlen = false; |
367 | - that.showcommentlist = that.allcomment | 367 | + that.showcommentlist = that.allcomment; |
368 | } | 368 | } |
369 | - | ||
370 | } else { | 369 | } else { |
371 | if (res.data.social.length > 5) { | 370 | if (res.data.social.length > 5) { |
372 | - that.defaultlen = true | 371 | + that.defaultlen = true; |
373 | } | 372 | } |
374 | - that.showcommentlist = that.shortcomment | 373 | + that.showcommentlist = that.shortcomment; |
375 | } | 374 | } |
376 | - | ||
377 | - | ||
378 | }) | 375 | }) |
379 | - .catch(function (err) { | 376 | + .catch(function(err) { |
380 | console.log(err); | 377 | console.log(err); |
381 | }); | 378 | }); |
382 | }, | 379 | }, |
383 | replay(item, index) { | 380 | replay(item, index) { |
384 | - console.log(item) | 381 | + console.log(item); |
385 | this.dateinit = item.user_info.nickname; | 382 | this.dateinit = item.user_info.nickname; |
386 | - this.comment_id = item.id | ||
387 | - | 383 | + this.comment_id = item.id; |
388 | }, | 384 | }, |
389 | sendtext() { | 385 | sendtext() { |
390 | let that = this; | 386 | let that = this; |
391 | - if (this.textcomment == '') { | ||
392 | - Toast("请输入评论内容") | ||
393 | - return false | 387 | + if (this.textcomment == "") { |
388 | + Toast("请输入评论内容"); | ||
389 | + return false; | ||
394 | } | 390 | } |
395 | var url = "/api/social/comment_send"; | 391 | var url = "/api/social/comment_send"; |
396 | let param = { | 392 | let param = { |
@@ -401,54 +397,46 @@ export default { | @@ -401,54 +397,46 @@ export default { | ||
401 | 397 | ||
402 | that.$axios | 398 | that.$axios |
403 | .post(url, param) | 399 | .post(url, param) |
404 | - .then(function (res) { | 400 | + .then(function(res) { |
405 | console.log(res); | 401 | console.log(res); |
406 | - Toast("发送成功") | ||
407 | - that.sortlist.forEach(function (value, index, arrray) { | 402 | + Toast("发送成功"); |
403 | + that.sortlist.forEach(function(value, index, arrray) { | ||
408 | if (value.id == that.socialId) { | 404 | if (value.id == that.socialId) { |
409 | - value.comment_count = value.comment_count + 1 | 405 | + value.comment_count = value.comment_count + 1; |
410 | } | 406 | } |
411 | - | ||
412 | - }) | 407 | + }); |
413 | that.sortlist = that.sortlist; | 408 | that.sortlist = that.sortlist; |
414 | // that.showcomment = false; | 409 | // that.showcomment = false; |
415 | that.fasong = 1; | 410 | that.fasong = 1; |
416 | - that.textcomment = ''; | 411 | + that.textcomment = ""; |
417 | that.getcommentlist(); | 412 | that.getcommentlist(); |
418 | - | ||
419 | - | ||
420 | - | ||
421 | }) | 413 | }) |
422 | - .catch(function (err) { | 414 | + .catch(function(err) { |
423 | console.log(err); | 415 | console.log(err); |
424 | - Toast(err.msg) | 416 | + Toast(err.msg); |
425 | }); | 417 | }); |
426 | }, | 418 | }, |
427 | seemorecomment() { | 419 | seemorecomment() { |
428 | this.showcommentlist = this.allcomment; | 420 | this.showcommentlist = this.allcomment; |
429 | - this.defaultlen = false | 421 | + this.defaultlen = false; |
430 | }, | 422 | }, |
431 | // 查看更多 | 423 | // 查看更多 |
432 | seemore(item, index) { | 424 | seemore(item, index) { |
433 | - console.log(9999) | 425 | + console.log(9999); |
434 | 426 | ||
435 | let that = this; | 427 | let that = this; |
436 | - that.sortlist.forEach(function (value, index, array) { | ||
437 | - console.log(value) | 428 | + that.sortlist.forEach(function(value, index, array) { |
429 | + console.log(value); | ||
438 | if (value.id == item.id) { | 430 | if (value.id == item.id) { |
439 | if (value.more == true) { | 431 | if (value.more == true) { |
440 | - value.show = !value.show | 432 | + value.show = !value.show; |
441 | } | 433 | } |
442 | - | ||
443 | } | 434 | } |
444 | - }) | 435 | + }); |
445 | that.sortlist = that.sortlist; | 436 | that.sortlist = that.sortlist; |
446 | - that.$forceUpdate() | 437 | + that.$forceUpdate(); |
447 | }, | 438 | }, |
448 | 439 | ||
449 | - | ||
450 | - | ||
451 | - | ||
452 | onLoad() { | 440 | onLoad() { |
453 | let that = this; | 441 | let that = this; |
454 | console.log(888); | 442 | console.log(888); |
@@ -477,15 +465,15 @@ export default { | @@ -477,15 +465,15 @@ export default { | ||
477 | 465 | ||
478 | // 播放视频 | 466 | // 播放视频 |
479 | entervideo(url) { | 467 | entervideo(url) { |
480 | - console.log(344803) | ||
481 | - console.log(url) | 468 | + console.log(344803); |
469 | + console.log(url); | ||
482 | this.$router.push({ | 470 | this.$router.push({ |
483 | - path: '/videoplay', | 471 | + path: "/videoplay", |
484 | query: { url: url } | 472 | query: { url: url } |
485 | - }) | 473 | + }); |
486 | }, | 474 | }, |
487 | hidecomment() { | 475 | hidecomment() { |
488 | - this.showcomment = false | 476 | + this.showcomment = false; |
489 | }, | 477 | }, |
490 | // 收藏 | 478 | // 收藏 |
491 | collect(index, item) { | 479 | collect(index, item) { |
@@ -498,7 +486,7 @@ export default { | @@ -498,7 +486,7 @@ export default { | ||
498 | 486 | ||
499 | that.$axios | 487 | that.$axios |
500 | .post(url, param) | 488 | .post(url, param) |
501 | - .then(function (res) { | 489 | + .then(function(res) { |
502 | console.log(res); | 490 | console.log(res); |
503 | if (item.is_favorite == 0) { | 491 | if (item.is_favorite == 0) { |
504 | item.is_favorite = 1; | 492 | item.is_favorite = 1; |
@@ -516,7 +504,7 @@ export default { | @@ -516,7 +504,7 @@ export default { | ||
516 | that.sortlist = that.sortlist; | 504 | that.sortlist = that.sortlist; |
517 | that.$forceUpdate(); | 505 | that.$forceUpdate(); |
518 | }) | 506 | }) |
519 | - .catch(function (err) { | 507 | + .catch(function(err) { |
520 | console.log(err); | 508 | console.log(err); |
521 | }); | 509 | }); |
522 | }, | 510 | }, |
@@ -532,7 +520,7 @@ export default { | @@ -532,7 +520,7 @@ export default { | ||
532 | 520 | ||
533 | that.$axios | 521 | that.$axios |
534 | .post(url, param) | 522 | .post(url, param) |
535 | - .then(function (res) { | 523 | + .then(function(res) { |
536 | console.log(res); | 524 | console.log(res); |
537 | if (item.is_good == 0) { | 525 | if (item.is_good == 0) { |
538 | item.is_good = 1; | 526 | item.is_good = 1; |
@@ -550,13 +538,13 @@ export default { | @@ -550,13 +538,13 @@ export default { | ||
550 | that.sortlist = that.sortlist; | 538 | that.sortlist = that.sortlist; |
551 | that.$forceUpdate(); | 539 | that.$forceUpdate(); |
552 | }) | 540 | }) |
553 | - .catch(function (err) { | 541 | + .catch(function(err) { |
554 | console.log(err); | 542 | console.log(err); |
555 | }); | 543 | }); |
556 | }, | 544 | }, |
557 | 545 | ||
558 | // 复制文本 | 546 | // 复制文本 |
559 | - copytext() { }, | 547 | + copytext() {}, |
560 | selectnav(id, index) { | 548 | selectnav(id, index) { |
561 | let that = this; | 549 | let that = this; |
562 | this.selnav = index; | 550 | this.selnav = index; |
@@ -589,13 +577,13 @@ export default { | @@ -589,13 +577,13 @@ export default { | ||
589 | 577 | ||
590 | that.$axios | 578 | that.$axios |
591 | .post(url, param) | 579 | .post(url, param) |
592 | - .then(function (res) { | 580 | + .then(function(res) { |
593 | console.log(res); | 581 | console.log(res); |
594 | 582 | ||
595 | let obj = { | 583 | let obj = { |
596 | - id: '', | ||
597 | - sort_name: '全部', | ||
598 | - } | 584 | + id: "", |
585 | + sort_name: "全部" | ||
586 | + }; | ||
599 | res.data.unshift(obj); | 587 | res.data.unshift(obj); |
600 | let len = res.data.length; | 588 | let len = res.data.length; |
601 | that.navarr = res.data.slice(0, 5); | 589 | that.navarr = res.data.slice(0, 5); |
@@ -603,7 +591,7 @@ export default { | @@ -603,7 +591,7 @@ export default { | ||
603 | that.sort_id = res.data[0].id; | 591 | that.sort_id = res.data[0].id; |
604 | that.getsocidtylist(); | 592 | that.getsocidtylist(); |
605 | }) | 593 | }) |
606 | - .catch(function (err) { | 594 | + .catch(function(err) { |
607 | console.log(err); | 595 | console.log(err); |
608 | }); | 596 | }); |
609 | }, | 597 | }, |
@@ -618,24 +606,23 @@ export default { | @@ -618,24 +606,23 @@ export default { | ||
618 | 606 | ||
619 | that.$axios | 607 | that.$axios |
620 | .post(url, param) | 608 | .post(url, param) |
621 | - .then(function (res) { | 609 | + .then(function(res) { |
622 | console.log(res); | 610 | console.log(res); |
623 | that.sortlist = that.sortlist.concat(res.data.social); | 611 | that.sortlist = that.sortlist.concat(res.data.social); |
624 | - that.sortlist.forEach(function (value, index, array) { | ||
625 | - value.show = true | 612 | + that.sortlist.forEach(function(value, index, array) { |
613 | + value.show = true; | ||
626 | 614 | ||
627 | if (value.description.length > 66) { | 615 | if (value.description.length > 66) { |
628 | - value.more = true | ||
629 | - | 616 | + value.more = true; |
630 | } else { | 617 | } else { |
631 | - value.more = false | 618 | + value.more = false; |
632 | } | 619 | } |
633 | - }) | 620 | + }); |
634 | that.sortlist = that.sortlist; | 621 | that.sortlist = that.sortlist; |
635 | that.this_page = res.data.this_page; | 622 | that.this_page = res.data.this_page; |
636 | that.total_page = res.data.total_page; | 623 | that.total_page = res.data.total_page; |
637 | }) | 624 | }) |
638 | - .catch(function (err) { | 625 | + .catch(function(err) { |
639 | console.log(err); | 626 | console.log(err); |
640 | }); | 627 | }); |
641 | } | 628 | } |
@@ -4,7 +4,12 @@ | @@ -4,7 +4,12 @@ | ||
4 | <div class="changeitemleft">头像</div> | 4 | <div class="changeitemleft">头像</div> |
5 | <div class="changeitemright flexone"> | 5 | <div class="changeitemright flexone"> |
6 | <img :src="avatar" alt class="headimg" /> | 6 | <img :src="avatar" alt class="headimg" /> |
7 | - <input type="file" class="shangtu" accept="image/*" @change="afterRead" /> | 7 | + <input |
8 | + type="file" | ||
9 | + class="shangtu" | ||
10 | + accept="image/*" | ||
11 | + @change="afterRead" | ||
12 | + /> | ||
8 | <!-- <input type="file" class="shangtu" @click="afterRead" /> --> | 13 | <!-- <input type="file" class="shangtu" @click="afterRead" /> --> |
9 | <!-- <van-uploader v-model="fileList" multiple="false" :after-read="afterRead" :max-count="1" /> --> | 14 | <!-- <van-uploader v-model="fileList" multiple="false" :after-read="afterRead" :max-count="1" /> --> |
10 | <img src="../../../assets/grayrow.png" alt class="yourow" /> | 15 | <img src="../../../assets/grayrow.png" alt class="yourow" /> |
@@ -24,7 +29,7 @@ | @@ -24,7 +29,7 @@ | ||
24 | </template> | 29 | </template> |
25 | 30 | ||
26 | <script> | 31 | <script> |
27 | -import Vue from 'vue'; | 32 | +import Vue from "vue"; |
28 | import { Toast, Uploader, Loading } from "vant"; | 33 | import { Toast, Uploader, Loading } from "vant"; |
29 | 34 | ||
30 | import "vant/lib/index.css"; | 35 | import "vant/lib/index.css"; |
@@ -37,28 +42,27 @@ export default { | @@ -37,28 +42,27 @@ export default { | ||
37 | username: "", | 42 | username: "", |
38 | avatar: "", | 43 | avatar: "", |
39 | fileList: [], | 44 | fileList: [], |
40 | - chuanimage: '', | 45 | + chuanimage: "", |
41 | cardzheng: false | 46 | cardzheng: false |
42 | }; | 47 | }; |
43 | }, | 48 | }, |
44 | created() { | 49 | created() { |
45 | - document.title = '唐元集公众号' | 50 | + document.title = "唐元集公众号"; |
46 | this.username = this.$route.query.username; | 51 | this.username = this.$route.query.username; |
47 | this.avatar = this.$route.query.avatar; | 52 | this.avatar = this.$route.query.avatar; |
48 | - console.log(this.avatar) | 53 | + console.log(this.avatar); |
49 | let obj = { | 54 | let obj = { |
50 | url: this.avatar | 55 | url: this.avatar |
51 | - } | ||
52 | - this.fileList.push(obj) | 56 | + }; |
57 | + this.fileList.push(obj); | ||
53 | }, | 58 | }, |
54 | methods: { | 59 | methods: { |
55 | // 上传图片 | 60 | // 上传图片 |
56 | afterRead(e) { | 61 | afterRead(e) { |
57 | - console.log(e) | 62 | + console.log(e); |
58 | let file = e.target.files[0]; | 63 | let file = e.target.files[0]; |
59 | let that = this; | 64 | let that = this; |
60 | - that.cardzheng = true | ||
61 | - | 65 | + that.cardzheng = true; |
62 | 66 | ||
63 | var formdata = new FormData(); | 67 | var formdata = new FormData(); |
64 | formdata.append("file", file); | 68 | formdata.append("file", file); |
@@ -70,45 +74,47 @@ export default { | @@ -70,45 +74,47 @@ export default { | ||
70 | 74 | ||
71 | that.$uploadFile | 75 | that.$uploadFile |
72 | .post(url, formdata) | 76 | .post(url, formdata) |
73 | - .then(function (res) { | ||
74 | - that.cardzheng = false | 77 | + .then(function(res) { |
78 | + that.cardzheng = false; | ||
75 | console.log(res); | 79 | console.log(res); |
76 | that.cardzheng = false; | 80 | that.cardzheng = false; |
77 | let url = "http://tangyuanji.t.brotop.cn" + res.data.url; | 81 | let url = "http://tangyuanji.t.brotop.cn" + res.data.url; |
78 | - that.avatar = url | ||
79 | - that.chuanimage = res.data.url | 82 | + that.avatar = url; |
83 | + that.chuanimage = res.data.url; | ||
80 | }) | 84 | }) |
81 | .catch(err => { | 85 | .catch(err => { |
82 | console.log(err); | 86 | console.log(err); |
83 | }); | 87 | }); |
84 | - | ||
85 | - | ||
86 | }, | 88 | }, |
87 | save() { | 89 | save() { |
88 | let that = this; | 90 | let that = this; |
89 | - if (that.chuanimage == '' && that.cardzheng == false) { | ||
90 | - Toast("请上传图片") | ||
91 | - return false | ||
92 | - } | ||
93 | - if (that.chuanimage == '' && that.cardzheng == true) { | ||
94 | - Toast("图片正在上传中") | ||
95 | - return false | 91 | + // if (that.chuanimage == '' && that.cardzheng == false) { |
92 | + // Toast("请上传图片") | ||
93 | + // return false | ||
94 | + // } | ||
95 | + if (that.chuanimage == "" && that.cardzheng == true) { | ||
96 | + Toast("图片正在上传中"); | ||
97 | + return false; | ||
96 | } | 98 | } |
97 | - var url = "/api/user/profile?avatar=" + that.chuanimage + '&nickname=' + that.username; | 99 | + var url = |
100 | + "/api/user/profile?avatar=" + | ||
101 | + that.chuanimage + | ||
102 | + "&nickname=" + | ||
103 | + that.username; | ||
98 | let param = { | 104 | let param = { |
99 | avatar: that.chuanimage, | 105 | avatar: that.chuanimage, |
100 | nickname: that.username | 106 | nickname: that.username |
101 | }; | 107 | }; |
102 | - console.log(param) | 108 | + console.log(param); |
103 | 109 | ||
104 | that.$axios | 110 | that.$axios |
105 | .get(url) | 111 | .get(url) |
106 | - .then(function (res) { | 112 | + .then(function(res) { |
107 | console.log(res); | 113 | console.log(res); |
108 | Toast("保存成功"); | 114 | Toast("保存成功"); |
109 | that.$router.go(-1); | 115 | that.$router.go(-1); |
110 | }) | 116 | }) |
111 | - .catch(function (err) { | 117 | + .catch(function(err) { |
112 | console.log(err); | 118 | console.log(err); |
113 | }); | 119 | }); |
114 | } | 120 | } |
@@ -128,4 +134,4 @@ export default { | @@ -128,4 +134,4 @@ export default { | ||
128 | transform: translate(-50%, -50%); | 134 | transform: translate(-50%, -50%); |
129 | z-index: 99; | 135 | z-index: 99; |
130 | } | 136 | } |
131 | -</style> | ||
137 | +</style> |
@@ -18,8 +18,13 @@ | @@ -18,8 +18,13 @@ | ||
18 | <img src="../../../assets/xiaolian.png" alt class="xiaoimg" /> | 18 | <img src="../../../assets/xiaolian.png" alt class="xiaoimg" /> |
19 | <div class="introtitlename" style="font-size:0.28rem"> | 19 | <div class="introtitlename" style="font-size:0.28rem"> |
20 | 亲爱的 | 20 | 亲爱的 |
21 | - <span style="font-size:0.28rem;font-weight:bold">{{ result.name }},</span> | ||
22 | - <span style="font-size:0.28rem;font-weight:bold">{{result.agent_name}}</span>邀您深度了解唐元集! | 21 | + <span style="font-size:0.28rem;font-weight:bold" |
22 | + >{{ result.name }},</span | ||
23 | + > | ||
24 | + <span style="font-size:0.28rem;font-weight:bold">{{ | ||
25 | + result.agent_name | ||
26 | + }}</span | ||
27 | + >邀您深度了解唐元集! | ||
23 | </div> | 28 | </div> |
24 | </div> | 29 | </div> |
25 | </div> | 30 | </div> |
@@ -30,7 +35,7 @@ | @@ -30,7 +35,7 @@ | ||
30 | <div class="textleftheng"></div> | 35 | <div class="textleftheng"></div> |
31 | <div class="textyuan"></div> | 36 | <div class="textyuan"></div> |
32 | </div> | 37 | </div> |
33 | - <div class="textname">{{intended.company_title}}</div> | 38 | + <div class="textname">{{ intended.company_title }}</div> |
34 | <div class="textleft flexone"> | 39 | <div class="textleft flexone"> |
35 | <div class="textkyuan"></div> | 40 | <div class="textkyuan"></div> |
36 | <div class="textrightheng"></div> | 41 | <div class="textrightheng"></div> |
@@ -47,7 +52,7 @@ | @@ -47,7 +52,7 @@ | ||
47 | <div class="textleftheng"></div> | 52 | <div class="textleftheng"></div> |
48 | <div class="textyuan"></div> | 53 | <div class="textyuan"></div> |
49 | </div> | 54 | </div> |
50 | - <div class="textname">{{intended.intelligence_title}}</div> | 55 | + <div class="textname">{{ intended.intelligence_title }}</div> |
51 | <div class="textleft flexone"> | 56 | <div class="textleft flexone"> |
52 | <div class="textkyuan"></div> | 57 | <div class="textkyuan"></div> |
53 | <div class="textrightheng"></div> | 58 | <div class="textrightheng"></div> |
@@ -71,7 +76,12 @@ | @@ -71,7 +76,12 @@ | ||
71 | <!-- 弹层 --> | 76 | <!-- 弹层 --> |
72 | <div class="register" v-if="showshare"> | 77 | <div class="register" v-if="showshare"> |
73 | <div class="fenwrap"> | 78 | <div class="fenwrap"> |
74 | - <img src="../../../assets/chahao.png" alt class="chahao" @click="hideshare" /> | 79 | + <img |
80 | + src="../../../assets/chahao.png" | ||
81 | + alt | ||
82 | + class="chahao" | ||
83 | + @click="hideshare" | ||
84 | + /> | ||
75 | <div class="fenimg"> | 85 | <div class="fenimg"> |
76 | <img src="../../../assets/fenimg.png" alt /> | 86 | <img src="../../../assets/fenimg.png" alt /> |
77 | <div class="fenname">结果已出,立即分享给朋友</div> | 87 | <div class="fenname">结果已出,立即分享给朋友</div> |
@@ -88,8 +98,8 @@ | @@ -88,8 +98,8 @@ | ||
88 | 98 | ||
89 | <script> | 99 | <script> |
90 | import wx from "jweixin-1.6.0"; | 100 | import wx from "jweixin-1.6.0"; |
91 | -import Vue from 'vue'; | ||
92 | -import { ImagePreview } from 'vant'; | 101 | +import Vue from "vue"; |
102 | +import { ImagePreview } from "vant"; | ||
93 | Vue.use(ImagePreview); | 103 | Vue.use(ImagePreview); |
94 | export default { | 104 | export default { |
95 | data() { | 105 | data() { |
@@ -104,25 +114,25 @@ export default { | @@ -104,25 +114,25 @@ export default { | ||
104 | images: [], | 114 | images: [], |
105 | startPosition: 0, | 115 | startPosition: 0, |
106 | shareshow: false, | 116 | shareshow: false, |
107 | - baseurl: '', | ||
108 | - intended: '' | 117 | + baseurl: "", |
118 | + intended: "" | ||
109 | }; | 119 | }; |
110 | }, | 120 | }, |
111 | created() { | 121 | created() { |
112 | - this.baseurl = 'http://' + location.host; | ||
113 | - document.title = '唐元集公众号' | 122 | + this.baseurl = "http://" + location.host; |
123 | + document.title = "唐元集公众号"; | ||
114 | this.subid = this.$route.query.subid; | 124 | this.subid = this.$route.query.subid; |
115 | - let type = localStorage.getItem("type") | 125 | + let type = localStorage.getItem("type"); |
116 | if (type == 1) { | 126 | if (type == 1) { |
117 | - this.showshare = true | 127 | + this.showshare = true; |
118 | } | 128 | } |
119 | this.getresult(); | 129 | this.getresult(); |
120 | this.getcompanyintro(); | 130 | this.getcompanyintro(); |
121 | this.getzizhi(); | 131 | this.getzizhi(); |
122 | this.getappid(); | 132 | this.getappid(); |
123 | - this.getintence() | 133 | + this.getintence(); |
124 | 134 | ||
125 | - console.log(this.intended) | 135 | + console.log(this.intended); |
126 | }, | 136 | }, |
127 | beforeRouteEnter(to, from, next) { | 137 | beforeRouteEnter(to, from, next) { |
128 | var u = navigator.userAgent; | 138 | var u = navigator.userAgent; |
@@ -137,27 +147,26 @@ export default { | @@ -137,27 +147,26 @@ export default { | ||
137 | }, | 147 | }, |
138 | methods: { | 148 | methods: { |
139 | hidesharek() { | 149 | hidesharek() { |
140 | - this.shareshow = false | 150 | + this.shareshow = false; |
141 | }, | 151 | }, |
142 | getintence() { | 152 | getintence() { |
143 | - let that = this | ||
144 | - console.log(99999) | ||
145 | - var result = "" | 153 | + let that = this; |
154 | + console.log(99999); | ||
155 | + var result = ""; | ||
146 | 156 | ||
147 | var url = "/api/user/intended"; | 157 | var url = "/api/user/intended"; |
148 | let param = {}; | 158 | let param = {}; |
149 | that.$axios | 159 | that.$axios |
150 | .post(url, param) | 160 | .post(url, param) |
151 | - .then(function (res) { | 161 | + .then(function(res) { |
152 | console.log(res); | 162 | console.log(res); |
153 | - result = res.data | ||
154 | - localStorage.setItem("intended", JSON.stringify(res.data.intended)) | ||
155 | - that.intended = JSON.parse(localStorage.getItem("intended")) | 163 | + result = res.data; |
164 | + localStorage.setItem("intended", JSON.stringify(res.data.intended)); | ||
165 | + that.intended = JSON.parse(localStorage.getItem("intended")); | ||
156 | }) | 166 | }) |
157 | - .catch(function (err) { | 167 | + .catch(function(err) { |
158 | console.log(err); | 168 | console.log(err); |
159 | }); | 169 | }); |
160 | - | ||
161 | }, | 170 | }, |
162 | // 获取appid | 171 | // 获取appid |
163 | getappid() { | 172 | getappid() { |
@@ -170,8 +179,8 @@ export default { | @@ -170,8 +179,8 @@ export default { | ||
170 | 179 | ||
171 | that.$axios | 180 | that.$axios |
172 | .post(url, param) | 181 | .post(url, param) |
173 | - .then(function (res) { | ||
174 | - console.log(res, 'hahahahaiaioaioaio4'); | 182 | + .then(function(res) { |
183 | + console.log(res, "hahahahaiaioaioaio4"); | ||
175 | wx.config({ | 184 | wx.config({ |
176 | debug: false, | 185 | debug: false, |
177 | appId: res.data.jssdk.appId, // 和获取Ticke的必须一样------必填,公众号的唯一标识 | 186 | appId: res.data.jssdk.appId, // 和获取Ticke的必须一样------必填,公众号的唯一标识 |
@@ -182,31 +191,29 @@ export default { | @@ -182,31 +191,29 @@ export default { | ||
182 | jsApiList: [ | 191 | jsApiList: [ |
183 | "showOptionMenu", | 192 | "showOptionMenu", |
184 | "updateAppMessageShareData", | 193 | "updateAppMessageShareData", |
185 | - "updateTimelineShareData", | 194 | + "updateTimelineShareData" |
186 | ] | 195 | ] |
187 | }); | 196 | }); |
188 | - wx.ready(function () { | 197 | + wx.ready(function() { |
189 | wx.showOptionMenu(); | 198 | wx.showOptionMenu(); |
190 | - }) | ||
191 | - that.sharetofriend() | 199 | + }); |
200 | + that.sharetofriend(); | ||
192 | }) | 201 | }) |
193 | - .catch(function (err) { | 202 | + .catch(function(err) { |
194 | console.log(err); | 203 | console.log(err); |
195 | }); | 204 | }); |
196 | }, | 205 | }, |
197 | 206 | ||
198 | // 分享给朋友 | 207 | // 分享给朋友 |
199 | sharetofriend() { | 208 | sharetofriend() { |
200 | - | ||
201 | var that = this; | 209 | var that = this; |
202 | - localStorage.setItem("type", '') | 210 | + localStorage.setItem("type", ""); |
203 | // 处理验证失败的信息 | 211 | // 处理验证失败的信息 |
204 | - wx.error(function (res) { | 212 | + wx.error(function(res) { |
205 | logUtil.printLog("验证失败返回的信息:", res); | 213 | logUtil.printLog("验证失败返回的信息:", res); |
206 | }); | 214 | }); |
207 | // 处理验证成功的信息 | 215 | // 处理验证成功的信息 |
208 | - wx.ready(function () { | ||
209 | - | 216 | + wx.ready(function() { |
210 | // alert(window.location.href.split('#')[0]); | 217 | // alert(window.location.href.split('#')[0]); |
211 | // var share_title = that.sharemsg.title; | 218 | // var share_title = that.sharemsg.title; |
212 | // if (share_title.indexOf("${title}") >= 0) { | 219 | // if (share_title.indexOf("${title}") >= 0) { |
@@ -227,11 +234,13 @@ export default { | @@ -227,11 +234,13 @@ export default { | ||
227 | // } | 234 | // } |
228 | // 分享到朋友圈 | 235 | // 分享到朋友圈 |
229 | wx.updateTimelineShareData({ | 236 | wx.updateTimelineShareData({ |
230 | - title: '分享', // 分享标题 | ||
231 | - link: that.baseurl + | 237 | + title: "唐元集邀请函", // 分享标题 |
238 | + link: | ||
239 | + that.baseurl + | ||
232 | "/redirect.html?shareRedirect=" + | 240 | "/redirect.html?shareRedirect=" + |
233 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 | 241 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
234 | - imgUrl: 'http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png', | 242 | + imgUrl: |
243 | + "http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png", | ||
235 | 244 | ||
236 | // imgUrl: that.details.details.img | 245 | // imgUrl: that.details.details.img |
237 | // ? that.details.details.img | 246 | // ? that.details.details.img |
@@ -239,13 +248,13 @@ export default { | @@ -239,13 +248,13 @@ export default { | ||
239 | 248 | ||
240 | // 分享图标 | 249 | // 分享图标 |
241 | // desc: that.sharemsg.content, | 250 | // desc: that.sharemsg.content, |
242 | - success: function (res) { | 251 | + success: function(res) { |
243 | // 用户确认分享后执行的回调函数 | 252 | // 用户确认分享后执行的回调函数 |
244 | console.log("suss"); | 253 | console.log("suss"); |
245 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); | 254 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); |
246 | that.showMsg("分享成功!"); | 255 | that.showMsg("分享成功!"); |
247 | }, | 256 | }, |
248 | - cancel: function (res) { | 257 | + cancel: function(res) { |
249 | // 用户取消分享后执行的回调函数 | 258 | // 用户取消分享后执行的回调函数 |
250 | console.log("err"); | 259 | console.log("err"); |
251 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); | 260 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); |
@@ -253,25 +262,26 @@ export default { | @@ -253,25 +262,26 @@ export default { | ||
253 | }), | 262 | }), |
254 | // 分享给朋友 | 263 | // 分享给朋友 |
255 | wx.updateAppMessageShareData({ | 264 | wx.updateAppMessageShareData({ |
256 | - title: '分享', // 分享标题 | ||
257 | - desc: '分享', // 分享描述 | 265 | + title: "唐元集邀请函", // 分享标题 |
266 | + desc: "", // 分享描述 | ||
258 | link: | 267 | link: |
259 | that.baseurl + | 268 | that.baseurl + |
260 | "/redirect.html?shareRedirect=" + | 269 | "/redirect.html?shareRedirect=" + |
261 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 | 270 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
262 | - imgUrl: 'http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png', | 271 | + imgUrl: |
272 | + "http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png", | ||
263 | 273 | ||
264 | // imgUrl: that.details.details.img | 274 | // imgUrl: that.details.details.img |
265 | // ? that.details.details.img | 275 | // ? that.details.details.img |
266 | - // : that.sharemsg.img, | 276 | + // : that.sharemsg.img, |
267 | // 分享图标 | 277 | // 分享图标 |
268 | type: "", // 分享类型,music、video或link,不填默认为link | 278 | type: "", // 分享类型,music、video或link,不填默认为link |
269 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 | 279 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 |
270 | - success: function (res) { | 280 | + success: function(res) { |
271 | // 用户确认分享后执行的回调函数 | 281 | // 用户确认分享后执行的回调函数 |
272 | logUtil.printLog("分享给朋友成功返回的信息为:", res); | 282 | logUtil.printLog("分享给朋友成功返回的信息为:", res); |
273 | }, | 283 | }, |
274 | - cancel: function (res) { | 284 | + cancel: function(res) { |
275 | // 用户取消分享后执行的回调函数 | 285 | // 用户取消分享后执行的回调函数 |
276 | logUtil.printLog("取消分享给朋友返回的信息为:", res); | 286 | logUtil.printLog("取消分享给朋友返回的信息为:", res); |
277 | } | 287 | } |
@@ -279,18 +289,14 @@ export default { | @@ -279,18 +289,14 @@ export default { | ||
279 | }); | 289 | }); |
280 | }, | 290 | }, |
281 | 291 | ||
282 | - | ||
283 | - | ||
284 | - | ||
285 | - | ||
286 | previewimg(imgarr, index) { | 292 | previewimg(imgarr, index) { |
287 | console.log(imgarr, index); | 293 | console.log(imgarr, index); |
288 | - let arr = [] | ||
289 | - imgarr.forEach(function (value, index, array) { | ||
290 | - arr.push(value.image) | ||
291 | - }) | 294 | + let arr = []; |
295 | + imgarr.forEach(function(value, index, array) { | ||
296 | + arr.push(value.image); | ||
297 | + }); | ||
292 | this.index = index + 1; | 298 | this.index = index + 1; |
293 | - console.log(this.index) | 299 | + console.log(this.index); |
294 | this.images = arr; | 300 | this.images = arr; |
295 | this.show = true; | 301 | this.show = true; |
296 | this.startPosition = index; | 302 | this.startPosition = index; |
@@ -305,7 +311,7 @@ export default { | @@ -305,7 +311,7 @@ export default { | ||
305 | // 确定分享 | 311 | // 确定分享 |
306 | sueshare() { | 312 | sueshare() { |
307 | this.showshare = false; | 313 | this.showshare = false; |
308 | - this.shareshow = true | 314 | + this.shareshow = true; |
309 | }, | 315 | }, |
310 | hideshare() { | 316 | hideshare() { |
311 | this.showshare = false; | 317 | this.showshare = false; |
@@ -324,12 +330,12 @@ export default { | @@ -324,12 +330,12 @@ export default { | ||
324 | 330 | ||
325 | that.$axios | 331 | that.$axios |
326 | .post(url, param) | 332 | .post(url, param) |
327 | - .then(function (res) { | 333 | + .then(function(res) { |
328 | console.log(res); | 334 | console.log(res); |
329 | that.img_arr = res.data.img_arr; | 335 | that.img_arr = res.data.img_arr; |
330 | console.log(that.result); | 336 | console.log(that.result); |
331 | }) | 337 | }) |
332 | - .catch(function (err) { | 338 | + .catch(function(err) { |
333 | console.log(err); | 339 | console.log(err); |
334 | }); | 340 | }); |
335 | }, | 341 | }, |
@@ -343,16 +349,14 @@ export default { | @@ -343,16 +349,14 @@ export default { | ||
343 | 349 | ||
344 | that.$axios | 350 | that.$axios |
345 | .post(url, param) | 351 | .post(url, param) |
346 | - .then(function (res) { | 352 | + .then(function(res) { |
347 | console.log(res); | 353 | console.log(res); |
348 | 354 | ||
349 | that.result = res.data.result; | 355 | that.result = res.data.result; |
350 | console.log(that.result); | 356 | console.log(that.result); |
351 | - | ||
352 | }) | 357 | }) |
353 | - .catch(function (err) { | 358 | + .catch(function(err) { |
354 | console.log(err); | 359 | console.log(err); |
355 | - | ||
356 | }); | 360 | }); |
357 | }, | 361 | }, |
358 | 362 | ||
@@ -365,11 +369,11 @@ export default { | @@ -365,11 +369,11 @@ export default { | ||
365 | 369 | ||
366 | that.$axios | 370 | that.$axios |
367 | .post(url, param) | 371 | .post(url, param) |
368 | - .then(function (res) { | 372 | + .then(function(res) { |
369 | console.log(res); | 373 | console.log(res); |
370 | that.company = res.data.company; | 374 | that.company = res.data.company; |
371 | }) | 375 | }) |
372 | - .catch(function (err) { | 376 | + .catch(function(err) { |
373 | console.log(err); | 377 | console.log(err); |
374 | }); | 378 | }); |
375 | } | 379 | } |
@@ -16,8 +16,13 @@ | @@ -16,8 +16,13 @@ | ||
16 | <img src="../../../assets/xiaolian.png" alt class="xiaoimg" /> | 16 | <img src="../../../assets/xiaolian.png" alt class="xiaoimg" /> |
17 | <div class="introtitlename" style="font-size:0.28rem"> | 17 | <div class="introtitlename" style="font-size:0.28rem"> |
18 | 亲爱的 | 18 | 亲爱的 |
19 | - <span style="font-size:0.28rem;font-weight:bold">{{ result.name }},</span> | ||
20 | - <span style="font-size:0.28rem;font-weight:bold">{{result.agent_name}}</span> 邀您深度了解唐元集! | 19 | + <span style="font-size:0.28rem;font-weight:bold" |
20 | + >{{ result.name }},</span | ||
21 | + > | ||
22 | + <span style="font-size:0.28rem;font-weight:bold">{{ | ||
23 | + result.agent_name | ||
24 | + }}</span> | ||
25 | + 邀您深度了解唐元集! | ||
21 | </div> | 26 | </div> |
22 | </div> | 27 | </div> |
23 | </div> | 28 | </div> |
@@ -28,7 +33,7 @@ | @@ -28,7 +33,7 @@ | ||
28 | <div class="textleftheng"></div> | 33 | <div class="textleftheng"></div> |
29 | <div class="textyuan"></div> | 34 | <div class="textyuan"></div> |
30 | </div> | 35 | </div> |
31 | - <div class="textname">{{intended.company_title}}</div> | 36 | + <div class="textname">{{ intended.company_title }}</div> |
32 | <div class="textleft flexone"> | 37 | <div class="textleft flexone"> |
33 | <div class="textkyuan"></div> | 38 | <div class="textkyuan"></div> |
34 | <div class="textrightheng"></div> | 39 | <div class="textrightheng"></div> |
@@ -44,7 +49,7 @@ | @@ -44,7 +49,7 @@ | ||
44 | <div class="textleftheng"></div> | 49 | <div class="textleftheng"></div> |
45 | <div class="textyuan"></div> | 50 | <div class="textyuan"></div> |
46 | </div> | 51 | </div> |
47 | - <div class="textname">{{intended.product_intro_title}}</div> | 52 | + <div class="textname">{{ intended.product_intro_title }}</div> |
48 | <div class="textleft flexone"> | 53 | <div class="textleft flexone"> |
49 | <div class="textkyuan"></div> | 54 | <div class="textkyuan"></div> |
50 | <div class="textrightheng"></div> | 55 | <div class="textrightheng"></div> |
@@ -58,7 +63,12 @@ | @@ -58,7 +63,12 @@ | ||
58 | <!-- 弹层 --> | 63 | <!-- 弹层 --> |
59 | <div class="register" v-if="showshare"> | 64 | <div class="register" v-if="showshare"> |
60 | <div class="fenwrap"> | 65 | <div class="fenwrap"> |
61 | - <img src="../../../assets/chahao.png" alt class="chahao" @click="hideshare" /> | 66 | + <img |
67 | + src="../../../assets/chahao.png" | ||
68 | + alt | ||
69 | + class="chahao" | ||
70 | + @click="hideshare" | ||
71 | + /> | ||
62 | <div class="fenimg"> | 72 | <div class="fenimg"> |
63 | <img src="../../../assets/fenimg.png" alt /> | 73 | <img src="../../../assets/fenimg.png" alt /> |
64 | <div class="fenname">结果已出,立即分享给朋友</div> | 74 | <div class="fenname">结果已出,立即分享给朋友</div> |
@@ -82,10 +92,10 @@ export default { | @@ -82,10 +92,10 @@ export default { | ||
82 | company: "", | 92 | company: "", |
83 | product: "", | 93 | product: "", |
84 | result: "", | 94 | result: "", |
85 | - intended: '', | 95 | + intended: "", |
86 | showshare: false, | 96 | showshare: false, |
87 | shareshow: false, | 97 | shareshow: false, |
88 | - baseurl: '' | 98 | + baseurl: "" |
89 | }; | 99 | }; |
90 | }, | 100 | }, |
91 | beforeRouteEnter(to, from, next) { | 101 | beforeRouteEnter(to, from, next) { |
@@ -100,47 +110,43 @@ export default { | @@ -100,47 +110,43 @@ export default { | ||
100 | } | 110 | } |
101 | }, | 111 | }, |
102 | created() { | 112 | created() { |
103 | - this.baseurl = 'http://' + location.host; | ||
104 | - let type = localStorage.getItem("type") | 113 | + this.baseurl = "http://" + location.host; |
114 | + let type = localStorage.getItem("type"); | ||
105 | if (type == 1) { | 115 | if (type == 1) { |
106 | this.showshare = true; | 116 | this.showshare = true; |
107 | - | ||
108 | } | 117 | } |
109 | - document.title = '唐元集公众号' | 118 | + document.title = "唐元集公众号"; |
110 | this.subid = this.$route.query.subid; | 119 | this.subid = this.$route.query.subid; |
111 | this.getcompanyintro(); | 120 | this.getcompanyintro(); |
112 | this.getresult(); | 121 | this.getresult(); |
113 | this.getappid(); | 122 | this.getappid(); |
114 | - this.getintence() | ||
115 | - | ||
116 | - | 123 | + this.getintence(); |
117 | }, | 124 | }, |
118 | mounted() { | 125 | mounted() { |
119 | window.scrollTo(0, 0); | 126 | window.scrollTo(0, 0); |
120 | }, | 127 | }, |
121 | methods: { | 128 | methods: { |
122 | hidesharek() { | 129 | hidesharek() { |
123 | - this.shareshow = false | 130 | + this.shareshow = false; |
124 | }, | 131 | }, |
125 | getintence() { | 132 | getintence() { |
126 | - let that = this | ||
127 | - console.log(99999) | ||
128 | - var result = "" | 133 | + let that = this; |
134 | + console.log(99999); | ||
135 | + var result = ""; | ||
129 | 136 | ||
130 | var url = "/api/user/intended"; | 137 | var url = "/api/user/intended"; |
131 | let param = {}; | 138 | let param = {}; |
132 | that.$axios | 139 | that.$axios |
133 | .post(url, param) | 140 | .post(url, param) |
134 | - .then(function (res) { | 141 | + .then(function(res) { |
135 | console.log(res); | 142 | console.log(res); |
136 | - result = res.data | ||
137 | - localStorage.setItem("intended", JSON.stringify(res.data.intended)) | 143 | + result = res.data; |
144 | + localStorage.setItem("intended", JSON.stringify(res.data.intended)); | ||
138 | that.intended = JSON.parse(localStorage.getItem("intended")); | 145 | that.intended = JSON.parse(localStorage.getItem("intended")); |
139 | }) | 146 | }) |
140 | - .catch(function (err) { | 147 | + .catch(function(err) { |
141 | console.log(err); | 148 | console.log(err); |
142 | }); | 149 | }); |
143 | - | ||
144 | }, | 150 | }, |
145 | // 获取appid | 151 | // 获取appid |
146 | getappid() { | 152 | getappid() { |
@@ -153,8 +159,8 @@ export default { | @@ -153,8 +159,8 @@ export default { | ||
153 | 159 | ||
154 | that.$axios | 160 | that.$axios |
155 | .post(url, param) | 161 | .post(url, param) |
156 | - .then(function (res) { | ||
157 | - console.log(res, 'hahahahaiaioaioaio4'); | 162 | + .then(function(res) { |
163 | + console.log(res, "hahahahaiaioaioaio4"); | ||
158 | wx.config({ | 164 | wx.config({ |
159 | debug: false, | 165 | debug: false, |
160 | appId: res.data.jssdk.appId, // 和获取Ticke的必须一样------必填,公众号的唯一标识 | 166 | appId: res.data.jssdk.appId, // 和获取Ticke的必须一样------必填,公众号的唯一标识 |
@@ -165,37 +171,38 @@ export default { | @@ -165,37 +171,38 @@ export default { | ||
165 | jsApiList: [ | 171 | jsApiList: [ |
166 | "showOptionMenu", | 172 | "showOptionMenu", |
167 | "updateAppMessageShareData", | 173 | "updateAppMessageShareData", |
168 | - "updateTimelineShareData", | 174 | + "updateTimelineShareData" |
169 | ] | 175 | ] |
170 | }); | 176 | }); |
171 | - wx.ready(function () { | 177 | + wx.ready(function() { |
172 | wx.showOptionMenu(); | 178 | wx.showOptionMenu(); |
173 | - }) | ||
174 | - that.sharetofriend() | 179 | + }); |
180 | + that.sharetofriend(); | ||
175 | }) | 181 | }) |
176 | - .catch(function (err) { | 182 | + .catch(function(err) { |
177 | console.log(err); | 183 | console.log(err); |
178 | }); | 184 | }); |
179 | }, | 185 | }, |
180 | 186 | ||
181 | // 分享给朋友 | 187 | // 分享给朋友 |
182 | sharetofriend() { | 188 | sharetofriend() { |
183 | - | ||
184 | var that = this; | 189 | var that = this; |
185 | - localStorage.setItem("type", '') | 190 | + localStorage.setItem("type", ""); |
186 | // 处理验证失败的信息 | 191 | // 处理验证失败的信息 |
187 | - wx.error(function (res) { | 192 | + wx.error(function(res) { |
188 | logUtil.printLog("验证失败返回的信息:", res); | 193 | logUtil.printLog("验证失败返回的信息:", res); |
189 | }); | 194 | }); |
190 | // 处理验证成功的信息 | 195 | // 处理验证成功的信息 |
191 | - wx.ready(function () { | 196 | + wx.ready(function() { |
192 | // 分享到朋友圈 | 197 | // 分享到朋友圈 |
193 | wx.updateTimelineShareData({ | 198 | wx.updateTimelineShareData({ |
194 | - title: '分享', // 分享标题 | ||
195 | - link: that.baseurl + | 199 | + title: "唐元集邀请函", // 分享标题 |
200 | + link: | ||
201 | + that.baseurl + | ||
196 | "/redirect.html?shareRedirect=" + | 202 | "/redirect.html?shareRedirect=" + |
197 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 | 203 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
198 | - imgUrl: 'http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png', | 204 | + imgUrl: |
205 | + "http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png", | ||
199 | 206 | ||
200 | // imgUrl: that.details.details.img | 207 | // imgUrl: that.details.details.img |
201 | // ? that.details.details.img | 208 | // ? that.details.details.img |
@@ -203,13 +210,13 @@ export default { | @@ -203,13 +210,13 @@ export default { | ||
203 | 210 | ||
204 | // 分享图标 | 211 | // 分享图标 |
205 | // desc: that.sharemsg.content, | 212 | // desc: that.sharemsg.content, |
206 | - success: function (res) { | 213 | + success: function(res) { |
207 | // 用户确认分享后执行的回调函数 | 214 | // 用户确认分享后执行的回调函数 |
208 | console.log("suss"); | 215 | console.log("suss"); |
209 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); | 216 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); |
210 | that.showMsg("分享成功!"); | 217 | that.showMsg("分享成功!"); |
211 | }, | 218 | }, |
212 | - cancel: function (res) { | 219 | + cancel: function(res) { |
213 | // 用户取消分享后执行的回调函数 | 220 | // 用户取消分享后执行的回调函数 |
214 | console.log("err"); | 221 | console.log("err"); |
215 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); | 222 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); |
@@ -217,25 +224,26 @@ export default { | @@ -217,25 +224,26 @@ export default { | ||
217 | }), | 224 | }), |
218 | // 分享给朋友 | 225 | // 分享给朋友 |
219 | wx.updateAppMessageShareData({ | 226 | wx.updateAppMessageShareData({ |
220 | - title: '分享', // 分享标题 | ||
221 | - desc: '分享', // 分享描述 | 227 | + title: "唐元集邀请函", // 分享标题 |
228 | + desc: "", // 分享描述 | ||
222 | link: | 229 | link: |
223 | that.baseurl + | 230 | that.baseurl + |
224 | "/redirect.html?shareRedirect=" + | 231 | "/redirect.html?shareRedirect=" + |
225 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 | 232 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
226 | - imgUrl: 'http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png', | 233 | + imgUrl: |
234 | + "http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png", | ||
227 | 235 | ||
228 | // imgUrl: that.details.details.img | 236 | // imgUrl: that.details.details.img |
229 | // ? that.details.details.img | 237 | // ? that.details.details.img |
230 | - // : that.sharemsg.img, | 238 | + // : that.sharemsg.img, |
231 | // 分享图标 | 239 | // 分享图标 |
232 | type: "", // 分享类型,music、video或link,不填默认为link | 240 | type: "", // 分享类型,music、video或link,不填默认为link |
233 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 | 241 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 |
234 | - success: function (res) { | 242 | + success: function(res) { |
235 | // 用户确认分享后执行的回调函数 | 243 | // 用户确认分享后执行的回调函数 |
236 | logUtil.printLog("分享给朋友成功返回的信息为:", res); | 244 | logUtil.printLog("分享给朋友成功返回的信息为:", res); |
237 | }, | 245 | }, |
238 | - cancel: function (res) { | 246 | + cancel: function(res) { |
239 | // 用户取消分享后执行的回调函数 | 247 | // 用户取消分享后执行的回调函数 |
240 | logUtil.printLog("取消分享给朋友返回的信息为:", res); | 248 | logUtil.printLog("取消分享给朋友返回的信息为:", res); |
241 | } | 249 | } |
@@ -243,22 +251,18 @@ export default { | @@ -243,22 +251,18 @@ export default { | ||
243 | }); | 251 | }); |
244 | }, | 252 | }, |
245 | 253 | ||
246 | - | ||
247 | - | ||
248 | - | ||
249 | hideshare() { | 254 | hideshare() { |
250 | - this.showshare = false | 255 | + this.showshare = false; |
251 | }, | 256 | }, |
252 | // 立即分享 | 257 | // 立即分享 |
253 | sueshare() { | 258 | sueshare() { |
254 | this.showshare = false; | 259 | this.showshare = false; |
255 | - this.shareshow = true | 260 | + this.shareshow = true; |
256 | }, | 261 | }, |
257 | back() { | 262 | back() { |
258 | - this.$router.go(-1) | 263 | + this.$router.go(-1); |
259 | }, | 264 | }, |
260 | getresult() { | 265 | getresult() { |
261 | - | ||
262 | let that = this; | 266 | let that = this; |
263 | var url = "/api/user/assistance_result"; | 267 | var url = "/api/user/assistance_result"; |
264 | let param = { | 268 | let param = { |
@@ -267,18 +271,15 @@ export default { | @@ -267,18 +271,15 @@ export default { | ||
267 | 271 | ||
268 | that.$axios | 272 | that.$axios |
269 | .post(url, param) | 273 | .post(url, param) |
270 | - .then(function (res) { | 274 | + .then(function(res) { |
271 | that.result = res.data.result; | 275 | that.result = res.data.result; |
272 | console.log(that.result); | 276 | console.log(that.result); |
273 | - | ||
274 | }) | 277 | }) |
275 | - .catch(function (err) { | 278 | + .catch(function(err) { |
276 | console.log(err); | 279 | console.log(err); |
277 | }); | 280 | }); |
278 | }, | 281 | }, |
279 | 282 | ||
280 | - | ||
281 | - | ||
282 | // 下一页 | 283 | // 下一页 |
283 | next() { | 284 | next() { |
284 | console.log(44); | 285 | console.log(44); |
@@ -296,18 +297,15 @@ export default { | @@ -296,18 +297,15 @@ export default { | ||
296 | 297 | ||
297 | that.$axios | 298 | that.$axios |
298 | .post(url, param) | 299 | .post(url, param) |
299 | - .then(function (res) { | 300 | + .then(function(res) { |
300 | console.log(res); | 301 | console.log(res); |
301 | that.company = res.data.company; | 302 | that.company = res.data.company; |
302 | that.product = res.data.product; | 303 | that.product = res.data.product; |
303 | - | ||
304 | - | ||
305 | }) | 304 | }) |
306 | - .catch(function (err) { | 305 | + .catch(function(err) { |
307 | console.log(err); | 306 | console.log(err); |
308 | }); | 307 | }); |
309 | - }, | ||
310 | - | 308 | + } |
311 | } | 309 | } |
312 | }; | 310 | }; |
313 | </script> | 311 | </script> |
@@ -154,14 +154,14 @@ | @@ -154,14 +154,14 @@ | ||
154 | >复制</span | 154 | >复制</span |
155 | > | 155 | > |
156 | </div> | 156 | </div> |
157 | - <div class="flexone dianitem" @click="save(item)"> | 157 | + <!-- <div class="flexone dianitem" @click="save(item)"> |
158 | <img | 158 | <img |
159 | src="../../../assets/download.png" | 159 | src="../../../assets/download.png" |
160 | alt | 160 | alt |
161 | class="dianzanimg" | 161 | class="dianzanimg" |
162 | /> | 162 | /> |
163 | <span class="number">一键保存</span> | 163 | <span class="number">一键保存</span> |
164 | - </div> | 164 | + </div> --> |
165 | 165 | ||
166 | <div class="flexone dianitem" @click="del(item)"> | 166 | <div class="flexone dianitem" @click="del(item)"> |
167 | <img src="../../../assets/delim.png" alt class="dianzanimg" /> | 167 | <img src="../../../assets/delim.png" alt class="dianzanimg" /> |
@@ -251,7 +251,7 @@ | @@ -251,7 +251,7 @@ | ||
251 | import Vue from "vue"; | 251 | import Vue from "vue"; |
252 | 252 | ||
253 | import { List, Toast, ImagePreview } from "vant"; | 253 | import { List, Toast, ImagePreview } from "vant"; |
254 | -import { Dialog } from 'vant'; | 254 | +import { Dialog } from "vant"; |
255 | 255 | ||
256 | Vue.use(ImagePreview); | 256 | Vue.use(ImagePreview); |
257 | 257 | ||
@@ -263,37 +263,35 @@ export default { | @@ -263,37 +263,35 @@ export default { | ||
263 | loading: false, | 263 | loading: false, |
264 | finished: false, | 264 | finished: false, |
265 | page: 1, | 265 | page: 1, |
266 | - total_page: '', | ||
267 | - this_page: '', | 266 | + total_page: "", |
267 | + this_page: "", | ||
268 | images: [], | 268 | images: [], |
269 | index: 0, | 269 | index: 0, |
270 | startPosition: 0, | 270 | startPosition: 0, |
271 | show: false, | 271 | show: false, |
272 | nophoto: false, | 272 | nophoto: false, |
273 | showcomment: false, | 273 | showcomment: false, |
274 | - socialId: '', | 274 | + socialId: "", |
275 | comment_id: "", | 275 | comment_id: "", |
276 | - textcomment: '', | 276 | + textcomment: "", |
277 | shortcomment: [], | 277 | shortcomment: [], |
278 | allcomment: [], | 278 | allcomment: [], |
279 | showcommentlist: [], | 279 | showcommentlist: [], |
280 | defaultlen: false, | 280 | defaultlen: false, |
281 | - dateinit: '请输入', | ||
282 | - fasong: '' | ||
283 | - | ||
284 | - } | 281 | + dateinit: "请输入", |
282 | + fasong: "" | ||
283 | + }; | ||
285 | }, | 284 | }, |
286 | created() { | 285 | created() { |
287 | - this.gettiezilist() | 286 | + this.gettiezilist(); |
288 | }, | 287 | }, |
289 | methods: { | 288 | methods: { |
290 | - | ||
291 | // 显示消息弹出层 | 289 | // 显示消息弹出层 |
292 | messageshow(index, item) { | 290 | messageshow(index, item) { |
293 | - console.log(item) | 291 | + console.log(item); |
294 | this.showcomment = true; | 292 | this.showcomment = true; |
295 | - this.socialId = item.id | ||
296 | - this.getcommentlist() | 293 | + this.socialId = item.id; |
294 | + this.getcommentlist(); | ||
297 | }, | 295 | }, |
298 | // 获取消息列表 | 296 | // 获取消息列表 |
299 | getcommentlist() { | 297 | getcommentlist() { |
@@ -305,48 +303,44 @@ export default { | @@ -305,48 +303,44 @@ export default { | ||
305 | 303 | ||
306 | that.$axios | 304 | that.$axios |
307 | .post(url, param) | 305 | .post(url, param) |
308 | - .then(function (res) { | 306 | + .then(function(res) { |
309 | console.log(res); | 307 | console.log(res); |
310 | that.allcomment = res.data.social; | 308 | that.allcomment = res.data.social; |
311 | - console.log('434', that.allcomment) | 309 | + console.log("434", that.allcomment); |
312 | that.shortcomment = res.data.social.slice(0, 5); | 310 | that.shortcomment = res.data.social.slice(0, 5); |
313 | 311 | ||
314 | if (that.fasong == 1) { | 312 | if (that.fasong == 1) { |
315 | if (that.defaultlen == true) { | 313 | if (that.defaultlen == true) { |
316 | that.defaultlen = true; | 314 | that.defaultlen = true; |
317 | - that.showcommentlist = that.shortcomment | 315 | + that.showcommentlist = that.shortcomment; |
318 | } else { | 316 | } else { |
319 | that.defaultlen = false; | 317 | that.defaultlen = false; |
320 | - that.showcommentlist = that.allcomment | 318 | + that.showcommentlist = that.allcomment; |
321 | } | 319 | } |
322 | - | ||
323 | } else { | 320 | } else { |
324 | if (res.data.social.length > 5) { | 321 | if (res.data.social.length > 5) { |
325 | - that.defaultlen = true | 322 | + that.defaultlen = true; |
326 | } | 323 | } |
327 | - that.showcommentlist = that.shortcomment | 324 | + that.showcommentlist = that.shortcomment; |
328 | } | 325 | } |
329 | - | ||
330 | - | ||
331 | }) | 326 | }) |
332 | - .catch(function (err) { | 327 | + .catch(function(err) { |
333 | console.log(err); | 328 | console.log(err); |
334 | }); | 329 | }); |
335 | }, | 330 | }, |
336 | replay(item, index) { | 331 | replay(item, index) { |
337 | - console.log(item) | 332 | + console.log(item); |
338 | this.dateinit = item.user_info.nickname; | 333 | this.dateinit = item.user_info.nickname; |
339 | - this.comment_id = item.id | ||
340 | - | 334 | + this.comment_id = item.id; |
341 | }, | 335 | }, |
342 | hidecomment() { | 336 | hidecomment() { |
343 | - this.showcomment = false | 337 | + this.showcomment = false; |
344 | }, | 338 | }, |
345 | sendtext() { | 339 | sendtext() { |
346 | let that = this; | 340 | let that = this; |
347 | - if (this.textcomment == '') { | ||
348 | - Toast("请输入评论内容") | ||
349 | - return false | 341 | + if (this.textcomment == "") { |
342 | + Toast("请输入评论内容"); | ||
343 | + return false; | ||
350 | } | 344 | } |
351 | var url = "/api/social/comment_send"; | 345 | var url = "/api/social/comment_send"; |
352 | let param = { | 346 | let param = { |
@@ -357,54 +351,48 @@ export default { | @@ -357,54 +351,48 @@ export default { | ||
357 | 351 | ||
358 | that.$axios | 352 | that.$axios |
359 | .post(url, param) | 353 | .post(url, param) |
360 | - .then(function (res) { | 354 | + .then(function(res) { |
361 | console.log(res); | 355 | console.log(res); |
362 | - Toast("发送成功") | ||
363 | - that.list.forEach(function (value, index, arrray) { | 356 | + Toast("发送成功"); |
357 | + that.list.forEach(function(value, index, arrray) { | ||
364 | if (value.id == that.socialId) { | 358 | if (value.id == that.socialId) { |
365 | - value.comment_count = value.comment_count + 1 | 359 | + value.comment_count = value.comment_count + 1; |
366 | } | 360 | } |
367 | - | ||
368 | - }) | 361 | + }); |
369 | that.list = that.list; | 362 | that.list = that.list; |
370 | // that.showcomment = false; | 363 | // that.showcomment = false; |
371 | that.fasong = 1; | 364 | that.fasong = 1; |
372 | - that.textcomment = ''; | 365 | + that.textcomment = ""; |
373 | that.getcommentlist(); | 366 | that.getcommentlist(); |
374 | - | ||
375 | - | ||
376 | - | ||
377 | }) | 367 | }) |
378 | - .catch(function (err) { | 368 | + .catch(function(err) { |
379 | console.log(err); | 369 | console.log(err); |
380 | - Toast(err.msg) | 370 | + Toast(err.msg); |
381 | }); | 371 | }); |
382 | }, | 372 | }, |
383 | seemorecomment() { | 373 | seemorecomment() { |
384 | this.showcommentlist = this.allcomment; | 374 | this.showcommentlist = this.allcomment; |
385 | - this.defaultlen = false | 375 | + this.defaultlen = false; |
386 | }, | 376 | }, |
387 | // 查看更多 | 377 | // 查看更多 |
388 | seemore(item, index) { | 378 | seemore(item, index) { |
389 | - console.log(9999) | 379 | + console.log(9999); |
390 | 380 | ||
391 | let that = this; | 381 | let that = this; |
392 | - that.list.forEach(function (value, index, array) { | ||
393 | - console.log(value) | 382 | + that.list.forEach(function(value, index, array) { |
383 | + console.log(value); | ||
394 | if (value.id == item.id) { | 384 | if (value.id == item.id) { |
395 | if (value.more == true) { | 385 | if (value.more == true) { |
396 | - value.show = !value.show | 386 | + value.show = !value.show; |
397 | } | 387 | } |
398 | - | ||
399 | } | 388 | } |
400 | - }) | 389 | + }); |
401 | that.list = that.list; | 390 | that.list = that.list; |
402 | - that.$forceUpdate() | 391 | + that.$forceUpdate(); |
403 | }, | 392 | }, |
404 | 393 | ||
405 | - | ||
406 | back() { | 394 | back() { |
407 | - this.$router.go(-1) | 395 | + this.$router.go(-1); |
408 | }, | 396 | }, |
409 | onCopy(e) { | 397 | onCopy(e) { |
410 | Toast("文案复制成功"); | 398 | Toast("文案复制成功"); |
@@ -420,9 +408,9 @@ export default { | @@ -420,9 +408,9 @@ export default { | ||
420 | this.images = item.images_arr; | 408 | this.images = item.images_arr; |
421 | if (this.images.length == 0) { | 409 | if (this.images.length == 0) { |
422 | this.nophoto = true; | 410 | this.nophoto = true; |
423 | - setTimeout(function () { | ||
424 | - that.nophoto = false | ||
425 | - }, 1500) | 411 | + setTimeout(function() { |
412 | + that.nophoto = false; | ||
413 | + }, 1500); | ||
426 | } else { | 414 | } else { |
427 | this.index = 0; | 415 | this.index = 0; |
428 | this.show = true; | 416 | this.show = true; |
@@ -436,11 +424,10 @@ export default { | @@ -436,11 +424,10 @@ export default { | ||
436 | // 异步更新数据 | 424 | // 异步更新数据 |
437 | // setTimeout 仅做示例,真实场景中一般为 ajax 请求 | 425 | // setTimeout 仅做示例,真实场景中一般为 ajax 请求 |
438 | setTimeout(() => { | 426 | setTimeout(() => { |
439 | - | ||
440 | let newpage = that.page; | 427 | let newpage = that.page; |
441 | newpage++; | 428 | newpage++; |
442 | that.page = newpage; | 429 | that.page = newpage; |
443 | - console.log(9999) | 430 | + console.log(9999); |
444 | that.gettiezilist(); | 431 | that.gettiezilist(); |
445 | // 加载状态结束 | 432 | // 加载状态结束 |
446 | that.loading = false; | 433 | that.loading = false; |
@@ -453,22 +440,21 @@ export default { | @@ -453,22 +440,21 @@ export default { | ||
453 | 440 | ||
454 | // 播放视频 | 441 | // 播放视频 |
455 | entervideo(url) { | 442 | entervideo(url) { |
456 | - console.log(344803) | ||
457 | - console.log(url) | 443 | + console.log(344803); |
444 | + console.log(url); | ||
458 | this.$router.push({ | 445 | this.$router.push({ |
459 | - path: '/videoplay', | 446 | + path: "/videoplay", |
460 | query: { url: url } | 447 | query: { url: url } |
461 | - }) | 448 | + }); |
462 | }, | 449 | }, |
463 | del(item) { | 450 | del(item) { |
464 | this.social_id = item.id; | 451 | this.social_id = item.id; |
465 | Dialog.confirm({ | 452 | Dialog.confirm({ |
466 | - title: '是否删除帖子', | ||
467 | - | 453 | + title: "是否删除帖子" |
468 | }) | 454 | }) |
469 | - .then((res) => { | ||
470 | - console.log(3489348) | ||
471 | - let that = this | 455 | + .then(res => { |
456 | + console.log(3489348); | ||
457 | + let that = this; | ||
472 | var url = "/api/user/social_del"; | 458 | var url = "/api/user/social_del"; |
473 | let param = { | 459 | let param = { |
474 | social_id: that.social_id | 460 | social_id: that.social_id |
@@ -476,22 +462,19 @@ export default { | @@ -476,22 +462,19 @@ export default { | ||
476 | 462 | ||
477 | that.$axios | 463 | that.$axios |
478 | .post(url, param) | 464 | .post(url, param) |
479 | - .then(function (res) { | 465 | + .then(function(res) { |
480 | console.log(res); | 466 | console.log(res); |
481 | - Toast("删除成功") | 467 | + Toast("删除成功"); |
482 | that.page = 1; | 468 | that.page = 1; |
483 | that.list = []; | 469 | that.list = []; |
484 | - that.gettiezilist() | ||
485 | - | ||
486 | - | 470 | + that.gettiezilist(); |
487 | }) | 471 | }) |
488 | - .catch(function (err) { | 472 | + .catch(function(err) { |
489 | console.log(err); | 473 | console.log(err); |
490 | }); | 474 | }); |
491 | // on confirm | 475 | // on confirm |
492 | }) | 476 | }) |
493 | - .catch((res) => { | ||
494 | - | 477 | + .catch(res => { |
495 | // on cancel | 478 | // on cancel |
496 | }); | 479 | }); |
497 | }, | 480 | }, |
@@ -505,49 +488,45 @@ export default { | @@ -505,49 +488,45 @@ export default { | ||
505 | 488 | ||
506 | that.$axios | 489 | that.$axios |
507 | .post(url, param) | 490 | .post(url, param) |
508 | - .then(function (res) { | 491 | + .then(function(res) { |
509 | console.log(res); | 492 | console.log(res); |
510 | - that.list = that.list.concat(res.data.social) | ||
511 | - that.list.forEach(function (value, index, array) { | ||
512 | - value.show = true | 493 | + that.list = that.list.concat(res.data.social); |
494 | + that.list.forEach(function(value, index, array) { | ||
495 | + value.show = true; | ||
513 | 496 | ||
514 | if (value.description.length > 66) { | 497 | if (value.description.length > 66) { |
515 | - value.more = true | ||
516 | - | 498 | + value.more = true; |
517 | } else { | 499 | } else { |
518 | - value.more = false | 500 | + value.more = false; |
519 | } | 501 | } |
520 | - }) | 502 | + }); |
521 | that.list = that.list; | 503 | that.list = that.list; |
522 | that.this_page = res.data.this_page; | 504 | that.this_page = res.data.this_page; |
523 | - that.total_page = res.data.total_page | ||
524 | - console.log(that.list) | ||
525 | - | 505 | + that.total_page = res.data.total_page; |
506 | + console.log(that.list); | ||
526 | }) | 507 | }) |
527 | - .catch(function (err) { | 508 | + .catch(function(err) { |
528 | console.log(err); | 509 | console.log(err); |
529 | }); | 510 | }); |
530 | }, | 511 | }, |
531 | 512 | ||
532 | // 查看更多 | 513 | // 查看更多 |
533 | seemore(item, index) { | 514 | seemore(item, index) { |
534 | - console.log(9999) | 515 | + console.log(9999); |
535 | 516 | ||
536 | let that = this; | 517 | let that = this; |
537 | - that.list.forEach(function (value, index, array) { | ||
538 | - console.log(value) | 518 | + that.list.forEach(function(value, index, array) { |
519 | + console.log(value); | ||
539 | if (value.id == item.id) { | 520 | if (value.id == item.id) { |
540 | if (value.more == true) { | 521 | if (value.more == true) { |
541 | - value.show = !value.show | 522 | + value.show = !value.show; |
542 | } | 523 | } |
543 | - | ||
544 | } | 524 | } |
545 | - }) | 525 | + }); |
546 | that.list = that.list; | 526 | that.list = that.list; |
547 | - that.$forceUpdate() | 527 | + that.$forceUpdate(); |
548 | }, | 528 | }, |
549 | 529 | ||
550 | - | ||
551 | previewimg(index, indexk) { | 530 | previewimg(index, indexk) { |
552 | console.log(index, indexk); | 531 | console.log(index, indexk); |
553 | this.index = indexk; | 532 | this.index = indexk; |
@@ -568,7 +547,7 @@ export default { | @@ -568,7 +547,7 @@ export default { | ||
568 | 547 | ||
569 | that.$axios | 548 | that.$axios |
570 | .post(url, param) | 549 | .post(url, param) |
571 | - .then(function (res) { | 550 | + .then(function(res) { |
572 | console.log(res); | 551 | console.log(res); |
573 | if (item.is_favorite == 0) { | 552 | if (item.is_favorite == 0) { |
574 | item.is_favorite = 1; | 553 | item.is_favorite = 1; |
@@ -586,7 +565,7 @@ export default { | @@ -586,7 +565,7 @@ export default { | ||
586 | that.list = that.list; | 565 | that.list = that.list; |
587 | that.$forceUpdate(); | 566 | that.$forceUpdate(); |
588 | }) | 567 | }) |
589 | - .catch(function (err) { | 568 | + .catch(function(err) { |
590 | console.log(err); | 569 | console.log(err); |
591 | }); | 570 | }); |
592 | }, | 571 | }, |
@@ -594,7 +573,7 @@ export default { | @@ -594,7 +573,7 @@ export default { | ||
594 | zanclick(index, item) { | 573 | zanclick(index, item) { |
595 | let that = this; | 574 | let that = this; |
596 | console.log(item.id); | 575 | console.log(item.id); |
597 | - console.log(item.deletetime) | 576 | + console.log(item.deletetime); |
598 | 577 | ||
599 | var url = "/api/user/good"; | 578 | var url = "/api/user/good"; |
600 | let param = { | 579 | let param = { |
@@ -604,34 +583,30 @@ export default { | @@ -604,34 +583,30 @@ export default { | ||
604 | 583 | ||
605 | that.$axios | 584 | that.$axios |
606 | .post(url, param) | 585 | .post(url, param) |
607 | - .then(function (res) { | 586 | + .then(function(res) { |
608 | console.log(res); | 587 | console.log(res); |
609 | if (item.is_good == 0) { | 588 | if (item.is_good == 0) { |
610 | item.is_good = 1; | 589 | item.is_good = 1; |
611 | that.list[index].is_good = 1; | 590 | that.list[index].is_good = 1; |
612 | - that.list[index].good_count = | ||
613 | - that.list[index].good_count + 1; | 591 | + that.list[index].good_count = that.list[index].good_count + 1; |
614 | Toast("点赞成功"); | 592 | Toast("点赞成功"); |
615 | } else if (item.is_good == 1) { | 593 | } else if (item.is_good == 1) { |
616 | item.is_good = 1; | 594 | item.is_good = 1; |
617 | Toast("取消点赞成功"); | 595 | Toast("取消点赞成功"); |
618 | that.list[index].is_good = 0; | 596 | that.list[index].is_good = 0; |
619 | - that.list[index].good_count = | ||
620 | - that.list[index].good_count - 1; | 597 | + that.list[index].good_count = that.list[index].good_count - 1; |
621 | } | 598 | } |
622 | that.list = that.list; | 599 | that.list = that.list; |
623 | that.$forceUpdate(); | 600 | that.$forceUpdate(); |
624 | }) | 601 | }) |
625 | - .catch(function (err) { | 602 | + .catch(function(err) { |
626 | console.log(err); | 603 | console.log(err); |
627 | }); | 604 | }); |
628 | - }, | ||
629 | - | 605 | + } |
630 | } | 606 | } |
631 | -} | 607 | +}; |
632 | </script> | 608 | </script> |
633 | 609 | ||
634 | - | ||
635 | <style scoped> | 610 | <style scoped> |
636 | @import "../../../style/usercenter.css"; | 611 | @import "../../../style/usercenter.css"; |
637 | .dianitem { | 612 | .dianitem { |
@@ -774,4 +749,4 @@ export default { | @@ -774,4 +749,4 @@ export default { | ||
774 | color: #041121; | 749 | color: #041121; |
775 | font-size: 0.36rem; | 750 | font-size: 0.36rem; |
776 | } | 751 | } |
777 | -</style> | ||
752 | +</style> |
@@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
67 | <img src="../../../assets/sucai.png" alt /> | 67 | <img src="../../../assets/sucai.png" alt /> |
68 | </div> | 68 | </div> |
69 | 69 | ||
70 | - <span class="kaiketext">素材</span> | 70 | + <span class="kaiketext">素材中心</span> |
71 | </div> | 71 | </div> |
72 | <img src="../../../assets/grayrow.png" alt class="yourow" /> | 72 | <img src="../../../assets/grayrow.png" alt class="yourow" /> |
73 | </div> | 73 | </div> |
@@ -180,16 +180,15 @@ export default { | @@ -180,16 +180,15 @@ export default { | ||
180 | this.$router.push({ | 180 | this.$router.push({ |
181 | path: "/userzhibo", | 181 | path: "/userzhibo", |
182 | query: { | 182 | query: { |
183 | - id: id, | ||
184 | - name: lesson.title | 183 | + id: id |
185 | } | 184 | } |
186 | }); | 185 | }); |
186 | + localStorage.setItem("coursename", lesson.title); | ||
187 | } else if (this.lesson.type == 2) { | 187 | } else if (this.lesson.type == 2) { |
188 | this.$router.push({ | 188 | this.$router.push({ |
189 | path: "/userlubo", | 189 | path: "/userlubo", |
190 | query: { | 190 | query: { |
191 | - id: id, | ||
192 | - name: lesson.title | 191 | + id: id |
193 | } | 192 | } |
194 | }); | 193 | }); |
195 | } | 194 | } |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | </div> | 13 | </div> |
14 | </div> | 14 | </div> |
15 | 15 | ||
16 | - <div class="nodata" v-if="recordlist.length==0">暂无聊天记录</div> | 16 | + <div class="nodata" v-if="recordlist.length == 0">暂无聊天记录</div> |
17 | <van-pull-refresh | 17 | <van-pull-refresh |
18 | v-model="isLoading" | 18 | v-model="isLoading" |
19 | @refresh="onRefresh" | 19 | @refresh="onRefresh" |
@@ -35,18 +35,18 @@ | @@ -35,18 +35,18 @@ | ||
35 | </div>--> | 35 | </div>--> |
36 | 36 | ||
37 | <div> | 37 | <div> |
38 | - <div v-for="(item,index) in recordlist" :key="index"> | ||
39 | - <div class="messageitem flex" v-if="item.user_id!=user_id"> | 38 | + <div v-for="(item, index) in recordlist" :key="index"> |
39 | + <div class="messageitem flex" v-if="item.user_id != user_id"> | ||
40 | <div class="messageitemleft"> | 40 | <div class="messageitemleft"> |
41 | <img :src="item.avatar" alt /> | 41 | <img :src="item.avatar" alt /> |
42 | </div> | 42 | </div> |
43 | - <div class="messageitemright" v-if="item.type==1"> | ||
44 | - <div class="messagecontent">{{item.data}}</div> | 43 | + <div class="messageitemright" v-if="item.type == 1"> |
44 | + <div class="messagecontent">{{ item.data }}</div> | ||
45 | </div> | 45 | </div> |
46 | 46 | ||
47 | <div | 47 | <div |
48 | class="messageitemright imgright" | 48 | class="messageitemright imgright" |
49 | - v-if="item.type==2" | 49 | + v-if="item.type == 2" |
50 | @click="previewimg(item.data)" | 50 | @click="previewimg(item.data)" |
51 | > | 51 | > |
52 | <div class="messagecontent"> | 52 | <div class="messagecontent"> |
@@ -56,38 +56,47 @@ | @@ -56,38 +56,47 @@ | ||
56 | </div> | 56 | </div> |
57 | </div> | 57 | </div> |
58 | 58 | ||
59 | - <div class="messageitemright" v-if="item.type==3"> | 59 | + <div class="messageitemright" v-if="item.type == 3"> |
60 | <div | 60 | <div |
61 | class="messagecontent" | 61 | class="messagecontent" |
62 | - :style="{width:1.7+'rem'}" | ||
63 | - v-if="item.times>0&&item.times<5" | ||
64 | - @click="audioplay(item,index)" | 62 | + :style="{ width: 1.7 + 'rem' }" |
63 | + v-if="item.times > 0 && item.times < 5" | ||
64 | + @click="audioplay(item, index)" | ||
65 | > | 65 | > |
66 | <div class="voice"> | 66 | <div class="voice"> |
67 | - <div class="bg" :class="item.sel==true?'voicePlay':''"></div> | ||
68 | - <div class="miaoshuk">{{item.times}}'</div> | 67 | + <div |
68 | + class="bg" | ||
69 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
70 | + ></div> | ||
71 | + <div class="miaoshuk">{{ item.times }}'</div> | ||
69 | </div> | 72 | </div> |
70 | </div> | 73 | </div> |
71 | <div | 74 | <div |
72 | class="messagecontent" | 75 | class="messagecontent" |
73 | - :style="{width:2+'rem'}" | ||
74 | - v-if="item.times>=5&&item.times<15" | ||
75 | - @click="audioplay(item,index)" | 76 | + :style="{ width: 2 + 'rem' }" |
77 | + v-if="item.times >= 5 && item.times < 15" | ||
78 | + @click="audioplay(item, index)" | ||
76 | > | 79 | > |
77 | <div class="voice"> | 80 | <div class="voice"> |
78 | - <div class="bg" :class="item.sel==true?'voicePlay':''"></div> | ||
79 | - <div class="miaoshuk">{{item.times}}'</div> | 81 | + <div |
82 | + class="bg" | ||
83 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
84 | + ></div> | ||
85 | + <div class="miaoshuk">{{ item.times }}'</div> | ||
80 | </div> | 86 | </div> |
81 | </div> | 87 | </div> |
82 | <div | 88 | <div |
83 | class="messagecontent" | 89 | class="messagecontent" |
84 | - :style="{width:4.5+'rem'}" | ||
85 | - v-if="item.times>=15" | ||
86 | - @click="audioplay(item,index)" | 90 | + :style="{ width: 4.5 + 'rem' }" |
91 | + v-if="item.times >= 15" | ||
92 | + @click="audioplay(item, index)" | ||
87 | > | 93 | > |
88 | <div class="voice"> | 94 | <div class="voice"> |
89 | - <div class="bg" :class="item.sel==true?'voicePlay':''"></div> | ||
90 | - <div class="miaoshuk">{{item.times}}'</div> | 95 | + <div |
96 | + class="bg" | ||
97 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
98 | + ></div> | ||
99 | + <div class="miaoshuk">{{ item.times }}'</div> | ||
91 | </div> | 100 | </div> |
92 | </div> | 101 | </div> |
93 | </div> | 102 | </div> |
@@ -95,17 +104,21 @@ | @@ -95,17 +104,21 @@ | ||
95 | 104 | ||
96 | <div | 105 | <div |
97 | class="messageitem messageitemk flex" | 106 | class="messageitem messageitemk flex" |
98 | - v-if="item.user_id==user_id" | 107 | + v-if="item.user_id == user_id" |
99 | :id="item.idkk" | 108 | :id="item.idkk" |
100 | @touchstart="gotouchstart(item)" | 109 | @touchstart="gotouchstart(item)" |
101 | @touchmove="gotouchmove" | 110 | @touchmove="gotouchmove" |
102 | @touchend="gotouchend(item)" | 111 | @touchend="gotouchend(item)" |
103 | > | 112 | > |
104 | - <div class="messageitemrightk" v-if="item.type==1"> | ||
105 | - <div class="messagecontentk">{{item.data}}</div> | 113 | + <div class="messageitemrightk" v-if="item.type == 1"> |
114 | + <div class="messagecontentk">{{ item.data }}</div> | ||
106 | </div> | 115 | </div> |
107 | 116 | ||
108 | - <div class="messageitemrightk" v-if="item.type==2" @click="previewimg(item.data)"> | 117 | + <div |
118 | + class="messageitemrightk" | ||
119 | + v-if="item.type == 2" | ||
120 | + @click="previewimg(item.data)" | ||
121 | + > | ||
109 | <div class="messagecontentk"> | 122 | <div class="messagecontentk"> |
110 | <div class="contentimg"> | 123 | <div class="contentimg"> |
111 | <img :src="item.data" alt /> | 124 | <img :src="item.data" alt /> |
@@ -114,38 +127,47 @@ | @@ -114,38 +127,47 @@ | ||
114 | </div> | 127 | </div> |
115 | <!-- v-clipboard:copy="that.serverId" | 128 | <!-- v-clipboard:copy="that.serverId" |
116 | v-clipboard:success="onCopy"--> | 129 | v-clipboard:success="onCopy"--> |
117 | - <div class="messageitemrightk" v-if="item.type==3"> | 130 | + <div class="messageitemrightk" v-if="item.type == 3"> |
118 | <div | 131 | <div |
119 | class="messagecontentk yuyink" | 132 | class="messagecontentk yuyink" |
120 | - :style="{width:1+'rem'}" | ||
121 | - v-if="item.times>0&&item.times<5" | ||
122 | - @click="audioplay(item,index)" | 133 | + :style="{ width: 1 + 'rem' }" |
134 | + v-if="item.times > 0 && item.times < 5" | ||
135 | + @click="audioplay(item, index)" | ||
123 | > | 136 | > |
124 | <div class="voice voiceright"> | 137 | <div class="voice voiceright"> |
125 | - <div class="bg" :class="item.sel==true?'voicePlay':''"></div> | ||
126 | - <div class="miaoshu">{{item.times}}'</div> | 138 | + <div |
139 | + class="bg" | ||
140 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
141 | + ></div> | ||
142 | + <div class="miaoshu">{{ item.times }}'</div> | ||
127 | </div> | 143 | </div> |
128 | </div> | 144 | </div> |
129 | <div | 145 | <div |
130 | class="messagecontentk yuyink" | 146 | class="messagecontentk yuyink" |
131 | - :style="{width:2+'rem'}" | ||
132 | - v-if="item.times>=5&&item.times<15" | ||
133 | - @click="audioplay(item,index)" | 147 | + :style="{ width: 2 + 'rem' }" |
148 | + v-if="item.times >= 5 && item.times < 15" | ||
149 | + @click="audioplay(item, index)" | ||
134 | > | 150 | > |
135 | <div class="voice voiceright"> | 151 | <div class="voice voiceright"> |
136 | - <div class="bg" :class="item.sel==true?'voicePlay':''"></div> | ||
137 | - <div class="miaoshu">{{item.times}}'</div> | 152 | + <div |
153 | + class="bg" | ||
154 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
155 | + ></div> | ||
156 | + <div class="miaoshu">{{ item.times }}'</div> | ||
138 | </div> | 157 | </div> |
139 | </div> | 158 | </div> |
140 | <div | 159 | <div |
141 | class="messagecontentk yuyink" | 160 | class="messagecontentk yuyink" |
142 | - :style="{width:4.5+'rem'}" | ||
143 | - v-if="item.times>=15" | ||
144 | - @click="audioplay(item,index)" | 161 | + :style="{ width: 4.5 + 'rem' }" |
162 | + v-if="item.times >= 15" | ||
163 | + @click="audioplay(item, index)" | ||
145 | > | 164 | > |
146 | <div class="voice voiceright"> | 165 | <div class="voice voiceright"> |
147 | - <div class="bg" :class="item.sel==true?'voicePlay':''"></div> | ||
148 | - <div class="miaoshu">{{item.times}}'</div> | 166 | + <div |
167 | + class="bg" | ||
168 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
169 | + ></div> | ||
170 | + <div class="miaoshu">{{ item.times }}'</div> | ||
149 | </div> | 171 | </div> |
150 | </div> | 172 | </div> |
151 | </div> | 173 | </div> |
@@ -175,19 +197,49 @@ | @@ -175,19 +197,49 @@ | ||
175 | <img src="../../../assets/yuyin.png" alt /> | 197 | <img src="../../../assets/yuyin.png" alt /> |
176 | </div> | 198 | </div> |
177 | <div class="writermessage"> | 199 | <div class="writermessage"> |
178 | - <input type="text" placeholder="写留言" @input="entertext" :value="text" /> | 200 | + <input |
201 | + type="text" | ||
202 | + placeholder="写留言" | ||
203 | + @input="entertext" | ||
204 | + :value="text" | ||
205 | + /> | ||
179 | </div> | 206 | </div> |
180 | <div class="sendk" @click="send">发送</div> | 207 | <div class="sendk" @click="send">发送</div> |
181 | </div> | 208 | </div> |
182 | <div class="messagebot messagebotk flextwo" v-else> | 209 | <div class="messagebot messagebotk flextwo" v-else> |
183 | - <img src="../../../assets/yuyin.png" alt class="zhibobtn" @click="changeword" /> | ||
184 | - <img src="../../../assets/pic.png" alt class="zhibobtn" @click="choseimg" /> | ||
185 | - <img src="../../../assets/luyin.png" alt class="yuyinbtn" @click="yuyin" /> | 210 | + <img |
211 | + src="../../../assets/yuyin.png" | ||
212 | + alt | ||
213 | + class="zhibobtn" | ||
214 | + @click="changeword" | ||
215 | + /> | ||
216 | + <img | ||
217 | + src="../../../assets/pic.png" | ||
218 | + alt | ||
219 | + class="zhibobtn" | ||
220 | + @click="choseimg" | ||
221 | + /> | ||
222 | + <img | ||
223 | + src="../../../assets/luyin.png" | ||
224 | + alt | ||
225 | + class="yuyinbtn" | ||
226 | + @click="yuyin" | ||
227 | + /> | ||
186 | <div class style="position:relative"> | 228 | <div class style="position:relative"> |
187 | - <input type="file" accept="audio/*" @change="afterRead" class="upuinpin" /> | 229 | + <input |
230 | + type="file" | ||
231 | + accept="audio/*" | ||
232 | + @change="afterRead" | ||
233 | + class="upuinpin" | ||
234 | + /> | ||
188 | <img src="../../../assets/shangchuan.png" alt class="zhibobtn" /> | 235 | <img src="../../../assets/shangchuan.png" alt class="zhibobtn" /> |
189 | </div> | 236 | </div> |
190 | - <img src="../../../assets/kaiguan.png" alt class="zhibobtn" @click="stopbtn" /> | 237 | + <img |
238 | + src="../../../assets/kaiguan.png" | ||
239 | + alt | ||
240 | + class="zhibobtn" | ||
241 | + @click="stopbtn" | ||
242 | + /> | ||
191 | </div> | 243 | </div> |
192 | </div> | 244 | </div> |
193 | <!-- <div class="manypeople"> | 245 | <!-- <div class="manypeople"> |
@@ -293,7 +345,7 @@ import Vue from "vue"; | @@ -293,7 +345,7 @@ import Vue from "vue"; | ||
293 | import { PullRefresh, Toast, Dialog, Loading } from "vant"; | 345 | import { PullRefresh, Toast, Dialog, Loading } from "vant"; |
294 | Vue.use(PullRefresh); | 346 | Vue.use(PullRefresh); |
295 | Vue.use(Toast); | 347 | Vue.use(Toast); |
296 | -Vue.use(Loading) | 348 | +Vue.use(Loading); |
297 | var timer = null; | 349 | var timer = null; |
298 | export default { | 350 | export default { |
299 | data() { | 351 | data() { |
@@ -320,35 +372,34 @@ export default { | @@ -320,35 +372,34 @@ export default { | ||
320 | group_count: "", | 372 | group_count: "", |
321 | // 直播列表 | 373 | // 直播列表 |
322 | page: 1, | 374 | page: 1, |
323 | - this_page: '', | ||
324 | - total_page: '', | 375 | + this_page: "", |
376 | + total_page: "", | ||
325 | isLoading: false, | 377 | isLoading: false, |
326 | recordlist: [], | 378 | recordlist: [], |
327 | baseurl: "", | 379 | baseurl: "", |
328 | - height: '', | ||
329 | - hei: '600px', | ||
330 | - target: '', | ||
331 | - yuyintype: '', | ||
332 | - stopurl: '', | 380 | + height: "", |
381 | + hei: "600px", | ||
382 | + target: "", | ||
383 | + yuyintype: "", | ||
384 | + stopurl: "", | ||
333 | stopindex: 0, | 385 | stopindex: 0, |
334 | - playlocalid: '', | 386 | + playlocalid: "", |
335 | cardzheng: false, | 387 | cardzheng: false, |
336 | - coursename: '' | 388 | + coursename: "" |
337 | }; | 389 | }; |
338 | }, | 390 | }, |
339 | created() { | 391 | created() { |
340 | - | ||
341 | // 获取个人中心 | 392 | // 获取个人中心 |
342 | - this.getuserinfo() | 393 | + this.getuserinfo(); |
343 | // alert(location.host) | 394 | // alert(location.host) |
344 | - this.baseurl = 'http://' + location.host | 395 | + this.baseurl = "http://" + location.host; |
345 | let div = this.$refs["message-list"]; | 396 | let div = this.$refs["message-list"]; |
346 | 397 | ||
347 | // alert(1111) | 398 | // alert(1111) |
348 | // alert(this.baseurl+ | 399 | // alert(this.baseurl+ |
349 | // "/redirect.html?shareRedirect=" + | 400 | // "/redirect.html?shareRedirect=" + |
350 | // encodeURIComponent(window.location.href)) | 401 | // encodeURIComponent(window.location.href)) |
351 | - this.coursename = this.$route.query.name | 402 | + this.coursename = this.$route.query.name; |
352 | document.title = "唐元集公众号"; | 403 | document.title = "唐元集公众号"; |
353 | this.id = this.$route.query.id; | 404 | this.id = this.$route.query.id; |
354 | // 获取appid | 405 | // 获取appid |
@@ -356,21 +407,15 @@ export default { | @@ -356,21 +407,15 @@ export default { | ||
356 | this.getlubodetail(); | 407 | this.getlubodetail(); |
357 | this.initWebSocket(); | 408 | this.initWebSocket(); |
358 | // 获取直播列表 | 409 | // 获取直播列表 |
359 | - this.getzhibolist() | ||
360 | - | 410 | + this.getzhibolist(); |
361 | }, | 411 | }, |
362 | mounted() { | 412 | mounted() { |
413 | + let that = this; | ||
363 | 414 | ||
364 | - let that = this | ||
365 | - | ||
366 | - | ||
367 | - console.log(that.target, '99997878666') | 415 | + console.log(that.target, "99997878666"); |
368 | }, | 416 | }, |
369 | 417 | ||
370 | - | ||
371 | - watch: { | ||
372 | - | ||
373 | - }, | 418 | + watch: {}, |
374 | beforeRouteEnter(to, from, next) { | 419 | beforeRouteEnter(to, from, next) { |
375 | var u = navigator.userAgent; | 420 | var u = navigator.userAgent; |
376 | var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 | 421 | var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 |
@@ -385,24 +430,21 @@ export default { | @@ -385,24 +430,21 @@ export default { | ||
385 | methods: { | 430 | methods: { |
386 | // 上传音频 | 431 | // 上传音频 |
387 | afterRead(e) { | 432 | afterRead(e) { |
388 | - console.log(e) | 433 | + console.log(e); |
389 | let file = e.target.files[0]; | 434 | let file = e.target.files[0]; |
390 | let that = this; | 435 | let that = this; |
391 | - that.cardzheng = true | ||
392 | - | ||
393 | - | 436 | + that.cardzheng = true; |
394 | 437 | ||
395 | var formdata = new FormData(); | 438 | var formdata = new FormData(); |
396 | formdata.append("file", file); | 439 | formdata.append("file", file); |
397 | 440 | ||
398 | var url = "/api/common/upload"; | 441 | var url = "/api/common/upload"; |
399 | 442 | ||
400 | - | ||
401 | that.$uploadFile | 443 | that.$uploadFile |
402 | .post(url, formdata) | 444 | .post(url, formdata) |
403 | - .then(function (res) { | ||
404 | - that.cardzheng = false | ||
405 | - console.log(res) | 445 | + .then(function(res) { |
446 | + that.cardzheng = false; | ||
447 | + console.log(res); | ||
406 | let objdata = { | 448 | let objdata = { |
407 | lesson_id: that.id, | 449 | lesson_id: that.id, |
408 | type: 3, | 450 | type: 3, |
@@ -413,14 +455,11 @@ export default { | @@ -413,14 +455,11 @@ export default { | ||
413 | objdata = JSON.stringify(objdata); | 455 | objdata = JSON.stringify(objdata); |
414 | 456 | ||
415 | that.websocketsend(objdata); | 457 | that.websocketsend(objdata); |
416 | - | ||
417 | }) | 458 | }) |
418 | .catch(err => { | 459 | .catch(err => { |
419 | console.log(err); | 460 | console.log(err); |
420 | - Toast(err.msg) | 461 | + Toast(err.msg); |
421 | }); | 462 | }); |
422 | - | ||
423 | - | ||
424 | }, | 463 | }, |
425 | 464 | ||
426 | //获取个人中心 | 465 | //获取个人中心 |
@@ -428,34 +467,27 @@ export default { | @@ -428,34 +467,27 @@ export default { | ||
428 | let that = this; | 467 | let that = this; |
429 | 468 | ||
430 | var url = "/api/user/index"; | 469 | var url = "/api/user/index"; |
431 | - let param = { | ||
432 | - | ||
433 | - }; | 470 | + let param = {}; |
434 | 471 | ||
435 | that.$axios | 472 | that.$axios |
436 | .post(url, param) | 473 | .post(url, param) |
437 | - .then(function (res) { | 474 | + .then(function(res) { |
438 | console.log(res); | 475 | console.log(res); |
439 | - that.user_id = res.data.id | ||
440 | - | ||
441 | - | 476 | + that.user_id = res.data.id; |
442 | }) | 477 | }) |
443 | - .catch(function (err) { | ||
444 | - | ||
445 | - | ||
446 | - }); | 478 | + .catch(function(err) {}); |
447 | }, | 479 | }, |
448 | 480 | ||
449 | // 列表自动滚到到底部 | 481 | // 列表自动滚到到底部 |
450 | toBottom() { | 482 | toBottom() { |
451 | // let listContainer = document.getElementById('messagebox') | 483 | // let listContainer = document.getElementById('messagebox') |
452 | let div = this.$refs["message-list"]; | 484 | let div = this.$refs["message-list"]; |
453 | - console.log(div.scrollHeight, 8887766543) | ||
454 | - console.log(div.style.height, 9999) | 485 | + console.log(div.scrollHeight, 8887766543); |
486 | + console.log(div.style.height, 9999); | ||
455 | 487 | ||
456 | - this.height = div.clientHeight | 488 | + this.height = div.clientHeight; |
457 | 489 | ||
458 | - div.scrollTop = div.scrollHeight | 490 | + div.scrollTop = div.scrollHeight; |
459 | // let height = div.offsetHeight | 491 | // let height = div.offsetHeight |
460 | // console.log(height, 9999888888) | 492 | // console.log(height, 9999888888) |
461 | // const listContainer = this.$refs["message-list"]; | 493 | // const listContainer = this.$refs["message-list"]; |
@@ -497,7 +529,6 @@ export default { | @@ -497,7 +529,6 @@ export default { | ||
497 | console.log(that.page); | 529 | console.log(that.page); |
498 | that.getzhibolist(); | 530 | that.getzhibolist(); |
499 | } | 531 | } |
500 | - | ||
501 | }, 1000); | 532 | }, 1000); |
502 | }, | 533 | }, |
503 | 534 | ||
@@ -505,6 +536,7 @@ export default { | @@ -505,6 +536,7 @@ export default { | ||
505 | getappid() { | 536 | getappid() { |
506 | let that = this; | 537 | let that = this; |
507 | console.log(34734894890); | 538 | console.log(34734894890); |
539 | + // let urlk = window.location.href; | ||
508 | let urlk = window.location.href; | 540 | let urlk = window.location.href; |
509 | var url = "/api/user/wechat_jssdk"; | 541 | var url = "/api/user/wechat_jssdk"; |
510 | let param = { | 542 | let param = { |
@@ -513,7 +545,7 @@ export default { | @@ -513,7 +545,7 @@ export default { | ||
513 | 545 | ||
514 | that.$axios | 546 | that.$axios |
515 | .post(url, param) | 547 | .post(url, param) |
516 | - .then(function (res) { | 548 | + .then(function(res) { |
517 | console.log(res); | 549 | console.log(res); |
518 | wx.config({ | 550 | wx.config({ |
519 | debug: false, | 551 | debug: false, |
@@ -538,25 +570,22 @@ export default { | @@ -538,25 +570,22 @@ export default { | ||
538 | ] | 570 | ] |
539 | }); | 571 | }); |
540 | 572 | ||
541 | - that.sharetofriend() | 573 | + that.sharetofriend(); |
542 | }) | 574 | }) |
543 | - .catch(function (err) { | 575 | + .catch(function(err) { |
544 | console.log(err); | 576 | console.log(err); |
545 | }); | 577 | }); |
546 | }, | 578 | }, |
547 | 579 | ||
548 | // 分享给朋友 | 580 | // 分享给朋友 |
549 | sharetofriend() { | 581 | sharetofriend() { |
550 | - | ||
551 | var that = this; | 582 | var that = this; |
552 | // 处理验证失败的信息 | 583 | // 处理验证失败的信息 |
553 | - wx.error(function (res) { | 584 | + wx.error(function(res) { |
554 | logUtil.printLog("验证失败返回的信息:", res); | 585 | logUtil.printLog("验证失败返回的信息:", res); |
555 | }); | 586 | }); |
556 | // 处理验证成功的信息 | 587 | // 处理验证成功的信息 |
557 | - wx.ready(function () { | ||
558 | - | ||
559 | - | 588 | + wx.ready(function() { |
560 | // alert(window.location.href.split('#')[0]); | 589 | // alert(window.location.href.split('#')[0]); |
561 | // var share_title = that.sharemsg.title; | 590 | // var share_title = that.sharemsg.title; |
562 | // if (share_title.indexOf("${title}") >= 0) { | 591 | // if (share_title.indexOf("${title}") >= 0) { |
@@ -577,11 +606,13 @@ export default { | @@ -577,11 +606,13 @@ export default { | ||
577 | // } | 606 | // } |
578 | // 分享到朋友圈 | 607 | // 分享到朋友圈 |
579 | wx.updateTimelineShareData({ | 608 | wx.updateTimelineShareData({ |
580 | - title: '分享', // 分享标题 | ||
581 | - link: that.baseurl + | 609 | + title: "分享", // 分享标题 |
610 | + link: | ||
611 | + that.baseurl + | ||
582 | "/redirect.html?shareRedirect=" + | 612 | "/redirect.html?shareRedirect=" + |
583 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 | 613 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
584 | - imgUrl: 'http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png', | 614 | + imgUrl: |
615 | + "http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png", | ||
585 | 616 | ||
586 | // imgUrl: that.details.details.img | 617 | // imgUrl: that.details.details.img |
587 | // ? that.details.details.img | 618 | // ? that.details.details.img |
@@ -589,13 +620,13 @@ export default { | @@ -589,13 +620,13 @@ export default { | ||
589 | 620 | ||
590 | // 分享图标 | 621 | // 分享图标 |
591 | // desc: that.sharemsg.content, | 622 | // desc: that.sharemsg.content, |
592 | - success: function (res) { | 623 | + success: function(res) { |
593 | // 用户确认分享后执行的回调函数 | 624 | // 用户确认分享后执行的回调函数 |
594 | console.log("suss"); | 625 | console.log("suss"); |
595 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); | 626 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); |
596 | that.showMsg("分享成功!"); | 627 | that.showMsg("分享成功!"); |
597 | }, | 628 | }, |
598 | - cancel: function (res) { | 629 | + cancel: function(res) { |
599 | // 用户取消分享后执行的回调函数 | 630 | // 用户取消分享后执行的回调函数 |
600 | console.log("err"); | 631 | console.log("err"); |
601 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); | 632 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); |
@@ -603,25 +634,26 @@ export default { | @@ -603,25 +634,26 @@ export default { | ||
603 | }), | 634 | }), |
604 | // 分享给朋友 | 635 | // 分享给朋友 |
605 | wx.updateAppMessageShareData({ | 636 | wx.updateAppMessageShareData({ |
606 | - title: '分享', // 分享标题 | ||
607 | - desc: '分享', // 分享描述 | 637 | + title: "分享", // 分享标题 |
638 | + desc: "分享", // 分享描述 | ||
608 | link: | 639 | link: |
609 | that.baseurl + | 640 | that.baseurl + |
610 | "/redirect.html?shareRedirect=" + | 641 | "/redirect.html?shareRedirect=" + |
611 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 | 642 | encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
612 | - imgUrl: 'http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png', | 643 | + imgUrl: |
644 | + "http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png", | ||
613 | 645 | ||
614 | // imgUrl: that.details.details.img | 646 | // imgUrl: that.details.details.img |
615 | // ? that.details.details.img | 647 | // ? that.details.details.img |
616 | - // : that.sharemsg.img, | 648 | + // : that.sharemsg.img, |
617 | // 分享图标 | 649 | // 分享图标 |
618 | type: "", // 分享类型,music、video或link,不填默认为link | 650 | type: "", // 分享类型,music、video或link,不填默认为link |
619 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 | 651 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 |
620 | - success: function (res) { | 652 | + success: function(res) { |
621 | // 用户确认分享后执行的回调函数 | 653 | // 用户确认分享后执行的回调函数 |
622 | logUtil.printLog("分享给朋友成功返回的信息为:", res); | 654 | logUtil.printLog("分享给朋友成功返回的信息为:", res); |
623 | }, | 655 | }, |
624 | - cancel: function (res) { | 656 | + cancel: function(res) { |
625 | // 用户取消分享后执行的回调函数 | 657 | // 用户取消分享后执行的回调函数 |
626 | logUtil.printLog("取消分享给朋友返回的信息为:", res); | 658 | logUtil.printLog("取消分享给朋友返回的信息为:", res); |
627 | } | 659 | } |
@@ -631,21 +663,21 @@ export default { | @@ -631,21 +663,21 @@ export default { | ||
631 | 663 | ||
632 | // 上传图片 | 664 | // 上传图片 |
633 | choseimg() { | 665 | choseimg() { |
634 | - let that = this | 666 | + let that = this; |
635 | wx.chooseImage({ | 667 | wx.chooseImage({ |
636 | count: 1, // 默认9 | 668 | count: 1, // 默认9 |
637 | - sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 | ||
638 | - sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 | ||
639 | - success: function (res) { | 669 | + sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有 |
670 | + sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 | ||
671 | + success: function(res) { | ||
640 | var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 | 672 | var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 |
641 | 673 | ||
642 | wx.uploadImage({ | 674 | wx.uploadImage({ |
643 | localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得 | 675 | localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得 |
644 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 676 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
645 | - success: function (res) { | 677 | + success: function(res) { |
646 | var serverId = res.serverId; // 返回图片的服务器端ID | 678 | var serverId = res.serverId; // 返回图片的服务器端ID |
647 | that.serverId = res.serverId; | 679 | that.serverId = res.serverId; |
648 | - that.upload() | 680 | + that.upload(); |
649 | } | 681 | } |
650 | }); | 682 | }); |
651 | } | 683 | } |
@@ -654,8 +686,8 @@ export default { | @@ -654,8 +686,8 @@ export default { | ||
654 | 686 | ||
655 | upload() { | 687 | upload() { |
656 | let that = this; | 688 | let that = this; |
657 | - console.log(34734894890) | ||
658 | - alert(that.serverId) | 689 | + console.log(34734894890); |
690 | + alert(that.serverId); | ||
659 | var url = "/api/user/upload_media"; | 691 | var url = "/api/user/upload_media"; |
660 | let param = { | 692 | let param = { |
661 | type: 1, | 693 | type: 1, |
@@ -664,7 +696,7 @@ export default { | @@ -664,7 +696,7 @@ export default { | ||
664 | 696 | ||
665 | that.$axios | 697 | that.$axios |
666 | .post(url, param) | 698 | .post(url, param) |
667 | - .then(function (res) { | 699 | + .then(function(res) { |
668 | console.log(res); | 700 | console.log(res); |
669 | that.videourl = res.data.media; | 701 | that.videourl = res.data.media; |
670 | let objdata = { | 702 | let objdata = { |
@@ -678,25 +710,24 @@ export default { | @@ -678,25 +710,24 @@ export default { | ||
678 | // alert(objdata); | 710 | // alert(objdata); |
679 | that.websocketsend(objdata); | 711 | that.websocketsend(objdata); |
680 | // alert(that.videourl) | 712 | // alert(that.videourl) |
681 | - | ||
682 | }) | 713 | }) |
683 | - .catch(function (err) { | ||
684 | - alert(err) | 714 | + .catch(function(err) { |
715 | + alert(err); | ||
685 | console.log(err); | 716 | console.log(err); |
686 | }); | 717 | }); |
687 | }, | 718 | }, |
688 | // 预览图片 | 719 | // 预览图片 |
689 | previewimg(url) { | 720 | previewimg(url) { |
690 | let arr = []; | 721 | let arr = []; |
691 | - arr.push(url) | 722 | + arr.push(url); |
692 | wx.previewImage({ | 723 | wx.previewImage({ |
693 | current: url, // 当前显示图片的http链接 | 724 | current: url, // 当前显示图片的http链接 |
694 | - urls: arr// 需要预览的图片http链接列表 | 725 | + urls: arr // 需要预览的图片http链接列表 |
695 | }); | 726 | }); |
696 | }, | 727 | }, |
697 | // 隐藏遮罩层 | 728 | // 隐藏遮罩层 |
698 | hide() { | 729 | hide() { |
699 | - let that = this | 730 | + let that = this; |
700 | this.beginlushow = false; | 731 | this.beginlushow = false; |
701 | this.zhengzailu = false; | 732 | this.zhengzailu = false; |
702 | this.luprocess = false; | 733 | this.luprocess = false; |
@@ -732,7 +763,7 @@ export default { | @@ -732,7 +763,7 @@ export default { | ||
732 | // 开始录制 | 763 | // 开始录制 |
733 | yuyin() { | 764 | yuyin() { |
734 | this.beginlushow = true; | 765 | this.beginlushow = true; |
735 | - this.yuyintype = 1 | 766 | + this.yuyintype = 1; |
736 | }, | 767 | }, |
737 | // 开始录制 | 768 | // 开始录制 |
738 | // 开始录音 | 769 | // 开始录音 |
@@ -748,7 +779,7 @@ export default { | @@ -748,7 +779,7 @@ export default { | ||
748 | console.log(that.time); | 779 | console.log(that.time); |
749 | }, 1000); | 780 | }, 1000); |
750 | wx.startRecord({ | 781 | wx.startRecord({ |
751 | - success: function (res) { | 782 | + success: function(res) { |
752 | // alert(JSON.stringify(res)) | 783 | // alert(JSON.stringify(res)) |
753 | consoel.log(res, 99977775655); | 784 | consoel.log(res, 99977775655); |
754 | // alert('成功调起录音') | 785 | // alert('成功调起录音') |
@@ -758,7 +789,7 @@ export default { | @@ -758,7 +789,7 @@ export default { | ||
758 | // }, 1000) | 789 | // }, 1000) |
759 | // that.vicoeEnd() | 790 | // that.vicoeEnd() |
760 | }, | 791 | }, |
761 | - cancel: function () { | 792 | + cancel: function() { |
762 | // alert("用户拒绝授权录音"); | 793 | // alert("用户拒绝授权录音"); |
763 | } | 794 | } |
764 | }); | 795 | }); |
@@ -773,7 +804,7 @@ export default { | @@ -773,7 +804,7 @@ export default { | ||
773 | clearInterval(timer); | 804 | clearInterval(timer); |
774 | 805 | ||
775 | wx.stopRecord({ | 806 | wx.stopRecord({ |
776 | - success: function (res) { | 807 | + success: function(res) { |
777 | var localId = res.localId; | 808 | var localId = res.localId; |
778 | that.localId = res.localId; | 809 | that.localId = res.localId; |
779 | that.upyuyin(); | 810 | that.upyuyin(); |
@@ -788,7 +819,7 @@ export default { | @@ -788,7 +819,7 @@ export default { | ||
788 | }, | 819 | }, |
789 | // 结束本次上传 | 820 | // 结束本次上传 |
790 | hideshangchuan() { | 821 | hideshangchuan() { |
791 | - this.shanghcuanshow = false | 822 | + this.shanghcuanshow = false; |
792 | }, | 823 | }, |
793 | // 发送语音 | 824 | // 发送语音 |
794 | sendyuyin() { | 825 | sendyuyin() { |
@@ -796,8 +827,7 @@ export default { | @@ -796,8 +827,7 @@ export default { | ||
796 | 827 | ||
797 | let that = this; | 828 | let that = this; |
798 | 829 | ||
799 | - | ||
800 | - this.shanghcuanshow = false | 830 | + this.shanghcuanshow = false; |
801 | that.luprocess = false; | 831 | that.luprocess = false; |
802 | // this.issuccess = true | 832 | // this.issuccess = true |
803 | let objdata = { | 833 | let objdata = { |
@@ -817,10 +847,9 @@ export default { | @@ -817,10 +847,9 @@ export default { | ||
817 | shangyuyin() { | 847 | shangyuyin() { |
818 | let that = this; | 848 | let that = this; |
819 | 849 | ||
820 | - | ||
821 | - this.shanghcuanshow = false | 850 | + this.shanghcuanshow = false; |
822 | that.luprocess = false; | 851 | that.luprocess = false; |
823 | - this.issuccess = true | 852 | + this.issuccess = true; |
824 | let objdata = { | 853 | let objdata = { |
825 | lesson_id: this.id, | 854 | lesson_id: this.id, |
826 | type: 3, | 855 | type: 3, |
@@ -838,7 +867,7 @@ export default { | @@ -838,7 +867,7 @@ export default { | ||
838 | wx.uploadVoice({ | 867 | wx.uploadVoice({ |
839 | localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得 | 868 | localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得 |
840 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 869 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
841 | - success: function (res) { | 870 | + success: function(res) { |
842 | var serverId = res.serverId; // 返回音频的服务器端ID | 871 | var serverId = res.serverId; // 返回音频的服务器端ID |
843 | that.serverId = res.serverId; | 872 | that.serverId = res.serverId; |
844 | // alert(that.serverId); | 873 | // alert(that.serverId); |
@@ -856,27 +885,25 @@ export default { | @@ -856,27 +885,25 @@ export default { | ||
856 | }, | 885 | }, |
857 | // 停止直播 | 886 | // 停止直播 |
858 | stopbtn() { | 887 | stopbtn() { |
859 | - this.overzhibo = true | ||
860 | - | 888 | + this.overzhibo = true; |
861 | }, | 889 | }, |
862 | canclesure() { | 890 | canclesure() { |
863 | - this.overzhibo = false | 891 | + this.overzhibo = false; |
864 | }, | 892 | }, |
865 | surezhibo() { | 893 | surezhibo() { |
866 | let that = this; | 894 | let that = this; |
867 | - that.overzhibo = false | 895 | + that.overzhibo = false; |
868 | let objdata = { | 896 | let objdata = { |
869 | lesson_id: this.id, | 897 | lesson_id: this.id, |
870 | type: 3, | 898 | type: 3, |
871 | user_id: this.user_id, | 899 | user_id: this.user_id, |
872 | times: that.time, | 900 | times: that.time, |
873 | - data: '', is_end: 1 | 901 | + data: "", |
902 | + is_end: 1 | ||
874 | }; | 903 | }; |
875 | objdata = JSON.stringify(objdata); | 904 | objdata = JSON.stringify(objdata); |
876 | // alert(objdata); | 905 | // alert(objdata); |
877 | this.websocketsend(objdata); | 906 | this.websocketsend(objdata); |
878 | - | ||
879 | - | ||
880 | }, | 907 | }, |
881 | 908 | ||
882 | // 获取录播详情 | 909 | // 获取录播详情 |
@@ -890,12 +917,11 @@ export default { | @@ -890,12 +917,11 @@ export default { | ||
890 | 917 | ||
891 | that.$axios | 918 | that.$axios |
892 | .post(url, param) | 919 | .post(url, param) |
893 | - .then(function (res) { | 920 | + .then(function(res) { |
894 | console.log(res); | 921 | console.log(res); |
895 | that.is_self = res.data.lesson.is_self; | 922 | that.is_self = res.data.lesson.is_self; |
896 | - | ||
897 | }) | 923 | }) |
898 | - .catch(function (err) { | 924 | + .catch(function(err) { |
899 | console.log(err); | 925 | console.log(err); |
900 | }); | 926 | }); |
901 | }, | 927 | }, |
@@ -919,12 +945,16 @@ export default { | @@ -919,12 +945,16 @@ export default { | ||
919 | this.initWebSocket(); | 945 | this.initWebSocket(); |
920 | }, | 946 | }, |
921 | websocketonmessage(e) { | 947 | websocketonmessage(e) { |
922 | - | ||
923 | //数据接收 | 948 | //数据接收 |
924 | let that = this; | 949 | let that = this; |
925 | 950 | ||
926 | if (this.number == 0) { | 951 | if (this.number == 0) { |
927 | - let obj = { lesson_id: this.id, user_id: this.user_id, is_group: 1, first: 1 }; | 952 | + let obj = { |
953 | + lesson_id: this.id, | ||
954 | + user_id: this.user_id, | ||
955 | + is_group: 1, | ||
956 | + first: 1 | ||
957 | + }; | ||
928 | obj = JSON.stringify(obj); | 958 | obj = JSON.stringify(obj); |
929 | console.log(obj); | 959 | console.log(obj); |
930 | this.websocketsend(obj); | 960 | this.websocketsend(obj); |
@@ -933,14 +963,14 @@ export default { | @@ -933,14 +963,14 @@ export default { | ||
933 | } | 963 | } |
934 | this.number = this.number + 1; | 964 | this.number = this.number + 1; |
935 | this.number = this.number; | 965 | this.number = this.number; |
936 | - let datak = e.data | 966 | + let datak = e.data; |
937 | console.log(e, 88890999); | 967 | console.log(e, 88890999); |
938 | - console.log(e.data) | 968 | + console.log(e.data); |
939 | // alert(e.data) | 969 | // alert(e.data) |
940 | // alert(e.data.first) | 970 | // alert(e.data.first) |
941 | let data = JSON.parse(e.data); | 971 | let data = JSON.parse(e.data); |
942 | // alert(data) | 972 | // alert(data) |
943 | - console.log(data) | 973 | + console.log(data); |
944 | that.group_count = data.group_count; | 974 | that.group_count = data.group_count; |
945 | // 接收数据重新渲染列表 | 975 | // 接收数据重新渲染列表 |
946 | if (data.lesson_id != undefined) { | 976 | if (data.lesson_id != undefined) { |
@@ -948,34 +978,29 @@ export default { | @@ -948,34 +978,29 @@ export default { | ||
948 | 978 | ||
949 | that.group_count = redata.group_count; | 979 | that.group_count = redata.group_count; |
950 | if (redata.code == 9) { | 980 | if (redata.code == 9) { |
951 | - that.recordlist.forEach(function (value, index, array) { | 981 | + that.recordlist.forEach(function(value, index, array) { |
952 | if (value.id == redata.id) { | 982 | if (value.id == redata.id) { |
953 | - that.recordlist.splice(index, 1) | 983 | + that.recordlist.splice(index, 1); |
954 | that.recordlist = that.recordlist; | 984 | that.recordlist = that.recordlist; |
955 | - that.$forceUpdate() | 985 | + that.$forceUpdate(); |
956 | } | 986 | } |
957 | - }) | 987 | + }); |
958 | } else if (redata.code == 0) { | 988 | } else if (redata.code == 0) { |
959 | - Toast(redata.msg) | 989 | + Toast(redata.msg); |
960 | } else if (redata.code == 1) { | 990 | } else if (redata.code == 1) { |
961 | that.recordlist.push(redata); | 991 | that.recordlist.push(redata); |
962 | that.recordlist = that.recordlist; | 992 | that.recordlist = that.recordlist; |
963 | that.$forceUpdate(); | 993 | that.$forceUpdate(); |
964 | that.$nextTick(() => { | 994 | that.$nextTick(() => { |
965 | - var div = document.getElementById('messagebox'); | 995 | + var div = document.getElementById("messagebox"); |
966 | var div = document.getElementsByClassName("messageitem"); | 996 | var div = document.getElementsByClassName("messageitem"); |
967 | let len = div.length; | 997 | let len = div.length; |
968 | len = len - 1; | 998 | len = len - 1; |
969 | - div[len].scrollIntoView() | ||
970 | - | ||
971 | - }) | ||
972 | - | 999 | + div[len].scrollIntoView(); |
1000 | + }); | ||
973 | } else if (redata.code == 2) { | 1001 | } else if (redata.code == 2) { |
974 | - that.$router.go(-1) | 1002 | + that.$router.go(-1); |
975 | } | 1003 | } |
976 | - | ||
977 | - | ||
978 | - | ||
979 | } | 1004 | } |
980 | }, | 1005 | }, |
981 | websocketsend(Data) { | 1006 | websocketsend(Data) { |
@@ -990,7 +1015,7 @@ export default { | @@ -990,7 +1015,7 @@ export default { | ||
990 | // 获取直播列表 | 1015 | // 获取直播列表 |
991 | getzhibolist() { | 1016 | getzhibolist() { |
992 | let that = this; | 1017 | let that = this; |
993 | - console.log(34734894890) | 1018 | + console.log(34734894890); |
994 | var url = "/api/user/lesson_chat_record"; | 1019 | var url = "/api/user/lesson_chat_record"; |
995 | let param = { | 1020 | let param = { |
996 | lesson_id: that.id, | 1021 | lesson_id: that.id, |
@@ -999,86 +1024,79 @@ export default { | @@ -999,86 +1024,79 @@ export default { | ||
999 | 1024 | ||
1000 | that.$axios | 1025 | that.$axios |
1001 | .post(url, param) | 1026 | .post(url, param) |
1002 | - .then(function (res) { | ||
1003 | - console.log(res, '直播列表'); | 1027 | + .then(function(res) { |
1028 | + console.log(res, "直播列表"); | ||
1004 | if (that.page == 1) { | 1029 | if (that.page == 1) { |
1005 | // 页面滚动到某一个位置 | 1030 | // 页面滚动到某一个位置 |
1006 | let len = res.data.record.length; | 1031 | let len = res.data.record.length; |
1007 | - len = len - 1 | ||
1008 | - res.data.record.forEach(function (value, index, array) { | 1032 | + len = len - 1; |
1033 | + res.data.record.forEach(function(value, index, array) { | ||
1009 | if (index == len) { | 1034 | if (index == len) { |
1010 | - value.idkk = 'targetboxk' | 1035 | + value.idkk = "targetboxk"; |
1011 | that.$nextTick(() => { | 1036 | that.$nextTick(() => { |
1012 | setTimeout(() => { | 1037 | setTimeout(() => { |
1013 | - let targetbox = document.getElementById('targetboxk'); | 1038 | + let targetbox = document.getElementById("targetboxk"); |
1014 | that.target = targetbox.offsetTop; | 1039 | that.target = targetbox.offsetTop; |
1015 | document.body.scrollTop = that.target; | 1040 | document.body.scrollTop = that.target; |
1016 | // document.getElementById('targetbox').scrollTop = that.target | 1041 | // document.getElementById('targetbox').scrollTop = that.target |
1017 | document.getElementById("targetboxk").scrollIntoView(); | 1042 | document.getElementById("targetboxk").scrollIntoView(); |
1018 | - | ||
1019 | - }) | ||
1020 | - }) | 1043 | + }); |
1044 | + }); | ||
1021 | } | 1045 | } |
1022 | - | ||
1023 | - }) | 1046 | + }); |
1024 | } | 1047 | } |
1025 | 1048 | ||
1026 | // 拼接数组倒叙 | 1049 | // 拼接数组倒叙 |
1027 | var arr = [...res.data.record, ...that.recordlist]; | 1050 | var arr = [...res.data.record, ...that.recordlist]; |
1028 | - that.recordlist = arr | ||
1029 | - that.recordlist.forEach(function (value, index, array) { | ||
1030 | - value.sel = false | ||
1031 | - }) | ||
1032 | - that.recordlist = that.recordlist | ||
1033 | - that.this_page = res.data.this_page | 1051 | + that.recordlist = arr; |
1052 | + that.recordlist.forEach(function(value, index, array) { | ||
1053 | + value.sel = false; | ||
1054 | + }); | ||
1055 | + that.recordlist = that.recordlist; | ||
1056 | + that.this_page = res.data.this_page; | ||
1034 | that.total_page = res.data.total_page; | 1057 | that.total_page = res.data.total_page; |
1035 | - | ||
1036 | }) | 1058 | }) |
1037 | - .catch(function (err) { | 1059 | + .catch(function(err) { |
1038 | console.log(err); | 1060 | console.log(err); |
1039 | }); | 1061 | }); |
1040 | - | ||
1041 | }, | 1062 | }, |
1042 | audioplay(item, index) { | 1063 | audioplay(item, index) { |
1043 | let that = this; | 1064 | let that = this; |
1044 | - console.log(item) | 1065 | + console.log(item); |
1045 | // 播放某一个语音 | 1066 | // 播放某一个语音 |
1046 | 1067 | ||
1047 | // that.recordlist[index].sel = !that.recordlist[index].sel; | 1068 | // that.recordlist[index].sel = !that.recordlist[index].sel; |
1048 | 1069 | ||
1049 | - that.recordlist.forEach(function (value, indexk, array) { | 1070 | + that.recordlist.forEach(function(value, indexk, array) { |
1050 | if (index == indexk) { | 1071 | if (index == indexk) { |
1051 | - | ||
1052 | that.recordlist[indexk].sel = !that.recordlist[indexk].sel; | 1072 | that.recordlist[indexk].sel = !that.recordlist[indexk].sel; |
1053 | } else { | 1073 | } else { |
1054 | - that.recordlist[indexk].sel = false | 1074 | + that.recordlist[indexk].sel = false; |
1055 | } | 1075 | } |
1056 | - }) | 1076 | + }); |
1057 | 1077 | ||
1058 | that.recordlist = that.recordlist; | 1078 | that.recordlist = that.recordlist; |
1059 | 1079 | ||
1060 | that.$forceUpdate(); | 1080 | that.$forceUpdate(); |
1061 | - console.log(that.recordlist) | 1081 | + console.log(that.recordlist); |
1062 | 1082 | ||
1063 | if (this.recordlist[index].sel == true) { | 1083 | if (this.recordlist[index].sel == true) { |
1064 | // 开始播放 | 1084 | // 开始播放 |
1065 | - let localId = '' | 1085 | + let localId = ""; |
1066 | wx.downloadVoice({ | 1086 | wx.downloadVoice({ |
1067 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | 1087 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 |
1068 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 1088 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
1069 | - success: function (res) { | ||
1070 | - | 1089 | + success: function(res) { |
1071 | localId = res.localId; // 返回音频的本地ID | 1090 | localId = res.localId; // 返回音频的本地ID |
1072 | that.playlocalid = localId; | 1091 | that.playlocalid = localId; |
1073 | that.recordlist[index].localId = localId; | 1092 | that.recordlist[index].localId = localId; |
1074 | that.recordlist = that.recordlist; | 1093 | that.recordlist = that.recordlist; |
1075 | - that.$forceUpdate() | 1094 | + that.$forceUpdate(); |
1076 | 1095 | ||
1077 | wx.playVoice({ | 1096 | wx.playVoice({ |
1078 | localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得 | 1097 | localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得 |
1079 | - }) | 1098 | + }); |
1080 | } | 1099 | } |
1081 | - | ||
1082 | }); | 1100 | }); |
1083 | 1101 | ||
1084 | // if (this.recordlist[index].data != that.stopurl) { | 1102 | // if (this.recordlist[index].data != that.stopurl) { |
@@ -1087,20 +1105,15 @@ export default { | @@ -1087,20 +1105,15 @@ export default { | ||
1087 | // isShowProgressTips: 1, // 默认为1,显示进度提示 | 1105 | // isShowProgressTips: 1, // 默认为1,显示进度提示 |
1088 | // success: function (res) { | 1106 | // success: function (res) { |
1089 | 1107 | ||
1090 | - | ||
1091 | // wx.stopVoice({ | 1108 | // wx.stopVoice({ |
1092 | // localId: res.localId // 需要停止的音频的本地ID,由stopRecord接口获得 | 1109 | // localId: res.localId // 需要停止的音频的本地ID,由stopRecord接口获得 |
1093 | // }); | 1110 | // }); |
1094 | 1111 | ||
1095 | - | ||
1096 | - | ||
1097 | - | ||
1098 | // } | 1112 | // } |
1099 | 1113 | ||
1100 | // }); | 1114 | // }); |
1101 | 1115 | ||
1102 | // } | 1116 | // } |
1103 | - | ||
1104 | } else if (this.recordlist[index].sel == false) { | 1117 | } else if (this.recordlist[index].sel == false) { |
1105 | // 停止播放 | 1118 | // 停止播放 |
1106 | wx.stopVoice({ | 1119 | wx.stopVoice({ |
@@ -1109,16 +1122,15 @@ export default { | @@ -1109,16 +1122,15 @@ export default { | ||
1109 | } | 1122 | } |
1110 | // 监听播放停止播放下一个 | 1123 | // 监听播放停止播放下一个 |
1111 | wx.onVoicePlayEnd({ | 1124 | wx.onVoicePlayEnd({ |
1112 | - success: function (res) { | 1125 | + success: function(res) { |
1113 | var localId = res.localId; // 返回音频的本地ID | 1126 | var localId = res.localId; // 返回音频的本地ID |
1114 | 1127 | ||
1115 | - that.recordlist.forEach(function (value, index, array) { | 1128 | + that.recordlist.forEach(function(value, index, array) { |
1116 | if (localId == value.localId) { | 1129 | if (localId == value.localId) { |
1117 | - value.sel = false | 1130 | + value.sel = false; |
1118 | } | 1131 | } |
1119 | - | ||
1120 | - }) | ||
1121 | - that.recordlist = that.recordlist | 1132 | + }); |
1133 | + that.recordlist = that.recordlist; | ||
1122 | 1134 | ||
1123 | that.$forceUpdate(); | 1135 | that.$forceUpdate(); |
1124 | 1136 | ||
@@ -1126,31 +1138,27 @@ export default { | @@ -1126,31 +1138,27 @@ export default { | ||
1126 | 1138 | ||
1127 | if (that.recordlist[index].data != undefined) { | 1139 | if (that.recordlist[index].data != undefined) { |
1128 | if (that.recordlist[index].type == 3) { | 1140 | if (that.recordlist[index].type == 3) { |
1129 | - that.recordlist[index].sel = true | 1141 | + that.recordlist[index].sel = true; |
1130 | wx.downloadVoice({ | 1142 | wx.downloadVoice({ |
1131 | serverId: that.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | 1143 | serverId: that.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 |
1132 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 1144 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
1133 | - success: function (res) { | 1145 | + success: function(res) { |
1134 | let localId = res.localId; // 返回音频的本地ID | 1146 | let localId = res.localId; // 返回音频的本地ID |
1135 | that.recordlist[index].localId = localId; | 1147 | that.recordlist[index].localId = localId; |
1136 | that.recordlist[index].sel = true; | 1148 | that.recordlist[index].sel = true; |
1137 | that.recordlist = that.recordlist; | 1149 | that.recordlist = that.recordlist; |
1138 | - that.$forceUpdate() | 1150 | + that.$forceUpdate(); |
1139 | wx.playVoice({ | 1151 | wx.playVoice({ |
1140 | localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | 1152 | localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得 |
1141 | }); | 1153 | }); |
1142 | - | ||
1143 | - | ||
1144 | } | 1154 | } |
1145 | }); | 1155 | }); |
1146 | } | 1156 | } |
1147 | } | 1157 | } |
1148 | that.recordlist = that.recordlist; | 1158 | that.recordlist = that.recordlist; |
1149 | - that.$forceUpdate() | ||
1150 | - | 1159 | + that.$forceUpdate(); |
1151 | } | 1160 | } |
1152 | }); | 1161 | }); |
1153 | - | ||
1154 | }, | 1162 | }, |
1155 | // 发送文字 | 1163 | // 发送文字 |
1156 | send() { | 1164 | send() { |
@@ -1162,24 +1170,23 @@ export default { | @@ -1162,24 +1170,23 @@ export default { | ||
1162 | times: 0, | 1170 | times: 0, |
1163 | data: this.text | 1171 | data: this.text |
1164 | }; | 1172 | }; |
1165 | - console.log(objdata) | 1173 | + console.log(objdata); |
1166 | objdata = JSON.stringify(objdata); | 1174 | objdata = JSON.stringify(objdata); |
1167 | // alert(objdata) | 1175 | // alert(objdata) |
1168 | this.websocketsend(objdata); | 1176 | this.websocketsend(objdata); |
1169 | - this.text = '' | 1177 | + this.text = ""; |
1170 | // ws.send(objdata); | 1178 | // ws.send(objdata); |
1171 | }, | 1179 | }, |
1172 | gotouchstart(item) { | 1180 | gotouchstart(item) { |
1173 | let that = this; | 1181 | let that = this; |
1174 | - clearTimeout(timeOutEvent);//清除定时器 | 1182 | + clearTimeout(timeOutEvent); //清除定时器 |
1175 | timeOutEvent = 0; | 1183 | timeOutEvent = 0; |
1176 | - timeOutEvent = setTimeout(function () { | 1184 | + timeOutEvent = setTimeout(function() { |
1177 | Dialog.confirm({ | 1185 | Dialog.confirm({ |
1178 | - title: '是否删除帖子', | ||
1179 | - | 1186 | + title: "是否删除帖子" |
1180 | }) | 1187 | }) |
1181 | - .then((res) => { | ||
1182 | - console.log(item.id) | 1188 | + .then(res => { |
1189 | + console.log(item.id); | ||
1183 | let objdata = { | 1190 | let objdata = { |
1184 | id: item.id, | 1191 | id: item.id, |
1185 | lesson_id: item.lesson_id, | 1192 | lesson_id: item.lesson_id, |
@@ -1189,40 +1196,36 @@ export default { | @@ -1189,40 +1196,36 @@ export default { | ||
1189 | data: item.data, | 1196 | data: item.data, |
1190 | is_del: 1 | 1197 | is_del: 1 |
1191 | }; | 1198 | }; |
1192 | - console.log(objdata) | 1199 | + console.log(objdata); |
1193 | objdata = JSON.stringify(objdata); | 1200 | objdata = JSON.stringify(objdata); |
1194 | // alert(objdata) | 1201 | // alert(objdata) |
1195 | that.websocketsend(objdata); | 1202 | that.websocketsend(objdata); |
1196 | - that.recordlist.forEach(function (value, index, array) { | 1203 | + that.recordlist.forEach(function(value, index, array) { |
1197 | if (value.id == item.id) { | 1204 | if (value.id == item.id) { |
1198 | - that.recordlist.splice(index, 1) | 1205 | + that.recordlist.splice(index, 1); |
1199 | that.recordlist = that.recordlist; | 1206 | that.recordlist = that.recordlist; |
1200 | - that.$forceUpdate() | 1207 | + that.$forceUpdate(); |
1201 | } | 1208 | } |
1202 | - }) | 1209 | + }); |
1203 | }) | 1210 | }) |
1204 | - .catch((res) => { | ||
1205 | - | 1211 | + .catch(res => { |
1206 | // on cancel | 1212 | // on cancel |
1207 | }); | 1213 | }); |
1208 | //执行长按要执行的内容, | 1214 | //执行长按要执行的内容, |
1209 | - | ||
1210 | - | ||
1211 | - }, 600);//这里设置定时 | 1215 | + }, 600); //这里设置定时 |
1212 | }, | 1216 | }, |
1213 | //手释放,如果在500毫秒内就释放,则取消长按事件,此时可以执行onclick应该执行的事件 | 1217 | //手释放,如果在500毫秒内就释放,则取消长按事件,此时可以执行onclick应该执行的事件 |
1214 | gotouchend() { | 1218 | gotouchend() { |
1215 | clearTimeout(timeOutEvent); | 1219 | clearTimeout(timeOutEvent); |
1216 | if (timeOutEvent != 0) { | 1220 | if (timeOutEvent != 0) { |
1217 | //这里写要执行的内容(尤如onclick事件) | 1221 | //这里写要执行的内容(尤如onclick事件) |
1218 | - | ||
1219 | } | 1222 | } |
1220 | }, | 1223 | }, |
1221 | - //如果手指有移动,则取消所有事件,此时说明用户只是要移动而不是长按 | 1224 | + //如果手指有移动,则取消所有事件,此时说明用户只是要移动而不是长按 |
1222 | gotouchmove() { | 1225 | gotouchmove() { |
1223 | - clearTimeout(timeOutEvent);//清除定时器 | 1226 | + clearTimeout(timeOutEvent); //清除定时器 |
1224 | timeOutEvent = 0; | 1227 | timeOutEvent = 0; |
1225 | - }, | 1228 | + } |
1226 | } | 1229 | } |
1227 | }; | 1230 | }; |
1228 | </script> | 1231 | </script> |
@@ -52,7 +52,10 @@ | @@ -52,7 +52,10 @@ | ||
52 | @click="audioplay(item, index)" | 52 | @click="audioplay(item, index)" |
53 | > | 53 | > |
54 | <div class="voice"> | 54 | <div class="voice"> |
55 | - <div class="bg" :class="item.sel == true ? 'voicePlay' : ''"></div> | 55 | + <div |
56 | + class="bg" | ||
57 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
58 | + ></div> | ||
56 | <div class="miaoshuk">{{ item.times }}'</div> | 59 | <div class="miaoshuk">{{ item.times }}'</div> |
57 | </div> | 60 | </div> |
58 | </div> | 61 | </div> |
@@ -63,7 +66,10 @@ | @@ -63,7 +66,10 @@ | ||
63 | @click="audioplay(item, index)" | 66 | @click="audioplay(item, index)" |
64 | > | 67 | > |
65 | <div class="voice"> | 68 | <div class="voice"> |
66 | - <div class="bg" :class="item.sel == true ? 'voicePlay' : ''"></div> | 69 | + <div |
70 | + class="bg" | ||
71 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
72 | + ></div> | ||
67 | <div class="miaoshuk">{{ item.times }}'</div> | 73 | <div class="miaoshuk">{{ item.times }}'</div> |
68 | </div> | 74 | </div> |
69 | </div> | 75 | </div> |
@@ -74,7 +80,10 @@ | @@ -74,7 +80,10 @@ | ||
74 | @click="audioplay(item, index)" | 80 | @click="audioplay(item, index)" |
75 | > | 81 | > |
76 | <div class="voice"> | 82 | <div class="voice"> |
77 | - <div class="bg" :class="item.sel == true ? 'voicePlay' : ''"></div> | 83 | + <div |
84 | + class="bg" | ||
85 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
86 | + ></div> | ||
78 | <div class="miaoshuk">{{ item.times }}'</div> | 87 | <div class="miaoshuk">{{ item.times }}'</div> |
79 | </div> | 88 | </div> |
80 | </div> | 89 | </div> |
@@ -93,7 +102,11 @@ | @@ -93,7 +102,11 @@ | ||
93 | <div class="messagecontentk">{{ item.data }}</div> | 102 | <div class="messagecontentk">{{ item.data }}</div> |
94 | </div> | 103 | </div> |
95 | 104 | ||
96 | - <div class="messageitemrightk" v-if="item.type == 2" @click="previewimg(item.data)"> | 105 | + <div |
106 | + class="messageitemrightk" | ||
107 | + v-if="item.type == 2" | ||
108 | + @click="previewimg(item.data)" | ||
109 | + > | ||
97 | <div class="messagecontentk"> | 110 | <div class="messagecontentk"> |
98 | <div class="contentimg"> | 111 | <div class="contentimg"> |
99 | <img :src="item.data" alt /> | 112 | <img :src="item.data" alt /> |
@@ -110,7 +123,10 @@ | @@ -110,7 +123,10 @@ | ||
110 | @click="audioplay(item, index)" | 123 | @click="audioplay(item, index)" |
111 | > | 124 | > |
112 | <div class="voice voiceright"> | 125 | <div class="voice voiceright"> |
113 | - <div class="bg" :class="item.sel == true ? 'voicePlay' : ''"></div> | 126 | + <div |
127 | + class="bg" | ||
128 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
129 | + ></div> | ||
114 | <div class="miaoshu">{{ item.times }}'</div> | 130 | <div class="miaoshu">{{ item.times }}'</div> |
115 | </div> | 131 | </div> |
116 | </div> | 132 | </div> |
@@ -121,7 +137,10 @@ | @@ -121,7 +137,10 @@ | ||
121 | @click="audioplay(item, index)" | 137 | @click="audioplay(item, index)" |
122 | > | 138 | > |
123 | <div class="voice voiceright"> | 139 | <div class="voice voiceright"> |
124 | - <div class="bg" :class="item.sel == true ? 'voicePlay' : ''"></div> | 140 | + <div |
141 | + class="bg" | ||
142 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
143 | + ></div> | ||
125 | <div class="miaoshu">{{ item.times }}'</div> | 144 | <div class="miaoshu">{{ item.times }}'</div> |
126 | </div> | 145 | </div> |
127 | </div> | 146 | </div> |
@@ -132,7 +151,10 @@ | @@ -132,7 +151,10 @@ | ||
132 | @click="audioplay(item, index)" | 151 | @click="audioplay(item, index)" |
133 | > | 152 | > |
134 | <div class="voice voiceright"> | 153 | <div class="voice voiceright"> |
135 | - <div class="bg" :class="item.sel == true ? 'voicePlay' : ''"></div> | 154 | + <div |
155 | + class="bg" | ||
156 | + :class="item.sel == true ? 'voicePlay' : ''" | ||
157 | + ></div> | ||
136 | <div class="miaoshu">{{ item.times }}'</div> | 158 | <div class="miaoshu">{{ item.times }}'</div> |
137 | </div> | 159 | </div> |
138 | </div> | 160 | </div> |
@@ -148,12 +170,20 @@ | @@ -148,12 +170,20 @@ | ||
148 | 170 | ||
149 | <!-- 底部导航 --> | 171 | <!-- 底部导航 --> |
150 | 172 | ||
151 | - <div class="messagebot messagebotkk flexone" v-if="is_self == 0 && isbot == true"> | 173 | + <div |
174 | + class="messagebot messagebotkk flexone" | ||
175 | + v-if="is_self == 0 && isbot == true" | ||
176 | + > | ||
152 | <div class="messagebotleft"> | 177 | <div class="messagebotleft"> |
153 | <img src="../../../assets/yuyin.png" alt /> | 178 | <img src="../../../assets/yuyin.png" alt /> |
154 | </div> | 179 | </div> |
155 | <div class="writermessage"> | 180 | <div class="writermessage"> |
156 | - <input type="text" placeholder="写留言" @input="entertext" :value="text" /> | 181 | + <input |
182 | + type="text" | ||
183 | + placeholder="写留言" | ||
184 | + @input="entertext" | ||
185 | + :value="text" | ||
186 | + /> | ||
157 | </div> | 187 | </div> |
158 | <div class="sendk" @click="send">发送</div> | 188 | <div class="sendk" @click="send">发送</div> |
159 | </div> | 189 | </div> |
@@ -163,20 +193,50 @@ | @@ -163,20 +193,50 @@ | ||
163 | <img src="../../../assets/yuyin.png" alt /> | 193 | <img src="../../../assets/yuyin.png" alt /> |
164 | </div> | 194 | </div> |
165 | <div class="writermessage"> | 195 | <div class="writermessage"> |
166 | - <input type="text" placeholder="写留言" @input="entertext" :value="text" /> | 196 | + <input |
197 | + type="text" | ||
198 | + placeholder="写留言" | ||
199 | + @input="entertext" | ||
200 | + :value="text" | ||
201 | + /> | ||
167 | </div> | 202 | </div> |
168 | <div class="sendk" @click="send">发送</div> | 203 | <div class="sendk" @click="send">发送</div> |
169 | </div> | 204 | </div> |
170 | <div class="messagebot messagebotk flextwo" v-else> | 205 | <div class="messagebot messagebotk flextwo" v-else> |
171 | - <img src="../../../assets/yuyin.png" alt class="zhibobtn" @click="changeword" /> | ||
172 | - <img src="../../../assets/pic.png" alt class="zhibobtn" @click="choseimg" /> | ||
173 | - <img src="../../../assets/luyin.png" alt class="yuyinbtn" @click="yuyin" /> | 206 | + <img |
207 | + src="../../../assets/yuyin.png" | ||
208 | + alt | ||
209 | + class="zhibobtn" | ||
210 | + @click="changeword" | ||
211 | + /> | ||
212 | + <img | ||
213 | + src="../../../assets/pic.png" | ||
214 | + alt | ||
215 | + class="zhibobtn" | ||
216 | + @click="choseimg" | ||
217 | + /> | ||
218 | + <img | ||
219 | + src="../../../assets/luyin.png" | ||
220 | + alt | ||
221 | + class="yuyinbtn" | ||
222 | + @click="yuyin" | ||
223 | + /> | ||
174 | <div class style="position:relative"> | 224 | <div class style="position:relative"> |
175 | - <input type="file" accept="audio/*" @change="afterRead" class="upuinpin" /> | 225 | + <input |
226 | + type="file" | ||
227 | + accept="audio/*" | ||
228 | + @change="afterRead" | ||
229 | + class="upuinpin" | ||
230 | + /> | ||
176 | <img src="../../../assets/shangchuan.png" alt class="zhibobtn" /> | 231 | <img src="../../../assets/shangchuan.png" alt class="zhibobtn" /> |
177 | </div> | 232 | </div> |
178 | 233 | ||
179 | - <img src="../../../assets/kaiguan.png" alt class="zhibobtn" @click="stopbtn" /> | 234 | + <img |
235 | + src="../../../assets/kaiguan.png" | ||
236 | + alt | ||
237 | + class="zhibobtn" | ||
238 | + @click="stopbtn" | ||
239 | + /> | ||
180 | </div> | 240 | </div> |
181 | </div> | 241 | </div> |
182 | <div class="manypeople"> | 242 | <div class="manypeople"> |
@@ -331,7 +391,7 @@ export default { | @@ -331,7 +391,7 @@ export default { | ||
331 | this.getuserinfo(); | 391 | this.getuserinfo(); |
332 | this.baseurl = "http://" + location.host; | 392 | this.baseurl = "http://" + location.host; |
333 | let div = this.$refs["message-list"]; | 393 | let div = this.$refs["message-list"]; |
334 | - document.title = this.$route.query.name; | 394 | + document.title = localStorage.getItem("coursename"); |
335 | this.id = this.$route.query.id; | 395 | this.id = this.$route.query.id; |
336 | // 获取appid | 396 | // 获取appid |
337 | this.getappid(); | 397 | this.getappid(); |
@@ -372,7 +432,7 @@ export default { | @@ -372,7 +432,7 @@ export default { | ||
372 | 432 | ||
373 | that.$uploadFile | 433 | that.$uploadFile |
374 | .post(url, formdata) | 434 | .post(url, formdata) |
375 | - .then(function (res) { | 435 | + .then(function(res) { |
376 | that.cardzheng = false; | 436 | that.cardzheng = false; |
377 | console.log(res); | 437 | console.log(res); |
378 | let objdata = { | 438 | let objdata = { |
@@ -400,11 +460,11 @@ export default { | @@ -400,11 +460,11 @@ export default { | ||
400 | 460 | ||
401 | that.$axios | 461 | that.$axios |
402 | .post(url, param) | 462 | .post(url, param) |
403 | - .then(function (res) { | 463 | + .then(function(res) { |
404 | console.log(res); | 464 | console.log(res); |
405 | that.user_id = res.data.id; | 465 | that.user_id = res.data.id; |
406 | }) | 466 | }) |
407 | - .catch(function (err) { }); | 467 | + .catch(function(err) {}); |
408 | }, | 468 | }, |
409 | 469 | ||
410 | // 视频上拉加载 | 470 | // 视频上拉加载 |
@@ -456,7 +516,7 @@ export default { | @@ -456,7 +516,7 @@ export default { | ||
456 | 516 | ||
457 | that.$axios | 517 | that.$axios |
458 | .post(url, param) | 518 | .post(url, param) |
459 | - .then(function (res) { | 519 | + .then(function(res) { |
460 | console.log(res, "jssdkjsskd"); | 520 | console.log(res, "jssdkjsskd"); |
461 | wx.config({ | 521 | wx.config({ |
462 | debug: false, | 522 | debug: false, |
@@ -483,22 +543,20 @@ export default { | @@ -483,22 +543,20 @@ export default { | ||
483 | 543 | ||
484 | that.sharetofriend(); | 544 | that.sharetofriend(); |
485 | }) | 545 | }) |
486 | - .catch(function (err) { | 546 | + .catch(function(err) { |
487 | console.log(err); | 547 | console.log(err); |
488 | }); | 548 | }); |
489 | }, | 549 | }, |
490 | 550 | ||
491 | - | ||
492 | - | ||
493 | // 分享给朋友 | 551 | // 分享给朋友 |
494 | sharetofriend() { | 552 | sharetofriend() { |
495 | var that = this; | 553 | var that = this; |
496 | // 处理验证失败的信息 | 554 | // 处理验证失败的信息 |
497 | - wx.error(function (res) { | 555 | + wx.error(function(res) { |
498 | logUtil.printLog("验证失败返回的信息:", res); | 556 | logUtil.printLog("验证失败返回的信息:", res); |
499 | }); | 557 | }); |
500 | // 处理验证成功的信息 | 558 | // 处理验证成功的信息 |
501 | - wx.ready(function () { | 559 | + wx.ready(function() { |
502 | // alert(window.location.href.split('#')[0]); | 560 | // alert(window.location.href.split('#')[0]); |
503 | // var share_title = that.sharemsg.title; | 561 | // var share_title = that.sharemsg.title; |
504 | // if (share_title.indexOf("${title}") >= 0) { | 562 | // if (share_title.indexOf("${title}") >= 0) { |
@@ -533,13 +591,13 @@ export default { | @@ -533,13 +591,13 @@ export default { | ||
533 | 591 | ||
534 | // 分享图标 | 592 | // 分享图标 |
535 | // desc: that.sharemsg.content, | 593 | // desc: that.sharemsg.content, |
536 | - success: function (res) { | 594 | + success: function(res) { |
537 | // 用户确认分享后执行的回调函数 | 595 | // 用户确认分享后执行的回调函数 |
538 | console.log("suss"); | 596 | console.log("suss"); |
539 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); | 597 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); |
540 | that.showMsg("分享成功!"); | 598 | that.showMsg("分享成功!"); |
541 | }, | 599 | }, |
542 | - cancel: function (res) { | 600 | + cancel: function(res) { |
543 | // 用户取消分享后执行的回调函数 | 601 | // 用户取消分享后执行的回调函数 |
544 | console.log("err"); | 602 | console.log("err"); |
545 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); | 603 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); |
@@ -562,11 +620,11 @@ export default { | @@ -562,11 +620,11 @@ export default { | ||
562 | // 分享图标 | 620 | // 分享图标 |
563 | type: "", // 分享类型,music、video或link,不填默认为link | 621 | type: "", // 分享类型,music、video或link,不填默认为link |
564 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 | 622 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 |
565 | - success: function (res) { | 623 | + success: function(res) { |
566 | // 用户确认分享后执行的回调函数 | 624 | // 用户确认分享后执行的回调函数 |
567 | logUtil.printLog("分享给朋友成功返回的信息为:", res); | 625 | logUtil.printLog("分享给朋友成功返回的信息为:", res); |
568 | }, | 626 | }, |
569 | - cancel: function (res) { | 627 | + cancel: function(res) { |
570 | // 用户取消分享后执行的回调函数 | 628 | // 用户取消分享后执行的回调函数 |
571 | logUtil.printLog("取消分享给朋友返回的信息为:", res); | 629 | logUtil.printLog("取消分享给朋友返回的信息为:", res); |
572 | } | 630 | } |
@@ -581,13 +639,13 @@ export default { | @@ -581,13 +639,13 @@ export default { | ||
581 | count: 1, // 默认9 | 639 | count: 1, // 默认9 |
582 | sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有 | 640 | sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有 |
583 | sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 | 641 | sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 |
584 | - success: function (res) { | 642 | + success: function(res) { |
585 | var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 | 643 | var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 |
586 | 644 | ||
587 | wx.uploadImage({ | 645 | wx.uploadImage({ |
588 | localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得 | 646 | localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得 |
589 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 647 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
590 | - success: function (res) { | 648 | + success: function(res) { |
591 | var serverId = res.serverId; // 返回图片的服务器端ID | 649 | var serverId = res.serverId; // 返回图片的服务器端ID |
592 | that.serverId = res.serverId; | 650 | that.serverId = res.serverId; |
593 | that.upload(); | 651 | that.upload(); |
@@ -609,7 +667,7 @@ export default { | @@ -609,7 +667,7 @@ export default { | ||
609 | 667 | ||
610 | that.$axios | 668 | that.$axios |
611 | .post(url, param) | 669 | .post(url, param) |
612 | - .then(function (res) { | 670 | + .then(function(res) { |
613 | console.log(res); | 671 | console.log(res); |
614 | that.videourl = res.data.media; | 672 | that.videourl = res.data.media; |
615 | let objdata = { | 673 | let objdata = { |
@@ -624,7 +682,7 @@ export default { | @@ -624,7 +682,7 @@ export default { | ||
624 | that.websocketsend(objdata); | 682 | that.websocketsend(objdata); |
625 | // alert(that.videourl) | 683 | // alert(that.videourl) |
626 | }) | 684 | }) |
627 | - .catch(function (err) { | 685 | + .catch(function(err) { |
628 | console.log(err); | 686 | console.log(err); |
629 | }); | 687 | }); |
630 | }, | 688 | }, |
@@ -692,7 +750,7 @@ export default { | @@ -692,7 +750,7 @@ export default { | ||
692 | console.log(that.time); | 750 | console.log(that.time); |
693 | }, 1000); | 751 | }, 1000); |
694 | wx.startRecord({ | 752 | wx.startRecord({ |
695 | - success: function (res) { | 753 | + success: function(res) { |
696 | // alert(JSON.stringify(res)) | 754 | // alert(JSON.stringify(res)) |
697 | consoel.log(res, 99977775655); | 755 | consoel.log(res, 99977775655); |
698 | // alert('成功调起录音') | 756 | // alert('成功调起录音') |
@@ -702,7 +760,7 @@ export default { | @@ -702,7 +760,7 @@ export default { | ||
702 | // }, 1000) | 760 | // }, 1000) |
703 | // that.vicoeEnd() | 761 | // that.vicoeEnd() |
704 | }, | 762 | }, |
705 | - cancel: function () { | 763 | + cancel: function() { |
706 | // alert("用户拒绝授权录音"); | 764 | // alert("用户拒绝授权录音"); |
707 | } | 765 | } |
708 | }); | 766 | }); |
@@ -717,7 +775,7 @@ export default { | @@ -717,7 +775,7 @@ export default { | ||
717 | clearInterval(timer); | 775 | clearInterval(timer); |
718 | 776 | ||
719 | wx.stopRecord({ | 777 | wx.stopRecord({ |
720 | - success: function (res) { | 778 | + success: function(res) { |
721 | var localId = res.localId; | 779 | var localId = res.localId; |
722 | that.localId = res.localId; | 780 | that.localId = res.localId; |
723 | that.upyuyin(); | 781 | that.upyuyin(); |
@@ -776,7 +834,7 @@ export default { | @@ -776,7 +834,7 @@ export default { | ||
776 | wx.uploadVoice({ | 834 | wx.uploadVoice({ |
777 | localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得 | 835 | localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得 |
778 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 836 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
779 | - success: function (res) { | 837 | + success: function(res) { |
780 | var serverId = res.serverId; // 返回音频的服务器端ID | 838 | var serverId = res.serverId; // 返回音频的服务器端ID |
781 | that.serverId = res.serverId; | 839 | that.serverId = res.serverId; |
782 | // alert(that.serverId); | 840 | // alert(that.serverId); |
@@ -826,7 +884,7 @@ export default { | @@ -826,7 +884,7 @@ export default { | ||
826 | 884 | ||
827 | that.$axios | 885 | that.$axios |
828 | .post(url, param) | 886 | .post(url, param) |
829 | - .then(function (res) { | 887 | + .then(function(res) { |
830 | console.log(res); | 888 | console.log(res); |
831 | that.is_self = res.data.lesson.is_self; | 889 | that.is_self = res.data.lesson.is_self; |
832 | // that.user_id = res.data.lesson.user_id; | 890 | // that.user_id = res.data.lesson.user_id; |
@@ -848,7 +906,7 @@ export default { | @@ -848,7 +906,7 @@ export default { | ||
848 | } | 906 | } |
849 | }, 1000); | 907 | }, 1000); |
850 | }) | 908 | }) |
851 | - .catch(function (err) { | 909 | + .catch(function(err) { |
852 | console.log(err); | 910 | console.log(err); |
853 | }); | 911 | }); |
854 | }, | 912 | }, |
@@ -909,7 +967,7 @@ export default { | @@ -909,7 +967,7 @@ export default { | ||
909 | 967 | ||
910 | that.group_count = redata.group_count; | 968 | that.group_count = redata.group_count; |
911 | if (redata.code == 9) { | 969 | if (redata.code == 9) { |
912 | - that.recordlist.forEach(function (value, index, array) { | 970 | + that.recordlist.forEach(function(value, index, array) { |
913 | if (value.id == redata.id) { | 971 | if (value.id == redata.id) { |
914 | that.recordlist.splice(index, 1); | 972 | that.recordlist.splice(index, 1); |
915 | that.recordlist = that.recordlist; | 973 | that.recordlist = that.recordlist; |
@@ -936,8 +994,8 @@ export default { | @@ -936,8 +994,8 @@ export default { | ||
936 | } | 994 | } |
937 | }, | 995 | }, |
938 | websocketsend(Data) { | 996 | websocketsend(Data) { |
997 | + // alert(JSON.stringify(Data)); | ||
939 | //数据发送 | 998 | //数据发送 |
940 | - console.log(99999); | ||
941 | this.websock.send(Data); | 999 | this.websock.send(Data); |
942 | }, | 1000 | }, |
943 | websocketclose(e) { | 1001 | websocketclose(e) { |
@@ -957,13 +1015,13 @@ export default { | @@ -957,13 +1015,13 @@ export default { | ||
957 | 1015 | ||
958 | that.$axios | 1016 | that.$axios |
959 | .post(url, param) | 1017 | .post(url, param) |
960 | - .then(function (res) { | 1018 | + .then(function(res) { |
961 | console.log(res, "直播列表"); | 1019 | console.log(res, "直播列表"); |
962 | if (that.page == 1) { | 1020 | if (that.page == 1) { |
963 | // 页面滚动到某一个位置 | 1021 | // 页面滚动到某一个位置 |
964 | let len = res.data.record.length; | 1022 | let len = res.data.record.length; |
965 | len = len - 1; | 1023 | len = len - 1; |
966 | - res.data.record.forEach(function (value, index, array) { | 1024 | + res.data.record.forEach(function(value, index, array) { |
967 | if (index == len) { | 1025 | if (index == len) { |
968 | value.idkk = "targetboxk"; | 1026 | value.idkk = "targetboxk"; |
969 | that.$nextTick(() => { | 1027 | that.$nextTick(() => { |
@@ -982,14 +1040,14 @@ export default { | @@ -982,14 +1040,14 @@ export default { | ||
982 | // 拼接数组倒叙 | 1040 | // 拼接数组倒叙 |
983 | var arr = [...res.data.record, ...that.recordlist]; | 1041 | var arr = [...res.data.record, ...that.recordlist]; |
984 | that.recordlist = arr; | 1042 | that.recordlist = arr; |
985 | - that.recordlist.forEach(function (value, index, array) { | 1043 | + that.recordlist.forEach(function(value, index, array) { |
986 | value.sel = false; | 1044 | value.sel = false; |
987 | }); | 1045 | }); |
988 | that.recordlist = that.recordlist; | 1046 | that.recordlist = that.recordlist; |
989 | that.this_page = res.data.this_page; | 1047 | that.this_page = res.data.this_page; |
990 | that.total_page = res.data.total_page; | 1048 | that.total_page = res.data.total_page; |
991 | }) | 1049 | }) |
992 | - .catch(function (err) { | 1050 | + .catch(function(err) { |
993 | console.log(err); | 1051 | console.log(err); |
994 | }); | 1052 | }); |
995 | }, | 1053 | }, |
@@ -1000,7 +1058,7 @@ export default { | @@ -1000,7 +1058,7 @@ export default { | ||
1000 | 1058 | ||
1001 | // that.recordlist[index].sel = !that.recordlist[index].sel; | 1059 | // that.recordlist[index].sel = !that.recordlist[index].sel; |
1002 | 1060 | ||
1003 | - that.recordlist.forEach(function (value, indexk, array) { | 1061 | + that.recordlist.forEach(function(value, indexk, array) { |
1004 | if (index == indexk) { | 1062 | if (index == indexk) { |
1005 | that.recordlist[indexk].sel = !that.recordlist[indexk].sel; | 1063 | that.recordlist[indexk].sel = !that.recordlist[indexk].sel; |
1006 | } else { | 1064 | } else { |
@@ -1019,7 +1077,7 @@ export default { | @@ -1019,7 +1077,7 @@ export default { | ||
1019 | wx.downloadVoice({ | 1077 | wx.downloadVoice({ |
1020 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | 1078 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 |
1021 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 1079 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
1022 | - success: function (res) { | 1080 | + success: function(res) { |
1023 | localId = res.localId; // 返回音频的本地ID | 1081 | localId = res.localId; // 返回音频的本地ID |
1024 | that.playlocalid = localId; | 1082 | that.playlocalid = localId; |
1025 | that.recordlist[index].localId = localId; | 1083 | that.recordlist[index].localId = localId; |
@@ -1055,10 +1113,10 @@ export default { | @@ -1055,10 +1113,10 @@ export default { | ||
1055 | } | 1113 | } |
1056 | // 监听播放停止播放下一个 | 1114 | // 监听播放停止播放下一个 |
1057 | wx.onVoicePlayEnd({ | 1115 | wx.onVoicePlayEnd({ |
1058 | - success: function (res) { | 1116 | + success: function(res) { |
1059 | var localId = res.localId; // 返回音频的本地ID | 1117 | var localId = res.localId; // 返回音频的本地ID |
1060 | 1118 | ||
1061 | - that.recordlist.forEach(function (value, index, array) { | 1119 | + that.recordlist.forEach(function(value, index, array) { |
1062 | if (localId == value.localId) { | 1120 | if (localId == value.localId) { |
1063 | value.sel = false; | 1121 | value.sel = false; |
1064 | } | 1122 | } |
@@ -1074,7 +1132,7 @@ export default { | @@ -1074,7 +1132,7 @@ export default { | ||
1074 | wx.downloadVoice({ | 1132 | wx.downloadVoice({ |
1075 | serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | 1133 | serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 |
1076 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 1134 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
1077 | - success: function (res) { | 1135 | + success: function(res) { |
1078 | let localId = res.localId; // 返回音频的本地ID | 1136 | let localId = res.localId; // 返回音频的本地ID |
1079 | that.recordlist[i].localId = localId; | 1137 | that.recordlist[i].localId = localId; |
1080 | that.recordlist[i].sel = true; | 1138 | that.recordlist[i].sel = true; |
@@ -1118,7 +1176,7 @@ export default { | @@ -1118,7 +1176,7 @@ export default { | ||
1118 | let that = this; | 1176 | let that = this; |
1119 | clearTimeout(timeOutEvent); //清除定时器 | 1177 | clearTimeout(timeOutEvent); //清除定时器 |
1120 | timeOutEvent = 0; | 1178 | timeOutEvent = 0; |
1121 | - timeOutEvent = setTimeout(function () { | 1179 | + timeOutEvent = setTimeout(function() { |
1122 | Dialog.confirm({ | 1180 | Dialog.confirm({ |
1123 | title: "是否删除帖子" | 1181 | title: "是否删除帖子" |
1124 | }) | 1182 | }) |
-
请 注册 或 登录 后发表评论