Commit 47bee02a by suwenbiao

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	components/chat/chat.vue
#	components/footer/footer.vue
#	pages/index/index.vue
parents c939274d b64a427a
<template>
<view>
这是课件页面
{{text}}
</view>
</template>
<script>
export default {
name:"courseware",
name: "courseware",
props: ["tabType"],
mounted() {
switch (this.tabType) {
case 2:
this.text = "课件页面"
break;
case 3:
this.text = "视频页面"
break;
case 4:
this.text = "问答页面"
break;
case 5:
this.text = "讲师评价"
break;
case 7:
this.text = "外部链接"
break;
case 9:
this.text = "图文编辑"
break;
default:
this.text = "自定义页面"
break;
}
},
watch: {
tabType: function(newValue, oldValue){
switch (newValue) {
case 2:
this.text = "课件页面"
break;
case 3:
this.text = "视频页面"
break;
case 4:
this.text = "问答页面"
break;
case 5:
this.text = "讲师评价"
break;
case 7:
this.text = "外部链接"
break;
case 9:
this.text = "图文编辑"
break;
default:
this.text = "自定义页面"
break;
}
}
},
data() {
return {
text: ""
};
}
}
......@@ -17,4 +70,4 @@
<style>
</style>
\ No newline at end of file
</style>
<template>
<view class="content">
<view class="items" v-for="(item,index) in tabList" :key="item.name" @click="tabsClick(index)">
<view class="items" v-for="(item,index) in tabList" :key="item.id" @click="tabsClick(index,item.tagType)">
<view class="flex-col">
<span :class="currentIndex == index ? 'active' : 'default'">{{item.name}}</span>
<span :class="currentIndex == index ? 'active' : 'default'">{{item.title}}</span>
<span class="line-through" v-show="currentIndex == index"></span>
</view>
</view>
......@@ -12,26 +12,48 @@
<script>
export default {
name: "tabs",
props:[],
props: [],
data() {
return {
currentIndex:0,
tabList: [{
name: '聊天室',
id:"chat"
}, {
name: '课件',
id:"courseware"
}, {
name: '直播详情',
id:"sinatv"
}]
currentIndex: 0,
tabList: [
// {
// name: '聊天室',
// id:"chat"
// }, {
// name: '课件',
// id:"courseware"
// }, {
// name: '直播详情',
// id:"sinatv"
// },
]
};
},
methods:{
tabsClick(index){
mounted() {
this.$api.getroomconfigtags().then(res => {
console.log(res, 123)
if (res.data.code == 200) {
this.tabList = res.data.data
}
})
},
methods: {
tabsClick(index,type) {
this.currentIndex = index
this.$emit("skipComponent",this.tabList[index].id)
let id = "";
switch (type) {
case 1:
id = "chat";
break;
case 6:
id = "sinatv"
break;
default:
id = "courseware"
break;
}
this.$emit("skipComponent", {id:id,type:type})
}
}
}
......@@ -42,14 +64,17 @@
display: flex;
height: 80rpx;
font-size: 32rpx;
box-shadow: 0 2rpx 10rpx #dadada;;
box-shadow: 0 2rpx 10rpx #dadada;
;
.items {
flex: 1;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
.line-through{
.line-through {
width: 40rpx;
height: 6rpx;
background-color: #1374E7;
......@@ -57,17 +82,19 @@
}
}
}
.flex-col{
.flex-col {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.active{
color:#1374E7
.active {
color: #1374E7
}
.default{
color:#999999
.default {
color: #999999
}
</style>
......@@ -43,7 +43,8 @@
currentTabComponent: 'chat',
special: "",
msgList: [],
scrollTop:0
scrollTop:0,
type:""
}
},
created() {
......@@ -58,7 +59,9 @@
this.send(val)
},
skip(value) {
this.currentTabComponent = value
console.log(value,3)
this.currentTabComponent = value.id
this.type = value.type
},
specialShow(url) {
this.special = url
......
......@@ -2,4 +2,4 @@
.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2772579d.css><script src="http://pv.sohu.com/cityjson?ie=utf-8"></script><script src=https://static.oclive.cn/live.player_commons_5.2.js></script><link rel=stylesheet href=https://g.alicdn.com/de/prismplayer/2.9.19/skins/default/aliplayer-min.css><link href=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/tcplayer.min.css rel=stylesheet><script src=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/libs/TXLivePlayer-1.2.3.min.js></script><script src=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/libs/hls.min.1.1.5.js></script><script src=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/libs/flv.min.1.6.3.js></script><script src=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/tcplayer.v4.5.4.min.js></script><script src=//unpkg.byted-static.com/xgplayer/2.31.6/browser/index.js charset=utf-8></script><script src=//unpkg.byted-static.com/xgplayer-hls/2.5.2/dist/index.min.js charset=utf-8></script></head><body><div id=app></div><script src=/static/js/chunk-vendors.eceae362.js></script><script src=/static/js/index.fd6d2792.js></script></body></html>
\ No newline at end of file
(coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2772579d.css><script src="http://pv.sohu.com/cityjson?ie=utf-8"></script><script src=https://static.oclive.cn/live.player_commons_5.2.js></script><link rel=stylesheet href=https://g.alicdn.com/de/prismplayer/2.9.19/skins/default/aliplayer-min.css><link href=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/tcplayer.min.css rel=stylesheet><script src=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/libs/TXLivePlayer-1.2.3.min.js></script><script src=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/libs/hls.min.1.1.5.js></script><script src=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/libs/flv.min.1.6.3.js></script><script src=https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.4/tcplayer.v4.5.4.min.js></script><script src=//unpkg.byted-static.com/xgplayer/2.31.6/browser/index.js charset=utf-8></script><script src=//unpkg.byted-static.com/xgplayer-hls/2.5.2/dist/index.min.js charset=utf-8></script></head><body><div id=app></div><script src=/static/js/chunk-vendors.eceae362.js></script><script src=/static/js/index.18949ebb.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment