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
b69c1c89
Commit
b69c1c89
authored
2 years ago
by
liuliufashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加表情框
parent
6ba3955f
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
77 deletions
+84
-77
footer.vue
components/footer/footer.vue
+54
-36
courseware.vue
components/tabs/courseware/courseware.vue
+27
-35
index.vue
pages/index/index.vue
+3
-6
No files found.
components/footer/footer.vue
View file @
b69c1c89
<
template
>
<view
class=
"content"
>
<image
v-show=
"!inputFalg"
src=
"../../static/images/biaoqing.png"
mode=
"widthFix"
style=
"width: 68rpx;margin: 0 20rpx 0 0;"
>
</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"
confirm-type=
"send"
@
confirm=
"send"
@
keyup
.
enter=
"send"
>
</u--input>
<view
class=
"footer"
>
<view
class=
"content"
>
<!-- 表情 -->
<image
v-show=
"!inputFalg"
src=
"../../static/images/biaoqing.png"
mode=
"widthFix"
style=
"width: 68rpx;margin: 0 20rpx 0 0;"
@
click=
"faceFalg = true"
>
</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=
""
confirm-type=
"send"
@
confirm=
"send"
@
keyup
.
enter=
"send"
>
</u--input>
</view>
<!--
<u-button
style=
"margin: 0 0 0 20rpx;width: 20%;height: 70%;"
text=
"发送"
type=
"success"
v-show=
"!inputFalg"
touchend
.
prevent=
"send"
>
</u-button>
-->
<!-- 发送 -->
<button
class=
"btn_send"
text=
"发送"
v-show=
"!inputFalg"
@
touchend
.
prevent=
"send"
>
发送
</button>
<!-- icon按钮 -->
<view
class=
"icon"
v-show=
"inputFalg"
>
<image
v-for=
"(item,index) in imageList"
:key=
"index+''"
:src=
"item.url"
style=
"width:68rpx"
mode=
"widthFix"
@
click=
"iconbtn(item.title)"
></image>
</view>
<!-- 右侧icon按钮 -->
<view
class=
"icon-right"
v-show=
"inputFalg"
>
<image
class=
"iconright"
v-for=
"(item,index) in imageListRight"
:key=
"index+''"
:src=
"item.url"
style=
"width:68rpx"
mode=
"widthFix"
@
click=
"iconbtn(item.title)"
></image>
</view>
<!-- icontab -->
<component
class=
"absolute"
:is=
"currentTabComponent"
@
onClose=
"onClose"
:show=
"show"
@
specialShow=
"specialShow"
></component>
</view>
<!--
<u-button
style=
"margin: 0 0 0 20rpx;width: 20%;height: 70%;"
text=
"发送"
type=
"success"
v-show=
"!inputFalg"
touchend
.
prevent=
"send"
>
</u-button>
-->
<button
class=
"btn_send"
text=
"发送"
v-show=
"!inputFalg"
@
touchend
.
prevent=
"send"
>
发送
</button>
<view
class=
"icon"
v-show=
"inputFalg"
>
<image
v-for=
"(item,index) in imageList"
:key=
"index+''"
:src=
"item.url"
style=
"width:68rpx"
mode=
"widthFix"
@
click=
"iconbtn(item.title)"
></image>
</view>
<view
class=
"icon-right"
v-show=
"inputFalg"
>
<image
class=
"iconright"
v-for=
"(item,index) in imageListRight"
:key=
"index+''"
:src=
"item.url"
style=
"width:68rpx"
mode=
"widthFix"
@
click=
"iconbtn(item.title)"
></image>
</view>
<!-- icontab -->
<component
class=
"absolute"
:is=
"currentTabComponent"
@
onClose=
"onClose"
:show=
"show"
@
specialShow=
"specialShow"
></component>
<!-- 表情框 -->
<view
v-show=
"faceFalg"
style=
"border: 1px solid red; height: 250rpx;"
></view>
</view>
</
template
>
<
script
>
...
...
@@ -37,8 +46,8 @@
import
shoplist
from
"./shopList/shoplist.vue"
import
msg
from
"@/components/chat/chat.vue"
export
default
{
name
:
"foot"
,
components
:
{
...
...
@@ -50,10 +59,11 @@
shoplist
},
created
()
{
},
data
()
{
return
{
faceFalg
:
false
,
inputFalg
:
true
,
currentTabComponent
:
''
,
show
:
false
,
...
...
@@ -99,23 +109,27 @@
};
},
methods
:
{
// 选择表情
changeFace
(){
this
.
faceFalg
=
true
;
},
//提交输入
send
()
{
var
obj
=
{
type
:
1
,
sendText
:
this
.
value
}
this
.
$emit
(
"sendmsg"
,
obj
)
this
.
$emit
(
"sendmsg"
,
obj
)
this
.
value
=
""
},
// 输入框聚焦事件
inputFocus
()
{
this
.
inputFalg
=
false
uni
.
onKeyboardHeightChange
(
res
=>
{
console
.
log
(
res
.
height
)
console
.
log
(
res
.
height
)
})
},
inputblur
()
{
是
inputblur
()
{
this
.
inputFalg
=
true
},
// 图标按钮点击事件
...
...
@@ -162,18 +176,21 @@
.absolute
{
position
:
absolute
;
}
.footer
{
padding
:
10
rpx
0
;
}
.content
{
box-sizing
:
border-box
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
padding
:
0
40
rpx
;
.input
{
//
width
:
294
rpx
;
flex
:
1
;
}
.btn_send
{
.btn_send
{
margin
:
0
0
0
20
rpx
;
width
:
20%
;
height
:
70%
;
...
...
@@ -183,12 +200,13 @@
color
:
#fff
;
outline
:
none
;
}
.icon
{
flex
:
1
;
text-align
:
right
;
display
:
flex
;
justify-content
:
space-between
;
padding
-left
:
20
rpx
;
margin
-left
:
20
rpx
;
}
.icon-right
{
...
...
This diff is collapsed.
Click to expand it.
components/tabs/courseware/courseware.vue
View file @
b69c1c89
<
template
>
<view>
{{
text
}}
<view
class=
"flex a-center j-center box"
>
<u-empty
v-if=
"showFalg"
mode=
"data"
text=
"内容为空"
>
</u-empty>
</view>
</
template
>
...
...
@@ -9,38 +10,32 @@
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
;
}
this
.
tabsif
(
this
.
tabType
)
},
watch
:
{
tabType
:
function
(
newValue
,
oldValue
){
switch
(
newValue
)
{
tabType
:
function
(
newValue
,
oldValue
)
{
this
.
tabsif
(
newValue
)
}
},
data
()
{
return
{
showFalg
:
true
,
videoList
:[]
};
},
methods
:
{
// 列表判断
tabsif
(
value
)
{
switch
(
value
)
{
case
2
:
this
.
text
=
"课件页面"
break
;
case
3
:
this
.
text
=
"视频页面"
this
.
$api
.
getroombindvideos
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
this
.
videoList
=
this
.
data
.
data
}
})
break
;
case
4
:
this
.
text
=
"问答页面"
...
...
@@ -59,15 +54,12 @@
break
;
}
}
},
data
()
{
return
{
text
:
""
};
}
}
</
script
>
<
style
>
<
style
lang=
"scss"
scoped
>
.box
{
height
:
calc
(
100vh
-
500
rpx
);
}
</
style
>
This diff is collapsed.
Click to expand it.
pages/index/index.vue
View file @
b69c1c89
...
...
@@ -7,10 +7,10 @@
</view>
<tabs
@
skipComponent=
"skip"
></tabs>
<!-- 聊天 -->
<component
:is=
"currentTabComponent"
:specialUrl=
"special"
:msgList=
"msgList"
></component>
<component
:is=
"currentTabComponent"
:specialUrl=
"special"
:msgList=
"msgList"
:tabType=
"type"
></component>
<!-- 底部 -->
<view
class=
"footer"
v-show=
"currentTabComponent == 'chat'"
>
<foot
@
specialShow=
"specialShow"
@
sendmsg=
"sendmsg"
></foot>
<view
class=
"footer"
>
<foot
@
specialShow=
"specialShow"
@
sendmsg=
"sendmsg"
v-show=
"currentTabComponent == 'chat'"
></foot>
</view>
</view>
</
template
>
...
...
@@ -285,15 +285,12 @@
}
.footer
{
height
:
88
rpx
;
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
display
:
flex
;
background-color
:
white
;
box-shadow
:
0
-2
rpx
30
rpx
#dadada
;
;
}
#playerback
{
...
...
This diff is collapsed.
Click to expand it.
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