Commit b7bd8a26 by suwenbiao

请问

parent 4f2a2f73
...@@ -9,18 +9,7 @@ ...@@ -9,18 +9,7 @@
<span class="ml-1">{{item.sendName}}</span> <span class="ml-1">{{item.sendName}}</span>
</view> </view>
<view class="content"> <view class="content">
<span class="text" v-html="getdata(item.text)"></span> <span class="text">{{item.text}}</span>
</view>
<view class="gift_view" v-if="item.type==3">
<view v-if="item.text.notifyType == 5">
{{gsnickname(item.text.nickName)}}给主播送出了{{item.text.giftName}}
</view>
<view v-if="item.text.notifyType == 2">
{{gsnickname(item.text.nickName)}}给主播打赏了{{item.text.amount}}
</view>
<view v-if="item.text == 'enter'">
欢迎 {{gsnickname(item.sendName)}} 进入直播间
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -67,13 +56,6 @@ ...@@ -67,13 +56,6 @@
}) })
} }
}, },
//昵称格式化
gsnickname(val) {
var msgname = val
msgname = msgname.replace(/\d{8,}/g, "*")
msgname = msgname.length > 8 ? msgname.substring(0, 8) + "..." : msgname
return msgname
},
//返回底部 //返回底部
go_bottom() { go_bottom() {
var scr_msg = document.querySelector('.chat') var scr_msg = document.querySelector('.chat')
...@@ -82,10 +64,6 @@ ...@@ -82,10 +64,6 @@
}) })
this.auto_bottom = true this.auto_bottom = true
}, },
getdata(text) {
text = text.replace(/&lt;/g, '<').replace(/&gt;/g, '/>')
return text
},
//监听上滑 //监听上滑
handleScroll(e) { handleScroll(e) {
var scr_msg = document.querySelector('.chat') var scr_msg = document.querySelector('.chat')
...@@ -104,13 +82,7 @@ ...@@ -104,13 +82,7 @@
.ml-1 { .ml-1 {
margin-left: 10rpx; margin-left: 10rpx;
} }
.gift_view{
color: red;
font-size: 28rpx;
text-align: left;
width: 80%;
margin: 20rpx auto;
}
.font-14 { .font-14 {
font-size: 28rpx; font-size: 28rpx;
} }
...@@ -139,15 +111,13 @@ ...@@ -139,15 +111,13 @@
} }
.content { .content {
line-height: 60rpx; line-height: 80rpx;
margin-left: 80rpx; margin-left: 80rpx;
.text { .text {
display: inline-block; display: inline-block;
border-radius: 10rpx; border-radius: 10rpx;
max-width: 80%; padding: 0 24rpx;
word-wrap: break-word;
padding: 10rpx 24rpx;
box-shadow: 5rpx 5rpx 10rpx #dedede; box-shadow: 5rpx 5rpx 10rpx #dedede;
} }
} }
...@@ -165,8 +135,7 @@ ...@@ -165,8 +135,7 @@
border-radius: 30rpx 0 0 30rpx; border-radius: 30rpx 0 0 30rpx;
padding: 10rpx; padding: 10rpx;
font-size: 28rpx; font-size: 28rpx;
img{
img {
width: 28rpx; width: 28rpx;
vertical-align: middle; vertical-align: middle;
height: 28rpx; height: 28rpx;
......
diff a/components/chat/chat.vue b/components/chat/chat.vue (rejected hunks)
@@ -165,7 +165,8 @@
border-radius: 30rpx 0 0 30rpx;
padding: 10rpx;
font-size: 28rpx;
- img{
+
+ img {
width: 28rpx;
vertical-align: middle;
height: 28rpx;
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
gift, gift,
service, service,
reward, reward,
shoplist shoplist,
}, },
created() { created() {
......
diff a/components/footer/footer.vue b/components/footer/footer.vue (rejected hunks)
@@ -106,17 +106,17 @@
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)
+ this.bqheight = res.height * 2
})
},
- inputblur() {是
+ inputblur() {
this.inputFalg = true
},
// 图标按钮点击事件
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
console.log(res); console.log(res);
if (res.data.data) { if (res.data.data) {
var num = res.data.data.orderNum var num = res.data.data.orderNum
var parms = res.data.data.url var parms = res.data.data
var jWeixin = require('jweixin-module') var jWeixin = require('jweixin-module')
jWeixin.config({ jWeixin.config({
debug: false, debug: false,
......
diff a/pages/index/index.vue b/pages/index/index.vue (rejected hunks)
@@ -40,24 +40,16 @@
value: '',
currentTabComponent: 'chat',
special: "",
- msgList: [],
- scrollTop: 0,
- type: ""
+ type:""
}
},
created() {
- this.getusertoken()
},
onshow() {
},
methods: {
- //触发消息
- sendmsg(val) {
- this.send(val)
- },
skip(value) {
- console.log(value, 3)
this.currentTabComponent = value.id
this.type = value.type
},
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