Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5-watch
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
苏文标
h5-watch
Commits
b64a427a
Commit
b64a427a
authored
Oct 24, 2022
by
liuliufashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
链接直播间装修接口
parent
7af70dc1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
41 deletions
+118
-41
chat.vue
components/chat/chat.vue
+3
-7
footer.vue
components/footer/footer.vue
+1
-1
courseware.vue
components/tabs/courseware/courseware.vue
+57
-5
tabs.vue
components/tabs/tabs.vue
+52
-25
index.vue
pages/index/index.vue
+5
-3
No files found.
components/chat/chat.vue
View file @
b64a427a
...
...
@@ -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
:
10
rpx
;
}
.font-14
{
.font-14
{
font-size
:
14
rpx
;
}
...
...
@@ -151,7 +148,6 @@
height
:
calc
(
100vh
-
500
rpx
);
padding
:
40
rpx
;
letter-spacing
:
2
rpx
;
.person
{
display
:
flex
;
align-items
:
center
;
...
...
components/footer/footer.vue
View file @
b64a427a
...
...
@@ -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>
...
...
components/tabs/courseware/courseware.vue
View file @
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
>
components/tabs/tabs.vue
View file @
b64a427a
<
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
.
nam
e
}}
</span>
<span
:class=
"currentIndex == index ? 'active' : 'default'"
>
{{
item
.
titl
e
}}
</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
:
80
rpx
;
font-size
:
32
rpx
;
box-shadow
:
0
2
rpx
10
rpx
#dadada
;
;
box-shadow
:
0
2
rpx
10
rpx
#dadada
;
;
.items
{
flex
:
1
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.line-through{
.line-through
{
width
:
40
rpx
;
height
:
6
rpx
;
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
>
pages/index/index.vue
View file @
b64a427a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment