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

修改简介

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