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
018c7aee
Commit
018c7aee
authored
Oct 23, 2022
by
liuliufashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改发送按钮
parent
0a066635
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
51 deletions
+74
-51
chat.vue
components/chat/chat.vue
+8
-6
footer.vue
components/footer/footer.vue
+10
-6
gift.vue
components/footer/gift/gift.vue
+54
-37
index.vue
pages/index/index.vue
+2
-2
No files found.
components/chat/chat.vue
View file @
018c7aee
<
template
>
<view
class=
"box"
>
<view
class=
"box
font-14
"
>
<!-- 特效礼物 -->
<special
:url=
"specialUrl"
></special>
<scroll-view
lower-threshold=
"20"
scroll-y=
"true"
class=
"chat"
show-scrollbar=
"true"
>
<view
class=
"cavasation my-
1"
v-for=
"(item,index) in datalist"
:key=
"index+''
"
>
<view
class=
"cavasation my-
2"
v-for=
"(item,index) in datalist"
:key=
"index
"
>
<view
class=
"person"
>
<u-avatar
:src=
"item.avatar"
size=
"
8
0"
></u-avatar>
<u-avatar
:src=
"item.avatar"
size=
"
6
0"
></u-avatar>
<span
class=
"ml-1"
>
{{
item
.
name
}}
</span>
</view>
<view
class=
"content"
>
...
...
@@ -69,9 +69,12 @@
.ml-1
{
margin-left
:
10
rpx
;
}
.font-14
{
font-size
:
14
rpx
;
}
.my-
1
{
margin
:
1
0
rpx
0
;
.my-
2
{
margin
:
2
0
rpx
0
;
}
.box
{
...
...
@@ -83,7 +86,6 @@
box-sizing
:
border-box
;
height
:
calc
(
100vh
-
500
rpx
);
padding
:
40
rpx
;
//
font-size
:
26
rpx
;
letter-spacing
:
2
rpx
;
.person
{
...
...
components/footer/footer.vue
View file @
018c7aee
<
template
>
<view
class=
"content"
>
<image
v-show=
"!inputFalg"
src=
"../../static/images/IM.png"
mode=
"widthFix"
style=
"width: 68rpx;margin: 0 20rpx 0 0;"
></image>
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"
></u--input>
shape=
"circle"
placeholder=
"说点什么吧..."
v-model=
"value"
@
focus=
"inputFocus"
@
blur=
"inputblur"
>
</u--input>
</view>
<u-button
style=
"margin: 0 0 0 20rpx;width: 20%;height: 70%;"
text=
"发送"
type=
"success"
v-show=
"!inputFalg"
></u-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>
...
...
@@ -17,7 +20,8 @@
style=
"width:68rpx"
mode=
"widthFix"
@
click=
"iconbtn(item.title)"
></image>
</view>
<!-- icontab -->
<component
class=
"absolute"
:is=
"currentTabComponent"
@
onClose=
"onClose"
:show=
"show"
@
specialShow=
"specialShow"
></component>
<component
class=
"absolute"
:is=
"currentTabComponent"
@
onClose=
"onClose"
:show=
"show"
@
specialShow=
"specialShow"
></component>
</view>
</
template
>
...
...
@@ -125,8 +129,8 @@
this
.
currentTabComponent
=
''
},
// 点击发送特效
specialShow
(
url
){
this
.
$emit
(
"specialShow"
,
url
)
specialShow
(
url
)
{
this
.
$emit
(
"specialShow"
,
url
)
}
}
}
...
...
components/footer/gift/gift.vue
View file @
018c7aee
...
...
@@ -6,14 +6,17 @@
<u-icon
name=
"close"
@
click=
"onClose"
></u-icon>
</view>
<swiper
indicator-dots
>
<swiper-item
class=
"flex flex-around"
>
<view
v-for=
"(item,index) in datalist"
:key=
"index+''"
class=
"flex-col"
:class=
"currentIndex == index ? 'active' : ''"
>
<swiper-item
class=
"flex"
:class=
"[pers.length >= 5 ? 'flex-around' : '']"
v-for=
"(pers,index) in datalist"
:key=
"index+''"
>
<view
v-for=
"(item,i) in pers"
:key=
"item.id"
class=
"w-20 flex-col"
:class=
"currentIndex == index+i.toString() ? 'active' : ''"
>
<view
class=
"image-padding"
>
<image
:src=
"item.url"
style=
"width:94rpx;"
mode=
"widthFix"
@
click=
"giftClick(index)"
>
<image
:src=
"item.giftPicUrl"
style=
"width:94rpx;"
mode=
"widthFix"
@
click=
"giftClick(index,i)"
>
</image>
</view>
<text
@
click=
"send(index)"
>
{{
currentIndex
==
index
?
"赠送"
:
item
.
title
}}
</text>
<text
v-if=
"currentIndex == index+i.toString()"
@
click=
'send(index,i)'
>
赠送
</text>
<text
v-else
>
{{
item
.
giftPrice
==
0
?
"免费"
:
item
.
giftPrice
+
"币"
}}
</text>
</view>
</swiper-item>
</swiper>
...
...
@@ -27,46 +30,66 @@
data
()
{
return
{
currentIndex
:
""
,
datalist
:
[{
title
:
"免费"
,
url
:
"/static/images/gift/599778030eff04b11420e3d8751bfbb6 1@2x.png"
},
{
title
:
"免费"
,
url
:
"/static/images/gift/0ea40b8376ef8157791b928a339ed9c9_tplv-obj 1@2x.png"
},
{
title
:
"免费"
,
url
:
"/static/images/gift/898bc8988a737b909e952854747c8f7e_tplv-obj 1@2x.png"
},
{
title
:
"免费"
,
url
:
"/static/images/gift/a7ccf403bd4b727447d9ab06f1d9231c 1@2x.png"
},
{
title
:
"99币"
,
url
:
"/static/images/gift/e1972046aa7cc5ae870041a655ddf016_tplv-obj 1@2x.png"
},
total
:
'00'
,
datalist
:
[
// {
// title: "免费",
// url: "/static/images/gift/599778030eff04b11420e3d8751bfbb6 1@2x.png"
// },
// {
// title: "免费",
// url: "/static/images/gift/0ea40b8376ef8157791b928a339ed9c9_tplv-obj 1@2x.png"
// },
// {
// title: "免费",
// url: "/static/images/gift/898bc8988a737b909e952854747c8f7e_tplv-obj 1@2x.png"
// },
// {
// title: "免费",
// url: "/static/images/gift/a7ccf403bd4b727447d9ab06f1d9231c 1@2x.png"
// },
// {
// title: "99币",
// url: "/static/images/gift/e1972046aa7cc5ae870041a655ddf016_tplv-obj 1@2x.png"
// },
]
}
},
mounted
()
{
let
_this
=
this
this
.
$api
.
getclientgift
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
data
=
res
.
data
.
data
;
let
total
=
Math
.
ceil
(
data
.
length
/
5
);
_this
.
total
=
total
for
(
let
i
=
0
;
i
<
total
-
1
;
i
++
)
{
if
(
i
==
total
)
break
;
let
gif
=
data
.
splice
(
i
*
5
,
i
*
5
+
5
)
_this
.
datalist
.
push
(
gif
)
}
}
})
},
methods
:
{
onClose
()
{
this
.
$emit
(
"onClose"
);
},
giftClick
(
index
)
{
this
.
currentIndex
=
index
;
giftClick
(
index
,
i
)
{
this
.
currentIndex
=
index
+
i
.
toString
()
;
},
send
(
index
)
{
if
(
this
.
currentIndex
!=
index
)
return
;
send
(
index
,
i
)
{
if
(
this
.
currentIndex
!=
index
+
i
.
toString
()
)
return
;
this
.
onClose
()
this
.
$emit
(
"specialShow"
,
this
.
datalist
[
index
].
u
rl
)
this
.
$emit
(
"specialShow"
,
this
.
datalist
[
index
][
i
].
giftPicU
rl
)
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.inline
{
display
:
inline-block
;
}
.mt-1
{
margin-top
:
10
rpx
;
}
...
...
@@ -84,7 +107,7 @@
}
.flex-col
{
display
:
flex
;
display
:
inline-
flex
;
flex-direction
:
column
;
justify-content
:
left
;
align-items
:
center
;
...
...
@@ -121,10 +144,4 @@
padding
:
5
rpx
0
;
}
}
@keyframes
gift
{
from
{
}
to
{}
}
</
style
>
pages/index/index.vue
View file @
018c7aee
...
...
@@ -2,7 +2,7 @@
<view
class=
"contents"
>
<!-- 视频区 -->
<view
class=
"banner"
></view>
<
!--
<login></login>
--
>
<
login></login
>
<tabs
@
skipComponent =
"skip"
></tabs>
<!-- 聊天 -->
<component
:is=
"currentTabComponent"
:specialUrl=
"special"
></component>
...
...
@@ -33,7 +33,7 @@
}
},
onLoad
()
{
},
onshow
()
{
...
...
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