正在显示
53 个修改的文件
包含
1347 行增加
和
602 行删除
@@ -14247,6 +14247,11 @@ | @@ -14247,6 +14247,11 @@ | ||
14247 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", | 14247 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", |
14248 | "dev": true | 14248 | "dev": true |
14249 | }, | 14249 | }, |
14250 | + "vconsole": { | ||
14251 | + "version": "3.3.4", | ||
14252 | + "resolved": "https://registry.npm.taobao.org/vconsole/download/vconsole-3.3.4.tgz", | ||
14253 | + "integrity": "sha1-p9rNiIez0+kC6NGEJc2lbDTnf1E=" | ||
14254 | + }, | ||
14250 | "vendors": { | 14255 | "vendors": { |
14251 | "version": "1.0.4", | 14256 | "version": "1.0.4", |
14252 | "resolved": "https://registry.npm.taobao.org/vendors/download/vendors-1.0.4.tgz?cache=0&sync_timestamp=1579857106626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvendors%2Fdownload%2Fvendors-1.0.4.tgz", | 14257 | "resolved": "https://registry.npm.taobao.org/vendors/download/vendors-1.0.4.tgz?cache=0&sync_timestamp=1579857106626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvendors%2Fdownload%2Fvendors-1.0.4.tgz", |
@@ -19,6 +19,7 @@ | @@ -19,6 +19,7 @@ | ||
19 | "jweixin-1.6.0": "^1.0.0", | 19 | "jweixin-1.6.0": "^1.0.0", |
20 | "mpvue-calendar": "^2.3.7", | 20 | "mpvue-calendar": "^2.3.7", |
21 | "vant": "^2.9.2", | 21 | "vant": "^2.9.2", |
22 | + "vconsole": "^3.3.4", | ||
22 | "vue": "^2.5.2", | 23 | "vue": "^2.5.2", |
23 | "vue-calendar-component": "^2.8.2", | 24 | "vue-calendar-component": "^2.8.2", |
24 | "vue-clipboard2": "^0.3.1", | 25 | "vue-clipboard2": "^0.3.1", |
@@ -22,8 +22,37 @@ body, | @@ -22,8 +22,37 @@ body, | ||
22 | html { | 22 | html { |
23 | overflow-x: hidden; | 23 | overflow-x: hidden; |
24 | overflow: touch; | 24 | overflow: touch; |
25 | + | ||
26 | +} | ||
27 | + | ||
28 | +* { | ||
29 | + -webkit-touch-callout: none; /*系统默认菜单被禁用*/ | ||
30 | + -webkit-user-select: none; /*webkit浏览器*/ | ||
31 | + -khtml-user-select: none; /*早期浏览器*/ | ||
32 | + -moz-user-select: none; /*火狐*/ | ||
33 | + -ms-user-select: none; /*IE10*/ | ||
34 | + user-select: none; | ||
35 | + -webkit-appearance: none; /*兼容苹果手机,去除苹果手机select 默认样式,也会把单选和多选清除掉*/ | ||
36 | + -webkit-overflow-scrolling: touch; | ||
37 | + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
38 | +} | ||
39 | + | ||
40 | +input, | ||
41 | +textarea { | ||
42 | + -webkit-user-select: auto; | ||
25 | } | 43 | } |
26 | #app { | 44 | #app { |
45 | + | ||
46 | +} | ||
47 | +p{ | ||
48 | + width:100%!important; | ||
49 | + font-size: 0.28rem; | ||
50 | + font-weight: normal!important; | ||
51 | +} | ||
52 | +ul{ | ||
53 | + width:100%!important; | ||
54 | + font-size: 0.28rem; | ||
55 | + font-weight: normal!important; | ||
27 | } | 56 | } |
28 | 57 | ||
29 | .nodata { | 58 | .nodata { |
@@ -187,9 +216,9 @@ input { | @@ -187,9 +216,9 @@ input { | ||
187 | .messagelist { | 216 | .messagelist { |
188 | padding: 0.54rem 0.32rem; | 217 | padding: 0.54rem 0.32rem; |
189 | box-sizing: border-box; | 218 | box-sizing: border-box; |
190 | - margin-bottom: 1.2rem; | ||
191 | - margin-top: 0.6rem; | ||
192 | - margin-bottom: 1.2rem; | 219 | + /* margin-bottom: 1.2rem; */ |
220 | + /* margin-top: 0.6rem; | ||
221 | + margin-bottom: 1.2rem; */ | ||
193 | } | 222 | } |
194 | .messageitemleft { | 223 | .messageitemleft { |
195 | width: 1rem; | 224 | width: 1rem; |
@@ -253,6 +282,10 @@ input { | @@ -253,6 +282,10 @@ input { | ||
253 | position: fixed; | 282 | position: fixed; |
254 | left: 0; | 283 | left: 0; |
255 | bottom: 0; | 284 | bottom: 0; |
285 | + z-index:999; | ||
286 | + -webkit-transform: translateZ(1px); | ||
287 | + | ||
288 | +transform: translate(1px) | ||
256 | } | 289 | } |
257 | .writermessage { | 290 | .writermessage { |
258 | width: 4.84rem; | 291 | width: 4.84rem; |
1 | <template> | 1 | <template> |
2 | <div class="container"> | 2 | <div class="container"> |
3 | <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white"> | 3 | <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white"> |
4 | - <van-swipe-item v-for="(item, index) in banner" :key="index" @click="bannerdetail(item)"> | 4 | + <van-swipe-item |
5 | + v-for="(item, index) in banner" | ||
6 | + :key="index" | ||
7 | + @click="bannerdetail(item)" | ||
8 | + > | ||
5 | <div class="itemimg"> | 9 | <div class="itemimg"> |
6 | <img :src="item.image" alt /> | 10 | <img :src="item.image" alt /> |
7 | </div> | 11 | </div> |
@@ -17,7 +21,7 @@ | @@ -17,7 +21,7 @@ | ||
17 | <div> | 21 | <div> |
18 | <div | 22 | <div |
19 | class="spring" | 23 | class="spring" |
20 | - v-for="(item,index) in activilist" | 24 | + v-for="(item, index) in activilist" |
21 | :key="index" | 25 | :key="index" |
22 | @click="godetail(item.id)" | 26 | @click="godetail(item.id)" |
23 | > | 27 | > |
@@ -37,7 +41,6 @@ | @@ -37,7 +41,6 @@ | ||
37 | <script> | 41 | <script> |
38 | import Vue from "vue"; | 42 | import Vue from "vue"; |
39 | import { Swipe, SwipeItem } from "vant"; | 43 | import { Swipe, SwipeItem } from "vant"; |
40 | - | ||
41 | import { Calendar } from "vant"; | 44 | import { Calendar } from "vant"; |
42 | Vue.use(Calendar); | 45 | Vue.use(Calendar); |
43 | Vue.use(Swipe); | 46 | Vue.use(Swipe); |
1 | <template> | 1 | <template> |
2 | <div class="container"> | 2 | <div class="container"> |
3 | - <div class="flextwo sharetopkk" @click="back" style="position: fixed;top:0;left:0;"> | 3 | + <div |
4 | + class="flextwo sharetopkk" | ||
5 | + @click="back" | ||
6 | + style="position: fixed; top: 0; left: 0" | ||
7 | + > | ||
4 | <div class="leftrow leftrowkimg"> | 8 | <div class="leftrow leftrowkimg"> |
5 | <img src="../../../assets/leftrow.png" alt /> | 9 | <img src="../../../assets/leftrow.png" alt /> |
6 | </div> | 10 | </div> |
@@ -29,10 +33,15 @@ | @@ -29,10 +33,15 @@ | ||
29 | /> | 33 | /> |
30 | </div> | 34 | </div> |
31 | 35 | ||
32 | - <div class="actlist van-overflow-hidden" :style="{'margin-top':gaodu}"> | 36 | + <div class="actlist van-overflow-hidden" :style="{ 'margin-top': gaodu }"> |
33 | <div class="activitytext" v-html="activity_des"></div> | 37 | <div class="activitytext" v-html="activity_des"></div> |
34 | <div class="actsecbox"> | 38 | <div class="actsecbox"> |
35 | - <div class="spring" v-for="(item, index) in banner" :key="index" @click="actdetail(item)"> | 39 | + <div |
40 | + class="spring" | ||
41 | + v-for="(item, index) in banner" | ||
42 | + :key="index" | ||
43 | + @click="actdetail(item)" | ||
44 | + > | ||
36 | <img :src="item.image" alt /> | 45 | <img :src="item.image" alt /> |
37 | </div> | 46 | </div> |
38 | </div> | 47 | </div> |
@@ -91,7 +100,7 @@ export default { | @@ -91,7 +100,7 @@ export default { | ||
91 | 100 | ||
92 | created() { | 101 | created() { |
93 | 102 | ||
94 | - document.title = "唐元集公众号"; | 103 | + document.title = "唐元集"; |
95 | // this.id = this.$route.query.id; | 104 | // this.id = this.$route.query.id; |
96 | // console.log(this.id); | 105 | // console.log(this.id); |
97 | 106 | ||
@@ -118,6 +127,7 @@ export default { | @@ -118,6 +127,7 @@ export default { | ||
118 | // 获取某一个月的活动 | 127 | // 获取某一个月的活动 |
119 | this.getmonthactive() | 128 | this.getmonthactive() |
120 | this.$nextTick(function () { | 129 | this.$nextTick(function () { |
130 | + console.log('34234592340590-', that.$refs.element) | ||
121 | var len = that.$refs.element.offsetHeight + 40 + 'px'; | 131 | var len = that.$refs.element.offsetHeight + 40 + 'px'; |
122 | 132 | ||
123 | that.gaodu = len; | 133 | that.gaodu = len; |
@@ -285,22 +295,7 @@ export default { | @@ -285,22 +295,7 @@ export default { | ||
285 | }); | 295 | }); |
286 | }, | 296 | }, |
287 | // 琥珀去 | 297 | // 琥珀去 |
288 | - // selectYear(year) { | ||
289 | - // console.log(year) | ||
290 | - // }, | ||
291 | - // selectMonth(month, year) { | ||
292 | - // console.log(year, month) | ||
293 | - // }, | ||
294 | - // setToday() { | ||
295 | - // this.$refs.calendar.setToday() | ||
296 | - // }, | ||
297 | - // dateInfo() { | ||
298 | - // const info = this.$refs.calendar.dateInfo(2018, 8, 23) | ||
299 | - // console.log(info); | ||
300 | - // }, | ||
301 | - // renderer() { | ||
302 | - // this.$refs.calendar.renderer(2018, 8); //渲染2018年8月份 | ||
303 | - // }, | 298 | + |
304 | selected(val, val2) { | 299 | selected(val, val2) { |
305 | console.log(this); | 300 | console.log(this); |
306 | let monthArray = this.$refs.calendar.monthRangeDays; | 301 | let monthArray = this.$refs.calendar.monthRangeDays; |
1 | <template> | 1 | <template> |
2 | <div class="container"> | 2 | <div class="container"> |
3 | - <div class="flextwo sharetopk" @click="back"> | ||
4 | - <div class="leftrow leftrowkimg"> | 3 | + <div class="flextwo sharetopk"> |
4 | + <div class="leftrow leftrowkimg" @click="back"> | ||
5 | <img src="../../../assets/leftrow.png" alt /> | 5 | <img src="../../../assets/leftrow.png" alt /> |
6 | </div> | 6 | </div> |
7 | <div class="sharemiddle">活动详情</div> | 7 | <div class="sharemiddle">活动详情</div> |
@@ -30,7 +30,7 @@ export default { | @@ -30,7 +30,7 @@ export default { | ||
30 | }, | 30 | }, |
31 | 31 | ||
32 | created() { | 32 | created() { |
33 | - document.title = "唐元集公众号"; | 33 | + document.title = "唐元集"; |
34 | this.id = this.$route.query.id; | 34 | this.id = this.$route.query.id; |
35 | console.log(this.id); | 35 | console.log(this.id); |
36 | this.getdetail(); | 36 | this.getdetail(); |
@@ -51,7 +51,7 @@ export default { | @@ -51,7 +51,7 @@ export default { | ||
51 | }; | 51 | }; |
52 | }, | 52 | }, |
53 | created() { | 53 | created() { |
54 | - document.title = "唐元集公众号"; | 54 | + document.title = "唐元集"; |
55 | let that = this; | 55 | let that = this; |
56 | let date = new Date(); | 56 | let date = new Date(); |
57 | let year = date.getFullYear(); | 57 | let year = date.getFullYear(); |
@@ -160,6 +160,7 @@ import Vue from "vue"; | @@ -160,6 +160,7 @@ import Vue from "vue"; | ||
160 | import tabBar from "@/components/views/tabBar.vue"; | 160 | import tabBar from "@/components/views/tabBar.vue"; |
161 | import { List, Toast } from "vant"; | 161 | import { List, Toast } from "vant"; |
162 | Vue.use(List); | 162 | Vue.use(List); |
163 | + | ||
163 | export default { | 164 | export default { |
164 | components: { | 165 | components: { |
165 | tabBar | 166 | tabBar |
@@ -199,11 +200,11 @@ export default { | @@ -199,11 +200,11 @@ export default { | ||
199 | this.getvideolist(); | 200 | this.getvideolist(); |
200 | localStorage.setItem("selnav", "") | 201 | localStorage.setItem("selnav", "") |
201 | } else if (this.selnav == 1) { | 202 | } else if (this.selnav == 1) { |
202 | - that.total_page = ""; | ||
203 | - that.this_page = ""; | ||
204 | - this.yinglist = []; | ||
205 | - that.videopage = 1; | ||
206 | - this.getyingyang(); | 203 | + that.total_page = ""; |
204 | + that.this_page = ""; | ||
205 | + this.yinglist = []; | ||
206 | + that.videopage = 1; | ||
207 | + this.getyingyang(); | ||
207 | } | 208 | } |
208 | } else { | 209 | } else { |
209 | this.getcourselist() | 210 | this.getcourselist() |
@@ -292,13 +293,14 @@ export default { | @@ -292,13 +293,14 @@ export default { | ||
292 | }, | 293 | }, |
293 | // 进入直播详情 | 294 | // 进入直播详情 |
294 | zhibodetail(item) { | 295 | zhibodetail(item) { |
295 | - console.log(item.allow_join) | ||
296 | - this.$router.push({ | ||
297 | - path: '/userzhibo', | ||
298 | - query: { | ||
299 | - id: item.id | ||
300 | - } | ||
301 | - }) | 296 | + |
297 | + // this.$router.push({ | ||
298 | + // path: '/userzhibo', | ||
299 | + // query: { | ||
300 | + // id: item.id | ||
301 | + // } | ||
302 | + // }) | ||
303 | + localStorage.setItem("coursename",item.title) | ||
302 | if (item.allow_join != undefined) { | 304 | if (item.allow_join != undefined) { |
303 | if (item.allow_join == 1) { | 305 | if (item.allow_join == 1) { |
304 | this.$router.push({ | 306 | this.$router.push({ |
@@ -430,7 +432,8 @@ export default { | @@ -430,7 +432,8 @@ export default { | ||
430 | this.$router.push({ | 432 | this.$router.push({ |
431 | path: "/lubodetail", | 433 | path: "/lubodetail", |
432 | query: { | 434 | query: { |
433 | - id: item.id | 435 | + id: item.id, |
436 | + | ||
434 | } | 437 | } |
435 | }); | 438 | }); |
436 | }, | 439 | }, |
@@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
3 | <!-- style="height:600px" --> | 3 | <!-- style="height:600px" --> |
4 | <!-- --> | 4 | <!-- --> |
5 | <div class="container" refs="message" id="targetbox"> | 5 | <div class="container" refs="message" id="targetbox"> |
6 | - <div class="sharetop flextwo" @click="back"> | ||
7 | - <div class="leftrow"> | 6 | + <div class="sharetop flextwo" > |
7 | + <div class="leftrow" @click="back"> | ||
8 | <img src="../../../assets/leftrow.png" alt /> | 8 | <img src="../../../assets/leftrow.png" alt /> |
9 | </div> | 9 | </div> |
10 | <div class="sharemiddle">{{ coursetitle }}</div> | 10 | <div class="sharemiddle">{{ coursetitle }}</div> |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | <van-pull-refresh | 19 | <van-pull-refresh |
20 | v-model="isLoading" | 20 | v-model="isLoading" |
21 | @refresh="onRefresh" | 21 | @refresh="onRefresh" |
22 | - class="messagelist" | 22 | + class="messagelist messagelistbox" |
23 | style="height: 100%" | 23 | style="height: 100%" |
24 | id="messagebox" | 24 | id="messagebox" |
25 | v-else | 25 | v-else |
@@ -309,6 +309,8 @@ | @@ -309,6 +309,8 @@ | ||
309 | import wx from "jweixin-1.6.0"; | 309 | import wx from "jweixin-1.6.0"; |
310 | import Vue from "vue"; | 310 | import Vue from "vue"; |
311 | import { PullRefresh, Toast } from "vant"; | 311 | import { PullRefresh, Toast } from "vant"; |
312 | +import { pushHistory } from '../../../utils/back.js';//监听返回上一页的判断 | ||
313 | + | ||
312 | Vue.use(PullRefresh); | 314 | Vue.use(PullRefresh); |
313 | Vue.use(Toast); | 315 | Vue.use(Toast); |
314 | var timer = null; | 316 | var timer = null; |
@@ -365,7 +367,7 @@ export default { | @@ -365,7 +367,7 @@ export default { | ||
365 | // alert(this.baseurl+ | 367 | // alert(this.baseurl+ |
366 | // "/redirect.html?shareRedirect=" + | 368 | // "/redirect.html?shareRedirect=" + |
367 | // encodeURIComponent(window.location.href)) | 369 | // encodeURIComponent(window.location.href)) |
368 | - document.title = "唐元集公众号"; | 370 | + document.title = "唐元集"; |
369 | this.id = this.$route.query.id; | 371 | this.id = this.$route.query.id; |
370 | // 获取appid | 372 | // 获取appid |
371 | this.getappid(); | 373 | this.getappid(); |
@@ -378,11 +380,13 @@ export default { | @@ -378,11 +380,13 @@ export default { | ||
378 | mounted() { | 380 | mounted() { |
379 | 381 | ||
380 | let that = this | 382 | let that = this |
381 | - | ||
382 | - | 383 | + this.onpopstate() |
383 | console.log(that.target, '99997878666') | 384 | console.log(that.target, '99997878666') |
384 | }, | 385 | }, |
385 | - | 386 | + destroyed () { |
387 | + // 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件 | ||
388 | + window.removeEventListener("popstate", this.closeViews, false); | ||
389 | + }, | ||
386 | 390 | ||
387 | watch: { | 391 | watch: { |
388 | 392 | ||
@@ -399,6 +403,29 @@ export default { | @@ -399,6 +403,29 @@ export default { | ||
399 | } | 403 | } |
400 | }, | 404 | }, |
401 | methods: { | 405 | methods: { |
406 | + // 监听页面卸载 | ||
407 | + // 监听历史记录点, 添加返回事件监听 | ||
408 | + onpopstate () { | ||
409 | + pushHistory() | ||
410 | + // 给window添加一个popstate事件,拦截返回键,执行this.closeViews事件,addEventListener需要指向一个方法 | ||
411 | + window.addEventListener("popstate", this.closeViews, false); | ||
412 | + }, | ||
413 | + // 返回上一页 | ||
414 | + closeViews () { | ||
415 | + console.log(4373474378) | ||
416 | + this.$router.go(-1) | ||
417 | + this.recordlist.forEach(function(value,index,array){ | ||
418 | + value.sel=false | ||
419 | + }) | ||
420 | + this.recordlist=this.recordlist; | ||
421 | + wx.stopVoice({ | ||
422 | + localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
423 | + }); | ||
424 | + wx.stopVoice({ | ||
425 | + localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
426 | + }); | ||
427 | + this.$forceUpdate(); | ||
428 | + }, | ||
402 | 429 | ||
403 | //获取个人中心 | 430 | //获取个人中心 |
404 | getuserinfo() { | 431 | getuserinfo() { |
@@ -514,7 +541,6 @@ export default { | @@ -514,7 +541,6 @@ export default { | ||
514 | "previewImage" | 541 | "previewImage" |
515 | ] | 542 | ] |
516 | }); | 543 | }); |
517 | - | ||
518 | that.sharetofriend() | 544 | that.sharetofriend() |
519 | }) | 545 | }) |
520 | .catch(function (err) { | 546 | .catch(function (err) { |
@@ -532,8 +558,6 @@ export default { | @@ -532,8 +558,6 @@ export default { | ||
532 | }); | 558 | }); |
533 | // 处理验证成功的信息 | 559 | // 处理验证成功的信息 |
534 | wx.ready(function () { | 560 | wx.ready(function () { |
535 | - | ||
536 | - | ||
537 | // alert(window.location.href.split('#')[0]); | 561 | // alert(window.location.href.split('#')[0]); |
538 | // var share_title = that.sharemsg.title; | 562 | // var share_title = that.sharemsg.title; |
539 | // if (share_title.indexOf("${title}") >= 0) { | 563 | // if (share_title.indexOf("${title}") >= 0) { |
@@ -727,7 +751,7 @@ export default { | @@ -727,7 +751,7 @@ export default { | ||
727 | wx.startRecord({ | 751 | wx.startRecord({ |
728 | success: function (res) { | 752 | success: function (res) { |
729 | // alert(JSON.stringify(res)) | 753 | // alert(JSON.stringify(res)) |
730 | - consoel.log(res, 99977775655); | 754 | + |
731 | // alert('成功调起录音') | 755 | // alert('成功调起录音') |
732 | // that.timer = setInterval(() => { | 756 | // that.timer = setInterval(() => { |
733 | // time++; | 757 | // time++; |
@@ -957,9 +981,6 @@ export default { | @@ -957,9 +981,6 @@ export default { | ||
957 | 981 | ||
958 | } | 982 | } |
959 | 983 | ||
960 | - | ||
961 | - | ||
962 | - | ||
963 | } | 984 | } |
964 | }, | 985 | }, |
965 | websocketsend(Data) { | 986 | websocketsend(Data) { |
@@ -998,7 +1019,6 @@ export default { | @@ -998,7 +1019,6 @@ export default { | ||
998 | that.target = targetbox.offsetTop; | 1019 | that.target = targetbox.offsetTop; |
999 | document.body.scrollTop = that.target; | 1020 | document.body.scrollTop = that.target; |
1000 | document.getElementById('targetbox').scrollTop = that.target | 1021 | document.getElementById('targetbox').scrollTop = that.target |
1001 | - | ||
1002 | }) | 1022 | }) |
1003 | }) | 1023 | }) |
1004 | } | 1024 | } |
@@ -1025,6 +1045,10 @@ export default { | @@ -1025,6 +1045,10 @@ export default { | ||
1025 | audioplay(item, index) { | 1045 | audioplay(item, index) { |
1026 | let that = this; | 1046 | let that = this; |
1027 | console.log(item) | 1047 | console.log(item) |
1048 | + var botime=0 | ||
1049 | + var intervl=setInterval(function(){ | ||
1050 | + botime++; | ||
1051 | + },1000) | ||
1028 | // 播放某一个语音 | 1052 | // 播放某一个语音 |
1029 | 1053 | ||
1030 | // that.recordlist[index].sel = !that.recordlist[index].sel; | 1054 | // that.recordlist[index].sel = !that.recordlist[index].sel; |
@@ -1050,16 +1074,17 @@ export default { | @@ -1050,16 +1074,17 @@ export default { | ||
1050 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | 1074 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 |
1051 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 1075 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
1052 | success: function (res) { | 1076 | success: function (res) { |
1053 | - | ||
1054 | localId = res.localId; // 返回音频的本地ID | 1077 | localId = res.localId; // 返回音频的本地ID |
1055 | that.playlocalid = localId; | 1078 | that.playlocalid = localId; |
1056 | that.recordlist[index].localId = localId; | 1079 | that.recordlist[index].localId = localId; |
1057 | that.recordlist = that.recordlist; | 1080 | that.recordlist = that.recordlist; |
1058 | that.$forceUpdate() | 1081 | that.$forceUpdate() |
1059 | - | ||
1060 | wx.playVoice({ | 1082 | wx.playVoice({ |
1061 | localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得 | 1083 | localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得 |
1062 | }) | 1084 | }) |
1085 | + }, | ||
1086 | + fail:function (err){ | ||
1087 | + // alert(JSON.stringify(err)) | ||
1063 | } | 1088 | } |
1064 | 1089 | ||
1065 | }); | 1090 | }); |
@@ -1087,30 +1112,31 @@ export default { | @@ -1087,30 +1112,31 @@ export default { | ||
1087 | 1112 | ||
1088 | index = index + 1; | 1113 | index = index + 1; |
1089 | 1114 | ||
1090 | - if (that.recordlist[index].data != undefined) { | ||
1091 | - if (that.recordlist[index].type == 3) { | ||
1092 | - that.recordlist[index].sel = true | ||
1093 | - wx.downloadVoice({ | ||
1094 | - serverId: that.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | ||
1095 | - isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
1096 | - success: function (res) { | ||
1097 | - let localId = res.localId; // 返回音频的本地ID | ||
1098 | - that.recordlist[index].localId = localId; | ||
1099 | - that.recordlist[index].sel = true; | ||
1100 | - that.recordlist = that.recordlist; | ||
1101 | - that.$forceUpdate() | ||
1102 | - wx.playVoice({ | ||
1103 | - localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
1104 | - }); | ||
1105 | - | ||
1106 | - | ||
1107 | - } | ||
1108 | - }); | 1115 | + if(botime>=Number(item.times.split(".")[0])){ |
1116 | + for (var i = index; i < that.recordlist.length; i++) { | ||
1117 | + if (that.recordlist[i].type == 3) { | ||
1118 | + index = i; | ||
1119 | + that.recordlist[i].sel = true; | ||
1120 | + wx.downloadVoice({ | ||
1121 | + serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | ||
1122 | + isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
1123 | + success: function (res) { | ||
1124 | + let localId = res.localId; // 返回音频的本地ID | ||
1125 | + that.recordlist[i].localId = localId; | ||
1126 | + that.recordlist[i].sel = true; | ||
1127 | + that.recordlist = that.recordlist; | ||
1128 | + that.$forceUpdate(); | ||
1129 | + wx.playVoice({ | ||
1130 | + localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
1131 | + }); | ||
1132 | + } | ||
1133 | + }); | ||
1134 | + return; | ||
1135 | + } | ||
1136 | + } | ||
1109 | } | 1137 | } |
1110 | - } | ||
1111 | that.recordlist = that.recordlist; | 1138 | that.recordlist = that.recordlist; |
1112 | that.$forceUpdate() | 1139 | that.$forceUpdate() |
1113 | - | ||
1114 | } | 1140 | } |
1115 | }); | 1141 | }); |
1116 | 1142 | ||
@@ -1604,4 +1630,7 @@ export default { | @@ -1604,4 +1630,7 @@ export default { | ||
1604 | opacity: 1; | 1630 | opacity: 1; |
1605 | } | 1631 | } |
1606 | } */ | 1632 | } */ |
1633 | +.messagelistbox{ | ||
1634 | + padding-top: 1.2rem; | ||
1635 | +} | ||
1607 | </style> | 1636 | </style> |
1 | <template> | 1 | <template> |
2 | <div class="container"> | 2 | <div class="container"> |
3 | - <div class="flextwo sharetopk" @click="back"> | ||
4 | - <div class="leftrow leftrowkimg"> | 3 | + <div class="flextwo sharetopk" > |
4 | + <div class="leftrow leftrowkimg" @click="back"> | ||
5 | <img src="../../../assets/leftrow.png" alt /> | 5 | <img src="../../../assets/leftrow.png" alt /> |
6 | </div> | 6 | </div> |
7 | <div class="sharemiddle">搜索</div> | 7 | <div class="sharemiddle">搜索</div> |
@@ -253,7 +253,8 @@ export default { | @@ -253,7 +253,8 @@ export default { | ||
253 | this.$router.push({ | 253 | this.$router.push({ |
254 | path: "/lubodetail", | 254 | path: "/lubodetail", |
255 | query: { | 255 | query: { |
256 | - id: item.id | 256 | + id: item.id, |
257 | + type:3 | ||
257 | } | 258 | } |
258 | }); | 259 | }); |
259 | } | 260 | } |
1 | <template> | 1 | <template> |
2 | <div class="containerbox"> | 2 | <div class="containerbox"> |
3 | - <div class="sharetop flextwo" @click="back"> | ||
4 | - <div class="leftrow"> | 3 | + <div class="sharetop flextwo" > |
4 | + <div class="leftrow" @click="back"> | ||
5 | <img src="../../../assets/leftrow.png" alt /> | 5 | <img src="../../../assets/leftrow.png" alt /> |
6 | </div> | 6 | </div> |
7 | - <div class="sharemiddle">图文类</div> | 7 | + <div class="sharemiddle">营养小知识</div> |
8 | <div class="flexone" @click.stop="collect"> | 8 | <div class="flexone" @click.stop="collect"> |
9 | - <div class="sharebtn" style="margin-right:0.5rem;width:0.4rem;height:0.4rem"> | ||
10 | - <img src="../../../assets/nostar.png" alt v-if="yingyangdetail.is_favorite==0" /> | 9 | + <div |
10 | + class="sharebtn" | ||
11 | + style="margin-right: 0.5rem; width: 0.4rem; height: 0.4rem" | ||
12 | + > | ||
13 | + <img | ||
14 | + src="../../../assets/nostar.png" | ||
15 | + alt | ||
16 | + v-if="yingyangdetail.is_favorite == 0" | ||
17 | + /> | ||
11 | <img src="../../../assets/star.png" alt v-else /> | 18 | <img src="../../../assets/star.png" alt v-else /> |
12 | </div> | 19 | </div> |
13 | - <div class="sharebtn"> | 20 | + <!-- <div class="sharebtn"> |
14 | <img src="../../../assets/sharebtn.png" alt /> | 21 | <img src="../../../assets/sharebtn.png" alt /> |
15 | - </div> | 22 | + </div> --> |
16 | </div> | 23 | </div> |
17 | </div> | 24 | </div> |
18 | <div class="yingyangbox"> | 25 | <div class="yingyangbox"> |
19 | - <div class="yingyangtitle">{{yingyangdetail.title}}</div> | 26 | + <div class="yingyangtitle">{{ yingyangdetail.title }}</div> |
20 | <div class="yingyangcontent" v-html="yingyangdetail.content"></div> | 27 | <div class="yingyangcontent" v-html="yingyangdetail.content"></div> |
21 | </div> | 28 | </div> |
22 | </div> | 29 | </div> |
23 | </template> | 30 | </template> |
24 | 31 | ||
25 | <script> | 32 | <script> |
33 | +import wx from "jweixin-1.6.0"; | ||
26 | import { Toast } from 'vant'; | 34 | import { Toast } from 'vant'; |
27 | export default { | 35 | export default { |
36 | + | ||
28 | data() { | 37 | data() { |
29 | return { | 38 | return { |
30 | id: '', | 39 | id: '', |
31 | yingyangdetail: '', | 40 | yingyangdetail: '', |
41 | + baseurl: '' | ||
32 | } | 42 | } |
33 | }, | 43 | }, |
34 | created() { | 44 | created() { |
45 | + document.title = '唐元集' | ||
35 | this.id = this.$route.query.id; | 46 | this.id = this.$route.query.id; |
47 | + this.baseurl = "http://" + location.host; | ||
48 | + this.getdetail(); | ||
49 | + | ||
50 | + }, | ||
51 | + | ||
52 | + beforeRouteEnter(to, from, next) { | ||
53 | + var u = navigator.userAgent; | ||
54 | + var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 | ||
55 | + // XXX: 修复iOS版微信HTML5 History兼容性问题 | ||
56 | + if (isiOS && to.path !== location.pathname) { | ||
57 | + // 此处不可使用location.replace | ||
58 | + location.assign(to.fullPath); | ||
59 | + } else { | ||
60 | + next(); | ||
61 | + } | ||
36 | }, | 62 | }, |
63 | + | ||
37 | methods: { | 64 | methods: { |
38 | - back() { | ||
39 | - this.$router.go(-1) | 65 | + back() { |
66 | + this.$router.back(-1); | ||
67 | + | ||
68 | + }, | ||
69 | + // 获取appid | ||
70 | + getappid() { | ||
71 | + let that = this; | ||
72 | + console.log(34734894890); | ||
73 | + // let urlk = window.location.href; | ||
74 | + let urlk = window.location.href; | ||
75 | + var url = "/api/user/wechat_jssdk"; | ||
76 | + let param = { | ||
77 | + url: urlk | ||
78 | + }; | ||
79 | + | ||
80 | + that.$axios | ||
81 | + .post(url, param) | ||
82 | + .then(function (res) { | ||
83 | + console.log(res); | ||
84 | + wx.config({ | ||
85 | + debug: false, | ||
86 | + appId: res.data.jssdk.appId, // 和获取Ticke的必须一样------必填,公众号的唯一标识 | ||
87 | + timestamp: res.data.jssdk.timestamp, // 必填,生成签名的时间戳 | ||
88 | + nonceStr: res.data.jssdk.nonceStr, // 必填,生成签名的随机串 | ||
89 | + signature: res.data.jssdk.signature, // 必填,签名,见附录1 | ||
90 | + //需要分享的列表项:发送给朋友,分享到朋友圈,分享到QQ,分享到QQ空间 | ||
91 | + jsApiList: [ | ||
92 | + "updateAppMessageShareData", | ||
93 | + "updateTimelineShareData", | ||
94 | + | ||
95 | + ] | ||
96 | + }); | ||
97 | + | ||
98 | + that.sharetofriend(); | ||
99 | + }) | ||
100 | + .catch(function (err) { | ||
101 | + console.log(err); | ||
102 | + }); | ||
40 | }, | 103 | }, |
41 | - getdetail() { | 104 | + // 分享给朋友 |
105 | + sharetofriend() { | ||
106 | + var that = this; | ||
107 | + // 处理验证失败的信息 | ||
108 | + wx.error(function (res) { | ||
109 | + logUtil.printLog("验证失败返回的信息:", res); | ||
110 | + }); | ||
111 | + // 处理验证成功的信息 | ||
112 | + wx.ready(function () { | ||
113 | + // alert(window.location.href.split('#')[0]); | ||
114 | + // var share_title = that.sharemsg.title; | ||
115 | + // if (share_title.indexOf("${title}") >= 0) { | ||
116 | + // share_title = share_title.replace( | ||
117 | + // "${title}", | ||
118 | + // that.details.details.title | ||
119 | + // ); | ||
120 | + // } | ||
121 | + // var share_desc = that.sharemsg.content; | ||
122 | + // if (share_desc.indexOf("${title}") >= 0) { | ||
123 | + // share_desc = share_desc.replace( | ||
124 | + // "${title}", | ||
125 | + // that.details.details.title | ||
126 | + // ); | ||
127 | + // } | ||
128 | + // if (share_desc.indexOf("${text}") >= 0) { | ||
129 | + // share_desc = share_desc.replace("${text}", that.details.details.text); | ||
130 | + // } | ||
131 | + // 分享到朋友圈 | ||
132 | + wx.updateTimelineShareData({ | ||
133 | + title: that.yingyangdetail.title, // 分享标题 | ||
134 | + link: | ||
135 | + that.baseurl + | ||
136 | + "/redirect.html?shareRedirect=" + | ||
137 | + encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 | ||
138 | + imgUrl: | ||
139 | + "http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png", | ||
140 | + | ||
141 | + // imgUrl: that.details.details.img | ||
142 | + // ? that.details.details.img | ||
143 | + // : that.sharemsg.img, | ||
144 | + | ||
145 | + // 分享图标 | ||
146 | + // desc: that.sharemsg.content, | ||
147 | + success: function (res) { | ||
148 | + // 用户确认分享后执行的回调函数 | ||
149 | + console.log("suss"); | ||
150 | + logUtil.printLog("分享到朋友圈成功返回的信息为:", res); | ||
151 | + that.showMsg("分享成功!"); | ||
152 | + }, | ||
153 | + cancel: function (res) { | ||
154 | + // 用户取消分享后执行的回调函数 | ||
155 | + console.log("err"); | ||
156 | + logUtil.printLog("取消分享到朋友圈返回的信息为:", res); | ||
157 | + } | ||
158 | + }), | ||
159 | + // 分享给朋友 | ||
160 | + wx.updateAppMessageShareData({ | ||
161 | + title: that.yingyangdetail.title, // 分享标题 | ||
162 | + desc: "", // 分享描述 | ||
163 | + link: | ||
164 | + that.baseurl + | ||
165 | + "/redirect.html?shareRedirect=" + | ||
166 | + encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 | ||
167 | + imgUrl: | ||
168 | + "http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png", | ||
169 | + | ||
170 | + // imgUrl: that.details.details.img | ||
171 | + // ? that.details.details.img | ||
172 | + // : that.sharemsg.img, | ||
173 | + // 分享图标 | ||
174 | + type: "", // 分享类型,music、video或link,不填默认为link | ||
175 | + dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 | ||
176 | + success: function (res) { | ||
177 | + // 用户确认分享后执行的回调函数 | ||
178 | + logUtil.printLog("分享给朋友成功返回的信息为:", res); | ||
179 | + }, | ||
180 | + cancel: function (res) { | ||
181 | + // 用户取消分享后执行的回调函数 | ||
182 | + logUtil.printLog("取消分享给朋友返回的信息为:", res); | ||
183 | + } | ||
184 | + }); | ||
185 | + }); | ||
186 | + }, | ||
187 | + | ||
188 | + | ||
189 | + | ||
190 | + getdetail() { | ||
42 | let that = this; | 191 | let that = this; |
43 | var url = "/api/index/knowledge_detail"; | 192 | var url = "/api/index/knowledge_detail"; |
44 | let param = { | 193 | let param = { |
@@ -49,7 +198,8 @@ export default { | @@ -49,7 +198,8 @@ export default { | ||
49 | .post(url, param) | 198 | .post(url, param) |
50 | .then(function (res) { | 199 | .then(function (res) { |
51 | console.log(res); | 200 | console.log(res); |
52 | - that.yingyangdetail = res.data.knowledge | 201 | + that.yingyangdetail = res.data.knowledge; |
202 | + that.getappid() | ||
53 | 203 | ||
54 | }) | 204 | }) |
55 | .catch(function (err) { | 205 | .catch(function (err) { |
@@ -72,10 +222,12 @@ export default { | @@ -72,10 +222,12 @@ export default { | ||
72 | Toast('收藏成功') | 222 | Toast('收藏成功') |
73 | that.yingyangdetail.is_favorite = 1; | 223 | that.yingyangdetail.is_favorite = 1; |
74 | that.yingyangdetailt = that.yingyangdetail | 224 | that.yingyangdetailt = that.yingyangdetail |
225 | + | ||
75 | } else { | 226 | } else { |
76 | Toast('取消收藏成功') | 227 | Toast('取消收藏成功') |
77 | that.yingyangdetail.is_favorite = 0; | 228 | that.yingyangdetail.is_favorite = 0; |
78 | that.yingyangdetail = that.yingyangdetail | 229 | that.yingyangdetail = that.yingyangdetail |
230 | + | ||
79 | } | 231 | } |
80 | 232 | ||
81 | }) | 233 | }) |
@@ -85,11 +237,7 @@ export default { | @@ -85,11 +237,7 @@ export default { | ||
85 | }, | 237 | }, |
86 | 238 | ||
87 | }, | 239 | }, |
88 | - created() { | ||
89 | - document.title = '唐元集公众号' | ||
90 | - this.id = this.$route.query.id; | ||
91 | - this.getdetail() | ||
92 | - } | 240 | + |
93 | 241 | ||
94 | } | 242 | } |
95 | </script> | 243 | </script> |
@@ -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 { |
@@ -352,7 +352,7 @@ export default { | @@ -352,7 +352,7 @@ 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); |
@@ -373,7 +373,7 @@ export default { | @@ -373,7 +373,7 @@ export default { | ||
373 | that.showcommentlist = that.shortcomment; | 373 | that.showcommentlist = that.shortcomment; |
374 | } | 374 | } |
375 | }) | 375 | }) |
376 | - .catch(function(err) { | 376 | + .catch(function (err) { |
377 | console.log(err); | 377 | console.log(err); |
378 | }); | 378 | }); |
379 | }, | 379 | }, |
@@ -397,10 +397,10 @@ export default { | @@ -397,10 +397,10 @@ export default { | ||
397 | 397 | ||
398 | that.$axios | 398 | that.$axios |
399 | .post(url, param) | 399 | .post(url, param) |
400 | - .then(function(res) { | 400 | + .then(function (res) { |
401 | console.log(res); | 401 | console.log(res); |
402 | Toast("发送成功"); | 402 | Toast("发送成功"); |
403 | - that.sortlist.forEach(function(value, index, arrray) { | 403 | + that.sortlist.forEach(function (value, index, arrray) { |
404 | if (value.id == that.socialId) { | 404 | if (value.id == that.socialId) { |
405 | value.comment_count = value.comment_count + 1; | 405 | value.comment_count = value.comment_count + 1; |
406 | } | 406 | } |
@@ -411,7 +411,7 @@ export default { | @@ -411,7 +411,7 @@ export default { | ||
411 | that.textcomment = ""; | 411 | that.textcomment = ""; |
412 | that.getcommentlist(); | 412 | that.getcommentlist(); |
413 | }) | 413 | }) |
414 | - .catch(function(err) { | 414 | + .catch(function (err) { |
415 | console.log(err); | 415 | console.log(err); |
416 | Toast(err.msg); | 416 | Toast(err.msg); |
417 | }); | 417 | }); |
@@ -425,7 +425,7 @@ export default { | @@ -425,7 +425,7 @@ export default { | ||
425 | console.log(9999); | 425 | console.log(9999); |
426 | 426 | ||
427 | let that = this; | 427 | let that = this; |
428 | - that.sortlist.forEach(function(value, index, array) { | 428 | + that.sortlist.forEach(function (value, index, array) { |
429 | console.log(value); | 429 | console.log(value); |
430 | if (value.id == item.id) { | 430 | if (value.id == item.id) { |
431 | if (value.more == true) { | 431 | if (value.more == true) { |
@@ -486,7 +486,7 @@ export default { | @@ -486,7 +486,7 @@ export default { | ||
486 | 486 | ||
487 | that.$axios | 487 | that.$axios |
488 | .post(url, param) | 488 | .post(url, param) |
489 | - .then(function(res) { | 489 | + .then(function (res) { |
490 | console.log(res); | 490 | console.log(res); |
491 | if (item.is_favorite == 0) { | 491 | if (item.is_favorite == 0) { |
492 | item.is_favorite = 1; | 492 | item.is_favorite = 1; |
@@ -504,7 +504,7 @@ export default { | @@ -504,7 +504,7 @@ export default { | ||
504 | that.sortlist = that.sortlist; | 504 | that.sortlist = that.sortlist; |
505 | that.$forceUpdate(); | 505 | that.$forceUpdate(); |
506 | }) | 506 | }) |
507 | - .catch(function(err) { | 507 | + .catch(function (err) { |
508 | console.log(err); | 508 | console.log(err); |
509 | }); | 509 | }); |
510 | }, | 510 | }, |
@@ -520,7 +520,7 @@ export default { | @@ -520,7 +520,7 @@ export default { | ||
520 | 520 | ||
521 | that.$axios | 521 | that.$axios |
522 | .post(url, param) | 522 | .post(url, param) |
523 | - .then(function(res) { | 523 | + .then(function (res) { |
524 | console.log(res); | 524 | console.log(res); |
525 | if (item.is_good == 0) { | 525 | if (item.is_good == 0) { |
526 | item.is_good = 1; | 526 | item.is_good = 1; |
@@ -538,17 +538,18 @@ export default { | @@ -538,17 +538,18 @@ export default { | ||
538 | that.sortlist = that.sortlist; | 538 | that.sortlist = that.sortlist; |
539 | that.$forceUpdate(); | 539 | that.$forceUpdate(); |
540 | }) | 540 | }) |
541 | - .catch(function(err) { | 541 | + .catch(function (err) { |
542 | console.log(err); | 542 | console.log(err); |
543 | }); | 543 | }); |
544 | }, | 544 | }, |
545 | 545 | ||
546 | // 复制文本 | 546 | // 复制文本 |
547 | - copytext() {}, | 547 | + copytext() { }, |
548 | selectnav(id, index) { | 548 | selectnav(id, index) { |
549 | let that = this; | 549 | let that = this; |
550 | this.selnav = index; | 550 | this.selnav = index; |
551 | this.sort_id = id; | 551 | this.sort_id = id; |
552 | + this.selnavsec = -1; | ||
552 | that.page = 1; | 553 | that.page = 1; |
553 | that.sortlist = []; | 554 | that.sortlist = []; |
554 | that.getsocidtylist(); | 555 | that.getsocidtylist(); |
@@ -577,7 +578,7 @@ export default { | @@ -577,7 +578,7 @@ export default { | ||
577 | 578 | ||
578 | that.$axios | 579 | that.$axios |
579 | .post(url, param) | 580 | .post(url, param) |
580 | - .then(function(res) { | 581 | + .then(function (res) { |
581 | console.log(res); | 582 | console.log(res); |
582 | 583 | ||
583 | let obj = { | 584 | let obj = { |
@@ -591,7 +592,7 @@ export default { | @@ -591,7 +592,7 @@ export default { | ||
591 | that.sort_id = res.data[0].id; | 592 | that.sort_id = res.data[0].id; |
592 | that.getsocidtylist(); | 593 | that.getsocidtylist(); |
593 | }) | 594 | }) |
594 | - .catch(function(err) { | 595 | + .catch(function (err) { |
595 | console.log(err); | 596 | console.log(err); |
596 | }); | 597 | }); |
597 | }, | 598 | }, |
@@ -606,10 +607,10 @@ export default { | @@ -606,10 +607,10 @@ export default { | ||
606 | 607 | ||
607 | that.$axios | 608 | that.$axios |
608 | .post(url, param) | 609 | .post(url, param) |
609 | - .then(function(res) { | 610 | + .then(function (res) { |
610 | console.log(res); | 611 | console.log(res); |
611 | that.sortlist = that.sortlist.concat(res.data.social); | 612 | that.sortlist = that.sortlist.concat(res.data.social); |
612 | - that.sortlist.forEach(function(value, index, array) { | 613 | + that.sortlist.forEach(function (value, index, array) { |
613 | value.show = true; | 614 | value.show = true; |
614 | 615 | ||
615 | if (value.description.length > 66) { | 616 | if (value.description.length > 66) { |
@@ -622,7 +623,7 @@ export default { | @@ -622,7 +623,7 @@ export default { | ||
622 | that.this_page = res.data.this_page; | 623 | that.this_page = res.data.this_page; |
623 | that.total_page = res.data.total_page; | 624 | that.total_page = res.data.total_page; |
624 | }) | 625 | }) |
625 | - .catch(function(err) { | 626 | + .catch(function (err) { |
626 | console.log(err); | 627 | console.log(err); |
627 | }); | 628 | }); |
628 | } | 629 | } |
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | <div class="textrightheng"></div> | 49 | <div class="textrightheng"></div> |
50 | </div> | 50 | </div> |
51 | </div>--> | 51 | </div>--> |
52 | - <div class="jianfenimg" style="margin-top:0.3rem"> | 52 | + <div class="jianfenimgkkk" style="margin-top:0.3rem"> |
53 | <img :src="assistanceimg" alt /> | 53 | <img :src="assistanceimg" alt /> |
54 | </div> | 54 | </div> |
55 | </div> | 55 | </div> |
@@ -113,7 +113,7 @@ export default { | @@ -113,7 +113,7 @@ export default { | ||
113 | }; | 113 | }; |
114 | }, | 114 | }, |
115 | created() { | 115 | created() { |
116 | - document.title = "唐元集公众号"; | 116 | + document.title = "唐元集"; |
117 | this.subid = this.$route.query.subid; | 117 | this.subid = this.$route.query.subid; |
118 | this.intended = JSON.parse(localStorage.getItem("intended")) | 118 | this.intended = JSON.parse(localStorage.getItem("intended")) |
119 | console.log(this.intended) | 119 | console.log(this.intended) |
@@ -153,7 +153,7 @@ export default { | @@ -153,7 +153,7 @@ export default { | ||
153 | document.querySelector("#app").style.height = "100%"; | 153 | document.querySelector("#app").style.height = "100%"; |
154 | document.querySelector("#app").style.overflow = "scroll"; | 154 | document.querySelector("#app").style.overflow = "scroll"; |
155 | // document.body.style.backgroundColor = "#5e955d"; | 155 | // document.body.style.backgroundColor = "#5e955d"; |
156 | - document.title = "唐元集公众号"; | 156 | + document.title = "唐元集"; |
157 | this.subid = this.$route.query.subid; | 157 | this.subid = this.$route.query.subid; |
158 | this.getuserinfo(); | 158 | this.getuserinfo(); |
159 | }, | 159 | }, |
@@ -172,7 +172,7 @@ export default { | @@ -172,7 +172,7 @@ export default { | ||
172 | }, | 172 | }, |
173 | 173 | ||
174 | closeimgk() { | 174 | closeimgk() { |
175 | - this.closeimg = false; | 175 | + this.hideshow = false; |
176 | }, | 176 | }, |
177 | getuserinfo() { | 177 | getuserinfo() { |
178 | let that = this; | 178 | let that = this; |
@@ -16,12 +16,12 @@ | @@ -16,12 +16,12 @@ | ||
16 | <div class="introtextbox"> | 16 | <div class="introtextbox"> |
17 | <div class="introtext flex"> | 17 | <div class="introtext flex"> |
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" | 21 | + <span style="font-size: 0.28rem; font-weight: bold" |
22 | >{{ result.name }},</span | 22 | >{{ result.name }},</span |
23 | > | 23 | > |
24 | - <span style="font-size:0.28rem;font-weight:bold">{{ | 24 | + <span style="font-size: 0.28rem; font-weight: bold">{{ |
25 | result.agent_name | 25 | result.agent_name |
26 | }}</span | 26 | }}</span |
27 | >邀您深度了解唐元集! | 27 | >邀您深度了解唐元集! |
@@ -120,7 +120,7 @@ export default { | @@ -120,7 +120,7 @@ export default { | ||
120 | }, | 120 | }, |
121 | created() { | 121 | created() { |
122 | this.baseurl = "http://" + location.host; | 122 | this.baseurl = "http://" + location.host; |
123 | - document.title = "唐元集公众号"; | 123 | + document.title = "唐元集"; |
124 | this.subid = this.$route.query.subid; | 124 | this.subid = this.$route.query.subid; |
125 | let type = localStorage.getItem("type"); | 125 | let type = localStorage.getItem("type"); |
126 | if (type == 1) { | 126 | if (type == 1) { |
@@ -151,20 +151,18 @@ export default { | @@ -151,20 +151,18 @@ export default { | ||
151 | }, | 151 | }, |
152 | getintence() { | 152 | getintence() { |
153 | let that = this; | 153 | let that = this; |
154 | - console.log(99999); | ||
155 | var result = ""; | 154 | var result = ""; |
156 | - | ||
157 | var url = "/api/user/intended"; | 155 | var url = "/api/user/intended"; |
158 | let param = {}; | 156 | let param = {}; |
159 | that.$axios | 157 | that.$axios |
160 | .post(url, param) | 158 | .post(url, param) |
161 | - .then(function(res) { | 159 | + .then(function (res) { |
162 | console.log(res); | 160 | console.log(res); |
163 | result = res.data; | 161 | result = res.data; |
164 | localStorage.setItem("intended", JSON.stringify(res.data.intended)); | 162 | localStorage.setItem("intended", JSON.stringify(res.data.intended)); |
165 | that.intended = JSON.parse(localStorage.getItem("intended")); | 163 | that.intended = JSON.parse(localStorage.getItem("intended")); |
166 | }) | 164 | }) |
167 | - .catch(function(err) { | 165 | + .catch(function (err) { |
168 | console.log(err); | 166 | console.log(err); |
169 | }); | 167 | }); |
170 | }, | 168 | }, |
@@ -179,7 +177,7 @@ export default { | @@ -179,7 +177,7 @@ export default { | ||
179 | 177 | ||
180 | that.$axios | 178 | that.$axios |
181 | .post(url, param) | 179 | .post(url, param) |
182 | - .then(function(res) { | 180 | + .then(function (res) { |
183 | console.log(res, "hahahahaiaioaioaio4"); | 181 | console.log(res, "hahahahaiaioaioaio4"); |
184 | wx.config({ | 182 | wx.config({ |
185 | debug: false, | 183 | debug: false, |
@@ -194,12 +192,12 @@ export default { | @@ -194,12 +192,12 @@ export default { | ||
194 | "updateTimelineShareData" | 192 | "updateTimelineShareData" |
195 | ] | 193 | ] |
196 | }); | 194 | }); |
197 | - wx.ready(function() { | 195 | + wx.ready(function () { |
198 | wx.showOptionMenu(); | 196 | wx.showOptionMenu(); |
199 | }); | 197 | }); |
200 | that.sharetofriend(); | 198 | that.sharetofriend(); |
201 | }) | 199 | }) |
202 | - .catch(function(err) { | 200 | + .catch(function (err) { |
203 | console.log(err); | 201 | console.log(err); |
204 | }); | 202 | }); |
205 | }, | 203 | }, |
@@ -209,11 +207,11 @@ export default { | @@ -209,11 +207,11 @@ export default { | ||
209 | var that = this; | 207 | var that = this; |
210 | localStorage.setItem("type", ""); | 208 | localStorage.setItem("type", ""); |
211 | // 处理验证失败的信息 | 209 | // 处理验证失败的信息 |
212 | - wx.error(function(res) { | 210 | + wx.error(function (res) { |
213 | logUtil.printLog("验证失败返回的信息:", res); | 211 | logUtil.printLog("验证失败返回的信息:", res); |
214 | }); | 212 | }); |
215 | // 处理验证成功的信息 | 213 | // 处理验证成功的信息 |
216 | - wx.ready(function() { | 214 | + wx.ready(function () { |
217 | // alert(window.location.href.split('#')[0]); | 215 | // alert(window.location.href.split('#')[0]); |
218 | // var share_title = that.sharemsg.title; | 216 | // var share_title = that.sharemsg.title; |
219 | // if (share_title.indexOf("${title}") >= 0) { | 217 | // if (share_title.indexOf("${title}") >= 0) { |
@@ -248,13 +246,13 @@ export default { | @@ -248,13 +246,13 @@ export default { | ||
248 | 246 | ||
249 | // 分享图标 | 247 | // 分享图标 |
250 | // desc: that.sharemsg.content, | 248 | // desc: that.sharemsg.content, |
251 | - success: function(res) { | 249 | + success: function (res) { |
252 | // 用户确认分享后执行的回调函数 | 250 | // 用户确认分享后执行的回调函数 |
253 | console.log("suss"); | 251 | console.log("suss"); |
254 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); | 252 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); |
255 | that.showMsg("分享成功!"); | 253 | that.showMsg("分享成功!"); |
256 | }, | 254 | }, |
257 | - cancel: function(res) { | 255 | + cancel: function (res) { |
258 | // 用户取消分享后执行的回调函数 | 256 | // 用户取消分享后执行的回调函数 |
259 | console.log("err"); | 257 | console.log("err"); |
260 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); | 258 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); |
@@ -277,11 +275,11 @@ export default { | @@ -277,11 +275,11 @@ export default { | ||
277 | // 分享图标 | 275 | // 分享图标 |
278 | type: "", // 分享类型,music、video或link,不填默认为link | 276 | type: "", // 分享类型,music、video或link,不填默认为link |
279 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 | 277 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 |
280 | - success: function(res) { | 278 | + success: function (res) { |
281 | // 用户确认分享后执行的回调函数 | 279 | // 用户确认分享后执行的回调函数 |
282 | logUtil.printLog("分享给朋友成功返回的信息为:", res); | 280 | logUtil.printLog("分享给朋友成功返回的信息为:", res); |
283 | }, | 281 | }, |
284 | - cancel: function(res) { | 282 | + cancel: function (res) { |
285 | // 用户取消分享后执行的回调函数 | 283 | // 用户取消分享后执行的回调函数 |
286 | logUtil.printLog("取消分享给朋友返回的信息为:", res); | 284 | logUtil.printLog("取消分享给朋友返回的信息为:", res); |
287 | } | 285 | } |
@@ -289,10 +287,13 @@ export default { | @@ -289,10 +287,13 @@ export default { | ||
289 | }); | 287 | }); |
290 | }, | 288 | }, |
291 | 289 | ||
290 | + | ||
291 | + | ||
292 | + | ||
292 | previewimg(imgarr, index) { | 293 | previewimg(imgarr, index) { |
293 | console.log(imgarr, index); | 294 | console.log(imgarr, index); |
294 | let arr = []; | 295 | let arr = []; |
295 | - imgarr.forEach(function(value, index, array) { | 296 | + imgarr.forEach(function (value, index, array) { |
296 | arr.push(value.image); | 297 | arr.push(value.image); |
297 | }); | 298 | }); |
298 | this.index = index + 1; | 299 | this.index = index + 1; |
@@ -330,12 +331,12 @@ export default { | @@ -330,12 +331,12 @@ export default { | ||
330 | 331 | ||
331 | that.$axios | 332 | that.$axios |
332 | .post(url, param) | 333 | .post(url, param) |
333 | - .then(function(res) { | 334 | + .then(function (res) { |
334 | console.log(res); | 335 | console.log(res); |
335 | that.img_arr = res.data.img_arr; | 336 | that.img_arr = res.data.img_arr; |
336 | console.log(that.result); | 337 | console.log(that.result); |
337 | }) | 338 | }) |
338 | - .catch(function(err) { | 339 | + .catch(function (err) { |
339 | console.log(err); | 340 | console.log(err); |
340 | }); | 341 | }); |
341 | }, | 342 | }, |
@@ -349,13 +350,13 @@ export default { | @@ -349,13 +350,13 @@ export default { | ||
349 | 350 | ||
350 | that.$axios | 351 | that.$axios |
351 | .post(url, param) | 352 | .post(url, param) |
352 | - .then(function(res) { | 353 | + .then(function (res) { |
353 | console.log(res); | 354 | console.log(res); |
354 | 355 | ||
355 | that.result = res.data.result; | 356 | that.result = res.data.result; |
356 | console.log(that.result); | 357 | console.log(that.result); |
357 | }) | 358 | }) |
358 | - .catch(function(err) { | 359 | + .catch(function (err) { |
359 | console.log(err); | 360 | console.log(err); |
360 | }); | 361 | }); |
361 | }, | 362 | }, |
@@ -369,11 +370,11 @@ export default { | @@ -369,11 +370,11 @@ export default { | ||
369 | 370 | ||
370 | that.$axios | 371 | that.$axios |
371 | .post(url, param) | 372 | .post(url, param) |
372 | - .then(function(res) { | 373 | + .then(function (res) { |
373 | console.log(res); | 374 | console.log(res); |
374 | that.company = res.data.company; | 375 | that.company = res.data.company; |
375 | }) | 376 | }) |
376 | - .catch(function(err) { | 377 | + .catch(function (err) { |
377 | console.log(err); | 378 | console.log(err); |
378 | }); | 379 | }); |
379 | } | 380 | } |
@@ -54,7 +54,7 @@ export default { | @@ -54,7 +54,7 @@ export default { | ||
54 | }, | 54 | }, |
55 | created() { | 55 | created() { |
56 | this.sort_id = this.$route.query.sort_id; | 56 | this.sort_id = this.$route.query.sort_id; |
57 | - document.title = "唐元集公众号"; | 57 | + document.title = "唐元集"; |
58 | this.sort_name = this.$route.query.sort_name; | 58 | this.sort_name = this.$route.query.sort_name; |
59 | this.getsucai() | 59 | this.getsucai() |
60 | }, | 60 | }, |
@@ -62,7 +62,7 @@ export default { | @@ -62,7 +62,7 @@ export default { | ||
62 | }, | 62 | }, |
63 | 63 | ||
64 | created() { | 64 | created() { |
65 | - document.title = "唐元集公众号"; | 65 | + document.title = "唐元集"; |
66 | this.subid = this.$route.query.subid; | 66 | this.subid = this.$route.query.subid; |
67 | this.getresult(); | 67 | this.getresult(); |
68 | this.intended = JSON.parse(localStorage.getItem("intended")); | 68 | this.intended = JSON.parse(localStorage.getItem("intended")); |
@@ -13,19 +13,31 @@ | @@ -13,19 +13,31 @@ | ||
13 | <div class="formitem flexone"> | 13 | <div class="formitem flexone"> |
14 | <div class="formitemleft">推荐经销商</div> | 14 | <div class="formitemleft">推荐经销商</div> |
15 | <div class="formitemright"> | 15 | <div class="formitemright"> |
16 | - <input type="text" placeholder="请输入推荐经销商" v-model="agent_name" /> | 16 | + <input |
17 | + type="text" | ||
18 | + placeholder="请输入推荐经销商" | ||
19 | + v-model="agent_name" | ||
20 | + /> | ||
17 | </div> | 21 | </div> |
18 | </div> | 22 | </div> |
19 | <div class="formitem flexone"> | 23 | <div class="formitem flexone"> |
20 | <div class="formitemleft">经销商手机号</div> | 24 | <div class="formitemleft">经销商手机号</div> |
21 | <div class="formitemright formjingxiao"> | 25 | <div class="formitemright formjingxiao"> |
22 | - <input type="number" placeholder="请输入推荐经销商手机号" v-model="mobile" /> | 26 | + <input |
27 | + type="number" | ||
28 | + placeholder="请输入推荐经销商手机号" | ||
29 | + v-model="mobile" | ||
30 | + /> | ||
23 | </div> | 31 | </div> |
24 | </div> | 32 | </div> |
25 | <div class="formitem flexone"> | 33 | <div class="formitem flexone"> |
26 | <div class="formitemleft">姓名</div> | 34 | <div class="formitemleft">姓名</div> |
27 | <div class="formitemright"> | 35 | <div class="formitemright"> |
28 | - <input type="text" placeholder="请输入意向经销商姓名" v-model="name" /> | 36 | + <input |
37 | + type="text" | ||
38 | + placeholder="请输入意向经销商姓名" | ||
39 | + v-model="name" | ||
40 | + /> | ||
29 | </div> | 41 | </div> |
30 | </div> | 42 | </div> |
31 | <div class="formitem flextwo" @click="selectshow(4)"> | 43 | <div class="formitem flextwo" @click="selectshow(4)"> |
@@ -68,7 +80,14 @@ | @@ -68,7 +80,14 @@ | ||
68 | <div class="chuangye"> | 80 | <div class="chuangye"> |
69 | <div class="chaungyetitle">是否有其他创业经历</div> | 81 | <div class="chaungyetitle">是否有其他创业经历</div> |
70 | <div class="chuangyetext"> | 82 | <div class="chuangyetext"> |
71 | - <textarea name id cols="30" rows="10" placeholder="预设内容" v-model="text"></textarea> | 83 | + <textarea |
84 | + name | ||
85 | + id | ||
86 | + cols="30" | ||
87 | + rows="10" | ||
88 | + placeholder="预设内容" | ||
89 | + v-model="text" | ||
90 | + ></textarea> | ||
72 | </div> | 91 | </div> |
73 | </div> | 92 | </div> |
74 | </div> | 93 | </div> |
@@ -135,7 +154,7 @@ export default { | @@ -135,7 +154,7 @@ export default { | ||
135 | }; | 154 | }; |
136 | }, | 155 | }, |
137 | created() { | 156 | created() { |
138 | - document.title = "唐元集公众号"; | 157 | + document.title = "唐元集"; |
139 | this.getappid() | 158 | this.getappid() |
140 | let obj = localStorage.getItem("obj"); | 159 | let obj = localStorage.getItem("obj"); |
141 | console.log(obj) | 160 | console.log(obj) |
@@ -13,13 +13,21 @@ | @@ -13,13 +13,21 @@ | ||
13 | <div class="formitem flexone"> | 13 | <div class="formitem flexone"> |
14 | <div class="formitemleft">推荐经销商</div> | 14 | <div class="formitemleft">推荐经销商</div> |
15 | <div class="formitemright"> | 15 | <div class="formitemright"> |
16 | - <input type="text" placeholder="请输入推荐经销商" v-model="agent_name" /> | 16 | + <input |
17 | + type="text" | ||
18 | + placeholder="请输入推荐经销商" | ||
19 | + v-model="agent_name" | ||
20 | + /> | ||
17 | </div> | 21 | </div> |
18 | </div> | 22 | </div> |
19 | <div class="formitem flexone"> | 23 | <div class="formitem flexone"> |
20 | <div class="formitemleft">经销商手机号</div> | 24 | <div class="formitemleft">经销商手机号</div> |
21 | <div class="formitemright formjingxiao"> | 25 | <div class="formitemright formjingxiao"> |
22 | - <input type="number" placeholder="请输入推荐经销商手机号" v-model="mobile" /> | 26 | + <input |
27 | + type="number" | ||
28 | + placeholder="请输入推荐经销商手机号" | ||
29 | + v-model="mobile" | ||
30 | + /> | ||
23 | </div> | 31 | </div> |
24 | </div> | 32 | </div> |
25 | <div class="formitem flexone"> | 33 | <div class="formitem flexone"> |
@@ -92,7 +100,14 @@ | @@ -92,7 +100,14 @@ | ||
92 | <div class="chuangye"> | 100 | <div class="chuangye"> |
93 | <div class="chaungyetitle">顾客是否尝试过其他瘦身方法</div> | 101 | <div class="chaungyetitle">顾客是否尝试过其他瘦身方法</div> |
94 | <div class="chuangyetext"> | 102 | <div class="chuangyetext"> |
95 | - <textarea name id cols="30" rows="10" placeholder="预设内容" v-model="experience"></textarea> | 103 | + <textarea |
104 | + name | ||
105 | + id | ||
106 | + cols="30" | ||
107 | + rows="10" | ||
108 | + placeholder="预设内容" | ||
109 | + v-model="experience" | ||
110 | + ></textarea> | ||
96 | </div> | 111 | </div> |
97 | </div> | 112 | </div> |
98 | </div> | 113 | </div> |
@@ -169,7 +184,7 @@ export default { | @@ -169,7 +184,7 @@ export default { | ||
169 | }, | 184 | }, |
170 | created() { | 185 | created() { |
171 | let that = this; | 186 | let that = this; |
172 | - document.title = "唐元集公众号"; | 187 | + document.title = "唐元集"; |
173 | this.getappid() | 188 | this.getappid() |
174 | let zhiyeobj = localStorage.getItem("zhiyeobj"); | 189 | let zhiyeobj = localStorage.getItem("zhiyeobj"); |
175 | console.log(zhiyeobj) | 190 | console.log(zhiyeobj) |
@@ -79,7 +79,7 @@ export default { | @@ -79,7 +79,7 @@ export default { | ||
79 | }, | 79 | }, |
80 | created() { | 80 | created() { |
81 | document.querySelector("#app").style.overflow = "scroll"; | 81 | document.querySelector("#app").style.overflow = "scroll"; |
82 | - document.title = "唐元集公众号"; | 82 | + document.title = "唐元集"; |
83 | this.subid = this.$route.query.subid; | 83 | this.subid = this.$route.query.subid; |
84 | this.getresult(); | 84 | this.getresult(); |
85 | this.intended = JSON.parse(localStorage.getItem("intended")); | 85 | this.intended = JSON.parse(localStorage.getItem("intended")); |
@@ -127,7 +127,7 @@ export default { | @@ -127,7 +127,7 @@ export default { | ||
127 | } | 127 | } |
128 | }, | 128 | }, |
129 | created() { | 129 | created() { |
130 | - document.title = '唐元集公众号' | 130 | + document.title = '唐元集' |
131 | this.getquestion(); | 131 | this.getquestion(); |
132 | // 获取客服 | 132 | // 获取客服 |
133 | this.getphone() | 133 | this.getphone() |
@@ -35,7 +35,7 @@ export default { | @@ -35,7 +35,7 @@ export default { | ||
35 | }; | 35 | }; |
36 | }, | 36 | }, |
37 | created() { | 37 | created() { |
38 | - document.title = "唐元集公众号"; | 38 | + document.title = "唐元集"; |
39 | this.subid = this.$route.query.subid; | 39 | this.subid = this.$route.query.subid; |
40 | 40 | ||
41 | this.getyouhui(); | 41 | this.getyouhui(); |
@@ -63,7 +63,31 @@ | @@ -63,7 +63,31 @@ | ||
63 | <img src="../../../assets/ding.png" alt /> | 63 | <img src="../../../assets/ding.png" alt /> |
64 | </div> | 64 | </div> |
65 | </div> | 65 | </div> |
66 | - <div class="societytext">{{ item.description }}</div> | 66 | + <div |
67 | + class="societytext" | ||
68 | + :class="item.show == true ? 'desyincang' : ''" | ||
69 | + > | ||
70 | + {{ item.description }} | ||
71 | + </div> | ||
72 | + <div | ||
73 | + class="kanmore flexthree" | ||
74 | + v-if="item.more == true" | ||
75 | + @click="seemore(item, index)" | ||
76 | + > | ||
77 | + {{ item.show == true ? "查看更多" : "收起" }} | ||
78 | + <img | ||
79 | + src="../../../assets/jianotu.png" | ||
80 | + alt | ||
81 | + class="xiajiantou" | ||
82 | + v-if="item.show == true" | ||
83 | + /> | ||
84 | + <img | ||
85 | + src="../../../assets/jianotu.png" | ||
86 | + alt | ||
87 | + class="shangjiantou" | ||
88 | + v-else | ||
89 | + /> | ||
90 | + </div> | ||
67 | <div class="societyimg flexone" v-if="item.images.length != 0"> | 91 | <div class="societyimg flexone" v-if="item.images.length != 0"> |
68 | <div | 92 | <div |
69 | class="societyimgitem" | 93 | class="societyimgitem" |
@@ -121,6 +145,11 @@ | @@ -121,6 +145,11 @@ | ||
121 | 145 | ||
122 | <span class="number">{{ item.favorite_count }}</span> | 146 | <span class="number">{{ item.favorite_count }}</span> |
123 | </div> | 147 | </div> |
148 | + <div class="flexone dianitem" @click="messageshow(index, item)"> | ||
149 | + <img src="../../../assets/xiaoxi.png" alt class="dianzanimg" /> | ||
150 | + | ||
151 | + <span class="number">{{ item.comment_count }}</span> | ||
152 | + </div> | ||
124 | <div class="flexone dianitem" @click="copytext"> | 153 | <div class="flexone dianitem" @click="copytext"> |
125 | <img src="../../../assets/edit.png" alt class="dianzanimg" /> | 154 | <img src="../../../assets/edit.png" alt class="dianzanimg" /> |
126 | 155 | ||
@@ -133,14 +162,14 @@ | @@ -133,14 +162,14 @@ | ||
133 | > | 162 | > |
134 | <span class="number" v-else @click="fuzhi(item)">复制</span> | 163 | <span class="number" v-else @click="fuzhi(item)">复制</span> |
135 | </div> | 164 | </div> |
136 | - <div class="flexone dianitem" @click="save(item)"> | 165 | + <!-- <div class="flexone dianitem" @click="save(item)"> |
137 | <img | 166 | <img |
138 | src="../../../assets/download.png" | 167 | src="../../../assets/download.png" |
139 | alt | 168 | alt |
140 | class="dianzanimg" | 169 | class="dianzanimg" |
141 | /> | 170 | /> |
142 | <span class="number">一键保存</span> | 171 | <span class="number">一键保存</span> |
143 | - </div> | 172 | + </div> --> |
144 | <!-- | 173 | <!-- |
145 | <div class="flexone dianitem" @click="del(item)"> | 174 | <div class="flexone dianitem" @click="del(item)"> |
146 | <img src="../../../assets/delim.png" alt class="dianzanimg" /> | 175 | <img src="../../../assets/delim.png" alt class="dianzanimg" /> |
@@ -251,10 +280,18 @@ export default { | @@ -251,10 +280,18 @@ export default { | ||
251 | delfavorite_id: "" | 280 | delfavorite_id: "" |
252 | }; | 281 | }; |
253 | }, | 282 | }, |
283 | + mounted(){ | ||
284 | + console.log('3489438943989') | ||
285 | + | ||
286 | + }, | ||
287 | + | ||
288 | + | ||
254 | created() { | 289 | created() { |
255 | - document.title = "唐元集公众号"; | ||
256 | - console.log(localStorage.getItem("selnav")); | 290 | + console.log('created') |
291 | + document.title = "唐元集"; | ||
292 | + console.log(localStorage.getItem("selnav"),'3489834934809'); | ||
257 | let selnav = localStorage.getItem("selnav"); | 293 | let selnav = localStorage.getItem("selnav"); |
294 | + console.log('当前的selnav',selnav) | ||
258 | this.page = 1; | 295 | this.page = 1; |
259 | this.list = []; | 296 | this.list = []; |
260 | this.activitylist = []; | 297 | this.activitylist = []; |
@@ -270,6 +307,18 @@ export default { | @@ -270,6 +307,18 @@ export default { | ||
270 | this.mycollecthuodong(); | 307 | this.mycollecthuodong(); |
271 | } | 308 | } |
272 | }, | 309 | }, |
310 | + watch:{ | ||
311 | + $route:{ | ||
312 | + handler(val,oldval){ | ||
313 | + | ||
314 | + console.log('rhthwejktjhwerthjwerkj') | ||
315 | + console.log(val);//新路由信息 | ||
316 | + console.log(oldval);//老路由信息 | ||
317 | + }, | ||
318 | + // 深度观察监听 | ||
319 | + deep: true | ||
320 | + } | ||
321 | + }, | ||
273 | methods: { | 322 | methods: { |
274 | // 进入活动中心详情 | 323 | // 进入活动中心详情 |
275 | toactivity(id) { | 324 | toactivity(id) { |
@@ -283,19 +332,29 @@ export default { | @@ -283,19 +332,29 @@ export default { | ||
283 | // 进入直播详情 | 332 | // 进入直播详情 |
284 | // 录播详情 | 333 | // 录播详情 |
285 | coursedetail(item) { | 334 | coursedetail(item) { |
286 | - this.$router.push({ | ||
287 | - path: "/lubodetail", | ||
288 | - query: { | ||
289 | - id: item.object_id | ||
290 | - } | ||
291 | - }); | 335 | + console.log(item.type) |
336 | + if (item.type == 2) { | ||
337 | + this.$router.push({ | ||
338 | + path: "/lubodetail", | ||
339 | + query: { | ||
340 | + id: item.object_id | ||
341 | + } | ||
342 | + }); | ||
343 | + } else { | ||
344 | + this.$router.push({ | ||
345 | + path: "/yingyangdetail", | ||
346 | + query: { id: item.object_id } | ||
347 | + }); | ||
348 | + | ||
349 | + } | ||
350 | + | ||
292 | }, | 351 | }, |
293 | 352 | ||
294 | // 删除帖子 | 353 | // 删除帖子 |
295 | del(item) { | 354 | del(item) { |
296 | this.social_id = item.id; | 355 | this.social_id = item.id; |
297 | Dialog.confirm({ | 356 | Dialog.confirm({ |
298 | - title: "是否删除帖子" | 357 | + title: "是否撤销帖子" |
299 | }) | 358 | }) |
300 | .then(res => { | 359 | .then(res => { |
301 | console.log(3489348); | 360 | console.log(3489348); |
@@ -307,14 +366,14 @@ export default { | @@ -307,14 +366,14 @@ export default { | ||
307 | 366 | ||
308 | that.$axios | 367 | that.$axios |
309 | .post(url, param) | 368 | .post(url, param) |
310 | - .then(function(res) { | 369 | + .then(function (res) { |
311 | console.log(res); | 370 | console.log(res); |
312 | Toast("删除成功"); | 371 | Toast("删除成功"); |
313 | that.page = 1; | 372 | that.page = 1; |
314 | that.list = []; | 373 | that.list = []; |
315 | that.getsociety(); | 374 | that.getsociety(); |
316 | }) | 375 | }) |
317 | - .catch(function(err) { | 376 | + .catch(function (err) { |
318 | console.log(err); | 377 | console.log(err); |
319 | }); | 378 | }); |
320 | // on confirm | 379 | // on confirm |
@@ -333,9 +392,9 @@ export default { | @@ -333,9 +392,9 @@ export default { | ||
333 | }; | 392 | }; |
334 | that.$axios | 393 | that.$axios |
335 | .post(url, param) | 394 | .post(url, param) |
336 | - .then(function(res) { | 395 | + .then(function (res) { |
337 | console.log(res); | 396 | console.log(res); |
338 | - that.list.forEach(function(value, index, array) { | 397 | + that.list.forEach(function (value, index, array) { |
339 | if (that.delfavorite_id == value.id) { | 398 | if (that.delfavorite_id == value.id) { |
340 | that.list.splice(index, 1); | 399 | that.list.splice(index, 1); |
341 | that.list = that.list; | 400 | that.list = that.list; |
@@ -343,7 +402,7 @@ export default { | @@ -343,7 +402,7 @@ export default { | ||
343 | } | 402 | } |
344 | }); | 403 | }); |
345 | }) | 404 | }) |
346 | - .catch(function(err) { | 405 | + .catch(function (err) { |
347 | console.log(err); | 406 | console.log(err); |
348 | }); | 407 | }); |
349 | }, | 408 | }, |
@@ -357,14 +416,24 @@ export default { | @@ -357,14 +416,24 @@ export default { | ||
357 | 416 | ||
358 | that.$axios | 417 | that.$axios |
359 | .post(url, param) | 418 | .post(url, param) |
360 | - .then(function(res) { | 419 | + .then(function (res) { |
361 | console.log(res); | 420 | console.log(res); |
362 | that.list = that.list.concat(res.data.list); | 421 | that.list = that.list.concat(res.data.list); |
363 | that.this_page = res.data.this_page; | 422 | that.this_page = res.data.this_page; |
364 | that.total_page = res.data.total_page; | 423 | that.total_page = res.data.total_page; |
365 | - console.log(that.list); | 424 | + that.list.forEach(function (value, index, array) { |
425 | + value.show = true; | ||
426 | + | ||
427 | + if (value.description.length > 66) { | ||
428 | + value.more = true; | ||
429 | + } else { | ||
430 | + value.more = false; | ||
431 | + } | ||
432 | + }) | ||
433 | + that.list = that.list; | ||
434 | + that.$forceUpdate() | ||
366 | }) | 435 | }) |
367 | - .catch(function(err) { | 436 | + .catch(function (err) { |
368 | console.log(err); | 437 | console.log(err); |
369 | }); | 438 | }); |
370 | }, | 439 | }, |
@@ -378,11 +447,13 @@ export default { | @@ -378,11 +447,13 @@ export default { | ||
378 | 447 | ||
379 | that.$axios | 448 | that.$axios |
380 | .post(url, param) | 449 | .post(url, param) |
381 | - .then(function(res) { | 450 | + .then(function (res) { |
382 | console.log(res); | 451 | console.log(res); |
452 | + that.this_page = res.data.this_page; | ||
453 | + that.total_page = res.data.total_page; | ||
383 | that.courselist = that.courselist.concat(res.data.list); | 454 | that.courselist = that.courselist.concat(res.data.list); |
384 | }) | 455 | }) |
385 | - .catch(function(err) { | 456 | + .catch(function (err) { |
386 | console.log(err); | 457 | console.log(err); |
387 | }); | 458 | }); |
388 | }, | 459 | }, |
@@ -396,11 +467,13 @@ export default { | @@ -396,11 +467,13 @@ export default { | ||
396 | 467 | ||
397 | that.$axios | 468 | that.$axios |
398 | .post(url, param) | 469 | .post(url, param) |
399 | - .then(function(res) { | 470 | + .then(function (res) { |
400 | console.log(res); | 471 | console.log(res); |
472 | + that.this_page = res.data.this_page; | ||
473 | + that.total_page = res.data.total_page; | ||
401 | that.activitylist = that.activitylist.concat(res.data.list); | 474 | that.activitylist = that.activitylist.concat(res.data.list); |
402 | }) | 475 | }) |
403 | - .catch(function(err) { | 476 | + .catch(function (err) { |
404 | console.log(err); | 477 | console.log(err); |
405 | }); | 478 | }); |
406 | }, | 479 | }, |
@@ -410,6 +483,7 @@ export default { | @@ -410,6 +483,7 @@ export default { | ||
410 | selecttab(e) { | 483 | selecttab(e) { |
411 | this.selnav = e.currentTarget.dataset.id; | 484 | this.selnav = e.currentTarget.dataset.id; |
412 | localStorage.setItem("selnav", this.selnav); | 485 | localStorage.setItem("selnav", this.selnav); |
486 | + console.log('selnav',localStorage.getItem("selnav")) | ||
413 | this.page = 1; | 487 | this.page = 1; |
414 | this.list = []; | 488 | this.list = []; |
415 | this.courselist = []; | 489 | this.courselist = []; |
@@ -435,7 +509,7 @@ export default { | @@ -435,7 +509,7 @@ export default { | ||
435 | this.images = item.images; | 509 | this.images = item.images; |
436 | if (this.images.length == 0) { | 510 | if (this.images.length == 0) { |
437 | this.nophoto = true; | 511 | this.nophoto = true; |
438 | - setTimeout(function() { | 512 | + setTimeout(function () { |
439 | that.nophoto = false; | 513 | that.nophoto = false; |
440 | }, 1500); | 514 | }, 1500); |
441 | } else { | 515 | } else { |
@@ -515,7 +589,7 @@ export default { | @@ -515,7 +589,7 @@ export default { | ||
515 | 589 | ||
516 | that.$axios | 590 | that.$axios |
517 | .post(url, param) | 591 | .post(url, param) |
518 | - .then(function(res) { | 592 | + .then(function (res) { |
519 | console.log(res); | 593 | console.log(res); |
520 | if (item.is_favorite == 0) { | 594 | if (item.is_favorite == 0) { |
521 | item.is_favorite = 1; | 595 | item.is_favorite = 1; |
@@ -530,10 +604,11 @@ export default { | @@ -530,10 +604,11 @@ export default { | ||
530 | that.list[index].favorite_count = | 604 | that.list[index].favorite_count = |
531 | that.list[index].favorite_count - 1; | 605 | that.list[index].favorite_count - 1; |
532 | } | 606 | } |
607 | + that.list.splice(index, 1) | ||
533 | that.list = that.list; | 608 | that.list = that.list; |
534 | that.$forceUpdate(); | 609 | that.$forceUpdate(); |
535 | }) | 610 | }) |
536 | - .catch(function(err) { | 611 | + .catch(function (err) { |
537 | console.log(err); | 612 | console.log(err); |
538 | }); | 613 | }); |
539 | }, | 614 | }, |
@@ -558,7 +633,7 @@ export default { | @@ -558,7 +633,7 @@ export default { | ||
558 | 633 | ||
559 | that.$axios | 634 | that.$axios |
560 | .post(url, param) | 635 | .post(url, param) |
561 | - .then(function(res) { | 636 | + .then(function (res) { |
562 | console.log(res); | 637 | console.log(res); |
563 | if (item.is_good == 0) { | 638 | if (item.is_good == 0) { |
564 | item.is_good = 1; | 639 | item.is_good = 1; |
@@ -574,18 +649,35 @@ export default { | @@ -574,18 +649,35 @@ export default { | ||
574 | that.list = that.list; | 649 | that.list = that.list; |
575 | that.$forceUpdate(); | 650 | that.$forceUpdate(); |
576 | }) | 651 | }) |
577 | - .catch(function(err) { | 652 | + .catch(function (err) { |
578 | console.log(err); | 653 | console.log(err); |
579 | }); | 654 | }); |
580 | }, | 655 | }, |
581 | 656 | ||
657 | + // 查看更多 | ||
658 | + seemore(item, index) { | ||
659 | + console.log(9999); | ||
660 | + | ||
661 | + let that = this; | ||
662 | + that.list.forEach(function (value, index, array) { | ||
663 | + console.log(value); | ||
664 | + if (value.id == item.id) { | ||
665 | + if (value.more == true) { | ||
666 | + value.show = !value.show; | ||
667 | + } | ||
668 | + } | ||
669 | + }); | ||
670 | + that.sortlistlist = that.list; | ||
671 | + that.$forceUpdate(); | ||
672 | + }, | ||
673 | + | ||
582 | // 复制文本 | 674 | // 复制文本 |
583 | - copytext() {}, | 675 | + copytext() { }, |
584 | // 头部切换 | 676 | // 头部切换 |
585 | selectnav(id, index) { | 677 | selectnav(id, index) { |
586 | let that = this; | 678 | let that = this; |
587 | - | ||
588 | this.selnav = index; | 679 | this.selnav = index; |
680 | + localStorage.setItem("selnav",this.selnav) | ||
589 | this.sort_id = id; | 681 | this.sort_id = id; |
590 | that.page = 1; | 682 | that.page = 1; |
591 | that.list = []; | 683 | that.list = []; |
@@ -597,4 +689,33 @@ export default { | @@ -597,4 +689,33 @@ export default { | ||
597 | 689 | ||
598 | <style scoped> | 690 | <style scoped> |
599 | @import "../../../style/usercenter.css"; | 691 | @import "../../../style/usercenter.css"; |
692 | +.kanmore { | ||
693 | + width: 100%; | ||
694 | + color: #333; | ||
695 | + font-size: 0.28rem; | ||
696 | + margin: 0.32rem 0; | ||
697 | +} | ||
698 | +.jiantou { | ||
699 | + width: 0.2rem; | ||
700 | + height: 0.25rem; | ||
701 | + margin-left: 0.16rem; | ||
702 | +} | ||
703 | +.xiajiantou { | ||
704 | + width: 0.2rem; | ||
705 | + height: 0.25rem; | ||
706 | + transform: rotate(90deg); | ||
707 | + margin-left: 0.16rem; | ||
708 | +} | ||
709 | +.shangjiantou { | ||
710 | + width: 0.2rem; | ||
711 | + height: 0.25rem; | ||
712 | + transform: rotate(-90deg); | ||
713 | + margin-left: 0.16rem; | ||
714 | +} | ||
715 | +.desyincang { | ||
716 | + display: -webkit-box; | ||
717 | + -webkit-box-orient: vertical; | ||
718 | + -webkit-line-clamp: 3; | ||
719 | + overflow: hidden; | ||
720 | +} | ||
600 | </style> | 721 | </style> |
@@ -15,7 +15,12 @@ | @@ -15,7 +15,12 @@ | ||
15 | :class="selcourse == 1 ? 'courseactive' : ''" | 15 | :class="selcourse == 1 ? 'courseactive' : ''" |
16 | @click="chosecourse(1)" | 16 | @click="chosecourse(1)" |
17 | > | 17 | > |
18 | - <img src="../../../assets/zhibocourse.png" alt class="zhiboimg" v-if="selcourse == 1" /> | 18 | + <img |
19 | + src="../../../assets/zhibocourse.png" | ||
20 | + alt | ||
21 | + class="zhiboimg" | ||
22 | + v-if="selcourse == 1" | ||
23 | + /> | ||
19 | <img src="../../../assets/zhibogray.png" alt class="zhiboimg" v-else /> | 24 | <img src="../../../assets/zhibogray.png" alt class="zhiboimg" v-else /> |
20 | 25 | ||
21 | <div class="zhiboname">直播课</div> | 26 | <div class="zhiboname">直播课</div> |
@@ -26,29 +31,35 @@ | @@ -26,29 +31,35 @@ | ||
26 | :data-id="2" | 31 | :data-id="2" |
27 | @click="chosecourse(2)" | 32 | @click="chosecourse(2)" |
28 | > | 33 | > |
29 | - <img src="../../../assets/lubowhite.png" alt class="zhiboimg" v-if="selcourse == 2" /> | 34 | + <img |
35 | + src="../../../assets/lubowhite.png" | ||
36 | + alt | ||
37 | + class="zhiboimg" | ||
38 | + v-if="selcourse == 2" | ||
39 | + /> | ||
30 | <img src="../../../assets/lubo.png" alt class="zhiboimg" v-else /> | 40 | <img src="../../../assets/lubo.png" alt class="zhiboimg" v-else /> |
31 | <div class="zhiboname">录播课</div> | 41 | <div class="zhiboname">录播课</div> |
32 | </div> | 42 | </div> |
33 | </div> | 43 | </div> |
34 | <!-- 直播课程 --> | 44 | <!-- 直播课程 --> |
45 | + <!-- --> | ||
35 | <div class="zhibotextbox" v-if="selcourse == 1"> | 46 | <div class="zhibotextbox" v-if="selcourse == 1"> |
36 | <div class="coursetitle flexone"> | 47 | <div class="coursetitle flexone"> |
37 | - <div class="coursename">课程分类</div> | 48 | + <div class="coursenamek">课程分类</div> |
38 | <div class="coursenameright" @click="showcoursekind"> | 49 | <div class="coursenameright" @click="showcoursekind"> |
39 | - {{coursekind}} | 50 | + {{ coursekind }} |
40 | <!-- <input type="text" placeholder="开课时间" /> --> | 51 | <!-- <input type="text" placeholder="开课时间" /> --> |
41 | </div> | 52 | </div> |
42 | </div> | 53 | </div> |
43 | <div class="coursetitle flexone"> | 54 | <div class="coursetitle flexone"> |
44 | - <div class="coursename">开课时间</div> | 55 | + <div class="coursenamek">开课时间</div> |
45 | <div class="coursenameright" @click="showdate"> | 56 | <div class="coursenameright" @click="showdate"> |
46 | {{ start_time }} | 57 | {{ start_time }} |
47 | <!-- <input type="text" placeholder="开课时间" /> --> | 58 | <!-- <input type="text" placeholder="开课时间" /> --> |
48 | </div> | 59 | </div> |
49 | </div> | 60 | </div> |
50 | <div class="coursetitle flexone"> | 61 | <div class="coursetitle flexone"> |
51 | - <div class="coursename"> | 62 | + <div class="coursenamek"> |
52 | 直播标题 | 63 | 直播标题 |
53 | <img src="../../../assets/xuehua.png" alt class="xuehuaimg" /> | 64 | <img src="../../../assets/xuehua.png" alt class="xuehuaimg" /> |
54 | </div> | 65 | </div> |
@@ -59,11 +70,18 @@ | @@ -59,11 +70,18 @@ | ||
59 | <div class="zhibocontent"> | 70 | <div class="zhibocontent"> |
60 | <div class="flexone zhibojianjie">直播简介</div> | 71 | <div class="flexone zhibojianjie">直播简介</div> |
61 | <div class="zhibotextbox"> | 72 | <div class="zhibotextbox"> |
62 | - <textarea name id cols="30" rows="10" placeholder="预设内容" v-model="description"></textarea> | 73 | + <textarea |
74 | + name | ||
75 | + id | ||
76 | + cols="30" | ||
77 | + rows="10" | ||
78 | + placeholder="预设内容" | ||
79 | + v-model="description" | ||
80 | + ></textarea> | ||
63 | </div> | 81 | </div> |
64 | </div> | 82 | </div> |
65 | <div class="coursetitle flexone"> | 83 | <div class="coursetitle flexone"> |
66 | - <div class="coursename"> | 84 | + <div class="coursenamek"> |
67 | 直播封面图 | 85 | 直播封面图 |
68 | <img src="../../../assets/xuehua.png" alt class="xuehuaimg" /> | 86 | <img src="../../../assets/xuehua.png" alt class="xuehuaimg" /> |
69 | <!-- <div class="xuehuaimg"> | 87 | <!-- <div class="xuehuaimg"> |
@@ -92,14 +110,13 @@ | @@ -92,14 +110,13 @@ | ||
92 | 110 | ||
93 | <div class="zhibotextbox" v-if="selcourse == 2"> | 111 | <div class="zhibotextbox" v-if="selcourse == 2"> |
94 | <div class="coursetitle flexone"> | 112 | <div class="coursetitle flexone"> |
95 | - <div class="coursename">课程分类</div> | 113 | + <div class="coursenamek">课程分类</div> |
96 | <div class="coursenameright" @click="showcoursekind"> | 114 | <div class="coursenameright" @click="showcoursekind"> |
97 | - {{coursekind}} | ||
98 | - <!-- <input type="text" placeholder="开课时间" /> --> | 115 | + {{ coursekind }} |
99 | </div> | 116 | </div> |
100 | </div> | 117 | </div> |
101 | <div class="coursetitle flexone"> | 118 | <div class="coursetitle flexone"> |
102 | - <div class="coursename"> | 119 | + <div class="coursenamek"> |
103 | 录播时间标题 | 120 | 录播时间标题 |
104 | <img src="../../../assets/xuehua.png" alt class="xuehuaimg" /> | 121 | <img src="../../../assets/xuehua.png" alt class="xuehuaimg" /> |
105 | </div> | 122 | </div> |
@@ -111,12 +128,19 @@ | @@ -111,12 +128,19 @@ | ||
111 | <div class="zhibocontent"> | 128 | <div class="zhibocontent"> |
112 | <div class="flexone zhibojianjie">录播简介</div> | 129 | <div class="flexone zhibojianjie">录播简介</div> |
113 | <div class="zhibotextbox"> | 130 | <div class="zhibotextbox"> |
114 | - <textarea name id cols="30" rows="10" placeholder="预设内容" v-model="description"></textarea> | 131 | + <textarea |
132 | + name | ||
133 | + id | ||
134 | + cols="30" | ||
135 | + rows="10" | ||
136 | + placeholder="预设内容" | ||
137 | + v-model="description" | ||
138 | + ></textarea> | ||
115 | </div> | 139 | </div> |
116 | </div> | 140 | </div> |
117 | 141 | ||
118 | <div class="coursetitle flexone"> | 142 | <div class="coursetitle flexone"> |
119 | - <div class="coursename"> | 143 | + <div class="coursenamek"> |
120 | 录播封面图 | 144 | 录播封面图 |
121 | <img src="../../../assets/xuehua.png" alt class="xuehuaimg" /> | 145 | <img src="../../../assets/xuehua.png" alt class="xuehuaimg" /> |
122 | </div> | 146 | </div> |
@@ -155,7 +179,9 @@ | @@ -155,7 +179,9 @@ | ||
155 | /> | 179 | /> |
156 | <van-loading type="spinner" color="#1989fa" v-if="cardzheng" /> | 180 | <van-loading type="spinner" color="#1989fa" v-if="cardzheng" /> |
157 | <!-- 开始录制 --> | 181 | <!-- 开始录制 --> |
158 | - <div class="kaishilu" v-if="selcourse == 2" @click="opencourse">开始录制</div> | 182 | + <div class="kaishilu" v-if="selcourse == 2" @click="opencourse"> |
183 | + 开始录制 | ||
184 | + </div> | ||
159 | <div class="kaishilu" v-else @click="opencourse">开启</div> | 185 | <div class="kaishilu" v-else @click="opencourse">开启</div> |
160 | </div> | 186 | </div> |
161 | </template> | 187 | </template> |
@@ -193,7 +219,7 @@ export default { | @@ -193,7 +219,7 @@ export default { | ||
193 | }; | 219 | }; |
194 | }, | 220 | }, |
195 | created() { | 221 | created() { |
196 | - document.title = "唐元集公众号"; | 222 | + document.title = "唐元集"; |
197 | this.getcourselist() | 223 | this.getcourselist() |
198 | }, | 224 | }, |
199 | methods: { | 225 | methods: { |
@@ -407,4 +433,8 @@ export default { | @@ -407,4 +433,8 @@ export default { | ||
407 | transform: translate(-50%, -50%); | 433 | transform: translate(-50%, -50%); |
408 | z-index: 99; | 434 | z-index: 99; |
409 | } | 435 | } |
436 | +.coursenamek { | ||
437 | + color: #02170b; | ||
438 | + font-size: 0.28rem; | ||
439 | +} | ||
410 | </style> | 440 | </style> |
@@ -54,7 +54,7 @@ export default { | @@ -54,7 +54,7 @@ export default { | ||
54 | }, | 54 | }, |
55 | created() { | 55 | created() { |
56 | this.sort_id = this.$route.query.sort_id; | 56 | this.sort_id = this.$route.query.sort_id; |
57 | - document.title = "唐元集公众号"; | 57 | + document.title = "唐元集"; |
58 | this.sort_name = this.$route.query.sort_name; | 58 | this.sort_name = this.$route.query.sort_name; |
59 | this.getsucai() | 59 | this.getsucai() |
60 | }, | 60 | }, |
@@ -37,7 +37,7 @@ export default { | @@ -37,7 +37,7 @@ export default { | ||
37 | } | 37 | } |
38 | }, | 38 | }, |
39 | created() { | 39 | created() { |
40 | - document.title = '唐元集公众号' | 40 | + document.title = '唐元集' |
41 | this.id = this.$route.query.id; | 41 | this.id = this.$route.query.id; |
42 | this.getvideodetail() | 42 | this.getvideodetail() |
43 | }, | 43 | }, |
@@ -14,12 +14,12 @@ | @@ -14,12 +14,12 @@ | ||
14 | <div class="introtextbox"> | 14 | <div class="introtextbox"> |
15 | <div class="introtext flex"> | 15 | <div class="introtext flex"> |
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" | 19 | + <span style="font-size: 0.28rem; font-weight: bold" |
20 | >{{ result.name }},</span | 20 | >{{ result.name }},</span |
21 | > | 21 | > |
22 | - <span style="font-size:0.28rem;font-weight:bold">{{ | 22 | + <span style="font-size: 0.28rem; font-weight: bold">{{ |
23 | result.agent_name | 23 | result.agent_name |
24 | }}</span> | 24 | }}</span> |
25 | 邀您深度了解唐元集! | 25 | 邀您深度了解唐元集! |
@@ -115,7 +115,7 @@ export default { | @@ -115,7 +115,7 @@ export default { | ||
115 | if (type == 1) { | 115 | if (type == 1) { |
116 | this.showshare = true; | 116 | this.showshare = true; |
117 | } | 117 | } |
118 | - document.title = "唐元集公众号"; | 118 | + document.title = "唐元集"; |
119 | this.subid = this.$route.query.subid; | 119 | this.subid = this.$route.query.subid; |
120 | this.getcompanyintro(); | 120 | this.getcompanyintro(); |
121 | this.getresult(); | 121 | this.getresult(); |
@@ -138,13 +138,13 @@ export default { | @@ -138,13 +138,13 @@ export default { | ||
138 | let param = {}; | 138 | let param = {}; |
139 | that.$axios | 139 | that.$axios |
140 | .post(url, param) | 140 | .post(url, param) |
141 | - .then(function(res) { | 141 | + .then(function (res) { |
142 | console.log(res); | 142 | console.log(res); |
143 | result = res.data; | 143 | result = res.data; |
144 | localStorage.setItem("intended", JSON.stringify(res.data.intended)); | 144 | localStorage.setItem("intended", JSON.stringify(res.data.intended)); |
145 | that.intended = JSON.parse(localStorage.getItem("intended")); | 145 | that.intended = JSON.parse(localStorage.getItem("intended")); |
146 | }) | 146 | }) |
147 | - .catch(function(err) { | 147 | + .catch(function (err) { |
148 | console.log(err); | 148 | console.log(err); |
149 | }); | 149 | }); |
150 | }, | 150 | }, |
@@ -159,7 +159,7 @@ export default { | @@ -159,7 +159,7 @@ export default { | ||
159 | 159 | ||
160 | that.$axios | 160 | that.$axios |
161 | .post(url, param) | 161 | .post(url, param) |
162 | - .then(function(res) { | 162 | + .then(function (res) { |
163 | console.log(res, "hahahahaiaioaioaio4"); | 163 | console.log(res, "hahahahaiaioaioaio4"); |
164 | wx.config({ | 164 | wx.config({ |
165 | debug: false, | 165 | debug: false, |
@@ -174,12 +174,12 @@ export default { | @@ -174,12 +174,12 @@ export default { | ||
174 | "updateTimelineShareData" | 174 | "updateTimelineShareData" |
175 | ] | 175 | ] |
176 | }); | 176 | }); |
177 | - wx.ready(function() { | 177 | + wx.ready(function () { |
178 | wx.showOptionMenu(); | 178 | wx.showOptionMenu(); |
179 | }); | 179 | }); |
180 | that.sharetofriend(); | 180 | that.sharetofriend(); |
181 | }) | 181 | }) |
182 | - .catch(function(err) { | 182 | + .catch(function (err) { |
183 | console.log(err); | 183 | console.log(err); |
184 | }); | 184 | }); |
185 | }, | 185 | }, |
@@ -189,11 +189,11 @@ export default { | @@ -189,11 +189,11 @@ export default { | ||
189 | var that = this; | 189 | var that = this; |
190 | localStorage.setItem("type", ""); | 190 | localStorage.setItem("type", ""); |
191 | // 处理验证失败的信息 | 191 | // 处理验证失败的信息 |
192 | - wx.error(function(res) { | 192 | + wx.error(function (res) { |
193 | logUtil.printLog("验证失败返回的信息:", res); | 193 | logUtil.printLog("验证失败返回的信息:", res); |
194 | }); | 194 | }); |
195 | // 处理验证成功的信息 | 195 | // 处理验证成功的信息 |
196 | - wx.ready(function() { | 196 | + wx.ready(function () { |
197 | // 分享到朋友圈 | 197 | // 分享到朋友圈 |
198 | wx.updateTimelineShareData({ | 198 | wx.updateTimelineShareData({ |
199 | title: "唐元集邀请函", // 分享标题 | 199 | title: "唐元集邀请函", // 分享标题 |
@@ -210,13 +210,13 @@ export default { | @@ -210,13 +210,13 @@ export default { | ||
210 | 210 | ||
211 | // 分享图标 | 211 | // 分享图标 |
212 | // desc: that.sharemsg.content, | 212 | // desc: that.sharemsg.content, |
213 | - success: function(res) { | 213 | + success: function (res) { |
214 | // 用户确认分享后执行的回调函数 | 214 | // 用户确认分享后执行的回调函数 |
215 | console.log("suss"); | 215 | console.log("suss"); |
216 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); | 216 | logUtil.printLog("分享到朋友圈成功返回的信息为:", res); |
217 | that.showMsg("分享成功!"); | 217 | that.showMsg("分享成功!"); |
218 | }, | 218 | }, |
219 | - cancel: function(res) { | 219 | + cancel: function (res) { |
220 | // 用户取消分享后执行的回调函数 | 220 | // 用户取消分享后执行的回调函数 |
221 | console.log("err"); | 221 | console.log("err"); |
222 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); | 222 | logUtil.printLog("取消分享到朋友圈返回的信息为:", res); |
@@ -239,11 +239,11 @@ export default { | @@ -239,11 +239,11 @@ export default { | ||
239 | // 分享图标 | 239 | // 分享图标 |
240 | type: "", // 分享类型,music、video或link,不填默认为link | 240 | type: "", // 分享类型,music、video或link,不填默认为link |
241 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 | 241 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 |
242 | - success: function(res) { | 242 | + success: function (res) { |
243 | // 用户确认分享后执行的回调函数 | 243 | // 用户确认分享后执行的回调函数 |
244 | logUtil.printLog("分享给朋友成功返回的信息为:", res); | 244 | logUtil.printLog("分享给朋友成功返回的信息为:", res); |
245 | }, | 245 | }, |
246 | - cancel: function(res) { | 246 | + cancel: function (res) { |
247 | // 用户取消分享后执行的回调函数 | 247 | // 用户取消分享后执行的回调函数 |
248 | logUtil.printLog("取消分享给朋友返回的信息为:", res); | 248 | logUtil.printLog("取消分享给朋友返回的信息为:", res); |
249 | } | 249 | } |
@@ -271,11 +271,11 @@ export default { | @@ -271,11 +271,11 @@ export default { | ||
271 | 271 | ||
272 | that.$axios | 272 | that.$axios |
273 | .post(url, param) | 273 | .post(url, param) |
274 | - .then(function(res) { | 274 | + .then(function (res) { |
275 | that.result = res.data.result; | 275 | that.result = res.data.result; |
276 | console.log(that.result); | 276 | console.log(that.result); |
277 | }) | 277 | }) |
278 | - .catch(function(err) { | 278 | + .catch(function (err) { |
279 | console.log(err); | 279 | console.log(err); |
280 | }); | 280 | }); |
281 | }, | 281 | }, |
@@ -297,12 +297,12 @@ export default { | @@ -297,12 +297,12 @@ export default { | ||
297 | 297 | ||
298 | that.$axios | 298 | that.$axios |
299 | .post(url, param) | 299 | .post(url, param) |
300 | - .then(function(res) { | 300 | + .then(function (res) { |
301 | console.log(res); | 301 | console.log(res); |
302 | that.company = res.data.company; | 302 | that.company = res.data.company; |
303 | that.product = res.data.product; | 303 | that.product = res.data.product; |
304 | }) | 304 | }) |
305 | - .catch(function(err) { | 305 | + .catch(function (err) { |
306 | console.log(err); | 306 | console.log(err); |
307 | }); | 307 | }); |
308 | } | 308 | } |
@@ -311,10 +311,16 @@ export default { | @@ -311,10 +311,16 @@ export default { | ||
311 | </script> | 311 | </script> |
312 | <style scoped> | 312 | <style scoped> |
313 | @import "../../../style/usercenter.css"; | 313 | @import "../../../style/usercenter.css"; |
314 | +.zizhibox{ | ||
315 | + overflow-x: hidden!important; | ||
316 | + font-size: 0.28rem!important; | ||
317 | +} | ||
314 | .taozucontent { | 318 | .taozucontent { |
315 | width: 100%; | 319 | width: 100%; |
316 | padding: 0 0.32rem; | 320 | padding: 0 0.32rem; |
317 | box-sizing: border-box; | 321 | box-sizing: border-box; |
322 | + overflow-x: hidden!important; | ||
323 | + font-size: 0.28rem!important; | ||
318 | /* height: 17.5rem; */ | 324 | /* height: 17.5rem; */ |
319 | overflow-y: scroll; | 325 | overflow-y: scroll; |
320 | } | 326 | } |
@@ -326,4 +332,5 @@ export default { | @@ -326,4 +332,5 @@ export default { | ||
326 | left: 0; | 332 | left: 0; |
327 | z-index: 9999; | 333 | z-index: 9999; |
328 | } | 334 | } |
335 | + | ||
329 | </style> | 336 | </style> |
@@ -101,7 +101,7 @@ export default { | @@ -101,7 +101,7 @@ export default { | ||
101 | }; | 101 | }; |
102 | }, | 102 | }, |
103 | created() { | 103 | created() { |
104 | - document.title = "唐元集公众号"; | 104 | + document.title = "唐元集"; |
105 | this.subid = this.$route.query.subid; | 105 | this.subid = this.$route.query.subid; |
106 | this.getxuanchuan(); | 106 | this.getxuanchuan(); |
107 | this.intended = JSON.parse(localStorage.getItem("intended")) | 107 | this.intended = JSON.parse(localStorage.getItem("intended")) |
@@ -44,7 +44,7 @@ export default { | @@ -44,7 +44,7 @@ export default { | ||
44 | }; | 44 | }; |
45 | }, | 45 | }, |
46 | created() { | 46 | created() { |
47 | - document.title = "唐元集公众号"; | 47 | + document.title = "唐元集"; |
48 | this.subid = this.$route.query.subid; | 48 | this.subid = this.$route.query.subid; |
49 | this.getsghiyeresult(); | 49 | this.getsghiyeresult(); |
50 | }, | 50 | }, |
@@ -80,7 +80,7 @@ export default { | @@ -80,7 +80,7 @@ export default { | ||
80 | }; | 80 | }; |
81 | }, | 81 | }, |
82 | created() { | 82 | created() { |
83 | - document.title = "唐元集公众号"; | 83 | + document.title = "唐元集"; |
84 | this.subid = this.$route.query.subid; | 84 | this.subid = this.$route.query.subid; |
85 | console.log("999", this.subid); | 85 | console.log("999", this.subid); |
86 | this.getshiyeyoushi(); | 86 | this.getshiyeyoushi(); |
@@ -33,31 +33,45 @@ | @@ -33,31 +33,45 @@ | ||
33 | :class="selnav == 0 ? 'selactive' : ''" | 33 | :class="selnav == 0 ? 'selactive' : ''" |
34 | :data-id="0" | 34 | :data-id="0" |
35 | @click="selectnav" | 35 | @click="selectnav" |
36 | - >视频素材</div> | 36 | + > |
37 | + 视频素材 | ||
38 | + </div> | ||
37 | <div | 39 | <div |
38 | class="coursenavleft" | 40 | class="coursenavleft" |
39 | :class="selnav == 1 ? 'selactive' : ''" | 41 | :class="selnav == 1 ? 'selactive' : ''" |
40 | :data-id="1" | 42 | :data-id="1" |
41 | @click="selectnav" | 43 | @click="selectnav" |
42 | - >图片素材</div> | 44 | + > |
45 | + 图片素材 | ||
46 | + </div> | ||
43 | <div | 47 | <div |
44 | class="coursenavleft" | 48 | class="coursenavleft" |
45 | :class="selnav == 2 ? 'selactive' : ''" | 49 | :class="selnav == 2 ? 'selactive' : ''" |
46 | :data-id="2" | 50 | :data-id="2" |
47 | @click="selectnav" | 51 | @click="selectnav" |
48 | - >文字素材</div> | 52 | + > |
53 | + 文字素材 | ||
54 | + </div> | ||
49 | </div> | 55 | </div> |
50 | </div> | 56 | </div> |
51 | - <div class="keywordk flexone" v-if="showkeyword" @click="hidekey"> | 57 | + <div class="keywordk flexone kewordsou" v-if="showkeyword" @click="hidekey"> |
52 | <div | 58 | <div |
53 | class="keyworditem" | 59 | class="keyworditem" |
54 | v-for="(item, index) in sort" | 60 | v-for="(item, index) in sort" |
55 | :key="index" | 61 | :key="index" |
56 | @click="selname(item.name)" | 62 | @click="selname(item.name)" |
57 | - >{{ item.name }}</div> | 63 | + > |
64 | + {{ item.name }} | ||
65 | + </div> | ||
58 | </div> | 66 | </div> |
59 | <div v-if="showkeyword == false"> | 67 | <div v-if="showkeyword == false"> |
60 | - <div class="nodata" v-if="sucailist.length==0" style="margin-top:5.8rem">暂无数据</div> | 68 | + <div |
69 | + class="nodata" | ||
70 | + v-if="sucailist.length == 0" | ||
71 | + style="margin-top: 5.8rem" | ||
72 | + > | ||
73 | + 暂无数据 | ||
74 | + </div> | ||
61 | 75 | ||
62 | <div v-else> | 76 | <div v-else> |
63 | <van-list | 77 | <van-list |
@@ -69,14 +83,14 @@ | @@ -69,14 +83,14 @@ | ||
69 | > | 83 | > |
70 | <div | 84 | <div |
71 | class="sucaiboxitempage" | 85 | class="sucaiboxitempage" |
72 | - @click="gokind(item,index)" | ||
73 | - v-for="(item,index) in sucailist" | 86 | + @click="gokind(item, index)" |
87 | + v-for="(item, index) in sucailist" | ||
74 | :key="index" | 88 | :key="index" |
75 | > | 89 | > |
76 | <div class="sucaiimg"> | 90 | <div class="sucaiimg"> |
77 | <img :src="item.icon" alt /> | 91 | <img :src="item.icon" alt /> |
78 | </div> | 92 | </div> |
79 | - <div class="sucainame">{{item.name}}</div> | 93 | + <div class="sucainame">{{ item.name }}</div> |
80 | </div> | 94 | </div> |
81 | </van-list> | 95 | </van-list> |
82 | </div> | 96 | </div> |
@@ -102,10 +116,13 @@ export default { | @@ -102,10 +116,13 @@ export default { | ||
102 | }; | 116 | }; |
103 | }, | 117 | }, |
104 | created() { | 118 | created() { |
105 | - document.title = "唐元集公众号"; | 119 | + document.title = "唐元集"; |
120 | + this.selnav = localStorage.getItem("selkind") | ||
121 | + this.type = Number(this.selnav) + 1; | ||
106 | this.getsucai(); | 122 | this.getsucai(); |
107 | this.getlabellist(); | 123 | this.getlabellist(); |
108 | 124 | ||
125 | + | ||
109 | }, | 126 | }, |
110 | methods: { | 127 | methods: { |
111 | // 选择标签名字 | 128 | // 选择标签名字 |
@@ -165,6 +182,7 @@ export default { | @@ -165,6 +182,7 @@ export default { | ||
165 | }, | 182 | }, |
166 | // 素材详情 | 183 | // 素材详情 |
167 | videodetail(id, item) { | 184 | videodetail(id, item) { |
185 | + | ||
168 | if (id == 1) { | 186 | if (id == 1) { |
169 | this.$router.push({ | 187 | this.$router.push({ |
170 | path: "/videosucaidetail", | 188 | path: "/videosucaidetail", |
@@ -256,6 +274,7 @@ export default { | @@ -256,6 +274,7 @@ export default { | ||
256 | this.page = 1; | 274 | this.page = 1; |
257 | this.sucailist = []; | 275 | this.sucailist = []; |
258 | this.getsucai(); | 276 | this.getsucai(); |
277 | + localStorage.setItem("selkind", this.selnav) | ||
259 | }, | 278 | }, |
260 | enterword() { | 279 | enterword() { |
261 | console.log(48834998); | 280 | console.log(48834998); |
@@ -288,4 +307,8 @@ export default { | @@ -288,4 +307,8 @@ export default { | ||
288 | .searchheadkkk { | 307 | .searchheadkkk { |
289 | top: 0.8rem; | 308 | top: 0.8rem; |
290 | } | 309 | } |
310 | +.kewordsou { | ||
311 | + margin-top: 1.8rem; | ||
312 | + flex-wrap: wrap; | ||
313 | +} | ||
291 | </style> | 314 | </style> |
@@ -303,7 +303,7 @@ export default { | @@ -303,7 +303,7 @@ export default { | ||
303 | 303 | ||
304 | that.$axios | 304 | that.$axios |
305 | .post(url, param) | 305 | .post(url, param) |
306 | - .then(function(res) { | 306 | + .then(function (res) { |
307 | console.log(res); | 307 | console.log(res); |
308 | that.allcomment = res.data.social; | 308 | that.allcomment = res.data.social; |
309 | console.log("434", that.allcomment); | 309 | console.log("434", that.allcomment); |
@@ -324,7 +324,7 @@ export default { | @@ -324,7 +324,7 @@ export default { | ||
324 | that.showcommentlist = that.shortcomment; | 324 | that.showcommentlist = that.shortcomment; |
325 | } | 325 | } |
326 | }) | 326 | }) |
327 | - .catch(function(err) { | 327 | + .catch(function (err) { |
328 | console.log(err); | 328 | console.log(err); |
329 | }); | 329 | }); |
330 | }, | 330 | }, |
@@ -351,10 +351,10 @@ export default { | @@ -351,10 +351,10 @@ export default { | ||
351 | 351 | ||
352 | that.$axios | 352 | that.$axios |
353 | .post(url, param) | 353 | .post(url, param) |
354 | - .then(function(res) { | 354 | + .then(function (res) { |
355 | console.log(res); | 355 | console.log(res); |
356 | Toast("发送成功"); | 356 | Toast("发送成功"); |
357 | - that.list.forEach(function(value, index, arrray) { | 357 | + that.list.forEach(function (value, index, arrray) { |
358 | if (value.id == that.socialId) { | 358 | if (value.id == that.socialId) { |
359 | value.comment_count = value.comment_count + 1; | 359 | value.comment_count = value.comment_count + 1; |
360 | } | 360 | } |
@@ -365,7 +365,7 @@ export default { | @@ -365,7 +365,7 @@ export default { | ||
365 | that.textcomment = ""; | 365 | that.textcomment = ""; |
366 | that.getcommentlist(); | 366 | that.getcommentlist(); |
367 | }) | 367 | }) |
368 | - .catch(function(err) { | 368 | + .catch(function (err) { |
369 | console.log(err); | 369 | console.log(err); |
370 | Toast(err.msg); | 370 | Toast(err.msg); |
371 | }); | 371 | }); |
@@ -379,7 +379,7 @@ export default { | @@ -379,7 +379,7 @@ export default { | ||
379 | console.log(9999); | 379 | console.log(9999); |
380 | 380 | ||
381 | let that = this; | 381 | let that = this; |
382 | - that.list.forEach(function(value, index, array) { | 382 | + that.list.forEach(function (value, index, array) { |
383 | console.log(value); | 383 | console.log(value); |
384 | if (value.id == item.id) { | 384 | if (value.id == item.id) { |
385 | if (value.more == true) { | 385 | if (value.more == true) { |
@@ -408,7 +408,7 @@ export default { | @@ -408,7 +408,7 @@ export default { | ||
408 | this.images = item.images_arr; | 408 | this.images = item.images_arr; |
409 | if (this.images.length == 0) { | 409 | if (this.images.length == 0) { |
410 | this.nophoto = true; | 410 | this.nophoto = true; |
411 | - setTimeout(function() { | 411 | + setTimeout(function () { |
412 | that.nophoto = false; | 412 | that.nophoto = false; |
413 | }, 1500); | 413 | }, 1500); |
414 | } else { | 414 | } else { |
@@ -450,7 +450,7 @@ export default { | @@ -450,7 +450,7 @@ export default { | ||
450 | del(item) { | 450 | del(item) { |
451 | this.social_id = item.id; | 451 | this.social_id = item.id; |
452 | Dialog.confirm({ | 452 | Dialog.confirm({ |
453 | - title: "是否删除帖子" | 453 | + title: "是否撤销帖子" |
454 | }) | 454 | }) |
455 | .then(res => { | 455 | .then(res => { |
456 | console.log(3489348); | 456 | console.log(3489348); |
@@ -462,14 +462,14 @@ export default { | @@ -462,14 +462,14 @@ export default { | ||
462 | 462 | ||
463 | that.$axios | 463 | that.$axios |
464 | .post(url, param) | 464 | .post(url, param) |
465 | - .then(function(res) { | 465 | + .then(function (res) { |
466 | console.log(res); | 466 | console.log(res); |
467 | Toast("删除成功"); | 467 | Toast("删除成功"); |
468 | that.page = 1; | 468 | that.page = 1; |
469 | that.list = []; | 469 | that.list = []; |
470 | that.gettiezilist(); | 470 | that.gettiezilist(); |
471 | }) | 471 | }) |
472 | - .catch(function(err) { | 472 | + .catch(function (err) { |
473 | console.log(err); | 473 | console.log(err); |
474 | }); | 474 | }); |
475 | // on confirm | 475 | // on confirm |
@@ -488,10 +488,10 @@ export default { | @@ -488,10 +488,10 @@ export default { | ||
488 | 488 | ||
489 | that.$axios | 489 | that.$axios |
490 | .post(url, param) | 490 | .post(url, param) |
491 | - .then(function(res) { | 491 | + .then(function (res) { |
492 | console.log(res); | 492 | console.log(res); |
493 | that.list = that.list.concat(res.data.social); | 493 | that.list = that.list.concat(res.data.social); |
494 | - that.list.forEach(function(value, index, array) { | 494 | + that.list.forEach(function (value, index, array) { |
495 | value.show = true; | 495 | value.show = true; |
496 | 496 | ||
497 | if (value.description.length > 66) { | 497 | if (value.description.length > 66) { |
@@ -505,7 +505,7 @@ export default { | @@ -505,7 +505,7 @@ export default { | ||
505 | that.total_page = res.data.total_page; | 505 | that.total_page = res.data.total_page; |
506 | console.log(that.list); | 506 | console.log(that.list); |
507 | }) | 507 | }) |
508 | - .catch(function(err) { | 508 | + .catch(function (err) { |
509 | console.log(err); | 509 | console.log(err); |
510 | }); | 510 | }); |
511 | }, | 511 | }, |
@@ -515,7 +515,7 @@ export default { | @@ -515,7 +515,7 @@ export default { | ||
515 | console.log(9999); | 515 | console.log(9999); |
516 | 516 | ||
517 | let that = this; | 517 | let that = this; |
518 | - that.list.forEach(function(value, index, array) { | 518 | + that.list.forEach(function (value, index, array) { |
519 | console.log(value); | 519 | console.log(value); |
520 | if (value.id == item.id) { | 520 | if (value.id == item.id) { |
521 | if (value.more == true) { | 521 | if (value.more == true) { |
@@ -547,7 +547,7 @@ export default { | @@ -547,7 +547,7 @@ export default { | ||
547 | 547 | ||
548 | that.$axios | 548 | that.$axios |
549 | .post(url, param) | 549 | .post(url, param) |
550 | - .then(function(res) { | 550 | + .then(function (res) { |
551 | console.log(res); | 551 | console.log(res); |
552 | if (item.is_favorite == 0) { | 552 | if (item.is_favorite == 0) { |
553 | item.is_favorite = 1; | 553 | item.is_favorite = 1; |
@@ -565,7 +565,7 @@ export default { | @@ -565,7 +565,7 @@ export default { | ||
565 | that.list = that.list; | 565 | that.list = that.list; |
566 | that.$forceUpdate(); | 566 | that.$forceUpdate(); |
567 | }) | 567 | }) |
568 | - .catch(function(err) { | 568 | + .catch(function (err) { |
569 | console.log(err); | 569 | console.log(err); |
570 | }); | 570 | }); |
571 | }, | 571 | }, |
@@ -583,7 +583,7 @@ export default { | @@ -583,7 +583,7 @@ export default { | ||
583 | 583 | ||
584 | that.$axios | 584 | that.$axios |
585 | .post(url, param) | 585 | .post(url, param) |
586 | - .then(function(res) { | 586 | + .then(function (res) { |
587 | console.log(res); | 587 | console.log(res); |
588 | if (item.is_good == 0) { | 588 | if (item.is_good == 0) { |
589 | item.is_good = 1; | 589 | item.is_good = 1; |
@@ -599,7 +599,7 @@ export default { | @@ -599,7 +599,7 @@ export default { | ||
599 | that.list = that.list; | 599 | that.list = that.list; |
600 | that.$forceUpdate(); | 600 | that.$forceUpdate(); |
601 | }) | 601 | }) |
602 | - .catch(function(err) { | 602 | + .catch(function (err) { |
603 | console.log(err); | 603 | console.log(err); |
604 | }); | 604 | }); |
605 | } | 605 | } |
@@ -133,10 +133,13 @@ export default { | @@ -133,10 +133,13 @@ export default { | ||
133 | msg_count: "" | 133 | msg_count: "" |
134 | }; | 134 | }; |
135 | }, | 135 | }, |
136 | + mounted(){ | ||
137 | + console.log("走了走了") | ||
138 | + this.getuserinfo(); | ||
139 | + }, | ||
136 | created() { | 140 | created() { |
137 | document.body.style.backgroundColor = "#f9f9f9"; | 141 | document.body.style.backgroundColor = "#f9f9f9"; |
138 | - document.title = "唐元集公众号"; | ||
139 | - this.getuserinfo(); | 142 | + document.title = "唐元集"; |
140 | }, | 143 | }, |
141 | methods: { | 144 | methods: { |
142 | sel(e) { | 145 | sel(e) { |
@@ -157,8 +160,8 @@ export default { | @@ -157,8 +160,8 @@ export default { | ||
157 | 160 | ||
158 | that.$axios | 161 | that.$axios |
159 | .post(url, param) | 162 | .post(url, param) |
160 | - .then(function(res) { | ||
161 | - console.log(res); | 163 | + .then(function (res) { |
164 | + console.log(res,'个人信息'); | ||
162 | that.username = res.data.nickname; | 165 | that.username = res.data.nickname; |
163 | that.avatar = res.data.avatar; | 166 | that.avatar = res.data.avatar; |
164 | that.lesson = res.data.lesson; | 167 | that.lesson = res.data.lesson; |
@@ -168,12 +171,13 @@ export default { | @@ -168,12 +171,13 @@ export default { | ||
168 | that.showpage = true; | 171 | that.showpage = true; |
169 | } | 172 | } |
170 | }) | 173 | }) |
171 | - .catch(function(error) { | 174 | + .catch(function (error) { |
172 | console.log(error); | 175 | console.log(error); |
173 | }); | 176 | }); |
174 | }, | 177 | }, |
175 | // 进入直播 | 178 | // 进入直播 |
176 | enterzhibo(id, lesson) { | 179 | enterzhibo(id, lesson) { |
180 | + localStorage.setItem('boindex','') | ||
177 | console.log(id); | 181 | console.log(id); |
178 | console.log(this.lesson.type); | 182 | console.log(this.lesson.type); |
179 | if (this.lesson.type == 1) { | 183 | if (this.lesson.type == 1) { |
@@ -223,6 +227,7 @@ export default { | @@ -223,6 +227,7 @@ export default { | ||
223 | // query: { testId: item.test_student_id } | 227 | // query: { testId: item.test_student_id } |
224 | }); | 228 | }); |
225 | } else if (id == 3) { | 229 | } else if (id == 3) { |
230 | + localStorage.setItem("selkind", "") | ||
226 | this.$router.push({ | 231 | this.$router.push({ |
227 | path: "/sucaibao" | 232 | path: "/sucaibao" |
228 | // query: { testId: item.test_student_id } | 233 | // query: { testId: item.test_student_id } |
@@ -232,6 +237,7 @@ export default { | @@ -232,6 +237,7 @@ export default { | ||
232 | path: "/publish" | 237 | path: "/publish" |
233 | }); | 238 | }); |
234 | } else if (id == 5) { | 239 | } else if (id == 5) { |
240 | + localStorage.setItem("iszuo", '') | ||
235 | this.$router.push({ | 241 | this.$router.push({ |
236 | path: "/zuozhanbaolishi" | 242 | path: "/zuozhanbaolishi" |
237 | }); | 243 | }); |
@@ -12,13 +12,14 @@ | @@ -12,13 +12,14 @@ | ||
12 | <!-- <img src="../../../assets/sharebtn.png" alt /> --> | 12 | <!-- <img src="../../../assets/sharebtn.png" alt /> --> |
13 | </div> | 13 | </div> |
14 | </div> | 14 | </div> |
15 | - | ||
16 | - <div class="nodata" v-if="recordlist.length == 0">暂无聊天记录</div> | 15 | + <div class="listboxbox"> |
16 | + <div class="middlecontent"> | ||
17 | +<div class="nodata nodatatext" v-if="recordlist.length == 0">暂无聊天记录</div> | ||
17 | <van-pull-refresh | 18 | <van-pull-refresh |
18 | v-model="isLoading" | 19 | v-model="isLoading" |
19 | @refresh="onRefresh" | 20 | @refresh="onRefresh" |
20 | class="messagelist" | 21 | class="messagelist" |
21 | - style="height:100%" | 22 | + style="height: 100%" |
22 | id="messagebox" | 23 | id="messagebox" |
23 | v-else | 24 | v-else |
24 | > | 25 | > |
@@ -106,7 +107,7 @@ | @@ -106,7 +107,7 @@ | ||
106 | class="messageitem messageitemk flex" | 107 | class="messageitem messageitemk flex" |
107 | v-if="item.user_id == user_id" | 108 | v-if="item.user_id == user_id" |
108 | :id="item.idkk" | 109 | :id="item.idkk" |
109 | - @touchstart="gotouchstart(item)" | 110 | + @touchstart.stop="gotouchstart(item)" |
110 | @touchmove="gotouchmove" | 111 | @touchmove="gotouchmove" |
111 | @touchend="gotouchend(item)" | 112 | @touchend="gotouchend(item)" |
112 | > | 113 | > |
@@ -180,19 +181,12 @@ | @@ -180,19 +181,12 @@ | ||
180 | </div> | 181 | </div> |
181 | </van-pull-refresh> | 182 | </van-pull-refresh> |
182 | 183 | ||
183 | - <!-- 底部导航 --> | ||
184 | - | ||
185 | - <!-- <div class="messagebot messagebotkk flexone" v-if="is_self == 0 && isbot == true"> | ||
186 | - <div class="messagebotleft"> | ||
187 | - <img src="../../../assets/yuyin.png" alt /> | ||
188 | - </div> | ||
189 | - <div class="writermessage"> | ||
190 | - <input type="text" placeholder="写留言" @input="entertext" :value="text" /> | ||
191 | </div> | 184 | </div> |
192 | - <div class="sendk" @click="send">发送</div> | ||
193 | - </div>--> | ||
194 | - <div v-if="is_self == 1"> | ||
195 | - <div class="messagebot messagebotkk flexone" v-if="sendword"> | 185 | + |
186 | + | ||
187 | + <!-- 底部导航 --> | ||
188 | + <div v-if="is_self == 1" style="width:100%"> | ||
189 | + <div class="messagebotkk flexone" v-if="sendword" style="padding-bottom:0.12rem;box-sizing:border-box"> | ||
196 | <div class="messagebotleft" @click="changeword"> | 190 | <div class="messagebotleft" @click="changeword"> |
197 | <img src="../../../assets/yuyin.png" alt /> | 191 | <img src="../../../assets/yuyin.png" alt /> |
198 | </div> | 192 | </div> |
@@ -206,7 +200,7 @@ | @@ -206,7 +200,7 @@ | ||
206 | </div> | 200 | </div> |
207 | <div class="sendk" @click="send">发送</div> | 201 | <div class="sendk" @click="send">发送</div> |
208 | </div> | 202 | </div> |
209 | - <div class="messagebot messagebotk flextwo" v-else> | 203 | + <div class="messagebotk flextwo" v-else> |
210 | <img | 204 | <img |
211 | src="../../../assets/yuyin.png" | 205 | src="../../../assets/yuyin.png" |
212 | alt | 206 | alt |
@@ -225,7 +219,7 @@ | @@ -225,7 +219,7 @@ | ||
225 | class="yuyinbtn" | 219 | class="yuyinbtn" |
226 | @click="yuyin" | 220 | @click="yuyin" |
227 | /> | 221 | /> |
228 | - <div class style="position:relative"> | 222 | + <div class style="position: relative"> |
229 | <input | 223 | <input |
230 | type="file" | 224 | type="file" |
231 | accept="audio/*" | 225 | accept="audio/*" |
@@ -242,6 +236,11 @@ | @@ -242,6 +236,11 @@ | ||
242 | /> | 236 | /> |
243 | </div> | 237 | </div> |
244 | </div> | 238 | </div> |
239 | + </div> | ||
240 | + | ||
241 | + | ||
242 | + | ||
243 | + | ||
245 | <!-- <div class="manypeople"> | 244 | <!-- <div class="manypeople"> |
246 | <img src="../../../assets/manypeople.png" alt class="manypeopleimg" /> | 245 | <img src="../../../assets/manypeople.png" alt class="manypeopleimg" /> |
247 | {{ group_count }} | 246 | {{ group_count }} |
@@ -272,7 +271,7 @@ | @@ -272,7 +271,7 @@ | ||
272 | </div> | 271 | </div> |
273 | </div> | 272 | </div> |
274 | <!-- 开始录制 --> | 273 | <!-- 开始录制 --> |
275 | - <div class="register" style="z-index:999" v-if="beginlushow" @click="hide"> | 274 | + <div class="register" style="z-index: 999" v-if="beginlushow" @click="hide"> |
276 | <div class="luwrap" @click.stop="beginluyin"> | 275 | <div class="luwrap" @click.stop="beginluyin"> |
277 | <div class="beginlu">开始录制</div> | 276 | <div class="beginlu">开始录制</div> |
278 | <div> | 277 | <div> |
@@ -282,7 +281,7 @@ | @@ -282,7 +281,7 @@ | ||
282 | </div> | 281 | </div> |
283 | 282 | ||
284 | <!-- 正在录制 --> | 283 | <!-- 正在录制 --> |
285 | - <div class="register" style="z-index:999" v-if="zhengzailu" @click="hide"> | 284 | + <div class="register" style="z-index: 999" v-if="zhengzailu" @click="hide"> |
286 | <div class="luwrap" @click.stop="finishluyin"> | 285 | <div class="luwrap" @click.stop="finishluyin"> |
287 | <div class="beginlu">正在录音:{{ time }}'</div> | 286 | <div class="beginlu">正在录音:{{ time }}'</div> |
288 | <div> | 287 | <div> |
@@ -292,7 +291,7 @@ | @@ -292,7 +291,7 @@ | ||
292 | </div> | 291 | </div> |
293 | 292 | ||
294 | <!-- 录制完成 --> | 293 | <!-- 录制完成 --> |
295 | - <div class="register" style="z-index:999" v-if="luprocess" @click="hide"> | 294 | + <div class="register" style="z-index: 999" v-if="luprocess" @click="hide"> |
296 | <div class="luwrap"> | 295 | <div class="luwrap"> |
297 | <div class="beginlu">录音时长:{{ time }}'</div> | 296 | <div class="beginlu">录音时长:{{ time }}'</div> |
298 | <div class="flextwo chonglu"> | 297 | <div class="flextwo chonglu"> |
@@ -304,7 +303,7 @@ | @@ -304,7 +303,7 @@ | ||
304 | </div> | 303 | </div> |
305 | 304 | ||
306 | <!-- 温馨提示 --> | 305 | <!-- 温馨提示 --> |
307 | - <div class="register" style="z-index:999" v-if="chonglushow"> | 306 | + <div class="register" style="z-index: 999" v-if="chonglushow"> |
308 | <div class="wentipswrap"> | 307 | <div class="wentipswrap"> |
309 | <div class="tipsname">温馨提示</div> | 308 | <div class="tipsname">温馨提示</div> |
310 | <div class="waittips">您确认舍弃该录音重新录制吗</div> | 309 | <div class="waittips">您确认舍弃该录音重新录制吗</div> |
@@ -316,7 +315,7 @@ | @@ -316,7 +315,7 @@ | ||
316 | </div> | 315 | </div> |
317 | <!-- 本次录音是否上传 --> | 316 | <!-- 本次录音是否上传 --> |
318 | 317 | ||
319 | - <div class="register" style="z-index:999" v-if="shanghcuanshow"> | 318 | + <div class="register" style="z-index: 999" v-if="shanghcuanshow"> |
320 | <div class="wentipswrap"> | 319 | <div class="wentipswrap"> |
321 | <div class="waittips benci">本次录音是否上传</div> | 320 | <div class="waittips benci">本次录音是否上传</div> |
322 | <div class="waitbot flexone"> | 321 | <div class="waitbot flexone"> |
@@ -327,7 +326,7 @@ | @@ -327,7 +326,7 @@ | ||
327 | </div> | 326 | </div> |
328 | <van-loading type="spinner" color="#1989fa" v-if="cardzheng" /> | 327 | <van-loading type="spinner" color="#1989fa" v-if="cardzheng" /> |
329 | <!-- 是否结束录播 --> | 328 | <!-- 是否结束录播 --> |
330 | - <div class="register" style="z-index:999" v-if="overzhibo"> | 329 | + <div class="register" style="z-index: 999" v-if="overzhibo"> |
331 | <div class="wentipswrap"> | 330 | <div class="wentipswrap"> |
332 | <div class="waittips benci">是否结束录播</div> | 331 | <div class="waittips benci">是否结束录播</div> |
333 | <div class="waitbot flexone"> | 332 | <div class="waitbot flexone"> |
@@ -340,9 +339,11 @@ | @@ -340,9 +339,11 @@ | ||
340 | </template> | 339 | </template> |
341 | 340 | ||
342 | <script> | 341 | <script> |
342 | +var timeOutEvent = ""; | ||
343 | import wx from "jweixin-1.6.0"; | 343 | import wx from "jweixin-1.6.0"; |
344 | import Vue from "vue"; | 344 | import Vue from "vue"; |
345 | import { PullRefresh, Toast, Dialog, Loading } from "vant"; | 345 | import { PullRefresh, Toast, Dialog, Loading } from "vant"; |
346 | +import { pushHistory } from '../../../utils/back.js';//监听返回上一页的判断 | ||
346 | Vue.use(PullRefresh); | 347 | Vue.use(PullRefresh); |
347 | Vue.use(Toast); | 348 | Vue.use(Toast); |
348 | Vue.use(Loading); | 349 | Vue.use(Loading); |
@@ -385,10 +386,12 @@ export default { | @@ -385,10 +386,12 @@ export default { | ||
385 | stopindex: 0, | 386 | stopindex: 0, |
386 | playlocalid: "", | 387 | playlocalid: "", |
387 | cardzheng: false, | 388 | cardzheng: false, |
388 | - coursename: "" | 389 | + coursename: "", |
390 | + shitingshow:false | ||
389 | }; | 391 | }; |
390 | }, | 392 | }, |
391 | created() { | 393 | created() { |
394 | + | ||
392 | // 获取个人中心 | 395 | // 获取个人中心 |
393 | this.getuserinfo(); | 396 | this.getuserinfo(); |
394 | // alert(location.host) | 397 | // alert(location.host) |
@@ -400,7 +403,7 @@ export default { | @@ -400,7 +403,7 @@ export default { | ||
400 | // "/redirect.html?shareRedirect=" + | 403 | // "/redirect.html?shareRedirect=" + |
401 | // encodeURIComponent(window.location.href)) | 404 | // encodeURIComponent(window.location.href)) |
402 | this.coursename = this.$route.query.name; | 405 | this.coursename = this.$route.query.name; |
403 | - document.title = "唐元集公众号"; | 406 | + document.title = "唐元集"; |
404 | this.id = this.$route.query.id; | 407 | this.id = this.$route.query.id; |
405 | // 获取appid | 408 | // 获取appid |
406 | this.getappid(); | 409 | this.getappid(); |
@@ -409,10 +412,10 @@ export default { | @@ -409,10 +412,10 @@ export default { | ||
409 | // 获取直播列表 | 412 | // 获取直播列表 |
410 | this.getzhibolist(); | 413 | this.getzhibolist(); |
411 | }, | 414 | }, |
415 | + | ||
412 | mounted() { | 416 | mounted() { |
413 | let that = this; | 417 | let that = this; |
414 | - | ||
415 | - console.log(that.target, "99997878666"); | 418 | + this.onpopstate() |
416 | }, | 419 | }, |
417 | 420 | ||
418 | watch: {}, | 421 | watch: {}, |
@@ -427,7 +430,36 @@ export default { | @@ -427,7 +430,36 @@ export default { | ||
427 | next(); | 430 | next(); |
428 | } | 431 | } |
429 | }, | 432 | }, |
433 | + destroyed () { | ||
434 | + // 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件 | ||
435 | + window.removeEventListener("popstate", this.closeViews, false); | ||
436 | + }, | ||
430 | methods: { | 437 | methods: { |
438 | + // 监听页面卸载 | ||
439 | + // 监听历史记录点, 添加返回事件监听 | ||
440 | + onpopstate () { | ||
441 | + pushHistory() | ||
442 | + // 给window添加一个popstate事件,拦截返回键,执行this.closeViews事件,addEventListener需要指向一个方法 | ||
443 | + window.addEventListener("popstate", this.closeViews, false); | ||
444 | + }, | ||
445 | + // 返回上一页 | ||
446 | + closeViews () { | ||
447 | + console.log(4373474378) | ||
448 | + this.$router.go(-1) | ||
449 | + | ||
450 | + this.recordlist.forEach(function(value,index,array){ | ||
451 | + value.sel=false | ||
452 | + }) | ||
453 | + this.recordlist=this.recordlist; | ||
454 | + wx.stopVoice({ | ||
455 | + localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
456 | + }); | ||
457 | + wx.stopVoice({ | ||
458 | + localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
459 | + }); | ||
460 | + this.$forceUpdate(); | ||
461 | + }, | ||
462 | + | ||
431 | // 上传音频 | 463 | // 上传音频 |
432 | afterRead(e) { | 464 | afterRead(e) { |
433 | console.log(e); | 465 | console.log(e); |
@@ -437,12 +469,10 @@ export default { | @@ -437,12 +469,10 @@ export default { | ||
437 | 469 | ||
438 | var formdata = new FormData(); | 470 | var formdata = new FormData(); |
439 | formdata.append("file", file); | 471 | formdata.append("file", file); |
440 | - | ||
441 | var url = "/api/common/upload"; | 472 | var url = "/api/common/upload"; |
442 | - | ||
443 | that.$uploadFile | 473 | that.$uploadFile |
444 | .post(url, formdata) | 474 | .post(url, formdata) |
445 | - .then(function(res) { | 475 | + .then(function (res) { |
446 | that.cardzheng = false; | 476 | that.cardzheng = false; |
447 | console.log(res); | 477 | console.log(res); |
448 | let objdata = { | 478 | let objdata = { |
@@ -453,7 +483,6 @@ export default { | @@ -453,7 +483,6 @@ export default { | ||
453 | data: res.data.media | 483 | data: res.data.media |
454 | }; | 484 | }; |
455 | objdata = JSON.stringify(objdata); | 485 | objdata = JSON.stringify(objdata); |
456 | - | ||
457 | that.websocketsend(objdata); | 486 | that.websocketsend(objdata); |
458 | }) | 487 | }) |
459 | .catch(err => { | 488 | .catch(err => { |
@@ -465,17 +494,16 @@ export default { | @@ -465,17 +494,16 @@ export default { | ||
465 | //获取个人中心 | 494 | //获取个人中心 |
466 | getuserinfo() { | 495 | getuserinfo() { |
467 | let that = this; | 496 | let that = this; |
468 | - | ||
469 | var url = "/api/user/index"; | 497 | var url = "/api/user/index"; |
470 | let param = {}; | 498 | let param = {}; |
471 | 499 | ||
472 | that.$axios | 500 | that.$axios |
473 | .post(url, param) | 501 | .post(url, param) |
474 | - .then(function(res) { | 502 | + .then(function (res) { |
475 | console.log(res); | 503 | console.log(res); |
476 | that.user_id = res.data.id; | 504 | that.user_id = res.data.id; |
477 | }) | 505 | }) |
478 | - .catch(function(err) {}); | 506 | + .catch(function (err) { }); |
479 | }, | 507 | }, |
480 | 508 | ||
481 | // 列表自动滚到到底部 | 509 | // 列表自动滚到到底部 |
@@ -484,9 +512,7 @@ export default { | @@ -484,9 +512,7 @@ export default { | ||
484 | let div = this.$refs["message-list"]; | 512 | let div = this.$refs["message-list"]; |
485 | console.log(div.scrollHeight, 8887766543); | 513 | console.log(div.scrollHeight, 8887766543); |
486 | console.log(div.style.height, 9999); | 514 | console.log(div.style.height, 9999); |
487 | - | ||
488 | this.height = div.clientHeight; | 515 | this.height = div.clientHeight; |
489 | - | ||
490 | div.scrollTop = div.scrollHeight; | 516 | div.scrollTop = div.scrollHeight; |
491 | // let height = div.offsetHeight | 517 | // let height = div.offsetHeight |
492 | // console.log(height, 9999888888) | 518 | // console.log(height, 9999888888) |
@@ -545,7 +571,7 @@ export default { | @@ -545,7 +571,7 @@ export default { | ||
545 | 571 | ||
546 | that.$axios | 572 | that.$axios |
547 | .post(url, param) | 573 | .post(url, param) |
548 | - .then(function(res) { | 574 | + .then(function (res) { |
549 | console.log(res); | 575 | console.log(res); |
550 | wx.config({ | 576 | wx.config({ |
551 | debug: false, | 577 | debug: false, |
@@ -559,7 +585,6 @@ export default { | @@ -559,7 +585,6 @@ export default { | ||
559 | "stopRecord", | 585 | "stopRecord", |
560 | "playVoice", | 586 | "playVoice", |
561 | "uploadVoice", | 587 | "uploadVoice", |
562 | - "playVoice", | ||
563 | "downloadVoice", | 588 | "downloadVoice", |
564 | "stopVoice", | 589 | "stopVoice", |
565 | "chooseImage", | 590 | "chooseImage", |
@@ -572,7 +597,7 @@ export default { | @@ -572,7 +597,7 @@ export default { | ||
572 | 597 | ||
573 | that.sharetofriend(); | 598 | that.sharetofriend(); |
574 | }) | 599 | }) |
575 | - .catch(function(err) { | 600 | + .catch(function (err) { |
576 | console.log(err); | 601 | console.log(err); |
577 | }); | 602 | }); |
578 | }, | 603 | }, |
@@ -581,11 +606,11 @@ export default { | @@ -581,11 +606,11 @@ export default { | ||
581 | sharetofriend() { | 606 | sharetofriend() { |
582 | var that = this; | 607 | var that = this; |
583 | // 处理验证失败的信息 | 608 | // 处理验证失败的信息 |
584 | - wx.error(function(res) { | ||
585 | - logUtil.printLog("验证失败返回的信息:", res); | 609 | + wx.error(function (res) { |
610 | + // logUtil.printLog("验证失败返回的信息:", res); | ||
586 | }); | 611 | }); |
587 | // 处理验证成功的信息 | 612 | // 处理验证成功的信息 |
588 | - wx.ready(function() { | 613 | + wx.ready(function () { |
589 | // alert(window.location.href.split('#')[0]); | 614 | // alert(window.location.href.split('#')[0]); |
590 | // var share_title = that.sharemsg.title; | 615 | // var share_title = that.sharemsg.title; |
591 | // if (share_title.indexOf("${title}") >= 0) { | 616 | // if (share_title.indexOf("${title}") >= 0) { |
@@ -620,16 +645,16 @@ export default { | @@ -620,16 +645,16 @@ export default { | ||
620 | 645 | ||
621 | // 分享图标 | 646 | // 分享图标 |
622 | // desc: that.sharemsg.content, | 647 | // desc: that.sharemsg.content, |
623 | - success: function(res) { | 648 | + success: function (res) { |
624 | // 用户确认分享后执行的回调函数 | 649 | // 用户确认分享后执行的回调函数 |
625 | console.log("suss"); | 650 | console.log("suss"); |
626 | - logUtil.printLog("分享到朋友圈成功返回的信息为:", res); | ||
627 | - that.showMsg("分享成功!"); | 651 | + // logUtil.printLog("分享到朋友圈成功返回的信息为:", res); |
652 | + // that.showMsg("分享成功!"); | ||
628 | }, | 653 | }, |
629 | - cancel: function(res) { | 654 | + cancel: function (res) { |
630 | // 用户取消分享后执行的回调函数 | 655 | // 用户取消分享后执行的回调函数 |
631 | console.log("err"); | 656 | console.log("err"); |
632 | - logUtil.printLog("取消分享到朋友圈返回的信息为:", res); | 657 | + // logUtil.printLog("取消分享到朋友圈返回的信息为:", res); |
633 | } | 658 | } |
634 | }), | 659 | }), |
635 | // 分享给朋友 | 660 | // 分享给朋友 |
@@ -649,13 +674,13 @@ export default { | @@ -649,13 +674,13 @@ export default { | ||
649 | // 分享图标 | 674 | // 分享图标 |
650 | type: "", // 分享类型,music、video或link,不填默认为link | 675 | type: "", // 分享类型,music、video或link,不填默认为link |
651 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 | 676 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 |
652 | - success: function(res) { | 677 | + success: function (res) { |
653 | // 用户确认分享后执行的回调函数 | 678 | // 用户确认分享后执行的回调函数 |
654 | - logUtil.printLog("分享给朋友成功返回的信息为:", res); | 679 | + // logUtil.printLog("分享给朋友成功返回的信息为:", res); |
655 | }, | 680 | }, |
656 | - cancel: function(res) { | 681 | + cancel: function (res) { |
657 | // 用户取消分享后执行的回调函数 | 682 | // 用户取消分享后执行的回调函数 |
658 | - logUtil.printLog("取消分享给朋友返回的信息为:", res); | 683 | + // logUtil.printLog("取消分享给朋友返回的信息为:", res); |
659 | } | 684 | } |
660 | }); | 685 | }); |
661 | }); | 686 | }); |
@@ -668,13 +693,13 @@ export default { | @@ -668,13 +693,13 @@ export default { | ||
668 | count: 1, // 默认9 | 693 | count: 1, // 默认9 |
669 | sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有 | 694 | sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有 |
670 | sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 | 695 | sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 |
671 | - success: function(res) { | 696 | + success: function (res) { |
672 | var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 | 697 | var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 |
673 | 698 | ||
674 | wx.uploadImage({ | 699 | wx.uploadImage({ |
675 | localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得 | 700 | localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得 |
676 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 701 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
677 | - success: function(res) { | 702 | + success: function (res) { |
678 | var serverId = res.serverId; // 返回图片的服务器端ID | 703 | var serverId = res.serverId; // 返回图片的服务器端ID |
679 | that.serverId = res.serverId; | 704 | that.serverId = res.serverId; |
680 | that.upload(); | 705 | that.upload(); |
@@ -686,8 +711,7 @@ export default { | @@ -686,8 +711,7 @@ export default { | ||
686 | 711 | ||
687 | upload() { | 712 | upload() { |
688 | let that = this; | 713 | let that = this; |
689 | - console.log(34734894890); | ||
690 | - alert(that.serverId); | 714 | + |
691 | var url = "/api/user/upload_media"; | 715 | var url = "/api/user/upload_media"; |
692 | let param = { | 716 | let param = { |
693 | type: 1, | 717 | type: 1, |
@@ -696,7 +720,7 @@ export default { | @@ -696,7 +720,7 @@ export default { | ||
696 | 720 | ||
697 | that.$axios | 721 | that.$axios |
698 | .post(url, param) | 722 | .post(url, param) |
699 | - .then(function(res) { | 723 | + .then(function (res) { |
700 | console.log(res); | 724 | console.log(res); |
701 | that.videourl = res.data.media; | 725 | that.videourl = res.data.media; |
702 | let objdata = { | 726 | let objdata = { |
@@ -711,8 +735,8 @@ export default { | @@ -711,8 +735,8 @@ export default { | ||
711 | that.websocketsend(objdata); | 735 | that.websocketsend(objdata); |
712 | // alert(that.videourl) | 736 | // alert(that.videourl) |
713 | }) | 737 | }) |
714 | - .catch(function(err) { | ||
715 | - alert(err); | 738 | + .catch(function (err) { |
739 | + | ||
716 | console.log(err); | 740 | console.log(err); |
717 | }); | 741 | }); |
718 | }, | 742 | }, |
@@ -731,9 +755,14 @@ export default { | @@ -731,9 +755,14 @@ export default { | ||
731 | this.beginlushow = false; | 755 | this.beginlushow = false; |
732 | this.zhengzailu = false; | 756 | this.zhengzailu = false; |
733 | this.luprocess = false; | 757 | this.luprocess = false; |
758 | + clearInterval(timer) | ||
759 | + this.time = 1 | ||
734 | wx.pauseVoice({ | 760 | wx.pauseVoice({ |
735 | localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | 761 | localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 |
736 | }); | 762 | }); |
763 | + wx.stopVoice({ | ||
764 | + localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
765 | + }); | ||
737 | }, | 766 | }, |
738 | // 返回上一页 | 767 | // 返回上一页 |
739 | back() { | 768 | back() { |
@@ -764,8 +793,16 @@ export default { | @@ -764,8 +793,16 @@ export default { | ||
764 | yuyin() { | 793 | yuyin() { |
765 | this.beginlushow = true; | 794 | this.beginlushow = true; |
766 | this.yuyintype = 1; | 795 | this.yuyintype = 1; |
796 | + this.recordlist.forEach(function(value,index,array){ | ||
797 | + value.sel=false | ||
798 | + }) | ||
799 | + this.recordlist=this.recordlist; | ||
800 | + this.$forceUpdate(); | ||
801 | + wx.stopVoice({ | ||
802 | + localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
803 | + }); | ||
767 | }, | 804 | }, |
768 | - // 开始录制 | 805 | + |
769 | // 开始录音 | 806 | // 开始录音 |
770 | beginluyin() { | 807 | beginluyin() { |
771 | console.log(83434898989); | 808 | console.log(83434898989); |
@@ -775,13 +812,25 @@ export default { | @@ -775,13 +812,25 @@ export default { | ||
775 | let time = 0; | 812 | let time = 0; |
776 | timer = setInterval(() => { | 813 | timer = setInterval(() => { |
777 | time++; | 814 | time++; |
815 | + console.log(time,'计时') | ||
778 | that.time = time; | 816 | that.time = time; |
779 | - console.log(that.time); | 817 | + if (that.time == 60) { |
818 | + clearInterval(timer); | ||
819 | + this.zhengzailu = false; | ||
820 | + this.luprocess = true; | ||
821 | + wx.stopRecord({ | ||
822 | + success: function (res) { | ||
823 | + var localId = res.localId; | ||
824 | + that.localId = res.localId; | ||
825 | + that.upyuyin(); | ||
826 | + } | ||
827 | + }); | ||
828 | + } | ||
780 | }, 1000); | 829 | }, 1000); |
781 | wx.startRecord({ | 830 | wx.startRecord({ |
782 | - success: function(res) { | 831 | + success: function (res) { |
783 | // alert(JSON.stringify(res)) | 832 | // alert(JSON.stringify(res)) |
784 | - consoel.log(res, 99977775655); | 833 | + |
785 | // alert('成功调起录音') | 834 | // alert('成功调起录音') |
786 | // that.timer = setInterval(() => { | 835 | // that.timer = setInterval(() => { |
787 | // time++; | 836 | // time++; |
@@ -789,7 +838,7 @@ export default { | @@ -789,7 +838,7 @@ export default { | ||
789 | // }, 1000) | 838 | // }, 1000) |
790 | // that.vicoeEnd() | 839 | // that.vicoeEnd() |
791 | }, | 840 | }, |
792 | - cancel: function() { | 841 | + cancel: function () { |
793 | // alert("用户拒绝授权录音"); | 842 | // alert("用户拒绝授权录音"); |
794 | } | 843 | } |
795 | }); | 844 | }); |
@@ -804,7 +853,7 @@ export default { | @@ -804,7 +853,7 @@ export default { | ||
804 | clearInterval(timer); | 853 | clearInterval(timer); |
805 | 854 | ||
806 | wx.stopRecord({ | 855 | wx.stopRecord({ |
807 | - success: function(res) { | 856 | + success: function (res) { |
808 | var localId = res.localId; | 857 | var localId = res.localId; |
809 | that.localId = res.localId; | 858 | that.localId = res.localId; |
810 | that.upyuyin(); | 859 | that.upyuyin(); |
@@ -813,9 +862,17 @@ export default { | @@ -813,9 +862,17 @@ export default { | ||
813 | }, | 862 | }, |
814 | // 试听录音 | 863 | // 试听录音 |
815 | shiting() { | 864 | shiting() { |
816 | - wx.playVoice({ | ||
817 | - localId: this.localId // 需要播放的音频的本地ID,由stopRecord接口获得 | 865 | + this.shitingshow=!this.shitingshow; |
866 | + if(this.shitingshow==true){ | ||
867 | + wx.playVoice({ | ||
868 | + localId: this.localId // 需要播放的音频的本地ID,由stopRecord接口获得 | ||
818 | }); | 869 | }); |
870 | + }else{ | ||
871 | + wx.stopVoice({ | ||
872 | + localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
873 | + }); | ||
874 | + } | ||
875 | + | ||
819 | }, | 876 | }, |
820 | // 结束本次上传 | 877 | // 结束本次上传 |
821 | hideshangchuan() { | 878 | hideshangchuan() { |
@@ -824,9 +881,7 @@ export default { | @@ -824,9 +881,7 @@ export default { | ||
824 | // 发送语音 | 881 | // 发送语音 |
825 | sendyuyin() { | 882 | sendyuyin() { |
826 | // 发送语音 | 883 | // 发送语音 |
827 | - | ||
828 | let that = this; | 884 | let that = this; |
829 | - | ||
830 | this.shanghcuanshow = false; | 885 | this.shanghcuanshow = false; |
831 | that.luprocess = false; | 886 | that.luprocess = false; |
832 | // this.issuccess = true | 887 | // this.issuccess = true |
@@ -838,6 +893,11 @@ export default { | @@ -838,6 +893,11 @@ export default { | ||
838 | data: that.serverId | 893 | data: that.serverId |
839 | }; | 894 | }; |
840 | objdata = JSON.stringify(objdata); | 895 | objdata = JSON.stringify(objdata); |
896 | + that.time = 1 | ||
897 | + wx.stopVoice({ | ||
898 | + localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
899 | + }); | ||
900 | + // alert("发送的语音") | ||
841 | // alert(objdata); | 901 | // alert(objdata); |
842 | that.websocketsend(objdata); | 902 | that.websocketsend(objdata); |
843 | // this.shanghcuanshow = true | 903 | // this.shanghcuanshow = true |
@@ -846,7 +906,6 @@ export default { | @@ -846,7 +906,6 @@ export default { | ||
846 | }, | 906 | }, |
847 | shangyuyin() { | 907 | shangyuyin() { |
848 | let that = this; | 908 | let that = this; |
849 | - | ||
850 | this.shanghcuanshow = false; | 909 | this.shanghcuanshow = false; |
851 | that.luprocess = false; | 910 | that.luprocess = false; |
852 | this.issuccess = true; | 911 | this.issuccess = true; |
@@ -867,7 +926,7 @@ export default { | @@ -867,7 +926,7 @@ export default { | ||
867 | wx.uploadVoice({ | 926 | wx.uploadVoice({ |
868 | localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得 | 927 | localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得 |
869 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 928 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
870 | - success: function(res) { | 929 | + success: function (res) { |
871 | var serverId = res.serverId; // 返回音频的服务器端ID | 930 | var serverId = res.serverId; // 返回音频的服务器端ID |
872 | that.serverId = res.serverId; | 931 | that.serverId = res.serverId; |
873 | // alert(that.serverId); | 932 | // alert(that.serverId); |
@@ -882,6 +941,9 @@ export default { | @@ -882,6 +941,9 @@ export default { | ||
882 | this.luprocess = false; | 941 | this.luprocess = false; |
883 | this.beginlushow = true; | 942 | this.beginlushow = true; |
884 | clearInterval(this.timer); | 943 | clearInterval(this.timer); |
944 | + wx.stopVoice({ | ||
945 | + localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
946 | + }); | ||
885 | }, | 947 | }, |
886 | // 停止直播 | 948 | // 停止直播 |
887 | stopbtn() { | 949 | stopbtn() { |
@@ -917,11 +979,11 @@ export default { | @@ -917,11 +979,11 @@ export default { | ||
917 | 979 | ||
918 | that.$axios | 980 | that.$axios |
919 | .post(url, param) | 981 | .post(url, param) |
920 | - .then(function(res) { | 982 | + .then(function (res) { |
921 | console.log(res); | 983 | console.log(res); |
922 | that.is_self = res.data.lesson.is_self; | 984 | that.is_self = res.data.lesson.is_self; |
923 | }) | 985 | }) |
924 | - .catch(function(err) { | 986 | + .catch(function (err) { |
925 | console.log(err); | 987 | console.log(err); |
926 | }); | 988 | }); |
927 | }, | 989 | }, |
@@ -939,15 +1001,17 @@ export default { | @@ -939,15 +1001,17 @@ export default { | ||
939 | websocketonopen() { | 1001 | websocketonopen() { |
940 | //连接建立之后执行send方法发送数据 | 1002 | //连接建立之后执行send方法发送数据 |
941 | console.log("连接成功"); | 1003 | console.log("连接成功"); |
1004 | + this.cardzheng=false | ||
942 | }, | 1005 | }, |
943 | websocketonerror() { | 1006 | websocketonerror() { |
944 | //连接建立失败重连 | 1007 | //连接建立失败重连 |
945 | this.initWebSocket(); | 1008 | this.initWebSocket(); |
946 | }, | 1009 | }, |
947 | websocketonmessage(e) { | 1010 | websocketonmessage(e) { |
1011 | + // alert('接收数据') | ||
1012 | + | ||
948 | //数据接收 | 1013 | //数据接收 |
949 | let that = this; | 1014 | let that = this; |
950 | - | ||
951 | if (this.number == 0) { | 1015 | if (this.number == 0) { |
952 | let obj = { | 1016 | let obj = { |
953 | lesson_id: this.id, | 1017 | lesson_id: this.id, |
@@ -958,27 +1022,28 @@ export default { | @@ -958,27 +1022,28 @@ export default { | ||
958 | obj = JSON.stringify(obj); | 1022 | obj = JSON.stringify(obj); |
959 | console.log(obj); | 1023 | console.log(obj); |
960 | this.websocketsend(obj); | 1024 | this.websocketsend(obj); |
961 | - | ||
962 | // let data=e. | 1025 | // let data=e. |
963 | } | 1026 | } |
964 | this.number = this.number + 1; | 1027 | this.number = this.number + 1; |
965 | this.number = this.number; | 1028 | this.number = this.number; |
966 | let datak = e.data; | 1029 | let datak = e.data; |
967 | console.log(e, 88890999); | 1030 | console.log(e, 88890999); |
968 | - console.log(e.data); | ||
969 | // alert(e.data) | 1031 | // alert(e.data) |
970 | - // alert(e.data.first) | ||
971 | let data = JSON.parse(e.data); | 1032 | let data = JSON.parse(e.data); |
972 | - // alert(data) | ||
973 | - console.log(data); | ||
974 | - that.group_count = data.group_count; | 1033 | + |
1034 | + | ||
1035 | + if (data.group_count) { | ||
1036 | + that.group_count = data.group_count; | ||
1037 | + } | ||
1038 | + | ||
975 | // 接收数据重新渲染列表 | 1039 | // 接收数据重新渲染列表 |
976 | if (data.lesson_id != undefined) { | 1040 | if (data.lesson_id != undefined) { |
977 | const redata = JSON.parse(e.data); | 1041 | const redata = JSON.parse(e.data); |
978 | - | 1042 | + console.log(redata,'返回的数据返回的数据'); |
1043 | + console.log(redata); | ||
979 | that.group_count = redata.group_count; | 1044 | that.group_count = redata.group_count; |
980 | if (redata.code == 9) { | 1045 | if (redata.code == 9) { |
981 | - that.recordlist.forEach(function(value, index, array) { | 1046 | + that.recordlist.forEach(function (value, index, array) { |
982 | if (value.id == redata.id) { | 1047 | if (value.id == redata.id) { |
983 | that.recordlist.splice(index, 1); | 1048 | that.recordlist.splice(index, 1); |
984 | that.recordlist = that.recordlist; | 1049 | that.recordlist = that.recordlist; |
@@ -988,9 +1053,12 @@ export default { | @@ -988,9 +1053,12 @@ export default { | ||
988 | } else if (redata.code == 0) { | 1053 | } else if (redata.code == 0) { |
989 | Toast(redata.msg); | 1054 | Toast(redata.msg); |
990 | } else if (redata.code == 1) { | 1055 | } else if (redata.code == 1) { |
1056 | + // alert('push 进去了') | ||
1057 | + | ||
991 | that.recordlist.push(redata); | 1058 | that.recordlist.push(redata); |
992 | that.recordlist = that.recordlist; | 1059 | that.recordlist = that.recordlist; |
993 | that.$forceUpdate(); | 1060 | that.$forceUpdate(); |
1061 | + console.log(that.recordlist); | ||
994 | that.$nextTick(() => { | 1062 | that.$nextTick(() => { |
995 | var div = document.getElementById("messagebox"); | 1063 | var div = document.getElementById("messagebox"); |
996 | var div = document.getElementsByClassName("messageitem"); | 1064 | var div = document.getElementsByClassName("messageitem"); |
@@ -999,8 +1067,10 @@ export default { | @@ -999,8 +1067,10 @@ export default { | ||
999 | div[len].scrollIntoView(); | 1067 | div[len].scrollIntoView(); |
1000 | }); | 1068 | }); |
1001 | } else if (redata.code == 2) { | 1069 | } else if (redata.code == 2) { |
1070 | + console.log('返回上一页') | ||
1002 | that.$router.go(-1); | 1071 | that.$router.go(-1); |
1003 | } | 1072 | } |
1073 | + | ||
1004 | } | 1074 | } |
1005 | }, | 1075 | }, |
1006 | websocketsend(Data) { | 1076 | websocketsend(Data) { |
@@ -1009,8 +1079,11 @@ export default { | @@ -1009,8 +1079,11 @@ export default { | ||
1009 | this.websock.send(Data); | 1079 | this.websock.send(Data); |
1010 | }, | 1080 | }, |
1011 | websocketclose(e) { | 1081 | websocketclose(e) { |
1082 | + this.number = 0 | ||
1083 | + this.initWebSocket(); | ||
1012 | //关闭 | 1084 | //关闭 |
1013 | console.log("断开连接", e); | 1085 | console.log("断开连接", e); |
1086 | + this.cardzheng=true | ||
1014 | }, | 1087 | }, |
1015 | // 获取直播列表 | 1088 | // 获取直播列表 |
1016 | getzhibolist() { | 1089 | getzhibolist() { |
@@ -1024,13 +1097,13 @@ export default { | @@ -1024,13 +1097,13 @@ export default { | ||
1024 | 1097 | ||
1025 | that.$axios | 1098 | that.$axios |
1026 | .post(url, param) | 1099 | .post(url, param) |
1027 | - .then(function(res) { | 1100 | + .then(function (res) { |
1028 | console.log(res, "直播列表"); | 1101 | console.log(res, "直播列表"); |
1029 | if (that.page == 1) { | 1102 | if (that.page == 1) { |
1030 | // 页面滚动到某一个位置 | 1103 | // 页面滚动到某一个位置 |
1031 | let len = res.data.record.length; | 1104 | let len = res.data.record.length; |
1032 | len = len - 1; | 1105 | len = len - 1; |
1033 | - res.data.record.forEach(function(value, index, array) { | 1106 | + res.data.record.forEach(function (value, index, array) { |
1034 | if (index == len) { | 1107 | if (index == len) { |
1035 | value.idkk = "targetboxk"; | 1108 | value.idkk = "targetboxk"; |
1036 | that.$nextTick(() => { | 1109 | that.$nextTick(() => { |
@@ -1049,25 +1122,29 @@ export default { | @@ -1049,25 +1122,29 @@ export default { | ||
1049 | // 拼接数组倒叙 | 1122 | // 拼接数组倒叙 |
1050 | var arr = [...res.data.record, ...that.recordlist]; | 1123 | var arr = [...res.data.record, ...that.recordlist]; |
1051 | that.recordlist = arr; | 1124 | that.recordlist = arr; |
1052 | - that.recordlist.forEach(function(value, index, array) { | 1125 | + that.recordlist.forEach(function (value, index, array) { |
1053 | value.sel = false; | 1126 | value.sel = false; |
1054 | }); | 1127 | }); |
1055 | that.recordlist = that.recordlist; | 1128 | that.recordlist = that.recordlist; |
1056 | that.this_page = res.data.this_page; | 1129 | that.this_page = res.data.this_page; |
1057 | that.total_page = res.data.total_page; | 1130 | that.total_page = res.data.total_page; |
1058 | }) | 1131 | }) |
1059 | - .catch(function(err) { | 1132 | + .catch(function (err) { |
1060 | console.log(err); | 1133 | console.log(err); |
1061 | }); | 1134 | }); |
1062 | }, | 1135 | }, |
1063 | audioplay(item, index) { | 1136 | audioplay(item, index) { |
1064 | let that = this; | 1137 | let that = this; |
1065 | console.log(item); | 1138 | console.log(item); |
1139 | + var botime=0 | ||
1140 | + var intervl=setInterval(function(){ | ||
1141 | + botime++; | ||
1142 | + },1000) | ||
1066 | // 播放某一个语音 | 1143 | // 播放某一个语音 |
1067 | 1144 | ||
1068 | // that.recordlist[index].sel = !that.recordlist[index].sel; | 1145 | // that.recordlist[index].sel = !that.recordlist[index].sel; |
1069 | 1146 | ||
1070 | - that.recordlist.forEach(function(value, indexk, array) { | 1147 | + that.recordlist.forEach(function (value, indexk, array) { |
1071 | if (index == indexk) { | 1148 | if (index == indexk) { |
1072 | that.recordlist[indexk].sel = !that.recordlist[indexk].sel; | 1149 | that.recordlist[indexk].sel = !that.recordlist[indexk].sel; |
1073 | } else { | 1150 | } else { |
@@ -1083,37 +1160,24 @@ export default { | @@ -1083,37 +1160,24 @@ export default { | ||
1083 | if (this.recordlist[index].sel == true) { | 1160 | if (this.recordlist[index].sel == true) { |
1084 | // 开始播放 | 1161 | // 开始播放 |
1085 | let localId = ""; | 1162 | let localId = ""; |
1163 | + // alert(JSON.stringify(item.data)) | ||
1086 | wx.downloadVoice({ | 1164 | wx.downloadVoice({ |
1087 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | 1165 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 |
1088 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 1166 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
1089 | - success: function(res) { | 1167 | + success: function (res) { |
1168 | + // alert(JSON.stringify(res)) | ||
1090 | localId = res.localId; // 返回音频的本地ID | 1169 | localId = res.localId; // 返回音频的本地ID |
1091 | that.playlocalid = localId; | 1170 | that.playlocalid = localId; |
1092 | that.recordlist[index].localId = localId; | 1171 | that.recordlist[index].localId = localId; |
1093 | that.recordlist = that.recordlist; | 1172 | that.recordlist = that.recordlist; |
1094 | that.$forceUpdate(); | 1173 | that.$forceUpdate(); |
1095 | - | ||
1096 | wx.playVoice({ | 1174 | wx.playVoice({ |
1097 | localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得 | 1175 | localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得 |
1098 | }); | 1176 | }); |
1177 | + },fail: function(err) { | ||
1178 | + alert(JSON.stringify(err)) | ||
1099 | } | 1179 | } |
1100 | }); | 1180 | }); |
1101 | - | ||
1102 | - // if (this.recordlist[index].data != that.stopurl) { | ||
1103 | - // wx.downloadVoice({ | ||
1104 | - // serverId: this.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | ||
1105 | - // isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
1106 | - // success: function (res) { | ||
1107 | - | ||
1108 | - // wx.stopVoice({ | ||
1109 | - // localId: res.localId // 需要停止的音频的本地ID,由stopRecord接口获得 | ||
1110 | - // }); | ||
1111 | - | ||
1112 | - // } | ||
1113 | - | ||
1114 | - // }); | ||
1115 | - | ||
1116 | - // } | ||
1117 | } else if (this.recordlist[index].sel == false) { | 1181 | } else if (this.recordlist[index].sel == false) { |
1118 | // 停止播放 | 1182 | // 停止播放 |
1119 | wx.stopVoice({ | 1183 | wx.stopVoice({ |
@@ -1122,10 +1186,10 @@ export default { | @@ -1122,10 +1186,10 @@ export default { | ||
1122 | } | 1186 | } |
1123 | // 监听播放停止播放下一个 | 1187 | // 监听播放停止播放下一个 |
1124 | wx.onVoicePlayEnd({ | 1188 | wx.onVoicePlayEnd({ |
1125 | - success: function(res) { | 1189 | + success: function (res) { |
1126 | var localId = res.localId; // 返回音频的本地ID | 1190 | var localId = res.localId; // 返回音频的本地ID |
1127 | 1191 | ||
1128 | - that.recordlist.forEach(function(value, index, array) { | 1192 | + that.recordlist.forEach(function (value, index, array) { |
1129 | if (localId == value.localId) { | 1193 | if (localId == value.localId) { |
1130 | value.sel = false; | 1194 | value.sel = false; |
1131 | } | 1195 | } |
@@ -1135,26 +1199,29 @@ export default { | @@ -1135,26 +1199,29 @@ export default { | ||
1135 | that.$forceUpdate(); | 1199 | that.$forceUpdate(); |
1136 | 1200 | ||
1137 | index = index + 1; | 1201 | index = index + 1; |
1138 | - | ||
1139 | - if (that.recordlist[index].data != undefined) { | ||
1140 | - if (that.recordlist[index].type == 3) { | ||
1141 | - that.recordlist[index].sel = true; | ||
1142 | - wx.downloadVoice({ | ||
1143 | - serverId: that.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | ||
1144 | - isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
1145 | - success: function(res) { | ||
1146 | - let localId = res.localId; // 返回音频的本地ID | ||
1147 | - that.recordlist[index].localId = localId; | ||
1148 | - that.recordlist[index].sel = true; | ||
1149 | - that.recordlist = that.recordlist; | ||
1150 | - that.$forceUpdate(); | ||
1151 | - wx.playVoice({ | ||
1152 | - localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
1153 | - }); | ||
1154 | - } | ||
1155 | - }); | 1202 | + if(botime>=Number(item.times.split(".")[0])){ |
1203 | + for (var i = index; i < that.recordlist.length; i++) { | ||
1204 | + if (that.recordlist[i].type == 3) { | ||
1205 | + index = i; | ||
1206 | + that.recordlist[i].sel = true; | ||
1207 | + wx.downloadVoice({ | ||
1208 | + serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | ||
1209 | + isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
1210 | + success: function (res) { | ||
1211 | + let localId = res.localId; // 返回音频的本地ID | ||
1212 | + that.recordlist[i].localId = localId; | ||
1213 | + that.recordlist[i].sel = true; | ||
1214 | + that.recordlist = that.recordlist; | ||
1215 | + that.$forceUpdate(); | ||
1216 | + wx.playVoice({ | ||
1217 | + localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
1218 | + }); | ||
1219 | + } | ||
1220 | + }); | ||
1221 | + return; | ||
1222 | + } | ||
1223 | + } | ||
1156 | } | 1224 | } |
1157 | - } | ||
1158 | that.recordlist = that.recordlist; | 1225 | that.recordlist = that.recordlist; |
1159 | that.$forceUpdate(); | 1226 | that.$forceUpdate(); |
1160 | } | 1227 | } |
@@ -1163,6 +1230,10 @@ export default { | @@ -1163,6 +1230,10 @@ export default { | ||
1163 | // 发送文字 | 1230 | // 发送文字 |
1164 | send() { | 1231 | send() { |
1165 | // var ws = new WebSocket("ws://tangyuanji.t.brotop.cn:11001"); | 1232 | // var ws = new WebSocket("ws://tangyuanji.t.brotop.cn:11001"); |
1233 | + if(this.text==''){ | ||
1234 | + Toast("请写留言") | ||
1235 | + return false | ||
1236 | + } | ||
1166 | let objdata = { | 1237 | let objdata = { |
1167 | lesson_id: this.id, | 1238 | lesson_id: this.id, |
1168 | type: 1, | 1239 | type: 1, |
@@ -1178,12 +1249,14 @@ export default { | @@ -1178,12 +1249,14 @@ export default { | ||
1178 | // ws.send(objdata); | 1249 | // ws.send(objdata); |
1179 | }, | 1250 | }, |
1180 | gotouchstart(item) { | 1251 | gotouchstart(item) { |
1252 | + // event.preventDefault(); | ||
1253 | + window.event.stopPropagation() | ||
1181 | let that = this; | 1254 | let that = this; |
1182 | clearTimeout(timeOutEvent); //清除定时器 | 1255 | clearTimeout(timeOutEvent); //清除定时器 |
1183 | timeOutEvent = 0; | 1256 | timeOutEvent = 0; |
1184 | - timeOutEvent = setTimeout(function() { | 1257 | + timeOutEvent = setTimeout(function () { |
1185 | Dialog.confirm({ | 1258 | Dialog.confirm({ |
1186 | - title: "是否删除帖子" | 1259 | + title: "是否撤销帖子" |
1187 | }) | 1260 | }) |
1188 | .then(res => { | 1261 | .then(res => { |
1189 | console.log(item.id); | 1262 | console.log(item.id); |
@@ -1200,7 +1273,7 @@ export default { | @@ -1200,7 +1273,7 @@ export default { | ||
1200 | objdata = JSON.stringify(objdata); | 1273 | objdata = JSON.stringify(objdata); |
1201 | // alert(objdata) | 1274 | // alert(objdata) |
1202 | that.websocketsend(objdata); | 1275 | that.websocketsend(objdata); |
1203 | - that.recordlist.forEach(function(value, index, array) { | 1276 | + that.recordlist.forEach(function (value, index, array) { |
1204 | if (value.id == item.id) { | 1277 | if (value.id == item.id) { |
1205 | that.recordlist.splice(index, 1); | 1278 | that.recordlist.splice(index, 1); |
1206 | that.recordlist = that.recordlist; | 1279 | that.recordlist = that.recordlist; |
@@ -1231,6 +1304,14 @@ export default { | @@ -1231,6 +1304,14 @@ export default { | ||
1231 | </script> | 1304 | </script> |
1232 | 1305 | ||
1233 | <style scoped> | 1306 | <style scoped> |
1307 | +.middlecontent{ | ||
1308 | + width:100%; | ||
1309 | + flex:1; | ||
1310 | + overflow-y: scroll; | ||
1311 | +} | ||
1312 | +.nodatatext{ | ||
1313 | + margin-top:4rem | ||
1314 | +} | ||
1234 | .van-loading { | 1315 | .van-loading { |
1235 | position: absolute; | 1316 | position: absolute; |
1236 | top: 50%; | 1317 | top: 50%; |
@@ -1407,7 +1488,7 @@ export default { | @@ -1407,7 +1488,7 @@ export default { | ||
1407 | box-sizing: border-box; | 1488 | box-sizing: border-box; |
1408 | } | 1489 | } |
1409 | .messagebotk { | 1490 | .messagebotk { |
1410 | - padding: 0.16rem 0.72rem; | 1491 | + padding:0 0.72rem; |
1411 | box-sizing: border-box; | 1492 | box-sizing: border-box; |
1412 | } | 1493 | } |
1413 | .messagebotkk { | 1494 | .messagebotkk { |
@@ -1434,7 +1515,7 @@ export default { | @@ -1434,7 +1515,7 @@ export default { | ||
1434 | border-radius: 0.4rem; | 1515 | border-radius: 0.4rem; |
1435 | box-shadow: 0 0.16rem 0.3rem 0 rgba(142, 190, 142, 0.33); | 1516 | box-shadow: 0 0.16rem 0.3rem 0 rgba(142, 190, 142, 0.33); |
1436 | position: fixed; | 1517 | position: fixed; |
1437 | - bottom: 1.2rem; | 1518 | + bottom: 1.5rem; |
1438 | right: 0.32rem; | 1519 | right: 0.32rem; |
1439 | z-index: 9; | 1520 | z-index: 9; |
1440 | } | 1521 | } |
@@ -1446,6 +1527,9 @@ export default { | @@ -1446,6 +1527,9 @@ export default { | ||
1446 | .messagelist { | 1527 | .messagelist { |
1447 | /* height: 15rem; */ | 1528 | /* height: 15rem; */ |
1448 | /* padding-bottom: 1.5rem; */ | 1529 | /* padding-bottom: 1.5rem; */ |
1530 | + padding-top:1.4rem; | ||
1531 | + box-sizing: border-box; | ||
1532 | + overflow-y: scroll; | ||
1449 | } | 1533 | } |
1450 | .contentimg { | 1534 | .contentimg { |
1451 | width: 4.15rem; | 1535 | width: 4.15rem; |
@@ -1716,4 +1800,11 @@ export default { | @@ -1716,4 +1800,11 @@ export default { | ||
1716 | opacity: 1; | 1800 | opacity: 1; |
1717 | } | 1801 | } |
1718 | } */ | 1802 | } */ |
1803 | +.listboxbox{ | ||
1804 | + display:flex; | ||
1805 | + flex-direction: column; | ||
1806 | + align-items: center; | ||
1807 | + justify-content: center; | ||
1808 | + height: 100vh; | ||
1809 | +} | ||
1719 | </style> | 1810 | </style> |
@@ -13,12 +13,14 @@ | @@ -13,12 +13,14 @@ | ||
13 | </div> | 13 | </div> |
14 | </div> | 14 | </div> |
15 | 15 | ||
16 | - <div class="nodata" v-if="recordlist.length == 0">暂无聊天记录</div> | 16 | + <div class="listboxbox"> |
17 | + <div class='middlecontent'> | ||
18 | + <div class="nodata nodatatext" v-if="recordlist.length == 0">暂无聊天记录</div> | ||
17 | <van-pull-refresh | 19 | <van-pull-refresh |
18 | v-model="isLoading" | 20 | v-model="isLoading" |
19 | @refresh="onRefresh" | 21 | @refresh="onRefresh" |
20 | class="messagelist" | 22 | class="messagelist" |
21 | - style="height:100%" | 23 | + style="height: 100%" |
22 | id="messagebox" | 24 | id="messagebox" |
23 | v-else | 25 | v-else |
24 | > | 26 | > |
@@ -167,13 +169,12 @@ | @@ -167,13 +169,12 @@ | ||
167 | </div> | 169 | </div> |
168 | </div> | 170 | </div> |
169 | </van-pull-refresh> | 171 | </van-pull-refresh> |
172 | + </div> | ||
173 | + | ||
170 | 174 | ||
171 | <!-- 底部导航 --> | 175 | <!-- 底部导航 --> |
172 | 176 | ||
173 | - <div | ||
174 | - class="messagebot messagebotkk flexone" | ||
175 | - v-if="is_self == 0 && isbot == true" | ||
176 | - > | 177 | + <div class="messagebotkk flexone" v-if="is_self == 0 && isbot == true" style="padding-bottom:0.12rem;box-sizing:border-box"> |
177 | <div class="messagebotleft"> | 178 | <div class="messagebotleft"> |
178 | <img src="../../../assets/yuyin.png" alt /> | 179 | <img src="../../../assets/yuyin.png" alt /> |
179 | </div> | 180 | </div> |
@@ -187,8 +188,8 @@ | @@ -187,8 +188,8 @@ | ||
187 | </div> | 188 | </div> |
188 | <div class="sendk" @click="send">发送</div> | 189 | <div class="sendk" @click="send">发送</div> |
189 | </div> | 190 | </div> |
190 | - <div v-if="is_self == 1"> | ||
191 | - <div class="messagebot messagebotkk flexone" v-if="sendword"> | 191 | + <div v-if="is_self == 1" style="width:100%;padding-bottom:0.12rem;box-sizing:border-box" > |
192 | + <div class="messagebotkk flexone" v-if="sendword"> | ||
192 | <div class="messagebotleft" @click="changeword"> | 193 | <div class="messagebotleft" @click="changeword"> |
193 | <img src="../../../assets/yuyin.png" alt /> | 194 | <img src="../../../assets/yuyin.png" alt /> |
194 | </div> | 195 | </div> |
@@ -202,7 +203,7 @@ | @@ -202,7 +203,7 @@ | ||
202 | </div> | 203 | </div> |
203 | <div class="sendk" @click="send">发送</div> | 204 | <div class="sendk" @click="send">发送</div> |
204 | </div> | 205 | </div> |
205 | - <div class="messagebot messagebotk flextwo" v-else> | 206 | + <div class="messagebotk flextwo" v-else> |
206 | <img | 207 | <img |
207 | src="../../../assets/yuyin.png" | 208 | src="../../../assets/yuyin.png" |
208 | alt | 209 | alt |
@@ -221,7 +222,7 @@ | @@ -221,7 +222,7 @@ | ||
221 | class="yuyinbtn" | 222 | class="yuyinbtn" |
222 | @click="yuyin" | 223 | @click="yuyin" |
223 | /> | 224 | /> |
224 | - <div class style="position:relative"> | 225 | + <div class style="position: relative"> |
225 | <input | 226 | <input |
226 | type="file" | 227 | type="file" |
227 | accept="audio/*" | 228 | accept="audio/*" |
@@ -239,6 +240,12 @@ | @@ -239,6 +240,12 @@ | ||
239 | /> | 240 | /> |
240 | </div> | 241 | </div> |
241 | </div> | 242 | </div> |
243 | + | ||
244 | + </div> | ||
245 | + | ||
246 | + | ||
247 | + | ||
248 | + | ||
242 | <div class="manypeople"> | 249 | <div class="manypeople"> |
243 | <img src="../../../assets/manypeople.png" alt class="manypeopleimg" /> | 250 | <img src="../../../assets/manypeople.png" alt class="manypeopleimg" /> |
244 | {{ group_count }} | 251 | {{ group_count }} |
@@ -269,7 +276,7 @@ | @@ -269,7 +276,7 @@ | ||
269 | </div> | 276 | </div> |
270 | </div> | 277 | </div> |
271 | <!-- 开始录制 --> | 278 | <!-- 开始录制 --> |
272 | - <div class="register" style="z-index:999" v-if="beginlushow" @click="hide"> | 279 | + <div class="register" style="z-index: 999" v-if="beginlushow" @click="hide"> |
273 | <div class="luwrap" @click.stop="beginluyin"> | 280 | <div class="luwrap" @click.stop="beginluyin"> |
274 | <div class="beginlu">开始录制</div> | 281 | <div class="beginlu">开始录制</div> |
275 | <div> | 282 | <div> |
@@ -277,11 +284,10 @@ | @@ -277,11 +284,10 @@ | ||
277 | </div> | 284 | </div> |
278 | </div> | 285 | </div> |
279 | </div> | 286 | </div> |
280 | - | ||
281 | <!-- 正在录制 --> | 287 | <!-- 正在录制 --> |
282 | - <div class="register" style="z-index:999" v-if="zhengzailu" @click="hide"> | 288 | + <div class="register" style="z-index: 999" v-if="zhengzailu" @click="hide"> |
283 | <div class="luwrap" @click.stop="finishluyin"> | 289 | <div class="luwrap" @click.stop="finishluyin"> |
284 | - <div class="beginlu">正在录音:{{ time }}'</div> | 290 | + <div class="beginlu">正在录音:{{time }}'</div> |
285 | <div> | 291 | <div> |
286 | <img src="../../../assets/zhengzailu.png" alt class="beginluimg" /> | 292 | <img src="../../../assets/zhengzailu.png" alt class="beginluimg" /> |
287 | </div> | 293 | </div> |
@@ -289,7 +295,7 @@ | @@ -289,7 +295,7 @@ | ||
289 | </div> | 295 | </div> |
290 | 296 | ||
291 | <!-- 录制完成 --> | 297 | <!-- 录制完成 --> |
292 | - <div class="register" style="z-index:999" v-if="luprocess" @click="hide"> | 298 | + <div class="register" style="z-index: 999" v-if="luprocess" @click="hide"> |
293 | <div class="luwrap"> | 299 | <div class="luwrap"> |
294 | <div class="beginlu">录音时长:{{ time }}'</div> | 300 | <div class="beginlu">录音时长:{{ time }}'</div> |
295 | <div class="flextwo chonglu"> | 301 | <div class="flextwo chonglu"> |
@@ -299,9 +305,8 @@ | @@ -299,9 +305,8 @@ | ||
299 | </div> | 305 | </div> |
300 | </div> | 306 | </div> |
301 | </div> | 307 | </div> |
302 | - | ||
303 | <!-- 温馨提示 --> | 308 | <!-- 温馨提示 --> |
304 | - <div class="register" style="z-index:999" v-if="chonglushow"> | 309 | + <div class="register" style="z-index: 999" v-if="chonglushow"> |
305 | <div class="wentipswrap"> | 310 | <div class="wentipswrap"> |
306 | <div class="tipsname">温馨提示</div> | 311 | <div class="tipsname">温馨提示</div> |
307 | <div class="waittips">您确认舍弃该录音重新录制吗</div> | 312 | <div class="waittips">您确认舍弃该录音重新录制吗</div> |
@@ -312,8 +317,7 @@ | @@ -312,8 +317,7 @@ | ||
312 | </div> | 317 | </div> |
313 | </div> | 318 | </div> |
314 | <!-- 本次录音是否上传 --> | 319 | <!-- 本次录音是否上传 --> |
315 | - | ||
316 | - <div class="register" style="z-index:999" v-if="shanghcuanshow"> | 320 | + <div class="register" style="z-index: 999" v-if="shanghcuanshow"> |
317 | <div class="wentipswrap"> | 321 | <div class="wentipswrap"> |
318 | <div class="waittips benci">本次录音是否上传</div> | 322 | <div class="waittips benci">本次录音是否上传</div> |
319 | <div class="waitbot flexone"> | 323 | <div class="waitbot flexone"> |
@@ -324,7 +328,7 @@ | @@ -324,7 +328,7 @@ | ||
324 | </div> | 328 | </div> |
325 | <van-loading type="spinner" color="#1989fa" v-if="cardzheng" /> | 329 | <van-loading type="spinner" color="#1989fa" v-if="cardzheng" /> |
326 | <!-- 是否结束录播 --> | 330 | <!-- 是否结束录播 --> |
327 | - <div class="register" style="z-index:999" v-if="overzhibo"> | 331 | + <div class="register" style="z-index: 999" v-if="overzhibo"> |
328 | <div class="wentipswrap"> | 332 | <div class="wentipswrap"> |
329 | <div class="waittips benci">是否结束直播</div> | 333 | <div class="waittips benci">是否结束直播</div> |
330 | <div class="waitbot flexone"> | 334 | <div class="waitbot flexone"> |
@@ -333,6 +337,7 @@ | @@ -333,6 +337,7 @@ | ||
333 | </div> | 337 | </div> |
334 | </div> | 338 | </div> |
335 | </div> | 339 | </div> |
340 | + | ||
336 | </div> | 341 | </div> |
337 | </template> | 342 | </template> |
338 | 343 | ||
@@ -341,6 +346,7 @@ var timeOutEvent = ""; | @@ -341,6 +346,7 @@ var timeOutEvent = ""; | ||
341 | import wx from "jweixin-1.6.0"; | 346 | import wx from "jweixin-1.6.0"; |
342 | import Vue from "vue"; | 347 | import Vue from "vue"; |
343 | import { PullRefresh, Toast, Dialog, Loading } from "vant"; | 348 | import { PullRefresh, Toast, Dialog, Loading } from "vant"; |
349 | +import { pushHistory } from '../../../utils/back.js';//监听返回上一页的判断 | ||
344 | Vue.use(PullRefresh); | 350 | Vue.use(PullRefresh); |
345 | Vue.use(Toast); | 351 | Vue.use(Toast); |
346 | Vue.use(Loading); | 352 | Vue.use(Loading); |
@@ -382,15 +388,25 @@ export default { | @@ -382,15 +388,25 @@ export default { | ||
382 | stopurl: "", | 388 | stopurl: "", |
383 | stopindex: 0, | 389 | stopindex: 0, |
384 | playlocalid: "", | 390 | playlocalid: "", |
385 | - cardzheng: false | 391 | + cardzheng: false, |
392 | + containue:'', | ||
393 | + boindex:0, | ||
394 | + shitingshow:false | ||
395 | + | ||
386 | }; | 396 | }; |
387 | }, | 397 | }, |
388 | created() { | 398 | created() { |
389 | - document.querySelector("#app").style.overflow = "scroll"; | 399 | + //解决苹果手机底部空白 |
400 | + // document.body.addEventListener('touchmove', (e) => { | ||
401 | + // if (e._isScroller) return; | ||
402 | + // e.preventDefault() | ||
403 | + // }, { | ||
404 | + // passive: false | ||
405 | + // }) | ||
406 | + // document.querySelector("#app").style.overflow = "scroll"; | ||
390 | // 获取个人中心 | 407 | // 获取个人中心 |
391 | this.getuserinfo(); | 408 | this.getuserinfo(); |
392 | this.baseurl = "http://" + location.host; | 409 | this.baseurl = "http://" + location.host; |
393 | - let div = this.$refs["message-list"]; | ||
394 | document.title = localStorage.getItem("coursename"); | 410 | document.title = localStorage.getItem("coursename"); |
395 | this.id = this.$route.query.id; | 411 | this.id = this.$route.query.id; |
396 | // 获取appid | 412 | // 获取appid |
@@ -402,9 +418,8 @@ export default { | @@ -402,9 +418,8 @@ export default { | ||
402 | }, | 418 | }, |
403 | mounted() { | 419 | mounted() { |
404 | let that = this; | 420 | let that = this; |
405 | - console.log(that.target, "99997878666"); | 421 | + this.onpopstate() |
406 | }, | 422 | }, |
407 | - | ||
408 | watch: {}, | 423 | watch: {}, |
409 | beforeRouteEnter(to, from, next) { | 424 | beforeRouteEnter(to, from, next) { |
410 | var u = navigator.userAgent; | 425 | var u = navigator.userAgent; |
@@ -417,7 +432,36 @@ export default { | @@ -417,7 +432,36 @@ export default { | ||
417 | next(); | 432 | next(); |
418 | } | 433 | } |
419 | }, | 434 | }, |
435 | + destroyed () { | ||
436 | + // 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件 | ||
437 | + window.removeEventListener("popstate", this.closeViews, false); | ||
438 | + }, | ||
439 | + | ||
420 | methods: { | 440 | methods: { |
441 | + // 监听页面卸载 | ||
442 | + // 监听历史记录点, 添加返回事件监听 | ||
443 | + onpopstate () { | ||
444 | + pushHistory() | ||
445 | + // 给window添加一个popstate事件,拦截返回键,执行this.closeViews事件,addEventListener需要指向一个方法 | ||
446 | + window.addEventListener("popstate", this.closeViews, false); | ||
447 | + }, | ||
448 | + // 返回上一页 | ||
449 | + closeViews () { | ||
450 | + console.log(4373474378) | ||
451 | + this.$router.go(-1) | ||
452 | + this.recordlist.forEach(function(value,index,array){ | ||
453 | + value.sel=false | ||
454 | + }) | ||
455 | + this.recordlist=this.recordlist; | ||
456 | + wx.stopVoice({ | ||
457 | + localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
458 | + }); | ||
459 | + wx.stopVoice({ | ||
460 | + localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
461 | + }); | ||
462 | + this.$forceUpdate(); | ||
463 | + }, | ||
464 | + | ||
421 | // 上传音频 | 465 | // 上传音频 |
422 | afterRead(e) { | 466 | afterRead(e) { |
423 | console.log(e); | 467 | console.log(e); |
@@ -432,7 +476,7 @@ export default { | @@ -432,7 +476,7 @@ export default { | ||
432 | 476 | ||
433 | that.$uploadFile | 477 | that.$uploadFile |
434 | .post(url, formdata) | 478 | .post(url, formdata) |
435 | - .then(function(res) { | 479 | + .then(function (res) { |
436 | that.cardzheng = false; | 480 | that.cardzheng = false; |
437 | console.log(res); | 481 | console.log(res); |
438 | let objdata = { | 482 | let objdata = { |
@@ -460,11 +504,11 @@ export default { | @@ -460,11 +504,11 @@ export default { | ||
460 | 504 | ||
461 | that.$axios | 505 | that.$axios |
462 | .post(url, param) | 506 | .post(url, param) |
463 | - .then(function(res) { | 507 | + .then(function (res) { |
464 | console.log(res); | 508 | console.log(res); |
465 | that.user_id = res.data.id; | 509 | that.user_id = res.data.id; |
466 | }) | 510 | }) |
467 | - .catch(function(err) {}); | 511 | + .catch(function (err) { }); |
468 | }, | 512 | }, |
469 | 513 | ||
470 | // 视频上拉加载 | 514 | // 视频上拉加载 |
@@ -516,7 +560,7 @@ export default { | @@ -516,7 +560,7 @@ export default { | ||
516 | 560 | ||
517 | that.$axios | 561 | that.$axios |
518 | .post(url, param) | 562 | .post(url, param) |
519 | - .then(function(res) { | 563 | + .then(function (res) { |
520 | console.log(res, "jssdkjsskd"); | 564 | console.log(res, "jssdkjsskd"); |
521 | wx.config({ | 565 | wx.config({ |
522 | debug: false, | 566 | debug: false, |
@@ -543,7 +587,7 @@ export default { | @@ -543,7 +587,7 @@ export default { | ||
543 | 587 | ||
544 | that.sharetofriend(); | 588 | that.sharetofriend(); |
545 | }) | 589 | }) |
546 | - .catch(function(err) { | 590 | + .catch(function (err) { |
547 | console.log(err); | 591 | console.log(err); |
548 | }); | 592 | }); |
549 | }, | 593 | }, |
@@ -552,11 +596,11 @@ export default { | @@ -552,11 +596,11 @@ export default { | ||
552 | sharetofriend() { | 596 | sharetofriend() { |
553 | var that = this; | 597 | var that = this; |
554 | // 处理验证失败的信息 | 598 | // 处理验证失败的信息 |
555 | - wx.error(function(res) { | ||
556 | - logUtil.printLog("验证失败返回的信息:", res); | 599 | + wx.error(function (res) { |
600 | + // logUtil.printLog("验证失败返回的信息:", res); | ||
557 | }); | 601 | }); |
558 | // 处理验证成功的信息 | 602 | // 处理验证成功的信息 |
559 | - wx.ready(function() { | 603 | + wx.ready(function () { |
560 | // alert(window.location.href.split('#')[0]); | 604 | // alert(window.location.href.split('#')[0]); |
561 | // var share_title = that.sharemsg.title; | 605 | // var share_title = that.sharemsg.title; |
562 | // if (share_title.indexOf("${title}") >= 0) { | 606 | // if (share_title.indexOf("${title}") >= 0) { |
@@ -591,16 +635,16 @@ export default { | @@ -591,16 +635,16 @@ export default { | ||
591 | 635 | ||
592 | // 分享图标 | 636 | // 分享图标 |
593 | // desc: that.sharemsg.content, | 637 | // desc: that.sharemsg.content, |
594 | - success: function(res) { | 638 | + success: function (res) { |
595 | // 用户确认分享后执行的回调函数 | 639 | // 用户确认分享后执行的回调函数 |
596 | console.log("suss"); | 640 | console.log("suss"); |
597 | - logUtil.printLog("分享到朋友圈成功返回的信息为:", res); | ||
598 | - that.showMsg("分享成功!"); | 641 | + // logUtil.printLog("分享到朋友圈成功返回的信息为:", res); |
642 | + // that.showMsg("分享成功!"); | ||
599 | }, | 643 | }, |
600 | - cancel: function(res) { | 644 | + cancel: function (res) { |
601 | // 用户取消分享后执行的回调函数 | 645 | // 用户取消分享后执行的回调函数 |
602 | console.log("err"); | 646 | console.log("err"); |
603 | - logUtil.printLog("取消分享到朋友圈返回的信息为:", res); | 647 | + // logUtil.printLog("取消分享到朋友圈返回的信息为:", res); |
604 | } | 648 | } |
605 | }), | 649 | }), |
606 | // 分享给朋友 | 650 | // 分享给朋友 |
@@ -620,13 +664,13 @@ export default { | @@ -620,13 +664,13 @@ export default { | ||
620 | // 分享图标 | 664 | // 分享图标 |
621 | type: "", // 分享类型,music、video或link,不填默认为link | 665 | type: "", // 分享类型,music、video或link,不填默认为link |
622 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 | 666 | dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空 |
623 | - success: function(res) { | 667 | + success: function (res) { |
624 | // 用户确认分享后执行的回调函数 | 668 | // 用户确认分享后执行的回调函数 |
625 | - logUtil.printLog("分享给朋友成功返回的信息为:", res); | 669 | + // logUtil.printLog("分享给朋友成功返回的信息为:", res); |
626 | }, | 670 | }, |
627 | - cancel: function(res) { | 671 | + cancel: function (res) { |
628 | // 用户取消分享后执行的回调函数 | 672 | // 用户取消分享后执行的回调函数 |
629 | - logUtil.printLog("取消分享给朋友返回的信息为:", res); | 673 | + // logUtil.printLog("取消分享给朋友返回的信息为:", res); |
630 | } | 674 | } |
631 | }); | 675 | }); |
632 | }); | 676 | }); |
@@ -639,13 +683,13 @@ export default { | @@ -639,13 +683,13 @@ export default { | ||
639 | count: 1, // 默认9 | 683 | count: 1, // 默认9 |
640 | sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有 | 684 | sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有 |
641 | sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 | 685 | sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 |
642 | - success: function(res) { | 686 | + success: function (res) { |
643 | var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 | 687 | var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 |
644 | 688 | ||
645 | wx.uploadImage({ | 689 | wx.uploadImage({ |
646 | localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得 | 690 | localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得 |
647 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 691 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
648 | - success: function(res) { | 692 | + success: function (res) { |
649 | var serverId = res.serverId; // 返回图片的服务器端ID | 693 | var serverId = res.serverId; // 返回图片的服务器端ID |
650 | that.serverId = res.serverId; | 694 | that.serverId = res.serverId; |
651 | that.upload(); | 695 | that.upload(); |
@@ -667,7 +711,7 @@ export default { | @@ -667,7 +711,7 @@ export default { | ||
667 | 711 | ||
668 | that.$axios | 712 | that.$axios |
669 | .post(url, param) | 713 | .post(url, param) |
670 | - .then(function(res) { | 714 | + .then(function (res) { |
671 | console.log(res); | 715 | console.log(res); |
672 | that.videourl = res.data.media; | 716 | that.videourl = res.data.media; |
673 | let objdata = { | 717 | let objdata = { |
@@ -682,7 +726,7 @@ export default { | @@ -682,7 +726,7 @@ export default { | ||
682 | that.websocketsend(objdata); | 726 | that.websocketsend(objdata); |
683 | // alert(that.videourl) | 727 | // alert(that.videourl) |
684 | }) | 728 | }) |
685 | - .catch(function(err) { | 729 | + .catch(function (err) { |
686 | console.log(err); | 730 | console.log(err); |
687 | }); | 731 | }); |
688 | }, | 732 | }, |
@@ -701,6 +745,9 @@ export default { | @@ -701,6 +745,9 @@ export default { | ||
701 | this.beginlushow = false; | 745 | this.beginlushow = false; |
702 | this.zhengzailu = false; | 746 | this.zhengzailu = false; |
703 | this.luprocess = false; | 747 | this.luprocess = false; |
748 | + clearInterval(timer) | ||
749 | + timer=null | ||
750 | + this.time = 1 | ||
704 | wx.pauseVoice({ | 751 | wx.pauseVoice({ |
705 | localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | 752 | localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 |
706 | }); | 753 | }); |
@@ -734,36 +781,61 @@ export default { | @@ -734,36 +781,61 @@ export default { | ||
734 | yuyin() { | 781 | yuyin() { |
735 | this.beginlushow = true; | 782 | this.beginlushow = true; |
736 | this.yuyintype = 1; | 783 | this.yuyintype = 1; |
784 | + this.recordlist.forEach(function(value,index,array){ | ||
785 | + value.sel=false | ||
786 | + }) | ||
787 | + this.recordlist=this.recordlist; | ||
788 | + this.$forceUpdate(); | ||
789 | + wx.stopVoice({ | ||
790 | + localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
791 | + }); | ||
737 | }, | 792 | }, |
738 | - // 开始录制 | 793 | + |
739 | // 开始录音 | 794 | // 开始录音 |
740 | beginluyin() { | 795 | beginluyin() { |
741 | - console.log(83434898989); | 796 | + console.log(83434898989,timer); |
742 | let that = this; | 797 | let that = this; |
798 | + | ||
743 | that.beginlushow = false; | 799 | that.beginlushow = false; |
744 | that.zhengzailu = true; | 800 | that.zhengzailu = true; |
745 | let time = 0; | 801 | let time = 0; |
746 | that.time = 1; | 802 | that.time = 1; |
747 | - timer = setInterval(() => { | 803 | + timer = setInterval(function () { |
748 | time++; | 804 | time++; |
805 | + console.log(time,'计时') | ||
749 | that.time = time; | 806 | that.time = time; |
750 | - console.log(that.time); | ||
751 | - }, 1000); | 807 | + if (that.time == 60) { |
808 | + clearInterval(timer); | ||
809 | + timer=null | ||
810 | + this.zhengzailu = false; | ||
811 | + this.luprocess = true; | ||
812 | + wx.stopRecord({ | ||
813 | + success: function (res) { | ||
814 | + var localId = res.localId; | ||
815 | + that.localId = res.localId; | ||
816 | + that.upyuyin(); | ||
817 | + } | ||
818 | + }); | ||
819 | + } | ||
820 | + }, 1000) | ||
752 | wx.startRecord({ | 821 | wx.startRecord({ |
753 | - success: function(res) { | 822 | + success: function (res) { |
754 | // alert(JSON.stringify(res)) | 823 | // alert(JSON.stringify(res)) |
755 | - consoel.log(res, 99977775655); | ||
756 | - // alert('成功调起录音') | 824 | + |
757 | // that.timer = setInterval(() => { | 825 | // that.timer = setInterval(() => { |
758 | // time++; | 826 | // time++; |
759 | // that.time = time | 827 | // that.time = time |
760 | // }, 1000) | 828 | // }, 1000) |
761 | // that.vicoeEnd() | 829 | // that.vicoeEnd() |
762 | }, | 830 | }, |
763 | - cancel: function() { | 831 | + cancel: function () { |
764 | // alert("用户拒绝授权录音"); | 832 | // alert("用户拒绝授权录音"); |
765 | } | 833 | } |
766 | }); | 834 | }); |
835 | + | ||
836 | + | ||
837 | + | ||
838 | + | ||
767 | }, | 839 | }, |
768 | 840 | ||
769 | // 完成录音 | 841 | // 完成录音 |
@@ -771,11 +843,10 @@ export default { | @@ -771,11 +843,10 @@ export default { | ||
771 | let that = this; | 843 | let that = this; |
772 | this.zhengzailu = false; | 844 | this.zhengzailu = false; |
773 | this.luprocess = true; | 845 | this.luprocess = true; |
774 | - | ||
775 | clearInterval(timer); | 846 | clearInterval(timer); |
776 | - | 847 | + timer=null |
777 | wx.stopRecord({ | 848 | wx.stopRecord({ |
778 | - success: function(res) { | 849 | + success: function (res) { |
779 | var localId = res.localId; | 850 | var localId = res.localId; |
780 | that.localId = res.localId; | 851 | that.localId = res.localId; |
781 | that.upyuyin(); | 852 | that.upyuyin(); |
@@ -784,9 +855,20 @@ export default { | @@ -784,9 +855,20 @@ export default { | ||
784 | }, | 855 | }, |
785 | // 试听录音 | 856 | // 试听录音 |
786 | shiting() { | 857 | shiting() { |
787 | - wx.playVoice({ | ||
788 | - localId: this.localId // 需要播放的音频的本地ID,由stopRecord接口获得 | 858 | + console.log('试听语音',this.localId |
859 | + ) | ||
860 | + this.shitingshow=!this.shitingshow; | ||
861 | + if(this.shitingshow==true){ | ||
862 | + wx.playVoice({ | ||
863 | + localId: this.localId // 需要播放的音频的本地ID,由stopRecord接口获得 | ||
789 | }); | 864 | }); |
865 | + }else{ | ||
866 | + wx.stopVoice({ | ||
867 | + localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
868 | + }); | ||
869 | + } | ||
870 | + clearInterval(timer) | ||
871 | + timer=null | ||
790 | }, | 872 | }, |
791 | // 结束本次上传 | 873 | // 结束本次上传 |
792 | hideshangchuan() { | 874 | hideshangchuan() { |
@@ -795,7 +877,6 @@ export default { | @@ -795,7 +877,6 @@ export default { | ||
795 | // 发送语音 | 877 | // 发送语音 |
796 | sendyuyin() { | 878 | sendyuyin() { |
797 | let that = this; | 879 | let that = this; |
798 | - | ||
799 | this.shanghcuanshow = false; | 880 | this.shanghcuanshow = false; |
800 | that.luprocess = false; | 881 | that.luprocess = false; |
801 | // this.issuccess = true | 882 | // this.issuccess = true |
@@ -807,7 +888,10 @@ export default { | @@ -807,7 +888,10 @@ export default { | ||
807 | data: that.serverId | 888 | data: that.serverId |
808 | }; | 889 | }; |
809 | objdata = JSON.stringify(objdata); | 890 | objdata = JSON.stringify(objdata); |
810 | - // alert(objdata); | 891 | + wx.stopVoice({ |
892 | + localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
893 | + }); | ||
894 | + | ||
811 | that.websocketsend(objdata); | 895 | that.websocketsend(objdata); |
812 | // this.shanghcuanshow = true | 896 | // this.shanghcuanshow = true |
813 | }, | 897 | }, |
@@ -834,7 +918,7 @@ export default { | @@ -834,7 +918,7 @@ export default { | ||
834 | wx.uploadVoice({ | 918 | wx.uploadVoice({ |
835 | localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得 | 919 | localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得 |
836 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 920 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
837 | - success: function(res) { | 921 | + success: function (res) { |
838 | var serverId = res.serverId; // 返回音频的服务器端ID | 922 | var serverId = res.serverId; // 返回音频的服务器端ID |
839 | that.serverId = res.serverId; | 923 | that.serverId = res.serverId; |
840 | // alert(that.serverId); | 924 | // alert(that.serverId); |
@@ -848,7 +932,11 @@ export default { | @@ -848,7 +932,11 @@ export default { | ||
848 | this.time = 0; | 932 | this.time = 0; |
849 | this.luprocess = false; | 933 | this.luprocess = false; |
850 | this.beginlushow = true; | 934 | this.beginlushow = true; |
851 | - clearInterval(this.timer); | 935 | + clearInterval(timer); |
936 | + timer=null; | ||
937 | + wx.stopVoice({ | ||
938 | + localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
939 | + }); | ||
852 | }, | 940 | }, |
853 | // 停止直播 | 941 | // 停止直播 |
854 | stopbtn() { | 942 | stopbtn() { |
@@ -868,9 +956,13 @@ export default { | @@ -868,9 +956,13 @@ export default { | ||
868 | data: "", | 956 | data: "", |
869 | is_end: 1 | 957 | is_end: 1 |
870 | }; | 958 | }; |
959 | + console.log(objdata,'结束数据') | ||
871 | objdata = JSON.stringify(objdata); | 960 | objdata = JSON.stringify(objdata); |
961 | + | ||
872 | // alert(objdata); | 962 | // alert(objdata); |
873 | this.websocketsend(objdata); | 963 | this.websocketsend(objdata); |
964 | + clearInterval(timer); | ||
965 | + timer=null | ||
874 | }, | 966 | }, |
875 | 967 | ||
876 | // 获取录播详情 | 968 | // 获取录播详情 |
@@ -884,7 +976,7 @@ export default { | @@ -884,7 +976,7 @@ export default { | ||
884 | 976 | ||
885 | that.$axios | 977 | that.$axios |
886 | .post(url, param) | 978 | .post(url, param) |
887 | - .then(function(res) { | 979 | + .then(function (res) { |
888 | console.log(res); | 980 | console.log(res); |
889 | that.is_self = res.data.lesson.is_self; | 981 | that.is_self = res.data.lesson.is_self; |
890 | // that.user_id = res.data.lesson.user_id; | 982 | // that.user_id = res.data.lesson.user_id; |
@@ -903,10 +995,11 @@ export default { | @@ -903,10 +995,11 @@ export default { | ||
903 | that.showtips = false; | 995 | that.showtips = false; |
904 | that.isbot = true; | 996 | that.isbot = true; |
905 | clearInterval(timer); | 997 | clearInterval(timer); |
998 | + timer=null | ||
906 | } | 999 | } |
907 | }, 1000); | 1000 | }, 1000); |
908 | }) | 1001 | }) |
909 | - .catch(function(err) { | 1002 | + .catch(function (err) { |
910 | console.log(err); | 1003 | console.log(err); |
911 | }); | 1004 | }); |
912 | }, | 1005 | }, |
@@ -924,12 +1017,15 @@ export default { | @@ -924,12 +1017,15 @@ export default { | ||
924 | websocketonopen() { | 1017 | websocketonopen() { |
925 | //连接建立之后执行send方法发送数据 | 1018 | //连接建立之后执行send方法发送数据 |
926 | console.log("连接成功"); | 1019 | console.log("连接成功"); |
1020 | + this.cardzheng=false | ||
927 | }, | 1021 | }, |
928 | websocketonerror() { | 1022 | websocketonerror() { |
1023 | + | ||
929 | //连接建立失败重连 | 1024 | //连接建立失败重连 |
930 | - // this.initWebSocket(); | 1025 | + this.initWebSocket(); |
931 | }, | 1026 | }, |
932 | websocketonmessage(e) { | 1027 | websocketonmessage(e) { |
1028 | + | ||
933 | //数据接收 | 1029 | //数据接收 |
934 | let that = this; | 1030 | let that = this; |
935 | 1031 | ||
@@ -943,31 +1039,27 @@ export default { | @@ -943,31 +1039,27 @@ export default { | ||
943 | obj = JSON.stringify(obj); | 1039 | obj = JSON.stringify(obj); |
944 | console.log(obj); | 1040 | console.log(obj); |
945 | this.websocketsend(obj); | 1041 | this.websocketsend(obj); |
946 | - | ||
947 | // let data=e. | 1042 | // let data=e. |
948 | } | 1043 | } |
949 | this.number = this.number + 1; | 1044 | this.number = this.number + 1; |
950 | this.number = this.number; | 1045 | this.number = this.number; |
951 | let datak = e.data; | 1046 | let datak = e.data; |
952 | console.log(e, 88890999); | 1047 | console.log(e, 88890999); |
953 | - console.log(e.data); | ||
954 | - // alert(e.data) | ||
955 | - // alert(e.data.first) | ||
956 | - // if(e.data!='Hello 7f0000012afa0000020a'){ | ||
957 | - | ||
958 | - // } | ||
959 | let data = JSON.parse(e.data); | 1048 | let data = JSON.parse(e.data); |
960 | - // alert(data) | ||
961 | - console.log(data); | ||
962 | - that.group_count = data.group_count; | 1049 | + |
1050 | + if (data.group_count) { | ||
1051 | + that.group_count = data.group_count; | ||
1052 | + } | ||
1053 | + console.log('datadata',data) | ||
1054 | + | ||
963 | // 接收数据重新渲染列表 | 1055 | // 接收数据重新渲染列表 |
964 | if (data.lesson_id != undefined) { | 1056 | if (data.lesson_id != undefined) { |
965 | const redata = JSON.parse(e.data); | 1057 | const redata = JSON.parse(e.data); |
966 | - console.log(redata); | ||
967 | 1058 | ||
1059 | + console.log(redata,'返回的数据返回的数据'); | ||
968 | that.group_count = redata.group_count; | 1060 | that.group_count = redata.group_count; |
969 | if (redata.code == 9) { | 1061 | if (redata.code == 9) { |
970 | - that.recordlist.forEach(function(value, index, array) { | 1062 | + that.recordlist.forEach(function (value, index, array) { |
971 | if (value.id == redata.id) { | 1063 | if (value.id == redata.id) { |
972 | that.recordlist.splice(index, 1); | 1064 | that.recordlist.splice(index, 1); |
973 | that.recordlist = that.recordlist; | 1065 | that.recordlist = that.recordlist; |
@@ -977,6 +1069,7 @@ export default { | @@ -977,6 +1069,7 @@ export default { | ||
977 | } else if (redata.code == 0) { | 1069 | } else if (redata.code == 0) { |
978 | Toast(redata.msg); | 1070 | Toast(redata.msg); |
979 | } else if (redata.code == 1) { | 1071 | } else if (redata.code == 1) { |
1072 | + | ||
980 | that.recordlist.push(redata); | 1073 | that.recordlist.push(redata); |
981 | that.recordlist = that.recordlist; | 1074 | that.recordlist = that.recordlist; |
982 | that.$forceUpdate(); | 1075 | that.$forceUpdate(); |
@@ -989,7 +1082,12 @@ export default { | @@ -989,7 +1082,12 @@ export default { | ||
989 | div[len].scrollIntoView(); | 1082 | div[len].scrollIntoView(); |
990 | }); | 1083 | }); |
991 | } else if (redata.code == 2) { | 1084 | } else if (redata.code == 2) { |
992 | - that.$router.go(-1); | 1085 | + console.log('返回上一页') |
1086 | + that.$router.push({ | ||
1087 | + path:'/usercenter' | ||
1088 | + }); | ||
1089 | + this.$store.state.tagsView.visitedViews.splice(this.$store.state.tagsView.visitedViews.findIndex(item => item.path === this.$route.path), 1) | ||
1090 | + this.$router.push(this.$store.state.tagsView.visitedViews[this.$store.state.tagsView.visitedViews.length - 1].path) | ||
993 | } | 1091 | } |
994 | } | 1092 | } |
995 | }, | 1093 | }, |
@@ -999,8 +1097,11 @@ export default { | @@ -999,8 +1097,11 @@ export default { | ||
999 | this.websock.send(Data); | 1097 | this.websock.send(Data); |
1000 | }, | 1098 | }, |
1001 | websocketclose(e) { | 1099 | websocketclose(e) { |
1100 | + // window.location.reload() | ||
1101 | + this.number = 0 | ||
1002 | //关闭 | 1102 | //关闭 |
1003 | console.log("断开连接", e); | 1103 | console.log("断开连接", e); |
1104 | + this.cardzheng=true | ||
1004 | this.initWebSocket(); | 1105 | this.initWebSocket(); |
1005 | }, | 1106 | }, |
1006 | // 获取直播列表 | 1107 | // 获取直播列表 |
@@ -1012,16 +1113,15 @@ export default { | @@ -1012,16 +1113,15 @@ export default { | ||
1012 | lesson_id: that.id, | 1113 | lesson_id: that.id, |
1013 | page: that.page | 1114 | page: that.page |
1014 | }; | 1115 | }; |
1015 | - | ||
1016 | that.$axios | 1116 | that.$axios |
1017 | .post(url, param) | 1117 | .post(url, param) |
1018 | - .then(function(res) { | 1118 | + .then(function (res) { |
1019 | console.log(res, "直播列表"); | 1119 | console.log(res, "直播列表"); |
1020 | if (that.page == 1) { | 1120 | if (that.page == 1) { |
1021 | // 页面滚动到某一个位置 | 1121 | // 页面滚动到某一个位置 |
1022 | let len = res.data.record.length; | 1122 | let len = res.data.record.length; |
1023 | len = len - 1; | 1123 | len = len - 1; |
1024 | - res.data.record.forEach(function(value, index, array) { | 1124 | + res.data.record.forEach(function (value, index, array) { |
1025 | if (index == len) { | 1125 | if (index == len) { |
1026 | value.idkk = "targetboxk"; | 1126 | value.idkk = "targetboxk"; |
1027 | that.$nextTick(() => { | 1127 | that.$nextTick(() => { |
@@ -1040,26 +1140,29 @@ export default { | @@ -1040,26 +1140,29 @@ export default { | ||
1040 | // 拼接数组倒叙 | 1140 | // 拼接数组倒叙 |
1041 | var arr = [...res.data.record, ...that.recordlist]; | 1141 | var arr = [...res.data.record, ...that.recordlist]; |
1042 | that.recordlist = arr; | 1142 | that.recordlist = arr; |
1043 | - that.recordlist.forEach(function(value, index, array) { | 1143 | + that.recordlist.forEach(function (value, index, array) { |
1044 | value.sel = false; | 1144 | value.sel = false; |
1045 | }); | 1145 | }); |
1046 | that.recordlist = that.recordlist; | 1146 | that.recordlist = that.recordlist; |
1047 | that.this_page = res.data.this_page; | 1147 | that.this_page = res.data.this_page; |
1048 | that.total_page = res.data.total_page; | 1148 | that.total_page = res.data.total_page; |
1049 | }) | 1149 | }) |
1050 | - .catch(function(err) { | 1150 | + .catch(function (err) { |
1051 | console.log(err); | 1151 | console.log(err); |
1052 | }); | 1152 | }); |
1053 | }, | 1153 | }, |
1054 | audioplay(item, index) { | 1154 | audioplay(item, index) { |
1055 | let that = this; | 1155 | let that = this; |
1056 | - console.log(item); | 1156 | + console.log(item,'当前播放的语音') |
1157 | + | ||
1158 | + var botime=0 | ||
1159 | + var intervl=setInterval(function(){ | ||
1160 | + botime++; | ||
1161 | + },1000) | ||
1057 | // 播放某一个语音 | 1162 | // 播放某一个语音 |
1058 | - | ||
1059 | - // that.recordlist[index].sel = !that.recordlist[index].sel; | ||
1060 | - | ||
1061 | - that.recordlist.forEach(function(value, indexk, array) { | ||
1062 | - if (index == indexk) { | 1163 | + that.recordlist.forEach(function (value, indexk, array) { |
1164 | + if (item.id == value.id) { | ||
1165 | + console.log(item.id,999999) | ||
1063 | that.recordlist[indexk].sel = !that.recordlist[indexk].sel; | 1166 | that.recordlist[indexk].sel = !that.recordlist[indexk].sel; |
1064 | } else { | 1167 | } else { |
1065 | that.recordlist[indexk].sel = false; | 1168 | that.recordlist[indexk].sel = false; |
@@ -1067,7 +1170,6 @@ export default { | @@ -1067,7 +1170,6 @@ export default { | ||
1067 | }); | 1170 | }); |
1068 | 1171 | ||
1069 | that.recordlist = that.recordlist; | 1172 | that.recordlist = that.recordlist; |
1070 | - | ||
1071 | that.$forceUpdate(); | 1173 | that.$forceUpdate(); |
1072 | console.log(that.recordlist); | 1174 | console.log(that.recordlist); |
1073 | 1175 | ||
@@ -1077,34 +1179,18 @@ export default { | @@ -1077,34 +1179,18 @@ export default { | ||
1077 | wx.downloadVoice({ | 1179 | wx.downloadVoice({ |
1078 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | 1180 | serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 |
1079 | isShowProgressTips: 1, // 默认为1,显示进度提示 | 1181 | isShowProgressTips: 1, // 默认为1,显示进度提示 |
1080 | - success: function(res) { | 1182 | + success: function (res) { |
1081 | localId = res.localId; // 返回音频的本地ID | 1183 | localId = res.localId; // 返回音频的本地ID |
1082 | that.playlocalid = localId; | 1184 | that.playlocalid = localId; |
1083 | that.recordlist[index].localId = localId; | 1185 | that.recordlist[index].localId = localId; |
1084 | that.recordlist = that.recordlist; | 1186 | that.recordlist = that.recordlist; |
1085 | that.$forceUpdate(); | 1187 | that.$forceUpdate(); |
1086 | - | ||
1087 | wx.playVoice({ | 1188 | wx.playVoice({ |
1088 | localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得 | 1189 | localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得 |
1089 | }); | 1190 | }); |
1090 | } | 1191 | } |
1091 | }); | 1192 | }); |
1092 | 1193 | ||
1093 | - // if (this.recordlist[index].data != that.stopurl) { | ||
1094 | - // wx.downloadVoice({ | ||
1095 | - // serverId: this.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | ||
1096 | - // isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
1097 | - // success: function (res) { | ||
1098 | - | ||
1099 | - // wx.stopVoice({ | ||
1100 | - // localId: res.localId // 需要停止的音频的本地ID,由stopRecord接口获得 | ||
1101 | - // }); | ||
1102 | - | ||
1103 | - // } | ||
1104 | - | ||
1105 | - // }); | ||
1106 | - | ||
1107 | - // } | ||
1108 | } else if (this.recordlist[index].sel == false) { | 1194 | } else if (this.recordlist[index].sel == false) { |
1109 | // 停止播放 | 1195 | // 停止播放 |
1110 | wx.stopVoice({ | 1196 | wx.stopVoice({ |
@@ -1112,49 +1198,59 @@ export default { | @@ -1112,49 +1198,59 @@ export default { | ||
1112 | }); | 1198 | }); |
1113 | } | 1199 | } |
1114 | // 监听播放停止播放下一个 | 1200 | // 监听播放停止播放下一个 |
1115 | - wx.onVoicePlayEnd({ | ||
1116 | - success: function(res) { | 1201 | + wx.onVoicePlayEnd({ |
1202 | + success: function (res) { | ||
1203 | + console.log(res,'播放的长度') | ||
1117 | var localId = res.localId; // 返回音频的本地ID | 1204 | var localId = res.localId; // 返回音频的本地ID |
1118 | - | ||
1119 | - that.recordlist.forEach(function(value, index, array) { | 1205 | + that.recordlist.forEach(function (value, index, array) { |
1120 | if (localId == value.localId) { | 1206 | if (localId == value.localId) { |
1121 | value.sel = false; | 1207 | value.sel = false; |
1208 | + | ||
1122 | } | 1209 | } |
1123 | }); | 1210 | }); |
1124 | that.recordlist = that.recordlist; | 1211 | that.recordlist = that.recordlist; |
1125 | that.$forceUpdate(); | 1212 | that.$forceUpdate(); |
1126 | - index = index + 1; | ||
1127 | - | ||
1128 | - for (var i = index; i < that.recordlist.length; i++) { | ||
1129 | - if (that.recordlist[i].type == 3) { | ||
1130 | - index = i; | ||
1131 | - that.recordlist[i].sel = true; | ||
1132 | - wx.downloadVoice({ | ||
1133 | - serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | ||
1134 | - isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
1135 | - success: function(res) { | ||
1136 | - let localId = res.localId; // 返回音频的本地ID | ||
1137 | - that.recordlist[i].localId = localId; | ||
1138 | - that.recordlist[i].sel = true; | ||
1139 | - that.recordlist = that.recordlist; | ||
1140 | - that.$forceUpdate(); | ||
1141 | - wx.playVoice({ | ||
1142 | - localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
1143 | - }); | ||
1144 | - } | ||
1145 | - }); | ||
1146 | - | ||
1147 | - return; | 1213 | + index = index + 1; |
1214 | + // 播放停止之后再播放下一个 | ||
1215 | + if(botime>=Number(item.times.split(".")[0])){ | ||
1216 | + | ||
1217 | + for (var i = index; i < that.recordlist.length; i++) { | ||
1218 | + if (that.recordlist[i].type == 3) { | ||
1219 | + index = i; | ||
1220 | + that.recordlist[i].sel = true; | ||
1221 | + wx.downloadVoice({ | ||
1222 | + serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得 | ||
1223 | + isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
1224 | + success: function (res) { | ||
1225 | + let localId = res.localId; // 返回音频的本地ID | ||
1226 | + that.recordlist[i].localId = localId; | ||
1227 | + that.recordlist[i].sel = true; | ||
1228 | + that.recordlist = that.recordlist; | ||
1229 | + that.$forceUpdate(); | ||
1230 | + wx.playVoice({ | ||
1231 | + localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得 | ||
1232 | + }); | ||
1233 | + } | ||
1234 | + }); | ||
1235 | + return; | ||
1236 | + } | ||
1237 | + } | ||
1148 | } | 1238 | } |
1149 | - } | ||
1150 | - | 1239 | + |
1240 | + | ||
1151 | that.recordlist = that.recordlist; | 1241 | that.recordlist = that.recordlist; |
1152 | that.$forceUpdate(); | 1242 | that.$forceUpdate(); |
1153 | } | 1243 | } |
1154 | }); | 1244 | }); |
1245 | + | ||
1246 | + | ||
1155 | }, | 1247 | }, |
1156 | // 发送文字 | 1248 | // 发送文字 |
1157 | send() { | 1249 | send() { |
1250 | + if(this.text==''){ | ||
1251 | + Toast("请写留言") | ||
1252 | + return false | ||
1253 | + } | ||
1158 | // var ws = new WebSocket("ws://tangyuanji.t.brotop.cn:11001"); | 1254 | // var ws = new WebSocket("ws://tangyuanji.t.brotop.cn:11001"); |
1159 | let objdata = { | 1255 | let objdata = { |
1160 | lesson_id: this.id, | 1256 | lesson_id: this.id, |
@@ -1176,9 +1272,9 @@ export default { | @@ -1176,9 +1272,9 @@ export default { | ||
1176 | let that = this; | 1272 | let that = this; |
1177 | clearTimeout(timeOutEvent); //清除定时器 | 1273 | clearTimeout(timeOutEvent); //清除定时器 |
1178 | timeOutEvent = 0; | 1274 | timeOutEvent = 0; |
1179 | - timeOutEvent = setTimeout(function() { | 1275 | + timeOutEvent = setTimeout(function () { |
1180 | Dialog.confirm({ | 1276 | Dialog.confirm({ |
1181 | - title: "是否删除帖子" | 1277 | + title: "是否撤销帖子" |
1182 | }) | 1278 | }) |
1183 | .then(res => { | 1279 | .then(res => { |
1184 | console.log(item.id); | 1280 | console.log(item.id); |
@@ -1226,6 +1322,14 @@ export default { | @@ -1226,6 +1322,14 @@ export default { | ||
1226 | </script> | 1322 | </script> |
1227 | 1323 | ||
1228 | <style scoped> | 1324 | <style scoped> |
1325 | +.middlecontent{ | ||
1326 | + width:100%; | ||
1327 | + flex:1; | ||
1328 | + overflow-y: scroll; | ||
1329 | +} | ||
1330 | +.nodatatext{ | ||
1331 | + margin-top:4rem | ||
1332 | +} | ||
1229 | .van-loading { | 1333 | .van-loading { |
1230 | position: absolute; | 1334 | position: absolute; |
1231 | top: 50%; | 1335 | top: 50%; |
@@ -1402,7 +1506,7 @@ export default { | @@ -1402,7 +1506,7 @@ export default { | ||
1402 | box-sizing: border-box; | 1506 | box-sizing: border-box; |
1403 | } | 1507 | } |
1404 | .messagebotk { | 1508 | .messagebotk { |
1405 | - padding: 0.16rem 0.72rem; | 1509 | + padding: 0 0.72rem; |
1406 | box-sizing: border-box; | 1510 | box-sizing: border-box; |
1407 | } | 1511 | } |
1408 | .messagebotkk { | 1512 | .messagebotkk { |
@@ -1429,7 +1533,7 @@ export default { | @@ -1429,7 +1533,7 @@ export default { | ||
1429 | border-radius: 0.4rem; | 1533 | border-radius: 0.4rem; |
1430 | box-shadow: 0 0.16rem 0.3rem 0 rgba(142, 190, 142, 0.33); | 1534 | box-shadow: 0 0.16rem 0.3rem 0 rgba(142, 190, 142, 0.33); |
1431 | position: fixed; | 1535 | position: fixed; |
1432 | - bottom: 1.2rem; | 1536 | + bottom: 1.5rem; |
1433 | right: 0.32rem; | 1537 | right: 0.32rem; |
1434 | z-index: 9; | 1538 | z-index: 9; |
1435 | } | 1539 | } |
@@ -1441,6 +1545,9 @@ export default { | @@ -1441,6 +1545,9 @@ export default { | ||
1441 | .messagelist { | 1545 | .messagelist { |
1442 | /* height: 15rem; */ | 1546 | /* height: 15rem; */ |
1443 | /* padding-bottom: 1.5rem; */ | 1547 | /* padding-bottom: 1.5rem; */ |
1548 | + padding-top:1.4rem; | ||
1549 | + box-sizing: border-box; | ||
1550 | + overflow-y: scroll; | ||
1444 | } | 1551 | } |
1445 | .contentimg { | 1552 | .contentimg { |
1446 | width: 4.15rem; | 1553 | width: 4.15rem; |
@@ -1711,4 +1818,17 @@ export default { | @@ -1711,4 +1818,17 @@ export default { | ||
1711 | opacity: 1; | 1818 | opacity: 1; |
1712 | } | 1819 | } |
1713 | } */ | 1820 | } */ |
1821 | +.listboxbox{ | ||
1822 | + display:flex; | ||
1823 | + flex-direction: column; | ||
1824 | + align-items: center; | ||
1825 | + justify-content: center; | ||
1826 | + height: 100vh; | ||
1827 | +} | ||
1828 | +.messagelist { | ||
1829 | +width:100%; | ||
1830 | +} | ||
1831 | +.messagebotk{ | ||
1832 | + width:100% | ||
1833 | +} | ||
1714 | </style> | 1834 | </style> |
@@ -37,7 +37,7 @@ export default { | @@ -37,7 +37,7 @@ export default { | ||
37 | document.querySelector("#app").style.height = "100%" | 37 | document.querySelector("#app").style.height = "100%" |
38 | // var vdo = document.getElementById("video"); | 38 | // var vdo = document.getElementById("video"); |
39 | // vdo.play(); | 39 | // vdo.play(); |
40 | - document.title = '唐元集公众号' | 40 | + document.title = '唐元集' |
41 | 41 | ||
42 | console.log(this.url) | 42 | console.log(this.url) |
43 | }, | 43 | }, |
@@ -49,7 +49,7 @@ export default { | @@ -49,7 +49,7 @@ export default { | ||
49 | }, | 49 | }, |
50 | 50 | ||
51 | created() { | 51 | created() { |
52 | - document.title = '唐元集公众号' | 52 | + document.title = '唐元集' |
53 | this.id = this.$route.query.id; | 53 | this.id = this.$route.query.id; |
54 | this.getvideodetail() | 54 | this.getvideodetail() |
55 | }, | 55 | }, |
@@ -32,7 +32,7 @@ export default { | @@ -32,7 +32,7 @@ export default { | ||
32 | } | 32 | } |
33 | }, | 33 | }, |
34 | created() { | 34 | created() { |
35 | - document.title = '唐元集公众号' | 35 | + document.title = '唐元集' |
36 | this.id = this.$route.query.id; | 36 | this.id = this.$route.query.id; |
37 | this.getvideodetail() | 37 | this.getvideodetail() |
38 | }, | 38 | }, |
@@ -51,7 +51,7 @@ export default { | @@ -51,7 +51,7 @@ export default { | ||
51 | }, | 51 | }, |
52 | created() { | 52 | created() { |
53 | this.sort_id = this.$route.query.sort_id; | 53 | this.sort_id = this.$route.query.sort_id; |
54 | - document.title = "唐元集公众号"; | 54 | + document.title = "唐元集"; |
55 | this.sort_name = this.$route.query.sort_name; | 55 | this.sort_name = this.$route.query.sort_name; |
56 | this.getsucai() | 56 | this.getsucai() |
57 | }, | 57 | }, |
@@ -9,7 +9,10 @@ | @@ -9,7 +9,10 @@ | ||
9 | <!-- <img src="../../../assets/sharebtn.png" alt /> --> | 9 | <!-- <img src="../../../assets/sharebtn.png" alt /> --> |
10 | </div> | 10 | </div> |
11 | </div> | 11 | </div> |
12 | - <div class="youhuiacttext" v-html="text"></div> | 12 | + |
13 | + <div class="youhuiacttext" v-html="text"> | ||
14 | + | ||
15 | + </div> | ||
13 | <div class="flextwo youhuitextbox"> | 16 | <div class="flextwo youhuitextbox"> |
14 | <div class="shibotleft" @click="prepage">上一页</div> | 17 | <div class="shibotleft" @click="prepage">上一页</div> |
15 | <div class="shibotright" @click="nextpage">下一页</div> | 18 | <div class="shibotright" @click="nextpage">下一页</div> |
@@ -27,7 +30,7 @@ export default { | @@ -27,7 +30,7 @@ export default { | ||
27 | 30 | ||
28 | }, | 31 | }, |
29 | created() { | 32 | created() { |
30 | - document.title = "唐元集公众号"; | 33 | + document.title = "唐元集"; |
31 | this.subid = this.$route.query.subid; | 34 | this.subid = this.$route.query.subid; |
32 | this.getresult(); | 35 | this.getresult(); |
33 | }, | 36 | }, |
@@ -72,7 +75,9 @@ export default { | @@ -72,7 +75,9 @@ export default { | ||
72 | .youhuiacttext { | 75 | .youhuiacttext { |
73 | padding: 0.32rem; | 76 | padding: 0.32rem; |
74 | box-sizing: border-box; | 77 | box-sizing: border-box; |
75 | - margin-bottom: 1.5rem; | 78 | + height: calc(100vh - 2rem); |
79 | + overflow-y: scroll; | ||
80 | + /* margin-bottom: 1.5rem; */ | ||
76 | } | 81 | } |
77 | .youhuiacttext { | 82 | .youhuiacttext { |
78 | margin-top: 0.8rem; | 83 | margin-top: 0.8rem; |
@@ -80,12 +85,13 @@ export default { | @@ -80,12 +85,13 @@ export default { | ||
80 | font-size: 0.3rem; | 85 | font-size: 0.3rem; |
81 | } | 86 | } |
82 | .youhuitextbox { | 87 | .youhuitextbox { |
83 | - position: fixed; | 88 | + /* position: fixed; |
84 | bottom: 0; | 89 | bottom: 0; |
85 | - left: 0; | 90 | + left: 0; */ |
86 | width: 100%; | 91 | width: 100%; |
87 | padding: 0.18rem 0.32rem; | 92 | padding: 0.18rem 0.32rem; |
88 | box-sizing: border-box; | 93 | box-sizing: border-box; |
89 | background: #fff; | 94 | background: #fff; |
95 | + z-index:999 | ||
90 | } | 96 | } |
91 | </style> | 97 | </style> |
@@ -10,17 +10,29 @@ | @@ -10,17 +10,29 @@ | ||
10 | </div> | 10 | </div> |
11 | </div> | 11 | </div> |
12 | <div class="zuozhantopkkk flextwo"> | 12 | <div class="zuozhantopkkk flextwo"> |
13 | - <div class="zuozhanitem" :class="iszuo==1?'zuozhanactive':''" @click="yixiang(1)">意向顾问</div> | ||
14 | - <div class="zuozhanitem" :class="iszuo==2?'zuozhanactive':''" @click="yixiang(2)">意向经销商</div> | 13 | + <div |
14 | + class="zuozhanitem" | ||
15 | + :class="iszuo == 1 ? 'zuozhanactive' : ''" | ||
16 | + @click="yixiang(1)" | ||
17 | + > | ||
18 | + 意向顾客 | ||
19 | + </div> | ||
20 | + <div | ||
21 | + class="zuozhanitem" | ||
22 | + :class="iszuo == 2 ? 'zuozhanactive' : ''" | ||
23 | + @click="yixiang(2)" | ||
24 | + > | ||
25 | + 意向经销商 | ||
26 | + </div> | ||
15 | </div> | 27 | </div> |
16 | <!-- 意向顾问 --> | 28 | <!-- 意向顾问 --> |
17 | <div class="yixiangbox"> | 29 | <div class="yixiangbox"> |
18 | <div class="yixiangboxtop flexone"> | 30 | <div class="yixiangboxtop flexone"> |
19 | <img src="../../../assets/yixiangimg.png" alt class="yixiangimg" /> | 31 | <img src="../../../assets/yixiangimg.png" alt class="yixiangimg" /> |
20 | - 作战包生成次数:{{count}}次 | 32 | + 作战包生成次数:{{ count }}次 |
21 | </div> | 33 | </div> |
22 | 34 | ||
23 | - <div class="yiixangpage" v-if="iszuo==1"> | 35 | + <div class="yiixangpage" v-if="iszuo == 1"> |
24 | <div class="yixiangpagetop flexone"> | 36 | <div class="yixiangpagetop flexone"> |
25 | <div class="yiitem">顾客姓名</div> | 37 | <div class="yiitem">顾客姓名</div> |
26 | <div class="yiitem">生成时间</div> | 38 | <div class="yiitem">生成时间</div> |
@@ -29,22 +41,29 @@ | @@ -29,22 +41,29 @@ | ||
29 | <div class="yiitem caozuo">操作</div> | 41 | <div class="yiitem caozuo">操作</div> |
30 | </div> | 42 | </div> |
31 | <div class="yixiangcontent"> | 43 | <div class="yixiangcontent"> |
32 | - <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad"> | 44 | + <van-list |
45 | + v-model="loading" | ||
46 | + :finished="finished" | ||
47 | + finished-text="没有更多了" | ||
48 | + @load="onLoad" | ||
49 | + > | ||
33 | <div | 50 | <div |
34 | class="yixiangpagetop yixiangpagetopk flexone" | 51 | class="yixiangpagetop yixiangpagetopk flexone" |
35 | - v-for="(item,index) in yixianglist" | 52 | + v-for="(item, index) in yixianglist" |
36 | :key="index" | 53 | :key="index" |
37 | > | 54 | > |
38 | - <div class="yiitem yiname">{{item.name}}</div> | ||
39 | - <div class="yiitem yiname yidate">{{item.createtime}}</div> | 55 | + <div class="yiitem yiname">{{ item.name }}</div> |
56 | + <div class="yiitem yiname yidate">{{ item.createtime }}</div> | ||
40 | <div class="yiitem yisee" @click="seecontent(item.id)">查看</div> | 57 | <div class="yiitem yisee" @click="seecontent(item.id)">查看</div> |
41 | - <div class="yiitem yiname jingxiao">{{item.agent.name}}</div> | ||
42 | - <div class="yiitem yisee caozuo" @click="delgu(item.id)">删除</div> | 58 | + <div class="yiitem yiname jingxiao">{{ item.agent.name }}</div> |
59 | + <div class="yiitem yisee caozuo" @click="delgu(item.id)"> | ||
60 | + 删除 | ||
61 | + </div> | ||
43 | </div> | 62 | </div> |
44 | </van-list> | 63 | </van-list> |
45 | </div> | 64 | </div> |
46 | </div> | 65 | </div> |
47 | - <div class="yiixangpage" v-if="iszuo==2"> | 66 | + <div class="yiixangpage" v-if="iszuo == 2"> |
48 | <div class="yixiangpagetop flexone"> | 67 | <div class="yixiangpagetop flexone"> |
49 | <div class="yiitem yijing">意向经销商</div> | 68 | <div class="yiitem yijing">意向经销商</div> |
50 | <div class="yiitem">生成时间</div> | 69 | <div class="yiitem">生成时间</div> |
@@ -53,17 +72,29 @@ | @@ -53,17 +72,29 @@ | ||
53 | <div class="yiitem caozuo caojing">操作</div> | 72 | <div class="yiitem caozuo caojing">操作</div> |
54 | </div> | 73 | </div> |
55 | <div class="yixiangcontent"> | 74 | <div class="yixiangcontent"> |
56 | - <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad"> | 75 | + <van-list |
76 | + v-model="loading" | ||
77 | + :finished="finished" | ||
78 | + finished-text="没有更多了" | ||
79 | + @load="onLoad" | ||
80 | + > | ||
57 | <div | 81 | <div |
58 | class="yixiangpagetop yixiangpagetopk flexone" | 82 | class="yixiangpagetop yixiangpagetopk flexone" |
59 | - v-for="(item,index) in yixianglist" | 83 | + v-for="(item, index) in yixianglist" |
60 | :key="index" | 84 | :key="index" |
61 | > | 85 | > |
62 | - <div class="yiitem yiname yijing">{{item.name}}</div> | ||
63 | - <div class="yiitem yiname yidate">{{item.createtime}}</div> | ||
64 | - <div class="yiitem yisee yicha" @click="jingxiaosee(item.id)">查看</div> | ||
65 | - <div class="yiitem yiname jingxiao">{{item.agent.name}}</div> | ||
66 | - <div class="yiitem yisee caozuo caojing" @click="deljing(item.id)">删除</div> | 86 | + <div class="yiitem yiname yijing">{{ item.name }}</div> |
87 | + <div class="yiitem yiname yidate">{{ item.createtime }}</div> | ||
88 | + <div class="yiitem yisee yicha" @click="jingxiaosee(item.id)"> | ||
89 | + 查看 | ||
90 | + </div> | ||
91 | + <div class="yiitem yiname jingxiao">{{ item.agent.name }}</div> | ||
92 | + <div | ||
93 | + class="yiitem yisee caozuo caojing" | ||
94 | + @click="deljing(item.id)" | ||
95 | + > | ||
96 | + 删除 | ||
97 | + </div> | ||
67 | </div> | 98 | </div> |
68 | </van-list> | 99 | </van-list> |
69 | </div> | 100 | </div> |
@@ -90,7 +121,20 @@ export default { | @@ -90,7 +121,20 @@ export default { | ||
90 | } | 121 | } |
91 | }, | 122 | }, |
92 | created() { | 123 | created() { |
93 | - this.getguwenlist() | 124 | + |
125 | + if (localStorage.getItem("iszuo")) { | ||
126 | + console.log(localStorage.getItem("iszuo"), '99999') | ||
127 | + this.iszuo = localStorage.getItem("iszuo") | ||
128 | + | ||
129 | + if (this.iszuo == 1) { | ||
130 | + this.getguwenlist() | ||
131 | + } else { | ||
132 | + this.getjingxiaolist() | ||
133 | + } | ||
134 | + } else { | ||
135 | + console.log(988888) | ||
136 | + this.getguwenlist() | ||
137 | + } | ||
94 | }, | 138 | }, |
95 | methods: { | 139 | methods: { |
96 | back() { | 140 | back() { |
@@ -100,11 +144,14 @@ export default { | @@ -100,11 +144,14 @@ export default { | ||
100 | this.iszuo = id; | 144 | this.iszuo = id; |
101 | this.page = 1; | 145 | this.page = 1; |
102 | this.yixianglist = []; | 146 | this.yixianglist = []; |
147 | + localStorage.setItem("iszuo", this.iszuo) | ||
103 | if (this.iszuo == 1) { | 148 | if (this.iszuo == 1) { |
104 | this.getguwenlist() | 149 | this.getguwenlist() |
105 | - } else[ | 150 | + } else { |
106 | this.getjingxiaolist() | 151 | this.getjingxiaolist() |
107 | - ] | 152 | + } |
153 | + | ||
154 | + | ||
108 | }, | 155 | }, |
109 | //顾问查看 | 156 | //顾问查看 |
110 | seecontent(id) { | 157 | seecontent(id) { |
@@ -3,15 +3,18 @@ | @@ -3,15 +3,18 @@ | ||
3 | import Vue from "vue"; | 3 | import Vue from "vue"; |
4 | import App from "./App"; | 4 | import App from "./App"; |
5 | import router from "./router"; | 5 | import router from "./router"; |
6 | +import VueRouter from "vue-router"; | ||
6 | 7 | ||
7 | import Vant from "vant"; | 8 | import Vant from "vant"; |
8 | import "vant/lib/index.css"; | 9 | import "vant/lib/index.css"; |
9 | import { Toast } from "vant"; | 10 | import { Toast } from "vant"; |
11 | + | ||
12 | +// import Vconsole from "vconsole"; | ||
13 | +// let vConsole = new Vconsole(); | ||
14 | +// Vue.use(vConsole); | ||
10 | Vue.use(Toast); | 15 | Vue.use(Toast); |
11 | Vue.use(Vant); | 16 | Vue.use(Vant); |
12 | - | ||
13 | Vue.config.productionTip = false; | 17 | Vue.config.productionTip = false; |
14 | - | ||
15 | import axios from "./utils/common.js"; | 18 | import axios from "./utils/common.js"; |
16 | Vue.prototype.$axios = axios; | 19 | Vue.prototype.$axios = axios; |
17 | if (sessionStorage.getItem("token")) { | 20 | if (sessionStorage.getItem("token")) { |
@@ -22,13 +25,11 @@ Vue.prototype.$uploadFile = uploadFile; | @@ -22,13 +25,11 @@ Vue.prototype.$uploadFile = uploadFile; | ||
22 | 25 | ||
23 | // sessionStorage.setItem("token", "89cf0730-59e2-4627-baa3-a4451454794b"); | 26 | // sessionStorage.setItem("token", "89cf0730-59e2-4627-baa3-a4451454794b"); |
24 | import VueClipboard from "vue-clipboard2"; | 27 | import VueClipboard from "vue-clipboard2"; |
25 | - | ||
26 | Vue.use(VueClipboard); | 28 | Vue.use(VueClipboard); |
27 | router.beforeEach((to, from, next) => { | 29 | router.beforeEach((to, from, next) => { |
28 | const token = sessionStorage.getItem("token"); | 30 | const token = sessionStorage.getItem("token"); |
29 | - console.log("我是token", token); | ||
30 | - console.log(to); | ||
31 | - console.log(next()); | 31 | + // localStorage.setItem("selnav", ''); |
32 | + // console.log("我是token", token); | ||
32 | 33 | ||
33 | if (!token) { | 34 | if (!token) { |
34 | if (to.path === "/login") { | 35 | if (to.path === "/login") { |
@@ -17,6 +17,7 @@ export default new Router({ | @@ -17,6 +17,7 @@ export default new Router({ | ||
17 | }, | 17 | }, |
18 | { | 18 | { |
19 | path: "/society", | 19 | path: "/society", |
20 | + | ||
20 | name: "society", | 21 | name: "society", |
21 | meta: { title: "唐元集公众号" }, | 22 | meta: { title: "唐元集公众号" }, |
22 | component: resolve => | 23 | component: resolve => |
@@ -30,6 +31,7 @@ export default new Router({ | @@ -30,6 +31,7 @@ export default new Router({ | ||
30 | }, | 31 | }, |
31 | { | 32 | { |
32 | path: "/activity", | 33 | path: "/activity", |
34 | + | ||
33 | name: "activity", | 35 | name: "activity", |
34 | meta: { title: "唐元集公众号" }, | 36 | meta: { title: "唐元集公众号" }, |
35 | component: resolve => | 37 | component: resolve => |
@@ -74,6 +76,7 @@ export default new Router({ | @@ -74,6 +76,7 @@ export default new Router({ | ||
74 | { | 76 | { |
75 | path: "/formsub", | 77 | path: "/formsub", |
76 | name: "formsub", | 78 | name: "formsub", |
79 | + | ||
77 | meta: { title: "唐元集公众号" }, | 80 | meta: { title: "唐元集公众号" }, |
78 | component: resolve => | 81 | component: resolve => |
79 | require(["@/components/views/usercenter/formsub.vue"], resolve) | 82 | require(["@/components/views/usercenter/formsub.vue"], resolve) |
@@ -11,10 +11,22 @@ | @@ -11,10 +11,22 @@ | ||
11 | } | 11 | } |
12 | 12 | ||
13 | .courseimg { | 13 | .courseimg { |
14 | + /* width: 2.4rem; | ||
15 | + max-height: 1.46rem; | ||
16 | + overflow: hidden; | ||
17 | + flex: 0 0 auto; */ | ||
14 | width: 2.4rem; | 18 | width: 2.4rem; |
15 | height: 1.46rem; | 19 | height: 1.46rem; |
16 | - font-size: 0; | ||
17 | - flex: 0 0 auto; | 20 | + overflow: hidden; |
21 | +} | ||
22 | + | ||
23 | +.courseimg img { | ||
24 | + /* max-height: 100%!important; */ | ||
25 | + min-height: 1.46rem!important; | ||
26 | +} | ||
27 | + | ||
28 | +img { | ||
29 | + height: auto!important; | ||
18 | } | 30 | } |
19 | 31 | ||
20 | .coursetitle { | 32 | .coursetitle { |
@@ -134,8 +146,12 @@ | @@ -134,8 +146,12 @@ | ||
134 | 146 | ||
135 | .coursenameimg { | 147 | .coursenameimg { |
136 | width: 3.35rem; | 148 | width: 3.35rem; |
137 | - height: 2.8rem; | ||
138 | - font-size: 0; | 149 | + height: 2rem; |
150 | + overflow: hidden; | ||
151 | +} | ||
152 | + | ||
153 | +.coursenameimg img { | ||
154 | + min-height: 100%!important; | ||
139 | } | 155 | } |
140 | 156 | ||
141 | .coursetext { | 157 | .coursetext { |
@@ -153,7 +169,7 @@ | @@ -153,7 +169,7 @@ | ||
153 | -webkit-line-clamp: 2; | 169 | -webkit-line-clamp: 2; |
154 | overflow: hidden; | 170 | overflow: hidden; |
155 | margin-top: 0.1rem; | 171 | margin-top: 0.1rem; |
156 | - height: 0.8rem; | 172 | + height: 0.76rem; |
157 | } | 173 | } |
158 | 174 | ||
159 | .coursetitlek { | 175 | .coursetitlek { |
@@ -132,7 +132,6 @@ | @@ -132,7 +132,6 @@ | ||
132 | margin-right: 0.14rem; | 132 | margin-right: 0.14rem; |
133 | margin-bottom: 0.16rem; | 133 | margin-bottom: 0.16rem; |
134 | overflow: hidden; | 134 | overflow: hidden; |
135 | - min-height: 1.45rem; | ||
136 | } | 135 | } |
137 | 136 | ||
138 | .socvideoitem { | 137 | .socvideoitem { |
@@ -147,8 +146,8 @@ | @@ -147,8 +146,8 @@ | ||
147 | } */ | 146 | } */ |
148 | 147 | ||
149 | .jianzheng { | 148 | .jianzheng { |
150 | - width: 1.56rem; | ||
151 | - height: 0.44rem; | 149 | + /* width: 1.56rem; |
150 | + height: 0.44rem; */ | ||
152 | border-radius: 0.08rem; | 151 | border-radius: 0.08rem; |
153 | font-size: 0.16rem; | 152 | font-size: 0.16rem; |
154 | line-height: 0.44rem; | 153 | line-height: 0.44rem; |
@@ -161,8 +160,8 @@ | @@ -161,8 +160,8 @@ | ||
161 | } | 160 | } |
162 | 161 | ||
163 | .jianzhengleft { | 162 | .jianzhengleft { |
164 | - width: 0.36rem; | ||
165 | - height: 0.44rem; | 163 | + padding: 0.02rem 0.08rem; |
164 | + box-sizing: border-box; | ||
166 | background: #5d9a5c; | 165 | background: #5d9a5c; |
167 | color: #fff; | 166 | color: #fff; |
168 | text-align: center; | 167 | text-align: center; |
@@ -173,8 +172,8 @@ | @@ -173,8 +172,8 @@ | ||
173 | } | 172 | } |
174 | 173 | ||
175 | .jianzhengright { | 174 | .jianzhengright { |
176 | - width: 1.2rem; | ||
177 | - height: 0.44rem; | 175 | + padding: 0.02rem 0.08rem; |
176 | + box-sizing: border-box; | ||
178 | background: #e6ebe6; | 177 | background: #e6ebe6; |
179 | text-align: center; | 178 | text-align: center; |
180 | color: #5d9a5c; | 179 | color: #5d9a5c; |
@@ -1294,7 +1294,7 @@ | @@ -1294,7 +1294,7 @@ | ||
1294 | 1294 | ||
1295 | .dailiimgk { | 1295 | .dailiimgk { |
1296 | width: 6.84rem; | 1296 | width: 6.84rem; |
1297 | - height: 5rem; | 1297 | + /* height: 5rem; */ |
1298 | font-size: 0; | 1298 | font-size: 0; |
1299 | margin: 0.4rem auot 0; | 1299 | margin: 0.4rem auot 0; |
1300 | } | 1300 | } |
@@ -1569,6 +1569,12 @@ | @@ -1569,6 +1569,12 @@ | ||
1569 | margin-top: 0.16rem; | 1569 | margin-top: 0.16rem; |
1570 | } | 1570 | } |
1571 | 1571 | ||
1572 | +.jianfenimgkkk { | ||
1573 | + width: 6.86rem; | ||
1574 | + font-size: 0; | ||
1575 | + margin-top: 0.16rem; | ||
1576 | +} | ||
1577 | + | ||
1572 | .fuwutop { | 1578 | .fuwutop { |
1573 | margin-top: 0.16rem; | 1579 | margin-top: 0.16rem; |
1574 | } | 1580 | } |
@@ -1697,8 +1703,8 @@ | @@ -1697,8 +1703,8 @@ | ||
1697 | } */ | 1703 | } */ |
1698 | 1704 | ||
1699 | .jianzheng { | 1705 | .jianzheng { |
1700 | - width: 1.56rem; | ||
1701 | - height: 0.44rem; | 1706 | + /* width: 1.56rem; |
1707 | + height: 0.44rem; */ | ||
1702 | border-radius: 0.08rem; | 1708 | border-radius: 0.08rem; |
1703 | font-size: 0.16rem; | 1709 | font-size: 0.16rem; |
1704 | line-height: 0.44rem; | 1710 | line-height: 0.44rem; |
@@ -1713,8 +1719,8 @@ | @@ -1713,8 +1719,8 @@ | ||
1713 | } | 1719 | } |
1714 | 1720 | ||
1715 | .jianzhengleft { | 1721 | .jianzhengleft { |
1716 | - width: 0.36rem; | ||
1717 | - height: 0.44rem; | 1722 | + padding: 0.02rem 0.08rem; |
1723 | + box-sizing: border-box; | ||
1718 | background: #5d9a5c; | 1724 | background: #5d9a5c; |
1719 | color: #fff; | 1725 | color: #fff; |
1720 | text-align: center; | 1726 | text-align: center; |
@@ -1725,8 +1731,10 @@ | @@ -1725,8 +1731,10 @@ | ||
1725 | } | 1731 | } |
1726 | 1732 | ||
1727 | .jianzhengright { | 1733 | .jianzhengright { |
1728 | - width: 1.2rem; | ||
1729 | - height: 0.44rem; | 1734 | + padding: 0.02rem 0.08rem; |
1735 | + box-sizing: border-box; | ||
1736 | + display: flex; | ||
1737 | + align-items: center; | ||
1730 | background: #e6ebe6; | 1738 | background: #e6ebe6; |
1731 | text-align: center; | 1739 | text-align: center; |
1732 | color: #5d9a5c; | 1740 | color: #5d9a5c; |
@@ -1940,11 +1948,15 @@ | @@ -1940,11 +1948,15 @@ | ||
1940 | font-size: 0.26rem; | 1948 | font-size: 0.26rem; |
1941 | text-align: center; | 1949 | text-align: center; |
1942 | margin-top: 0.18rem; | 1950 | margin-top: 0.18rem; |
1951 | + width:2.04rem; | ||
1952 | + overflow: hidden; | ||
1953 | + text-overflow: ellipsis; | ||
1954 | + white-space: nowrap; | ||
1943 | } | 1955 | } |
1944 | 1956 | ||
1945 | .sucaiimg { | 1957 | .sucaiimg { |
1946 | - width: 2.08rem; | ||
1947 | - height: 2.08rem; | 1958 | + width: 2.04rem; |
1959 | + height: 2.04rem; | ||
1948 | font-size: 0; | 1960 | font-size: 0; |
1949 | } | 1961 | } |
1950 | 1962 | ||
@@ -1964,9 +1976,14 @@ | @@ -1964,9 +1976,14 @@ | ||
1964 | } | 1976 | } |
1965 | 1977 | ||
1966 | .sucaiboxitempage { | 1978 | .sucaiboxitempage { |
1967 | - margin-right: 0.16rem; | 1979 | + width:2.04rem; |
1980 | + height: 2.54rem; | ||
1981 | + margin-right: 0.32rem; | ||
1968 | margin-bottom: 0.16rem; | 1982 | margin-bottom: 0.16rem; |
1969 | } | 1983 | } |
1984 | +.sucaiboxitempage:nth-child(3n){ | ||
1985 | + margin-right:0 | ||
1986 | +} | ||
1970 | 1987 | ||
1971 | .courseboxk { | 1988 | .courseboxk { |
1972 | margin-top: 0.8rem; | 1989 | margin-top: 0.8rem; |
src/utils/back.js
0 → 100644
1 | import Vue from "vue"; | 1 | import Vue from "vue"; |
2 | -import axios from "./common.js"; | ||
3 | -console.log(axios); | ||
4 | -Vue.prototype.$axios = axios; | 2 | +// import axios from "./common.js"; |
3 | +// console.log(axios); | ||
4 | +// Vue.prototype.$axios = axios; | ||
5 | export function getUrlKey(name) { | 5 | export function getUrlKey(name) { |
6 | return ( | 6 | return ( |
7 | decodeURIComponent( | 7 | decodeURIComponent( |
-
请 注册 或 登录 后发表评论