Commit b64a427a by liuliufashi

链接直播间装修接口

parent 7af70dc1
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
<!-- 特效礼物 --> <!-- 特效礼物 -->
<special :url="specialUrl"></special> <special :url="specialUrl"></special>
<scroll-view lower-threshold="20" scroll-y="true" class="chat" show-scrollbar="false" :scroll-top="scrollTop"> <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"> <view class="cavasation my-2" 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="person"> <view class="person">
<u-avatar :src="item.avatar" size="60"></u-avatar> <u-avatar :src="item.avatar" size="60"></u-avatar>
<span class="ml-1">{{item.name}}</span> <span class="ml-1">{{item.name}}</span>
...@@ -14,8 +12,6 @@ ...@@ -14,8 +12,6 @@
<span class="text">{{item.content}}</span> <span class="text">{{item.content}}</span>
</view> </view>
</view> </view>
</scroll-view>
</view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
...@@ -133,7 +129,8 @@ ...@@ -133,7 +129,8 @@
.ml-1 { .ml-1 {
margin-left: 10rpx; margin-left: 10rpx;
} }
.font-14{
.font-14 {
font-size: 14rpx; font-size: 14rpx;
} }
...@@ -151,7 +148,6 @@ ...@@ -151,7 +148,6 @@
height: calc(100vh - 500rpx); height: calc(100vh - 500rpx);
padding: 40rpx; padding: 40rpx;
letter-spacing: 2rpx; letter-spacing: 2rpx;
.person { .person {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</image> </image>
<view class="input"> <view class="input">
<u--input style="background-color: #d9d9d9;height: 64rpx;padding-left:20rpx;" type="text" border="none" <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> confirmType="发送" confirm="send"></u--input>
</u--input> </u--input>
</view> </view>
......
<template> <template>
<view> <view>
这是课件页面 {{text}}
</view> </view>
</template> </template>
<script> <script>
export default { 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() { data() {
return { return {
text: ""
}; };
} }
} }
...@@ -17,4 +70,4 @@ ...@@ -17,4 +70,4 @@
<style> <style>
</style> </style>
\ No newline at end of file
<template> <template>
<view class="content"> <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"> <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> <span class="line-through" v-show="currentIndex == index"></span>
</view> </view>
</view> </view>
...@@ -12,26 +12,48 @@ ...@@ -12,26 +12,48 @@
<script> <script>
export default { export default {
name: "tabs", name: "tabs",
props:[], props: [],
data() { data() {
return { return {
currentIndex:0, currentIndex: 0,
tabList: [{ tabList: [
name: '聊天室', // {
id:"chat" // name: '聊天室',
}, { // id:"chat"
name: '课件', // }, {
id:"courseware" // name: '课件',
}, { // id:"courseware"
name: '直播详情', // }, {
id:"sinatv" // name: '直播详情',
}] // id:"sinatv"
// },
]
}; };
}, },
methods:{ mounted() {
tabsClick(index){ 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.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 @@ ...@@ -42,14 +64,17 @@
display: flex; display: flex;
height: 80rpx; height: 80rpx;
font-size: 32rpx; font-size: 32rpx;
box-shadow: 0 2rpx 10rpx #dadada;; box-shadow: 0 2rpx 10rpx #dadada;
;
.items { .items {
flex: 1; flex: 1;
text-align: center; text-align: center;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.line-through{
.line-through {
width: 40rpx; width: 40rpx;
height: 6rpx; height: 6rpx;
background-color: #1374E7; background-color: #1374E7;
...@@ -57,17 +82,19 @@ ...@@ -57,17 +82,19 @@
} }
} }
} }
.flex-col{
.flex-col {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.active{ .active {
color:#1374E7 color: #1374E7
} }
.default{
color:#999999 .default {
color: #999999
} }
</style> </style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</view> </view>
<tabs @skipComponent="skip"></tabs> <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'"> <view class="footer" v-show="currentTabComponent == 'chat'">
<foot @specialShow="specialShow"></foot> <foot @specialShow="specialShow"></foot>
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
value: '', value: '',
currentTabComponent: 'chat', currentTabComponent: 'chat',
special: "", special: "",
type:""
} }
}, },
created() { created() {
...@@ -48,9 +49,10 @@ ...@@ -48,9 +49,10 @@
}, },
methods: { methods: {
skip(value) { skip(value) {
this.currentTabComponent = value console.log(value,3)
this.currentTabComponent = value.id
this.type = value.type
}, },
specialShow(url) { specialShow(url) {
this.special = 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