Commit 382849a2 authored by Mac's avatar Mac

1

parent 17da7935
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
} }
.friendcircle .comment{ .friendcircle .comment{
width: 100%; width: 100%;
height: 55px; height: 80px;
padding: 0 15px; padding: 0 15px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -338,11 +338,11 @@ ...@@ -338,11 +338,11 @@
</view> </view>
</view> </view>
<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" />
<view style="width: 100%;height: 60px;"></view> <view style="width: 100%;height: 85px;"></view>
</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' @focus='getfocus' @keyboardheightchange='keyboardheight'> <input type="text" v-model="commentMsg.Content" :placeholder='placeholder' class="commentinput" :focus='focu' @focus='getfocus' @blur='inputheight=0'>
<view class="comment-pl" :style="{background:mainColor}" @click="addComment">评论</view> <view class="comment-pl" :style="{background:mainColor}" @click="addComment">评论</view>
</view> </view>
...@@ -506,9 +506,7 @@ ...@@ -506,9 +506,7 @@
} }
); );
}, },
keyboardheight(e){
console.log(e,'新的')
},
//语音播放 //语音播放
playVoice(x,i) { playVoice(x,i) {
let that = this let that = this
...@@ -599,16 +597,15 @@ ...@@ -599,16 +597,15 @@
); );
}, },
getfocus(){ getfocus(){
uni.onKeyboardHeightChange(res => { let data = uni.getSystemInfoSync().system.indexOf('iOS')
console.log(res.height,'获取') if(data==-1){
this.inputheight = res.height+'px' this.inputheight = '24px'
}) }
}, },
pinglun(x, i) { //评论 pinglun(x, i) { //评论
uni.onKeyboardHeightChange(res => {
console.log(res.height,'px')
this.inputheight = res.height+'px'
})
this.focu = false; this.focu = false;
this.commentMsg.Content = ''; this.commentMsg.Content = '';
this.placeholder = '评论'; this.placeholder = '评论';
...@@ -625,7 +622,6 @@ ...@@ -625,7 +622,6 @@
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;
...@@ -652,10 +648,7 @@ ...@@ -652,10 +648,7 @@
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()
...@@ -703,7 +696,7 @@ ...@@ -703,7 +696,7 @@
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,14 @@ ...@@ -295,8 +295,14 @@
</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' @focus='getfocus' > <input type="text"
v-model="commentMsg.Content"
:placeholder='placeholder'
class="commentinput"
:focus='focu'
@blur='inputheight=0'
@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>
...@@ -466,10 +472,7 @@ ...@@ -466,10 +472,7 @@
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;
...@@ -484,17 +487,13 @@ ...@@ -484,17 +487,13 @@
}, },
getfocus(){ getfocus(){
uni.onKeyboardHeightChange(res => { let data = uni.getSystemInfoSync().system.indexOf('iOS')
console.log(res.height,'获取') if(data==-1){
this.inputheight = res.height+'px' this.inputheight = '24px'
}) }
}, },
pinglun(x) { //评论 pinglun(x) { //评论
uni.onKeyboardHeightChange(res => {
console.log(res.height,'评论')
this.inputheight = res.height+'px'
})
this.focu = false; this.focu = false;
this.commentMsg.Content = ''; this.commentMsg.Content = '';
this.placeholder = '评论'; this.placeholder = '评论';
...@@ -523,7 +522,7 @@ ...@@ -523,7 +522,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 = '评论';
...@@ -536,7 +535,7 @@ ...@@ -536,7 +535,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({
......
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