This commit is contained in:
2023-11-28 20:45:05 +08:00
parent a8ddb2ff68
commit 12c9920e1e
518 changed files with 2 additions and 87911 deletions

View File

@@ -1,643 +0,0 @@
<template>
<!-- #ifdef APP-NVUE -->
<cell>
<!-- #endif -->
<view class="zfb-tk-item" :class="[{ 'zfb-tk-msgleft': item.type == 1 }, { 'zfb-tk-msgright': item.type == 2 }, { 'zfb-tk-msgcenter': item.type == 3 }]">
<openTool :class="[{ 'openTool-msgleft': item.type == 1 }, { 'openTool-msgright': item.type == 2 }]" :talkTo="talkTo" :ref="'toolx'+itemKey" :data="item" :itemKey="itemKey"></openTool>
<image class="zfb-tk-avatar" @click="gochatOne(item)" v-if="item.type !== 3" :src="item.portrait" mode="aspectFill"></image>
<view class="zfb-tk-item-contentx" @longpress="longpressItem($event,itemKey,item)">
<view class="zfb-tk-item-contentx-c">
<view class="zfb-tk-time-notsend wxfont fssb" @click="tryagin(item, itemKey)" v-if="item.sendtype && item.sendtype == 'error'"></view>
<view class="zfb-tk-item-contentx-c-tool">
<view class="zfb-tk-item-c" v-if="item.msgType == 'TEXT'">
<text>{{ item.content }}</text>
</view>
<view class="zfb-tk-item-c" v-if="item.msgType == 'ALERT'">
<text>{{ item.content }}</text>
</view>
<view class="zfb-tk-item-c-LOCATION" v-if="item.msgType == 'LOCATION'" @click="goMap(returnParse(item.content))">
<view class="zfb-tk-item-c-LOCATION-name">{{ returnParse(item.content).name }}</view>
<view class="zfb-tk-item-c-LOCATION-address">{{ returnParse(item.content).address }}</view>
<image class="zfb-tk-item-c-LOCATION-map" src="../../static/wx/map.png" mode="aspectFit"></image>
</view>
<image class="zfb-tk-item-c-img" v-if="item.msgType == 'IMAGE'" :src="returnParse(item.content).url" mode="aspectFill" @click="$fc.previewImagesolo(returnParse(item.content).url)"></image>
<view v-if="item.msgType == 'VOICE'" class="zfb-tk-item-c-VOICE">
<view class="zfb-tk-item-c-VOICE-msg">
<view class="zfb-tk-item-c-VOICE-tras" @click="showTrs=!showTrs">
<text>转文字</text>
<!-- <view class="zfb-tk-item-c-VOICE-tras-icon"></view> -->
</view>
<view class="zfb-tk-item-c" @click="playVOICE(returnParse(item.content).url)">
<text>{{returnParse(item.content).time}}</text>
<text class="wxfont yuyin" :class="{vmove:paused}"></text>
</view>
</view>
</view>
<view v-if="item.msgType == 'TRTC_VOICE_END'" class="zfb-tk-item-c-TRTC_VOICE_END" @click="sendVoiceCall">
<view class="zfb-tk-TRTC zfb-tk-item-c">
<view class="wxfont yuyin3"></view>
<text>语音通话 时长{{item.content}}</text>
</view>
</view>
<view v-if="item.msgType == 'TRTC_VIDEO_END'" class="zfb-tk-item-c-TRTC_VIDEO_END" @click="sendVideoCall">
<view class="zfb-tk-TRTC zfb-tk-item-c">
<view class="wxfont shipin"></view>
<text>视频通话 时长{{item.content}}</text>
</view>
</view>
<view class="zfb-tk-item-c-video" v-if="item.msgType == 'VIDEO'" @click="openVideo(returnParse(item.content).videoUrl)">
<image class="zfb-tk-item-c-img" :src="returnParse(item.content).url" mode="aspectFill"></image>
<view class="zfb-tk-item-c-video-icon">
<text class="wxfont bofang"></text>
</view>
</view>
<view class="zfb-tk-item-c-CARD" v-if="item.msgType == 'CARD'" @click="goAddfriend(returnParse(item.content))">
<view class="zfb-tk-item-c-CARD-top">
<image class="zfb-tk-item-c-CARD-top-img" :src="returnParse(item.content).avatar" mode=""></image>
<view class="zfb-tk-item-c-CARD-top-content">
<view class="zfb-tk-item-c-CARD-title">{{returnParse(item.content).name}}</view>
<view class="zfb-tk-item-c-CARD-no">{{returnParse(item.content).chatNo}}</view>
</view>
</view>
<view class="zfb-tk-item-c-CARD-card">推荐名片</view>
</view>
<view v-if="showTrs" class="zfb-tk-item-c-VOICE-tras-text">{{returnParse(item.content).text}}</view>
<view class="zfb-tk-time" v-if="item.time">{{ timeDetia(item.time) }}</view>
</view>
</view>
</view>
</view>
<!-- #ifdef APP-NVUE -->
</cell>
<!-- #endif -->
</template>
<script>
// #ifdef APP-PLUS
const TUICalling = uni.requireNativePlugin("TUICallingUniPlugin-TUICallingModule");
// #endif
import openTool from './openTool.vue'
export default {
emits: ['tryagin','longpressItem'],
name: 'chat-item',
components:{
openTool
},
props: {
item: {
type: Object,
default: {}
},
talkTo: {
type: Object,
default: {}
},
itemKey: {
type: Number
},
longTapItemKey: {
type: [Number,String],
default:''
}
},
watch:{
longTapItemKey(v){
if(this.itemKey==v){
this.$refs['toolx'+v].showTab();
}
}
},
data() {
return {
innerAudioContext:'',
paused:false,
showTrs:false,
};
},
methods: {
sendVoiceCall(){
//发起语音
uni.showLoading({
title:'发起语音通话'
})
var formdata={
userId: this.talkTo.userId,
msgType: "TRTC_VOICE_START",
content: "TRTC_VOICE_START"
}
this.$http.request({
url: '/chat/sendMsg',
method: 'POST',
data: JSON.stringify(formdata),
success: (res) => {
if(res.data.code=='200'){
if(res.data.data.status!=='0'){
uni.showToast({
title:res.data.data.statusLabel,
icon:'none'
})
return
}
var userInfo=res.data.data.userInfo
var data={
userId:userInfo.userId,
trtcId:userInfo.trtcId,
nickName:userInfo.nickName,
portrait:userInfo.portrait,
startTime:new Date().getTime(),
type:'audio'
}
uni.setStorage({
key: 'call',
data: JSON.stringify(data),
success: function () {
console.log('success');
TUICalling.call({
userID: userInfo.trtcId,
type: 1
})
}
});
}
}
});
},
sendVideoCall(){
//发起视频
uni.showLoading({
title:'发起视频通话'
})
var formdata={
userId: this.talkTo.userId,
msgType: "TRTC_VIDEO_START",
content: "TRTC_VIDEO_START"
}
this.$http.request({
url: '/chat/sendMsg',
method: 'POST',
data: JSON.stringify(formdata),
success: (res) => {
if(res.data.code=='200'){
if(res.data.data.status!=='0'){
uni.showToast({
title:res.data.data.statusLabel,
icon:'none'
})
return
}
var userInfo=res.data.data.userInfo
var data={
userId:userInfo.userId,
trtcId:userInfo.trtcId,
nickName:userInfo.nickName,
portrait:userInfo.portrait,
startTime:new Date().getTime(),
type:'video'
}
uni.setStorage({
key: 'call',
data: JSON.stringify(data),
success: function () {
console.log('success');
TUICalling.call({
userID: userInfo.trtcId,
type: 2
})
}
});
}
}
});
},
goAddfriend(e){
uni.navigateTo({
url:'../personInfo/detail?param='+e.userId+'&source=2'
})
},
openVideo(e){
this.$fc.plusDownload({onlinePath:e}).then(res=>{
this.$fc.plusOpenFile({filePath:res})
})
},
playVOICE(url){
this.showTrs=false
if(this.paused){
this.innerAudioContext.destroy()
this.paused=!this.paused
return
}
this.innerAudioContext = uni.createInnerAudioContext();
// var url='https://www.w3school.com.cn/i/horse.ogg'
this.innerAudioContext.sessionCategory='soloAmbient'
this.innerAudioContext.src = url;
this.innerAudioContext.play()
this.innerAudioContext.onPlay(() => {
// console.log('播放')
this.paused=true
})
this.innerAudioContext.onPause(() => {
// console.log('暂停')
this.paused=false
this.innerAudioContext.destroy()
})
},
goMap(e) {
uni.openLocation({
latitude: e.latitude,
longitude: e.longitude,
success: function() {}
});
},
returnParse(txt) {
try{
return JSON.parse(txt);
}catch(e){
return txt;
//TODO handle the exception
}
},
tryagin(e, i) {
this.$emit('tryagin', e, i);
},
gochatOne(e) {
var source=e.windowType=="GROUP" ? '7' : '3'
uni.navigateTo({
url:'../personInfo/detail?param='+e.personId+'&source='+source
})
},
longpressItem(e,i,v) {//长按回调
console.log(e)
this.$emit('longpressItem',e,i,v)
if(this.itemKey==this.longTapItemKey){
this.$refs['toolx'+this.itemKey].showTab();
}
},
timeDetia: function(date) {
var time;
var d = new Date(date);
var n = new Date();
//获取时间戳
var dd = d.getTime();
var h = d.getHours();
var m = d.getMinutes();
var Y = d.getFullYear();
var M = d.getMonth() + 1;
var D = d.getDate();
//现在时间
var nn = n.getTime();
var hh = n.getHours();
var mm = n.getMinutes();
var YY = n.getFullYear();
var MM = n.getMonth() + 1;
var DD = n.getDate();
if (D == DD && M == MM && Y == YY) {
if (h < 10) {
h = '0' + h;
}
if (m < 10) {
m = '0' + m;
}
time = h + ':' + m;
return time;
} else if (D + 1 == DD && M == MM && Y == YY) {
if (h < 10) {
h = '0' + h;
}
if (m < 10) {
m = '0' + m;
}
time = '昨天' + ' ' + h + ':' + m;
return time;
} else {
if (M < 10) {
M = '0' + M;
}
if (D < 10) {
D = '0' + D;
}
if (h < 10) {
h = '0' + h;
}
if (m < 10) {
m = '0' + m;
}
time = Y + '年' + M + '月' + D + '日' + ' ' + h + ':' + m;
return time;
}
}
}
};
</script>
<style lang="scss" scoped>
$avatarsize: 80rpx;
$border-radius: 12rpx;
$textcolor: #fff;
$descolor: #999;
$leftbgcolor: #00aaff;
$rightbgcolor: #4cd964;
.zfb-tk-item {
position: relative;
display: flex;
align-items: flex-start;
flex-wrap: wrap;
margin: 5px 0;
}
.zfb-tk-item .zfb-tk-item-c text {
word-break: break-all;
}
.zfb-tk-msgleft,
.zfb-tk-msgright {
text-align: left;
}
.zfb-tk-msgleft {
float: left;
display: flex;
flex-direction: row;
}
.zfb-tk-item .zfb-tk-item-c::after {
position: absolute;
content: '';
width: 14rpx;
height: 14rpx;
top: 34rpx;
transform: rotate(45deg);
}
.zfb-tk-msgleft .zfb-tk-item-c::after {
background: $leftbgcolor;
left: -7rpx;
}
.zfb-tk-msgright .zfb-tk-item-c::after {
background: $rightbgcolor;
right: -7rpx;
}
.zfb-tk-avatar {
min-width: $avatarsize;
width: $avatarsize;
height: $avatarsize;
border-radius: $border-radius;
}
.zfb-tk-msgleft .zfb-tk-avatar {
margin-right: 12rpx;
}
.zfb-tk-msgright .zfb-tk-avatar {
margin-left: 12rpx;
}
.zfb-tk-msgright {
float: right;
display: flex;
flex-direction: row-reverse;
}
.zfb-tk-msgcenter {
font-size: 28rpx;
display: flex;
flex-direction: row;
justify-content: center;
float: left;
width: 100%;
color: $descolor;
}
.zfb-tk-item-c {
box-sizing: border-box;
position: relative;
display: inline-block;
border-radius: $border-radius;
}
.zfb-tk-msgleft .zfb-tk-item-c,
.zfb-tk-msgright .zfb-tk-item-c {
min-height: $avatarsize;
background: $leftbgcolor;
color: $textcolor;
padding: 10px;
}
.zfb-tk-msgright .zfb-tk-item-c {
background: $rightbgcolor;
}
.zfb-tk-username {
color: $descolor;
}
.zfb-tk-time {
font-size: 24rpx;
text-align: center;
color: $descolor;
width: 100%;
box-sizing: border-box;
}
.zfb-tk-msgright .zfb-tk-time {
text-align: right;
}
.zfb-tk-msgleft .zfb-tk-time {
text-align: left;
}
.zfb-tk-time-notsend {
font-size: 64rpx;
color: #fa5151;
margin-top: 8rpx;
}
.zfb-tk-item-c-LOCATION {
border: 1px #f6f6f6 solid;
display: flex;
flex-direction: column;
width: 445rpx;
border-radius: 12rpx;
padding: 24rpx;
}
.zfb-tk-item-c-LOCATION-name {
font-size: 28rpx;
color: #101010;
font-weight: bold;
}
.zfb-tk-item-c-LOCATION-address {
font-size: 26rpx;
color: #666;
margin-bottom: 12rpx;
}
.zfb-tk-item-c-LOCATION-map {
background-color: #e5ffff;
overflow: hidden;
width: 445rpx;
height: 150rpx;
}
.zfb-tk-item-c-img{
border: 1px #eee solid;
max-width: 310rpx;
max-height: 450rpx;
}
.zfb-tk-item-c-video{
position: relative;
}
.zfb-tk-item-c-video-icon{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
display: flex;flex-direction: row;justify-content: center;align-items: center;
}
.zfb-tk-item-c-video-icon text{
font-size: 64rpx;
color: #dddddd;
text-shadow: 0px 0px 5px rgba(0,0,0,0.3);
}
.zfb-tk-item-c-VOICE{}
.vmove{
animation: scalev 1s linear infinite;
transform: scale(1);
}
@keyframes scalev {
0% {
transform: scale(1);
}
50% {
transform: scale(1.3);
}
100% {
transform: scale(1);
}
}
.zfb-tk-item-c-VOICE-tras{
display: flex;flex-direction: row;align-items: center;
}
.zfb-tk-item-c-VOICE-tras text{
padding:6rpx 12rpx;
font-size: 24rpx;
background-color: #eee;
border-radius: 12rpx;
color: #bcbcbc;
margin:0 12rpx;
}
.zfb-tk-item-c-VOICE-tras-icon{
margin: 6rpx;
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #fa5151;
position: relative;
}
.zfb-tk-item-c-VOICE-tras-text{
width: 100%;
font-size: 26rpx;
color: #666;
word-break: break-all;
margin-bottom: 12rpx;
}
.zfb-tk-msgright .zfb-tk-item-c-VOICE-tras-text{
text-align: right;
}
.zfb-tk-msgleft .zfb-tk-item-c-VOICE-tras-text{
text-align: left;
}
.zfb-tk-msgleft .zfb-tk-item-c-VOICE-msg{
flex-direction: row-reverse;
}
.zfb-tk-msgleft .zfb-tk-item-c-VOICE-tras{
flex-direction: row-reverse;
}
.zfb-tk-item-c-VOICE-msg .zfb-tk-item-c{
display: flex;flex-direction: row;align-items: center;
}
.zfb-tk-item-c-VOICE-msg{
display: flex;flex-direction: row;align-items: center;
}
.zfb-tk-item-c-CARD{
width: 440rpx;
box-sizing: border-box;
border: 1px #f6f6f6 solid;
padding: 24rpx;
border-radius: 12rpx;
}
.zfb-tk-item-c-CARD-top{
display: flex;flex-direction: row;align-items: center;
}
.zfb-tk-item-c-CARD-top-img{
width: 80rpx;
min-width: 80rpx;
height: 80rpx;
margin-right: 24rpx;
border-radius: 6rpx;
}
.zfb-tk-item-c-CARD-top-content{
overflow: hidden;
display: flex;flex-direction: column;
}
.zfb-tk-item-c-CARD-title{
color: #070707;
font-size: 32rpx;
}
.zfb-tk-item-c-CARD-no{
font-size: 24rpx;
color: #999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.zfb-tk-item-c-CARD-card{
font-size: 24rpx;
color: #666;
margin-top: 24rpx;
}
.zfb-tk-item-contentx{
position: relative;
display: flex;
flex-direction: column;
max-width: 544rpx;
}
.zfb-tk-item-contentx-name{
color: #7C7C7E;
font-size: 24rpx;
}
.zfb-tk-msgright .zfb-tk-item-contentx{
align-items: flex-end;
}
.zfb-tk-msgleft .zfb-tk-item-contentx{
align-items: flex-start;
}
.zfb-tk-item-contentx-c{
display: flex;
align-items: center;
}
.zfb-tk-msgleft .zfb-tk-item-contentx-c{
flex-direction: row-reverse;
}
.zfb-tk-msgright .zfb-tk-item-contentx-c{
flex-direction: row;
}
.zfb-tk-TRTC{
align-items: center;
display: flex;flex-direction: row;
}
.zfb-tk-TRTC .wxfont{
font-size: 42rpx;
}
.zfb-tk-item-contentx-c-tool{display: flex;flex-direction: column;}
.zfb-tk-msgleft .zfb-tk-item-contentx-c-tool{
align-items: flex-start;
}
.zfb-tk-msgright .zfb-tk-item-contentx-c-tool{
align-items: flex-end;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,228 +0,0 @@
<template>
<view class="openTool" :class="itemKey==0 ? 'frist-openTool' : ''" @touchmove.stop.prevent="moveHandle('touchmove')" @click="moveHandle('click')" v-if="show">
<view class="openTool-wx" :animation="animationData">
<view class="openTool-wx-list" v-if="data">
<view class="openTool-wx-list-item" @click="copyText(data.content)" v-if="data.msgType == 'TEXT'">
<view class="openTool-wx-list-item-icon"><view class="wxfont wxcopy"></view></view>
<view class="text">复制</view>
</view>
<view class="openTool-wx-list-item" @click="shoucang" v-if="data.msgType !== 'TRTC_VOICE_END'&&data.msgType !== 'TRTC_VIDEO_END'">
<view class="openTool-wx-list-item-icon"><view class="wxfont shoucang"></view></view>
<view class="text">收藏</view>
</view>
<view class="openTool-wx-list-item" @click="shanchu">
<view class="openTool-wx-list-item-icon"><view class="wxfont wxdelete"></view></view>
<view class="text">删除</view>
</view>
</view>
<view class="openTool-wx-icon"></view>
</view>
<view class="openTool-wx-model"></view>
</view>
</template>
<script>
export default {
data() {
return {
show:false,
animationData: {}
};
},
props: {
data:{
type:[Object,String]
},
talkTo:{
type:[Object,String,Number]
},
itemKey:{
type:[Object,String,Number]
},
list: {
type: Array,
default() {
return [{}];
}
}
},
onShow() {
},
computed: {
},
mounted() {
var animation = uni.createAnimation({
duration: 300,
timingFunction: 'linear'
});
this.animation = animation;
},
methods: {
copyText(e){
uni.setClipboardData({
data: e,
success: function() {
uni.showToast({
title: '复制成功',
icon: 'none',
position: 'bottom'
})
}
});
},
shoucang(){
this.$http.request({
url: '/collect/add',
method: 'POST',
data:JSON.stringify({
collectType: this.data.msgType,
content: this.data.content
}),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title:'收藏成功',
icon:'none'
})
}
}
});
},
shanchu(){
this.$store.dispatch('getchatDatalist');
this.$store.dispatch('getChatList');
var chatWindowData = this.$store.state.chatDatalist[this.talkTo.userId].list
var chatListInfo = this.$store.state.chatlist[this.talkTo.userId]
if((this.itemKey+1)==chatWindowData.length){
chatListInfo['content']=''
this.$store.dispatch('updateChatListInfoById',{
userId: this.talkTo.userId,
data: chatListInfo
});
}
chatWindowData.splice(this.itemKey, 1);
this.$store.dispatch('updateChatById', { userId: this.talkTo.userId,data: chatWindowData });
},
showAnimation() {
this.animation.opacity(1).step();
this.animationData = this.animation.export();
},
hideAnimation() {
this.animation.opacity(0).step();
this.animationData = this.animation.export();
},
moveHandle(e) {
this.hiddenTab()
},
showTab(){
this.show=true
setTimeout(()=>{
this.showAnimation()
},30)
},
hiddenTab(){
this.show=false
this.hideAnimation()
},
}
};
</script>
<style scoped>
/* 黑色版 */
.openTool{
width: 552rpx;
position: absolute;
bottom: 100%;
}
.openTool-wx {
display: flex;
flex-direction: column;
flex-wrap: wrap;
opacity: 0;
position: relative;
z-index: 2;
}
.openTool-wx-model{
background-color: rgba(0,0,0,0);
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 1;
}
.openTool-wx-list {
width: 100%;
padding: 6rpx 24rpx;
box-sizing: border-box;
background-color: #4C4C4C;
border-radius: 10rpx;
display: flex;
flex-direction: row;
justify-content: space-around;
flex-wrap: wrap;
}
.openTool-wx-list-item {
margin:6rpx 24rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.openTool-wx-list-item .text {
color: #fff;
font-size: 28rpx;
border-bottom: 1px #535353 solid;
flex: 1;
}
.openTool-wx-list-item:nth-last-child(1) .text{
border: none;
}
.openTool-wx-list-item-icon {
color: #fff;
margin-bottom: 6rpx;
}
.openTool-wx-icon {
width: 0px;
height: 0px;
border: 5px solid transparent;
border-top-color: #4C4C4C;
margin: 0 auto;
margin-bottom: -5px;
}
.openTool-wx-list-item-icon .wxfont {
font-size: 42rpx;
}
.openTool-msgright{
margin-left: auto;
/* margin-right: 92rpx; */
right: 92rpx;
}
.openTool-msgleft{
margin-right: auto;
/* margin-left: 92rpx; */
left: 92rpx;
}
.openTool-msgright .openTool-wx-icon{
margin-right: 24rpx;
}
.openTool-msgleft .openTool-wx-icon{
margin-left: 24rpx;
}
.frist-openTool{
bottom: auto;
top: 100%;
}
.frist-openTool .openTool-wx{
flex-direction: column-reverse;
}
.frist-openTool .openTool-wx .openTool-wx-icon{
border-bottom-color: #4C4C4C;
border-top-color: transparent;
margin-bottom: 0;
margin-top: -5px;
}
</style>

View File

@@ -1,52 +0,0 @@
<template>
<view class="xw-book">
<watermark></watermark>
<uni-indexed-list-wx :showAdd="false" :options="list" @click="bindClick"></uni-indexed-list-wx>
</view>
</template>
<script>
export default {
emits:['click'],
data() {
return {
list: [],
path:''
}
},
mounted() {
this.getflist()
},
methods: {
bindClick(e){
this.$emit('click',e)
},
getflist(){
this.$http.request({
url: '/friend/friendList',
method: 'POST',
data:JSON.stringify({}),
success: (res) => {
if (res.data.code == 200) {
var data=res.data.data
var list=[]
for (var i = 0; i < data.length; i++) {
var item=data[i]
list.push({
name:item.nickName,
avatar:item.portrait,
userId:item.userId,
chatNo:item.chatNo
})
}
this.list=this.$fc.sortList({list:list,key:'name'})
}
}
});
},
},
}
</script>
<style scoped>
</style>

View File

@@ -1,90 +0,0 @@
<template>
<view class="friendsCircle-send">
<watermark></watermark>
<form @submit="subform">
<view class="friendsCircle-send-item">
<textarea class="friendsCircle-send-textarea" auto-height placeholder="建议反馈..." maxlength="200" v-model="form.content"></textarea>
</view>
<view class="friendsCircle-send-item">
<zmm-upload-image v-model:fileList="form.images" :limit="9"></zmm-upload-image>
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form:{
images:[],
content:''
}
};
},
onLoad() {},
methods: {
subform(e) {
var rules = {
content: {
rules: [{
checkType: "required",
errorMsg: "请填写内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
formData.images=JSON.stringify(formData.images)
if (checkRes) {
this.$http.request({//手机+密码
url: '/common/feedback',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title:'提交成功',
icon:'success'
})
this.form={
images:[],
content:''
}
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.friendsCircle-send{
padding:24rpx 46rpx;
}
.friendsCircle-send-item{
margin-bottom: 24rpx;
}
.friendsCircle-send-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
</style>

View File

@@ -1,462 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<view class="favorites-wx">
<view class="favorites-wx-top">
<view class="favorites-wx-top-item" v-for="(v,i) in types" :key="i" @click="clickType(v)">{{v.label}}</view>
<view class="favorites-wx-tips">点击预览按住卡片向左滑动操作</view>
</view>
<uni-swipe-action>
<uni-swipe-action-item class="favorites-uni-swipe-action-item" v-for="(v,i) in list" :key="i">
<view class="favorites-wx-item">
<view class="favorites-wx-content favorites-wx-content-text" v-if="v.collectType=='TEXT'">
<view class="favorites-wx-text">
{{v.content}}
</view>
</view>
<view class="favorites-wx-content favorites-wx-content-img" v-if="v.collectType=='IMAGE'">
<image :src="returnParse(v.content).url" @click="$fc.previewImagesolo(returnParse(v.content).url)" mode="aspectFill"></image>
</view>
<view class="favorites-wx-content favorites-wx-content-video" v-if="v.collectType=='VIDEO'">
<view class="favorites-wx-content-video-img" @click="openVideo(returnParse(v.content).url)">
<image :src="returnParse(v.content).img" mode="aspectFill"></image>
<view class="favorites-wx-content-video-icon">
<text class="wxfont bofang"></text>
</view>
</view>
</view>
<view class="favorites-wx-content favorites-wx-content-location" v-if="v.collectType=='LOCATION'">
<view class="favorites-wx-content-location-box" @click="goMap({latitude:returnParse(v.content).latitude,longitude:returnParse(v.content).longitude})">
<view class="favorites-wx-content-location-box-name">{{returnParse(v.content).name}}</view>
<view class="favorites-wx-content-location-box-address">{{returnParse(v.content).address}}</view>
<image class="favorites-wx-content-location-box-map" src="../../static/wx/map.png" mode="aspectFit"></image>
</view>
</view>
<view class="favorites-wx-content favorites-wx-content-voice" v-if="v.collectType=='VOICE'">
<view class="favorites-wx-content-voice-box">
<view class="favorites-wx-content-voice-content" @click="playVOICE(returnParse(v.content).url)">
<text>{{returnParse(v.content).time}}</text>
<text class="wxfont yuyin"></text>
</view>
</view>
</view>
<view class="favorites-wx-content" v-if="v.collectType=='CARD'">
<view class="favorites-wx-content-card" @click="goAddfriend(returnParse(v.content))">
<view class="favorites-wx-content-card-top">
<image class="favorites-wx-content-card-top-img" :src="returnParse(v.content).avatar"></image>
<view class="favorites-wx-content-card-top-content">
<view class="favorites-wx-content-card-title">{{returnParse(v.content).name}}</view>
<view class="favorites-wx-content-card-no">{{returnParse(v.content).chatNo}}</view>
</view>
</view>
<view class="favorites-wx-content-card-card">名片</view>
</view>
</view>
<view class="favorites-wx-bottom">
<text>{{userinfo.nickName}}</text>
<text>{{userinfo.createTime}}</text>
</view>
</view>
<template v-slot:right>
<view class="favorites-wx-action-item">
<view class="favorites-wx-action-item-btn favorites-wx-delete" @click="favoritesDeleta(v,i)">删除</view>
<view v-if="type=='2'" class="favorites-wx-action-item-btn favorites-wx-view" @click="clickitem(v,i)">发送</view>
</view>
</template>
</uni-swipe-action-item>
</uni-swipe-action>
<uni-load-more v-show="list.length>0" :status="queryParams.status"></uni-load-more>
</view>
</view>
</template>
<script>
export default {
emits:['clickitem'],
data() {
return {
queryParams: {
refreshing: false,
status: 'more',
pageNum: 1,
pageSize: 10
},
list:[],
innerAudioContext:'',
paused:false,
types:[{
label:'全部',
value:''
},{
label:'文字',
value:'TEXT'
},{
label:'图片',
value:'IMAGE'
},{
label:'视频',
value:'VIDEO'
},{
label:'位置',
value:'LOCATION'
},{
label:'语音',
value:'VOICE'
},{
label:'名片',
value:'CARD'
}]
};
},
props:{
type:{
type:String,
default:'1'//1列表 2聊天窗口
}
},
mounted() {
this.queryParams.refreshing=true
this.getList('')
},
computed:{
userinfo() {
return this.$store.state.userInfo;
}
},
methods: {
clickitem(e,i){
this.$emit('clickitem',e,i)
},
favoritesDeleta(e,i){
uni.showModal({
title: '警告',
content: '是否确认删除收藏',
success: (res)=> {
if (res.confirm) {
this.$http.request({
url: '/collect/remove/'+e.collectId,
success: (res) => {
if (res.data.code == 200) {
this.list.splice(i,1)
}
}
});
} else if (res.cancel) {
}
}
});
},
goAddfriend(e){
uni.navigateTo({
url:'../personInfo/detail?param='+e.userId+'&source=2'
})
},
returnParse(txt) {
return JSON.parse(txt);
},
getList(e){
uni.showLoading();
this.queryParams.status='loading'
this.$fc.loadMore({
url: '/collect/list?collectType='+e,
queryParams: this.queryParams
}).then(res => {
this.queryParams = res.queryParams;
if (res.status=='3') {
this.list=[]
return
}
if (res.status=='0') {
return
}
var rows = res.list;
var list = [];
for (var i = 0; i < rows.length; i++) {
var item = rows[i];
list.push(item);
}
if (res.status=='2') {
this.list = list;
}
if (res.status=='1') {
this.list = this.list.concat(list);
}
});
},
playVOICE(url){
if(this.paused){
this.innerAudioContext.destroy()
this.paused=!this.paused
return
}
this.innerAudioContext = uni.createInnerAudioContext();
// var url='https://www.w3school.com.cn/i/horse.ogg'
this.innerAudioContext.sessionCategory='soloAmbient'
this.innerAudioContext.src = url;
this.innerAudioContext.play()
this.innerAudioContext.onPlay(() => {
// console.log('播放')
this.paused=true
})
this.innerAudioContext.onPause(() => {
// console.log('暂停')
this.paused=false
this.innerAudioContext.destroy()
})
},
goMap(e) {
uni.openLocation({
latitude: e.latitude,
longitude: e.longitude,
success: function() {}
});
},
openVideo(url){
this.$fc.plusDownload({onlinePath:url}).then(res=>{
this.$fc.plusOpenFile({filePath:res})
})
},
clickType(e){
this.queryParams.refreshing=true
this.getList(e.value)
}
},
onPullDownRefresh() {
this.queryParams.refreshing=true
this.getList('');
},
onReachBottom() {
this.getList('');
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
uni.showToast({
title:'添加',
icon:'none'
})
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.bgColor{
background: #EDEDED;
}
.favorites-wx{
display: flex;
flex-direction: column;
}
.favorites-wx-item{
flex: 1;
display: flex;flex-direction: column;
margin:0 24rpx;
background-color: #fff;
border-radius: 12rpx;
padding: 38rpx;
}
.favorites-wx-content{
display: flex;flex-direction: row;
}
.favorites-wx-bottom{
display: flex;flex-direction: row;align-items: center;
margin-top: 12rpx;
}
.favorites-wx-bottom text{
margin-right: 24rpx;
font-size: 24rpx;
color: #999;
}
.favorites-wx-top{
margin: 24rpx;
padding: 24rpx;
display: flex;flex-direction: row;flex-wrap: wrap;
background-color: #fff;
border-radius: 12rpx;
margin-bottom: 24rpx;
}
.favorites-wx-top-item{
color: #5F698C;
width: 33.333%;
box-sizing: border-box;
padding: 0 24rpx;
margin: 24rpx 0;
text-align: center;
overflow: hidden;
}
.favorites-wx-top-item:nth-child(3n-1){
border-left: 1px #ddd solid;
border-right: 1px #ddd solid;
}
.favorites-wx-content-text{}
.favorites-wx-text{
color: #333;
font-size: 32rpx;
}
.favorites-wx-content-img image{
width: 160rpx;
height: 160rpx;
}
.favorites-wx-content-video{
}
.favorites-wx-content-video-img,.favorites-wx-content-video-img image{
width: 160rpx;
height: 160rpx;
position: relative;
}
.favorites-wx-content-video-icon{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
display: flex;flex-direction: row;justify-content: center;align-items: center;
}
.favorites-wx-content-video-icon text{
font-size: 64rpx;
color: #dddddd;
text-shadow: 0px 0px 5px rgba(0,0,0,0.3);
}
.favorites-wx-content-location{
}
.favorites-wx-content-location-box {
border: 1px #f6f6f6 solid;
display: flex;
flex-direction: column;
width: 100%;
border-radius: 12rpx;
padding: 24rpx;
}
.favorites-wx-content-location-box-name {
font-size: 28rpx;
color: #101010;
font-weight: bold;
}
.favorites-wx-content-location-box-address {
font-size: 26rpx;
color: #666;
margin-bottom: 12rpx;
}
.favorites-wx-content-location-box-map {
background-color: #e5ffff;
overflow: hidden;
width: 100%;
height: 150rpx;
}
.favorites-wx-content-voice-box{
display: flex;flex-direction: row;align-items: center;flex-wrap: wrap;
}
.favorites-wx-content-voice{}
.favorites-wx-content-voice-vmove{
animation: scalevVoice 1s linear infinite;
transform: scale(1);
}
@keyframes scalevVoice {
0% {
transform: scale(1);
}
50% {
transform: scale(1.3);
}
100% {
transform: scale(1);
}
}
.favorites-wx-content-voice-tras{
display: flex;flex-direction: row;align-items: center;
}
.favorites-wx-content-voice-tras text{
padding:6rpx 12rpx;
font-size: 24rpx;
background-color: #eee;
border-radius: 12rpx;
color: #bcbcbc;
margin:0 12rpx;
}
.favorites-wx-content-voice-content{
padding:12rpx 24rpx;
border-radius: 12rpx;
background-color: #4cd964;
display: flex;flex-direction: row;align-items: center;
}
.favorites-wx-content-voice-text{
width: 100%;
font-size: 26rpx;
color: #666;
word-break: break-all;
}
.favorites-wx-content-card{
width: 100%;
box-sizing: border-box;
border: 1px #f6f6f6 solid;
padding: 24rpx;
border-radius: 12rpx;
}
.favorites-wx-content-card-top{
display: flex;flex-direction: row;align-items: center;
}
.favorites-wx-content-card-top-img{
width: 80rpx;
min-width: 80rpx;
height: 80rpx;
margin-right: 24rpx;
border-radius: 6rpx;
}
.favorites-wx-content-card-top-content{
overflow: hidden;
display: flex;flex-direction: column;
}
.favorites-wx-content-card-title{
color: #070707;
font-size: 32rpx;
}
.favorites-wx-content-card-no{
font-size: 24rpx;
color: #999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.favorites-wx-content-card-card{
font-size: 24rpx;
color: #666;
margin-top: 24rpx;
}
.favorites-wx-view{
background-color: #00aaff;
}
.favorites-wx-delete{
background-color: #F55C23;
}
.favorites-wx-action-item-btn{
color: #fff;
padding:0 24rpx;
flex: 1;
display: flex;flex-direction: row;justify-content: center;align-items: center;
}
.favorites-wx-action-item{
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.favorites-uni-swipe-action-item{
margin-bottom: 24rpx;
}
.favorites-uni-swipe-action-item:nth-last-child(1){
margin-bottom: 0;
}
.favorites-wx-tips{
width: 100%;
color: #999;
font-size: 24rpx;
text-align: center;
}
</style>

View File

@@ -1,90 +0,0 @@
<template>
<view class="friendsCircle-send">
<watermark></watermark>
<form @submit="subform">
<view class="friendsCircle-send-item">
<textarea class="friendsCircle-send-textarea" auto-height placeholder="建议反馈..." maxlength="200" v-model="form.content"></textarea>
</view>
<view class="friendsCircle-send-item">
<zmm-upload-image v-model:fileList="form.images" :limit="9"></zmm-upload-image>
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form:{
images:[],
content:''
}
};
},
onLoad() {},
methods: {
subform(e) {
var rules = {
content: {
rules: [{
checkType: "required",
errorMsg: "请填写内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
formData.images=JSON.stringify(formData.images)
if (checkRes) {
this.$http.request({//手机+密码
url: '/my/feedback',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title:'提交成功',
icon:'success'
})
this.form={
images:[],
content:''
}
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.friendsCircle-send{
padding:24rpx 46rpx;
}
.friendsCircle-send-item{
margin-bottom: 24rpx;
}
.friendsCircle-send-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
</style>

View File

@@ -1,288 +0,0 @@
<template>
<view class="wx-login">
<watermark></watermark>
<view class="wx-login-title">找回密码</view>
<view class="xw-login-form">
<form @submit="sublogin">
<view class="xw-login-form-item">
<view class="xw-login-form-label">手机号</view>
<input class="xw-login-form-input" maxlength="11" placeholder="请填写手机号" type="text" name="phone" v-model="phone" />
<view class="login-form-icon login-form-seepass" @click="phone=''" v-if="phone.length>0">
<uni-icons type="clear" size="26" color="#B9CCE0"></uni-icons>
</view>
</view>
<view class="xw-login-form-item">
<view class="xw-login-form-label">验证码</view>
<input class="xw-login-form-input" placeholder="请填写验证码" v-model="code" name="code" type="text" />
<view class="wx-btn wx-btn-info" @click="getMsgCode()" v-if="!loading">获取验证码</view>
<view class="wx-btn wx-btn-info" v-else>{{time}}秒后重试</view>
</view>
<view class="xw-login-form-item">
<view class="xw-login-form-label">新密码</view>
<input class="xw-login-form-input" placeholder="请输入密码" name="password" :password="showPassword"
type="text" value="" />
<view class="login-form-icon login-form-seepass" @click="changePassword">
<image src="../../static/img/l03.png" mode="aspectFill" v-if="showPassword"></image>
<image src="../../static/img/l04.png" mode="aspectFill" v-else></image>
</view>
</view>
<text class="xw-login-form-code" @click="goLogin">已修改去登录</text>
<button class="wx-btn wx-btn-info xw-login-form-btn" form-type="submit">找回密码</button>
<view class="login-agree">
<view class="login-agree-checkd" @click="agree = !agree">
<label for="agree">
<checkbox id="agree" style="transform:scale(0.7)" :checked="agree" />
<text class="login-agree-btn">已阅读并同意</text>
</label>
</view>
<view class="login-agree-text" @click="goagreement()">隐私及服务协议</view>
</view>
</form>
</view>
</view>
</template>
<script>
export default {
data() {
return {
code:'',
loading: false,
timer: null,
time: 60,
logintype: 0,
phone: '',
cid: '',
showPassword: true,
agree: false,
}
},
onLoad() {},
methods: {
changePassword() {
this.showPassword = !this.showPassword;
},
goLogin(){
uni.navigateTo({
url: '../login/index'
})
},
goagreement() {
// uni.navigateTo({//本地协议
// url: '../../pages/agreement/index?name=微聊'
// })
this.$http.request({//在线协议
url: '/common/getAgreement',
success: (res) => {
if (res.data.code == 200) {
// #ifdef H5
window.open(res.data.data)
// #endif
// #ifdef APP-PLUS
this.$fc.openWebView(res.data.data)
// #endif
}
}
});
},
getMsgCode() {
var reg = /^1[0-9]{10,10}$/;
if(!reg.test(this.phone)){
uni.showToast({
title:'请输入正确的手机号',
icon:'none'
})
return
}
this.loading = true
this.timer = setInterval(() => {
this.time--
if (this.time <= 0) {
clearInterval(this.timer)
this.loading = false
this.time = 60
}
}, 1000)
var formData={
phone:this.phone,
type:'3'//找回密码
}
this.$http.request({
url: '/auth/sendCode',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
// todo验证码
this.code=res.data.data.code
uni.showToast({
title:'验证码已发送至你的手机',
icon:'none'
})
}
}
});
},
rMathfloor(min, max) { //返回包括最大/小值
return Math.floor(Math.random() * (max - min + 1)) + min
},
sublogin(e) {
var rules = {
phone: {
rules: [{
checkType: "required",
errorMsg: "请填写手机号码"
}, {
checkType: "phone",
errorMsg: "请填写正确的手机号码"
}]
},
password: {
rules: [{
checkType: "required",
errorMsg: "请输入密码"
}, {
checkType: "string",
checkRule: "8,20",
errorMsg: "至少输入8-20位"
}]
},
code: {
rules: [{
checkType: "required",
errorMsg: "请输入验证码"
}]
}
};
var formData = e.detail.value;
var checkRes = this.$zmmFormCheck.check(formData, rules);
formData.password=this.$md5.hex_md5(formData.password)
if (checkRes) {
if (!this.agree) {
uni.showToast({
title: '请先同意《隐私及服务协议》',
icon: 'none'
});
return;
}
this.$http.request({
url: '/auth/forget',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title:'密码修改成功'
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
},
}
}
</script>
<style lang="scss" scoped>
.wx-login-title {
text-align: center;
padding-top: 120rpx;
font-size: 42rpx;
padding-bottom: 24rpx;
}
.xw-login-form {
padding: 34rpx;
}
.xw-login-form-item {
position: relative;
padding: 0 12rpx;
border-bottom: 1px #eee solid;
display: flex;
flex-direction: row;
align-items: center;
line-height: 100rpx;
height: 100rpx;
}
.xw-login-form-label {
width: 160rpx;
min-width: 160rpx;
}
.xw-login-form-input {}
.login-agree {
margin-top: 34rpx;
justify-content: center;
display: flex;
flex-direction: row;
align-items: center;
}
.login-agree-text,
.login-agree-btn {
font-size: 24rpx;
color: #222;
}
.login-agree-text {
color: #8295a5;
}
.login-form-icon {
width: 50rpx;
height: 50rpx;
}
.login-form-seepass {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.login-form-icon image {
float: left;
width: 50rpx;
height: 50rpx;
}
.xw-login-form-code {
padding: 0 12rpx;
height: 100rpx;
line-height: 100rpx;
color: #8295a5;
}
.wx-btn {
min-width: 200rpx;
height: 75rpx;
line-height: 75rpx;
text-align: center;
border-radius: 12rpx;
background-color: #007AFF;
color: #fff;
font-size: 32rpx;
}
.wx-btn-info {
background-color: #05C160;
}
.xw-login-form-btn {
width: 300rpx;
margin-top: 120rpx;
}
</style>

View File

@@ -1,113 +0,0 @@
<template>
<view>
<watermark></watermark>
<friends-circle-detail :detail="detail"></friends-circle-detail>
</view>
</template>
<script>
export default {
data() {
return {
detail: {},
showtitleNViewBtns:false
};
},
onLoad(e) {
this.getInfo(e.topicId)
},
mounted() {
this.$fc.setTitleNViewBtns(0,'')
},
computed:{
userInfo(){
return this.$store.state.userInfo
}
},
methods: {
getInfo(id){
this.$http.request({
url: '/topic/topicInfo/'+id,
success: (res) => {
if (res.data.code == 200) {
var item=res.data.data
var detail={
canDeleted:this.userInfo.userId==item.topic.userId ? true : false,
userId: item.topic.userId,
nickName: item.topic.nickName,
avatar: item.topic.portrait,
topicId: item.topic.topicId,
text: JSON.parse(item.topic.content).content,
topicType:item.topic.topicType,
files:JSON.parse(item.topic.content).files,
location: item.topic.location ? JSON.parse(item.topic.location) : {},
time:item.topic.createTime,
like:item.like,
likeList:item.likeList,
replyList:item.replyList,
}
this.detail=detail
if(this.detail.canDeleted){
this.showtitleNViewBtns=true
this.$fc.setTitleNViewBtns(0,'\ue623')
}
}
}
});
}
},
onNavigationBarButtonTap(e) {
if(!this.showtitleNViewBtns){
return
}
switch (e.index) {
case 0: //更多
uni.showActionSheet({
itemList: ['删除'],
success: (res) => {
this.$http.request({
url: '/topic/removeTopic/'+this.detail.topicId,
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(res=>{
uni.showToast({
title:'删除成功',
icon:'none'
})
})
}
}
});
switch (res.tapIndex) {
case 0:
break;
case 1:
break;
default:
break;
}
},
fail: function(res) {
console.log(res.errMsg);
}
});
break;
default:
break;
}
}
};
</script>
<style scoped lang="scss">
.friendsCircle {
}
.friendsCircle-content {
padding-top: 160rpx;
display: flex;
flex-direction: column;
}
</style>

View File

@@ -1,159 +0,0 @@
<template>
<view class="friendsCircle">
<watermark></watermark>
<friends-circle-top :cover="cover" :userInfo="userInfo" @userClick="userClick"></friends-circle-top>
<view class="friendsCircle-content">
<view class="friendsCircle-msgalert-box" v-if="topicReply.count && topicReply.count > 0" @click="gomsglist">
<view class="friendsCircle-msgalert">
<image class="friendsCircle-msgalert-img" :src="topicReply.portrait" mode="aspectFill"></image>
<text class="friendsCircle-msgalert-text">{{ topicReply.count }}条新消息</text>
</view>
</view>
<friends-circle-list-item ref="fcli" v-model:content="content"></friends-circle-list-item>
</view>
<uni-load-more v-show="content.length>9" :status="queryParams.status"></uni-load-more>
</view>
</template>
<script>
export default {
data() {
return {
queryParams: {
refreshing: false,
status: 'more',
pageNum: 1,
pageSize: 10
},
content: []
};
},
computed: {
cover() {
var cover = this.$store.state.userInfo.cover ? JSON.parse(this.$store.state.userInfo.cover) : { type: 'img', name: '', url: '' };
return cover;
},
userInfo() {
return this.$store.state.userInfo;
},
topicReply() {
return this.$store.state.topicReply;
}
},
onLoad() {
this.getlist();
},
methods: {
getlist() {
this.queryParams.status='loading'
this.$fc.loadMore({
url: '/topic/topicList?',
queryParams: this.queryParams
}).then(res => {
this.$store.commit('update_topicRed',{})
this.queryParams = res.queryParams;
if (res.status=='3') {
this.list=[]
return
}
if (res.status=='0') {
return
}
var rows = res.list;
var list = [];
for (var i = 0; i < rows.length; i++) {
var item = rows[i];
list.push({
userId: item.topic.userId,
nickName: item.topic.nickName,
avatar: item.topic.portrait,
topicId: item.topic.topicId,
text: JSON.parse(item.topic.content).content,
topicType: item.topic.topicType,
files: JSON.parse(item.topic.content).files,
location: item.topic.location ? JSON.parse(item.topic.location) : {},
time: item.topic.createTime,
like: item.like,
likeList: item.likeList,
replyList: item.replyList
});
}
if (res.status=='2') {
this.content = list;
}
if (res.status=='1') {
this.content = this.content.concat(list);
}
});
},
userClick(cover, user) {
uni.navigateTo({
url: '../../wx/friendsCircle/person'
});
},
gomsglist() {
uni.navigateTo({
url: './msglist'
});
}
},
onPageScroll(e) {
this.$refs['fcli'].hidenTool();
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
uni.navigateTo({
url: '../friendsCircle/sendMsg'
});
break;
default:
break;
}
},
onPullDownRefresh() {
this.queryParams.refreshing=true
this.getlist();
},
onReachBottom() {
this.getlist();
}
};
</script>
<style scoped lang="scss">
.friendsCircle {
}
.friendsCircle-content {
padding-top: 160rpx;
display: flex;
flex-direction: column;
position: relative;
}
.friendsCircle-msgalert-box {
margin-top: -64rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.friendsCircle-msgalert {
border-radius: 12rpx;
background-color: #4c4c4c;
padding: 14rpx 24rpx;
display: flex;
flex-direction: row;
align-items: center;
}
.friendsCircle-msgalert-img {
width: 60rpx;
height: 60rpx;
min-width: 60rpx;
border-radius: 12rpx;
margin-right: 24rpx;
}
.friendsCircle-msgalert-text {
color: #fff;
}
</style>

View File

@@ -1,221 +0,0 @@
<template>
<view class="wxnearby">
<watermark></watermark>
<view class="wxnearby-item" v-for="(v,i) in list" :key="i" @click="godetail(v)">
<view class="person-wx-user">
<image class="person-wx-avatar" :src="v.portrait" mode="aspectFill"></image>
<view class="wxnearby-item-content">
<view class="person-wx-user-detail">
<view class="person-wx-nikename">
<text class="text">{{v.nickName}}</text>
</view>
<view class="person-wx-textx">{{v.replyContent}}</view>
<text class="person-wx-name">
{{v.replyTime}}
</text>
</view>
<view class="wxmsglist-right">
<view class="ctext" v-if="v.topicType=='TEXT'">
<text>{{returnParse(v.topicContent).content}}</text>
</view>
<image v-if="v.topicType=='IMAGE'" class="wxmsglist-right-cimg" :src="returnParse(v.topicContent).files[0].url" mode="aspectFill"></image>
<view class="friendsCircle-content-video" v-if="v.topicType=='VIDEO'">
<image class="friendsCircle-content-video-icon" src="../../static/img/bf.png" mode="aspectFill"></image>
<image class="friendsCircle-content-video-img" :src="returnParse(v.topicContent).files[0].url" mode="aspectFill"></image>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list:[]
}
},
onLoad () {
},
onShow() {
this.getlist()
},
onUnload() {},
methods:{
returnParse(txt) {
return JSON.parse(txt);
},
openVideo(e){
this.$fc.plusDownload({onlinePath:e}).then(res=>{
this.$fc.plusOpenFile({filePath:res})
})
},
getlist(){
this.$http.request({
url: '/topic/noticeList',
success: (res) => {
if (res.data.code == 200) {
this.list=res.data.data
this.$store.commit('update_topicReply',{})
uni.removeStorageSync('topicReply');
}
}
});
},
godetail(e){
uni.navigateTo({
url:'./detail?topicId='+ e.topicId
})
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
uni.showActionSheet({
itemList: ['清除消息列表'],
success: (res) => {
switch (res.tapIndex) {
case 0:
this.$http.request({
url: '/topic/clearNotice',
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(res=>{
uni.showToast({
title:'清除成功',
icon:'none'
})
})
}
}
});
break;
default:
break;
}
}
});
break;
default:
break;
}
}
}
</script>
<style scoped>
.person-wx-user {
display: flex;
flex-direction: row;
align-items: center;
flex: 1;
width: 100%;
}
.wxnearby{
}
.wxnearby-item{
padding:0 24rpx;
width: 100%;
box-sizing: border-box;
}
.person-wx-avatar {
width: 90rpx;
min-width: 90rpx;
height: 90rpx;
margin-right: 42rpx;
border-radius: 16rpx;
}
.wxnearby-item-content{
flex: 1;
display: flex;flex-direction: row;align-items: center;
padding:24rpx 0;
border-bottom: 1px #eee solid;
}
.person-wx-user-detail {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 400rpx;
}
.person-wx-nikename {
font-size: 28rpx;
color: #5F698C;
display: flex;flex-direction: row;align-items: center;
}
.person-wx-nikename .text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 480rpx;
}
.person-wx-name {
color: #B2B2B2;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.person-wx-textx{
padding: 4rpx;
font-size: 28rpx;
color: #333;
word-break: break-all;
}
.person-wx-nikename-icon.nan{
color: #007AFF;
}
.person-wx-nikename-icon.nv{
color: #FF5A5F;
}
.person-wx-nikename-icon{
margin-right: auto;
}
.wxmsglist-right{
margin-left: auto;
}
.wxmsglist-right .ctext{
max-width: 240rpx;
padding: 12rpx;
font-size: 24rpx;
background-color: #F2F2F2;
}
.wxmsglist-right .ctext text{
margin-left: auto;
color: #666;
border-radius: 6rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.wxmsglist-right-cimg{
width: 120rpx;
height: 120rpx;
border-radius: 12rpx;
}
.friendsCircle-content-video{
width: 120rpx;
height: 120rpx;
position: relative;
}
.friendsCircle-content-video-img{
width: 100%;
height: 100%;
border-radius: 12rpx;
}
.friendsCircle-content-video-icon{
z-index: 1;
position: absolute;
left: 50%;
top: 50%;
width: 80rpx !important;
height: 80rpx !important;
transform: translate(-50%,-50%);
}
</style>

View File

@@ -1,200 +0,0 @@
<template>
<view class="friendsCircle">
<watermark></watermark>
<friends-circle-top :cover="cover" :userInfo="userInfox" @userClick="userClick" :showChangePoster="showChangePoster"></friends-circle-top>
<view class="friendsCircle-content-today">
<view class="friends-circle-today" v-if="showMsglist">
<view class="friends-circle-today-text">今天</view>
<view class="friends-circle-today-icon" @click="goFriendsCircleSendMsg">
<view class="wxfont xiangji"></view>
</view>
</view>
<friends-circle-person-item v-model:content="content" @clickItem="goFriendsCircleDetail"></friends-circle-person-item>
</view>
<uni-load-more v-show="content.length>9" :status="queryParams.status"></uni-load-more>
</view>
</template>
<script>
export default {
data() {
return {
queryParams: {
refreshing: false,
status: 'more',
pageNum: 1,
pageSize: 10
},
content: [],
showMsglist:false,
showChangePoster:false,
userInfox:{},
cover:{type:'img',name:'',url:''},
userId:''
};
},
computed:{
userInfo(){
return this.$store.state.userInfo
}
},
onLoad(e) {
if(e.userId){
this.userId=e.userId
}else{
this.userId=this.userInfo.userId
}
if(this.userId==this.userInfo.userId){
this.showMsglist=true
this.showChangePoster=true
}
},
mounted() {
this.$fc.setTitleNViewBtns(0,'')
if(this.showMsglist){
this.$fc.setTitleNViewBtns(0,'\ue6f4')
}
this.getUserInfo(this.userId)
},
onShow(){
this.queryParams.refreshing=true
this.getlist(this.userId)
},
methods: {
getUserInfo(e){//好友详情
this.$http.request({
url: '/friend/info/'+e,
success: (res) => {
if (res.data.code == 200) {
this.cover=res.data.data.cover ? JSON.parse(res.data.data.cover) : {type:'img',name:'',url:''}
this.userInfox=res.data.data
}
}
});
},
userClick(cover,user){
uni.navigateTo({
url:'../../wx/personInfo/detail?param='+user.userId
})
},
getlist(userId){
this.queryParams.status='loading'
this.$fc.loadMore({
url: '/topic/userTopic/'+userId+'/?',
queryParams: this.queryParams
}).then(res => {
this.queryParams = res.queryParams;
if (res.status=='3') {
this.list=[]
return
}
if (res.status=='0') {
return
}
var rows = res.list;
var list = [];
for (var i = 0; i < rows.length; i++) {
var item = rows[i];
list.push({
userId: item.topic.userId,
nickName: item.topic.nickName,
avatar: item.topic.portrait,
topicId: item.topic.topicId,
text: JSON.parse(item.topic.content).content,
topicType:item.topic.topicType,
files:JSON.parse(item.topic.content).files,
location: item.topic.location ? JSON.parse(item.topic.location) : {},
time:item.topic.createTime,
like:item.like,
likeList:item.likeList,
replyList:item.replyList
});
}
if (res.status=='2') {
this.content = list;
}
if (res.status=='1') {
this.content = this.content.concat(list);
}
});
},
goFriendsCircleSendMsg(){
uni.navigateTo({
url:'../friendsCircle/sendMsg'
})
},
goFriendsCircleDetail(e){
uni.navigateTo({
url:'../friendsCircle/detail?topicId='+ e.topicId
})
}
},
onPullDownRefresh() {
this.queryParams.refreshing=true
this.getlist(this.userId);
},
onReachBottom() {
this.getlist(this.userId);
},
onNavigationBarButtonTap(e) {
if(!this.showMsglist){
return
}
switch (e.index){
case 0://更多
uni.navigateTo({
url:'../friendsCircle/msglist'
})
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.friendsCircle-content-today{
padding: 18rpx;
padding-top: 160rpx;
display: flex;
flex-direction: column;
}
.friends-circle-today{
display: flex;flex-direction: row;margin-bottom: 60rpx;
}
.friends-circle-today-text{
font-size: 52rpx;
font-weight: bold;
margin-right: 50rpx;
}
.friends-circle-today-icon{
display: flex;
width: 145rpx;
height: 145rpx;
border-radius: 8rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: #F7F7F7;
}
.friends-circle-today-icon .wxfont{
font-size: 90rpx;
color: #fff;
}
.friendsCircle-msglistin{
z-index: 999;
position: fixed;
right: 24rpx;
top: 0;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.friendsCircle-msglistin .wxfont{
color: #fff;
font-size: 48rpx;
}
</style>

View File

@@ -1,188 +0,0 @@
<template>
<view class="friendsCircle-send">
<watermark></watermark>
<form @submit="subform">
<view class="friendsCircle-send-item">
<textarea class="friendsCircle-send-textarea" auto-height placeholder="这一刻的想法..." maxlength="200" v-model="form.content"></textarea>
</view>
<view class="friendsCircle-send-item">
<zmm-upload-image chooseType="chooseMedia" @oneComplete="upLoadoneComplete" ref="upup" v-model:fileList="form.files" :limit="limit"></zmm-upload-image>
</view>
<view class="friendsCircle-send-item">
<view class="friendsCircle-send-itemxlist">
<view class="friendsCircle-send-itemx" :class="{'lcation':location}" @click="getlocation">
<view class="friendsCircle-send-itemx-icon wxfont dingwei2"></view>
<view class="friendsCircle-send-itemx-c">
<text class="friendsCircle-send-itemx-text" v-if="location">{{location.name}}</text>
<text class="friendsCircle-send-itemx-text" v-else>所在位置</text>
<uni-icons style="margin-left: 24rpx;" type="right" size="16" color="#b5b5b5"></uni-icons>
</view>
</view>
</view>
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
type:'TEXT',
limit:9,
location:'',
form:{
files:[
// {
// name:'1',
// url:'../../static/img/avatar/avatar1.jpg',
// type:'WAITING'
// },
// {
// name:'2',
// url:'../../static/img/avatar/avatar2.jpg',
// type:'IMAGE'
// },
// {
// name:'3',
// url:'../../static/img/avatar/avatar3.jpg',
// videoUrl:'../../static/img/avatar/avatar3.jpg',
// type:'VIDEO'
// }
],
content:'',
}
};
},
computed:{
userInfo(){
return this.$store.state.userInfo
}
},
onLoad(e) {
},
methods: {
returnParse(txt) {
return JSON.parse(txt);
},
getlocation(){
uni.chooseLocation({
success: res => {
this.location=res
}
});
},
upLoadoneComplete(e,type){
if(e.type=='VIDEO'){
this.limit=1
this.type='VIDEO'
var vlist=[]
for (var i = 0; i < this.form.files.length; i++) {
var item=this.form.files[i]
if(item.type=='VIDEO'){
vlist.push(item)
}
}
this.form.files=vlist
}else{
this.limit=9
this.type='IMAGE'
}
},
subform(e) {
var rules = {
content: {
rules: [{
checkType: "required",
errorMsg: "请填写文字内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/topic/sendTopic',
method: 'POST',
data:JSON.stringify({
topicType:this.type,
content:JSON.stringify(formData),
location:JSON.stringify(this.location)
}),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title: '发表成功',
icon: "none",
}).then(()=>{
uni.redirectTo({
url:'./person'
})
});
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.friendsCircle-send{
padding:24rpx 46rpx;
}
.friendsCircle-send-item{
margin-bottom: 24rpx;
}
.friendsCircle-send-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.friendsCircle-send-itemx{
padding:0 24rpx;
display: flex;flex-direction: row;align-items: center;
}
.friendsCircle-send-itemx-c{
flex: 1;
padding: 24rpx 0;
display: flex;flex-direction: row;align-items: center;
border-bottom: 1px #eee solid;
}
.friendsCircle-send-itemx-c:nth-last-child(1){
border: none;
}
.friendsCircle-send-itemxlist{
border-bottom: 1px #eee solid;
border-top: 1px #eee solid;
}
.friendsCircle-send-itemx-icon{
margin-right: 34rpx;
color: #333;
font-size: 42rpx;
}
.friendsCircle-send-itemx-text{
font-size: 32rpx;
color: #333;
margin-right: auto;
}
.lcation .friendsCircle-send-itemx-icon,.lcation .friendsCircle-send-itemx-text{
color: #05C160;
}
</style>

View File

@@ -1,113 +0,0 @@
<template>
<view class="wx-createGroup" :style="'height: calc(100vh - '+windowTop+'px)'">
<watermark></watermark>
<view class="wx-createGroup-check">
<uni-indexed-list-wx showSelect :showAdd="false" :options="list" @click="bindClick"></uni-indexed-list-wx>
</view>
<view class="wx-createGroup-foot">
<view class="wx-btn wx-btn-info" @click="createGroup">完成<text v-if="select.length>0">({{select.length}})</text></view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
select:[],
windowTop:0
}
},
mounted() {
this.getflist()
uni.getSystemInfo({
success: (res)=> {
this.windowTop=res.windowTop
}
});
},
methods: {
createGroup(){
var ids=[]
for (var i = 0; i < this.select.length; i++) {
ids.push(this.select[i].data.userId)
}
this.$http.request({
url: '/group/createGroup',
method: 'POST',
data:JSON.stringify(ids),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
})
}
}
});
},
bindClick(e){
this.select=e.select
},
getflist(){
this.$http.request({
url: '/friend/friendList',
method: 'POST',
data:JSON.stringify({}),
success: (res) => {
if (res.data.code == 200) {
var data=res.data.data
var list=[]
for (var i = 0; i < data.length; i++) {
var item=data[i]
if(item.userType=='normal'){
list.push({
name:item.nickName,
avatar:item.portrait,
userId:item.userId,
chatNo:item.chatNo
})
}
}
this.list=this.$fc.sortList({list:list,key:'name'})
}
}
});
},
},
}
</script>
<style scoped>
.wx-createGroup{
display: flex;flex-direction: column;
}
.wx-createGroup-check{
height: 90%;
position: relative;
}
.wx-createGroup-foot{
box-sizing: border-box;
height: 10%;
display: flex;
flex-direction: row;
justify-content: flex-end;
background-color: #eee;
padding: 24rpx;
}
.wx-btn {
min-width: 200rpx;
height: 75rpx;
line-height: 75rpx;
text-align: center;
border-radius: 12rpx;
background-color: #007AFF;
color: #fff;
font-size: 32rpx;
}
.wx-btn-info {
background-color: #05C160;
}
</style>

View File

@@ -1,191 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<view class="QRcode-box">
<view style="width: 100%;" v-if="detail">
<uni-list :border="false">
<uni-list-chat :title="detail.group.name" :avatar-list="portraits" :note="'('+detail.user.length+'人)'" badge-positon="left"></uni-list-chat>
</uni-list>
</view>
<view class="QRcode-img">
<image :src="QRimg" mode="aspectFill" @click="resetQrCode"></image>
</view>
<view class="QRcode-tips">扫一扫上面的二维码图案加入群聊</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
QRimg:'',
detail:'',
portraits:[]
}
},
onLoad(e) {
this.resetQrCode(e.groupId)
this.getInfo(e.groupId)
},
computed:{
userInfo(){
return this.$store.state.userInfo
}
},
onShow(){},
methods: {
getInfo(e){//详情
this.$http.request({
url: '/group/getInfo/'+e,
success: (res) => {
if (res.data.code == 200) {
this.detail=res.data.data
var portraits=[]
for (var i = 0; i < this.detail.user.length; i++) {
portraits.push({
url:this.detail.user[i].portrait
})
}
this.portraits=portraits
}
}
});
},
resetQrCode(e){
this.$http.request({
url: '/group/getGroupQrCode/'+e,
success: (res) => {
if (res.data.code == 200) {
this.QRimg=res.data.data
}
}
});
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
uni.showActionSheet({
// itemList: ['换个样式', '保存到手机', '扫描二维码', '重置二维码'],
itemList: ['保存到手机'],
success: (res)=> {
switch (res.tapIndex) {
case 0:
// #ifdef APP-PLUS
this.$fc.plusSaveBase64Img({base64:this.QRimg})
// #endif
// #ifdef H5
this.$fc.h5SaveBase64Img({base64:this.QRimg})
// #endif
break;
default:
break;
}
},
fail: (res)=> {
console.log(res.errMsg);
}
});
break;
default:
break;
}
}
}
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.QRcode-box{
width: 666rpx;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
padding: 32rpx;
background-color: #fff;
border-radius: 24rpx;
box-sizing: border-box;
display: flex;flex-direction: column;
align-items: center;
}
.QRcode-img{
width: 600rpx;
height: 600rpx;
}
.QRcode-img image{width: 100%;height: 100%;}
.QRcode-tips{
margin-top: 6rpx;
font-size: 26rpx;
color: #999;
}
.person-wx {
width: 100%;
margin-bottom: 24rpx;
}
.person-wx-user {
display: flex;
flex-direction: row;
align-items: center;
}
.person-wx-avatar {
width: 120rpx;
min-width: 120rpx;
height: 120rpx;
margin-right: 42rpx;
border-radius: 16rpx;
}
.person-wx-user-detail {
display: flex;
flex-direction: column;
justify-content: center;
width: 440rpx;
}
.person-wx-nikename {
font-size: 32rpx;
display: flex;flex-direction: row;align-items: center;
}
.person-wx-nikename .text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 480rpx;
}
.person-wx-name {
color: #666;
font-size: 28rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 12rpx;
}
.person-wx-nikename-icon.nan{
color: #007AFF;
}
.person-wx-nikename-icon.nv{
color: #FF5A5F;
}
.person-wx-nikename-icon{
margin-right: auto;
}
</style>

View File

@@ -1,431 +0,0 @@
<template>
<view class="bgColor" v-if="detail">
<watermark></watermark>
<view class="wxgroup-list">
<view class="wxgroup-list-item" v-for="(v, i) in detail.user" @click="gofriend(v)" :key="i">
<image class="wxgroup-list-img" :src="v.portrait" mode="aspectFill"></image>
<text class="wxgroup-list-text">{{ v.nickName }}</text>
</view>
<view class="wxgroup-list-item" @click="qunAdd">
<view class="wxgroup-list-icon"><view class="wxfont jia"></view></view>
</view>
<view class="wxgroup-list-item" @click="qunless">
<view class="wxgroup-list-icon"><view class="wxfont jian"></view></view>
</view>
</view>
<tool-list-wx :list="list3" @itemClick="itemClick3"></tool-list-wx>
<view class="wxgroupInfo">
<view class="xw-tool-list">
<view class="xw-tool-list-content">
<view class="xw-tool-item">
<text class="xw-tool-text">消息免打扰</text>
<switch color="#05C160" :checked="Baneddisturb" @change="switchChange($event, 'xxmdr')" style="transform:scale(0.75);" />
</view>
</view>
<view class="xw-tool-list-content">
<view class="xw-tool-item">
<text class="xw-tool-text">置顶聊天</text>
<switch color="#05C160" :checked="Banedtop" @change="switchChange($event, 'zdlt')" style="transform:scale(0.75);" />
</view>
</view>
<view class="xw-tool-list-content">
<view class="xw-tool-item">
<text class="xw-tool-text">保存到通讯录</text>
<switch color="#05C160" :checked="BanedkeepGroup" @change="switchChange($event, 'bcdtxl')" style="transform:scale(0.75);" />
</view>
</view>
</view>
<view class="xw-tool-list">
<view class="xw-tool-list-content" v-if="detail.master == 'Y'" @click="jiesan">
<view class="xw-tool-btn-item"><view class="xw-tool-btn-text" style="color: #FF5A5F;">解散该群</view></view>
</view>
<view class="xw-tool-list-content" @click="qingchu">
<view class="xw-tool-btn-item"><view class="xw-tool-btn-text" style="color: #FF5A5F;">清空群消息</view></view>
</view>
<view class="xw-tool-list-content" @click="quitqun">
<view class="xw-tool-btn-item"><view class="xw-tool-btn-text" style="color: #FF5A5F;">删除并退出</view></view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail: {
set: {
top: 'N',
keepGroup: 'N',
disturb: 'N'
},
group: {
notice: ''
},
user: []
}
};
},
computed: {
list3() {
return [
{
title: '群聊名称',
path: '#'
},
{
title: '群二维码',
path: '#',
else: [
{
type: 'img',
content: '../../static/wx/t05.png'
}
]
},
{
title: '群公告',
path: '#',
else: [
{
type: 'text',
content: this.detail.group.notice ? this.detail.group.notice : ''
}
]
}
];
},
Banedtop() {
return this.detail.set.top == 'Y' ? true : false;
},
BanedkeepGroup() {
return this.detail.set.keepGroup == 'Y' ? true : false;
},
Baneddisturb() {
return this.detail.set.disturb == 'Y' ? true : false;
}
},
onLoad(e) {
this.param = e.param;
},
onShow() {
this.getInfo(this.param);
},
methods: {
qunAdd() {
uni.navigateTo({
url: '../../wx/groupInfo/qunAdd?groupId=' + this.detail.group.groupId
});
},
qunless() {
uni.navigateTo({
url: '../../wx/groupInfo/qunless?groupId=' + this.detail.group.groupId
});
},
jiesan() {
// 解散群聊
uni.showModal({
title: '提示',
content: '确认解散群聊吗?',
success: res => {
if (res.confirm) {
this.$http.request({
url: '/group/removeGroup/' + this.detail.group.groupId,
success: res => {
if (res.data.code == 200) {
delete this.$store.state.chatlist[this.detail.group.groupId]
this.$store.dispatch('updateChatListInfoById',{
userId: this.detail.group.groupId,
data: {}
});
this.$store.dispatch('updateChatById', {
userId: this.detail.group.groupId,
data: []
});
uni.navigateBack({
delta:2
}).then(()=>{
uni.showToast({
title:'解散成功',
icon:'none'
})
})
}
}
});
}
}
});
},
quitqun() {
uni.showModal({
title: '提示',
content: '确认退出群聊吗?',
success: res => {
if (res.confirm) {
this.$http.request({
url: '/group/logoutGroup/' + this.detail.group.groupId,
success: res => {
if (res.data.code == 200) {
delete this.$store.state.chatlist[this.detail.group.groupId]
this.$store.dispatch('updateChatListInfoById',{
userId: this.detail.group.groupId,
data: {}
});
this.$store.dispatch('updateChatById', {
userId: this.detail.group.groupId,
data: []
});
uni.navigateBack({
delta:2
}).then(()=>{
uni.showToast({
title:'退出成功',
icon:'none'
})
})
}
}
});
}
}
});
},
qingchu() {
uni.showModal({
title: '提示',
content: '确认清除群聊消息吗?',
success: res => {
if (res.confirm) {
delete this.$store.state.chatlist[this.detail.group.groupId]
this.$store.dispatch('updateChatListInfoById',{
userId: this.detail.group.groupId,
data: {}
});
this.$store.dispatch('updateChatById', {
userId: this.detail.group.groupId,
data: []
});
uni.navigateBack({
delta:2
}).then(()=>{
uni.showToast({
title:'清除成功',
icon:'none'
})
})
}
}
});
},
gofriend(e) {
uni.navigateTo({
url: '../../wx/personInfo/detail?param=' + e.userId+'&source=7'
});
},
switchChange(e, type) {
var yn = e.detail.value ? 'Y' : 'N';
var url, formData, ynText;
switch (type) {
case 'xxmdr':
url = '/group/editDisturb';
formData = {
groupId: this.param,
disturb: yn
};
ynText = e.detail.value ? '已静默消息' : '已取消静默消息';
var data=JSON.parse(JSON.stringify(this.$store.state.chatlist[this.detail.group.groupId]))
var ynx = data.disturb=='N' ? 'Y' : 'N';
data.disturb=ynx
this.$store.dispatch('updateChatListInfoById', {
userId: this.detail.group.groupId,
data: data
})
this.$store.dispatch('getChatList')
break;
case 'zdlt':
url = '/group/editTop';
formData = {
groupId: this.param, //群组id
top: yn
};
ynText = e.detail.value ? '已置顶' : '已取消置顶';
var data=JSON.parse(JSON.stringify(this.$store.state.chatlist[this.detail.group.groupId]))
var ynx = data.top=='N' ? 'Y' : 'N';
data.top=ynx
this.$store.dispatch('updateChatListInfoById', {
userId: this.detail.group.groupId,
data: data
})
this.$store.dispatch('getChatList')
break;
case 'bcdtxl':
url = '/group/editKeepGroup';
formData = {
groupId: this.param, //群组id
keepGroup: yn
};
ynText = e.detail.value ? '已保存' : '已移除';
break;
default:
break;
}
this.$http.request({
url: url,
method: 'POST',
data: JSON.stringify(formData),
success: res => {
if (res.data.code == 200) {
uni.showToast({
title: ynText,
icon: 'none'
});
}
}
});
},
itemClick3(e, i) {
switch (i) {
case 0:
uni.navigateTo({
url: 'editGroupName?groupId=' + this.detail.group.groupId + '&name=' + this.detail.group.name
});
break;
case 1:
uni.navigateTo({
url: 'QRcode?groupId=' + this.detail.group.groupId
});
break;
case 2:
uni.navigateTo({
url: 'editGroupNotice?groupId=' + this.detail.group.groupId + '&notice=' + this.detail.group.notice
});
break;
default:
break;
}
},
getInfo(e) {
//详情
this.$http.request({
url: '/group/getInfo/' + e,
success: res => {
if (res.data.code == 200) {
this.detail = res.data.data;
uni.setNavigationBarTitle({
title: '聊天信息(' + this.detail.user.length + ')'
});
}
}
});
}
}
};
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #ededed;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page {
background: #ededed;
}
/* #endif */
.xw-tool-list {
display: flex;
flex-direction: column;
background-color: #ffffff;
margin-bottom: 18rpx;
}
.xw-tool-item {
display: flex;
flex-direction: row;
align-items: center;
padding: 26rpx 24rpx;
border-bottom: 1px #eee solid;
}
.xw-tool-list-content:nth-last-child(1) .xw-tool-item {
border: none;
}
.xw-tool-text {
margin-right: auto;
}
.xw-tool-btn-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 34rpx 44rpx;
border-bottom: 1px #eee solid;
font-weight: bold;
color: #5f698c;
}
.wxgroup-list {
background-color: #fff;
padding: 24rpx;
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-bottom: 24rpx;
}
.wxgroup-list-item {
width: 20%;
overflow: hidden;
box-sizing: border-box;
margin-top: 12rpx;
margin-bottom: 12rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.wxgroup-list-icon .wxfont {
color: #999;
font-size: 46rpx;
}
.wxgroup-list-img {
width: 105rpx;
height: 105rpx;
border-radius: 12rpx;
}
.wxgroup-list-icon {
display: flex;
flex-direction: column;
width: 105rpx;
height: 105rpx;
border-radius: 12rpx;
align-items: center;
justify-content: center;
border: 1px #ddd dashed;
}
.wxgroup-list-text {
text-align: center;
width: 105rpx;
font-size: 24rpx;
color: #999;
margin-top: 12rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.xw-tool-else .text {
color: #666;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 520rpx;
}
</style>

View File

@@ -1,114 +0,0 @@
<template>
<view>
<watermark></watermark>
<form @submit="subform" class="remarkForm">
<view class="remarkForm-item">
<view class="remarkForm-label">群名</view>
<input class="remarkForm-input" placeholder="修改群名" type="text" v-model="form.name" />
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form:{
groupId: "",
name: ""
}
};
},
onLoad(e) {
this.form.groupId=e.groupId
this.form.name=e.name
},
methods: {
subform(e) {
var rules = {
name: {
rules: [{
checkType: "required",
errorMsg: "请填写内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/group/editGroupName',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
var data=JSON.parse(JSON.stringify(this.$store.state.chatlist[this.form.groupId]))
var ChatData=JSON.parse(JSON.stringify(this.$store.state.chatDatalist[this.form.groupId]))
ChatData.groupInfo.nickName=this.form.name
this.$store.dispatch('updateChatObjById', {
userId: this.form.groupId,
data: ChatData
})
data.nickName=this.form.name
this.$store.dispatch('updateChatListInfoById', {
userId: this.form.groupId,
data: data
})
this.$store.dispatch('getChatList')
uni.navigateBack({
delta:1
}).then(()=>{
uni.showToast({
title:'修改成功',
icon:'success'
})
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.remarkForm{
padding:24rpx 44rpx;
display: flex;flex-direction: column;
}
.remarkForm-item{
display: flex;flex-direction: column;
margin-bottom: 24rpx;
}
.remarkForm-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.remarkForm-label{font-size: 26rpx;color: #5C5C5C;margin-bottom: 15rpx;}
.remarkForm-input{
border-radius: 12rpx;
background-color: #F7F7F7;
height: 110rpx;
line-height: 110rpx;
padding:0 34rpx;
}
</style>

View File

@@ -1,100 +0,0 @@
<template>
<view>
<watermark></watermark>
<form @submit="subform" class="remarkForm">
<view class="remarkForm-item">
<view class="remarkForm-label">群公告</view>
<input class="remarkForm-input" placeholder="修改群公告" type="text" v-model="form.notice" />
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form:{
groupId:'',
notice:''
}
};
},
onLoad(e) {
this.form.groupId=e.groupId
this.form.notice=e.notice
},
methods: {
subform(e) {
var rules = {
notice: {
rules: [{
checkType: "required",
errorMsg: "请填写内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/group/editGroupNotice',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(()=>{
uni.showToast({
title:'修改成功',
icon:'success'
})
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.remarkForm{
padding:24rpx 44rpx;
display: flex;flex-direction: column;
}
.remarkForm-item{
display: flex;flex-direction: column;
margin-bottom: 24rpx;
}
.remarkForm-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.remarkForm-label{font-size: 26rpx;color: #5C5C5C;margin-bottom: 15rpx;}
.remarkForm-input{
border-radius: 12rpx;
background-color: #F7F7F7;
height: 110rpx;
line-height: 110rpx;
padding:0 34rpx;
}
</style>

View File

@@ -1,93 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<view class="wxgrouplist">
<view class="wxgrouplist-item" v-for="(v,i) in list" :key="i" @click="goGroup(v)">
<view class="wxgrouplist-imgs">
<image v-for="(item,index) in v.portrait" :src="item" mode="aspectFill"></image>
</view>
<view class="wxgrouplist-title">{{v.name}}</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list:[]
};
},
computed: {},
onLoad(e) {},
onShow() {
this.getlist();
},
methods: {
goGroup(e){
uni.navigateTo({
url:'../chatWindow/index?userId='+e.groupId+'&windowType=GROUP'
})
},
getlist(e) {
this.$http.request({
url: '/group/groupList',
success: res => {
if (res.data.code == 200) {
this.list = res.data.data;
}
}
});
}
}
};
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #ededed;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page {
background: #ededed;
}
/* #endif */
.wxgrouplist{
display: flex;flex-direction: column;
}
.wxgrouplist-item{
padding:0 28rpx;
background-color: #fff;
display: flex;flex-direction: row;align-items: center;
}
.wxgrouplist-imgs{
width: 80rpx;
height: 80rpx;
border-radius: 12rpx;
overflow: hidden;
display: flex;flex-direction: row;flex-wrap: wrap;
background-color: #DEDEDE;
}
.wxgrouplist-imgs image{
margin: 2rpx;
width: 36rpx;
height: 36rpx;
}
.wxgrouplist-title{
flex: 1;
border-bottom: 1px #F4F4F4 solid;
font-size: 32rpx;
color: #333;
line-height: 105rpx;
margin-left: 38rpx;
}
</style>

View File

@@ -1,213 +0,0 @@
<template>
<view class="wx-createGroup" :style="'height: calc(100vh - ' + windowTop + 'px)'">
<watermark></watermark>
<view class="wx-createGroup-check"><uni-indexed-list-wx showSelect :showAdd="false" :options="list" @click="bindClick"></uni-indexed-list-wx></view>
<view class="wx-createGroup-foot">
<view class="wx-btn wx-btn-info" @click="createGroup">
完成
<text v-if="select.length > 0">({{ select.length }})</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail: {
user: []
},
list: [],
select: [],
windowTop: 0,
groupId: ''
};
},
onLoad(e) {
this.groupId = e.groupId;
},
mounted() {
this.getflist();
uni.getSystemInfo({
success: res => {
this.windowTop = res.windowTop;
}
});
},
methods: {
createGroup() {
if(this.select.length<=0){
uni.showToast({
title:'未选择',
icon:'none'
})
return
}
var ids = [];
for (var i = 0; i < this.select.length; i++) {
if(this.select[i].data.addtype=='N'){
ids.push(this.select[i].data.userId);
}
}
var formData = {
groupId: this.groupId,
list: ids
};
this.$http.request({
url: '/group/invitationGroup',
method: 'POST',
data: JSON.stringify(formData),
success: res => {
if (res.data.code == 200) {
uni.navigateBack({
delta: 1
}).then(res=>{
uni.showToast({
title:'已邀请',
icon:'none'
})
});
}
}
});
},
bindClick(e) {
this.select = e.select;
},
getflist() {
this.$http.request({
url: '/group/getInfo/' + this.groupId,
success: res => {
if (res.data.code == 200) {
this.detail = res.data.data;
this.$http.request({
url: '/friend/friendList',
method: 'POST',
data:JSON.stringify({}),
success: res => {
if (res.data.code == 200) {
var data = res.data.data;
var list = [];
for (var i = 0; i < data.length; i++) {
var item = data[i];
if (item.userType == 'normal') {
list.push({
name: item.nickName,
avatar: item.portrait,
userId: item.userId,
chatNo: item.chatNo
});
}
}
var newlist=[]
var data1=leesData(this.detail.user, list,'userId')
var data2=leesDataRE(this.detail.user, list,'userId')
for (var i = 0; i < data1.length; i++) {
var item=data1[i]
newlist.push({
name: item.name,
avatar: item.avatar,
userId: item.userId,
chatNo: item.chatNo,
addtype:'N',
checked: false
})
}
for (var i = 0; i < data2.length; i++) {
var item=data2[i]
newlist.push({
name: item.name,
avatar: item.avatar,
userId: item.userId,
chatNo: item.chatNo,
addtype:'Y',
checked: true
})
}
this.list = this.$fc.sortList({ list: newlist, key: 'name' });
function leesData(arr1,arr2,key){//去掉相同的属性
var result = [];
for (var i = 0; i < arr2.length; i++) {
var obj = arr2[i];
var num = obj[key];
var flag = false;
for (var j = 0; j < arr1.length; j++) {
var aj = arr1[j];
var n = aj[key];
if (n == num) {
flag = true;
break;
}
}
if (!flag) {
result.push(obj);
}
}
return result
}
function leesDataRE(arr1,arr2,key){//保留相同的属性
var result = [];
for (var i = 0; i < arr2.length; i++) {
var obj = arr2[i];
var num = obj[key];
var flag = false;
for (var j = 0; j < arr1.length; j++) {
var aj = arr1[j];
var n = aj[key];
if (n == num) {
flag = true;
break;
}
}
if (flag) {
result.push(obj);
}
}
return result
}
}
}
});
}
}
});
}
}
};
</script>
<style scoped>
.wx-createGroup {
display: flex;
flex-direction: column;
}
.wx-createGroup-check {
height: 90%;
position: relative;
}
.wx-createGroup-foot {
box-sizing: border-box;
height: 10%;
display: flex;
flex-direction: row;
justify-content: flex-end;
background-color: #eee;
padding: 24rpx;
}
.wx-btn {
min-width: 200rpx;
height: 75rpx;
line-height: 75rpx;
text-align: center;
border-radius: 12rpx;
background-color: #007aff;
color: #fff;
font-size: 32rpx;
}
.wx-btn-info {
background-color: #05c160;
}
</style>

View File

@@ -1,143 +0,0 @@
<template>
<view class="wx-createGroup" :style="'height: calc(100vh - ' + windowTop + 'px)'">
<watermark></watermark>
<view class="wx-createGroup-check"><uni-indexed-list-wx showSelect :showAdd="false" :options="list" @click="bindClick"></uni-indexed-list-wx></view>
<view class="wx-createGroup-foot">
<view class="wx-btn wx-btn-error" @click="createGroup">
删除
<text v-if="select.length > 0">({{ select.length }})</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail: {
user: []
},
list: [],
select: [],
windowTop: 0,
groupId: ''
};
},
onLoad(e) {
this.groupId = e.groupId;
},
mounted() {
this.getflist();
uni.getSystemInfo({
success: res => {
this.windowTop = res.windowTop;
}
});
},
computed:{
userInfo(){
return this.$store.state.userInfo
}
},
methods: {
createGroup() {
if(this.select.length<=0){
uni.showToast({
title:'未选择',
icon:'none'
})
return
}
var ids = [];
for (var i = 0; i < this.select.length; i++) {
ids.push(this.select[i].data.userId);
}
var formData = {
groupId: this.groupId,
list: ids
};
this.$http.request({
url: '/group/kickedGroup',
method: 'POST',
data: JSON.stringify(formData),
success: res => {
if (res.data.code == 200) {
uni.navigateBack({
delta: 1
}).then(res=>{
uni.showToast({
title:'已删除',
icon:'none'
})
});
}
}
});
},
bindClick(e) {
this.select = e.select;
},
getflist() {
this.$http.request({
url: '/group/getInfo/' + this.groupId,
success: res => {
if (res.data.code == 200) {
this.detail = res.data.data;
var data = this.detail.user;
var list = [];
for (var i = 0; i < data.length; i++) {
var item = data[i];
if (item.userId !== this.userInfo.userId) {
list.push({
name: item.nickName,
avatar: item.portrait,
userId: item.userId
});
}
}
this.list = this.$fc.sortList({ list: list, key: 'name' });
}
}
});
}
}
};
</script>
<style scoped>
.wx-createGroup {
display: flex;
flex-direction: column;
}
.wx-createGroup-check {
height: 90%;
position: relative;
}
.wx-createGroup-foot {
box-sizing: border-box;
height: 10%;
display: flex;
flex-direction: row;
justify-content: flex-end;
background-color: #eee;
padding: 24rpx;
}
.wx-btn {
min-width: 200rpx;
height: 75rpx;
line-height: 75rpx;
text-align: center;
border-radius: 12rpx;
background-color: #007aff;
color: #fff;
font-size: 32rpx;
}
.wx-btn-info {
background-color: #05c160;
}
.wx-btn-error{
background-color: #FF5A5F;
}
</style>

View File

@@ -1,117 +0,0 @@
<template>
<view class="bgColor" v-if="detail">
<watermark></watermark>
<view class="wxscanCodeDetail">
<view class="wxscanCodeDetail-imgs">
<image v-for="(item,index) in detail.portrait" :src="item" mode="aspectFill"></image>
</view>
<view class="wxscanCodeDetail-title">{{detail.name}}({{detail.count}})</view>
<view class="wx-btn wx-btn-info" @click="ingroup">加入群聊</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail:''
};
},
computed: {},
onLoad(e) {
this.param = e.param;
},
onShow() {
this.getInfo(this.param);
},
methods: {
ingroup(){
var data=this.param.split(':')
var type=data[0]
var value=data[1]
this.$http.request({
url: '/group/joinGroup/' + value,
success: res => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
})
}
}
});
},
getInfo(e) {
//详情
this.$http.request({
url: '/group/scanCode/' + e,
success: res => {
if (res.data.code == 200) {
this.detail = res.data.data;
}
}
});
}
}
};
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #ededed;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page {
background: #ededed;
}
/* #endif */
.wx-btn {
min-width: 200rpx;
height: 75rpx;
line-height: 75rpx;
text-align: center;
border-radius: 12rpx;
background-color: #007aff;
color: #fff;
font-size: 32rpx;
}
.wx-btn-info {
background-color: #05c160;
}
.wxscanCodeDetail{
height: 100vh;
display: flex;flex-direction: column;
background-color: #fff;
align-items: center;
}
.wxscanCodeDetail-imgs{
width: 120rpx;
height: 120rpx;
border-radius: 12rpx;
overflow: hidden;
display: flex;flex-direction: row;flex-wrap: wrap;
background-color: #DEDEDE;
margin-top: 8.5vh;
}
.wxscanCodeDetail-imgs image{
margin: 2rpx;
width: 56rpx;
height: 56rpx;
}
.wxscanCodeDetail-title{
word-break: break-all;
font-size: 40rpx;
color: #333;
margin-top: 4vh;
margin-bottom: 50vh;
}
</style>

View File

@@ -1,299 +0,0 @@
<template>
<view class="wx-login">
<watermark></watermark>
<view class="wx-login-title">手机号登录</view>
<view class="xw-login-form">
<form @submit="sublogin">
<view class="xw-login-form-item">
<view class="xw-login-form-label">手机号</view>
<input class="xw-login-form-input" maxlength="11" placeholder="请填写手机号" type="text" name="userName"
v-model="form.userName" />
<view class="login-form-icon login-form-seepass" @click="form.userName=''" v-if="form.userName">
<uni-icons type="clear" size="26" color="#B9CCE0"></uni-icons>
</view>
</view>
<view class="xw-login-form-item" v-if="!logintype">
<view class="xw-login-form-label">密码</view>
<input class="xw-login-form-input" placeholder="请输入密码" name="password" v-model="form.password"
:password="showPassword" type="text" />
<view class="login-form-icon login-form-seepass" @click="changePassword">
<image src="../../static/img/l03.png" mode="aspectFill" v-if="showPassword"></image>
<image src="../../static/img/l04.png" mode="aspectFill" v-else></image>
</view>
</view>
<view class="xw-login-form-item" v-if="logintype">
<view class="xw-login-form-label">验证码</view>
<input class="xw-login-form-input" placeholder="请填写验证码" name="code" v-model="form.code"
type="text" />
<view class="wx-btn wx-btn-info" @click="getMsgCode()" v-if="!loading">获取验证码</view>
<view class="wx-btn wx-btn-info" v-else>{{time}}秒后重试</view>
</view>
<text class="xw-login-form-code" v-if="logintype" @click="changeLogintype">使用密码登录</text>
<text class="xw-login-form-code" v-if="!logintype" @click="changeLogintype">使用短信验证码登录</text>
<view class="xw-login-form-code" @click="goForgetPass">忘记密码</view>
<button class="wx-btn wx-btn-info xw-login-form-btn" form-type="submit">登录</button>
<view class="login-agree">
<view class="login-agree-checkd">
<checkbox @click="agree = !agree" style="transform:scale(0.7)" :checked="agree" />
<text class="login-agree-btn" @click="agree = !agree">已阅读并同意</text>
</view>
<view class="login-agree-text" @click="goagreement()">隐私及服务协议</view>
</view>
</form>
</view>
</view>
</template>
<script>
import customHttp from "@/common/customHttp.js"
import { Base64 } from 'js-base64';
export default {
data() {
return {
form: {
userName: "",
password: ""
},
loading: false,
timer: null,
time: 60,
logintype: false,
showPassword: true,
agree: false,
}
},
onLoad() {},
methods: {
goForgetPass() {
uni.navigateTo({
url: '../forgetPass/index'
})
},
changeLogintype() {
this.logintype = !this.logintype
if (this.logintype) {
this.form = {
userName: this.form.phone,
code: ""
}
}
if (!this.logintype) {
this.form = {
userName: this.form.phone,
password: ""
}
}
},
changePassword() {
this.showPassword = !this.showPassword;
},
goagreement() {
// uni.navigateTo({//本地协议
// url: '../../pages/agreement/index?name=微聊'
// })
this.$http.request({ //在线协议
url: '/common/getAgreement',
success: (res) => {
if (res.data.code == 200) {
// #ifdef H5
window.open(res.data.data)
// #endif
// #ifdef APP-PLUS
this.$fc.openWebView(res.data.data)
// #endif
}
}
});
},
getMsgCode() {
var reg = /^1[0-9]{10,10}$/;
if (!this.form.phone || !reg.test(this.form.phone)) {
uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
return
}
this.loading = true
this.timer = setInterval(() => {
this.time--
if (this.time <= 0) {
clearInterval(this.timer)
this.loading = false
this.time = 60
}
}, 1000)
var formData = {
phone: this.form.phone,
type: '2' //登录
}
this.$http.request({
url: '/auth/sendCode',
method: 'POST',
data: JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
// todo验证码
this.form.code = res.data.data.code
uni.showToast({
title: '验证码已发送至你的手机',
icon: 'none'
})
}
}
});
},
rMathfloor(min, max) { //返回包括最大/小值
return Math.floor(Math.random() * (max - min + 1)) + min
},
sublogin(e) {
customHttp.customHttp.post('/api/im/app/login', {
"username": this.form.userName,
"password":Base64.encode(this.form.password)
}, {
params: {},
/* 会加在url上 */
header: {},
/* 会与全局header合并如有同名属性局WW部覆盖全局 */
dataType: 'json',
// 注如果局部custom与全局custom有同名属性则后面的属性会覆盖前面的属性相当于Object.assign(全局,局部)
custom: {
target: "znzq"
}, // 可以加一些自定义参数在拦截器等地方使用。比如这里我加了一个auth可在拦截器里拿到如果true就传token
}).then(res => {
console.log("=========获取到数据")
console.log(res)
if (res.statusCode == 200) {
if (res.data.code == 200) {
this.loginDone(res.data.result)
}
}
}).catch(err => {
})
},
loginDone(data) {
uni.setStorageSync('appId', data.appId);
uni.setStorageSync('im_userId', data.id);
uni.setStorageSync('userId', data.id);
uni.setStorageSync('im_userCSign', data.userSign);
uni.setStorageSync('im_imUserSign', data.imUserSign);
uni.setStorageSync('imUserSign', data.imUserSign);
uni.setStorageSync('token', data.token);
uni.setStorageSync('hd_token', data.token);
uni.reLaunch({
url: '../tabbar1/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.wx-login-title {
text-align: center;
padding-top: 120rpx;
font-size: 42rpx;
padding-bottom: 24rpx;
}
.xw-login-form {
padding: 34rpx;
}
.xw-login-form-item {
position: relative;
padding: 0 12rpx;
border-bottom: 1px #eee solid;
display: flex;
flex-direction: row;
align-items: center;
line-height: 100rpx;
height: 100rpx;
}
.xw-login-form-label {
width: 160rpx;
min-width: 160rpx;
}
.xw-login-form-input {}
.login-agree {
margin-top: 34rpx;
justify-content: center;
display: flex;
flex-direction: row;
align-items: center;
}
.login-agree-text,
.login-agree-btn {
font-size: 24rpx;
color: #222;
}
.login-agree-text {
color: #8295a5;
}
.login-form-icon {
width: 50rpx;
height: 50rpx;
}
.login-form-seepass {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.login-form-icon image {
float: left;
width: 50rpx;
height: 50rpx;
}
.xw-login-form-code {
font-size: 28rpx;
padding: 0 12rpx;
height: 100rpx;
line-height: 100rpx;
color: #8295a5;
}
.wx-btn {
min-width: 200rpx;
height: 75rpx;
line-height: 75rpx;
text-align: center;
border-radius: 12rpx;
background-color: #007AFF;
color: #fff;
font-size: 32rpx;
}
.wx-btn-info {
background-color: #05C160;
}
.xw-login-form-btn {
width: 300rpx;
margin-top: 120rpx;
}
</style>

View File

@@ -1,191 +0,0 @@
<template>
<view class="wxnearby">
<watermark></watermark>
<view class="wxnearby-item" v-for="(v,i) in list" :key="i" @click="goAddfriend(v)">
<view class="person-wx-user">
<image class="person-wx-avatar" @click="$fc.previewImagesolo(v.portrait)" :src="v.portrait" mode="aspectFill"></image>
<view class="wxnearby-item-content">
<view class="person-wx-user-detail">
<view class="person-wx-nikename">
<text class="text">{{v.nickName}}</text>
<view class="wxfont person-wx-nikename-icon" :class="{'nv':v.gender=='0'}" v-if="v.gender=='0'"></view>
<view class="wxfont person-wx-nikename-icon" :class="{'nan':v.gender=='1'}" v-if="v.gender=='1'"></view>
</view>
<text class="person-wx-name">
相距{{v.distance}}{{v.distanceUnit}}
</text>
</view>
<view class="person-wx-intor" v-if="v.intro">{{v.intro}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list:[]
}
},
onLoad () {
uni.showModal({
title: '提示',
cancelText:'返回',
content: '查看附近的人将获取你的位置信息,你的位置信息会被保留一段时间,通过右上角的清除功能可随时手动清除位置信息',
success: (res) => {
if (res.confirm) {
this.getlist()
} else if (res.cancel) {
uni.navigateBack({
delta:1
})
}
}
});
},
onShow() {},
onUnload() {},
methods:{
getlist(){
uni.showLoading({
title:'获取地理位置中'
})
uni.getLocation({
type: 'wgs84',
success: (resLocation)=> {
this.$http.request({
url: '/near/doNear',
method: 'POST',
data:JSON.stringify({
longitude:resLocation.longitude,
latitude:resLocation.latitude
}),
success: (res) => {
if (res.data.code == 200) {
this.list=res.data.data
}
}
});
},
fail: (error) => {
uni.showToast({
title:'请检查定位是否开启',
icon:'none',
position:'bottom'
})
console.log(error.errMsg)
}
});
},
goAddfriend(e){
uni.navigateTo({
url:'../personInfo/detail?param='+e.userId+'&source=8'
})
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
uni.showActionSheet({
itemList: ['清除位置信息并退出'],
success: (res) => {
switch (res.tapIndex) {
case 0:
this.$http.request({
url: '/near/closeNear',
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
})
}
}
});
break;
default:
break;
}
}
});
break;
default:
break;
}
}
}
</script>
<style scoped>
.person-wx-user {
display: flex;
flex-direction: row;
align-items: center;
flex: 1;
width: 100%;
}
.wxnearby{
}
.wxnearby-item{
padding:0 24rpx;
width: 100%;
box-sizing: border-box;
}
.person-wx-avatar {
width: 90rpx;
min-width: 90rpx;
height: 90rpx;
margin-right: 42rpx;
border-radius: 16rpx;
}
.wxnearby-item-content{
flex: 1;
display: flex;flex-direction: row;align-items: center;
padding:24rpx 0;
border-bottom: 1px #eee solid;
}
.person-wx-user-detail {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 400rpx;
}
.person-wx-nikename {
color: #333;
font-size: 36rpx;
display: flex;flex-direction: row;align-items: center;
margin-bottom: 12rpx;
}
.person-wx-nikename .text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 480rpx;
}
.person-wx-name {
color: #B2B2B2;
font-size: 28rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.person-wx-nikename-icon.nan{
color: #007AFF;
}
.person-wx-nikename-icon.nv{
color: #FF5A5F;
}
.person-wx-nikename-icon{
margin-right: auto;
}
.person-wx-intor{
padding: 12rpx;
margin-left: auto;
font-size: 24rpx;
background-color: #F2F2F2;
color: #666;
border-radius: 6rpx;
}
</style>

View File

@@ -1,193 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<view class="QRcode-box">
<view class="person-wx" v-if="userInfo">
<view class="person-wx-user">
<image class="person-wx-avatar" @click="$fc.previewImagesolo(userInfo.portrait)" :src="userInfo.portrait" mode="aspectFill"></image>
<view class="person-wx-user-detail">
<view class="person-wx-nikename">
<text class="text">{{userInfo.nickName}}</text>
<view class="wxfont person-wx-nikename-icon" :class="{'nv':userInfo.gender=='0'}" v-if="userInfo.gender=='0'"></view>
<view class="wxfont person-wx-nikename-icon" :class="{'nan':userInfo.gender=='1'}" v-if="userInfo.gender=='1'"></view>
</view>
<text class="person-wx-name">
微聊号{{userInfo.chatNo}}
</text>
</view>
</view>
</view>
<view class="QRcode-img">
<image :src="QRimg" mode="aspectFill" @click="resetQrCode"></image>
</view>
<view class="QRcode-tips">扫一扫上面的二维码图案加我微聊</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
QRimg:''
}
},
onLoad(e) {
this.$http.request({
url: '/my/getQrCode',
success: (res) => {
if (res.data.code == 200) {
this.QRimg=res.data.data
}
}
});
},
computed:{
userInfo(){
return this.$store.state.userInfo
}
},
onShow(){},
methods: {
resetQrCode(){
this.$http.request({
url: '/my/resetQrCode',
success: (res) => {
if (res.data.code == 200) {
this.QRimg=res.data.data
}
}
});
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
uni.showActionSheet({
// itemList: ['换个样式', '保存到手机', '扫描二维码', '重置二维码'],
itemList: ['重置二维码', '保存到手机'],
success: (res)=> {
switch (res.tapIndex) {
case 0:
uni.showLoading({title:'重置中'})
this.resetQrCode()
break;
case 1:
// #ifdef APP-PLUS
this.$fc.plusSaveBase64Img({base64:this.QRimg})
// #endif
// #ifdef H5
this.$fc.h5SaveBase64Img({base64:this.QRimg})
// #endif
break;
default:
break;
}
},
fail: (res)=> {
console.log(res.errMsg);
}
});
break;
default:
break;
}
}
}
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.QRcode-box{
width: 666rpx;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
padding: 32rpx;
background-color: #fff;
border-radius: 24rpx;
box-sizing: border-box;
display: flex;flex-direction: column;
align-items: center;
}
.QRcode-img{
width: 600rpx;
height: 600rpx;
}
.QRcode-img image{width: 100%;height: 100%;}
.QRcode-tips{
margin-top: 6rpx;
font-size: 26rpx;
color: #999;
}
.person-wx {
width: 100%;
margin-bottom: 24rpx;
}
.person-wx-user {
display: flex;
flex-direction: row;
align-items: center;
}
.person-wx-avatar {
width: 120rpx;
min-width: 120rpx;
height: 120rpx;
margin-right: 42rpx;
border-radius: 16rpx;
}
.person-wx-user-detail {
display: flex;
flex-direction: column;
justify-content: center;
width: 440rpx;
}
.person-wx-nikename {
font-size: 36rpx;
font-weight: bold;
display: flex;flex-direction: row;align-items: center;
}
.person-wx-nikename .text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 480rpx;
}
.person-wx-name {
color: #666;
font-size: 28rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 12rpx;
}
.person-wx-nikename-icon.nan{
color: #007AFF;
}
.person-wx-nikename-icon.nv{
color: #FF5A5F;
}
.person-wx-nikename-icon{
margin-right: auto;
}
</style>

View File

@@ -1,130 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<form @submit="subform" class="remarkForm">
<view class="remarkForm-item">
<zmm-city-picker v-model="city"></zmm-city-picker>
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
city:'',
// rangeCityarr: [[], []],
form:{
provinces:'',//省份
city:''//城市
},
list:[{
label:'男',
value:'1'
},{
label:'女',
value:'0'
}]
};
},
onLoad(e) {
this.form.userId=e.userId
this.city=e.provinces ? e.provinces+','+e.city : '请选择'
this.form.provinces=e.provinces
this.form.city=e.city
},
methods: {
subform(e) {
var rules = {
gender: {
rules: [{
checkType: "required",
errorMsg: "请填写内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var city=this.city.split(',')
formData.provinces=city[0]
formData.city=city[1]
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/my/editCity',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(()=>{
uni.showToast({
title:'修改成功',
icon:'success'
})
this.$store.dispatch('get_UserInfo')
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.remarkForm{
// padding:24rpx 44rpx;
display: flex;flex-direction: column;
}
.remarkForm-item{
display: flex;flex-direction: column;
margin-bottom: 24rpx;
}
.remarkForm-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.remarkForm-label{font-size: 26rpx;color: #5C5C5C;margin-bottom: 15rpx;}
.remarkForm-input{
border-radius: 12rpx;
background-color: #F7F7F7;
height: 110rpx;
line-height: 110rpx;
padding:0 34rpx;
}
</style>

View File

@@ -1,123 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<form @submit="subform" class="remarkForm">
<view class="remarkForm-item">
<zmm-radio-group :range="list" v-model="form.gender"></zmm-radio-group>
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form:{
gender:'',
userId:''
},
list:[{
label:'男',
value:'1'
},{
label:'女',
value:'2'
}]
};
},
onLoad(e) {
this.form.userId=e.userId
this.form.gender=e.gender
},
methods: {
subform(e) {
var rules = {
gender: {
rules: [{
checkType: "required",
errorMsg: "请填写内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/my/editGender',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(()=>{
uni.showToast({
title:'修改成功',
icon:'success'
})
this.$store.dispatch('get_UserInfo')
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.remarkForm{
// padding:24rpx 44rpx;
display: flex;flex-direction: column;
}
.remarkForm-item{
display: flex;flex-direction: column;
margin-bottom: 24rpx;
}
.remarkForm-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.remarkForm-label{font-size: 26rpx;color: #5C5C5C;margin-bottom: 15rpx;}
.remarkForm-input{
border-radius: 12rpx;
background-color: #F7F7F7;
height: 110rpx;
line-height: 110rpx;
padding:0 34rpx;
}
</style>

View File

@@ -1,101 +0,0 @@
<template>
<view>
<watermark></watermark>
<form @submit="subform" class="remarkForm">
<view class="remarkForm-item">
<view class="remarkForm-label">个性签名 (发表你的个性签名吧)</view>
<input class="remarkForm-input" placeholder="个性签名" type="text" v-model="form.intro" />
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form:{
intro:'',
userId:''
}
};
},
onLoad(e) {
this.form.userId=e.userId
this.form.intro=e.intro
},
methods: {
subform(e) {
var rules = {
intro: {
rules: [{
checkType: "required",
errorMsg: "请填写内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/my/editIntro',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(()=>{
uni.showToast({
title:'修改成功',
icon:'success'
})
this.$store.dispatch('get_UserInfo')
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.remarkForm{
padding:24rpx 44rpx;
display: flex;flex-direction: column;
}
.remarkForm-item{
display: flex;flex-direction: column;
margin-bottom: 24rpx;
}
.remarkForm-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.remarkForm-label{font-size: 26rpx;color: #5C5C5C;margin-bottom: 15rpx;}
.remarkForm-input{
border-radius: 12rpx;
background-color: #F7F7F7;
height: 110rpx;
line-height: 110rpx;
padding:0 34rpx;
}
</style>

View File

@@ -1,101 +0,0 @@
<template>
<view>
<watermark></watermark>
<form @submit="subform" class="remarkForm">
<view class="remarkForm-item">
<view class="remarkForm-label">名字(好名字可以让朋友更容易记住你)</view>
<input class="remarkForm-input" placeholder="名字" type="text" v-model="form.nickName" />
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form:{
nickName:'',
userId:''
}
};
},
onLoad(e) {
this.form.userId=e.userId
this.form.nickName=e.nickName
},
methods: {
subform(e) {
var rules = {
nickName: {
rules: [{
checkType: "required",
errorMsg: "请填写内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/my/editNick',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(()=>{
uni.showToast({
title:'修改成功',
icon:'success'
})
this.$store.dispatch('get_UserInfo')
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.remarkForm{
padding:24rpx 44rpx;
display: flex;flex-direction: column;
}
.remarkForm-item{
display: flex;flex-direction: column;
margin-bottom: 24rpx;
}
.remarkForm-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.remarkForm-label{font-size: 26rpx;color: #5C5C5C;margin-bottom: 15rpx;}
.remarkForm-input{
border-radius: 12rpx;
background-color: #F7F7F7;
height: 110rpx;
line-height: 110rpx;
padding:0 34rpx;
}
</style>

View File

@@ -1,131 +0,0 @@
<template>
<view>
<watermark></watermark>
<form @submit="subform" class="remarkForm">
<view class="remarkForm-item">
<view class="remarkForm-label">原密码</view>
<input class="remarkForm-input" placeholder="请填写原密码" type="password" v-model="form.password" />
</view>
<view class="remarkForm-item">
<view class="remarkForm-label">新密码 (密码最长8-16位且由数字与字母组合)</view>
<input class="remarkForm-input" placeholder="请填写新密码" type="password" v-model="form.pwd" />
</view>
<view class="remarkForm-item">
<view class="remarkForm-label">确认密码</view>
<input class="remarkForm-input" placeholder="请再次填写新密码" type="password" v-model="form.repwd" />
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form:{
password:'',
pwd:'',
repwd:''
}
};
},
onLoad(e) {
},
methods: {
subform(e) {
var rules = {
password: {
rules: [{
checkType: "required",
errorMsg: "请填写原密码"
}]
},
pwd: {
rules: [{
checkType: "required",
errorMsg: "请填写新密码"
},{
checkType: "reg",
checkRule:/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,16}$/,
errorMsg: "密码8-16位,由数字与字母组成"
}]
},
repwd: {
rules: [{
checkType: "required",
errorMsg: "请再次填写新密码"
},{
checkType: "same",
checkRule:"pwd",
errorMsg: "两次密码不一致"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
formData.password=this.$md5.hex_md5(formData.password)
formData.pwd=this.$md5.hex_md5(formData.pwd)
if (checkRes) {
this.$http.request({
url: '/my/editPass',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title:'修改成功',
icon:'success'
})
this.form={
password:'',
pwd:'',
repwd:''
}
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.remarkForm{
padding:24rpx 44rpx;
display: flex;flex-direction: column;
}
.remarkForm-item{
display: flex;flex-direction: column;
margin-bottom: 24rpx;
}
.remarkForm-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.remarkForm-label{font-size: 26rpx;color: #5C5C5C;margin-bottom: 15rpx;}
.remarkForm-input{
border-radius: 12rpx;
background-color: #F7F7F7;
height: 110rpx;
line-height: 110rpx;
padding:0 34rpx;
}
</style>

View File

@@ -1,101 +0,0 @@
<template>
<view>
<watermark></watermark>
<form @submit="subform" class="remarkForm">
<view class="remarkForm-item">
<view class="remarkForm-label">微聊号</view>
<input class="remarkForm-input" placeholder="请输入" type="text" v-model="form.chatNo" />
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form:{
chatNo:'',
userId:''
}
};
},
onLoad(e) {
this.form.userId=e.userId
this.form.chatNo=e.chatNo
},
methods: {
subform(e) {
var rules = {
chatNo: {
rules: [{
checkType: "required",
errorMsg: "请填写内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/my/editChatNo',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(()=>{
uni.showToast({
title:'修改成功',
icon:'success'
})
this.$store.dispatch('get_UserInfo')
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
.remarkForm{
padding:24rpx 44rpx;
display: flex;flex-direction: column;
}
.remarkForm-item{
display: flex;flex-direction: column;
margin-bottom: 24rpx;
}
.remarkForm-textarea{
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.remarkForm-label{font-size: 26rpx;color: #5C5C5C;margin-bottom: 15rpx;}
.remarkForm-input{
border-radius: 12rpx;
background-color: #F7F7F7;
height: 110rpx;
line-height: 110rpx;
padding:0 34rpx;
}
</style>

View File

@@ -1,186 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<view class="xw-tool-list">
<view class="xw-tool-list-content">
<view class="xw-tool-item">
<text class="xw-tool-text">头像</text>
<zmm-upload-avatar v-model="avatar" @change="avatarChange"></zmm-upload-avatar>
</view>
</view>
</view>
<tool-list-wx :list="list1" @itemClick="itemClick"></tool-list-wx>
<tool-list-wx :list="list2" @itemClick="itemClick2"></tool-list-wx>
<tool-list-wx :list="list3" @itemClick="itemClick3"></tool-list-wx>
</view>
</template>
<script>
export default {
data() {
return {
avatar:this.$store.state.userInfo.portrait,
list2:[{
title: '二维码名片',
path: '#',
else:[{
type: 'img',
content: '../../static/wx/t05.png'
}]
}]
}
},
computed:{
userInfo(){
return this.$store.state.userInfo
},
list1(){
return [{
title: '名字',
path: '#',
else:[{
type: 'text',
content: this.$store.state.userInfo.nickName
}]
},{
title: '微聊号',
path: '#',
else:[{
type: 'text',
content: this.$store.state.userInfo.chatNo
}]
}]
},
list3(){
return [{
title: '性别',
path: '#',
else:[{
type: 'text',
content: this.$store.state.userInfo.genderLabel
}]
},{
title: '地区',
path: '#',
else:[{
type: 'text',
content: this.$store.state.userInfo.provinces+' '+this.$store.state.userInfo.city
}]
},{
title: '个性签名',
path: '#',
else:[{
type: 'text',
content: this.$store.state.userInfo.intro
}]
}]
}
},
onLoad() {},
methods: {
itemClick(e,i){
switch (i){
case 0:
uni.navigateTo({
url:'editNikeName?userId='+this.userInfo.userId+'&nickName='+this.userInfo.nickName
})
break;
case 1:
uni.navigateTo({
url:'editchatNo?userId='+this.userInfo.userId+'&chatNo='+this.userInfo.chatNo
})
break;
default:
break;
}
},
itemClick2(e,i){
switch (i){
case 0:
uni.navigateTo({
url:'QRcode'
})
break;
default:
break;
}
},
itemClick3(e,i){
switch (i){
case 0:
uni.navigateTo({
url:'editGender?userId='+this.userInfo.userId+'&gender='+this.userInfo.gender
})
break;
case 1:
uni.navigateTo({
url:'editAddress?userId='+this.userInfo.userId+'&provinces='+this.userInfo.provinces+'&city='+this.userInfo.city
})
break;
case 2:
uni.navigateTo({
url:'editIntro?userId='+this.userInfo.userId+'&intro='+this.userInfo.intro
})
break;
default:
break;
}
},
avatarChange(e){
this.$http.request({
url: '/my/editPortrait',
method: 'POST',
data:JSON.stringify({portrait:e}),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title:'修改成功',
icon:'none'
})
this.$store.dispatch('get_UserInfo')
}
}
});
}
}
}
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.xw-tool-list {
display: flex;
flex-direction: column;
background-color: #ffffff;
border-bottom: 1px #eee solid;
}
.xw-tool-item {
display: flex;
flex-direction: row;
align-items: center;
padding: 26rpx 24rpx;
}
.xw-tool-item:nth-last-child(1) {
border: none;
}
.xw-tool-text {
margin-right: auto;
}
</style>

View File

@@ -1,411 +0,0 @@
<template>
<view class="bgColor" v-if="userdetail">
<watermark></watermark>
<view class="person-wx">
<view class="person-wx-user">
<image class="person-wx-avatar" @click="$fc.previewImagesolo(userdetail.portrait)" :src="userdetail.portrait" mode="aspectFill"></image>
<view class="person-wx-user-detail">
<view class="person-wx-nikename">
<text class="text">{{userdetail.nickName}}</text>
<view class="wxfont person-wx-nikename-icon" :class="{'nv':userdetail.gender=='0'}" v-if="userdetail.gender=='0'"></view>
<view class="wxfont person-wx-nikename-icon" :class="{'nan':userdetail.gender=='1'}" v-if="userdetail.gender=='1'"></view>
</view>
<text class="person-wx-name">
微聊号{{userdetail.chatNo}}
</text>
<text class="person-wx-name" v-if="userdetail.provinces">地区{{userdetail.provinces}} {{userdetail.city}}</text>
</view>
</view>
</view>
<tool-list-wx :list="list2"></tool-list-wx>
<tool-list-wx :list="list3" v-if="detail.applyStatus!=='0'&&type=='2'"></tool-list-wx>
<tool-list-wx v-if="type=='2'&&detail.applyStatus=='0'&&userdetail.isFriend=='N'" :list="list4" type="btns" @itemClick="itemClicklist4"></tool-list-wx>
<tool-list-wx v-if="type=='1'&&userdetail.isFriend=='N'" :list="list1" type="btns" @itemClick="itemClick"></tool-list-wx>
<tool-list-wx v-if="userdetail.isFriend=='Y'" :list="list5" type="btns" @itemClick="itemClick5"></tool-list-wx>
</view>
</template>
<script>
// #ifdef APP-PLUS
const TUICalling = uni.requireNativePlugin("TUICallingUniPlugin-TUICallingModule");
// #endif
export default {
data() {
return {
userdetail:'',
type:'',
detail:'',
param:'',
list1: [{
title: '添加到通讯录',
path: '#',
icon: ''
}],
list3:[{
title: '状态',
path: '#',
else: [{
type: 'text',
content: ''
}],
hideRight:true
}],
list2: [{
title: '来源',
path: '#',
else: [{
type: 'text',
content: ''
}],
hideRight:true
}],
list4: [{
title: '添加到通讯录',
path: '#',
icon: ''
},{
title: '拒绝',
path: '#',
icon: ''
},{
title: '忽略',
path: '#',
icon: ''
}],
list5:[{
title: '发消息',
path: '#',
icon: 'faxiaoxi'
},{
title: '音视频通话',
path: '#',
icon: 'shipin'
}]
}
},
onLoad(e) {
this.param=e.param
this.type=e.type
if(this.type=='2'){
this.getApplyInfo(e.param)
}
if(this.type=='1'){
this.getUser(e.param)
}
},
methods: {
getApplyInfo(e){//申请记录好友详情
this.$http.request({
url: '/apply/info/'+e,
success: (res) => {
if (res.data.code == 200) {
this.detail=res.data.data
this.list3[0].else[0].content=this.detail.applyStatusLabel
this.list2[0].else[0].content=this.detail.applySourceLabel
this.getUser(this.detail.chatNo)
}
}
});
},
getUser(e){//搜索好友
this.$http.request({
url: '/friend/findFriend',
method: 'POST',
data:JSON.stringify({param:e}),
success: (res) => {
if (res.data.code == 200) {
this.userdetail=res.data.data
if(this.userdetail.sourceLabel){
this.list2[0].else[0].content=this.userdetail.sourceLabel
}
}else{
uni.navigateBack({
delta:1
})
}
}
});
},
itemClick(e,i){
switch (i){
case 0:
uni.navigateTo({
url:'../search-friends/add?userId='+this.userdetail.userId+'&source='+this.userdetail.source
})
break;
default:
break;
}
},
itemClick5(e,i){
switch (i){
case 0:
uni.navigateTo({
url:'../chatWindow/index?userId='+this.userdetail.userId+'&windowType=SINGLE'
})
break;
case 1:
uni.showActionSheet({
itemList: ['视频通话','语音通话'],
success: (res) => {
switch (res.tapIndex){
case 0:
this.sendVideoCall()
break;
case 1:
this.sendVoiceCall()
break;
default:
break;
}
}
});
break;
default:
break;
}
},
itemClicklist4(e,i){
switch (i){
case 0://同意
this.$http.request({
url: '/apply/agree',
method: 'POST',
data:JSON.stringify({applyId:this.param}),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(res=>{
uni.showToast({
title:'已同意',
icon:'none'
})
})
}
}
});
break;
case 1:
this.$http.request({
url: '/apply/refused',
method: 'POST',
data:JSON.stringify({applyId:this.param}),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(res=>{
uni.showToast({
title:'已拒绝',
icon:'none'
})
})
}
}
});
break;
case 2:
this.$http.request({
url: '/apply/ignore',
method: 'POST',
data:JSON.stringify({applyId:this.param}),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(res=>{
uni.showToast({
title:'已忽略',
icon:'none'
})
})
}
}
});
break;
default:
break;
}
},
sendVoiceCall(){
//发起语音
uni.showLoading({
title:'发起语音通话'
})
var formdata={
userId: this.userdetail.userId,
msgType: "TRTC_VOICE_START",
content: "TRTC_VOICE_START"
}
this.$http.request({
url: '/chat/sendMsg',
method: 'POST',
data: JSON.stringify(formdata),
success: (res) => {
if(res.data.code=='200'){
if(res.data.data.status!=='0'){
uni.showToast({
title:res.data.data.statusLabel,
icon:'none'
})
return
}
var userInfo=res.data.data.userInfo
var data={
userId:userInfo.userId,
trtcId:userInfo.trtcId,
nickName:userInfo.nickName,
portrait:userInfo.portrait,
startTime:new Date().getTime(),
type:'audio'
}
uni.setStorage({
key: 'call',
data: JSON.stringify(data),
success: function () {
console.log('success');
TUICalling.call({
userID: userInfo.trtcId,
type: 1
})
}
});
}
}
});
},
sendVideoCall(){
//发起视频
uni.showLoading({
title:'发起视频通话'
})
var formdata={
userId: this.userdetail.userId,
msgType: "TRTC_VIDEO_START",
content: "TRTC_VIDEO_START"
}
this.$http.request({
url: '/chat/sendMsg',
method: 'POST',
data: JSON.stringify(formdata),
success: (res) => {
if(res.data.code=='200'){
if(res.data.data.status!=='0'){
uni.showToast({
title:res.data.data.statusLabel,
icon:'none'
})
return
}
var userInfo=res.data.data.userInfo
var data={
userId:userInfo.userId,
trtcId:userInfo.trtcId,
nickName:userInfo.nickName,
portrait:userInfo.portrait,
startTime:new Date().getTime(),
type:'video'
}
uni.setStorage({
key: 'call',
data: JSON.stringify(data),
success: function () {
console.log('success');
TUICalling.call({
userID: userInfo.trtcId,
type: 2
})
}
});
}
}
});
}
}
}
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.person-wx {
background-color: #fff;
padding:44rpx 24rpx;
padding-right: 24rpx;
border-bottom: 1px #eee solid;
}
.person-wx-user {
display: flex;
flex-direction: row;
align-items: center;
}
.person-wx-avatar {
width: 120rpx;
min-width: 120rpx;
height: 120rpx;
margin-right: 42rpx;
border-radius: 16rpx;
}
.person-wx-user-detail {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 540rpx;
}
.person-wx-nikename {
font-size: 36rpx;
font-weight: bold;
display: flex;flex-direction: row;align-items: center;
}
.person-wx-nikename .text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 480rpx;
}
.person-wx-name {
color: #666;
font-size: 28rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.person-wx-fcode{
width: 46rpx;
height: 46rpx;
margin-left: auto;
margin-right: 40rpx;
}
.person-wx-right{
}
.person-wx-nikename-icon.nan{
color: #007AFF;
}
.person-wx-nikename-icon.nv{
color: #FF5A5F;
}
.person-wx-nikename-icon{
margin-right: auto;
}
</style>

View File

@@ -1,121 +0,0 @@
<template>
<view>
<watermark></watermark>
<form @submit="subform" class="remarkForm">
<view class="remarkForm-item">
<view class="remarkForm-label">备注</view>
<input class="remarkForm-input" placeholder="添加备注" type="text" v-model="form.remark" />
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
form: {
remark: '',
userId: ''
}
};
},
computed: {
chatListInfo() {
return this.$store.state.chatlist[this.form.userId];
}
},
onLoad(e) {
this.form.userId = e.userId;
this.form.remark = e.remark;
},
methods: {
subform(e) {
var rules = {
remark: {
rules: [
{
checkType: 'required',
errorMsg: '请填写内容'
}
]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/friend/remark',
method: 'POST',
data: JSON.stringify(formData),
success: res => {
if (res.data.code == 200) {
this.chatListInfo.nickName = this.form.remark;
var ChatData=JSON.parse(JSON.stringify(this.$store.state.chatDatalist[this.form.userId]))
ChatData.fromInfo.nickName=this.form.remark
this.$store.dispatch('updateChatObjById', {
userId: this.form.userId,
data: ChatData
})
this.$store.dispatch('updateChatListInfoById', { userId: this.form.userId, data: this.chatListInfo });
uni.navigateBack({
delta: 1
}).then(() => {
uni.showToast({
title: '备注成功',
icon: 'success'
});
});
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: 'none',
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform();
break;
default:
break;
}
}
};
</script>
<style scoped lang="scss">
.remarkForm {
padding: 24rpx 44rpx;
display: flex;
flex-direction: column;
}
.remarkForm-item {
display: flex;
flex-direction: column;
margin-bottom: 24rpx;
}
.remarkForm-textarea {
width: 100%;
line-height: 48rpx;
min-height: 240rpx;
}
.remarkForm-label {
font-size: 26rpx;
color: #5c5c5c;
margin-bottom: 15rpx;
}
.remarkForm-input {
border-radius: 12rpx;
background-color: #f7f7f7;
height: 110rpx;
line-height: 110rpx;
padding: 0 34rpx;
}
</style>

View File

@@ -1,382 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<view class="person-wx" v-if="detail">
<view class="person-wx-user">
<image class="person-wx-avatar" @click="$fc.previewImagesolo(detail.portrait)" :src="detail.portrait" mode="aspectFill"></image>
<view class="person-wx-user-detail">
<view class="person-wx-nikename">
<text class="text">{{detail.nickName}}</text>
<view class="wxfont person-wx-nikename-icon" :class="{'nv':detail.gender=='0'}" v-if="detail.gender=='0'"></view>
<view class="wxfont person-wx-nikename-icon" :class="{'nan':detail.gender=='1'}" v-if="detail.gender=='1'"></view>
</view>
<text class="person-wx-name">
微聊号{{detail.chatNo}}
</text>
<text class="person-wx-name" v-if="detail.provinces">地区{{detail.provinces}} {{detail.city}}</text>
</view>
</view>
</view>
<tool-list-wx :list="list2" @itemClick="itemClick2"></tool-list-wx>
<tool-list-wx :list="list3" v-if="detail.isFriend=='Y'" type="btns" @itemClick="itemClick"></tool-list-wx>
<tool-list-wx :list="list4" v-if="detail.isFriend=='N'" type="btns" @itemClick="itemClick4"></tool-list-wx>
</view>
</template>
<script>
// #ifdef APP-PLUS
const TUICalling = uni.requireNativePlugin("TUICallingUniPlugin-TUICallingModule");
// #endif
export default {
data() {
return {
type:'',
detail:'',
param:'',
list2: [{
title: '来源',
path: '#',
else: [{
type: 'text',
content: ''
}],
hideRight:true
},{
title: '朋友圈',
path: '#'
}],
list3: [{
title: '发消息',
path: '#',
icon: 'faxiaoxi'
},{
title: '音视频通话',
path: '#',
icon: 'shipin'
}],
list4: [{
title: '添加到通讯录',
path: '#'
}],
source:'',
showtitleNViewBtns:false
}
},
onLoad(e) {
this.param=e.param
this.source=e.source
},
onShow(){
this.getUserInfo(this.param)
},
mounted() {
this.$fc.setTitleNViewBtns(0,'')
},
methods: {
getUserInfo(e){//好友详情
this.$http.request({
url: '/friend/info/'+e,
success: (res) => {
if (res.data.code == 200) {
this.detail=res.data.data
if(this.detail.userType!=='normal'||this.detail.isFriend=='N'){
this.showtitleNViewBtns=false
this.list3.splice(1,1)
this.list2.splice(1,1)
}else{
this.showtitleNViewBtns=true
this.$fc.setTitleNViewBtns(0,'\ue623')
}
if(this.detail.userType=='self'){
this.list2.push({
title: '朋友圈',
path: '#'
})
}
if(this.detail.sourceLabel){
if(!this.source){
this.source=this.detail.source
}
this.list2[0].else[0].content=this.detail.sourceLabel
} else if(this.source){
var text=''
switch (this.source){
case '1':
text='扫一扫'
break;
case '2':
text='名片'
break;
case '3':
text='微聊号'
break;
case '4':
text='手机号'
break;
case '5':
text='摇一摇'
break;
case '6':
text='系统'
break;
case '7':
text='群聊'
break;
case '8':
text='附近的人'
break;
default:
break;
}
this.list2[0].else[0].content=text
}else{
this.list2[0].else[0].content='无'
}
}
}
});
},
itemClick2(e,i){
switch (i){
case 1:
uni.navigateTo({
url:'../../wx/friendsCircle/person?userId='+this.detail.userId
})
break;
default:
break;
}
},
itemClick4(e,i){
switch (i){
case 0:
uni.navigateTo({
url:'../search-friends/add?userId='+this.detail.userId+'&source='+this.source
})
break;
default:
break;
}
},
itemClick(e,i){
switch (i){
case 0:
uni.navigateTo({
url:'../chatWindow/index?userId='+this.detail.userId+'&windowType=SINGLE'
})
break;
case 1:
uni.showActionSheet({
itemList: ['视频通话','语音通话'],
success: (res) => {
switch (res.tapIndex){
case 0:
this.sendVideoCall()
break;
case 1:
this.sendVoiceCall()
break;
default:
break;
}
}
});
break;
default:
break;
}
},
sendVoiceCall(){
//发起语音
uni.showLoading({
title:'发起语音通话'
})
var formdata={
userId: this.detail.userId,
msgType: "TRTC_VOICE_START",
content: "TRTC_VOICE_START"
}
this.$http.request({
url: '/chat/sendMsg',
method: 'POST',
data: JSON.stringify(formdata),
success: (res) => {
if(res.data.code=='200'){
if(res.data.data.status!=='0'){
uni.showToast({
title:res.data.data.statusLabel,
icon:'none'
})
return
}
var userInfo=res.data.data.userInfo
var data={
userId:userInfo.userId,
trtcId:userInfo.trtcId,
nickName:userInfo.nickName,
portrait:userInfo.portrait,
startTime:new Date().getTime(),
type:'audio'
}
uni.setStorage({
key: 'call',
data: JSON.stringify(data),
success: function () {
console.log('success');
TUICalling.call({
userID: userInfo.trtcId,
type: 1
})
}
});
}
}
});
},
sendVideoCall(){
//发起视频
uni.showLoading({
title:'发起视频通话'
})
var formdata={
userId: this.detail.userId,
msgType: "TRTC_VIDEO_START",
content: "TRTC_VIDEO_START"
}
this.$http.request({
url: '/chat/sendMsg',
method: 'POST',
data: JSON.stringify(formdata),
success: (res) => {
if(res.data.code=='200'){
if(res.data.data.status!=='0'){
uni.showToast({
title:res.data.data.statusLabel,
icon:'none'
})
return
}
var userInfo=res.data.data.userInfo
var data={
userId:userInfo.userId,
trtcId:userInfo.trtcId,
nickName:userInfo.nickName,
portrait:userInfo.portrait,
startTime:new Date().getTime(),
type:'video'
}
uni.setStorage({
key: 'call',
data: JSON.stringify(data),
success: function () {
console.log('success');
TUICalling.call({
userID: userInfo.trtcId,
type: 2
})
}
});
}
}
});
}
},
onNavigationBarButtonTap(e) {
if(!this.showtitleNViewBtns){
return
}
switch (e.index) {
case 0:
uni.navigateTo({
url:'edit?data='+ encodeURIComponent(JSON.stringify(this.detail))
})
break;
default:
break;
}
}
}
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.person-wx {
background-color: #fff;
padding:44rpx 24rpx;
padding-right: 24rpx;
border-bottom: 1px #eee solid;
}
.person-wx-user {
display: flex;
flex-direction: row;
align-items: center;
}
.person-wx-avatar {
width: 120rpx;
min-width: 120rpx;
height: 120rpx;
margin-right: 42rpx;
border-radius: 16rpx;
}
.person-wx-user-detail {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 540rpx;
}
.person-wx-nikename {
font-size: 36rpx;
font-weight: bold;
display: flex;flex-direction: row;align-items: center;
}
.person-wx-nikename .text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 480rpx;
}
.person-wx-name {
color: #666;
font-size: 28rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.person-wx-fcode{
width: 46rpx;
height: 46rpx;
margin-left: auto;
margin-right: 40rpx;
}
.person-wx-right{
}
.person-wx-nikename-icon.nan{
color: #007AFF;
}
.person-wx-nikename-icon.nv{
color: #FF5A5F;
}
.person-wx-nikename-icon{
margin-right: auto;
}
</style>

View File

@@ -1,194 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<!-- <tool-list-wx :list="list1" @itemClick="itemClick1"></tool-list-wx> -->
<tool-list-wx :list="list2" @itemClick="itemClick2"></tool-list-wx>
<view class="xw-tool-list">
<view class="xw-tool-list-content">
<view class="xw-tool-item">
<text class="xw-tool-text">加入黑名单</text>
<switch color="#05C160" :checked="Baned" @change="heifangfangChange" style="transform:scale(0.75);" />
</view>
</view>
</view>
<view class="xw-tool-list">
<view class="xw-tool-list-content">
<view class="xw-tool-btn-item" @click="deleteFriend">
<view class="xw-tool-btn-text" style="color: #FF5A5F;">删除</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail:'',
list1: [{
title: '把他推荐给朋友',
path: '#'
}],
list2: [{
title: '设置备注和标签',
path: '#'
}],
}
},
onLoad(e) {
var stringdata=decodeURIComponent(e.data)
// #ifndef MP-WEIXIN
e.data=e.data.replace(/%/g, '%25')
// #endif
var data = JSON.parse(stringdata)
this.detail=data
},
computed:{
Baned(){
return this.detail.black=='Y' ? true : false
},
chatList() {
return this.$store.state.chatlist
}
},
onShow(){},
methods: {
itemClick2(e,i){
switch (i){
case 0:
uni.navigateTo({
url:'beizhu?userId='+this.detail.userId+'&remark='+this.detail.nickName
})
break;
default:
break;
}
},
heifangfangChange(e){
var yn=e.detail.value ? 'Y' : 'N'
var ynText=e.detail.value ? '已加入黑名单' : '已移除黑名单'
this.$http.request({
url: '/friend/black',
method: 'POST',
data:JSON.stringify({
userId:this.detail.userId,
black:yn
}),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title:ynText,
icon:'none'
})
}
}
});
},
deleteFriend(){
uni.showModal({
title: '提醒',
content: '是否确认删除好友',
success: (res)=> {
if (res.confirm) {
this.$http.request({
url: '/friend/delFriend',
method: 'POST',
data:JSON.stringify({
userId:this.detail.userId
}),
success: (res) => {
if (res.data.code == 200) {
delete this.chatList[this.detail.userId]
this.$store.dispatch('updateChatListInfoById',{
userId: this.detail.userId,
data: {}
});
this.$store.dispatch('updateChatById', {
userId: this.detail.userId,
data: []
});
uni.showToast({
title:'删除成功',
icon:'none'
}).then(()=>{
uni.navigateBack({
delta:3
})
})
}
}
});
} else if (res.cancel) {
}
}
});
},
itemClick1(e,i){
switch (i){
case 0:
uni.showToast({
title:'把他推荐给朋友',
icon:'none'
})
break;
default:
break;
}
},
},
}
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.xw-tool-list {
display: flex;
flex-direction: column;
background-color: #ffffff;
margin-bottom: 18rpx;
}
.xw-tool-item {
display: flex;
flex-direction: row;
align-items: center;
padding: 26rpx 24rpx;
border-bottom: 1px #eee solid;
}
.xw-tool-item:nth-last-child(1) {
border: none;
}
.xw-tool-text {
margin-right: auto;
}
.xw-tool-btn-item{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 34rpx 44rpx;
border-bottom: 1px #eee solid;
font-weight: bold;
color: #5F698C;
}
</style>

View File

@@ -1,255 +0,0 @@
<template>
<view class="wx-login">
<watermark></watermark>
<view class="wx-login-title">手机号注册</view>
<view class="xw-login-form">
<form @submit="sublogin">
<view class="xw-login-form-item">
<view class="xw-login-form-label">手机号</view>
<input class="xw-login-form-input" maxlength="11" placeholder="请填写手机号" type="text" name="userName" v-model="userName" />
<view class="login-form-icon login-form-seepass" @click="userName=''" v-if="userName.length>0">
<uni-icons type="clear" size="26" color="#B9CCE0"></uni-icons>
</view>
</view>
<view class="xw-login-form-item">
<view class="xw-login-form-label">密码</view>
<input class="xw-login-form-input" placeholder="请输入密码" name="password" :password="showPassword"
type="text" value="" />
<view class="login-form-icon login-form-seepass" @click="changePassword">
<image src="../../static/img/l03.png" mode="aspectFill" v-if="showPassword"></image>
<image src="../../static/img/l04.png" mode="aspectFill" v-else></image>
</view>
</view>
<view class="xw-login-form-item">
<view class="xw-login-form-label">昵称</view>
<input class="xw-login-form-input" placeholder="请输入你的昵称" type="text" name="nickName" value="" />
</view>
<text class="xw-login-form-code" @click="goLogin">已注册去登录</text>
<button class="wx-btn wx-btn-info xw-login-form-btn" form-type="submit">注册</button>
<view class="login-agree">
<view class="login-agree-checkd" @click="agree = !agree">
<label for="agree">
<checkbox id="agree" style="transform:scale(0.7)" :checked="agree" />
<text class="login-agree-btn">已阅读并同意</text>
</label>
</view>
<view class="login-agree-text" @click="goagreement()">隐私及服务协议</view>
</view>
</form>
</view>
</view>
</template>
<script>
export default {
data() {
return {
code:'',
loading: false,
timer: null,
time: 60,
logintype: 0,
userName: '',
cid: '',
showPassword: true,
agree: false,
}
},
onLoad() {
},
methods: {
changePassword() {
this.showPassword = !this.showPassword;
},
goLogin(){
uni.navigateTo({
url: '../login/index'
})
},
goagreement() {
// uni.navigateTo({//本地协议
// url: '../../pages/agreement/index?name=微聊'
// })
this.$http.request({//在线协议
url: '/common/getAgreement',
success: (res) => {
if (res.data.code == 200) {
// #ifdef H5
window.open(res.data.data)
// #endif
// #ifdef APP-PLUS
this.$fc.openWebView(res.data.data)
// #endif
}
}
});
},
rMathfloor(min, max) { //返回包括最大/小值
return Math.floor(Math.random() * (max - min + 1)) + min
},
sublogin(e) {
var rules = {
password: {
rules: [{
checkType: "required",
errorMsg: "请输入密码"
}, {
checkType: "string",
checkRule: "4,6",
errorMsg: "密码至少输入4-6位"
}]
},
nickName: {
rules: [{
checkType: "required",
errorMsg: "请输入昵称"
}, {
checkType: "string",
checkRule: "1,20",
errorMsg: "昵称至少输入1-20位"
}]
}
};
var formData = e.detail.value;
var checkRes = this.$zmmFormCheck.check(formData, rules);
formData.password=formData.password
formData.registerType=1
console.log(formData)
if (checkRes) {
// if (!this.agree) {
// uni.showToast({
// title: '请先同意《隐私及服务协议》',
// icon: 'none'
// });
// return;
// }
this.$http.request({
url: '/v1/register',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title:'注册成功',
complete() {
setTimeout(()=>{
uni.redirectTo({
url:'/wx/login/index'
})
},1500)
}
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
},
}
}
</script>
<style lang="scss" scoped>
.wx-login-title {
text-align: center;
padding-top: 120rpx;
font-size: 42rpx;
padding-bottom: 24rpx;
}
.xw-login-form {
padding: 34rpx;
}
.xw-login-form-item {
position: relative;
padding: 0 12rpx;
border-bottom: 1px #eee solid;
display: flex;
flex-direction: row;
align-items: center;
line-height: 100rpx;
height: 100rpx;
}
.xw-login-form-label {
width: 160rpx;
min-width: 160rpx;
}
.xw-login-form-input {}
.login-agree {
margin-top: 34rpx;
justify-content: center;
display: flex;
flex-direction: row;
align-items: center;
}
.login-agree-text,
.login-agree-btn {
font-size: 24rpx;
color: #222;
}
.login-agree-text {
color: #8295a5;
}
.login-form-icon {
width: 50rpx;
height: 50rpx;
}
.login-form-seepass {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.login-form-icon image {
float: left;
width: 50rpx;
height: 50rpx;
}
.xw-login-form-code {
padding: 0 12rpx;
height: 100rpx;
line-height: 100rpx;
color: #8295a5;
}
.wx-btn {
min-width: 200rpx;
height: 75rpx;
line-height: 75rpx;
text-align: center;
border-radius: 12rpx;
background-color: #007AFF;
color: #fff;
font-size: 32rpx;
}
.wx-btn-info {
background-color: #05C160;
}
.xw-login-form-btn {
width: 300rpx;
margin-top: 120rpx;
}
</style>

View File

@@ -1,113 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<view class="search-friends-send">
<form @submit="subform">
<view class="search-friends-send-title">你需要发送验证消息等对方通过</view>
<view class="search-friends-send-item">
<textarea class="search-friends-send-textarea" auto-height placeholder="请输入验证信息..." maxlength="200" v-model="form.reason"></textarea>
</view>
</form>
</view>
</view>
</template>
<script>
export default {
data() {
return {
form:{
userId:'',
source:'',
reason:''
}
};
},
onLoad(e) {
this.form.userId=e.userId
this.form.source=e.source
},
methods: {
subform(e) {
var rules = {
content: {
reason: [{
checkType: "required",
errorMsg: "请填写验证内容"
}]
}
};
var formData = JSON.parse(JSON.stringify(this.form));
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
this.$http.request({
url: '/apply/add',
method: 'POST',
data:JSON.stringify(formData),
success: (res) => {
if (res.data.code == 200) {
uni.navigateBack({
delta:1
}).then(()=>{
uni.showToast({
title: '发送成功',
icon: "none",
});
})
}
}
});
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
};
</script>
<style scoped lang="scss">
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.search-friends-send{
}
.search-friends-send-item{
padding: 24rpx;
margin-bottom: 24rpx;
background-color: #fff;
}
.search-friends-send-textarea{
width: 100%;
min-height: 50rpx;
}
.search-friends-send-title{
padding:12rpx 24rpx;
color: #999;font-size: 24rpx;
}
</style>

View File

@@ -1,247 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<view class="search-friends">
<form @submit="subform">
<input class="search-friends-input" placeholder="请填写微聊号/手机号" v-model="form.param" type="text" />
</form>
<view class="search-friends-list-title" v-if="list.length>0">历史</view>
<view class="search-friends-list">
<view class="search-friends-list-item" v-for="(v,i) in list" :key="i">
<image class="search-friends-list-img" :src="v.portrait" mode="aspectFill" @click="godetail(v)"></image>
<view class="search-friends-list-user" @click="godetail(v)">
<view class="search-friends-list-username">{{v.nickName}}</view>
<view class="search-friends-list-remark">{{v.reason}}</view>
</view>
<view class="search-friends-list-btns">
<view class="search-friends-list-btn-text">
<view v-if="v.applyStatus=='0'" class="search-friends-list-btn btn1" @click="agreeApply(v.applyId)">接受</view>
<text v-if="v.applyStatus=='1'">已同意</text>
<text v-if="v.applyStatus=='2'">已拒绝</text>
<text v-if="v.applyStatus=='3'">已忽略</text>
</view>
</view>
</view>
</view>
</view>
<uni-load-more v-show="list.length>9" :status="queryParams.status"></uni-load-more>
</view>
</template>
<script>
export default {
data() {
return {
queryParams: {
refreshing: false,
status: 'more',
pageNum: 1,
pageSize: 10
},
form:{
param:''
},
list:[]
};
},
computed: {},
onLoad() {
},
onShow() {
this.queryParams.refreshing=true
this.applyList()
},
methods: {
godetail(e){
uni.navigateTo({
url:'../personInfo/addFriendsDetail?param='+e.applyId+'&type=2'
})
},
agreeApply(e){
this.$http.request({
url: '/apply/agree',
method: 'POST',
data:JSON.stringify({applyId:e}),
success: (res) => {
if (res.data.code == 200) {
uni.showToast({
title:'已同意',
icon:'none'
})
this.queryParams.refreshing=true
this.applyList()
}
}
});
},
applyList(){
this.queryParams.status='loading'
this.$fc.loadMore({
url: '/apply/list?',
queryParams: this.queryParams
}).then(res => {
this.$store.commit('update_friendApply',{})
uni.removeStorageSync('friendApply');
this.queryParams = res.queryParams;
if (res.status=='3') {
this.list=[]
return
}
if (res.status=='0') {
return
}
var rows = res.list;
var list = [];
for (var i = 0; i < rows.length; i++) {
var item = rows[i];
list.push(item);
}
if (res.status=='2') {
this.list = list;
}
if (res.status=='1') {
this.list = this.list.concat(list);
}
});
},
subform(e) {
var rules = {
param: {
rules: [{
checkType: "required",
errorMsg: "请填写微聊号/手机号"
}]
}
};
var formData = this.form;
var checkRes = this.$zmmFormCheck.check(formData, rules);
if (checkRes) {
uni.navigateTo({
url:'../personInfo/addFriendsDetail?param='+this.form.param+'&type=1'
})
} else {
uni.showToast({
title: this.$zmmFormCheck.error,
icon: "none",
position: 'bottom'
});
}
},
},
onPullDownRefresh() {
this.queryParams.refreshing=true
this.applyList();
},
onReachBottom() {
this.applyList();
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0:
this.subform()
break;
default:
break;
}
},
}
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.search-friends{
display: flex;
flex-direction: column;
}
.search-friends-input{
margin:20rpx 24rpx;
margin-bottom: 0;
height: 70rpx;
line-height: 70rpx;
text-align: center;
background-color: #fff;
border-radius: 24rpx;
}
.search-friends-list{
background-color: #fff;
display: flex;flex-direction: column;
}
.search-friends-list-item{
padding:0 24rpx;
display: flex;flex-direction: row;align-items: center;
}
.search-friends-list-user{
flex: 1;
padding: 24rpx;
border-bottom: 1px #eee solid;
max-width: 470rpx;
}
.search-friends-list-username{
font-size: 32rpx;
color: #333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.search-friends-list-title{
font-size: 28rpx;
color: #666;
margin: 24rpx;
}
.search-friends-list-remark{
font-size: 27rpx;
color: #999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 12rpx;
}
.search-friends-list-item:nth-last-child(1) .search-friends-list-user{
border: none;
}
.search-friends-list-img{
min-width: 90rpx;
width: 90rpx;
height: 90rpx;
border-radius: 10rpx;
}
.search-friends-list-btns{
margin-left: auto;
}
.search-friends-list-btn{
text-align: center;
border-radius: 12rpx;
padding: 8rpx 12rpx;
}
.search-friends-list-btn-text{
color: #999;
font-size: 28rpx;
}
.search-friends-list-btn.btn1{
background-color: #1BC418;
color: #fff;
}
.search-friends-list-btn.btn2{
background-color: #c4c4c4;
color: #fff;
}
.search-friends-list-btn.btn3{
background-color: #ff6767;
color: #fff;
}
</style>

View File

@@ -1,126 +0,0 @@
<template>
<view>
<watermark></watermark>
<zy-search :inputPlaceholder="inputPlaceholder" :inputHeight="inputHeight" :isFocus="isFocus" :theme="theme"
:callbackTime="callbacktime" :autoComplaylist="autoComplaylist" :hotList="hotList" :historyNum="historyNum"
:speechEngine="speechEngine" :Punctuation="Punctuation" @clickSearch="clickearch" @tagsClick="tagsclick"
@delhHistory="delhistory" @inputChange="inputchange" v-model="searchinput"></zy-search>
<view class="search-friends-list">
<view class="search-friends-list-item" v-for="(v,i) in list" :key="i">
<image class="search-friends-list-img" :src="v.portrait" mode="aspectFill" @click="godetail(v)"></image>
<view class="search-friends-list-user" @click="godetail(v)">
<view class="search-friends-list-username">{{v.nickName}}</view>
<view class="search-friends-list-remark">{{v.chatNo}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list:[],
autoComplaylist: [], //可以调百度淘宝和自己的接口
hotList: [], //推荐列表
historyNum: 4, //历史记录保存数量
inputPlaceholder: '输入好友名称', //默认提示语
inputHeight: 40, //input高度
theme: 'good-search-circle', //主题
speechEngine: 'iFly', //语音识别引擎
Punctuation: false, //是否开启语音识别标点符号
callbacktime: 500, //input回调缓冲时间(不返回500毫秒以内输入的数据防止每输入一个值就会触发一次)
isFocus: true, //是否自动获取焦点
urlList:[],
searchinput:''
};
},
computed: {},
onLoad() {},
methods: {
godetail(e){
uni.navigateTo({
url:'../../wx/personInfo/detail?param='+e.userId
})
},
clickearch(e) { //点击搜索回调
this.getflist(e.trim())
},
getflist(e){
this.$http.request({
url: '/friend/friendList',
method: 'POST',
data:JSON.stringify({
param:e
}),
success: (res) => {
if (res.data.code == 200) {
var data=res.data.data
var list=[]
for (var i = 0; i < data.length; i++) {
var item=data[i]
list.push(item)
}
this.list=list
}
}
});
},
tagsclick(e) { //点击标签回调
console.log(e)
},
delhistory() { //清除按钮回调
},
inputchange(e) { //input实时回调(可以用来调自动联想词接口)
},
}
}
</script>
<style scoped>
.search-friends-list{
background-color: #fff;
display: flex;flex-direction: column;
}
.search-friends-list-item{
padding:0 24rpx;
display: flex;flex-direction: row;align-items: center;
}
.search-friends-list-user{
flex: 1;
padding: 24rpx;
border-bottom: 1px #eee solid;
max-width: 470rpx;
}
.search-friends-list-username{
font-size: 32rpx;
color: #333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.search-friends-list-title{
font-size: 28rpx;
color: #666;
margin: 24rpx;
}
.search-friends-list-remark{
font-size: 27rpx;
color: #999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 12rpx;
}
.search-friends-list-item:nth-last-child(1) .search-friends-list-user{
border: none;
}
.search-friends-list-img{
min-width: 90rpx;
width: 90rpx;
height: 90rpx;
border-radius: 10rpx;
}
</style>

View File

@@ -1,202 +0,0 @@
<template>
<view class="wxshake">
<watermark></watermark>
<view class="wxshake-box">
<image class="wxshake-img" src="../../static/wx/y01.png" mode="aspectFill"></image>
<view class="wxshake-open-box" :class="{'wxshake-open':show}">
<image class="wxshake-open-img" src="../../static/wx/y03.png" mode="aspectFill"></image>
<text class="wxshake-open-text">正在搜寻统一时刻摇晃手机的人</text>
</view>
<image class="wxshake-img" src="../../static/wx/y02.png" mode="aspectFill"></image>
</view>
<view class="wxshake-card" v-if="showCard" @click="goAddfriend(detail)">
<view class="person-wx-user">
<image class="person-wx-avatar" @click="$fc.previewImagesolo(detail.portrait)" :src="detail.portrait" mode="aspectFill"></image>
<view class="person-wx-user-detail">
<view class="person-wx-nikename">
<text class="text">{{detail.nickName}}</text>
<view class="wxfont person-wx-nikename-icon" :class="{'nv':detail.gender=='0'}" v-if="detail.gender=='0'"></view>
<view class="wxfont person-wx-nikename-icon" :class="{'nan':detail.gender=='1'}" v-if="detail.gender=='1'"></view>
</view>
<text class="person-wx-name">
相距{{detail.distance}}{{detail.distanceUnit}}
</text>
</view>
<uni-icons class="xw-tool-right" type="right" size="18" color="#b5b5b5"></uni-icons>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
isOpened: false,
showCard:false,
detail:''
}
},
onLoad: function () {
this.music = uni.createInnerAudioContext();
this.music.src = '../../static/shake.wav';
uni.startAccelerometer();
uni.onAccelerometerChange((res) => {
if(this.show){
return
}
if (Math.abs(res.x) + Math.abs(res.y) + Math.abs(res.z) > 20 && !this.show && this.isOpened) {
this.music.play();
this.showCard=false;
this.show = true;
uni.getLocation({
type: 'wgs84',
success: (resLocation)=> {
this.$http.request({
url: '/shake/doShake',
method: 'POST',
data:JSON.stringify({
longitude:resLocation.longitude,
latitude:resLocation.latitude
}),
success: (res) => {
if (res.data.code == 200) {
this.detail=res.data.data
setTimeout(() => {
this.showCard=true
}, 400)
}
}
});
},
fail: (error) => {
uni.showToast({
title:'请检查定位是否开启',
icon:'none',
position:'bottom'
})
console.log(error.errMsg)
},
complete: (res) => {
setTimeout(() => {
this.show = false;
}, 300)
}
});
}
})
},
onShow() {
this.isOpened = true;
},
onUnload() {
this.show = false;
this.isOpened = false;
uni.stopAccelerometer();
this.music.destroy();
},
methods:{
goAddfriend(e){
uni.navigateTo({
url:'../personInfo/detail?param='+e.userId+'&source=5'
})
}
}
}
</script>
<style scoped>
.wxshake{
background-color: #212121;
width: 100vw;
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
flex-wrap: wrap;
}
.wxshake-box{
display: flex;flex-direction: column;
justify-content: center;align-items: center;
}
.wxshake-img{
width: 200rpx;
height: 100rpx;
}
.wxshake-open-box{
box-sizing: border-box;
height: 0;
overflow: hidden;
transition: all 0.3s linear;
width: 750rpx;
background-color: #2F2F2F;
display: flex;flex-direction: column;justify-content: center;align-items: center;
}
.wxshake-open{
height: 360rpx;
}
.wxshake-open-img{
width: 150rpx;
height: 150rpx;
}
.wxshake-open-text{
font-size: 26rpx;
color: #A6A6A6;
}
.wxshake-card{
margin:0 50rpx;
margin-top: 200rpx;
padding: 24rpx;
background-color: #4C4C4C;
border-radius: 12rpx;
}
.person-wx-user {
display: flex;
flex-direction: row;
align-items: center;
}
.person-wx-avatar {
width: 120rpx;
min-width: 120rpx;
height: 120rpx;
margin-right: 42rpx;
border-radius: 16rpx;
}
.person-wx-user-detail {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 400rpx;
}
.person-wx-nikename {
color: #e7e7e7;
font-size: 36rpx;
display: flex;flex-direction: row;align-items: center;
}
.person-wx-nikename .text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 480rpx;
}
.person-wx-name {
color: #B2B2B2;
font-size: 28rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.person-wx-nikename-icon.nan{
color: #007AFF;
}
.person-wx-nikename-icon.nv{
color: #FF5A5F;
}
.person-wx-nikename-icon{
margin-right: auto;
}
</style>

View File

@@ -1,280 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<tool-list-wx :list="list2" @onlongpress="onlongpress" @itemClick="itemClick0"></tool-list-wx>
<tool-list-wx :list="list3" @itemClick="itemClick"></tool-list-wx>
<tool-list-wx :list="list4" @itemClick="itemClick2"></tool-list-wx>
<view class="xw-tool-list">
<view class="xw-tool-list-content">
<view class="xw-tool-btn-item" @click="loginOut">
<view class="xw-tool-btn-text" style="color: #FF5A5F;">退出登录</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
versionName
} from '@/manifest.json'
// #ifdef APP-PLUS
import appUpgrade from '@/common/appUpgrade.js';
const TUICalling = uni.requireNativePlugin("TUICallingUniPlugin-TUICallingModule");
// #endif
export default {
data() {
return {
version:versionName,
list2:[{
title: '建议反馈',
path: '../feedback/index'
},{
title: '隐私及服务协议',
path: '#'
},{
title: '关于',
path: '#',
hideRight:true,
else:[{
type: 'text',
content: '微聊 v'+versionName
}]
},{
title: '开源',
path: '#',
hideRight:true,
else:[{
type: 'text',
content: '考拉开源学习请加Q群535099683'
}]
}],
list3:[{
title: '修改密码',
path: '#'
}],
list4:[{
title: '清空聊天记录',
path: '#'
}],
}
},
computed: {
userinfo() {
return this.$store.state.userInfo
}
},
onLoad() {
console.log()
},
methods: {
copyText(e){
uni.setClipboardData({
data: e,
success: function() {
uni.showToast({
title: 'QQ群号复制成功',
icon: 'none',
position: 'bottom'
})
}
});
},
goagreement() {
// uni.navigateTo({//本地协议
// url: '../../pages/agreement/index?name=微聊'
// })
this.$http.request({//在线协议
url: '/common/getAgreement',
success: (res) => {
if (res.data.code == 200) {
// #ifdef H5
window.open(res.data.data)
// #endif
// #ifdef APP-PLUS
this.$fc.openWebView(res.data.data)
// #endif
}
}
});
},
onlongpress(e,i){
switch (i){
case 2:
// #ifdef APP-PLUS
//升级检测
this.$http.request({
url: '/common/getVersion',
success: (res) => {
appUpgrade.init({
titleText: '覆盖安装'+res.data.data.version,
packageUrl:res.data.data.url,
content: res.data.data.content,
cancelText:'取消',
confirmText:'安装'
});
appUpgrade.show();
}
});
// #endif
break;
default:
break;
}
},
loginOut(){
uni.reLaunch({
url:'../../pages/wxindex/index'
}).then(res=>{
uni.removeStorageSync('Authorization')
// 退出登录
this.$http.request({
url: '/my/logout',
success: (res) => {}
});
// #ifdef H5
this.$socketTask.socketTaskClose()
// #endif
// #ifdef APP-PLUS
TUICalling.logout((res) => {
console.log(JSON.stringify(res))
})
// #endif
})
},
itemClick0(e,i){
switch (i){
case 1:
this.goagreement()
break;
case 3:
this.copyText('535099683')
break;
case 2:
// #ifdef H5
this.$http.request({
url: '/common/getVersion',
success: (res) => {
if(res.data.data.upgrade=='Y'){
console.log(
`%c 有新版本 `+res.data.data.version,
'background:#007aff ;padding: 1px; border-radius: 0 3px 3px 0; color: #fff; font-weight: bold;'
)
}
}
});
// #endif
// #ifdef APP-PLUS
//升级检测
uni.getSystemInfo({
success: (res)=> {
uni.setStorageSync('device', res.platform);
plus.runtime.getProperty(plus.runtime.appid, (widgetInfo)=> {
uni.setStorageSync('version', widgetInfo.version);
this.$http.request({
url: '/common/getVersion',
success: (res) => {
if(res.data.data.upgrade=='Y'){
appUpgrade.init({
titleText: '版本更新'+res.data.data.version,
packageUrl:res.data.data.url,
content: res.data.data.content,
forceUpgrade:res.data.data.forceUpgrade=='Y' ? true : false
});
appUpgrade.show();
}
}
});
});
}
});
// #endif
break;
default:
break;
}
},
itemClick(e,i){
switch (i){
case 0:
uni.navigateTo({
url:'../personDetail/editPass'
})
break;
default:
break;
}
},
itemClick2(e,i){
switch (i){
case 0:
uni.showModal({
title: '警告',
content: '是否确认清空聊天信息',
success: (res)=> {
if (res.confirm) {
// 不清理的key
var whiteList=['Authorization','device','version']
const res = uni.getStorageInfoSync();
var removeList=res.keys.filter(item=>!whiteList.includes(item))
for (var i = 0; i < removeList.length; i++) {
uni.removeStorageSync(removeList[i]);
}
uni.showToast({
title:'清除成功',
icon:'none'
})
} else if (res.cancel) {
uni.getStorageInfo({
success: function (res) {
console.log(res);
}
});
}
}
});
break;
default:
break;
}
},
}
}
</script>
<style lang="scss" scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.xw-tool-list {
display: flex;
flex-direction: column;
background-color: #ffffff;
margin-bottom: 18rpx;
}
.xw-tool-btn-item{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 34rpx 44rpx;
border-bottom: 1px #eee solid;
font-weight: bold;
color: #5F698C;
}
</style>

View File

@@ -1,269 +0,0 @@
<template>
<view>
<watermark></watermark>
<uni-list-wx>
<uni-list-wx :border="true">
<view class="alertTips" v-if="list.length <= 0">暂无消息,快去联系你的好朋友吧</view>
<template v-for="(v, i) in toplist" :key="i">
<uni-list-chat-wx color="#eeeeee" :itemKey="i" :item="v" @longpressItem="longpressItem"
:longTapItemKey="longTapItemKey" @click="clickChat(v)" clickable :title="v.nickName"
:note="v.content" :time="v.time" badge-positon="left" :badge-text="v.num"></uni-list-chat-wx>
</template>
<template v-for="(v, i) in NOTtoplist" :key="i">
<uni-list-chat-wx color="#fff" :itemKey="i" :item="v" @longpressItem="longpressItem"
:longTapItemKey="longTapItemKey" @click="clickChat(v)" clickable :title="v.nickName"
:note="v.content" :time="v.time" badge-positon="left" :badge-text="v.num"></uni-list-chat-wx>
</template>
</uni-list-wx>
</uni-list-wx>
<top-right-tool-wx ref="trtw"></top-right-tool-wx>
</view>
</template>
<script>
import {
getUrlParam
} from "../../common/utils"
export default {
data() {
return {
longTapItemKey: 0,
tranMsg: '',
list: [],
toplist: [],
NOTtoplist: [],
clickToSubmitSure: null
};
},
computed: {
userInfo() {
return this.$store.state.userInfo;
},
chatlist() {
return this.$store.state.chatlist;
},
chatlistkeys() {
return Object.keys(this.chatlist);
},
chatListNum() {
return this.$store.state.chatListNum;
},
topicReply() {
return this.$store.state.topicReply;
},
friendApply() {
return this.$store.state.friendApply;
}
},
onLoad(options) {
console.log("首页获取到url参数")
console.log(options)
console.log(location.href)
if (options.imUserSign) {
uni.showLoading({
title: "数据加载中...",
mask: true
});
/*
uni.setStorageSync("imUserSign",getUrlParam("imUserSign"))
uni.setStorageSync("im_imUserSign",getUrlParam("imUserSign"))
uni.setStorageSync("userId",getUrlParam("uid"))
uni.setStorageSync("hd_userid",getUrlParam("uid"))
uni.setStorageSync("hd_token",getUrlParam("token"))
uni.setStorageSync("token",getUrlParam("token"))
*/
uni.setStorageSync("imUserSign", options.imUserSign)
uni.setStorageSync("im_imUserSign", options.imUserSign)
uni.setStorageSync("userId", options.uid)
uni.setStorageSync("hd_userid", options.uid)
uni.setStorageSync("hd_token", options.token)
uni.setStorageSync("token", options.token)
const timer = setInterval(() => {
if (uni.getStorageSync("initReady") == 1) {
console.log("==========进入首页 initReady为1开始跳转")
clearInterval(timer)
setTimeout(() => {
uni.hideLoading();
uni.navigateTo({
url: '../chatWindow/index?userId=' + options.tuid +
'&windowType=' + options
.windowType
});
}, 3000)
}
}, 500)
}
// uni.setStorageSync("token",hd_token)
// uni.setStorageSync("userId",hd_userId)
this.clickToSubmitSure = this.$fc.debounce(
e => {
uni.navigateTo({
url: '../chatWindow/index?userId=' + e.userId + '&windowType=' + e.windowType
});
},
1000,
true
);
},
filters: {
contentFilter(value) {
console.warn(value)
return "KKKKK" + value
}
},
watch: {
chatListNum: {
deep: true, //深度监听可见听对象中的元素变化例:obj.id
immediate: false, //在进入页面时第一次绑定值不会立刻执行监听只有数据发生改变才会执行handler中的操作
handler(val) {
//watch事件
if (val > 0) {
uni.setTabBarBadge({
index: 0,
text: val.toString()
});
} else {
uni.removeTabBarBadge({
index: 0
});
}
}
},
topicReply: {
deep: true, //深度监听可见听对象中的元素变化例:obj.id
immediate: false, //在进入页面时第一次绑定值不会立刻执行监听只有数据发生改变才会执行handler中的操作
handler(val) {
//watch事件
if (val.count && val.count > 0) {
uni.setTabBarBadge({
index: 2,
text: val.count.toString()
});
} else {
uni.removeTabBarBadge({
index: 2
});
}
}
},
friendApply: {
deep: true, //深度监听可见听对象中的元素变化例:obj.id
immediate: false, //在进入页面时第一次绑定值不会立刻执行监听只有数据发生改变才会执行handler中的操作
handler(val) {
//watch事件
if (val.count && val.count > 0) {
uni.setTabBarBadge({
index: 1,
text: val.count.toString()
});
} else {
uni.removeTabBarBadge({
index: 1
});
}
}
},
chatlist: {
deep: true, //深度监听可见听对象中的元素变化例:obj.id
immediate: false, //在进入页面时第一次绑定值不会立刻执行监听只有数据发生改变才会执行handler中的操作
handler(val) {
//watch事件
var obj = JSON.parse(JSON.stringify(val));
var newarr = [];
var toplist = [];
var NOTtoplist = [];
for (var k in obj) {
obj[k]['xtime'] = new Date(obj[k]['time']).getTime().toString();
if (obj[k]['userId']) {
newarr.push(obj[k]);
}
if (obj[k]['userId'] && obj[k]['top'] == 'Y') {
toplist.push(obj[k]);
}
if (obj[k]['userId'] && obj[k]['top'] == 'N') {
try {
var _data = JSON.parse(obj[k].content)
if (_data.type == "IMAGE") {
obj[k].content = "【图片】"
} else {
console.error(_data)
}
} catch (e) {
//TODO handle the exception
}
NOTtoplist.push(obj[k]);
}
}
newarr.sort((a, b) => {
return b['xtime'] - a['xtime'];
});
toplist.sort((a, b) => {
return b['xtime'] - a['xtime'];
});
NOTtoplist.sort((a, b) => {
return b['xtime'] - a['xtime'];
});
this.list = newarr;
this.toplist = toplist;
this.NOTtoplist = NOTtoplist;
}
}
},
onShow() {
this.$store.dispatch('tabBarpull');
},
mounted() {
},
methods: {
longpressItem(e, i, v) {
// console.log(e,i,v)
this.longTapItemKey = i;
},
returnAvatar(text) {
var data = JSON.parse(text);
var avatars = [];
for (var i = 0; i < data.length; i++) {
avatars.push({
url: data[i]
});
}
return avatars;
},
clickChat(e) {
this.clickToSubmitSure(e);
}
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0: //更多
this.$refs['trtw'].showTab();
break;
case 1: //搜索
uni.navigateTo({
url: '../search/index'
});
break;
default:
break;
}
}
};
</script>
<style scoped>
.alertTips {
line-height: 80rpx;
background-color: #fcfcfc;
color: #999999;
text-align: center;
font-size: 28rpx;
}
</style>

View File

@@ -1,157 +0,0 @@
<template>
<view class="xw-book">
<watermark></watermark>
<uni-indexed-list-wx :options="list" @click="bindClick"></uni-indexed-list-wx>
<!-- <top-right-tool-wx ref="trtw"></top-right-tool-wx> -->
</view>
</template>
<script>
import customHttp from "@/common/customHttp.js"
export default {
data() {
return {
list: []
}
},
onLoad() {},
onShow() {
this.getflist()
this.$store.dispatch('tabBarpull')
},
methods: {
bindClick(e){
//注释之前的旧代码,直接跳转到里聊天页
/*
uni.navigateTo({
url:'../personInfo/detail?param='+e.item.data.userId
})
*/
uni.navigateTo({
url: '../chatWindow/index?userId=' + e.item.data.userId + '&windowType=' + "SINGLE"
});
},
getflist(){
//TODO 从接口获取
var list=[
{
name:"测试18200702230",
avatar:"https://shudong2022.oss-cn-hangzhou.aliyuncs.com/common/user/logo.png",
userId:"18200702230",
userType:"item.userType",
chatNo:"item.chatNo"
},
{
name:"测试18200000000",
avatar:"https://shudong2022.oss-cn-hangzhou.aliyuncs.com/common/user/logo.png",
userId:"18200000000",
userType:"item.userType",
chatNo:"item.chatNo"
},{
name:"测试18200000001",
avatar:"https://shudong2022.oss-cn-hangzhou.aliyuncs.com/common/user/logo.png",
userId:"18200000001",
userType:"item.userType",
chatNo:"item.chatNo"
},{
name:"测试lld3",
avatar:"https://shudong2022.oss-cn-hangzhou.aliyuncs.com/common/user/logo.png",
userId:"lld3",
userType:"item.userType",
chatNo:"item.chatNo"
}
]
this.list=this.$fc.sortList({list:list,key:'name'})
console.log(customHttp)
console.log("================开始请求通讯录列表")
// 局部修改配置,局部配置优先级高于全局配置
customHttp.customHttp.get('/api/im/app/addressList', {
params: {}, /* 会加在url上 */
header: {}, /* 会与全局header合并如有同名属性局部覆盖全局 */
dataType: 'json',
// 注如果局部custom与全局custom有同名属性则后面的属性会覆盖前面的属性相当于Object.assign(全局,局部)
custom: {target: "znzq"} , // 可以加一些自定义参数在拦截器等地方使用。比如这里我加了一个auth可在拦截器里拿到如果true就传token
}).then(res => {
//userInfo
const userId = uni.getStorageSync("userId")
console.log("=========获取到数据")
console.log(res)
if(res.statusCode==200){
if(res.data.code==200){
var list=[]
res.data.result.records.map((item)=>{
console.log(item)
//在通讯录中过滤掉自己
if(userId!=item.userId){
list.push({
name:item.realname,
avatar:item.portrait,
userId:item.userId,
userType:1,
chatNo:item.userId
})
}
})
this.list=this.$fc.sortList({list:list,key:'name'})
}
}
}).catch(err => {
})
/*
this.$http.request({
url: '/friend/friendList',
method: 'POST',
data:JSON.stringify({}),
success: (res) => {
if (res.data.code == 200) {
var data=res.data.data
var list=[]
for (var i = 0; i < data.length; i++) {
var item=data[i]
list.push({
name:item.nickName,
avatar:item.portrait,
userId:item.userId,
userType:item.userType,
chatNo:item.chatNo
})
}
this.list=this.$fc.sortList({list:list,key:'name'})
}
}
});
*/
},
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0: //更多
this.$refs['trtw'].showTab();
break;
case 1: //搜索
uni.navigateTo({
url: '../search/index'
});
break;
default:
break;
}
},
}
</script>
<style scoped>
</style>

View File

@@ -1,154 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<tool-list-wx :list="list"></tool-list-wx>
<tool-list-wx :list="list3"></tool-list-wx>
<tool-list-wx :list="list2" @itemClick="itemClick2"></tool-list-wx>
<tool-list-wx :list="list4"></tool-list-wx>
<tool-list-wx :list="list6"></tool-list-wx>
<!-- <tool-list-wx :list="list7"></tool-list-wx> -->
<top-right-tool-wx ref="trtw"></top-right-tool-wx>
</view>
</template>
<script>
export default {
data() {
return {
list3:[{
title: '视频号(未开通)',
path:'',
icon: '../../static/wx/t03.png',
else: [{
type: 'dotimg',
content: '../../static/img/avatar/avatar2.jpg'
}, {
type: 'text',
content: '两个朋友赞过'
}]
},{
title: '直播(未开通)',
path:'',
icon: '../../static/wx/t11.png',
else: [{
type: 'dotimg',
content: '../../static/img/avatar/avatar2.jpg'
}, {
type: 'text',
content: '直播中'
}]
}],
list2:[{
title: '扫一扫',
path:'#',
icon: '../../static/wx/t02.png',
else: []
},{
title: '摇一摇',
path:'../../wx/shake/index',
icon: '../../static/wx/t12.png',
else: []
},{
title: '附近',
path:'../../wx/nearby/index',
icon: '../../static/wx/t15.png',
else: []
}],
list4:[{
title: '看一看(未开通)',
path:'',
icon: '../../static/wx/t13.png',
else: []
},{
title: '搜一搜(未开通)',
path:'',
icon: '../../static/wx/t14.png',
else: []
}],
list6:[{
title: '购物(未开通)',
path:'',
icon: '../../static/wx/t16.png',
else: []
},{
title: '游戏(未开通)',
path:'',
icon: '../../static/wx/t17.png',
else: []
}],
list7:[{
title: '小程序(未开通)',
path:'',
icon: '../../static/wx/t18.png',
else: []
}]
}
},
onShow(){
this.$store.dispatch('tabBarpull')
},
computed:{
list(){
return [{
title: '朋友圈',
type:this.$store.state.topicReply.count ? 'dottext' : '',
path:'../../wx/friendsCircle/index',
icon: '../../static/wx/t01.png',
else: [{
type: this.$store.state.topicRed.portrait ? 'dotimg' : '',
content: this.$store.state.topicRed.portrait ? this.$store.state.topicRed.portrait : ''
}]
}]
},
topicRed() {
return this.$store.state.topicRed
}
},
onLoad() {},
methods: {
itemClick2(e,i){
switch (i){
case 0:
this.$fc.saoyisao()
break;
default:
break;
}
},
},
onNavigationBarButtonTap(e) {
switch (e.index) {
case 0: //更多
this.$refs['trtw'].showTab();
break;
case 1: //搜索
uni.navigateTo({
url: '../search/index'
});
break;
default:
break;
}
},
}
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
</style>

View File

@@ -1,156 +0,0 @@
<template>
<view class="bgColor">
<watermark></watermark>
<view class="person-wx" v-if="userInfo">
<view class="person-wx-user">
<image class="person-wx-avatar" @click="$fc.previewImagesolo(userInfo.portrait)" :src="userInfo.portrait" mode="aspectFill"></image>
<view class="person-wx-user-detail" @click="goPersonDetail">
<view class="person-wx-nikename">{{userInfo.nickName}}</view>
<view class="person-wx-name">
<text class="text">微聊号{{userInfo.chatNo}}</text>
<image class="person-wx-fcode" src="../../static/wx/t05.png" mode="aspectFill"></image>
<uni-icons class="person-wx-right" type="right" size="26" color="#676767"></uni-icons>
</view>
</view>
</view>
</view>
<tool-list-wx :list="fuwu"></tool-list-wx>
<tool-list-wx :list="shoucang"></tool-list-wx>
<tool-list-wx :list="shezhi"></tool-list-wx>
</view>
</template>
<script>
export default {
data() {
return {
fuwu: [{
title: '服务(未开通)',
path: '',
icon: '../../static/wx/t06.png',
else: []
}],
shoucang: [{
title: '收藏',
path: '../../wx/favorites/index',
icon: '../../static/wx/t07.png',
else: []
},{
title: '朋友圈',
path: '../../wx/friendsCircle/person',
icon: '../../static/wx/t01.png',
else: []
},{
title: '卡包(未开通)',
path: '',
icon: '../../static/wx/t10.png',
else: []
},{
title: '表情(未开通)',
path: '',
icon: '../../static/wx/t09.png',
else: []
}],
shezhi: [{
title: '设置',
path: '../system/index',
icon: '../../static/wx/t04.png',
else: []
}]
}
},
computed:{
userInfo(){
return this.$store.state.userInfo
}
},
onLoad() {},
onShow(){
this.$store.dispatch('tabBarpull')
},
methods: {
delete1(e){
console.log(e)
},
goPersonDetail(){
uni.navigateTo({
url:'../../wx/personDetail/index'
})
}
}
}
</script>
<style scoped>
/* #ifdef APP-PLUS */
.bgColor{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #EDEDED;
overflow: auto;
}
/* #endif */
/* #ifdef H5 */
page{
background: #EDEDED;
}
/* #endif */
.person-wx {
margin-bottom: 14rpx;
background-color: #fff;
padding: 44rpx;
padding-right: 24rpx;
}
.person-wx-user {
display: flex;
flex-direction: row;
align-items: center;
}
.person-wx-avatar {
width: 114rpx;
min-width: 114rpx;
height: 114rpx;
margin-right: 28rpx;
border-radius: 16rpx;
}
.person-wx-user-detail {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
overflow: hidden;
}
.person-wx-nikename {
font-size: 36rpx;
font-weight: bold;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.person-wx-name {
color: #999;
font-size: 28rpx;
display: flex;flex-direction: row;align-items: center;
}
.person-wx-name .text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.person-wx-fcode{
width: 46rpx;
height: 46rpx;
margin-left: auto;
margin-right: 40rpx;
}
.person-wx-right{
}
</style>