提交 aa21ae23 编写于 作者: guofeng.chen's avatar guofeng.chen

修改简介

上级 4f130a94
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
<CommonTitle></CommonTitle> <CommonTitle></CommonTitle>
<div class="body"> <div class="body">
<p class="content" :class="{'ellipsis': isUp}">{{ intro }}</p> <p class="content" :class="{'ellipsis': isUp}">{{ intro }}</p>
<div class="toggle-btn" @click="isUp=!isUp"> <div class="toggle-btn" v-show="showArrow" @click="isUp=!isUp">
<span class="action">{{ isUp ? "详情" : "收起"}}</span> <span class="action">{{ isUp ? "详情" : "收起"}}</span>
<img v-show="isUp" src="~@/images/down.png" alt="" /> <img v-show="isUp" src="~@/images/down.png" alt="" />
<img v-show="!isUp" src="~@/images/up.png" alt="" /> <img v-show="!isUp" src="~@/images/up.png" alt="" />
</div> </div>
<div class="offset">{{ intro }}</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -25,10 +26,31 @@ export default { ...@@ -25,10 +26,31 @@ export default {
}, },
data() { data() {
return { return {
isUp: true isUp: true,
showArrow: true,
}
},
watch: {
intro(val) {
this.countH();
}
},
mounted() {
this.countH();
},
methods: {
countH() {
if (this.intro) {
this.$nextTick(() => {
const content = this.$el.querySelector('.content').getBoundingClientRect();
const offset = this.$el.querySelector('.offset').getBoundingClientRect();
if (offset.height < (content.height - 1)) {
this.showArrow = false;
}
})
}
} }
}, },
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -37,7 +59,7 @@ export default { ...@@ -37,7 +59,7 @@ export default {
position: relative; position: relative;
color: #676869; color: #676869;
font-size: 14px; font-size: 14px;
padding: 0 15px; margin: 0 15px;
.content { .content {
display: block; display: block;
text-align: justify; text-align: justify;
...@@ -73,5 +95,14 @@ export default { ...@@ -73,5 +95,14 @@ export default {
} }
} }
} }
.offset{
position: absolute;
left: 0;
top: 0;
width: 100%;
opacity: 0;
visibility: hidden;
pointer-events: none;
}
} }
</style> </style>
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
cover.style.height = '100%'; cover.style.height = '100%';
cover.style.background = `url(${coverImg}) no-repeat center center`; cover.style.background = `url(${coverImg}) no-repeat center center`;
cover.style.backgroundSize = '50px auto'; cover.style.backgroundSize = '50px auto';
cover.style.backgroundColor = 'rgba(255, 255, 255, .95)'; cover.style.backgroundColor = 'rgba(255, 255, 255, .98)';
cover.onclick = () => { cover.onclick = () => {
if (!this.$store.getters.logged) { if (!this.$store.getters.logged) {
this.$store.dispatch('goLogin'); this.$store.dispatch('goLogin');
......
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
this.vid = `video_${this._uid}`; this.vid = `video_${this._uid}`;
this.playTime = 0; this.playTime = 0;
const ua = navigator.userAgent; const ua = navigator.userAgent;
// this.isWechat = ua.match(/(MicroMessenger)\/([\d.]+)/); this.isWechat = ua.match(/(MicroMessenger)\/([\d.]+)/);
this.isAndroid = ua.match(/(Android);?[\s\/]+([\d.]+)?/); this.isAndroid = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
}, },
mounted() { mounted() {
......
...@@ -43,6 +43,7 @@ export const wxConfig = (link) => { ...@@ -43,6 +43,7 @@ export const wxConfig = (link) => {
export const wxShare = (option = {}, successCB = () => {}) => { export const wxShare = (option = {}, successCB = () => {}) => {
wx.ready(() => { wx.ready(() => {
WeixinJSBridge.call('showOptionMenu'); WeixinJSBridge.call('showOptionMenu');
wx.showAllNonBaseMenuItem();
// 分享给朋友 // 分享给朋友
wx.onMenuShareAppMessage({ wx.onMenuShareAppMessage({
title: option.title, title: option.title,
...@@ -77,6 +78,7 @@ export const wxShare = (option = {}, successCB = () => {}) => { ...@@ -77,6 +78,7 @@ export const wxShare = (option = {}, successCB = () => {}) => {
function wxHideMenu() { function wxHideMenu() {
wx.ready(() => { wx.ready(() => {
WeixinJSBridge.call('hideOptionMenu'); WeixinJSBridge.call('hideOptionMenu');
wx.hideAllNonBaseMenuItem();
}); });
} }
......
...@@ -314,6 +314,9 @@ export default { ...@@ -314,6 +314,9 @@ export default {
this.$toast('请前往云鹊医APP进行考试'); this.$toast('请前往云鹊医APP进行考试');
return; return;
} }
if (lecture.lectureId === this.curtLectureId) {
return;
}
let enable = true; let enable = true;
if (showFlag === 10 || (trySeeFlag && !trySeeTime)) { if (showFlag === 10 || (trySeeFlag && !trySeeTime)) {
this.coverType = 2; this.coverType = 2;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册