<template>
|
<view class="pColumn" >
|
<view class="inPColumn" v-if="fromW == 0">
|
<view class="left" @click="chating">
|
<view class="top">
|
<view class="userImg">
|
<img class="img" :src=Pdata.avatar>
|
</view>
|
<view class="t-type">{{Pdata.recipientName}}</view>
|
<view class="t-id">{{Pdata.postTime}}</view>
|
</view>
|
<view class="bottom">{{Pdata.postMessage}}</view>
|
</view>
|
</view>
|
<view class="inPColumn" v-if="fromW == 1">
|
<view class="left" @click="QZchating">
|
<view class="top">
|
<view class="userImg">
|
<img class="img" :src=Pdata.avatar>
|
</view>
|
<view class="t-type">{{Pdata.GroupName}}</view>
|
<!-- <view class="t-id">{{Pdata.postTime}}</view> -->
|
</view>
|
<view class="bottom">{{Pdata.GroupContent}}</view>
|
</view>
|
</view>
|
<view class="inPColumn" v-if="fromW == 2">
|
<view class="left" @click="TXLchating">
|
<view class="top">
|
<view class="userImg">
|
<img class="img" :src=Pdata.avatar>
|
</view>
|
<view class="t-type">{{Pdata.realName}}</view>
|
<!-- <view class="t-id">{{Pdata.postTime}}</view> -->
|
</view>
|
<view class="bottom">电话:{{Pdata.phone}}</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
props: ['fromW', 'Pdata'],
|
data() {
|
return {
|
popuShow: false,
|
bmainb: ''
|
}
|
},
|
methods: {
|
beginObj() {
|
this.bmainb = '3rem';
|
//#ifdef MP-WEIXIN
|
this.bmainb = '0';
|
//#endif
|
},
|
chating(){
|
//发起聊天
|
var datas = this.Pdata;
|
//alert(datas.name)
|
uni.navigateTo({
|
url: '/pages/groupChat/chating?chatID=' + datas.recipientId.toString()
|
});
|
},
|
QZchating(){
|
//发起聊天
|
var datas = this.Pdata;
|
//alert(datas.name)
|
uni.navigateTo({
|
url: '/pages/groupChat/chatingQZ?chatID=' + datas.id.toString()
|
});
|
},
|
TXLchating(){
|
//发起聊天
|
var datas = this.Pdata;
|
//alert(datas.name)
|
uni.navigateTo({
|
url: '/pages/groupChat/chating?chatID=' + datas.id.toString()
|
});
|
},
|
onClose() { //触摸遮罩事件
|
this.setData({
|
popuShow: false
|
});
|
},
|
},
|
mounted() {
|
this.beginObj();
|
}
|
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
/* components/pColumn/pColumn.wxss */
|
.pColumn,
|
.inPColumn,
|
.left,
|
.right,
|
.top {
|
display: flex;
|
}
|
|
.userImg {
|
// border: 1px solid #007AFF;
|
|
.img {
|
width: 100rpx;
|
height: 100rpx;
|
border-radius: 100rpx;
|
// border: 1px solid #007AFF;
|
}
|
}
|
|
.pColumn {
|
width: 100%;
|
align-items: center;
|
justify-content: center;
|
padding-top: 0.5rem;
|
|
.inPColumn {
|
margin: 0.2rem 0 0.4rem 0;
|
width: 95%;
|
height: 4rem;
|
border-bottom: 1px rgb(207, 207, 207) solid;
|
align-items: center;
|
justify-content: space-between;
|
|
.left {
|
width: 80%;
|
/* border: 1px rgb(114, 250, 159) solid; */
|
flex-direction: column;
|
|
.top {
|
.t-type {
|
padding-left: 0.7rem;
|
font-size: 1.1rem;
|
color: #000000;
|
}
|
|
.t-id {
|
color: #8b8b8b;
|
font-size: 0.8rem;
|
line-height: 1.6rem;
|
position: absolute;
|
right: 1.2rem;
|
}
|
}
|
|
.bottom {
|
color: #8b8b8b;
|
font-size: 0.9rem;
|
position: relative;
|
bottom: 1rem;
|
left: 4rem;
|
}
|
}
|
|
.right {
|
width: 20%;
|
/* border: 1px rgb(143, 114, 250) solid; */
|
justify-content: space-around;
|
|
/* align-items: center; */
|
.butPopup {
|
z-index: 4;
|
position: fixed;
|
top: 0;
|
left: 0;
|
width: 100%;
|
height: 100%;
|
background-color: rgba($color: #000000, $alpha: 0.5);
|
|
.b-main {
|
position: absolute;
|
z-index: 2;
|
// bottom: 3rem;//小程序不兼容
|
width: 100%;
|
// border: 1px solid #007AFF;
|
border-radius: 1.5rem;
|
background-color: #fff;
|
|
// height: 20rem;
|
.b-m-title {
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
width: 100%;
|
height: 2.8rem;
|
}
|
|
.b-m-Y,
|
.b-m-N {
|
color: #fff;
|
border-radius: 0;
|
}
|
|
.b-m-Y {
|
background-color: #07C160 !important;
|
}
|
|
.b-m-Y-hove {
|
background-color: #048c44 !important;
|
}
|
|
.b-m-N {
|
background-color: #FF976A !important;
|
}
|
|
.b-m-N-hove {
|
background-color: #e1855d !important;
|
}
|
}
|
}
|
}
|
}
|
}
|
|
|
|
|
// .buttitle {
|
// display: flex;
|
// align-items: center;
|
// justify-content: center;
|
// width: 100%;
|
// height: 2.8rem;
|
// }
|
|
// .popups {
|
// width: 100%;
|
// padding-bottom: 0 !important;
|
// /* border: 1px solid seagreen; */
|
// }
|
</style>
|