Commit bbf63be6 authored by Mac's avatar Mac

1

parent 793f3698
...@@ -340,8 +340,8 @@ ...@@ -340,8 +340,8 @@
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#FFF" /> <u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#FFF" />
</scroll-view> </scroll-view>
<!-- 输入框 --> <!-- 输入框 -->
<view class="comment" v-if="focu==true"> <view class="comment" v-if="focu==true" :style="{'bottom':inputheight}">
<input type="text" v-model="commentMsg.Content" :placeholder='placeholder' class="commentinput" :focus='focu'> <input type="text" v-model="commentMsg.Content" :placeholder='placeholder' class="commentinput" :focus='focu' @focus='getfocus'>
<view class="comment-pl" :style="{background:mainColor}" @click="addComment">评论</view> <view class="comment-pl" :style="{background:mainColor}" @click="addComment">评论</view>
</view> </view>
...@@ -415,7 +415,7 @@ ...@@ -415,7 +415,7 @@
playindex:0, playindex:0,
controls:false,//显示默认控件 controls:false,//显示默认控件
dianindex:0,//点的索引 dianindex:0,//点的索引
inputheight:0,//键盘的高度
} }
}, },
created() { created() {
...@@ -591,8 +591,21 @@ ...@@ -591,8 +591,21 @@
} }
} }
); );
},
getfocus(){
uni.onKeyboardHeightChange(res => {
console.log(res.height,'获取')
this.inputheight = res.height+'px'
})
}, },
pinglun(x, i) { //评论 pinglun(x, i) { //评论
uni.onKeyboardHeightChange(res => {
console.log(res.height,'px')
this.inputheight = res.height+'px'
})
this.focu = false;
this.commentMsg.Content = '';
this.placeholder = '评论';
this.focu = true; this.focu = true;
this.choiceId = x.id; this.choiceId = x.id;
this.$forceUpdate() this.$forceUpdate()
...@@ -605,7 +618,8 @@ ...@@ -605,7 +618,8 @@
}, },
inputscroll() { //滚动时触发 inputscroll() { //滚动时触发
//初始化内容 //初始化内容
this.focu = false; this.focu = false;
this.inputheight = 0;
this.commentMsg.Content = ''; this.commentMsg.Content = '';
this.placeholder = '评论'; this.placeholder = '评论';
this.g[this.dianindex].dianshow =false; this.g[this.dianindex].dianshow =false;
...@@ -621,6 +635,10 @@ ...@@ -621,6 +635,10 @@
if(this.msg.UserId == this.user.item.empId){//自己点自己的时候处理 if(this.msg.UserId == this.user.item.empId){//自己点自己的时候处理
this.show=true this.show=true
}else{ }else{
uni.onKeyboardHeightChange(res => {
console.log(res.height,'px')
this.inputheight = res.height+'px'
})
this.focu = true; this.focu = true;
this.choiceId = x.id; this.choiceId = x.id;
this.$forceUpdate() this.$forceUpdate()
...@@ -667,7 +685,8 @@ ...@@ -667,7 +685,8 @@
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.focu = false; this.focu = false;
this.inputheight = 0;
this.commentMsg.Content = ''; this.commentMsg.Content = '';
this.placeholder = '评论'; this.placeholder = '评论';
this.init2(2) this.init2(2)
......
...@@ -295,8 +295,8 @@ ...@@ -295,8 +295,8 @@
</view> </view>
</view> </view>
<!-- 输入框 --> <!-- 输入框 -->
<view class="comment" > <view class="comment" :style="{'bottom':inputheight}">
<input type="text" v-model="commentMsg.Content" :placeholder='placeholder' class="commentinput" :focus='focu'> <input type="text" v-model="commentMsg.Content" :placeholder='placeholder' class="commentinput" :focus='focu' @focus='getfocus'>
<view class="comment-pl" :style="{background:mainColor}" @click.stop="addComment">评论</view> <view class="comment-pl" :style="{background:mainColor}" @click.stop="addComment">评论</view>
</view> </view>
...@@ -348,6 +348,7 @@ ...@@ -348,6 +348,7 @@
isdelete:false,//是否出现删除键 isdelete:false,//是否出现删除键
showdelete:false,//提示删除的弹框 showdelete:false,//提示删除的弹框
index:0,//上个页面的索引 index:0,//上个页面的索引
inputheight:0,//键盘的高度
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -455,6 +456,10 @@ ...@@ -455,6 +456,10 @@
if(this.UserId == this.user.item.empId){//自己点自己的时候处理 if(this.UserId == this.user.item.empId){//自己点自己的时候处理
this.show=true this.show=true
}else{ }else{
uni.onKeyboardHeightChange(res => {
console.log(res.height,'回复')
this.inputheight = res.height+'px'
})
this.focu = true; this.focu = true;
this.choiceId = x.id; this.choiceId = x.id;
...@@ -467,8 +472,22 @@ ...@@ -467,8 +472,22 @@
} }
},
getfocus(){
uni.onKeyboardHeightChange(res => {
console.log(res.height,'获取')
this.inputheight = res.height+'px'
})
}, },
pinglun(x) { //评论 pinglun(x) { //评论
uni.onKeyboardHeightChange(res => {
console.log(res.height,'评论')
this.inputheight = res.height+'px'
})
this.focu = false;
this.commentMsg.Content = '';
this.placeholder = '评论';
this.focu = true; this.focu = true;
this.choiceId = x.id; this.choiceId = x.id;
this.detial.dianshow = false; //隐藏按钮 this.detial.dianshow = false; //隐藏按钮
...@@ -494,6 +513,7 @@ ...@@ -494,6 +513,7 @@
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.inputheight = 0
this.focu = false; this.focu = false;
this.commentMsg.Content = ''; this.commentMsg.Content = '';
this.placeholder = '评论'; this.placeholder = '评论';
...@@ -506,6 +526,7 @@ ...@@ -506,6 +526,7 @@
this.focu=false this.focu=false
this.commentMsg.Content = ''; this.commentMsg.Content = '';
this.placeholder = '评论'; this.placeholder = '评论';
this.inputheight = 0
}, },
mydelete(){//删除自己的回复 mydelete(){//删除自己的回复
this.request2({ this.request2({
......
...@@ -86,6 +86,9 @@ ...@@ -86,6 +86,9 @@
align-items: center; align-items: center;
font-size: 12px; font-size: 12px;
color: #333333; color: #333333;
width: 100%;
height: 100%;
justify-content: center;
} }
.release .as-box{ .release .as-box{
width: 100%; width: 100%;
...@@ -134,7 +137,7 @@ ...@@ -134,7 +137,7 @@
} }
.release .audio-ot{ .release .audio-ot{
width: 1;flex:1;margin-right: 20px;display: flex;flex-direction: row;align-items: center;padding: 0 10px;justify-content: space-between; width: 1;flex:1;margin-right: 20px;display: flex;flex-direction: row;align-items: center;padding: 0 10px;justify-content: space-between;
height: 25px; height: 30px;
background: #EBEBEB; background: #EBEBEB;
border-radius: 4px; border-radius: 4px;
} }
...@@ -537,6 +540,7 @@ ...@@ -537,6 +540,7 @@
}, },
// 录制结束 // 录制结束
onEndRecoder () { onEndRecoder () {
console.log('结束')
this.gifshow = false this.gifshow = false
recorderManager.stop() recorderManager.stop()
}, },
......
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