Commit b64a427a by liuliufashi

链接直播间装修接口

parent 7af70dc1
......@@ -3,9 +3,7 @@
<!-- 特效礼物 -->
<special :url="specialUrl"></special>
<scroll-view lower-threshold="20" scroll-y="true" class="chat" show-scrollbar="false" :scroll-top="scrollTop">
<view class="cavasation my-1" v-for="(item,index) in msgList" :key="index">
<scroll-view lower-threshold="20" scroll-y="true" class="chat" show-scrollbar="true">
<view class="cavasation my-2" v-for="(item,index) in datalist" :key="index">
<view class="cavasation my-2" v-for="(item,index) in msgList" :key="index">
<view class="person">
<u-avatar :src="item.avatar" size="60"></u-avatar>
<span class="ml-1">{{item.name}}</span>
......@@ -14,8 +12,6 @@
<span class="text">{{item.content}}</span>
</view>
</view>
</scroll-view>
</view>
</scroll-view>
</view>
</template>
......@@ -133,7 +129,8 @@
.ml-1 {
margin-left: 10rpx;
}
.font-14{
.font-14 {
font-size: 14rpx;
}
......@@ -151,7 +148,6 @@
height: calc(100vh - 500rpx);
padding: 40rpx;
letter-spacing: 2rpx;
.person {
display: flex;
align-items: center;
......
......@@ -5,7 +5,7 @@
</image>
<view class="input">
<u--input style="background-color: #d9d9d9;height: 64rpx;padding-left:20rpx;" type="text" border="none"
shape="circle" placeholder="说点什么吧..." v-model="value" @focus="inputFocus" @blur="inputblur"
shape="circle" placeholder="说点什么吧..." v-model="value" @focus="inputFocus" @blur="send"
confirmType="发送" confirm="send"></u--input>
</u--input>
</view>
......
<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>
......@@ -7,7 +7,7 @@
</view>
<tabs @skipComponent="skip"></tabs>
<!-- 聊天 -->
<component :is="currentTabComponent" :specialUrl="special"></component>
<component :is="currentTabComponent" :specialUrl="special" :tabType="type"></component>
<!-- 底部 -->
<view class="footer" v-show="currentTabComponent == 'chat'">
<foot @specialShow="specialShow"></foot>
......@@ -40,6 +40,7 @@
value: '',
currentTabComponent: 'chat',
special: "",
type:""
}
},
created() {
......@@ -48,9 +49,10 @@
},
methods: {
skip(value) {
this.currentTabComponent = value
console.log(value,3)
this.currentTabComponent = value.id
this.type = value.type
},
specialShow(url) {
this.special = url
......
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