update 首页、动态、消息接口联调
This commit is contained in:
parent
807b1b7b87
commit
d82b478e14
@ -2,7 +2,7 @@
|
|||||||
.m_search {
|
.m_search {
|
||||||
width: 446rpx;
|
width: 446rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
background-color: #F8F8F8;
|
background-color: #f8f8f8;
|
||||||
border-radius: 100rpx;
|
border-radius: 100rpx;
|
||||||
padding: 0 22rpx;
|
padding: 0 22rpx;
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
@ -15,14 +15,15 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view class="~cu-custom" :style="{height: CustomBar + 'px', zIndex: 1}">
|
<view class="~cu-custom">
|
||||||
<view class="~cu-bar ~fixed" :style="{height: CustomBar + 'px', paddingTop: StatusBar + 'px', background: bgColor}">
|
<view class="~cu-bar ~fixed" :style="{height: CustomBar + 'px', paddingTop: StatusBar + 'px', background: bgColor, zIndex: 999}">
|
||||||
<view class="m_search ~f-fcl">
|
<view class="m_search ~f-fcl">
|
||||||
<image class="m_search_icon" src="https://images.ufutx.com/202106/19/c607aaf49440b0df3308d6e048fd9ad7.png" mode="aspectFit" lazy-load="false"></image>
|
<image class="m_search_icon" src="https://images.ufutx.com/202106/19/c607aaf49440b0df3308d6e048fd9ad7.png" mode="aspectFit" lazy-load="false"></image>
|
||||||
<input disabled type="text" placeholder="搜索昵称">
|
<input disabled type="text" :placeholder="searchName">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view :style="{height: navHeight + 'px'}"></view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import wepy from '@wepy/core'
|
import wepy from '@wepy/core'
|
||||||
@ -33,10 +34,15 @@
|
|||||||
props: {
|
props: {
|
||||||
bgColor: {
|
bgColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '#ffffff'
|
||||||
|
},
|
||||||
|
searchName: {
|
||||||
|
type: String,
|
||||||
|
default: '搜索...'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
|
navHeight: 0,
|
||||||
StatusBar: 0,
|
StatusBar: 0,
|
||||||
CustomBar: 0,
|
CustomBar: 0,
|
||||||
Custom: 0
|
Custom: 0
|
||||||
@ -45,6 +51,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.navHeight = this.$app.$options.globalData.navBarHeight
|
||||||
this.StatusBar = this.$app.$options.globalData.StatusBar
|
this.StatusBar = this.$app.$options.globalData.StatusBar
|
||||||
this.CustomBar = this.$app.$options.globalData.CustomBar
|
this.CustomBar = this.$app.$options.globalData.CustomBar
|
||||||
this.Custom = this.$app.$options.globalData.Custom
|
this.Custom = this.$app.$options.globalData.Custom
|
||||||
|
|||||||
@ -207,9 +207,9 @@
|
|||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view class="~ui-pl-30 ~ui-pr-30 ~ui-pt-20">
|
<view class="~ui-pl-30 ~ui-pr-30 ~ui-pt-20">
|
||||||
<view class="~font_32 ~color333">评论 · {{ detail.comment_count }}</view>
|
<view class="~font_32 ~color333">评论 · {{ detail.commenter_count }}</view>
|
||||||
<view class="operation_mask" v-if="showOperation" @tap="hiddenOperation"></view>
|
<view class="operation_mask" v-if="showOperation" @tap="hiddenOperation"></view>
|
||||||
<view v-if="detail.comment_count == 0" class="ui-no-data">
|
<view v-if="detail.commenter_count == 0" class="ui-no-data">
|
||||||
<view class="color333">还没有人<span @tap="handlsInput" class="~color-theme">评论</span>,快来抢沙发吧</view>
|
<view class="color333">还没有人<span @tap="handlsInput" class="~color-theme">评论</span>,快来抢沙发吧</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="ui-discuss-box">
|
<view v-else class="ui-discuss-box">
|
||||||
@ -229,17 +229,20 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="~f-fl">
|
<view class="~f-fl">
|
||||||
<view class="ui-user-pic" v-if="item.user.avatar" style="{{'background-image:url(' + item.user.avatar + ');'}}"></view>
|
<view class="ui-user-pic" v-if="item.User.photo" style="{{'background-image:url(' + item.User.photo + ');'}}"></view>
|
||||||
<view class="ui-user-pic" v-else style="background-image:url(https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png);"></view>
|
<view class="ui-user-pic" v-else style="background-image:url(https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png);"></view>
|
||||||
<view class="~ui-pl-16">
|
<view class="~ui-pl-16" @tap="changeReply(item)">
|
||||||
<view class="~f-fcl">
|
<view class="~f-fcl">
|
||||||
<view class="ui-name">{{ item.user.nickname || '未设置名称' }}</view>
|
<view class="ui-name">{{ item.User.nickname || '未设置名称' }}</view>
|
||||||
<image v-if="item.user.sex == 1" class="ui-sex-icon ~ui-ml-10" src="https://images.ufutx.com/202103/23/3e7ac93e7bff26a9b62fe3232c776a96.png" lazy-load="false"></image>
|
<image v-if="item.User.sex == 1" class="ui-sex-icon ~ui-ml-10" src="https://images.ufutx.com/202103/23/3e7ac93e7bff26a9b62fe3232c776a96.png" lazy-load="false"></image>
|
||||||
<image v-else class="ui-sex-icon ~ui-ml-10" src="https://images.ufutx.com/202103/23/4fd7a85e7073152fde91190b8957910e.png" lazy-load="false"></image>
|
<image v-else class="ui-sex-icon ~ui-ml-10" src="https://images.ufutx.com/202103/23/4fd7a85e7073152fde91190b8957910e.png" lazy-load="false"></image>
|
||||||
<image class="referencesIcon" src="https://image.fulllinkai.com/202207/19/7e78a1dd367f1250d4cba4e85bfd60f1.png" mode="widthFix" v-if="item.user.type != 'single'"></image>
|
<image class="referencesIcon" src="https://image.fulllinkai.com/202207/19/7e78a1dd367f1250d4cba4e85bfd60f1.png" mode="widthFix" v-if="item.User.type != 'single'"></image>
|
||||||
|
</view>
|
||||||
|
<view class="~color999 ~font_24 ~f-fb ~ui-pt-4">{{ item.create_time }}</view>
|
||||||
|
<view class="~color333 ~font_30 ui-content">
|
||||||
|
<span v-if="item.Replyer">回复 {{item.Replyer.nickname}}:</span>
|
||||||
|
{{ item.comment }}
|
||||||
</view>
|
</view>
|
||||||
<view class="~color999 ~font_24 ~f-fb ~ui-pt-4">{{ item.created_at }}</view>
|
|
||||||
<view class="~color333 ~font_30 ui-content">{{ item.comment }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-like-icon-box">
|
<view class="ui-like-icon-box">
|
||||||
<view class="~f-fcr" v-if="item.isLker == false">
|
<view class="~f-fcr" v-if="item.isLker == false">
|
||||||
@ -275,6 +278,7 @@
|
|||||||
import wepy from '@wepy/core'
|
import wepy from '@wepy/core'
|
||||||
import base from '../mixins/base'
|
import base from '../mixins/base'
|
||||||
import https from '../mixins/https'
|
import https from '../mixins/https'
|
||||||
|
import {service} from '../config'
|
||||||
|
|
||||||
wepy.component({
|
wepy.component({
|
||||||
props: {
|
props: {
|
||||||
@ -288,17 +292,57 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
operationId: '',
|
operationId: null,
|
||||||
|
throttle: true,
|
||||||
showOperation: false,
|
showOperation: false,
|
||||||
defaultAvatar: 'https://images.ufutx.com/202007/01/e0de60525143427d4dd19515a5b387ba.png',
|
defaultAvatar: 'https://images.ufutx.com/202007/01/e0de60525143427d4dd19515a5b387ba.png',
|
||||||
gifurl: 'https://images.ufutx.com/202106/11/d40b92e053a693f30eb197bf6374af95.gif',
|
gifurl: 'https://images.ufutx.com/202106/11/d40b92e053a693f30eb197bf6374af95.gif',
|
||||||
name: '',
|
name: '',
|
||||||
|
replyId: '',
|
||||||
inputVal: '',
|
inputVal: '',
|
||||||
showReplyView: true,
|
showReplyView: true,
|
||||||
inputBoxH: 86
|
inputBoxH: 86
|
||||||
},
|
},
|
||||||
mixins: [https, base],
|
mixins: [https, base],
|
||||||
methods: {
|
methods: {
|
||||||
|
// 评论
|
||||||
|
send() {
|
||||||
|
let vm = this
|
||||||
|
let comment = vm.replyId ? vm.inputVal.split(`回复@${vm.name}:`)[1] : vm.inputVal
|
||||||
|
let data = {
|
||||||
|
reply_id: vm.replyId || '',
|
||||||
|
comment: vm.replyId ? vm.inputVal.split(`回复@${vm.name}:`)[1] : vm.inputVal
|
||||||
|
}
|
||||||
|
if (!comment) {
|
||||||
|
vm.$showToast('请输入评论内容')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (vm.throttle) {
|
||||||
|
vm.throttle = false
|
||||||
|
vm.$post({url: `${service.host}/moment/${vm.detail.id}/comment`, data}).then(({code}) => {
|
||||||
|
wx.hideLoading()
|
||||||
|
if (code == 0) {
|
||||||
|
vm.$emit('getList')
|
||||||
|
vm.replyContent = ''
|
||||||
|
vm.name = ''
|
||||||
|
vm.inputVal = ''
|
||||||
|
vm.replyId = ''
|
||||||
|
}
|
||||||
|
vm.throttle = true
|
||||||
|
}).catch(() => {
|
||||||
|
vm.throttle = true
|
||||||
|
wx.hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 点击评论内容回复
|
||||||
|
changeReply(e) {
|
||||||
|
let vm = this
|
||||||
|
vm.replyId = e.User.id
|
||||||
|
vm.name = e.User.nickname
|
||||||
|
vm.inputVal = `回复@${e.User.nickname}:`
|
||||||
|
},
|
||||||
|
// 长按评论内容弹框复制等操作
|
||||||
commentsOperation(id) {
|
commentsOperation(id) {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.showOperation = true
|
vm.showOperation = true
|
||||||
@ -307,7 +351,7 @@
|
|||||||
hiddenOperation() {
|
hiddenOperation() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.showOperation = false
|
vm.showOperation = false
|
||||||
vm.operationId = ''
|
vm.operationId = null
|
||||||
},
|
},
|
||||||
// 输入框聚焦事件
|
// 输入框聚焦事件
|
||||||
InputFocus() {
|
InputFocus() {
|
||||||
@ -320,12 +364,13 @@
|
|||||||
},
|
},
|
||||||
// 监听输入框内容
|
// 监听输入框内容
|
||||||
changeMsg(e) {
|
changeMsg(e) {
|
||||||
console.log(e, '8888')
|
|
||||||
let vm = this
|
let vm = this
|
||||||
if (/\[[^\]]+\]/.test(e.$wx.detail.value)) {
|
|
||||||
vm.replyContent = vm.transitionMsg(e.$wx.detail.value)
|
|
||||||
} else {
|
|
||||||
vm.replyContent = e.$wx.detail.value
|
vm.replyContent = e.$wx.detail.value
|
||||||
|
if (!vm.replyContent || vm.replyContent == `回复@${vm.name}`) {
|
||||||
|
vm.replyContent = ''
|
||||||
|
vm.name = ''
|
||||||
|
vm.inputVal = ''
|
||||||
|
vm.replyId = ''
|
||||||
}
|
}
|
||||||
vm.changeInputHeight()
|
vm.changeInputHeight()
|
||||||
},
|
},
|
||||||
|
|||||||
@ -205,19 +205,18 @@ scroll-view {
|
|||||||
<block v-if="item.type != 'vote'">
|
<block v-if="item.type != 'vote'">
|
||||||
<block v-for="(item,index) in list" :key="index">
|
<block v-for="(item,index) in list" :key="index">
|
||||||
<view class="~f-fl ~ui-pl-30 ~ui-pr-30 ~ui-pt-30 ~ui-relative" @tap="jumpPath(`/pages/dynamic/dynamicDetail?id=${item.id}`)">
|
<view class="~f-fl ~ui-pl-30 ~ui-pr-30 ~ui-pt-30 ~ui-relative" @tap="jumpPath(`/pages/dynamic/dynamicDetail?id=${item.id}`)">
|
||||||
<view class="ui-user-pic" v-if="item.u_photo" style="{{'background-image:url(' + item.u_photo + ');'}}"></view>
|
<view class="ui-user-pic" style="{{'background-image:url(' + (item.user.photo || 'https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png') + ')'}}" @tap.stop="jumpPath(`/pages/home/information?id=${item.user_id}`)"></view>
|
||||||
<view class="ui-user-pic" v-else style="background-image:url(https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png);"></view>
|
<view class="~color999 ~font_24 ui-time">{{ item.create_time }}</view>
|
||||||
<view class="~color999 ~font_24 ui-time">{{ item.created_at }}</view>
|
|
||||||
<view class="~ui-pl-16">
|
<view class="~ui-pl-16">
|
||||||
<view class="~f-fc">
|
<view class="~f-fc">
|
||||||
<view class="~f-fcl">
|
<view class="~f-fcl">
|
||||||
<view class="ui-name">{{ item.u_nickname || '未设置名称' }}</view>
|
<view class="ui-name">{{ item.user.nickname || '未设置名称' }}</view>
|
||||||
<view v-if="item.work_user_tag" class="ui-identification ~font_22 ~f-fcc">
|
<view v-if="item.work_user_tag" class="ui-identification ~font_22 ~f-fcc">
|
||||||
<image class="ui-identification-icon" src="https://image.fulllinkai.com/202307/21/eb5c30d676eac58af4235bad8e6d8c43.png" mode="widthFix"></image>
|
<image class="ui-identification-icon" src="https://image.fulllinkai.com/202307/21/eb5c30d676eac58af4235bad8e6d8c43.png" mode="widthFix"></image>
|
||||||
{{item.work_user_tag}}
|
{{item.work_user_tag}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="referencesIcon" src="https://image.fulllinkai.com/202207/19/7e78a1dd367f1250d4cba4e85bfd60f1.png" mode="widthFix" v-if="item.u_type != 'single'"></image>
|
<image class="referencesIcon" src="https://image.fulllinkai.com/202207/19/7e78a1dd367f1250d4cba4e85bfd60f1.png" mode="widthFix" v-if="item.user.type != 'single'"></image>
|
||||||
<view class="~font_24 ~ui-ml-24 ~color-theme" v-if="item.vote_id > 0">
|
<view class="~font_24 ~ui-ml-24 ~color-theme" v-if="item.vote_id > 0">
|
||||||
参与了投票:
|
参与了投票:
|
||||||
</view>
|
</view>
|
||||||
@ -225,9 +224,9 @@ scroll-view {
|
|||||||
<view class="~font_24 ~f-fbc">
|
<view class="~font_24 ~f-fbc">
|
||||||
<view class="~f-fcl">
|
<view class="~f-fcl">
|
||||||
<view class="~font_24 ~color-999">{{ item.u_year }}</view>
|
<view class="~font_24 ~color-999">{{ item.u_year }}</view>
|
||||||
<view class="~font_24 ~color-999" v-if="item.u_stature"><text decode> </text>· {{ item.u_stature }}cm
|
<view class="~font_24 ~color-999" v-if="item.profile && item.profile.stature"><text decode> </text>· {{ item.profile.stature }}cm
|
||||||
</view>
|
</view>
|
||||||
<view class="~font_24 ~color-999" v-if="item.u_degree"><text decode> </text>· {{ item.u_degree }}</view>
|
<view class="~font_24 ~color-999" v-if="item.profile && item.profile.degree"><text decode> </text>· {{ item.profile.degree }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="~color-theme" v-if="item.is_audited == 0">审核中</view>
|
<view class="~color-theme" v-if="item.is_audited == 0">审核中</view>
|
||||||
<view class="~color-theme" v-if="item.is_audited == -1">审核失败</view>
|
<view class="~color-theme" v-if="item.is_audited == -1">审核失败</view>
|
||||||
@ -237,7 +236,7 @@ scroll-view {
|
|||||||
<block v-if="item.vote_id > 0">
|
<block v-if="item.vote_id > 0">
|
||||||
<view class="ui-voteItem ~f-fl" @tap="jumpPath(`/pages/dynamic/voteDetail?id=${item.vote_id}`)">
|
<view class="ui-voteItem ~f-fl" @tap="jumpPath(`/pages/dynamic/voteDetail?id=${item.vote_id}`)">
|
||||||
<image class="ui-vote-icon" src="https://image.fulllinkai.com/202206/29/7fd07d9687390a58d25ac92b55d9a9dd.png" mode="widthFix"></image>
|
<image class="ui-vote-icon" src="https://image.fulllinkai.com/202206/29/7fd07d9687390a58d25ac92b55d9a9dd.png" mode="widthFix"></image>
|
||||||
<view class="~font_28">{{item.v_title}}</view>
|
<view class="~font_28">{{item.vote.title}}</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
@ -254,13 +253,13 @@ scroll-view {
|
|||||||
<video id="video" :src="item.play_url" v-if="videoIndex == index" play-btn-position="center" show-fullscreen-btn="{{false}}" controls direction="0" object-fit="{{videoIndex == index ? 'contain' : 'cover'}}" referrer-policy="origin" bindfullscreenchange="leaveVideo" class="videoCenter ui-video-r-box" :style="{width: item.video_width > item.video_height ? '480rpx' : '320rpx', height: item.video_width > item.video_height ? '270rpx' : '480rpx'}" :key="item.id">
|
<video id="video" :src="item.play_url" v-if="videoIndex == index" play-btn-position="center" show-fullscreen-btn="{{false}}" controls direction="0" object-fit="{{videoIndex == index ? 'contain' : 'cover'}}" referrer-policy="origin" bindfullscreenchange="leaveVideo" class="videoCenter ui-video-r-box" :style="{width: item.video_width > item.video_height ? '480rpx' : '320rpx', height: item.video_width > item.video_height ? '270rpx' : '480rpx'}" :key="item.id">
|
||||||
</video>
|
</video>
|
||||||
</view>
|
</view>
|
||||||
<view class="~font_24 ~f-fb ~ui-mt-10" v-if="item.mt_name != null || item.mt_name == ''">
|
<view class="~font_24 ~f-fb ~ui-mt-10" v-if="item.mt_name">
|
||||||
<view class="ui-tags ~f-fcc ~color-theme ~font_24 ~ui-pr-16">
|
<view class="ui-tags ~f-fcc ~color-theme ~font_24 ~ui-pr-16">
|
||||||
<image lazy-load="true" class="ui-img" src="https://images.ufutx.com/202102/04/dc3043df7d265ae0b2401e589405a239.png" alt=""/>
|
<image lazy-load="true" class="ui-img" src="https://images.ufutx.com/202102/04/dc3043df7d265ae0b2401e589405a239.png" alt=""/>
|
||||||
{{ item.mt_name }}
|
{{ item.mt_name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.address != null || item.address == ''" class="~color666 ~font_24 ~f-fl ~ui-mt-16">
|
<view v-if="item.address" class="~color666 ~font_24 ~f-fl ~ui-mt-16">
|
||||||
<image lazy-load="true" class="ui-address-icon" src="https://images.ufutx.com/202102/04/817a393539ee854226eef79defef2fc4.png" alt=""/>
|
<image lazy-load="true" class="ui-address-icon" src="https://images.ufutx.com/202102/04/817a393539ee854226eef79defef2fc4.png" alt=""/>
|
||||||
<view>{{ item.address }}</view>
|
<view>{{ item.address }}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -269,12 +268,12 @@ scroll-view {
|
|||||||
<view class="~color666 ~font_28 ui-like-box">
|
<view class="~color666 ~font_28 ui-like-box">
|
||||||
<view class="ui-like-icon-box">
|
<view class="ui-like-icon-box">
|
||||||
<image lazy-load="true" class="ui-like-icon" src="https://images.ufutx.com/202102/04/ab432de170b4e8ca1a1a59e34af9aa25.png"></image>
|
<image lazy-load="true" class="ui-like-icon" src="https://images.ufutx.com/202102/04/ab432de170b4e8ca1a1a59e34af9aa25.png"></image>
|
||||||
{{ item.comment_count }}
|
{{ item.commenter_count }}
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-like-icon-box ~ui-mr-40" @tap.stop="upvote(item ,index)">
|
<view class="ui-like-icon-box ~ui-mr-40" @tap.stop="upvote(item ,index)">
|
||||||
<image v-if="item.is_like == false" lazy-load="true" class="ui-like-icon-v2" src="https://images.ufutx.com/202106/10/a97c7c76f3aaf7065e7f7a5fe2abc081.png"></image>
|
<image v-if="item.is_like == false" lazy-load="true" class="ui-like-icon-v2" src="https://images.ufutx.com/202106/10/a97c7c76f3aaf7065e7f7a5fe2abc081.png"></image>
|
||||||
<image v-else class="ui-img2_gif" src="{{item.is_like ? gifurl : 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'}}"></image>
|
<image v-else class="ui-img2_gif" src="{{item.is_like ? gifurl : 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'}}"></image>
|
||||||
{{ item.like_count }}
|
{{ item.liker_count }}
|
||||||
</view>
|
</view>
|
||||||
<view class="~ui-pl-6 ~ui-pr-6" style="margin-right: -6rpx">
|
<view class="~ui-pl-6 ~ui-pr-6" style="margin-right: -6rpx">
|
||||||
<image class="ui-cuIcon-moreandroid" src="https://image.fulllinkai.com/202409/05/fdb58839d1909d75f636941d6aea6cb5.png" mode="widthFix" @tap.stop="changeOperation(item, index)"></image>
|
<image class="ui-cuIcon-moreandroid" src="https://image.fulllinkai.com/202409/05/fdb58839d1909d75f636941d6aea6cb5.png" mode="widthFix" @tap.stop="changeOperation(item, index)"></image>
|
||||||
@ -323,6 +322,7 @@ scroll-view {
|
|||||||
// 文字超出展示全文
|
// 文字超出展示全文
|
||||||
textAll(e) {
|
textAll(e) {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
vm.$nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const query = wx.createSelectorQuery().in(vm.$wx)
|
const query = wx.createSelectorQuery().in(vm.$wx)
|
||||||
query.selectAll('.substance').boundingClientRect()
|
query.selectAll('.substance').boundingClientRect()
|
||||||
@ -340,16 +340,22 @@ scroll-view {
|
|||||||
vm.list = JSON.parse(JSON.stringify(e))
|
vm.list = JSON.parse(JSON.stringify(e))
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 点赞
|
// 点赞
|
||||||
upvote(e, index) {
|
upvote(e, index) {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.$emit('signInVerify')
|
||||||
|
return
|
||||||
|
}
|
||||||
let nowTime = new Date()
|
let nowTime = new Date()
|
||||||
vm.$post({url: `${service.host}/like/moments/${e.id}`}).then(({code}) => {
|
vm.$post({url: `${service.host}/moment/${e.id}/like`}).then(({code}) => {
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.list[index].is_like = !vm.list[index].is_like
|
vm.list[index].is_like = !vm.list[index].is_like
|
||||||
vm.list[index].like_count = vm.list[index].like_count + (vm.list[index].is_like ? -1 : 1)
|
vm.list[index].liker_count = vm.list[index].liker_count + (vm.list[index].is_like ? 1 : -1)
|
||||||
if (vm.list[index].is_like) {
|
if (vm.list[index].is_like) {
|
||||||
vm.gifurl = `${vm.gifurl}?${nowTime}`
|
vm.gifurl = `${vm.gifurl}?${nowTime}`
|
||||||
}
|
}
|
||||||
@ -361,6 +367,11 @@ scroll-view {
|
|||||||
// 选择动态操作
|
// 选择动态操作
|
||||||
changeOperation(e, index) {
|
changeOperation(e, index) {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.$emit('signInVerify')
|
||||||
|
return
|
||||||
|
}
|
||||||
vm.$emit('changeSelect', e, index)
|
vm.$emit('changeSelect', e, index)
|
||||||
},
|
},
|
||||||
// 展开全文或收起
|
// 展开全文或收起
|
||||||
@ -400,7 +411,11 @@ scroll-view {
|
|||||||
},
|
},
|
||||||
jumpPath(url) {
|
jumpPath(url) {
|
||||||
let vm = this
|
let vm = this
|
||||||
console.log(url, vm.from, '777')
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.$emit('signInVerify')
|
||||||
|
return
|
||||||
|
}
|
||||||
if (vm.from != 'dynamic') {
|
if (vm.from != 'dynamic') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/moments/${vm.selectData.id}`}).then(({code, data}) => {
|
vm.$delete({url: `${service.host}/moment/${vm.selectData.id}/delete`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.$showToast('动态已删除')
|
vm.$showToast('动态已删除')
|
||||||
vm.$emit('changeOperation', 'delete')
|
vm.$emit('changeOperation', 'delete')
|
||||||
@ -109,7 +109,7 @@
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/rbac/hide/moment/${vm.selectData.id}`}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/moment/${vm.selectData.id}/hidden`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.$showToast('动态已隐藏')
|
vm.$showToast('动态已隐藏')
|
||||||
vm.$emit('changeOperation', 'conceal')
|
vm.$emit('changeOperation', 'conceal')
|
||||||
@ -128,13 +128,16 @@
|
|||||||
// 设置为热门或取消热门动态
|
// 设置为热门或取消热门动态
|
||||||
hotDynamic(e) {
|
hotDynamic(e) {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
let data = {
|
||||||
|
is_hot: e
|
||||||
|
}
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
content: `是否${e == 1 ? '设置该动态为推荐动态' : '取消该推荐动态'}?`,
|
content: `是否${e == 1 ? '设置该动态为推荐动态' : '取消该推荐动态'}?`,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/rbac/set/hot/moments?moment_id=${vm.selectData.id}&is_hot=${e}`}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/moment/${vm.selectData.id}/hot`, data}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.$showToast(`${e == 1 ? '设置成功' : '取消成功'}`)
|
vm.$showToast(`${e == 1 ? '设置成功' : '取消成功'}`)
|
||||||
if (e == 0) {
|
if (e == 0) {
|
||||||
@ -155,11 +158,8 @@
|
|||||||
// 设置为置顶或取消置顶动态
|
// 设置为置顶或取消置顶动态
|
||||||
topDynamic(e) {
|
topDynamic(e) {
|
||||||
let vm = this
|
let vm = this
|
||||||
let url = ``
|
let data = {
|
||||||
if (e == 0) {
|
is_top: e
|
||||||
url = `${service.host}/rbac/remove/top/${vm.selectData.id}/moment`
|
|
||||||
} else {
|
|
||||||
url = `${service.host}/rbac/top/${vm.selectData.id}/moment`
|
|
||||||
}
|
}
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
@ -167,7 +167,7 @@
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: url}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/moment/${vm.selectData.id}/top`, data}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.$showToast(`${e == 1 ? '设置成功' : '取消成功'}`)
|
vm.$showToast(`${e == 1 ? '设置成功' : '取消成功'}`)
|
||||||
if (e == 0) {
|
if (e == 0) {
|
||||||
@ -196,7 +196,7 @@
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/unlike/moments/${vm.selectData.id}`}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/moment/${vm.selectData.id}/unlike`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.$emit('changeOperation', 'lose')
|
vm.$emit('changeOperation', 'lose')
|
||||||
vm.$showToast('标记成功')
|
vm.$showToast('标记成功')
|
||||||
|
|||||||
120
src/components/loginDialog.wpy
Normal file
120
src/components/loginDialog.wpy
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<style lang="less">
|
||||||
|
.loginDialog {
|
||||||
|
.underline {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-cu-dialog{
|
||||||
|
width: 600rpx !important;
|
||||||
|
padding: 72rpx 0 68rpx !important;
|
||||||
|
border-radius: 32rpx !important;
|
||||||
|
background: #FFFFFF !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m_dialog {
|
||||||
|
border-radius: 32rpx;
|
||||||
|
|
||||||
|
.m_dialog_img {
|
||||||
|
margin-bottom: 64rpx;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
|
||||||
|
.u_dialog_img {
|
||||||
|
width: 232rpx;
|
||||||
|
height: 110rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.u_tt {
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m_bu {
|
||||||
|
width: 336rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background: #FF5380;
|
||||||
|
border-radius: 100rpx;
|
||||||
|
margin: 80rpx 0 32rpx;
|
||||||
|
|
||||||
|
.u_bu_tt {
|
||||||
|
line-height: 32rpx;
|
||||||
|
padding: 0 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u_bu_tips {
|
||||||
|
width: 64rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
padding-top: 4rpx;
|
||||||
|
color: #FF5380;
|
||||||
|
line-height: 20rpx;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 100rpx 100rpx 100rpx 0;
|
||||||
|
margin-top: -6rpx;
|
||||||
|
margin-left: 4rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="loginDialog">
|
||||||
|
<view class="~cu-modal {{loginShow ? '~show' : ''}}" style="z-index: 9999;">
|
||||||
|
<view class="~cu-dialog ui-cu-dialog">
|
||||||
|
<view class="m_dialog ~f-fcc ~f-fdc">
|
||||||
|
<view class="m_dialog_img">
|
||||||
|
<image class="u_dialog_img" src="https://images.ufutx.com/202105/12/eeadaef5123837de5109b25e93fdeae6.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<view class="u_tt ~font_40 ~color333 ~bold">登录福恋,获得更精准的推荐</view>
|
||||||
|
<view class="~font_24 ~color999">登录即表明您同意福恋的
|
||||||
|
<text class="underline" @tap.stop="gotoApp('https://love.ufutx.com/h5/#/serviceAgreementV2')">用户协议</text>
|
||||||
|
与
|
||||||
|
<text class="underline" @tap.stop="gotoApp('https://love.ufutx.com/h5/#/PrivacyAgreementV2')">隐私政策</text>
|
||||||
|
</view>
|
||||||
|
<view class="m_bu ~f-fcc text-center" @tap="jumpPath">
|
||||||
|
<view class="u_bu_tt ~font_32 ~colorF ~bold">微信登录</view>
|
||||||
|
<view class="u_bu_tips ~font_20 ~f-fcc ~bold">私密</view>
|
||||||
|
</view>
|
||||||
|
<view class="~font_28 ~color999" @tap="hidden" v-if="!must">暂不登录</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import wepy from '@wepy/core'
|
||||||
|
import base from '../mixins/base'
|
||||||
|
import https from '../mixins/https'
|
||||||
|
|
||||||
|
wepy.component({
|
||||||
|
props: {
|
||||||
|
loginShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
must: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
},
|
||||||
|
mixins: [https, base],
|
||||||
|
methods: {
|
||||||
|
hidden() {
|
||||||
|
let vm = this
|
||||||
|
vm.$emit('hiddenLogin')
|
||||||
|
},
|
||||||
|
jumpPath() {
|
||||||
|
let vm = this
|
||||||
|
vm.hidden()
|
||||||
|
wx.navigateTo({url: `/pages/home/registration`})
|
||||||
|
},
|
||||||
|
gotoApp(url) {
|
||||||
|
wx.navigateTo({url: '/pages/books/bookDetail?url=' + encodeURIComponent(url)})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -155,9 +155,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-modal {{intentionShow?'show':''}}">
|
<view class="~cu-modal {{intentionShow?'~show':''}}">
|
||||||
<view class="intention_confirm_box animation-slide-top">
|
<view class="intention_confirm_box animation-slide-top">
|
||||||
<view class="intentionContent font_32 color-333">是否确定申请“{{title}}”?</view>
|
<view class="intentionContent ~font_32 ~color333">是否确定申请“{{title}}”?</view>
|
||||||
<view class="intentionOperation">
|
<view class="intentionOperation">
|
||||||
<image @tap.stop="intentionModal" class="operationButton" src="https://images.ufutx.com/202103/17/4281e92bc8b727bae08099a3015225b1.png" mode="widthFix"></image>
|
<image @tap.stop="intentionModal" class="operationButton" src="https://images.ufutx.com/202103/17/4281e92bc8b727bae08099a3015225b1.png" mode="widthFix"></image>
|
||||||
<image @tap.stop="recommend" class="operationButton" src="https://images.ufutx.com/202103/17/91fea69fdff1cfeaac369ddd5dd591f0.png" mode="widthFix"></image>
|
<image @tap.stop="recommend" class="operationButton" src="https://images.ufutx.com/202103/17/91fea69fdff1cfeaac369ddd5dd591f0.png" mode="widthFix"></image>
|
||||||
@ -165,10 +165,10 @@
|
|||||||
<view style="height: 38rpx"></view>
|
<view style="height: 38rpx"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-modal {{inreviewShow?'show':''}}">
|
<view class="~cu-modal {{inreviewShow?'~show':''}}">
|
||||||
<view class="intention_confirm_box animation-slide-top">
|
<view class="intention_confirm_box animation-slide-top">
|
||||||
<view class="intentionContent_1 font_34 color-333 bold">你的资料正在审核中</view>
|
<view class="intentionContent_1 font_34 ~color333 ~bold">你的资料正在审核中</view>
|
||||||
<view class="font_32 color-333" style="padding-bottom: 60rpx">如有紧急,请拨打<span style="color: #f33b6c;">18922809346</span></view>
|
<view class="~font_32 ~color333" style="padding-bottom: 60rpx">如有紧急,请拨打<span style="color: #f33b6c;">18922809346</span></view>
|
||||||
<view class="intentionOperation">
|
<view class="intentionOperation">
|
||||||
<image @tap.stop="inreviewModal" class="operationButton" src="https://images.ufutx.com/202103/17/4281e92bc8b727bae08099a3015225b1.png" mode="widthFix"></image>
|
<image @tap.stop="inreviewModal" class="operationButton" src="https://images.ufutx.com/202103/17/4281e92bc8b727bae08099a3015225b1.png" mode="widthFix"></image>
|
||||||
<image @tap.stop="clickPhone" class="operationButton" src="https://images.ufutx.com/202104/15/91fea69fdff1cfeaac369ddd5dd591f0.png" mode="widthFix"></image>
|
<image @tap.stop="clickPhone" class="operationButton" src="https://images.ufutx.com/202104/15/91fea69fdff1cfeaac369ddd5dd591f0.png" mode="widthFix"></image>
|
||||||
|
|||||||
@ -64,15 +64,7 @@ wepy.component({
|
|||||||
methods: {
|
methods: {
|
||||||
GetAddress() {
|
GetAddress() {
|
||||||
let vm = this
|
let vm = this
|
||||||
let url = ``
|
vm.$get({url: `${service.host}/address/country/list`}).then(({code, data}) => {
|
||||||
console.log(vm.selfTextareaShow, vm.multiIndex, '88888888888888888')
|
|
||||||
if (vm.selfTextareaShow) {
|
|
||||||
url = `${service.host}/addresses`
|
|
||||||
} else {
|
|
||||||
url = `${service.host}/address/country/list`
|
|
||||||
}
|
|
||||||
|
|
||||||
vm.$get({url: url}).then(({code, data}) => {
|
|
||||||
vm.provinces = data
|
vm.provinces = data
|
||||||
console.log(vm.provinces, 'vm.provinces')
|
console.log(vm.provinces, 'vm.provinces')
|
||||||
if (vm.AddressValue.length > 0) {
|
if (vm.AddressValue.length > 0) {
|
||||||
@ -101,7 +93,7 @@ wepy.component({
|
|||||||
for (let item of vm.provinces[vm.provinceId].Children) {
|
for (let item of vm.provinces[vm.provinceId].Children) {
|
||||||
vm.objectArray[1].push(item.Name)
|
vm.objectArray[1].push(item.Name)
|
||||||
}
|
}
|
||||||
for (let item of vm.provinces[vm.cityId].Children[vm.selfTextareaShow ? 0 : 18].Children) {
|
for (let item of vm.provinces[vm.cityId].Children[18].Children) {
|
||||||
vm.objectArray[2].push(item.Name)
|
vm.objectArray[2].push(item.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
248
src/components/uploadVideo.wpy
Normal file
248
src/components/uploadVideo.wpy
Normal file
@ -0,0 +1,248 @@
|
|||||||
|
<style lang="less">
|
||||||
|
page {}
|
||||||
|
|
||||||
|
.upload_file {
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
._item {
|
||||||
|
padding: 32rpx;
|
||||||
|
border-bottom: 1rpx solid #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
._cancel {
|
||||||
|
border-top: 16rpx solid #f8f8f8;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<template>
|
||||||
|
<view :class="{'~show': chooseShow}" class="~cu-modal ~bottom-modal">
|
||||||
|
<view class="~cu-dialog" style="border-radius: 32rpx 32rpx 0 0;">
|
||||||
|
<view class="~bg_f upload_file">
|
||||||
|
<view class="_title _item ~font_32" @tap="onCamera">拍摄</view>
|
||||||
|
<view class="_title _item ~font_32" @tap="chooseImageV2">从手机相册选择</view>
|
||||||
|
<view class="_title _item ~font_32 ~color333 _cancel" @tap="cancelFn">取消</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import wepy from '@wepy/core'
|
||||||
|
import {service} from '../config'
|
||||||
|
import base from '../mixins/base'
|
||||||
|
import https from '../mixins/https'
|
||||||
|
|
||||||
|
wepy.component({
|
||||||
|
props: {
|
||||||
|
chooseShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
uploadData: null,
|
||||||
|
uploader: {},
|
||||||
|
videos: [],
|
||||||
|
uploadVideo: []
|
||||||
|
},
|
||||||
|
mixins: [https, base],
|
||||||
|
methods: {
|
||||||
|
chooseImageV2() { // 上传视频
|
||||||
|
let vm = this
|
||||||
|
wx.chooseMedia({
|
||||||
|
count: vm.num, // 上传图片的个数
|
||||||
|
mediaType: ['video'], // 限制上传的类型为image
|
||||||
|
sourceType: ['album'], // 可以指定来源是相册还是相机
|
||||||
|
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||||
|
success: (res) => { // 获取临时存放的视频资源
|
||||||
|
console.log(res, '7777777777777')
|
||||||
|
vm.verify(res)
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
vm.$emit('changeVal', '')
|
||||||
|
wx.hideLoading()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onCamera() {
|
||||||
|
let vm = this
|
||||||
|
wx.chooseMedia({
|
||||||
|
count: 1,
|
||||||
|
mediaType: ['video'], // 限制上传的类型为image
|
||||||
|
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||||
|
sourceType: ['camera'], // 可以指定来源是相册还是相机
|
||||||
|
maxDuration: 30, // 拍摄限制时间
|
||||||
|
compressed: true,
|
||||||
|
camera: 'back', // 采用后置摄像头
|
||||||
|
success: (res) => { // 获取临时存放的视频资源
|
||||||
|
vm.verify(res)
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
vm.$emit('changeVal', '')
|
||||||
|
wx.hideLoading()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
uploadFile(filePath) {
|
||||||
|
let vm = this
|
||||||
|
console.log(filePath, 'filePath')
|
||||||
|
console.log(vm.uploadData, 'vm.uploadData')
|
||||||
|
if (vm.uploadData) {
|
||||||
|
vm.$showLoading(`上传中...`)
|
||||||
|
let fileName = new Date().getTime() + Math.floor(Math.random() * 150) + '.' + filePath.split('.').pop().toLowerCase()
|
||||||
|
let filePathUrl = vm.uploadData.host + '/' + vm.uploadData.dir + fileName
|
||||||
|
wx.uploadFile({
|
||||||
|
url: vm.uploadData.host,
|
||||||
|
filePath: filePath,
|
||||||
|
name: 'file', // 必须填file。
|
||||||
|
formData: {
|
||||||
|
key: vm.uploadData.dir + fileName,
|
||||||
|
policy: vm.uploadData.policy,
|
||||||
|
OSSAccessKeyId: vm.uploadData.access_id,
|
||||||
|
signature: vm.uploadData.signature
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
||||||
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
if (res.statusCode === 204) {
|
||||||
|
console.log(filePathUrl, '上传成功')
|
||||||
|
let dataV2 = {
|
||||||
|
filePath: filePathUrl,
|
||||||
|
type: type
|
||||||
|
}
|
||||||
|
|
||||||
|
vm.uploadVideo = [dataV2]
|
||||||
|
vm.$emit('changeVal', vm.uploadVideo)
|
||||||
|
vm.uploadVideo = []
|
||||||
|
vm.cancelFn()
|
||||||
|
wx.hideLoading()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
wx.showModal({ // 使用模态框提示用户进行操作
|
||||||
|
title: `温馨提示:`,
|
||||||
|
content: `很抱歉` + err,
|
||||||
|
showCancel: false,
|
||||||
|
confirmText: `确定`,
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
vm.$gotoBack(1)
|
||||||
|
vm.$emit('changeVal', '')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
let vm = this
|
||||||
|
vm.$showToast(`网络环境异常,请稍后重试`)
|
||||||
|
vm.getOssConfig()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 检验大小并压缩、裁剪
|
||||||
|
verify(res) {
|
||||||
|
let vm = this
|
||||||
|
let duration = res.tempFiles[0].duration
|
||||||
|
if (duration > 30) {
|
||||||
|
let beyongSize = parseFloat(duration - 30).toFixed(0)
|
||||||
|
// 获取视频超出限制大小的数量
|
||||||
|
wx.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '上传的视频时长超限,超出' + beyongSize + '秒,是否剪辑视频!',
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
vm.compressVideo(res.tempFiles[0]).then((data) => { // 先压缩视频,再剪辑视频
|
||||||
|
vm.$showLoading('准备编辑中...')
|
||||||
|
vm.editorVideo(data.tempFilePath).then((resV2) => {
|
||||||
|
console.log(resV2)
|
||||||
|
// 视频在30秒内,上传视频
|
||||||
|
vm.uploadFile(resV2, 'video')
|
||||||
|
}).catch((err) => {
|
||||||
|
let time = parseFloat(err.duration / 1000).toFixed(0)
|
||||||
|
// 视频大于30秒,重新上传视频
|
||||||
|
if (time > 30) {
|
||||||
|
return wx.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: `视频超过${parseFloat(time - 30).toFixed(0)}秒,请重新上传哦!`,
|
||||||
|
showCancel: false,
|
||||||
|
success() {}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
vm.compressVideo(res.tempFiles[0]).then((data) => { // 先压缩视频,然后再上传
|
||||||
|
console.log(data, '压缩后数据')
|
||||||
|
vm.uploadFile(data.tempFilePath)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 视频压缩
|
||||||
|
compressVideo(e) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
wx.compressVideo({
|
||||||
|
quality: 'high',
|
||||||
|
src: e.tempFilePath,
|
||||||
|
success: (res) => {
|
||||||
|
resolve(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 剪辑视频
|
||||||
|
editorVideo(tempFilePath) {
|
||||||
|
console.log(tempFilePath)
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
wx.openVideoEditor({
|
||||||
|
filePath: tempFilePath,
|
||||||
|
success: (res) => {
|
||||||
|
if (parseFloat(res.duration / 1000).toFixed(0) > 30) { // 视频大于30秒
|
||||||
|
reject(res)
|
||||||
|
} else {
|
||||||
|
resolve(res) // 视频剪辑后少于30秒
|
||||||
|
}
|
||||||
|
console.log('剪辑后的视频时长:' + parseFloat(res.duration / 1000).toFixed(0))
|
||||||
|
console.log('剪辑后的视频大小:' + res.size)
|
||||||
|
console.log('剪辑后的视频链接:' + res.tempFilePath)
|
||||||
|
console.log('剪辑后的视频图片链接:' + res.tempThumbPath)
|
||||||
|
},
|
||||||
|
fail: () => {}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancelFn() { // 取消方法
|
||||||
|
wx.hideLoading()
|
||||||
|
this.$emit('closeUploadVideo', '')
|
||||||
|
},
|
||||||
|
getOssConfig() {
|
||||||
|
let vm = this
|
||||||
|
wx.request({
|
||||||
|
url: `${service.host}/ali/upload/signature`,
|
||||||
|
header: {
|
||||||
|
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
||||||
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
|
},
|
||||||
|
method: 'get',
|
||||||
|
data: {},
|
||||||
|
success: ({code, data}) => {
|
||||||
|
vm.uploadData = data.data
|
||||||
|
vm.$app.$options.globalData.uploadData = data.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
let vm = this
|
||||||
|
vm.getOssConfig()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -8,6 +8,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
// 跳转事件校验是否已经完善注册资料
|
||||||
|
$signInVerify() {
|
||||||
|
return wx.getStorageSync('userInfo')
|
||||||
|
},
|
||||||
$callPhone(mobile) {
|
$callPhone(mobile) {
|
||||||
wx.makePhoneCall({
|
wx.makePhoneCall({
|
||||||
phoneNumber: mobile,
|
phoneNumber: mobile,
|
||||||
|
|||||||
@ -128,9 +128,9 @@ export default {
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.errorOne = 1
|
vm.errorOne = 1
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
wx.navigateBack({
|
// wx.navigateBack({
|
||||||
delta: 1
|
// delta: 1
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -9,9 +9,9 @@ page {
|
|||||||
<!--动态信息-->
|
<!--动态信息-->
|
||||||
<dynamicList :dynamicList="dynamicList" @changeSelect="changeSelect" :from="'dynamicDetail'"></dynamicList>
|
<dynamicList :dynamicList="dynamicList" @changeSelect="changeSelect" :from="'dynamicDetail'"></dynamicList>
|
||||||
<!--动态操作功能,selectData选择的动态数据、selectIndex选中的动态下标、admin是否管理员、from来自哪个父组件-->
|
<!--动态操作功能,selectData选择的动态数据、selectIndex选中的动态下标、admin是否管理员、from来自哪个父组件-->
|
||||||
<dynamicOperation :selectData="selectData" :chooseShow.sync="chooseShow" :selectIndex="selectIndex" :admin="admin" :from="'home'" @hideModal="hideModal" @operation="changeOperation"></dynamicOperation>
|
<dynamicOperation :selectData="selectData" :chooseShow.sync="chooseShow" :selectIndex="selectIndex" :admin="admin" :from="'home'" @hideModal="hideModal" @changeOperation="changeOperation"></dynamicOperation>
|
||||||
<!--评论数据-->
|
<!--评论数据-->
|
||||||
<dynamicDiscuss :list="list" :detail="detail"></dynamicDiscuss>
|
<dynamicDiscuss :list="list" :detail="detail" @getList="getList"></dynamicDiscuss>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -37,16 +37,12 @@ wepy.page({
|
|||||||
methods: {
|
methods: {
|
||||||
getDetail() {
|
getDetail() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$get({url: `${service.host}/moments/${vm.id}`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/moment/${vm.id}`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
let result = data.moment
|
let result = data
|
||||||
if (result.user) {
|
let sty = typeof (result.photos)
|
||||||
result.u_photo = result.user.avatar
|
if (sty == 'string') {
|
||||||
result.u_nickname = result.user.nickname
|
result.photos = JSON.parse(result.photos)
|
||||||
result.u_year = result.user.year
|
|
||||||
result.u_stature = result.user.stature
|
|
||||||
result.u_degree = result.user.degree
|
|
||||||
result.u_type = result.user.type
|
|
||||||
}
|
}
|
||||||
if (result.vote) {
|
if (result.vote) {
|
||||||
result.v_title = result.vote.title
|
result.v_title = result.vote.title
|
||||||
@ -54,10 +50,7 @@ wepy.page({
|
|||||||
if (result.topic) {
|
if (result.topic) {
|
||||||
result.mt_name = result.topic.name
|
result.mt_name = result.topic.name
|
||||||
}
|
}
|
||||||
result.comment_count = result.momentCommentCount
|
result.create_time = commentTimeHandle(result.create_time)
|
||||||
result.like_count = result.momentLikerCount
|
|
||||||
result.is_like = result.isLkerMoment
|
|
||||||
result.created_at = commentTimeHandle(result.created_at)
|
|
||||||
vm.detail = result
|
vm.detail = result
|
||||||
vm.dynamicList = [result]
|
vm.dynamicList = [result]
|
||||||
}
|
}
|
||||||
@ -71,10 +64,10 @@ wepy.page({
|
|||||||
getList() {
|
getList() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/moment/comments?id=${vm.id}&type=moment&nopage=1`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/moment/${vm.id}/comment/list?type=moment&nopage=1`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
item.created_at = commentTimeHandle(item.created_at)
|
item.create_time = commentTimeHandle(item.create_time)
|
||||||
item.comment = item.comment.split('?')[0]
|
item.comment = item.comment.split('?')[0]
|
||||||
})
|
})
|
||||||
vm.list = data
|
vm.list = data
|
||||||
|
|||||||
@ -156,7 +156,7 @@ wepy.page({
|
|||||||
methods: {
|
methods: {
|
||||||
getDetail() {
|
getDetail() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$get({url: `${service.host}/moment/topics/${vm.id}`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/moment/topic/${vm.id}`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
vm.detail = data
|
vm.detail = data
|
||||||
vm.$nextTick(() => {
|
vm.$nextTick(() => {
|
||||||
@ -186,11 +186,11 @@ wepy.page({
|
|||||||
page: vm.page
|
page: vm.page
|
||||||
}
|
}
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/moments/v2`, data}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/moment/list`, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
if (data.data && data.data.length > 0) {
|
if (data.data && data.data.length > 0) {
|
||||||
data.data.forEach((item, index) => {
|
data.data.forEach((item, index) => {
|
||||||
item.created_at = commentTimeHandle(item.created_at)
|
item.create_time = commentTimeHandle(item.create_time)
|
||||||
let sty = typeof (item.photos)
|
let sty = typeof (item.photos)
|
||||||
if (sty == 'string') {
|
if (sty == 'string') {
|
||||||
item.photos = JSON.parse(item.photos)
|
item.photos = JSON.parse(item.photos)
|
||||||
|
|||||||
@ -36,11 +36,6 @@ page {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags-v2{
|
|
||||||
background: #fff1f5;
|
|
||||||
color: #f33b6c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tags, .tags-v2 {
|
.tags, .tags-v2 {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
@ -68,6 +63,11 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tags-v2{
|
||||||
|
background: #fff1f5;
|
||||||
|
color: #f33b6c;
|
||||||
|
}
|
||||||
|
|
||||||
.hint {
|
.hint {
|
||||||
width: 340rpx;
|
width: 340rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
@ -105,6 +105,26 @@ page {
|
|||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid.col-04.grid-square > view:nth-child(3n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-dynamic-pic-item{
|
||||||
|
width:216rpx;
|
||||||
|
height:216rpx;
|
||||||
|
|
||||||
|
.ui-dynamic-pic {
|
||||||
|
border-radius: 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-delete-icon{
|
||||||
|
width:36rpx!important;
|
||||||
|
height:36rpx!important;
|
||||||
|
border-radius: 60rpx!important;
|
||||||
|
margin: 6rpx 6rpx 0 0!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.relative_bot{
|
.relative_bot{
|
||||||
.videoCenter{
|
.videoCenter{
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
@ -124,8 +144,8 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.d_solids{
|
.d_solids{
|
||||||
width: 224rpx;
|
width: 216rpx;
|
||||||
height: 224rpx;
|
height: 216rpx;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
}
|
}
|
||||||
@ -233,16 +253,16 @@ page {
|
|||||||
<view class="num ui-pr-30">{{value.length}}/500</view>
|
<view class="num ui-pr-30">{{value.length}}/500</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="hottopic">
|
<view class="hottopic">
|
||||||
<view class="text-sm flex">
|
<view class="text-sm flex" @tap="jumpPath">
|
||||||
<view class="f-fcc" v-if="title == ''">
|
<view class="f-fcc" v-if="title == ''">
|
||||||
<view class="tags f-fcc" catchtap="gotoHotTopic">
|
<view class="tags f-fcc">
|
||||||
<image class="img" src="https://images.ufutx.com/202103/03/23b49569624fb2516fa7267cb255b447.png" alt=""/>
|
<image class="img" src="https://images.ufutx.com/202103/03/23b49569624fb2516fa7267cb255b447.png" alt=""/>
|
||||||
选择话题
|
选择话题
|
||||||
</view>
|
</view>
|
||||||
<view class="hint">添加话题更容易获得回复哦</view>
|
<view class="hint">添加话题更容易获得回复哦</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="tags-v2 f-fcc" catchtap="gotoHotTopic">
|
<view class="tags-v2 f-fcc">
|
||||||
<image class="img" src="https://images.ufutx.com/202102/04/dc3043df7d265ae0b2401e589405a239.png" alt=""/>
|
<image class="img" src="https://images.ufutx.com/202102/04/dc3043df7d265ae0b2401e589405a239.png" alt=""/>
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</view>
|
</view>
|
||||||
@ -254,9 +274,9 @@ page {
|
|||||||
<view class="cu-form-group">
|
<view class="cu-form-group">
|
||||||
<view class="grid col-04 grid-square flex-sub">
|
<view class="grid col-04 grid-square flex-sub">
|
||||||
<block v-if="uploadType == 'image'">
|
<block v-if="uploadType == 'image'">
|
||||||
<view class="bg-img" style="width:216rpx;height:216rpx" v-for="(item,index) in imgList" :key="index" @tap="$previewImages(item, imgList)">
|
<view class="bg-img ui-dynamic-pic-item" v-for="(item,index) in imgList" :key="index" @tap="$previewImages(item, imgList)">
|
||||||
<image :src="item" mode="aspectFill"></image>
|
<image class="ui-dynamic-pic" :src="item" mode="aspectFill"></image>
|
||||||
<view class="cu-tag bg-red" style="width:36rpx;height:36rpx;border-radius:60rpx;margin:6rpx 6rpx 0 0" @tap="delImg" data-index="{{index}}">
|
<view class="cu-tag bg-red ui-delete-icon" @tap="delImg" data-index="{{index}}">
|
||||||
<text class="cuIcon-close"></text>
|
<text class="cuIcon-close"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -279,7 +299,7 @@ page {
|
|||||||
{{ address }}
|
{{ address }}
|
||||||
</view>
|
</view>
|
||||||
<view class="issue-main">
|
<view class="issue-main">
|
||||||
<view class="issue" bindtap="issue" data-id="{{id}}">发布</view>
|
<view class="issue" @tap="saveIssue">发布</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="showCon" class="modal-mask" @tap="showCon = false">
|
<view v-if="showCon" class="modal-mask" @tap="showCon = false">
|
||||||
@ -292,6 +312,8 @@ page {
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<uploadPic :num="9 - imgList.length" :chooseShow.sync="choosePicsShow" @changeVal="changeVal" @closeUploadPic="closeUpload"></uploadPic>
|
||||||
|
<uploadVideo :chooseShow.sync="chooseVideoShow" @changeVal="changeVideoVal" @closeUploadVideo="closeUpload"></uploadVideo>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -306,18 +328,64 @@ wepy.page({
|
|||||||
|
|
||||||
data: {
|
data: {
|
||||||
id: '',
|
id: '',
|
||||||
value: '',
|
|
||||||
placeholder: '用视频/图片分享记录,能获得更多好友点赞',
|
|
||||||
title: '',
|
title: '',
|
||||||
showCon: false,
|
hot: '',
|
||||||
|
value: '',
|
||||||
|
throttle: true,
|
||||||
|
placeholder: '用视频/图片分享记录,能获得更多好友点赞',
|
||||||
|
play_url: '',
|
||||||
|
chooseVideoShow: false,
|
||||||
|
choosePicsShow: false,
|
||||||
imgList: [],
|
imgList: [],
|
||||||
|
showCon: false,
|
||||||
uploadType: '',
|
uploadType: '',
|
||||||
address: '我在哪里'
|
address: '我在哪里'
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
saveIssue() {
|
||||||
|
let vm = this
|
||||||
|
let data = {
|
||||||
|
topic_id: vm.id,
|
||||||
|
content: vm.value,
|
||||||
|
photos: vm.imgList,
|
||||||
|
address: vm.address,
|
||||||
|
is_hot: vm.hot
|
||||||
|
}
|
||||||
|
if (vm.throttle) {
|
||||||
|
vm.throttle = false
|
||||||
|
vm.$post({url: `${service.host}/moment/add`, data}).then(({code}) => {
|
||||||
|
wx.hideLoading()
|
||||||
|
if (code == 0) {
|
||||||
|
}
|
||||||
|
vm.throttle = true
|
||||||
|
}).catch(() => {
|
||||||
|
vm.throttle = true
|
||||||
|
wx.hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
delImg(index) {
|
delImg(index) {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.imgList.splice(index, 1)
|
vm.imgList.splice(index, 1)
|
||||||
|
if (vm.imgList && vm.imgList.length == 0) {
|
||||||
|
vm.uploadType = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closeFn() {
|
||||||
|
let vm = this
|
||||||
|
wx.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '删除后需要重新上传哦!是否继续?',
|
||||||
|
confirmText: '确认删除',
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
vm.uploadType = ''
|
||||||
|
vm.play_url = ''
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
location() {
|
location() {
|
||||||
let vm = this
|
let vm = this
|
||||||
@ -376,13 +444,43 @@ wepy.page({
|
|||||||
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
|
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onShow() {
|
ChooseImage() {
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
let vm = this
|
let vm = this
|
||||||
|
vm.choosePicsShow = true
|
||||||
|
},
|
||||||
|
chooseVideo() {
|
||||||
|
let vm = this
|
||||||
|
vm.chooseVideoShow = true
|
||||||
|
},
|
||||||
|
changeVal(e) {
|
||||||
|
let vm = this
|
||||||
|
e.forEach((item) => {
|
||||||
|
vm.uploadType = 'image'
|
||||||
|
vm.imgList.push(item.filePath)
|
||||||
|
})
|
||||||
|
vm.choosePicsShow = false
|
||||||
|
console.log(vm.imgList, '777')
|
||||||
|
},
|
||||||
|
changeVideoVal(e) {
|
||||||
|
console.log(e, '711177')
|
||||||
|
let vm = this
|
||||||
|
if (e && e.length > 0) {
|
||||||
|
vm.play_url = e[0].filePath
|
||||||
|
vm.uploadType = 'video'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
closeUpload() {
|
||||||
|
let vm = this
|
||||||
|
vm.choosePicsShow = false
|
||||||
|
vm.chooseVideoShow = false
|
||||||
|
},
|
||||||
|
jumpPath() {
|
||||||
|
wx.navigateTo({url: `/pages/dynamic/searchTopic`})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {},
|
||||||
|
onLoad() {}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<config>
|
<config>
|
||||||
@ -390,5 +488,9 @@ wepy.page({
|
|||||||
navigationBarTitleText: '编辑动态',
|
navigationBarTitleText: '编辑动态',
|
||||||
backgroundColorTop: '#ffffff',
|
backgroundColorTop: '#ffffff',
|
||||||
backgroundColorBottom: '#ffffff',
|
backgroundColorBottom: '#ffffff',
|
||||||
|
usingComponents: {
|
||||||
|
uploadPic: '~@/components/uploadPic',
|
||||||
|
uploadVideo: '~@/components/uploadVideo',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</config>
|
</config>
|
||||||
|
|||||||
@ -84,7 +84,7 @@ page {
|
|||||||
<view class="main">
|
<view class="main">
|
||||||
<block v-for="(item,index) in list" :key="index">
|
<block v-for="(item,index) in list" :key="index">
|
||||||
<view class="cu-list menu-avatar">
|
<view class="cu-list menu-avatar">
|
||||||
<view class="cu-item" @tap="gotoHotTopic(item.id)">
|
<view class="cu-item" @tap="jumpPath(item.id)">
|
||||||
<view class="cu-avatar round lgs" style="{{'background-image:url(' + item.back_image + ');'}}"></view>
|
<view class="cu-avatar round lgs" style="{{'background-image:url(' + item.back_image + ');'}}"></view>
|
||||||
<view class="content flex-sub">
|
<view class="content flex-sub">
|
||||||
<view class="title"># {{item.name}}</view>
|
<view class="title"># {{item.name}}</view>
|
||||||
@ -123,7 +123,7 @@ wepy.page({
|
|||||||
page: vm.page
|
page: vm.page
|
||||||
}
|
}
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/moment/topics`, data}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/moment/topic/list`, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
if (vm.list.length === 0 || vm.page === 1) {
|
if (vm.list.length === 0 || vm.page === 1) {
|
||||||
vm.list = data.data
|
vm.list = data.data
|
||||||
@ -161,6 +161,11 @@ wepy.page({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
jumpPath (id) {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: `/pages/dynamic/hotTopic?id=${id}`
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 上拉获取更多数据
|
// 上拉获取更多数据
|
||||||
|
|||||||
@ -76,7 +76,7 @@ page {
|
|||||||
<view class="hot">
|
<view class="hot">
|
||||||
<view class="topic" v-if="!show">热门话题</view>
|
<view class="topic" v-if="!show">热门话题</view>
|
||||||
<view class="mains">
|
<view class="mains">
|
||||||
<view class="list f-fcc" v-for="(item,index) in list" :key="index">
|
<view class="list f-fcc" v-for="(item,index) in list" :key="index" @tap="handleHotTopic(item)">
|
||||||
# {{item.name}}
|
# {{item.name}}
|
||||||
<image v-if="item.is_hot == 1" class="img" src="https://images.ufutx.com/202103/02/0dffc4de154e82b1a75ae4c0a2a62ecf.png" />
|
<image v-if="item.is_hot == 1" class="img" src="https://images.ufutx.com/202103/02/0dffc4de154e82b1a75ae4c0a2a62ecf.png" />
|
||||||
</view>
|
</view>
|
||||||
@ -107,7 +107,7 @@ wepy.page({
|
|||||||
getList() {
|
getList() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/moment/topics`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/moment/topic/list`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
vm.list = data.data
|
vm.list = data.data
|
||||||
vm.arr = data.data
|
vm.arr = data.data
|
||||||
@ -119,6 +119,16 @@ wepy.page({
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleHotTopic(e) {
|
||||||
|
let pages = getCurrentPages()
|
||||||
|
let prevPage = pages[pages.length - 2]
|
||||||
|
prevPage.$wepy.id = e.id
|
||||||
|
prevPage.$wepy.title = e.name
|
||||||
|
prevPage.$wepy.is_hot = e.is_hot || ''
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
},
|
||||||
inputTyping(e) {
|
inputTyping(e) {
|
||||||
let vm = this
|
let vm = this
|
||||||
let key = e.$wx.detail.value
|
let key = e.$wx.detail.value
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import url(../../styles/theme.less);
|
@import url(../../styles/theme.less);
|
||||||
page {
|
page {
|
||||||
background-color: #ffffff;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
.ui-abnormal{
|
.ui-abnormal{
|
||||||
width: 100vw;
|
width: 100%;
|
||||||
min-height: 100vh;
|
|
||||||
padding-bottom: 300rpx;
|
padding-bottom: 300rpx;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
.ui-user-pic-box{
|
.ui-user-pic-box{
|
||||||
width: 92%;
|
padding: 0rpx 30rpx;
|
||||||
height: 690rpx;
|
height: 690rpx;
|
||||||
background: #f3f4f9;
|
background: #f3f4f9;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -59,7 +58,7 @@ page {
|
|||||||
|
|
||||||
.ui-bullet-wrap {
|
.ui-bullet-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 450rpx;
|
height: 200rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -82,23 +81,15 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ui-bullet-item[data-line='1'] {
|
.ui-bullet-item[data-line='1'] {
|
||||||
top: 45rpx;
|
top: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-bullet-item[data-line='2'] {
|
.ui-bullet-item[data-line='2'] {
|
||||||
top: 120rpx;
|
top: 86rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-bullet-item[data-line='3'] {
|
.ui-bullet-item[data-line='3'] {
|
||||||
top: 195rpx;
|
top: 146rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.ui-bullet-item[data-line='4'] {
|
|
||||||
top: 270rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-bullet-item[data-line='5'] {
|
|
||||||
top: 315rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes rightToleft {
|
@keyframes rightToleft {
|
||||||
@ -130,15 +121,6 @@ page {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.referencesIcon {
|
|
||||||
width: 124rpx;
|
|
||||||
height: 36rpx;
|
|
||||||
display: block;
|
|
||||||
margin-left: 16rpx;
|
|
||||||
margin-top: 2rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
max-width: 180rpx;
|
max-width: 180rpx;
|
||||||
}
|
}
|
||||||
@ -204,7 +186,6 @@ page {
|
|||||||
.VIPIcon{
|
.VIPIcon{
|
||||||
width: 76rpx;
|
width: 76rpx;
|
||||||
height: auto;
|
height: auto;
|
||||||
margin-top: 12rpx;
|
|
||||||
margin-left: 8rpx;
|
margin-left: 8rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -345,80 +326,6 @@ page {
|
|||||||
bottom: 13vh;
|
bottom: 13vh;
|
||||||
right: 32rpx;
|
right: 32rpx;
|
||||||
}
|
}
|
||||||
.recommended_user_box{
|
|
||||||
width: 94%;
|
|
||||||
padding: 22rpx 36rpx;
|
|
||||||
margin: auto;
|
|
||||||
background: #F8F8F8;
|
|
||||||
border-radius: 24rpx;
|
|
||||||
margin-top: 22rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
.recommended_title_box{
|
|
||||||
margin-bottom: 24rpx;
|
|
||||||
.recommended_icon{
|
|
||||||
width: 28rpx;
|
|
||||||
height: 32rpx;
|
|
||||||
vertical-align: middle;
|
|
||||||
margin-top: -4rpx;
|
|
||||||
}
|
|
||||||
.recommende_title{
|
|
||||||
margin-left: 10rpx;
|
|
||||||
letter-spacing: 1rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.recommended_user_data_box{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
/*justify-content: space-around; */
|
|
||||||
flex-wrap: wrap;
|
|
||||||
.recommended_user{
|
|
||||||
position: relative;
|
|
||||||
width: 308rpx;
|
|
||||||
height: 308rpx;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
margin-bottom: 24rpx;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
.mask{
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 308rpx;
|
|
||||||
height: 308rpx;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
|
|
||||||
}
|
|
||||||
.recommended_user_data{
|
|
||||||
color: #fff;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 20rpx;
|
|
||||||
left: 20rpx;
|
|
||||||
.recommended_user_name{
|
|
||||||
letter-spacing: 1rpx;
|
|
||||||
}
|
|
||||||
.age_address{
|
|
||||||
overflow: hidden;
|
|
||||||
.address_icon{
|
|
||||||
width: 20rpx;
|
|
||||||
height: 24rpx;
|
|
||||||
vertical-align: middle;
|
|
||||||
margin: -6rpx 4rpx 0 16rpx;
|
|
||||||
}
|
|
||||||
.address_text{
|
|
||||||
margin-left: 2rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.to_view_more{
|
|
||||||
text-align: center;
|
|
||||||
margin: 6rpx auto 0 auto;
|
|
||||||
letter-spacing: 1rpx;
|
|
||||||
color: #f33b6c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.ui-bottom-operation {
|
.ui-bottom-operation {
|
||||||
position: relative;
|
position: relative;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -435,19 +342,19 @@ page {
|
|||||||
.ui-operation{
|
.ui-operation{
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
padding: 0 90rpx 70rpx 80rpx;
|
padding: 0 50rpx 70rpx 26rpx;
|
||||||
}
|
}
|
||||||
.ui-share-icon, .m_share_img{
|
.ui-share-icon, .m_share_img{
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
}
|
}
|
||||||
.u_boBu {
|
.u_boBu {
|
||||||
width: 400rpx;
|
width: 508rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0 4rpx 24rpx 0 rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4rpx 24rpx 0 rgba(0, 0, 0, 0.1);
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
padding: 0 24rpx 0 76rpx;
|
padding: 0 34rpx 0 50rpx;
|
||||||
.ui-operation-btn{
|
.ui-operation-btn{
|
||||||
width: 184rpx;
|
width: 184rpx;
|
||||||
height: 68rpx;
|
height: 68rpx;
|
||||||
@ -458,14 +365,32 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ui-report-box{
|
.ui-praise-box{
|
||||||
border-radius: 30rpx 30rpx 0 0;
|
border-radius: 30rpx 30rpx 0 0!important;
|
||||||
.ui-report-item, .ui-report-item-v2{
|
background: #ffffff;
|
||||||
height: 102rpx;
|
.ui-praise-item{
|
||||||
border-top: 2rpx solid #f5f5f5;
|
padding: 6rpx 20rpx;
|
||||||
|
background: #f8f8f8;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.ui-report-item-v2{
|
.ui-active-praise{
|
||||||
border-top: 8rpx solid #f5f5f5;
|
color: #F33B6C;
|
||||||
|
background: #ffdfea;
|
||||||
|
}
|
||||||
|
.ui-praise-btn{
|
||||||
|
width: 420rpx;
|
||||||
|
height: 72rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background: linear-gradient(to right, #F33B6C 0%, #E2597C 100%);
|
||||||
|
margin: 120rpx auto 20rpx auto;
|
||||||
|
}
|
||||||
|
.cancelIcon{
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 30rpx;
|
||||||
|
top: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.g_apply {
|
.g_apply {
|
||||||
@ -564,7 +489,7 @@ page {
|
|||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view class="ui-information">
|
<view class="ui-information">
|
||||||
<block v-if="userInfo.is_banned == 1">
|
<block v-if="userInfo.other_info.is_banned == 1">
|
||||||
<view class="ui-abnormal">
|
<view class="ui-abnormal">
|
||||||
<view class="ui-user-pic-box">
|
<view class="ui-user-pic-box">
|
||||||
<image class="ui-user-pic" src="https://image.fulllinkai.com/202407/29/396698823907d0ff19b889cea3ac7e9f.jpeg" mode="aspectFill"></image>
|
<image class="ui-user-pic" src="https://image.fulllinkai.com/202407/29/396698823907d0ff19b889cea3ac7e9f.jpeg" mode="aspectFill"></image>
|
||||||
@ -575,7 +500,7 @@ page {
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-if="userInfo.hidden_profile == 'NONE'">
|
<block v-if="userInfo.other_info.hidden_profile == 'NONE'">
|
||||||
<view class="ui-abnormal">
|
<view class="ui-abnormal">
|
||||||
<view class="ui-pb-30" @tap="wantExposure" v-if="channel == 'recommend'">
|
<view class="ui-pb-30" @tap="wantExposure" v-if="channel == 'recommend'">
|
||||||
<view class="exposure f-fbc">
|
<view class="exposure f-fbc">
|
||||||
@ -601,34 +526,33 @@ page {
|
|||||||
<swiper class="ui-swiper" circular="true" autoplay="true" indicator-dots="true" indicator-color="#c5c5c5" indicator-active-color="#ffffff">
|
<swiper class="ui-swiper" circular="true" autoplay="true" indicator-dots="true" indicator-color="#c5c5c5" indicator-active-color="#ffffff">
|
||||||
<block v-for="(item,index) in userInfo.profile_photos" :key="index" v-if="index < 10">
|
<block v-for="(item,index) in userInfo.profile_photos" :key="index" v-if="index < 10">
|
||||||
<swiper-item class="ui-swiper ui-relative">
|
<swiper-item class="ui-swiper ui-relative">
|
||||||
<image :src="item.photo" class="ui-swiper" mode="aspectFill" @tap="previewImage(item.photo,userInfo.profile_photos)"></image>
|
<image :src="item" class="ui-swiper" mode="aspectFill" @tap.stop="$previewImages(item, userInfo.profile_photos)"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemInfo">
|
<view class="itemInfo">
|
||||||
<view class="nameBox">
|
<view class="nameBox">
|
||||||
<view class="color-333 ellipsis_1 font_32 bold name">{{ userInfo.nickname || userInfo.name }}</view>
|
<view class="color-333 ellipsis_1 font_32 bold name">{{ userInfo.base_profile.nickname }}</view>
|
||||||
<image class="referencesIcon" src="https://image.fulllinkai.com/202207/15/7e78a1dd367f1250d4cba4e85bfd60f1.png" mode="widthFix" v-if="userInfo.type != 'single'"></image>
|
<image src="https://images.ufutx.com/202101/30/e3a22a60849c3910e680d932772432b4.png" v-if="userInfo.base_profile.is_rank" mode="widthFix" class="VIPIcon"></image>
|
||||||
<image src="https://images.ufutx.com/202101/30/e3a22a60849c3910e680d932772432b4.png" v-if="userInfo.isSuperRank > 0" mode="widthFix" class="flo_l VIPIcon"></image>
|
<image src="https://images.ufutx.com/202101/30/004a146ad71658aaa2ad0f0263f960b8.png" mode="widthFix" v-else class="VIPIcon"></image>
|
||||||
<image src="https://images.ufutx.com/202101/30/004a146ad71658aaa2ad0f0263f960b8.png" mode="widthFix" v-else class="flo_l VIPIcon"></image>
|
|
||||||
</view>
|
</view>
|
||||||
<image :src="userInfo.avatar || userInfo.photo" @tap="previewImageV2(userInfo.avatar || userInfo.photo)" class="_photo flo_r" mode="aspectFill"></image>
|
<image :src="userInfo.base_profile.photo" @tap="previewImageV2(userInfo.base_profile.photo)" class="_photo flo_r" mode="aspectFill"></image>
|
||||||
<view class="clearfloat"></view>
|
<view class="clearfloat"></view>
|
||||||
<view class="ui-sex-box">
|
<view class="ui-sex-box">
|
||||||
<view class="sexBox">{{userInfo.fans_count}} 粉丝</view>
|
<view class="sexBox">{{userInfo.base_profile.fans_count}} 粉丝</view>
|
||||||
<view class="sexBox">{{userInfo.preview_count}} 浏览</view>
|
<view class="sexBox">{{userInfo.base_profile.preview_count}} 浏览</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemInfomation" v-if="userInfo.profile_courtship">
|
<view class="itemInfomation" v-if="userInfo.base_profile">
|
||||||
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/c0510638768e154a31d6befab67dcdf8.png"></image> {{profile_courtship.birthday || "未填写"}} · {{profile_courtship.sex == 1 ? '男':'女'}} </view>
|
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/c0510638768e154a31d6befab67dcdf8.png"></image> {{userInfo.base_profile.year || "未填写"}} · {{userInfo.base_profile.sex == 1 ? '男':'女'}} </view>
|
||||||
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/3f20187cff709ec748558b85994ca8ac.png"></image>{{profile_courtship.stature || "未填写"}}· {{profile_courtship.weight || "未填写"}}</view>
|
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/3f20187cff709ec748558b85994ca8ac.png"></image>{{userInfo.base_profile.stature || "未填写"}}· {{userInfo.base_profile.weight || "未填写"}}</view>
|
||||||
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/895b335c6680356e0161c6a925a8663d.png"></image>{{userInfo.type == 'single' && profile_courtship.state ? profile_courtship.state + '·': '' }} {{ profile_courtship.belief || "未填写" }}</view>
|
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/895b335c6680356e0161c6a925a8663d.png"></image>{{userInfo.base_profile.type == 'single' && userInfo.base_profile.state ? userInfo.base_profile.state + '·': '' }} {{ userInfo.base_profile.belief || "未填写" }}</view>
|
||||||
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/ac43cc923f3a9f91df858a89d14e716b.png"></image>{{profile_courtship.industry_sub || "未填写"}}</view>
|
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/ac43cc923f3a9f91df858a89d14e716b.png"></image>{{userInfo.base_profile.industry_sub || "未填写"}}</view>
|
||||||
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/ab39aa5d95c43c3c3a963fdd7d12e735.png"></image>现居{{profile_courtship.city || "未填写"}} · {{profile_courtship.resident_city || "未填写"}}</view>
|
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/ab39aa5d95c43c3c3a963fdd7d12e735.png"></image>现居{{userInfo.base_profile.city || "未填写"}} · {{userInfo.base_profile.resident_city || "未填写"}}</view>
|
||||||
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/8125ddac9473066531c7ea9971033e0d.png"></image>{{profile_courtship.degree || "未填写"}} · {{profile_courtship.graduate_school || "未填写"}}</view>
|
<view class="Info"> <image class="icon" src="https://images.ufutx.com/202103/11/8125ddac9473066531c7ea9971033e0d.png"></image>{{userInfo.base_profile.degree || "未填写"}} · {{userInfo.base_profile.graduate_school || "未填写"}}</view>
|
||||||
<view class="Info"> <image class="icon" src="https://image.fulllinkai.com/202311/27/4f350b8f5119ca398b1712ff1a5e284c.png"></image>{{profile_courtship.marry_by_time ? "期望"+ profile_courtship.marry_by_time+ "结婚" : "未填写"}}</view>
|
<view class="Info"> <image class="icon" src="https://image.fulllinkai.com/202311/27/4f350b8f5119ca398b1712ff1a5e284c.png"></image>{{userInfo.base_profile.marry_by_time ? "期望"+ userInfo.base_profile.marry_by_time+ "结婚" : "未填写"}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="userInfo.isCompleteProfile == false" class="remind">对方资料未完善,一键提醒Ta完善资料<span bindtap="handleRemind" data-id="{{userInfo.id}}">提醒Ta>></span> </view>
|
<view v-if="userInfo.base_profile.isCompleteProfile == false" class="remind">对方资料未完善,一键提醒Ta完善资料<span bindtap="handleRemind" data-id="{{userInfo.base_profile.id}}">提醒Ta>></span> </view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="font_28 _bc-center">
|
<view class="font_28 _bc-center">
|
||||||
@ -649,7 +573,7 @@ page {
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block v-if="userInfo.type == 'single'">
|
<block v-if="userInfo.base_profile.type == 'single'">
|
||||||
<view class="ui-approve-box">
|
<view class="ui-approve-box">
|
||||||
<!-- 自我描述 -->
|
<!-- 自我描述 -->
|
||||||
<view class="font_26 color666">
|
<view class="font_26 color666">
|
||||||
@ -657,7 +581,7 @@ page {
|
|||||||
<image src="https://images.ufutx.com/202011/26/7645858a1ae55dd7c3ef90ec7a42bfa3.png" mode="aspectFill" class="icon"></image>
|
<image src="https://images.ufutx.com/202011/26/7645858a1ae55dd7c3ef90ec7a42bfa3.png" mode="aspectFill" class="icon"></image>
|
||||||
<span class="font_30 bold color333">自我描述</span>
|
<span class="font_30 bold color333">自我描述</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_26 color333 _text">{{ profile_courtship.introduction || 'ta什么也没有留下' }}</view>
|
<view class="font_26 color333 _text">{{ userInfo.other_profile.introduction || 'ta什么也没有留下' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 兴趣爱好 -->
|
<!-- 兴趣爱好 -->
|
||||||
<view class="font_26 color666 ui-pt-20">
|
<view class="font_26 color666 ui-pt-20">
|
||||||
@ -670,7 +594,7 @@ page {
|
|||||||
<view class="u_idCon font_26 color333" v-if="item">{{ item }}</view>
|
<view class="u_idCon font_26 color333" v-if="item">{{ item }}</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_26 color333 _text">{{ profile_courtship.interest_hobby || 'ta什么也没有留下' }}</view>
|
<view class="font_26 color333 _text">{{ userInfo.other_profile.interest_hobby || 'ta什么也没有留下' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 期望对方 -->
|
<!-- 期望对方 -->
|
||||||
<view class="font_26 color666 ui-pt-20">
|
<view class="font_26 color666 ui-pt-20">
|
||||||
@ -683,12 +607,12 @@ page {
|
|||||||
<view class="u_idCon font_26 color333" v-if="item">{{ item }}</view>
|
<view class="u_idCon font_26 color333" v-if="item">{{ item }}</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_26 color333 ui-ml-40 ui-mr-40 ui-mt-4">{{ profile_courtship.ideal_mate || 'ta什么也没有留下' }}</view>
|
<view class="font_26 color333 ui-ml-40 ui-mr-40 ui-mt-4">{{ userInfo.other_profile.ideal_mate || 'ta什么也没有留下' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<block v-if="userInfo.type == 'single' && userInfo.id && userInfo.self != 1">
|
<block v-if="userInfo.base_profile.type == 'single' && userInfo.base_profile.id && userInfo.base_profile.self != 1">
|
||||||
<!-- 隐身访问 -->
|
<!-- 隐身访问 -->
|
||||||
<view class="boxStyleList f-fcc f-fdc ui-pt-30 ui-pb-30" @tap="hiddenChange">
|
<view class="boxStyleList f-fcc f-fdc ui-pt-30 ui-pb-30" @tap="hiddenChange">
|
||||||
<view class="font_32 color-theme">想要隐身访问Ta?</view>
|
<view class="font_32 color-theme">想要隐身访问Ta?</view>
|
||||||
@ -696,62 +620,25 @@ page {
|
|||||||
<view class="u_box_bu font_28">开启隐身访问</view>
|
<view class="u_box_bu font_28">开启隐身访问</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-if="userInfo.id && userInfo.self != 1">
|
<block v-if="userInfo.base_profile.id && userInfo.base_profile.self != 1">
|
||||||
<view class="boxStyleList">
|
<view class="boxStyleList">
|
||||||
<block v-if="userInfo.type == 'single'">
|
<view class="_item border text-center recommend" v-if="userInfo.base_profile.is_friend == 1" @tap="deletefriend">
|
||||||
<view v-if="token">
|
|
||||||
<button class="btn text-center _item border text-center recommend" open-type="share">
|
|
||||||
<image src="https://images.ufutx.com/202103/11/911d7ca4e2f82bcc5023b8b223574b31.png" mode="aspectFit" class="icon"></image>
|
|
||||||
将{{ profile_courtship.sex == 1 ? '他' : '她' }}推荐给好友
|
|
||||||
</button>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
<block>
|
|
||||||
<view class="_item border text-center recommend" v-if="userInfo.is_friend == 1" @tap="deletefriend(userInfo.id)">
|
|
||||||
<image src="https://images.ufutx.com/202103/11/0f148a7763958c65dac1a5ce929163dc.png" mode="aspectFit" class="icon"></image>
|
<image src="https://images.ufutx.com/202103/11/0f148a7763958c65dac1a5ce929163dc.png" mode="aspectFit" class="icon"></image>
|
||||||
取消{{profile_courtship.sex == 1?'他':'她'}}为好友</view>
|
取消{{userInfo.base_profile.sex == 1?'他':'她'}}为好友
|
||||||
<view class="_item border text-center recommend" v-else-if="userType != 'marriage'" @tap="dislikeFn">
|
</view>
|
||||||
<image src="https://images.ufutx.com/202103/11/0f148a7763958c65dac1a5ce929163dc.png" mode="aspectFit" class="icon"></image>
|
<view class="_item1 border text-center recommend" @tap="shield">
|
||||||
对{{profile_courtship.sex == 1?'他':'她'}}不感兴趣</view>
|
|
||||||
</block>
|
|
||||||
<block v-if="token && userType != 'marriage'">
|
|
||||||
<view class="_item1 border text-center recommend" @tap="modalName = 'report'">
|
|
||||||
<image src="https://images.ufutx.com/202103/11/182464043e2aadde7a75788eb852f0d4.png" mode="aspectFit" class="icon"></image>
|
<image src="https://images.ufutx.com/202103/11/182464043e2aadde7a75788eb852f0d4.png" mode="aspectFit" class="icon"></image>
|
||||||
举报或者拉黑
|
拉黑并屏蔽
|
||||||
</view>
|
</view>
|
||||||
</block>
|
<view class="_item1 border text-center recommend" @tap="report">
|
||||||
<view v-else-if="userType == 'marriage'" class="_item1 border text-center recommend" @tap="report">
|
|
||||||
<image src="https://images.ufutx.com/202103/11/182464043e2aadde7a75788eb852f0d4.png" mode="aspectFit" class="icon"></image>
|
<image src="https://images.ufutx.com/202103/11/182464043e2aadde7a75788eb852f0d4.png" mode="aspectFit" class="icon"></image>
|
||||||
举报
|
举报用户
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<!-- </template> -->
|
|
||||||
<view class="recommended_user_box" v-if="channel == 'recommend'">
|
|
||||||
<view class="recommended_title_box">
|
|
||||||
<image class="recommended_icon" src="https://images.ufutx.com/202012/04/f06c80348b175b5f920709de8e27bbde.png"></image>
|
|
||||||
<span class="recommende_title font32 bold">推荐用户</span>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="recommended_user_data_box">
|
<block v-if="userInfo.base_profile.self != 1">
|
||||||
<view class="recommended_user" v-for="(item,index) in recommendedList" style="background-image: url({{item.photo}})" :key="index" @tap="goToInformation(item.id)">
|
|
||||||
<view class="mask"></view>
|
|
||||||
<view class="recommended_user_data">
|
|
||||||
<view class="font28 bold recommended_user_name">{{item.nickname}}</view>
|
|
||||||
<view class="age_address font24">
|
|
||||||
<view class="flo_l">{{item.profile.age}}岁</view>
|
|
||||||
<view class="flo_l">
|
|
||||||
<image class="address_icon" src="https://images.ufutx.com/202012/04/9fd9ec3ebabffa12e4527ed8e0664473.png"></image>
|
|
||||||
<span class="address_text">{{item.profile.city}}</span>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="to_view_more font32" @tap="goToMore">查看更多</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<block v-if="userInfo.self != 1">
|
|
||||||
<view class="ui-bottom-operation">
|
<view class="ui-bottom-operation">
|
||||||
<image class="ui-mask-icon" src="https://image.fulllinkai.com/202407/30/dca7024d347433e1aa893ce15a056b10.png" mode="widthFix"></image>
|
<image class="ui-mask-icon" src="https://image.fulllinkai.com/202407/30/dca7024d347433e1aa893ce15a056b10.png" mode="widthFix"></image>
|
||||||
<view class="f-fbc ui-operation">
|
<view class="f-fbc ui-operation">
|
||||||
@ -759,9 +646,10 @@ page {
|
|||||||
<image class="ui-share-icon" src="https://image.fulllinkai.com/202407/30/a0c06b508211c748a046e22626627b5a.png" mode="widthFix"></image>
|
<image class="ui-share-icon" src="https://image.fulllinkai.com/202407/30/a0c06b508211c748a046e22626627b5a.png" mode="widthFix"></image>
|
||||||
</button>
|
</button>
|
||||||
<view class="u_boBu f-fbc">
|
<view class="u_boBu f-fbc">
|
||||||
<image v-if="userInfo.is_followed" class="ui-operation-btn-v2" src="https://image.fulllinkai.com/202407/30/48c1254fc413725432cc8d1c22be7440.png" mode="widthFix" @tap="attention"></image>
|
<image class="ui-operation-btn-v2" src="https://image.fulllinkai.com/202409/25/104374082c9e2bd160ee963b4f29c98f.png" mode="widthFix" @tap="modalName = 'praise'"></image>
|
||||||
|
<image v-if="userInfo.base_profile.is_followed" class="ui-operation-btn-v2" src="https://image.fulllinkai.com/202407/30/48c1254fc413725432cc8d1c22be7440.png" mode="widthFix" @tap="attention"></image>
|
||||||
<image v-else class="ui-operation-btn-v2" src="https://image.fulllinkai.com/202407/30/c7aa12666362515181a8f237a3ea48ff.png" mode="widthFix" @tap="attention"></image>
|
<image v-else class="ui-operation-btn-v2" src="https://image.fulllinkai.com/202407/30/c7aa12666362515181a8f237a3ea48ff.png" mode="widthFix" @tap="attention"></image>
|
||||||
<image v-if="userInfo.is_friend == 0" class="ui-operation-btn" src="https://image.fulllinkai.com/202407/30/58d9ec020a61a2d5370f2adb77489c18.png" mode="widthFix" @tap="contactFriendFn"></image>
|
<image v-if="userInfo.base_profile.is_friend == 0" class="ui-operation-btn" src="https://image.fulllinkai.com/202407/30/58d9ec020a61a2d5370f2adb77489c18.png" mode="widthFix" @tap="contactFriendFn"></image>
|
||||||
<image v-else class="ui-operation-btn" src="https://image.fulllinkai.com/202407/30/0bfb0220f4b120dc0b0e9b4fb7a70a7b.png" mode="widthFix" @tap="jumpPath('chitchat')"></image>
|
<image v-else class="ui-operation-btn" src="https://image.fulllinkai.com/202407/30/0bfb0220f4b120dc0b0e9b4fb7a70a7b.png" mode="widthFix" @tap="jumpPath('chitchat')"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -773,7 +661,7 @@ page {
|
|||||||
<view class="ui-abnormal" v-if="loading">
|
<view class="ui-abnormal" v-if="loading">
|
||||||
<view class="ui-user-pic-box">
|
<view class="ui-user-pic-box">
|
||||||
<image class="ui-user-pic" src="https://image.fulllinkai.com/202407/29/396698823907d0ff19b889cea3ac7e9f.jpeg" mode="aspectFill"></image>
|
<image class="ui-user-pic" src="https://image.fulllinkai.com/202407/29/396698823907d0ff19b889cea3ac7e9f.jpeg" mode="aspectFill"></image>
|
||||||
<image v-if="userInfo.hidden_profile_status != 1" src="https://image.fulllinkai.com/202203/22/0406319a6c0998836ca7391e588010b6.png" class="ui-mask" mode="aspectFill"></image>
|
<image v-if="userInfo.base_profile.hidden_profile_status != 1" src="https://image.fulllinkai.com/202203/22/0406319a6c0998836ca7391e588010b6.png" class="ui-mask" mode="aspectFill"></image>
|
||||||
<image v-else src="https://image.fulllinkai.com/202310/25/9643efd8588e76ddc045a2e2df757d30.png" class="ui-mask" mode="aspectFill"></image>
|
<image v-else src="https://image.fulllinkai.com/202310/25/9643efd8588e76ddc045a2e2df757d30.png" class="ui-mask" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-skeleton-pic"></view>
|
<view class="ui-skeleton-pic"></view>
|
||||||
@ -788,11 +676,16 @@ page {
|
|||||||
</poster>
|
</poster>
|
||||||
</block>
|
</block>
|
||||||
<!-- <wxShareCom :modalName.sync="modalName" :sharePic.sync="shareImg" @modalFn="modalFn"></wxShareCom>-->
|
<!-- <wxShareCom :modalName.sync="modalName" :sharePic.sync="shareImg" @modalFn="modalFn"></wxShareCom>-->
|
||||||
<view class="cu-modal bottom-modal {{modalName == 'report' ? 'show' : ''}}" @tap="modalName = ''">
|
<view class="cu-modal bottom-modal {{modalName == 'praise' ? 'show' : ''}}">
|
||||||
<view class="cu-dialog ui-pb-40 ui-report-box">
|
<view class="cu-dialog ui-pb-40 ui-praise-box ui-pl-30">
|
||||||
<view class="f-fcc font_28 color-333 ui-report-item" @tap="shield">拉黑并屏蔽</view>
|
<image class="cancelIcon" src="https://images.ufutx.com/202106/01/e536a423a145ae12ab4f6dc57f58588d.png" mode="widthFix" @tap="modalName = ''"></image>
|
||||||
<view class="f-fcc font_28 color-333 ui-report-item" @tap="report">举报用户</view>
|
<view class="font_30 bold color333 ui-pt-30">夸夸{{userInfo.base_profile.nickname}},引起Ta的注意吧</view>
|
||||||
<view class="f-fcc font_28 color-999 ui-report-item-v2" @tap="modalName = ''">取消</view>
|
<view class="font_24 color999">最多选3个,每天只有1次夸夸Ta的机会</view>
|
||||||
|
<view class="f-fcl flex-wrap">
|
||||||
|
<view class="ui-praise-item ui-mr-26 ui-mt-26 color333 font_26" :class="{'ui-active-praise' : item.state}" v-for="(item,index) in praiseList" :key="index" @tap="changePraise(item, index)">{{item.label}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="f-fcc colorF font_30 ui-praise-btn" @tap="sendPraise">确定</view>
|
||||||
|
<view class="color-theme font_26 ui-pb-20" @tap="refresh">换一批</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-modal {{modalName == 'Modal' ? 'show' : ''}}">
|
<view class="cu-modal {{modalName == 'Modal' ? 'show' : ''}}">
|
||||||
@ -801,23 +694,22 @@ page {
|
|||||||
<view class="m_apply_tt">
|
<view class="m_apply_tt">
|
||||||
<view class="f-fcc">
|
<view class="f-fcc">
|
||||||
<image class="u_apply_img" mode="widthFix" src="https://images.ufutx.com/202105/31/37e0eda3fe1fcc0af2cb3ca2a51d2291.png"></image>
|
<image class="u_apply_img" mode="widthFix" src="https://images.ufutx.com/202105/31/37e0eda3fe1fcc0af2cb3ca2a51d2291.png"></image>
|
||||||
<view class="font_34 color333 bold">{{userType != 'marriage' ? '打个招呼吧' : '添加单身'}}</view>
|
<view class="font_34 color333 bold">打个招呼吧</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_28 color666 ui-pt-16" v-if="userData.rank_id <= 0 && userType != 'marriage'">非会员每天只有3次打招呼</view>
|
<view class="font_28 color666 ui-pt-16" v-if="!userData.rank_id">非会员每天只有3次打招呼</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-left ff ui-pt-30 ui-pl-36 ui-pr-36">
|
<view class="text-left ff ui-pt-30 ui-pl-36 ui-pr-36">
|
||||||
<textarea type="text" v-if="userType != 'marriage'" disabled show-confirm-bar="{{false}}" placeholder="输入打招呼内容" class="inputStyle" v-model="message" @input="typing" maxlength="60"/>
|
<textarea type="text" disabled show-confirm-bar="{{false}}" placeholder="输入打招呼内容" class="inputStyle" v-model="message" @input="typing" maxlength="60"/>
|
||||||
<view v-else>{{message}}</view>
|
<view class="text_num text-right">{{message.length}} / 60</view>
|
||||||
<view class="text_num text-right" v-if="userType != 'marriage'">{{message.length}} / 60</view>
|
<view class="changeText text-right" @tap="getGreet(1)">
|
||||||
<view class="changeText text-right" v-if="userType != 'marriage'" @tap="getGreet(1)">
|
|
||||||
<image src="https://images.ufutx.com/202012/23/5b3b28530ad449fd04d51852ff1472ba.png" mode="aspectFit"></image>
|
<image src="https://images.ufutx.com/202012/23/5b3b28530ad449fd04d51852ff1472ba.png" mode="aspectFit"></image>
|
||||||
<span class="font_24 color-666">换一个</span>
|
<span class="font_24 color-666">换一个</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="f-fcc" :style="{paddingTop: userType == 'marriage' ? '40rpx' : ''}">
|
<view class="f-fcc">
|
||||||
<view class="u_apply_can f-fcc font_32 color999" @tap="modalName = ''">取消</view>
|
<view class="u_apply_can f-fcc font_32 color999" @tap="modalName = ''">取消</view>
|
||||||
<view class="font_30 u_apply_btn white f-fcc" @tap="sendMsg">发送</view>
|
<view class="font_30 u_apply_btn white f-fcc" @tap="sendMsg">发送</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_28 color999 text-center ui-pt-40" v-if="userData.rank_id<=0 && userType != 'marriage'">还剩{{userData.surplus_num}}次,<text class="color-theme" @tap="jumpPath('vip')">成为会员</text>将不限制打招呼</view>
|
<view class="font_28 color999 text-center ui-pt-40" v-if="!userData.rank_id">还剩{{userData.surplus_num}}次,<text class="color-theme" @tap="jumpPath('vip')">成为会员</text>将不限制打招呼</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -840,6 +732,7 @@ page {
|
|||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -854,12 +747,21 @@ wepy.page({
|
|||||||
mixins: [https, base],
|
mixins: [https, base],
|
||||||
|
|
||||||
data: {
|
data: {
|
||||||
|
loginShow: false,
|
||||||
|
waitBullets: [],
|
||||||
|
showingBullets: [],
|
||||||
|
lines: 3,
|
||||||
|
currentLine: 1,
|
||||||
|
isInfinite: true,
|
||||||
|
timer: null,
|
||||||
|
|
||||||
token: '',
|
token: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
userType: '',
|
userType: '',
|
||||||
id: '',
|
id: '',
|
||||||
message: '', // 打招呼信息
|
message: '', // 打招呼信息
|
||||||
loading: false,
|
loading: false,
|
||||||
|
throttle: true,
|
||||||
modalName: '', // 弹框
|
modalName: '', // 弹框
|
||||||
pairedScore: 0,
|
pairedScore: 0,
|
||||||
userData: {}, // 自己的数据信息
|
userData: {}, // 自己的数据信息
|
||||||
@ -870,6 +772,9 @@ wepy.page({
|
|||||||
{name: '真人未认证', activeName: '真人已认证', activeIcon: 'https://image.fulllinkai.com/202407/30/8f2700a35614c24f578ac6b5bf6e74c6.png', active: false, icon: 'https://image.fulllinkai.com/202202/23/c8a7f144e6eb593a5c494e700a212dac.png'},
|
{name: '真人未认证', activeName: '真人已认证', activeIcon: 'https://image.fulllinkai.com/202407/30/8f2700a35614c24f578ac6b5bf6e74c6.png', active: false, icon: 'https://image.fulllinkai.com/202202/23/c8a7f144e6eb593a5c494e700a212dac.png'},
|
||||||
{name: '学历未认证', activeName: '学历已认证', activeIcon: 'https://image.fulllinkai.com/202407/30/8f2700a35614c24f578ac6b5bf6e74c6.png', active: false, icon: 'https://image.fulllinkai.com/202202/23/c6e970db876230df0411eddd49d9e58f.png'}
|
{name: '学历未认证', activeName: '学历已认证', activeIcon: 'https://image.fulllinkai.com/202407/30/8f2700a35614c24f578ac6b5bf6e74c6.png', active: false, icon: 'https://image.fulllinkai.com/202202/23/c6e970db876230df0411eddd49d9e58f.png'}
|
||||||
],
|
],
|
||||||
|
praiseList: [],
|
||||||
|
praisePage: 1,
|
||||||
|
selectPraise: [],
|
||||||
interestLabel: [],
|
interestLabel: [],
|
||||||
showCondition: false,
|
showCondition: false,
|
||||||
conditionArr: [],
|
conditionArr: [],
|
||||||
@ -880,60 +785,166 @@ wepy.page({
|
|||||||
posterConfig: null // 分享海报数据
|
posterConfig: null // 分享海报数据
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getUserData () {
|
// 夸夸数据列表
|
||||||
|
getPraiseList () {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$post({url: `${service.host}/user/v3`}).then(({code, data}) => {
|
let list = []
|
||||||
|
vm.$get({url: `${service.host}/label/user/${vm.id}/list?page=${vm.praisePage}`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.userData = data
|
console.log(data, '夸夸列表')
|
||||||
|
if (data.data && data.data.length > 0) {
|
||||||
|
// 已选中的夸夸重新赋值到数组中
|
||||||
|
vm.selectPraise.forEach((j) => {
|
||||||
|
list.unshift(j)
|
||||||
|
})
|
||||||
|
data.data.forEach((item) => {
|
||||||
|
list.push({label: item.label, state: false})
|
||||||
|
})
|
||||||
|
let res = new Map()
|
||||||
|
vm.praiseList = JSON.parse(JSON.stringify(list.filter((list) => !res.has(list.label) && res.set(list.label, 1))))
|
||||||
|
}
|
||||||
|
if (data.data && data.data.length >= 9) {
|
||||||
|
vm.praisePage++
|
||||||
|
} else {
|
||||||
|
vm.praisePage = 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 夸夸TA换一批
|
||||||
|
refresh() {
|
||||||
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
vm.getPraiseList()
|
||||||
|
},
|
||||||
|
// 用户已有夸夸弹幕数据
|
||||||
|
getUserPraise () {
|
||||||
|
let vm = this
|
||||||
|
vm.$get({url: `${service.host}/label/user/${vm.id}/logs`}).then(({code, data}) => {
|
||||||
|
if (code == 0) {
|
||||||
|
console.log(data, '夸夸列表1')
|
||||||
|
if (data && data.length != 0) {
|
||||||
|
vm.waitBullets = []
|
||||||
|
data.forEach(item => {
|
||||||
|
let text = item.content.join(' ')
|
||||||
|
vm.waitBullets.push({
|
||||||
|
id: Math.random() + Math.random(),
|
||||||
|
name: text,
|
||||||
|
img: item.photo,
|
||||||
|
line: 0
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wx.hideLoading()
|
||||||
|
}).catch(() => {
|
||||||
|
wx.hideLoading()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 保存夸夸Ta
|
||||||
|
sendPraise() {
|
||||||
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let list = []
|
||||||
|
vm.selectPraise.forEach((item) => {
|
||||||
|
list.push(item.label)
|
||||||
|
})
|
||||||
|
if (list.length == 0) {
|
||||||
|
vm.$showToast('请选择至少1个夸夸Ta')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
labels: list
|
||||||
|
}
|
||||||
|
if (vm.throttle) {
|
||||||
|
vm.throttle = false
|
||||||
|
vm.$showLoading('')
|
||||||
|
vm.$post({url: `${service.host}/label/user/${vm.id}`, data}).then(({code, data}) => {
|
||||||
|
if (code == 0) {
|
||||||
|
vm.$showToast('夸夸Ta已发送')
|
||||||
|
vm.modalName = ''
|
||||||
|
}
|
||||||
|
vm.throttle = true
|
||||||
|
wx.hideLoading()
|
||||||
|
}).catch(() => {
|
||||||
|
vm.throttle = true
|
||||||
|
wx.hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showNextBullet() {
|
||||||
|
let vm = this
|
||||||
|
if (vm.waitBullets && vm.waitBullets.length == 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 先确定弹道,跟上一个弹道错开即可
|
||||||
|
vm.currentLine = (vm.currentLine % vm.lines) + 1
|
||||||
|
// 从等待集合里取出第一个
|
||||||
|
let currentBullet = JSON.parse(JSON.stringify(vm.waitBullets.shift()))
|
||||||
|
// vm.isInfinite &&
|
||||||
|
vm.waitBullets.push({
|
||||||
|
id: Math.random() + Math.random(),
|
||||||
|
name: currentBullet.name,
|
||||||
|
img: currentBullet.img,
|
||||||
|
isWished: false,
|
||||||
|
line: 0
|
||||||
|
})
|
||||||
|
// 设置弹幕的弹道
|
||||||
|
currentBullet.line = vm.currentLine
|
||||||
|
// 弹幕放进显示集合里,弹幕开始滚动
|
||||||
|
vm.showingBullets.push(currentBullet)
|
||||||
|
},
|
||||||
getDetail() {
|
getDetail() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/users/119488/v2`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/other/user/${vm.id}`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
wx.setNavigationBarTitle({
|
wx.setNavigationBarTitle({
|
||||||
title: data.nickname ? data.nickname : data.name
|
title: data.base_profile ? data.base_profile.nickname : '单身交友'
|
||||||
})
|
})
|
||||||
if (data.profile_courtship) {
|
if (data.base_profile) {
|
||||||
data.profile_courtship.city = data.profile_courtship.city ? data.profile_courtship.city.replace('市', '') : ''
|
data.base_profile.city = data.base_profile.city ? data.base_profile.city.replace('市', '') : ''
|
||||||
data.profile_courtship.resident_city = data.profile_courtship.resident_city ? data.profile_courtship.resident_city.replace('市', '人') : ''
|
data.base_profile.resident_city = data.base_profile.resident_city ? data.base_profile.resident_city.replace('市', '人') : ''
|
||||||
if (data.profile_courtship.stature) {
|
if (data.base_profile.stature) {
|
||||||
data.profile_courtship.stature = data.profile_courtship.stature == 139 ? '139cm以下' : data.profile_courtship.stature + 'cm'
|
data.base_profile.stature = data.base_profile.stature == 139 ? '139cm以下' : data.base_profile.stature + 'cm'
|
||||||
}
|
}
|
||||||
if (data.profile_courtship.weight) {
|
if (data.base_profile.weight) {
|
||||||
data.profile_courtship.weight = data.profile_courtship.weight == 39 ? '39kg以下' : data.profile_courtship.weight + 'kg'
|
data.base_profile.weight = data.base_profile.weight == 39 ? '39kg以下' : data.base_profile.weight + 'kg'
|
||||||
}
|
}
|
||||||
vm.profile_courtship = data.profile_courtship
|
vm.interestLabel = data.other_profile.interest_label
|
||||||
vm.profile_courtship.industry = data.industry
|
|
||||||
vm.profile_courtship.industry_sub = data.industry_sub
|
|
||||||
vm.interestLabel = data.profile_courtship.interest_label ? JSON.parse(data.profile_courtship.interest_label) : []
|
|
||||||
}
|
}
|
||||||
if (data.is_approved == '1') { // 实名
|
if (data.approve_profile.is_approved == '1') { // 实名
|
||||||
vm.approveList[0].active = true
|
vm.approveList[0].active = true
|
||||||
}
|
}
|
||||||
if (data.is_real_approved == '1') { // 真人
|
if (data.approve_profile.is_real_approved == '1') { // 真人
|
||||||
vm.approveList[1].active = true
|
vm.approveList[1].active = true
|
||||||
}
|
}
|
||||||
if (data.is_educate_approved == '1') { // 学历
|
if (data.approve_profile.is_educate_approved == '1') { // 学历
|
||||||
vm.approveList[2].active = true
|
vm.approveList[2].active = true
|
||||||
vm.approveList[2].activeName = data.profile_courtship.degree ? `${data.profile_courtship.degree}已认证` : '已认证'
|
vm.approveList[2].activeName = data.base_profile.degree ? `${data.base_profile.degree}已认证` : '已认证'
|
||||||
}
|
}
|
||||||
if (data.profile_courtship.mate_conditon instanceof Array) {
|
if (data.other_profile.mate_conditon instanceof Array) {
|
||||||
data.profile_courtship.mate_conditon.forEach(item => {
|
data.other_profile.mate_conditon.forEach(item => {
|
||||||
if (item.mate_condition) {
|
if (item.mate_condition) {
|
||||||
vm.conditionArr = item.mate_condition
|
vm.conditionArr = item.mate_condition
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
vm.conditionArr = Object.values(data.profile_courtship.mate_conditon)
|
// vm.conditionArr = Object.values(data.other_profile.mate_conditon)
|
||||||
// 插入期望ta多个城市
|
// 插入期望ta多个城市
|
||||||
if (data.profile_courtship.city_list_claim) {
|
if (data.other_profile.city_list_claim) {
|
||||||
let city_list_claim_arr = data.profile_courtship.city_list_claim.split(',')
|
let city_list_claim_arr = data.other_profile.city_list_claim.split(',')
|
||||||
city_list_claim_arr.forEach((city) => {
|
city_list_claim_arr.forEach((city) => {
|
||||||
vm.conditionArr.push(city)
|
vm.conditionArr.push(city)
|
||||||
})
|
})
|
||||||
@ -943,6 +954,10 @@ wepy.page({
|
|||||||
vm.showCondition = true
|
vm.showCondition = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.profile_photos && data.profile_photos.length == 0) {
|
||||||
|
data.profile_photos.push(data.base_profile.photo)
|
||||||
|
}
|
||||||
|
|
||||||
vm.userInfo = data
|
vm.userInfo = data
|
||||||
|
|
||||||
let num = 0
|
let num = 0
|
||||||
@ -950,12 +965,12 @@ wepy.page({
|
|||||||
if (data.self_is_real_approved == 1) { num = num + 50 }
|
if (data.self_is_real_approved == 1) { num = num + 50 }
|
||||||
vm.pairedScore = num
|
vm.pairedScore = num
|
||||||
|
|
||||||
if (data.photo || data.avatar) {
|
if (data.photo) {
|
||||||
let year = '', city = '', degree = '', industry_sub = data.industry_sub
|
let year = '', city = '', degree = '', industry_sub = data.base_profile.industry_sub
|
||||||
if (data.profile_courtship) {
|
if (data.base_profile) {
|
||||||
year = data.profile_courtship.birthday || ''
|
year = data.base_profile.year || ''
|
||||||
city = data.profile_courtship.city || ''
|
city = data.base_profile.city || ''
|
||||||
degree = data.profile_courtship.degree || ''
|
degree = data.base_profile.degree || ''
|
||||||
}
|
}
|
||||||
|
|
||||||
vm.posterConfig = {
|
vm.posterConfig = {
|
||||||
@ -968,7 +983,7 @@ wepy.page({
|
|||||||
{x: 20, y: 288 + 26, width: 200, lineHeight: 22, text: `${degree} | ${industry_sub}`, fontSize: 26, color: '#fff', zIndex: 99}
|
{x: 20, y: 288 + 26, width: 200, lineHeight: 22, text: `${degree} | ${industry_sub}`, fontSize: 26, color: '#fff', zIndex: 99}
|
||||||
],
|
],
|
||||||
images: [
|
images: [
|
||||||
{url: data.photo || data.avatar, width: 420, height: 336, y: 0, x: 0},
|
{url: data.base_profile.photo, width: 420, height: 336, y: 0, x: 0},
|
||||||
{url: 'https://image.fulllinkai.com/202206/20/be5b39dde1ad4720893b2e3c52b4480d.png', width: 420, height: 100, y: 236, x: 0},
|
{url: 'https://image.fulllinkai.com/202206/20/be5b39dde1ad4720893b2e3c52b4480d.png', width: 420, height: 100, y: 236, x: 0},
|
||||||
{url: 'https://image.fulllinkai.com/202206/20/bd732960011f55fed0e5e7d623118494.png', width: 136, height: 40, y: 276, x: 264}
|
{url: 'https://image.fulllinkai.com/202206/20/bd732960011f55fed0e5e7d623118494.png', width: 136, height: 40, y: 276, x: 264}
|
||||||
]
|
]
|
||||||
@ -987,9 +1002,29 @@ wepy.page({
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 选择夸夸选项
|
||||||
|
changePraise(e, index) {
|
||||||
|
let vm = this
|
||||||
|
if (!vm.praiseList[index].state) {
|
||||||
|
if (vm.selectPraise && vm.selectPraise.length >= 3) {
|
||||||
|
vm.$showToast('最多只能选择3个')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
vm.praiseList[index].state = true
|
||||||
|
vm.selectPraise.push({label: e.label, state: true})
|
||||||
|
} else {
|
||||||
|
vm.praiseList[index].state = false
|
||||||
|
vm.selectPraise = vm.selectPraise.filter(item => { return item.label != e.label })
|
||||||
|
}
|
||||||
|
},
|
||||||
// 关注
|
// 关注
|
||||||
attention() {
|
attention() {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/follow/users/119488`}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/follow/users/119488`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
@ -1017,9 +1052,12 @@ wepy.page({
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/friend/users/${vm.id}`}).then(({code, data}) => {
|
vm.$delete({url: `${service.host}/friend/user/${vm.id}`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.$showToast('好友已取消')
|
vm.$showToast('好友已取消')
|
||||||
|
setTimeout(() => {
|
||||||
|
wx.navigateBack({delta: 1})
|
||||||
|
}, 1200)
|
||||||
}
|
}
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -1034,6 +1072,11 @@ wepy.page({
|
|||||||
// 对Ta不感兴趣
|
// 对Ta不感兴趣
|
||||||
dislikeFn() {
|
dislikeFn() {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
content: '是否对Ta不感兴趣?标记为不感兴趣,下次系统将不再为您推荐Ta.',
|
content: '是否对Ta不感兴趣?标记为不感兴趣,下次系统将不再为您推荐Ta.',
|
||||||
@ -1058,17 +1101,22 @@ wepy.page({
|
|||||||
// 加入黑名单并屏蔽
|
// 加入黑名单并屏蔽
|
||||||
shield() {
|
shield() {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '加入黑名单',
|
title: '加入黑名单',
|
||||||
content: '拉黑后,对方将无法访问、关注、发送好友请求,也无法给你发消息,可以在【设置-黑名单】中取消',
|
content: '拉黑后,对方将无法访问、关注、发送好友请求,也无法给你发消息,可以在【设置-黑名单】中取消',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/blacklist/friends/${vm.id}`}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/user/${vm.id}/linking/blacklist`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.$showToast(`已加入黑名单`)
|
vm.$showToast(`已加入黑名单`)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wx.switchTab({url: '/pages/tabBar/news'})
|
wx.navigateBack({delta: 1})
|
||||||
}, 1200)
|
}, 1200)
|
||||||
}
|
}
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
@ -1084,18 +1132,25 @@ wepy.page({
|
|||||||
// 举报
|
// 举报
|
||||||
report() {
|
report() {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
vm.reportShow = false
|
vm.reportShow = false
|
||||||
wx.navigateTo({url: `/pages/users/report?id=${vm.id}&type=details`})
|
wx.navigateTo({url: `/pages/users/report?id=${vm.id}&type=details`})
|
||||||
},
|
},
|
||||||
// 隐身访问处理
|
// 隐身访问处理
|
||||||
hiddenChange() {
|
hiddenChange() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$post({url: `${service.host}/blacklist/friends/${vm.id}`}).then(({code, data}) => {
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
vm.$post({url: `${service.host}/other/user/${vm.id}/hidden`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.$showToast(`已加入黑名单`)
|
vm.$showToast(`已开启隐身访问`)
|
||||||
setTimeout(() => {
|
|
||||||
wx.switchTab({url: '/pages/tabBar/news'})
|
|
||||||
}, 1200)
|
|
||||||
}
|
}
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -1125,7 +1180,7 @@ wepy.page({
|
|||||||
// 获取打招呼信息
|
// 获取打招呼信息
|
||||||
getGreet(state) {
|
getGreet(state) {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$get({url: `${service.host}/greet/log?status=${state}`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/chat/greet/log?status=${state}`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.message = data.name
|
vm.message = data.name
|
||||||
}
|
}
|
||||||
@ -1135,8 +1190,10 @@ wepy.page({
|
|||||||
// 联系朋友
|
// 联系朋友
|
||||||
contactFriendFn() {
|
contactFriendFn() {
|
||||||
let vm = this
|
let vm = this
|
||||||
if (vm.userType == 'marriage') {
|
// 校验是否完成注册资料
|
||||||
vm.message = '你好,我有认识的单身嘉宾想认识你,可以沟通一下吗?'
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
}
|
}
|
||||||
vm.getGreet(0)
|
vm.getGreet(0)
|
||||||
},
|
},
|
||||||
@ -1161,14 +1218,28 @@ wepy.page({
|
|||||||
},
|
},
|
||||||
jumpPath(type) {
|
jumpPath(type) {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
if (type == 'chitchat') {
|
if (type == 'chitchat') {
|
||||||
wx.navigateTo({url: `/pages/news/groupChitchat?id=${vm.userInfo.id}&name=${encodeURIComponent(vm.userInfo.nickname)}&pic=${vm.userInfo.photo}&type=${vm.userInfo.type}`})
|
wx.navigateTo({url: `/pages/news/groupChitchat?id=${vm.userInfo.id}&name=${encodeURIComponent(vm.userInfo.nickname)}&pic=${vm.userInfo.photo}&type=${vm.userInfo.type}`})
|
||||||
} else if (type == 'vip' && !vm.isIos) {
|
} else if (type == 'vip' && !vm.isIos) {
|
||||||
wx.navigateTo({url: `/pages/users/upgradeVIP`})
|
wx.navigateTo({url: `/pages/users/upgradeVIP`})
|
||||||
}
|
}
|
||||||
vm.modalName = ''
|
vm.modalName = ''
|
||||||
|
},
|
||||||
|
hiddenLogin() {
|
||||||
|
let vm = this
|
||||||
|
vm.loginShow = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onHide() {
|
||||||
|
let vm = this
|
||||||
|
clearTimeout(this.timer)
|
||||||
|
vm.waitBullets = []
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let vm = this
|
let vm = this
|
||||||
const info = wx.getSystemInfoSync()
|
const info = wx.getSystemInfoSync()
|
||||||
@ -1181,10 +1252,17 @@ wepy.page({
|
|||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
vm.userData = wx.getStorageSync('userInfo')
|
||||||
vm.userId = wx.getStorageSync('user_id')
|
vm.userId = wx.getStorageSync('user_id')
|
||||||
vm.userType = wx.getStorageSync('type')
|
vm.userType = wx.getStorageSync('type')
|
||||||
vm.id = e.id
|
vm.id = e.id
|
||||||
vm.getDetail()
|
vm.getDetail()
|
||||||
|
vm.getPraiseList()
|
||||||
|
vm.getUserPraise()
|
||||||
|
vm.showNextBullet()
|
||||||
|
vm.timer = setInterval(() => {
|
||||||
|
vm.showNextBullet()
|
||||||
|
}, 3000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@ -1192,10 +1270,12 @@ wepy.page({
|
|||||||
{
|
{
|
||||||
navigationBarTitleText: '单身交友',
|
navigationBarTitleText: '单身交友',
|
||||||
enablePullDownRefresh: false,
|
enablePullDownRefresh: false,
|
||||||
backgroundColorTop: '#ffffff',
|
navigationBarBackgroundColor: '#f5f5f5',
|
||||||
backgroundColorBottom: '#ffffff',
|
backgroundColorTop: '#f5f5f5',
|
||||||
|
backgroundColorBottom: '#f5f5f5',
|
||||||
usingComponents: {
|
usingComponents: {
|
||||||
'poster': 'plugin://FL-plugin/poster'
|
'poster': 'plugin://FL-plugin/poster',
|
||||||
|
loginDialog: '~@/components/loginDialog',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</config>
|
</config>
|
||||||
|
|||||||
@ -199,14 +199,14 @@ wepy.page({
|
|||||||
degree: '', // 学历
|
degree: '', // 学历
|
||||||
degreeList: ['硕士以上', '本科以上', '专科以上', '不限'], // 学历
|
degreeList: ['硕士以上', '本科以上', '专科以上', '不限'], // 学历
|
||||||
belief: ['不限', '基督教', '佛教', '伊斯兰教', '其他'],
|
belief: ['不限', '基督教', '佛教', '伊斯兰教', '其他'],
|
||||||
beliefIndex: -1,
|
beliefIndex: 0,
|
||||||
industry: '',
|
industry: '',
|
||||||
industry_sub: '',
|
industry_sub: '',
|
||||||
Business: [],
|
Business: [],
|
||||||
multiIndex: [0, 0],
|
multiIndex: [0, 0],
|
||||||
objectMultiArray: [],
|
objectMultiArray: [],
|
||||||
incomeList: ['不限', '5w以下', '5~10w', '10~15w', '15~30w', '30~50w', '50~100w', '100~500w', '500w以上'],
|
incomeList: ['不限', '5w以下', '5~10w', '10~15w', '15~30w', '30~50w', '50~100w', '100~500w', '500w以上'],
|
||||||
incomeIndex: -1,
|
incomeIndex: 1,
|
||||||
|
|
||||||
sexIndex: '',
|
sexIndex: '',
|
||||||
ageIndex: '',
|
ageIndex: '',
|
||||||
@ -284,18 +284,18 @@ wepy.page({
|
|||||||
let vm = this
|
let vm = this
|
||||||
let data = {
|
let data = {
|
||||||
inputVal: vm.inputVal, // 上个页面搜索框内容
|
inputVal: vm.inputVal, // 上个页面搜索框内容
|
||||||
is_approved: vm.realNameList[parseInt(vm.realNameIndex)], // 实名认证
|
is_approved: vm.realNameList[parseInt(vm.realNameIndex)] == '不限' ? '' : vm.realNameList[parseInt(vm.realNameIndex)], // 实名认证
|
||||||
realNameIndex: vm.realNameIndex, // 实名认证
|
realNameIndex: vm.realNameIndex, // 实名认证
|
||||||
is_rank: vm.is_rank_list[parseInt(vm.vipIndex)], // vip会员
|
is_rank: vm.is_rank_list[parseInt(vm.vipIndex)] == '不限' ? '' : vm.is_rank_list[parseInt(vm.vipIndex)], // vip会员
|
||||||
vipIndex: vm.vipIndex, // vip会员下标
|
vipIndex: vm.vipIndex, // vip会员下标
|
||||||
degree: vm.degreeList[parseInt(vm.educateIndex)], // 学历
|
degree: vm.degreeList[parseInt(vm.educateIndex)] == '不限' ? '' : vm.degreeList[parseInt(vm.educateIndex)], // 学历
|
||||||
educateIndex: vm.educateIndex, // 学历下标
|
educateIndex: vm.educateIndex, // 学历下标
|
||||||
belief: vm.belief[vm.beliefIndex], // 信仰
|
belief: vm.belief[vm.beliefIndex] == '不限' ? '' : vm.belief[vm.beliefIndex], // 信仰
|
||||||
beliefIndex: vm.beliefIndex, // 信仰下标
|
beliefIndex: vm.beliefIndex, // 信仰下标
|
||||||
industry: vm.industry, // 职业
|
industry: vm.industry == '不限' ? '' : vm.industry, // 职业
|
||||||
industry_sub: vm.industry_sub, // 副职业
|
industry_sub: vm.industry_sub == '不限' ? '' : vm.industry_sub, // 副职业
|
||||||
multiIndex: vm.multiIndex, // 职业下标
|
multiIndex: vm.multiIndex, // 职业下标
|
||||||
income: vm.incomeList[vm.incomeIndex], // 年收入
|
income: vm.incomeList[vm.incomeIndex] ? '' : vm.incomeList[vm.incomeIndex], // 年收入
|
||||||
incomeIndex: vm.incomeIndex, // 年收入下标
|
incomeIndex: vm.incomeIndex, // 年收入下标
|
||||||
|
|
||||||
sexIndex: vm.sexIndex, // 性别下标
|
sexIndex: vm.sexIndex, // 性别下标
|
||||||
@ -322,10 +322,10 @@ wepy.page({
|
|||||||
vm.realNameIndex = params.realNameIndex
|
vm.realNameIndex = params.realNameIndex
|
||||||
vm.vipIndex = params.vipIndex
|
vm.vipIndex = params.vipIndex
|
||||||
vm.educateIndex = params.educateIndex
|
vm.educateIndex = params.educateIndex
|
||||||
vm.beliefIndex = params.beliefIndex ? parseInt(params.beliefIndex) : -1
|
vm.beliefIndex = params.beliefIndex ? parseInt(params.beliefIndex) : 0
|
||||||
vm.industry = params.industry
|
vm.industry = params.industry || '不限'
|
||||||
vm.industry_sub = params.industry_sub
|
vm.industry_sub = params.industry_sub
|
||||||
vm.incomeIndex = params.incomeIndex ? parseInt(params.incomeIndex) : -1
|
vm.incomeIndex = params.incomeIndex ? parseInt(params.incomeIndex) : 0
|
||||||
vm.multiIndex = params.multiIndex
|
vm.multiIndex = params.multiIndex
|
||||||
|
|
||||||
vm.sexIndex = params.sexIndex
|
vm.sexIndex = params.sexIndex
|
||||||
|
|||||||
@ -151,11 +151,11 @@ page {
|
|||||||
<view class="ui-searchUsers">
|
<view class="ui-searchUsers">
|
||||||
<view class="ui-top-box">
|
<view class="ui-top-box">
|
||||||
<view class="f-fcl">
|
<view class="f-fcl">
|
||||||
<image :src="userInfo.avatar || userInfo.photo" mode="aspectFill" class="ui-user-pic" @tap="jumpDetailPath(userInfo)"></image>
|
<image :src="userInfo.avatar" mode="aspectFill" class="ui-user-pic" @tap="jumpDetailPath(userInfo)"></image>
|
||||||
<view class="ui-relative">
|
<view class="ui-relative">
|
||||||
<image class="ui-search-icon" src="https://image.fulllinkai.com/202405/13/629916bd281b7afa1a61ed099db182cf.png" mode="widthFix"></image>
|
<image class="ui-search-icon" src="https://image.fulllinkai.com/202405/13/629916bd281b7afa1a61ed099db182cf.png" mode="widthFix"></image>
|
||||||
<input type="text" placeholder="搜索昵称" class="text-left ui-search-box" confirm-type="search" v-model="inputVal" focus="{{inputShowed}}" @confirm="initData" />
|
<input type="text" placeholder="搜索昵称" class="text-left ui-search-box" confirm-type="search" v-model="inputVal" focus="{{inputShowed}}" @confirm="initData" />
|
||||||
<image v-if="inputVal" class="ui-close-search-icon" src="https://image.fulllinkai.com/202307/04/a7f548083c45667843828e7fccef7d8c.png" mode="widthFix"></image>
|
<image v-if="inputVal" class="ui-close-search-icon" src="https://image.fulllinkai.com/202307/04/a7f548083c45667843828e7fccef7d8c.png" mode="widthFix" @tap="inputVal = ''"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="f-fbc">
|
<view class="f-fbc">
|
||||||
@ -198,12 +198,12 @@ page {
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="love_user_list_1" v-for="(item,index) in list" :key="index" @tap="jumpDetailPath(item)">
|
<view class="love_user_list_1" v-for="(item,index) in list" :key="index" @tap="jumpDetailPath(item)">
|
||||||
<view>
|
<view>
|
||||||
<image class="love_user_photo_1" :src="item.photo || item.avatar" mode="aspectFill"></image>
|
<image class="love_user_photo_1" :src="item.photo" mode="aspectFill"></image>
|
||||||
<view class="user_data_box_1">
|
<view class="user_data_box_1">
|
||||||
<view class="user_data_name_1 f-fbc">
|
<view class="user_data_name_1 f-fbc">
|
||||||
<view class="f-fc">
|
<view class="f-fc">
|
||||||
<view class="font_32 bold color333 name_1">{{item.nickname}}</view>
|
<view class="font_32 bold color333 name_1">{{item.nickname}}</view>
|
||||||
<image v-if="item.isSuperRank == 0" class="vipIcon_1" src="https://images.ufutx.com/202103/17/bfad7e2a8e86cf7912ff280234a35606.png" mode="widthFix"></image>
|
<image v-if="!is_rank" class="vipIcon_1" src="https://images.ufutx.com/202103/17/bfad7e2a8e86cf7912ff280234a35606.png" mode="widthFix"></image>
|
||||||
<image v-else class="vipIcon_1" src="https://images.ufutx.com/202103/17/d0913df8b234057229ab3dd102497a50.png" mode="widthFix"></image>
|
<image v-else class="vipIcon_1" src="https://images.ufutx.com/202103/17/d0913df8b234057229ab3dd102497a50.png" mode="widthFix"></image>
|
||||||
<view class="m_rpe f-fcc">
|
<view class="m_rpe f-fcc">
|
||||||
<image class="u_rpe_img" v-if="item.is_approved == 1" src="https://images.ufutx.com/202105/26/17b7eec949ba18e576d5de67bca00d94.png" mode="widthFix"></image>
|
<image class="u_rpe_img" v-if="item.is_approved == 1" src="https://images.ufutx.com/202105/26/17b7eec949ba18e576d5de67bca00d94.png" mode="widthFix"></image>
|
||||||
@ -249,31 +249,31 @@ wepy.page({
|
|||||||
data: {
|
data: {
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
inputVal: '',
|
inputVal: '',
|
||||||
sexIndex: 0,
|
sexIndex: 1,
|
||||||
sexList: [
|
sexList: [
|
||||||
{title: '不限', value: '不限', active: true},
|
{title: '不限', value: '', active: true},
|
||||||
{title: '只看男', value: 'single_man', active: false},
|
{title: '只看男', value: '1', active: false},
|
||||||
{title: '只看女', value: 'single_woman', active: false}
|
{title: '只看女', value: '2', active: false}
|
||||||
],
|
],
|
||||||
approveList: [
|
approveList: [
|
||||||
{title: '不限', value: '不限', active: true},
|
{title: '不限', value: '', active: true},
|
||||||
{title: '已认证', value: '已认证', active: false},
|
{title: '已认证', value: '已认证', active: false},
|
||||||
{title: '未认证', value: '未认证', active: false}
|
{title: '未认证', value: '未认证', active: false}
|
||||||
],
|
],
|
||||||
region: ['', '', ''],
|
region: ['', '', ''],
|
||||||
region_id: ['', '', ''],
|
region_id: ['', '', ''],
|
||||||
ageIndex: 0,
|
ageIndex: [5, 9],
|
||||||
ageList: [],
|
ageList: [],
|
||||||
sexText: '性别',
|
sexText: '性别',
|
||||||
ageText: '年龄',
|
ageText: '年龄',
|
||||||
cityText: '城市',
|
cityText: '城市',
|
||||||
searchList: [
|
searchList: [
|
||||||
{title: '不限', value: '不限', active: true},
|
{title: '不限', value: '', active: true},
|
||||||
{title: '超级VIP', value: '超级VIP', active: false},
|
{title: '超级VIP', value: '超级VIP', active: false},
|
||||||
{title: '普通会员', value: '普通会员', active: false}
|
{title: '普通会员', value: '普通会员', active: false}
|
||||||
],
|
],
|
||||||
beliefList: [
|
beliefList: [
|
||||||
{title: '不限', value: '不限', active: true},
|
{title: '不限', value: '', active: true},
|
||||||
{title: '基督教', value: '基督教', active: false},
|
{title: '基督教', value: '基督教', active: false},
|
||||||
{title: '其他', value: '其他', active: false}
|
{title: '其他', value: '其他', active: false}
|
||||||
],
|
],
|
||||||
@ -287,9 +287,10 @@ wepy.page({
|
|||||||
realNameIndex: 2, // 实名认证
|
realNameIndex: 2, // 实名认证
|
||||||
vipIndex: 2, // VIP会员
|
vipIndex: 2, // VIP会员
|
||||||
educateIndex: 3, // 学历
|
educateIndex: 3, // 学历
|
||||||
beliefIndex: -1, // 信仰
|
beliefIndex: 0, // 信仰
|
||||||
incomeIndex: -1, // 收入
|
incomeIndex: 0, // 收入
|
||||||
|
|
||||||
|
timer: null,
|
||||||
no_more: false,
|
no_more: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -300,35 +301,34 @@ wepy.page({
|
|||||||
let vm = this
|
let vm = this
|
||||||
let data = {
|
let data = {
|
||||||
page: vm.page,
|
page: vm.page,
|
||||||
min_age: vm.ageIndex ? vm.ageList[0][vm.ageIndex[0]] : '不限',
|
min_age: vm.ageIndex ? vm.ageList[0][vm.ageIndex[0]] : '',
|
||||||
max_age: vm.ageIndex ? vm.ageList[1][vm.ageIndex[1]] : '不限',
|
max_age: vm.ageIndex ? vm.ageList[1][vm.ageIndex[1]] : '',
|
||||||
province: vm.region[1] ? vm.region[1] : '不限',
|
province: vm.region[1] ? vm.region[1] : '',
|
||||||
city: vm.region[2] ? vm.region[2] : '不限',
|
city: vm.region[2] ? vm.region[2] : '',
|
||||||
sex: vm.sexList[vm.sexIndex].value,
|
sex: vm.sexList[vm.sexIndex].value,
|
||||||
is_approved: vm.is_approved ? vm.is_approved : '不限',
|
is_approved: vm.is_approved ? vm.is_approved : '',
|
||||||
is_rank: vm.is_VIP ? vm.is_VIP : '不限',
|
is_rank: vm.is_VIP ? vm.is_VIP : '',
|
||||||
degree: vm.is_degree ? vm.is_degree : '不限',
|
degree: vm.is_degree ? vm.is_degree : '',
|
||||||
belief: vm.belief ? vm.belief : '不限',
|
belief: vm.belief ? vm.belief : '',
|
||||||
industry: vm.is_industry ? vm.is_industry : '不限',
|
industry: vm.is_industry ? vm.is_industry : '',
|
||||||
industry_sub: vm.is_industry_sub ? vm.is_industry_sub : '不限',
|
industry_sub: vm.is_industry_sub ? vm.is_industry_sub : '',
|
||||||
income: vm.is_income ? vm.is_income : '不限'
|
income: vm.is_income ? vm.is_income : ''
|
||||||
}
|
}
|
||||||
console.log(data, '*/**********')
|
console.log(data, '*/**********')
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/user/list?keyword=${vm.inputVal}`, data}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/other/user/list?keyword=${vm.inputVal}`, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
vm.userInfo = data.user
|
|
||||||
if (vm.list.length === 0 || vm.page === 1) {
|
if (vm.list.length === 0 || vm.page === 1) {
|
||||||
vm.list = data.users.data
|
vm.list = data.data
|
||||||
} else {
|
} else {
|
||||||
data.users.data.map(function (item) {
|
data.data.map(function (item) {
|
||||||
vm.list.push(item)
|
vm.list.push(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (vm.list.length < 15 || data.users.data.length < 15) {
|
if (vm.list.length < 15 || data.data.length < 15) {
|
||||||
vm.no_more = true
|
vm.no_more = true
|
||||||
}
|
}
|
||||||
vm.record(data.users.data)
|
vm.record(data.data)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
vm.loading = true
|
vm.loading = true
|
||||||
}, 500)
|
}, 500)
|
||||||
@ -428,6 +428,17 @@ wepy.page({
|
|||||||
wx.navigateTo({url: `/pages/home/information?id=${e.id}`})
|
wx.navigateTo({url: `/pages/home/information?id=${e.id}`})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
inputVal () {
|
||||||
|
let vm = this
|
||||||
|
clearTimeout(vm.timer)
|
||||||
|
vm.timer = setTimeout(() => {
|
||||||
|
vm.page = 1
|
||||||
|
vm.no_more = false
|
||||||
|
vm.getList()
|
||||||
|
}, 800)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 上拉获取更多数据
|
// 上拉获取更多数据
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
let vm = this
|
let vm = this
|
||||||
@ -451,14 +462,18 @@ wepy.page({
|
|||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
vm.userInfo = wx.getStorageSync('userInfo')
|
||||||
|
if (vm.userInfo.sex == 1) {
|
||||||
|
vm.sexIndex = 2
|
||||||
|
}
|
||||||
if (e.params) {
|
if (e.params) {
|
||||||
let params = JSON.parse(e.params)
|
let params = JSON.parse(e.params)
|
||||||
vm.inputVal = params.inputVal
|
vm.inputVal = params.inputVal || ''
|
||||||
vm.belief = params.belief ? params.belief : '不限'
|
vm.belief = params.belief ? params.belief : ''
|
||||||
vm.is_approved = params.is_approved ? params.is_approved : '不限'
|
vm.is_approved = params.is_approved ? params.is_approved : ''
|
||||||
vm.is_VIP = params.is_rank ? params.is_rank : '不限'
|
vm.is_VIP = params.is_rank ? params.is_rank : ''
|
||||||
vm.is_degree = params.degree ? params.degree : '不限'
|
vm.is_degree = params.degree ? params.degree : ''
|
||||||
vm.is_industry = params.industry ? params.industry : '不限'
|
vm.is_industry = params.industry ? params.industry : ''
|
||||||
vm.is_industry_sub = params.industry_sub ? params.industry_sub : ''
|
vm.is_industry_sub = params.industry_sub ? params.industry_sub : ''
|
||||||
vm.multiIndex = params.multiIndex
|
vm.multiIndex = params.multiIndex
|
||||||
vm.ageIndex = params.ageIndex
|
vm.ageIndex = params.ageIndex
|
||||||
|
|||||||
@ -105,7 +105,7 @@ page {
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="ui-pb-20">
|
<view class="ui-pb-20">
|
||||||
<view class="recommended_user_data_box">
|
<view class="recommended_user_data_box">
|
||||||
<view class="recommended_user" v-for="(item,index) in list" :key="index">
|
<view class="recommended_user" v-for="(item,index) in list" :key="index" @tap="jumpPath(`/pages/home/information?id=${item.id}`)">
|
||||||
<image class="userPhoto" :src="item.photo" mode="aspectFill"></image>
|
<image class="userPhoto" :src="item.photo" mode="aspectFill"></image>
|
||||||
<view class="mask"></view>
|
<view class="mask"></view>
|
||||||
<view class="recommended_user_data">
|
<view class="recommended_user_data">
|
||||||
@ -146,7 +146,7 @@ wepy.page({
|
|||||||
page: 1,
|
page: 1,
|
||||||
list: [], // 列表数据
|
list: [], // 列表数据
|
||||||
verify: {},
|
verify: {},
|
||||||
recommendShow: true,
|
recommendShow: false,
|
||||||
intentionShow: false,
|
intentionShow: false,
|
||||||
recommendData: {}
|
recommendData: {}
|
||||||
},
|
},
|
||||||
@ -154,11 +154,10 @@ wepy.page({
|
|||||||
getList() {
|
getList() {
|
||||||
let vm = this
|
let vm = this
|
||||||
let data = {
|
let data = {
|
||||||
area_id: vm.id,
|
|
||||||
page: vm.page
|
page: vm.page
|
||||||
}
|
}
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/area/users/v2`, data}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/area/${vm.id}/users`, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
if (vm.list.length === 0 || vm.page === 1) {
|
if (vm.list.length === 0 || vm.page === 1) {
|
||||||
vm.list = data.data
|
vm.list = data.data
|
||||||
@ -237,6 +236,9 @@ wepy.page({
|
|||||||
if (state) {
|
if (state) {
|
||||||
vm.verify.has_apply_area = state
|
vm.verify.has_apply_area = state
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
jumpPath(url) {
|
||||||
|
wx.navigateTo({url: url})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 上拉获取更多数据
|
// 上拉获取更多数据
|
||||||
|
|||||||
@ -781,9 +781,9 @@ wepy.page({
|
|||||||
let vm = this
|
let vm = this
|
||||||
let timeData = new Date().getTime()
|
let timeData = new Date().getTime()
|
||||||
let data = {
|
let data = {
|
||||||
to_user_id: vm.otherUserId,
|
other_user_id: vm.otherUserId,
|
||||||
content: vm.msg,
|
field_7: vm.msg,
|
||||||
type: 'text'
|
field_6: 'text'
|
||||||
}
|
}
|
||||||
if (!vm.msg) {
|
if (!vm.msg) {
|
||||||
vm.$showToast('请输入聊天内容')
|
vm.$showToast('请输入聊天内容')
|
||||||
@ -852,9 +852,9 @@ wepy.page({
|
|||||||
sendPictures(file) {
|
sendPictures(file) {
|
||||||
let vm = this
|
let vm = this
|
||||||
let data = {
|
let data = {
|
||||||
to_user_id: vm.otherUserId,
|
other_user_id: vm.otherUserId,
|
||||||
content: vm.msg,
|
field_7: vm.msg,
|
||||||
type: 'picture'
|
field_6: 'picture'
|
||||||
}
|
}
|
||||||
vm.openShow = false
|
vm.openShow = false
|
||||||
vm.uploadState = true
|
vm.uploadState = true
|
||||||
|
|||||||
@ -369,25 +369,25 @@ page {
|
|||||||
<view class="ui-item-data" @tap="jumpPath(item)">
|
<view class="ui-item-data" @tap="jumpPath(item)">
|
||||||
<view class="weuis" @tap.stop="jumpDetailPath(item)">
|
<view class="weuis" @tap.stop="jumpDetailPath(item)">
|
||||||
<view class="dist dot" v-if="item.status == 0"></view>
|
<view class="dist dot" v-if="item.status == 0"></view>
|
||||||
<image :src="tabBarIndex === 0 ? (item.other_user.avatar || item.other_user.photo) : (item.receive_user.avatar || item.receive_user.photo)" mode="aspectFill" class="bc_acatar"></image>
|
<image :src="item.user.photo" mode="aspectFill" class="bc_acatar"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="rit weuis">
|
<view class="rit weuis">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="font_32 color333 bold name">
|
<view class="font_32 color333 bold name">
|
||||||
{{tabBarIndex === 0 ? item.other_user.nickname :item.receive_user.nickname }}
|
{{item.user.nickname }}
|
||||||
</view>
|
</view>
|
||||||
<block v-if="tabBarIndex === 0 ? item.other_user.type !== 'single' :item.receive_user.type !== 'single'">
|
<block v-if="item.user.type !== 'single'">
|
||||||
<image class="referencesIcon" src="https://image.fulllinkai.com/202207/15/7e78a1dd367f1250d4cba4e85bfd60f1.png" mode="widthFix"></image>
|
<image class="referencesIcon" src="https://image.fulllinkai.com/202207/15/7e78a1dd367f1250d4cba4e85bfd60f1.png" mode="widthFix"></image>
|
||||||
</block>
|
</block>
|
||||||
<view class="font_24 time">{{ item.created_at }}</view>
|
<view class="font_24 time">{{ item.create_time }}</view>
|
||||||
<block v-if="tabBarIndex === 0 ? item.other_user.type == 'single' : item.receive_user.type == 'single'">
|
<block v-if="item.user.type == 'single'">
|
||||||
<image v-if="tabBarIndex === 0 ? item.other_user.is_super_rank == 0 : item.receive_user.is_super_rank == 0" class="Vip flo_l bg-img" src="https://images.ufutx.com/202102/04/bfad7e2a8e86cf7912ff280234a35606.png"></image>
|
<image v-if="item.user.rank_id == 0" class="Vip flo_l bg-img" src="https://images.ufutx.com/202102/04/bfad7e2a8e86cf7912ff280234a35606.png"></image>
|
||||||
<image v-else class="Vip flo_l bg-img" src="https://images.ufutx.com/202102/04/d0913df8b234057229ab3dd102497a50.png"></image>
|
<image v-else class="Vip flo_l bg-img" src="https://images.ufutx.com/202102/04/d0913df8b234057229ab3dd102497a50.png"></image>
|
||||||
<view class="age {{tabBarIndex === 0 ? (item.other_user.sex == 1?'sex1':'') : (item.receive_user.sex == 1?'sex1':'') }}">
|
<view class="age {{item.user.sex == 1?'sex1':''}}">
|
||||||
<image v-if="tabBarIndex === 0 ? item.other_user.sex == 1 : item.receive_user.sex == 1" class="img" src="https://images.ufutx.com/202101/27/1fc8381ccac933612936bb617a5ae906.png" alt=""/>
|
<image v-if="item.user.sex == 1" class="img" src="https://images.ufutx.com/202101/27/1fc8381ccac933612936bb617a5ae906.png" alt=""/>
|
||||||
<image v-else class="img" src="https://images.ufutx.com/202101/27/f17913a8fc57de75dc0046db6c317b35.png" alt=""/>
|
<image v-else class="img" src="https://images.ufutx.com/202101/27/f17913a8fc57de75dc0046db6c317b35.png" alt=""/>
|
||||||
<view v-if="tabBarIndex === 0 ? item.other_user.age == null : item.receive_user.age == null">0</view>
|
<view v-if="item.user.age == null">0</view>
|
||||||
<view v-else>{{ tabBarIndex === 0 ? item.other_user.age : item.receive_user.age }}</view>
|
<view v-else>{{ item.user.age }}</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
@ -515,14 +515,20 @@ wepy.page({
|
|||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
let vm = this
|
let vm = this
|
||||||
|
let url = ``
|
||||||
|
if (vm.tabBarIndex == 0) {
|
||||||
|
url = `${service.host}/notice/receive/friend/request/list`
|
||||||
|
} else {
|
||||||
|
url = `${service.host}/notice/send/friend/request/list`
|
||||||
|
}
|
||||||
let data = {
|
let data = {
|
||||||
page: vm.page
|
page: vm.page
|
||||||
}
|
}
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/friend/request/logs/v2?type=${vm.tabBarIndex === 0 ? 'receive' : 'send'}`, data}).then(({code, data}) => {
|
vm.$get({url: url, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
data.data.forEach((item) => {
|
data.data.forEach((item) => {
|
||||||
item.created_at = item.created_at.split(' ', 1)
|
item.create_time = item.create_time.split(' ', 1)
|
||||||
})
|
})
|
||||||
if (vm.list.length === 0 || vm.page === 1) {
|
if (vm.list.length === 0 || vm.page === 1) {
|
||||||
vm.list = data.data
|
vm.list = data.data
|
||||||
@ -572,12 +578,10 @@ wepy.page({
|
|||||||
}
|
}
|
||||||
if (e) {
|
if (e) {
|
||||||
data = {
|
data = {
|
||||||
id: vm.id,
|
|
||||||
status: 1
|
status: 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data = {
|
data = {
|
||||||
id: vm.id,
|
|
||||||
status: -1,
|
status: -1,
|
||||||
reply: vm.rejectText,
|
reply: vm.rejectText,
|
||||||
refuse_tag: reject
|
refuse_tag: reject
|
||||||
@ -594,7 +598,7 @@ wepy.page({
|
|||||||
}
|
}
|
||||||
if (vm.throttle) {
|
if (vm.throttle) {
|
||||||
vm.throttle = false
|
vm.throttle = false
|
||||||
vm.$post({url: `${service.host}/deal/friend/request/v2`, data}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/notice/deal/friend/request/${vm.id}`, data}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
if (e) {
|
if (e) {
|
||||||
vm.$showToast('已添加为好友')
|
vm.$showToast('已添加为好友')
|
||||||
@ -654,12 +658,12 @@ wepy.page({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ((vm.tabBarIndex == 0 && e.status != '0') || (vm.tabBarIndex == 1 && e.status != '-1')) {
|
if ((vm.tabBarIndex == 0 && e.status != '0') || (vm.tabBarIndex == 1 && e.status != '-1')) {
|
||||||
url = `/pages/home/information?id=${vm.tabBarIndex == 0 ? e.other_user.id : e.receive_user.id}`
|
url = `/pages/home/information?id=${e.user.id}`
|
||||||
wx.navigateTo({url: url})
|
wx.navigateTo({url: url})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 好友申请是否已经真人认证
|
// 好友申请是否已经真人认证
|
||||||
if (e.other_user.is_real_approved != 1) {
|
if (e.user.is_real_approved != 1) {
|
||||||
vm.approveTips = true
|
vm.approveTips = true
|
||||||
vm.approveState = true
|
vm.approveState = true
|
||||||
}
|
}
|
||||||
@ -670,16 +674,15 @@ wepy.page({
|
|||||||
// 好友申请获取申请用户数据
|
// 好友申请获取申请用户数据
|
||||||
vm.msg = e.message
|
vm.msg = e.message
|
||||||
vm.id = e.id
|
vm.id = e.id
|
||||||
vm.name = e.other_user.nickname
|
vm.name = e.user.nickname
|
||||||
vm.sex = e.other_user.sex
|
vm.sex = e.user.sex
|
||||||
vm.userId = e.other_user.id
|
vm.userId = e.user.id
|
||||||
vm.userType = e.other_user.type
|
vm.userType = e.user.type
|
||||||
vm.pic = e.other_user.avatar || e.other_user.photo
|
vm.pic = e.user.photo
|
||||||
vm.applyForShow = true
|
vm.applyForShow = true
|
||||||
},
|
},
|
||||||
jumpDetailPath(e) {
|
jumpDetailPath(e) {
|
||||||
let vm = this
|
wx.navigateTo({url: `/pages/home/information?id=${e.user.id}`})
|
||||||
wx.navigateTo({url: `/pages/home/information?id=${vm.tabBarIndex == 0 ? e.other_user.id : e.receive_user.id}`})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 上拉获取更多数据
|
// 上拉获取更多数据
|
||||||
|
|||||||
@ -724,7 +724,7 @@ wepy.page({
|
|||||||
// 获取群成员信息
|
// 获取群成员信息
|
||||||
getMembers() {
|
getMembers() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$post({url: `${service.host}/chat/group/detail?team_id=${vm.otherUserId}`}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/team/${vm.otherUserId}/detail`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
// 第一次进入页面的时候才请求历史消息
|
// 第一次进入页面的时候才请求历史消息
|
||||||
if (!vm.membersData.id) {
|
if (!vm.membersData.id) {
|
||||||
|
|||||||
@ -141,8 +141,8 @@ page {
|
|||||||
<view class="ui-member-block" v-for="(item,index) in detail.members" :key="index">
|
<view class="ui-member-block" v-for="(item,index) in detail.members" :key="index">
|
||||||
<block v-if="hidden">
|
<block v-if="hidden">
|
||||||
<view class="ui-member-box">
|
<view class="ui-member-box">
|
||||||
<image @tap.stop="jumpPath(item)" class="ui-member-pic" :src="item.avatar === 'https://image.fulllinkai.com/202207/04/1fa9a906b956efa26852fb685a845fff.png?x-oss-process=style/scale1' ? defaultImg : item.avatar" mode="aspectFill"></image>
|
<image @tap.stop="jumpPath(item)" class="ui-member-pic" :src="item.photo === 'https://image.fulllinkai.com/202207/04/1fa9a906b956efa26852fb685a845fff.png?x-oss-process=style/scale1' ? defaultImg : item.photo" mode="aspectFill"></image>
|
||||||
<view class="ui-member-name color-666 font_22 ellipsis_1">{{item.pivot.nick ? item.pivot.nick :item.nickname}}</view>
|
<view class="ui-member-name color-666 font_22 ellipsis_1">{{item.nickname}}</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
@ -163,24 +163,24 @@ page {
|
|||||||
<view class="ui-group-detail">
|
<view class="ui-group-detail">
|
||||||
<view class="ui-detail-list">
|
<view class="ui-detail-list">
|
||||||
<view class="ui-detail-title bold font30 color-333">群聊头像</view>
|
<view class="ui-detail-title bold font30 color-333">群聊头像</view>
|
||||||
<image class="ui-detail-pic" :src="detail.icon" mode="aspectFill"></image>
|
<image class="ui-detail-pic" :src="detail.team.icon" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-detail-line"></view>
|
<view class="ui-detail-line"></view>
|
||||||
<view class="ui-detail-list">
|
<view class="ui-detail-list">
|
||||||
<view class="ui-detail-title bold font30 color-333">群聊名称</view>
|
<view class="ui-detail-title bold font30 color-333">群聊名称</view>
|
||||||
<view class="ui-detail-name ellipsis_1 font30 color-666">{{ detail.tname }}</view>
|
<view class="ui-detail-name ellipsis_1 font30 color-666">{{ detail.team.tname }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-detail-line"></view>
|
<view class="ui-detail-line"></view>
|
||||||
<view class="ui-detail-list" v-if="detail.is_join == 1">
|
<view class="ui-detail-list" v-if="detail.is_join == 1">
|
||||||
<view class="ui-detail-title bold font30 color-333">我在本群的昵称</view>
|
<view class="ui-detail-title bold font30 color-333">我在本群的昵称</view>
|
||||||
<view class="ui-detail-name ellipsis_1 font30 color-666">
|
<view class="ui-detail-name ellipsis_1 font30 color-666">
|
||||||
<input class=" ui-detail-name-text" adjust-position="{{true}}" type="text" confirm-type="done" placeholder="请输入不超过12个字符" @enter="changeGroupName" maxlength="12" cursor-spacing="20" v-model="detail.user_team.nick" @confirm="changeGroupName"/>
|
<input class=" ui-detail-name-text" adjust-position="{{true}}" type="text" confirm-type="done" placeholder="请输入不超过12个字符" @enter="changeGroupData" maxlength="12" cursor-spacing="20" v-model="detail.user_team.nick" @confirm="changeGroupData"/>
|
||||||
<image id="img" class="ui-detail-name-icon" src="https://image.fulllinkai.com/202308/11/54e725db8277cce7c2803070aa3eb289.png" mode="aspectFill" lazy-load="true"></image>
|
<image id="img" class="ui-detail-name-icon" src="https://image.fulllinkai.com/202308/11/54e725db8277cce7c2803070aa3eb289.png" mode="aspectFill" lazy-load="true"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-detail-line"></view>
|
<view class="ui-detail-line"></view>
|
||||||
<view class="font30 color-333 bold">群聊简介</view>
|
<view class="font30 color-333 bold">群聊简介</view>
|
||||||
<view class="ui-detail-intro color-666 font_26">{{ detail.intro }}</view>
|
<view class="ui-detail-intro color-666 font_26">{{ detail.team.intro }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-group-detail" v-if="detail.is_join == 1">
|
<view class="ui-group-detail" v-if="detail.is_join == 1">
|
||||||
<view class="ui-detail-list">
|
<view class="ui-detail-list">
|
||||||
@ -237,7 +237,7 @@ wepy.page({
|
|||||||
getDetail() {
|
getDetail() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/chat/group/detail?team_id=${vm.id}`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/team/${vm.id}/detail`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
vm.detail = data
|
vm.detail = data
|
||||||
}
|
}
|
||||||
@ -247,11 +247,12 @@ wepy.page({
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 修改群昵称
|
// 修改群信息
|
||||||
changeGroupName() {
|
changeGroupData() {
|
||||||
let vm = this
|
let vm = this
|
||||||
let data = {
|
let data = {
|
||||||
team_id: vm.id,
|
show_other_nick: vm.detail.user_team.show_other_nick,
|
||||||
|
is_top: vm.detail.user_team.is_top,
|
||||||
nick: vm.detail.user_team.nick
|
nick: vm.detail.user_team.nick
|
||||||
}
|
}
|
||||||
if (!vm.detail.user_team.nick) {
|
if (!vm.detail.user_team.nick) {
|
||||||
@ -261,10 +262,10 @@ wepy.page({
|
|||||||
if (vm.throttle) {
|
if (vm.throttle) {
|
||||||
vm.throttle = false
|
vm.throttle = false
|
||||||
vm.$showLoading('更改中')
|
vm.$showLoading('更改中')
|
||||||
vm.$post({url: `${service.host}/chat/group/update/nick`, data}).then(({code, data}) => {
|
vm.$put({url: `${service.host}/team/${vm.id}/update`, data}).then(({code, data}) => {
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.$showToast(`群昵称已修改`)
|
vm.$showToast(`群信息已修改`)
|
||||||
}
|
}
|
||||||
vm.throttle = true
|
vm.throttle = true
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -273,27 +274,17 @@ wepy.page({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 是否展示成员昵称
|
// 监听群昵称是否显示
|
||||||
changeShowNick(e) {
|
changeShowNick(e) {
|
||||||
let vm = this
|
let vm = this
|
||||||
let data = {
|
vm.detail.user_team.show_other_nick = e.$wx.detail.value ? 1 : 0
|
||||||
team_id: vm.id,
|
vm.changeGroupData()
|
||||||
show_other_nick: e.$wx.detail.value ? 1 : 0
|
},
|
||||||
}
|
// 监听置顶
|
||||||
if (vm.throttle) {
|
changeShowTop(e) {
|
||||||
vm.throttle = false
|
let vm = this
|
||||||
vm.$showLoading('')
|
vm.detail.user_team.is_top = e.$wx.detail.value ? 1 : 0
|
||||||
vm.$post({url: `${service.host}/chat/group/update/show_other_nick`, data}).then(({code, data}) => {
|
vm.changeGroupData()
|
||||||
if (code == 0) {
|
|
||||||
vm.detail.user_team.show_other_nick = e.detail.value ? 1 : 0
|
|
||||||
}
|
|
||||||
wx.hideLoading()
|
|
||||||
vm.throttle = true
|
|
||||||
}).catch(() => {
|
|
||||||
wx.hideLoading()
|
|
||||||
vm.throttle = true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 消息免打扰设置
|
// 消息免打扰设置
|
||||||
changeMutenotiType(e) {
|
changeMutenotiType(e) {
|
||||||
@ -343,7 +334,7 @@ wepy.page({
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/chat/group/out?team_id=${vm.id}`}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/team/${vm.id}/leave`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
wx.switchTab({url: '/pages/tabBar/news'})
|
wx.switchTab({url: '/pages/tabBar/news'})
|
||||||
}
|
}
|
||||||
@ -364,7 +355,7 @@ wepy.page({
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.$showLoading('')
|
vm.$showLoading('')
|
||||||
vm.$post({url: `${service.host}/chat/group/join?team_id=${vm.id}`}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/team/${vm.id}/join`}).then(({code, data}) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
vm.getDetail()
|
vm.getDetail()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,7 +125,7 @@ page {
|
|||||||
<image v-if="list.length == 0 && loading" class="ui-no-data-icon" src="https://images.ufutx.com/202104/13/1737964f7c98cbf65d728137dc2792eb.png" mode="aspectFill"></image>
|
<image v-if="list.length == 0 && loading" class="ui-no-data-icon" src="https://images.ufutx.com/202104/13/1737964f7c98cbf65d728137dc2792eb.png" mode="aspectFill"></image>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="ui-list-items" v-for="(item,index) in list" :key="index">
|
<view class="ui-list-items" v-for="(item,index) in list" :key="index">
|
||||||
<view class="font_24 color999 text-center ui-pb-24 ui-pt-4">{{item.created_at}}</view>
|
<view class="font_24 color999 text-center ui-pb-24 ui-pt-4">{{item.create_time}}</view>
|
||||||
<view class="ui-item-data">
|
<view class="ui-item-data">
|
||||||
<view class="ui-relative">
|
<view class="ui-relative">
|
||||||
<view class="ui-dist ui-dot" v-if="item.status == 0"></view>
|
<view class="ui-dist ui-dot" v-if="item.status == 0"></view>
|
||||||
@ -199,12 +199,12 @@ wepy.page({
|
|||||||
page: vm.page
|
page: vm.page
|
||||||
}
|
}
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/notices`, data}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/notice/system/list`, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
data.data.forEach((item) => {
|
data.data.forEach((item) => {
|
||||||
let endTime = item.created_at.replace(/-/g, '/')
|
let endTime = item.create_time.replace(/-/g, '/')
|
||||||
let recordTime = parseFloat(new Date(endTime).getTime()) / 1000
|
let recordTime = parseFloat(new Date(endTime).getTime()) / 1000
|
||||||
item.created_at = getDiffTime(recordTime, false)
|
item.create_time = getDiffTime(recordTime, false)
|
||||||
})
|
})
|
||||||
if (vm.list.length === 0 || vm.page === 1) {
|
if (vm.list.length === 0 || vm.page === 1) {
|
||||||
vm.list = data.data
|
vm.list = data.data
|
||||||
@ -277,7 +277,7 @@ wepy.page({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (e.type == 'follow' || e.type == 'friend' || e.type == 'remind_profile') {
|
if (e.type == 'follow' || e.type == 'friend' || e.type == 'remind_profile') {
|
||||||
url = `/pages/home/information?id=${e.other_user.id}`
|
url = `/pages/home/information?id=${e.user_id}`
|
||||||
} else if (e.type == 'temp') {
|
} else if (e.type == 'temp') {
|
||||||
url = `/pages/users/tempMember`
|
url = `/pages/users/tempMember`
|
||||||
} else if (e.type == 'moment' || e.type == 'change_moment_topic') {
|
} else if (e.type == 'moment' || e.type == 'change_moment_topic') {
|
||||||
|
|||||||
@ -319,7 +319,7 @@ page {
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="m_fans_lst f-fc">
|
<view class="m_fans_lst f-fc">
|
||||||
<view class="u_fans_lst" v-for="(item,index) in fansList" :key="index" @tap="jumpPath(item, index)">
|
<view class="u_fans_lst" v-for="(item,index) in fansList" :key="index" @tap="jumpPath(item, index)">
|
||||||
<image class="u_fans_img {{index >= 3 && user.rank_id == 0 ? 'blur' : ''}}" :src="item.avatar" mode="aspectFill"></image>
|
<image class="u_fans_img {{index >= 3 && user.rank_id == 0 ? 'blur' : ''}}" :src="item.photo" mode="aspectFill"></image>
|
||||||
<image class="ui-fans-icon" v-if="item.hidden_profile != 'NONE'" src="https://image.fulllinkai.com/202203/22/7a244fa7e39105c3f9cb9d951dcd5664.png" mode="aspectFit"></image>
|
<image class="ui-fans-icon" v-if="item.hidden_profile != 'NONE'" src="https://image.fulllinkai.com/202203/22/7a244fa7e39105c3f9cb9d951dcd5664.png" mode="aspectFit"></image>
|
||||||
<view class="u_vclst_ct">
|
<view class="u_vclst_ct">
|
||||||
<view class="u_vclst_name white bold font_24 ellipsis_1">{{item.nickname}}</view>
|
<view class="u_vclst_name white bold font_24 ellipsis_1">{{item.nickname}}</view>
|
||||||
@ -403,7 +403,7 @@ wepy.page({
|
|||||||
size: 15
|
size: 15
|
||||||
}
|
}
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/user/preview/histroies`, data}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/preview/list`, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
data.data.forEach((item) => {
|
data.data.forEach((item) => {
|
||||||
item.created_at = utils.commentTimeHandle(item.created_at)
|
item.created_at = utils.commentTimeHandle(item.created_at)
|
||||||
@ -438,7 +438,7 @@ wepy.page({
|
|||||||
size: 15
|
size: 15
|
||||||
}
|
}
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/followers`, data}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/follow/fans/list`, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
data.data.forEach((item) => {
|
data.data.forEach((item) => {
|
||||||
item.nickname = `${item.nickname.substring(0, 1)}***`
|
item.nickname = `${item.nickname.substring(0, 1)}***`
|
||||||
|
|||||||
@ -126,15 +126,15 @@ page {
|
|||||||
height: 124rpx;
|
height: 124rpx;
|
||||||
width: 124rpx;
|
width: 124rpx;
|
||||||
right: 30rpx;
|
right: 30rpx;
|
||||||
bottom: 180rpx;
|
bottom: 320rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m_returnTop {
|
.m_returnTop {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 62rpx;
|
right: 46rpx;
|
||||||
bottom: 200rpx;
|
bottom: 160rpx;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
-webkit-transition: opacity 1s;
|
-webkit-transition: opacity 1s;
|
||||||
transition: opacity 1s;
|
transition: opacity 1s;
|
||||||
@ -181,7 +181,7 @@ page {
|
|||||||
<view class="ui-hotTopic-box">
|
<view class="ui-hotTopic-box">
|
||||||
<scroll-view scroll-x="true" class="ui-scroll">
|
<scroll-view scroll-x="true" class="ui-scroll">
|
||||||
<block v-for="(item,index) in hotTopics" :key="index">
|
<block v-for="(item,index) in hotTopics" :key="index">
|
||||||
<view v-if="item.is_hot == 1" class="cu-avatar ui-main" style="background-image:url({{ item.back_image }});" @tap.stop="jumpPath(`/pages/dynamic/hotTopic?id=${item.id}`)">
|
<view class="cu-avatar ui-main" style="background-image:url({{ item.back_image }});" @tap.stop="jumpPath(`/pages/dynamic/hotTopic?id=${item.id}`)">
|
||||||
<view>#{{ item.name }}</view>
|
<view>#{{ item.name }}</view>
|
||||||
<view>{{ item.moment_count }} 动态</view>
|
<view>{{ item.moment_count }} 动态</view>
|
||||||
<view class="ui-mask"></view>
|
<view class="ui-mask"></view>
|
||||||
@ -194,7 +194,7 @@ page {
|
|||||||
{{ item }}
|
{{ item }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<dynamicList :dynamicList="dynamicList" @changeSelect="changeSelect" :from="'dynamic'"></dynamicList>
|
<dynamicList :dynamicList="dynamicList" @changeSelect="changeSelect" @signInVerify="signInVerify" :from="'dynamic'"></dynamicList>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item wx:key="id" style="-webkit-overflow-scrolling:touch"></swiper-item>
|
<swiper-item wx:key="id" style="-webkit-overflow-scrolling:touch"></swiper-item>
|
||||||
@ -207,7 +207,8 @@ page {
|
|||||||
<image class="u_returnTop_img" @tap.stop="BackTop" src="https://images.ufutx.com/202106/23/f0d10551dc5d3399cc7f15805cf04f4f.png" mode="scaleToFill" lazy-load="false"></image>
|
<image class="u_returnTop_img" @tap.stop="BackTop" src="https://images.ufutx.com/202106/23/f0d10551dc5d3399cc7f15805cf04f4f.png" mode="scaleToFill" lazy-load="false"></image>
|
||||||
</view>
|
</view>
|
||||||
<!--动态操作功能,selectData选择的动态数据、selectIndex选中的动态下标、admin是否管理员、from来自哪个父组件-->
|
<!--动态操作功能,selectData选择的动态数据、selectIndex选中的动态下标、admin是否管理员、from来自哪个父组件-->
|
||||||
<dynamicOperation :selectData="selectData" :chooseShow.sync="chooseShow" :selectIndex="selectIndex" :admin="admin" :from="'dynamic'" @hideModal="hideModal" @operation="changeOperation"></dynamicOperation>
|
<dynamicOperation :selectData="selectData" :chooseShow.sync="chooseShow" :selectIndex="selectIndex" :admin="admin" :from="'dynamic'" @hideModal="hideModal" @operation="changeOperation" @signInVerify="signInVerify"></dynamicOperation>
|
||||||
|
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -222,6 +223,7 @@ wepy.page({
|
|||||||
mixins: [https, base],
|
mixins: [https, base],
|
||||||
|
|
||||||
data: {
|
data: {
|
||||||
|
loginShow: false,
|
||||||
chooseShow: false,
|
chooseShow: false,
|
||||||
no_more: false,
|
no_more: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
@ -257,11 +259,11 @@ wepy.page({
|
|||||||
page: vm.page
|
page: vm.page
|
||||||
}
|
}
|
||||||
vm.$showLoading('加载中')
|
vm.$showLoading('加载中')
|
||||||
vm.$get({url: `${service.host}/moments/v2?is_hot=${vm.dynamicTabsIndex == 0 ? 1 : 0}`, data}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/moment/list?is_hot=${vm.dynamicTabsIndex == 0 ? 1 : 0}`, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
if (data.data && data.data.length > 0) {
|
if (data.data && data.data.length > 0) {
|
||||||
data.data.forEach((item, index) => {
|
data.data.forEach((item, index) => {
|
||||||
item.created_at = commentTimeHandle(item.created_at)
|
item.create_time = commentTimeHandle(item.create_time)
|
||||||
let sty = typeof (item.photos)
|
let sty = typeof (item.photos)
|
||||||
if (sty == 'string') {
|
if (sty == 'string') {
|
||||||
item.photos = JSON.parse(item.photos)
|
item.photos = JSON.parse(item.photos)
|
||||||
@ -295,7 +297,7 @@ wepy.page({
|
|||||||
// 获取热门话题
|
// 获取热门话题
|
||||||
getHotTopics() {
|
getHotTopics() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$get({url: `${service.host}/moment/topics`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/moment/topic/list`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
vm.hotTopics = data.data
|
vm.hotTopics = data.data
|
||||||
}
|
}
|
||||||
@ -382,7 +384,21 @@ wepy.page({
|
|||||||
vm.showBackTopBtn = false
|
vm.showBackTopBtn = false
|
||||||
},
|
},
|
||||||
jumpPath(url) {
|
jumpPath(url) {
|
||||||
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
wx.navigateTo({url: url})
|
wx.navigateTo({url: url})
|
||||||
|
},
|
||||||
|
signInVerify() {
|
||||||
|
let vm = this
|
||||||
|
vm.loginShow = true
|
||||||
|
},
|
||||||
|
hiddenLogin() {
|
||||||
|
let vm = this
|
||||||
|
vm.loginShow = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 上拉获取更多数据
|
// 上拉获取更多数据
|
||||||
@ -424,6 +440,7 @@ backgroundColorTop: '#ffffff',
|
|||||||
backgroundColorBottom: '#ffffff',
|
backgroundColorBottom: '#ffffff',
|
||||||
usingComponents: {
|
usingComponents: {
|
||||||
dynamicOperation: '~@/components/dynamicOperation',
|
dynamicOperation: '~@/components/dynamicOperation',
|
||||||
|
loginDialog: '~@/components/loginDialog',
|
||||||
dynamicList: '~@/components/dynamicList'
|
dynamicList: '~@/components/dynamicList'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,179 +4,319 @@ page {
|
|||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-top-menu-list{
|
.ui-home{
|
||||||
padding: 0 20rpx;
|
padding-bottom: 140rpx;
|
||||||
margin: 30rpx 0 20rpx 0;
|
}
|
||||||
|
|
||||||
.ui-top-menu-item{
|
.ui-top-up{
|
||||||
width: 25%;
|
width: 174rpx;
|
||||||
|
|
||||||
.ui-top-menu-icon{
|
|
||||||
width: 120rpx;
|
|
||||||
height: 120rpx;
|
|
||||||
|
|
||||||
.ui-top-menu-count{
|
|
||||||
position: absolute;
|
|
||||||
top: 12rpx;
|
|
||||||
right: 2rpx;
|
|
||||||
margin: auto;
|
|
||||||
width: 36rpx;
|
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
line-height: 30rpx;
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-top-box{
|
||||||
|
display: fiex;
|
||||||
|
overflow-x: auto;
|
||||||
|
margin-left: 6rpx;
|
||||||
|
|
||||||
|
.ui-top-bg{
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-right: -20rpx;
|
||||||
|
width: 248rpx;
|
||||||
|
height: 328rpx;
|
||||||
|
background-image: url("https://image.fulllinkai.com/202409/24/420219e731c8a9cd64cf115f42192180.png");
|
||||||
|
background-position: center;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
|
.ui-top-user-pic{
|
||||||
|
width: 132rpx;
|
||||||
|
height: 132rpx;
|
||||||
|
display: block;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
font-size: 22rpx;
|
margin: 46rpx auto 16rpx auto;
|
||||||
color: #ffffff;
|
|
||||||
background: #F1013D;
|
|
||||||
border: 4rpx solid #ffffff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-top-menu-title{
|
.ui-top-user-nam{
|
||||||
margin-top: -20rpx;
|
width: 168rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-top-city{
|
||||||
|
max-width: 110rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-container{
|
.ui-prefecture-title{
|
||||||
.ui-touch-item {
|
padding: 24rpx 0 20rpx 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-prefecture-box{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
overflow-x: auto;
|
||||||
width: 100%;
|
margin-left: 30rpx;
|
||||||
overflow: hidden;
|
|
||||||
padding: 24rpx 0 24rpx 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-content {
|
.ui-prefecture-item{
|
||||||
width: 100%;
|
width: 270rpx;
|
||||||
margin-right: 0;
|
height: 180rpx;
|
||||||
-webkit-transition: all 0.4s;
|
border-radius: 16rpx;
|
||||||
transition: all 0.4s;
|
margin-right: 16rpx;
|
||||||
-webkit-transform: translateX(90px);
|
flex-shrink: 0;
|
||||||
transform: translateX(90px);
|
background-repeat: no-repeat;
|
||||||
margin-left: -90px;
|
background-size: cover;
|
||||||
overflow: hidden;
|
background-position: center;
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.ui-messageBox {
|
.ui-prefecture-mask{
|
||||||
margin-top: 2rpx;
|
width: 270rpx;
|
||||||
margin-left: 16rpx;
|
height: 180rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
.ui-is-top{
|
background: rgba(0, 0, 0, 0.1);
|
||||||
margin-left: 16rpx;
|
|
||||||
padding-left: 8rpx;
|
|
||||||
width: 76rpx;
|
|
||||||
height: 32rpx;
|
|
||||||
background: linear-gradient(90deg, #FFD18D 0%, #FFA564 100%);
|
|
||||||
border-radius: 8rpx;
|
|
||||||
line-height: 32rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-name {
|
|
||||||
width: 400rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-message {
|
|
||||||
width: 524rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-unreadBox {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 30rpx;
|
|
||||||
top: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-referrals-box{
|
||||||
|
padding: 52rpx 30rpx 0 30rpx;
|
||||||
|
|
||||||
|
.ui-require-icon{
|
||||||
|
width: 220rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
display: block;
|
||||||
|
margin-top: -8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.box_swiper {
|
||||||
|
transform: translateY(0);
|
||||||
|
|
||||||
|
.card-swiper{
|
||||||
|
min-height: 900rpx !important;
|
||||||
|
margin-top: -16rpx;
|
||||||
|
|
||||||
|
swiper-item{
|
||||||
|
width: 640rpx !important;
|
||||||
|
left: 30rpx;
|
||||||
|
padding: 0 12zrpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-swiper swiper-item.cur .swiper-item, .swiper-item{
|
||||||
|
transition: all .2s ease-in 0s;
|
||||||
|
min-height: 828rpx !important;
|
||||||
|
border-radius: 28rpx !important;
|
||||||
|
transform: translateY(0);
|
||||||
|
box-shadow: 4rpx 8rpx 28rpx 0 rgba(0, 0, 0, 0.06);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
backface-visibility: hidden;
|
||||||
.ui-lastTime {
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
}
|
||||||
|
.t_title{
|
||||||
.ui-no-disturbing {
|
width: 90%;
|
||||||
|
margin: auto;
|
||||||
|
padding: 24rpx 12rpx;
|
||||||
|
border-bottom: 2rpx solid #F8F8F8;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.t_dot{
|
||||||
|
width: 48rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
background: #FF5380;
|
||||||
|
border-radius: 9px;
|
||||||
|
margin: auto auto 12rpx auto;
|
||||||
|
}
|
||||||
|
.t_r_btn{
|
||||||
|
width: 312rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background: #FFF4F7;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
color: #F33B6C;
|
||||||
|
margin: 12rpx auto;
|
||||||
|
._icon{
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: auto;
|
||||||
margin-top: 12rpx;
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.t_bg{
|
||||||
|
width: 100%;
|
||||||
|
height: 600rpx;
|
||||||
|
margin-top: -82rpx;
|
||||||
|
background-image: url("https://image.fulllinkai.com/202206/09/07e06b19c240c8903586a03f6d935990.png");
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
.t_btn {
|
||||||
|
width: 416rpx;
|
||||||
|
height: 72rpx;
|
||||||
|
line-height: 72rpx;
|
||||||
|
background: linear-gradient(270deg, #FEB8BD 0%, #FE8992 100%);
|
||||||
|
box-shadow: 0 4rpx 20rpx 0 rgba(254, 154, 162, 0.45);
|
||||||
|
border-radius: 36rpx;
|
||||||
|
margin: auto;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.bc_img{
|
||||||
|
width: 100%;
|
||||||
|
height: 640rpx;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: top;
|
||||||
|
background-image: url("https://image.fulllinkai.com/202204/01/3949b098e12738b067d665fe95e0d949.png");
|
||||||
|
border-top-left-radius: 24rpx !important;
|
||||||
|
border-top-right-radius: 24rpx !important;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
.d_user_data{
|
||||||
|
padding: 0 22rpx;
|
||||||
|
.reality_icon,.real_icon,.vip_icon{
|
||||||
|
width: 80rpx;
|
||||||
|
height: auto;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
.vip_icon{
|
||||||
|
width: 32rpx;
|
||||||
|
margin-left: 10rpx
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-unreadNum, .ui-unreadNum_1 {
|
.address {
|
||||||
float: right;
|
.address_icon {
|
||||||
width: 28rpx;
|
width: 20rpx;
|
||||||
height: 28rpx;
|
height: 24rpx;
|
||||||
display: flex;
|
margin-right: 4rpx;
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
font-size: 20rpx;
|
|
||||||
background: #f1013D;
|
|
||||||
color: #fff;
|
|
||||||
margin-top: 12rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-unreadNum_1 {
|
|
||||||
width: 44rpx;
|
|
||||||
border-radius: 14rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-del-box {
|
.lastPic{
|
||||||
background: #f1013D;
|
transform: rotateY(26deg);
|
||||||
width: 90px;
|
box-shadow: none;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
color: #fff;
|
|
||||||
-webkit-transform: translateX(90px);
|
|
||||||
transform: translateX(90px);
|
|
||||||
-webkit-transition: all 0.4s;
|
|
||||||
transition: all 0.4s;
|
|
||||||
}
|
}
|
||||||
|
.noneBor{
|
||||||
.touch-move-active .ui-content,
|
box-shadow: none;
|
||||||
.touch-move-active .ui-del-box {
|
}
|
||||||
-webkit-transform: translateX(0);
|
.nextPic {
|
||||||
transform: translateX(0);
|
transform: rotateY(26deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view class="ui-news">
|
<view class="ui-home">
|
||||||
<cuCustom></cuCustom>
|
<cuCustom :searchName="'寻找心仪的Ta'" @tap="jumpPath('/pages/home/searchUsers')"></cuCustom>
|
||||||
<view class="ui-top-menu-list f-fbc">
|
<view class="f-fbc ui-pl-30 ui-pt-40 ui-pr-30">
|
||||||
<view class="text-center ui-top-menu-item ui-relative" v-for="(item,index) in menuList" :key="index" @tap="jumpPath(item)">
|
<view class="font_34 color333 bold">置顶推荐</view>
|
||||||
<image class="ui-top-menu-icon ui-relative" :src="item.icon" mode="aspectFit">
|
<image class="ui-top-up" src="https://image.fulllinkai.com/202409/24/9c5a93366fc9e24dec02ba62c87ecf15.png" mode="widthFix" @tap="applyTopUp" v-if="topUpState != 2"></image>
|
||||||
<view class="ui-top-menu-count" wx:if="{{item.count}}">{{item.count}}</view>
|
</view>
|
||||||
</image>
|
<view class="f-fcl ui-top-box">
|
||||||
<view class="color666 font_24 ui-top-menu-title">{{item.title}}</view>
|
<view class="ui-top-bg" v-for="(item,index) in topList" :key="index" @tap="jumpPath(`/pages/home/information?id=${item.id}`)">
|
||||||
|
<image class="ui-top-user-pic" :src="item.photo" mode="aspectFill"></image>
|
||||||
|
<view class="ui-top-user-nam ellipsis_1 font_30 bold color333 text-center">{{item.nickname}}</view>
|
||||||
|
<view class="f-fcc font_24 color666">
|
||||||
|
<view>{{item.year}}<text decode> · </text></view>
|
||||||
|
<view class="ellipsis_1 ui-top-city">{{item.city}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-container">
|
|
||||||
<view class="ui-touch-item" :class="{'touch-move-active' : item.isTouchMove}" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" v-for="(item,index) in list" :key="index" @tap="jumpChatPath(item)">
|
|
||||||
<view class="ui-content">
|
|
||||||
<image class="cu-avatar round lg flo_l" :src="item.icon" mode="aspectFit" @tap.stop="jumpDetailPath(item)"></image>
|
|
||||||
<view class="ui-messageBox flo_l">
|
|
||||||
<view class="font_30 color333 ui-name ellipsis_1 f-fcl">
|
|
||||||
{{item.title}}
|
|
||||||
<view v-if="item.is_top == 1" class="ui-is-top font_20 white">已置顶</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-message ellipsis_1 font_24 color666">
|
<view class="ui-prefecture-title font_34 color333 bold">专区推荐</view>
|
||||||
<span v-if="item.at_show" class="red">[有人@你]</span>
|
<view class="f-fcl ui-prefecture-box">
|
||||||
{{item.content}}
|
<view class="ui-prefecture-item ui-relative" :style="{backgroundImage:'url('+(item.pic)+');'}" v-for="(item,index) in prefectureList" :key="index" @tap="jumpPath(`/pages/home/singleSquare?id=${item.id}&title=${item.title}`)">
|
||||||
|
<view class="ui-prefecture-mask font_28 colorF bold f-fcc">{{item.title}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-unreadBox color999 text-right">
|
<view class="f-fbc ui-referrals-box">
|
||||||
<view class="ui-lastTime font_22">{{item.last_time}}</view>
|
<view class="font_34 color333 bold">为你推荐</view>
|
||||||
<block v-if="item.muteTeam">
|
<image class="ui-require-icon" src="https://image.fulllinkai.com/202409/24/4f52d791e75a7e89a5696754f37e51f7.png" mode="widthFix" @tap="jumpPath('/pages/users/selfTextarea?text=期望对方&placeText=写下你心中理想的对象')"></image>
|
||||||
<image class="ui-no-disturbing" src="https://image.fulllinkai.com/202406/29/c682c95e835831195a5af75c303a9720.png" mode="widthFix"></image>
|
</view>
|
||||||
|
<view class="box_swiper">
|
||||||
|
<swiper class="card-swiper" bindchange="cardSwiper" :current="cardCur" previousMargin="-2px" nextMargin="10px">
|
||||||
|
<swiper-item v-for="(item,index) in referrals" :key="index" class="{{cardCur==index?'cur':'noneBor'}} {{cardCur==index+1?'lastPic':''}} {{cardCur==index-1?'nextPic':''}}">
|
||||||
|
<block v-if="item.type && item.type == 'time'">
|
||||||
|
<view class="swiper-item radius shadow">
|
||||||
|
<view class="t_title color999 font_26">福恋会在每天 12 点为你推荐 7 个用户</view>
|
||||||
|
<view class="text-center ui-mt-26">
|
||||||
|
<view class="t_dot"></view>
|
||||||
|
<view class="font_28 color666">下次推荐时间</view>
|
||||||
|
</view>
|
||||||
|
<view class="text-center bold font_52 ui-mt-24" style="letter-spacing: 6rpx;" v-if="countdown">
|
||||||
|
{{ countdown.h}}:{{ countdown.m}}:{{ countdown.s}}
|
||||||
|
</view>
|
||||||
|
<block v-if="countdown.d == '0' && countdown.h == '00' && countdown.m == '00' && countdown.s == '00'">
|
||||||
|
<view class="t_r_btn text-center f-fcc" @tap="refreshFn">
|
||||||
|
<image src="https://image.fulllinkai.com/202206/09/c68f69b89269c604a3671b81ff1c14a5.png" class="_icon" mode="widthFix"></image>
|
||||||
|
手动更新每日推荐
|
||||||
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="ui-unreadNum" v-if="item.new_count && item.new_count <= 99">{{item.new_count}}</view>
|
<view class="t_r_btn text-center f-fcc" @tap="goBackFirst">
|
||||||
<view class="ui-unreadNum_1" v-if="item.new_count && item.new_count > 99">{{item.new_count}}</view>
|
<image src="https://image.fulllinkai.com/202206/09/c68f69b89269c604a3671b81ff1c14a5.png" class="_icon" mode="widthFix"></image>
|
||||||
|
回看今日推荐
|
||||||
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<view class="t_bg"></view>
|
||||||
|
<view class="t_btn text-center" @tap="goto_2('/pages/users/qualitySingle','other')">点击查看更多优质单身</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<block v-else-if="item.type && item.type == 'activity'">
|
||||||
|
<view class="swiper-item radius shadow activityCard" @tap="goto_2(item.path, item.type)">
|
||||||
|
<view class="bc_img" :style="{backgroundImage:'url('+(item.pic)+');'}"></view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<view class="swiper-item radius shadow" @tap="jumpPath(`/pages/home/information?id=${item.id}`)">
|
||||||
|
<view class="bc_img" :style="{backgroundImage:'url('+(item.pic)+');'}" @tap="goto_3('/pages/home/information?id={{item.id}}','user')"></view>
|
||||||
|
<view class="f-fbc d_user_data ui-mt-18">
|
||||||
|
<view class="f-fbc ">
|
||||||
|
<span class="bold color333 font_32 ellipsis_1" style="max-width: 30vw;">{{ item.nickname }}</span>
|
||||||
|
<image src="https://image.fulllinkai.com/202206/10/d0913df8b234057229ab3dd102497a50.png" class="vip_icon" mode="widthFix" v-if="item.rank_id> 0"></image>
|
||||||
|
<image src="https://image.fulllinkai.com/202206/10/bfad7e2a8e86cf7912ff280234a35606.png" class="vip_icon" mode="widthFix" v-else></image>
|
||||||
|
<image src="https://image.fulllinkai.com/202206/10/5cb84879a0dc81757dc526ebeb61bc0e.png" class="real_icon" mode="widthFix" v-if="item.is_approved == 1"></image>
|
||||||
|
<image src="https://image.fulllinkai.com/202206/10/279ade8a42810a91eb80a0717823dffa.png" class="reality_icon" mode="widthFix" v-if="item.is_real_approved == 1"></image>
|
||||||
|
</view>
|
||||||
|
<view class="address f-fbc">
|
||||||
|
<image src="https://image.fulllinkai.com/202206/07/817a393539ee854226eef79defef2fc4.png" class="address_icon" mode="aspectFit"></image>
|
||||||
|
<span class="font_24">{{ item.city }}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-del-box">退出</view>
|
<view class="f-fbc d_user_data ui-mt-8">
|
||||||
|
<span class="color333 font_28 ellipsis_1">{{ item.year + ' · ' }}{{item.stature + 'cm · '}}{{ item.degree ? item.degree + ' · ' : '' }}{{ item.industry_sub ? item.industry_sub : '' }}</span>
|
||||||
|
</view>
|
||||||
|
<view class="f-fbc d_user_data ui-mt-6">
|
||||||
|
<span class="color666 font_28 ellipsis_1" style="width: 80vw;">{{ item.introduction || '介绍:未填写' }}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</block>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
<view class="ui-prefecture-title font_34 color333 bold" v-if="squareList && squareList.length > 0">单身广场</view>
|
||||||
|
<block v-for="(item,index) in squareList" :key="index">
|
||||||
|
<view class="box_swiper ui-pl-30 ui-pr-30 ui-mb-40">
|
||||||
|
<view class="swiper-item radius shadow" @tap="jumpPath(`/pages/home/information?id=${item.id}`)">
|
||||||
|
<view class="bc_img" :style="{backgroundImage:'url('+(item.photo)+');'}"></view>
|
||||||
|
<view class="f-fbc d_user_data ui-mt-18">
|
||||||
|
<view class="f-fbc ">
|
||||||
|
<span class="bold color333 font_32 ellipsis_1" style="max-width: 30vw;">{{ item.nickname }}</span>
|
||||||
|
<image src="https://image.fulllinkai.com/202206/10/d0913df8b234057229ab3dd102497a50.png" class="vip_icon" mode="widthFix" v-if="item.rank_id"></image>
|
||||||
|
<image src="https://image.fulllinkai.com/202206/10/bfad7e2a8e86cf7912ff280234a35606.png" class="vip_icon" mode="widthFix" v-else></image>
|
||||||
|
<image src="https://image.fulllinkai.com/202206/10/5cb84879a0dc81757dc526ebeb61bc0e.png" class="real_icon" mode="widthFix" v-if="item.is_approved == 1"></image>
|
||||||
|
<image src="https://image.fulllinkai.com/202206/10/279ade8a42810a91eb80a0717823dffa.png" class="reality_icon" mode="widthFix" v-if="item.is_real_approved == 1"></image>
|
||||||
|
</view>
|
||||||
|
<view class="address f-fbc">
|
||||||
|
<image src="https://image.fulllinkai.com/202206/07/817a393539ee854226eef79defef2fc4.png" class="address_icon" mode="aspectFit"></image>
|
||||||
|
<span class="font_24">{{ item.city }}</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="f-fbc d_user_data ui-mt-8">
|
||||||
|
<span class="color333 font_28 ellipsis_1">{{ item.year + ' · ' }}{{item.stature + 'cm · '}}{{ item.degree ? item.degree + ' · ' : '' }}{{ item.industry_sub ? item.industry_sub : '' }}</span>
|
||||||
|
</view>
|
||||||
|
<view class="f-fbc d_user_data ui-mt-6">
|
||||||
|
<span class="color666 font_28 ellipsis_1" style="width: 80vw;">{{ item.introduction || '介绍:未填写' }}</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -191,114 +331,81 @@ wepy.page({
|
|||||||
mixins: [https, base],
|
mixins: [https, base],
|
||||||
|
|
||||||
data: {
|
data: {
|
||||||
menuList: [
|
loginShow: false,
|
||||||
{
|
throttle: true,
|
||||||
icon: 'https://image.fulllinkai.com/202201/21/a2a7445a8b70694056dd7795ef5ecc4e.png',
|
topUpState: null,
|
||||||
title: '系统通知',
|
topList: [], // 置顶推荐
|
||||||
path: '/pages/news/systemNews',
|
prefectureList: [], // 专区推荐
|
||||||
count: ''
|
squareList: [], // 单身广场
|
||||||
},
|
squarePage: 1,
|
||||||
{
|
no_more: false,
|
||||||
icon: 'https://image.fulllinkai.com/202201/21/1d8c26aa4e48a965bab9eb000db8d054.png',
|
cardCur: 0, // 为你推荐轮播下标
|
||||||
title: '好友申请',
|
referrals: [ // 为你推荐
|
||||||
path: '/pages/news/friendRequest',
|
{name: '焉然', pic: 'https://image.fulllinkai.com/202409/24/ccd8c3e29b9bdfc89907d92584497154.jpeg'},
|
||||||
count: ''
|
{name: 'Sady', pic: 'https://image.fulllinkai.com/202409/24/ccd8c3e29b9bdfc89907d92584497154.jpeg'},
|
||||||
},
|
{name: 'Sunny', pic: 'https://image.fulllinkai.com/202409/24/ccd8c3e29b9bdfc89907d92584497154.jpeg'},
|
||||||
{
|
{name: '焉然', pic: 'https://image.fulllinkai.com/202409/24/ccd8c3e29b9bdfc89907d92584497154.jpeg'},
|
||||||
icon: 'https://image.fulllinkai.com/202201/21/1715406efd38dfe258b23f632b9c16eb.png',
|
{name: '智锋', pic: 'https://image.fulllinkai.com/202409/24/ccd8c3e29b9bdfc89907d92584497154.jpeg'},
|
||||||
title: '访客/粉丝',
|
{name: '志辉', pic: 'https://image.fulllinkai.com/202409/24/ccd8c3e29b9bdfc89907d92584497154.jpeg'},
|
||||||
path: '/pages/news/visitor?type=fans',
|
{name: '焉然', pic: 'https://image.fulllinkai.com/202409/24/ccd8c3e29b9bdfc89907d92584497154.jpeg'}
|
||||||
count: ''
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'https://image.fulllinkai.com/202201/21/9571a0bdddf66ea097eecd5a4a601436.png',
|
|
||||||
title: '我看过谁',
|
|
||||||
path: '/pages/news/review?type=review&title=我看过谁',
|
|
||||||
count: ''
|
|
||||||
}
|
|
||||||
],
|
|
||||||
index: null, // 滑动删除聊天消息下标
|
|
||||||
groupSessionsCount: [], // 群聊消息未读数
|
|
||||||
teamAtList: [], // 群聊@
|
|
||||||
list: [] // 消息列表数据
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
// 获取置顶推荐用户
|
||||||
|
getTopUser() {
|
||||||
let vm = this
|
let vm = this
|
||||||
let data = {
|
vm.$get({url: `${service.host}/area/top/users`}).then(({code, data}) => {
|
||||||
page: vm.page
|
|
||||||
}
|
|
||||||
vm.$showLoading('加载中...')
|
|
||||||
vm.$get({url: `${service.host}/message/sessionV2`, data}).then(({code, data}) => {
|
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
vm.teamAtList = wx.getStorageSync('teamAtList') || []
|
vm.topList = data || []
|
||||||
vm.groupSessionsCount = wx.getStorageSync('teamsSessionsCount') || []
|
}
|
||||||
|
wx.hideLoading()
|
||||||
vm.menuList[0].count = data.system_count
|
}).catch(err => {
|
||||||
vm.menuList[1].count = data.friend_count
|
wx.hideLoading()
|
||||||
vm.menuList[2].count = data.follow_count + data.preview_count
|
console.log(err)
|
||||||
let {session} = data
|
|
||||||
let arrList = []
|
|
||||||
if (session.data && session.data.length > 0) {
|
|
||||||
session.data.forEach((item) => {
|
|
||||||
if (item.chat_type == 'group_chat') {
|
|
||||||
arrList.push({
|
|
||||||
chat_type: item.chat_type,
|
|
||||||
icon: item.team.icon,
|
|
||||||
title: item.team.tname,
|
|
||||||
is_top: item.is_top,
|
|
||||||
content: item.last_message ? item.last_message.body.msg ? item.last_message.other_user.nickname ? (item.last_message.other_user.nickname + ':' + item.last_message.body.msg) : (item.last_message.other_user.name + ':' + item.last_message.body.msg) : '' : '',
|
|
||||||
last_time: item.last_message ? item.last_message.last_time : '',
|
|
||||||
id: item.team_id,
|
|
||||||
hidden_profile: 'NONE',
|
|
||||||
msgId: item.id,
|
|
||||||
isTouchMove: false,
|
|
||||||
new_count: wx.getStorageSync('muteNotList') && wx.getStorageSync('muteNotList').length > 0 ? 0 : vm.getGroupCount(item.team_id)
|
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 获取专区推荐
|
||||||
|
getArea() {
|
||||||
|
let vm = this
|
||||||
|
vm.$get({url: `${service.host}/area/class`}).then(({code, data}) => {
|
||||||
|
if (code === 0) {
|
||||||
|
vm.prefectureList = data || []
|
||||||
|
}
|
||||||
|
wx.hideLoading()
|
||||||
|
}).catch(err => {
|
||||||
|
wx.hideLoading()
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取每日推荐
|
||||||
|
getEveryday() {
|
||||||
|
let vm = this
|
||||||
|
vm.$get({url: `${service.host}/other/user/recommend`}).then(({code, data}) => {
|
||||||
|
if (code === 0) {
|
||||||
|
// vm.topList = data || []
|
||||||
|
}
|
||||||
|
wx.hideLoading()
|
||||||
|
}).catch(err => {
|
||||||
|
wx.hideLoading()
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取广场
|
||||||
|
getSquare() {
|
||||||
|
let vm = this
|
||||||
|
vm.$get({url: `${service.host}/other/user/square?page=${vm.squarePage}`}).then(({code, data}) => {
|
||||||
|
if (code === 0) {
|
||||||
|
if (vm.squareList.length === 0 || vm.squarePage === 1) {
|
||||||
|
vm.squareList = data.data
|
||||||
} else {
|
} else {
|
||||||
if (item.other_user) {
|
data.data.map(function (item) {
|
||||||
arrList.push({
|
vm.squareList.push(item)
|
||||||
chat_type: item.chat_type,
|
|
||||||
icon: item.other_user.avatar || item.other_user.circle_avatar,
|
|
||||||
title: item.other_user.nickname || item.other_user.name,
|
|
||||||
is_top: item.is_top,
|
|
||||||
content: item.last_message ? item.last_message.content : '',
|
|
||||||
last_time: item.last_message ? item.last_message.last_time : '',
|
|
||||||
id: item.other_user.id,
|
|
||||||
hidden_profile: item.other_user.hidden_profile,
|
|
||||||
type: item.other_user.type,
|
|
||||||
msgId: item.id,
|
|
||||||
isTouchMove: false,
|
|
||||||
new_count: item.new_count
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
if (vm.squareList.length < 15 || data.data.length < 15) {
|
||||||
})
|
|
||||||
}
|
|
||||||
vm.list = [...arrList]
|
|
||||||
// 赋值所在群组已开启消息免打扰字段
|
|
||||||
if (wx.getStorageSync('muteNotList') && wx.getStorageSync('muteNotList').length > 0) {
|
|
||||||
let arr = wx.getStorageSync('muteNotList')
|
|
||||||
arr.forEach((i) => {
|
|
||||||
vm.list.forEach((j) => {
|
|
||||||
if (j.chat_type == 'group_chat' && i.teamId == j.id && !j.muteState) {
|
|
||||||
j.new_count = 0
|
|
||||||
j.muteTeam = i.muteTeam
|
|
||||||
j.muteState = true
|
|
||||||
} else if (j.chat_type == 'group_chat') {
|
|
||||||
j.new_count = vm.getGroupCount(j.id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
console.log(vm.list, '777')
|
|
||||||
if (vm.list.length < 15 || session.data.length < 15) {
|
|
||||||
vm.no_more = true
|
vm.no_more = true
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
vm.squarePage++
|
||||||
vm.loading = true
|
|
||||||
}, 500)
|
|
||||||
vm.page++
|
|
||||||
}
|
}
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@ -306,125 +413,108 @@ wepy.page({
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 申请置顶推荐状态
|
||||||
getNewCount() {
|
applyTopUpState () {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$get({url: `${service.host}/new/message/count`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/area/top/users/status`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
let {new_count} = data
|
vm.topUpState = data.status
|
||||||
let groupCountList = wx.getStorageSync('teamsSessionsCount') || []
|
|
||||||
let groupCount = 0
|
|
||||||
if (groupCountList.length > 0) {
|
|
||||||
for (let i = 0; i < groupCountList.length; i++) {
|
|
||||||
groupCount += groupCountList[i].unread
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((new_count + groupCount) > 0) {
|
|
||||||
wx.setTabBarBadge({
|
|
||||||
index: 0,
|
|
||||||
text: `${new_count + groupCount}`
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
wx.removeTabBarBadge({
|
|
||||||
index: 0
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
wx.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
wx.hideLoading()
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 申请置顶推荐
|
||||||
// 获取群未读数
|
applyTopUp () {
|
||||||
getGroupCount(id) {
|
let vm = this
|
||||||
let newCount = this.groupSessionsCount.filter(item => {
|
// 校验是否完成注册资料
|
||||||
return item.id == id
|
if (!vm.$signInVerify()) {
|
||||||
})
|
vm.loginShow = true
|
||||||
if (newCount.length === 0) {
|
return
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
return newCount[0].unread
|
if (vm.topUpState == 1) {
|
||||||
},
|
vm.$showToast('你已申请,等待审核')
|
||||||
|
return
|
||||||
touchstart (e) {
|
}
|
||||||
let vm = this
|
wx.showModal({
|
||||||
vm.list.forEach(function (v, i) {
|
title: '温馨提示',
|
||||||
if (v.isTouchMove) { v.isTouchMove = false }
|
content: '是否确认申请“我也要上推荐”?',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
vm.$showLoading('')
|
||||||
|
vm.$post({url: `${service.host}/area/top/users`}).then((code, data) => {
|
||||||
|
if (code == 0) {
|
||||||
|
vm.$showToast('申请已提交')
|
||||||
|
}
|
||||||
|
wx.hideLoading()
|
||||||
|
}).catch(() => {
|
||||||
|
wx.hideLoading()
|
||||||
})
|
})
|
||||||
vm.startX = e.changedTouches[0].clientX
|
} else if (res.cancel) {
|
||||||
vm.startY = e.changedTouches[0].clientY
|
console.log('用户点击取消')
|
||||||
},
|
}
|
||||||
|
|
||||||
touchmove (e) {
|
|
||||||
let vm = this
|
|
||||||
vm.index = e.currentTarget.dataset.index
|
|
||||||
let startX = vm.startX
|
|
||||||
let startY = vm.startY
|
|
||||||
let touchMoveX = e.changedTouches[0].clientX
|
|
||||||
let touchMoveY = e.changedTouches[0].clientY
|
|
||||||
let angle = vm.angle({ X: startX, Y: startY }, { X: touchMoveX, Y: touchMoveY })
|
|
||||||
vm.list.forEach(function (v, i) {
|
|
||||||
v.isTouchMove = false
|
|
||||||
if (Math.abs(angle) > 30) return
|
|
||||||
if (i == vm.index) {
|
|
||||||
v.isTouchMove = touchMoveX <= startX
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
cardSwiper(e) {
|
||||||
angle(start, end) {
|
let vm = this
|
||||||
let _X = end.X - start.X
|
let source = e.$wx.detail.source
|
||||||
let _Y = end.Y - start.Y
|
if (source == 'autoplay' || source == 'touch') {
|
||||||
return 360 * Math.atan(_Y / _X) / (2 * Math.PI)
|
vm.cardCur = e.$wx.detail.current
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
jumpPath(url) {
|
||||||
// 聊天对话
|
let vm = this
|
||||||
jumpChatPath(e) {
|
// 校验是否完成注册资料
|
||||||
let url = ``
|
if (!vm.$signInVerify()) {
|
||||||
if (e.chat_type === 'group_chat') {
|
vm.loginShow = true
|
||||||
url = `/pages/news/groupChitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&pic=${e.icon}`
|
return
|
||||||
} else {
|
|
||||||
url = `/pages/news/chitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&type=${e.type}&pic=${e.icon}`
|
|
||||||
}
|
}
|
||||||
wx.navigateTo({url: url})
|
wx.navigateTo({url: url})
|
||||||
},
|
},
|
||||||
// 用户详情
|
hiddenLogin() {
|
||||||
jumpDetailPath(e) {
|
let vm = this
|
||||||
let url = ``
|
vm.loginShow = false
|
||||||
if (e.chat_type === 'group_chat') {
|
|
||||||
url = `/pages/news/groupChitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&pic=${e.icon}`
|
|
||||||
} else {
|
|
||||||
url = `/pages/home/information?id=${e.id}`
|
|
||||||
}
|
|
||||||
wx.navigateTo({url: url})
|
|
||||||
},
|
|
||||||
jumpPath(e) {
|
|
||||||
wx.navigateTo({url: e.path})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 上拉获取更多数据
|
// 上拉获取更多数据
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
let vm = this
|
||||||
|
if (!vm.no_more) {
|
||||||
|
vm.getSquare()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
let vm = this
|
||||||
|
vm.squarePage = 1
|
||||||
|
vm.no_more = false
|
||||||
|
vm.getSquare()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let vm = this
|
|
||||||
vm.getList()
|
|
||||||
vm.getNewCount()
|
|
||||||
},
|
},
|
||||||
created() {}
|
onLoad() {
|
||||||
|
let vm = this
|
||||||
|
vm.getTopUser()
|
||||||
|
vm.getArea()
|
||||||
|
vm.getEveryday()
|
||||||
|
vm.getSquare()
|
||||||
|
vm.applyTopUpState()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<config>
|
<config>
|
||||||
{
|
{
|
||||||
navigationBarTitleText: '消息',
|
navigationBarTitleText: '推荐',
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
enablePullDownRefresh: true,
|
enablePullDownRefresh: true,
|
||||||
backgroundColorTop: '#ffffff',
|
backgroundColorTop: '#ffffff',
|
||||||
backgroundColorBottom: '#ffffff',
|
backgroundColorBottom: '#ffffff',
|
||||||
usingComponents: {
|
usingComponents: {
|
||||||
cuCustom: '~@/components/cuCustom'
|
cuCustom: '~@/components/cuCustom',
|
||||||
|
loginDialog: '~@/components/loginDialog',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</config>
|
</config>
|
||||||
|
|||||||
@ -142,15 +142,15 @@ page {
|
|||||||
<view class="ui-news">
|
<view class="ui-news">
|
||||||
<cuCustom></cuCustom>
|
<cuCustom></cuCustom>
|
||||||
<view class="ui-top-menu-list f-fbc">
|
<view class="ui-top-menu-list f-fbc">
|
||||||
<view class="text-center ui-top-menu-item ui-relative" v-for="(item,index) in menuList" :key="index" @tap="close">
|
<view class="text-center ui-top-menu-item ui-relative" v-for="(item,index) in menuList" :key="index" @tap="jumpPath(item)">
|
||||||
<image class="ui-top-menu-icon ui-relative" :src="item.icon" mode="aspectFit">
|
<image class="ui-top-menu-icon ui-relative" :src="item.icon" mode="aspectFit">
|
||||||
<view class="ui-top-menu-count" wx:if="{{item.count}}">{{item.count}}</view>
|
<view class="ui-top-menu-count" v-if="item.count">{{item.count}}</view>
|
||||||
</image>
|
</image>
|
||||||
<view class="color666 font_24 ui-top-menu-title">{{item.title}}</view>
|
<view class="color666 font_24 ui-top-menu-title">{{item.title}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-container">
|
<view class="ui-container">
|
||||||
<view class="ui-touch-item" :class="{'touch-move-active' : item.isTouchMove}" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" v-for="(item,index) in list" :key="index" @tap="jumpPath(item)">
|
<view class="ui-touch-item" :class="{'touch-move-active' : item.isTouchMove}" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" v-for="(item,index) in list" :key="index" @tap="jumpChatPath(item)">
|
||||||
<view class="ui-content">
|
<view class="ui-content">
|
||||||
<image class="cu-avatar round lg flo_l" :src="item.icon" mode="aspectFit" @tap.stop="jumpDetailPath(item)"></image>
|
<image class="cu-avatar round lg flo_l" :src="item.icon" mode="aspectFit" @tap.stop="jumpDetailPath(item)"></image>
|
||||||
<view class="ui-messageBox flo_l">
|
<view class="ui-messageBox flo_l">
|
||||||
@ -174,9 +174,11 @@ page {
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ui-del-box">退出</view>
|
<view v-if="item.chat_type == 'linkmen'" class="ui-del-box" @tap="quitGroup(item, index)">退出</view>
|
||||||
|
<view v-else class="ui-del-box" @tap="deleteList(item, index)">删除</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -191,35 +193,38 @@ wepy.page({
|
|||||||
mixins: [https, base],
|
mixins: [https, base],
|
||||||
|
|
||||||
data: {
|
data: {
|
||||||
|
loginShow: false,
|
||||||
menuList: [
|
menuList: [
|
||||||
{
|
{
|
||||||
icon: 'https://image.fulllinkai.com/202201/21/a2a7445a8b70694056dd7795ef5ecc4e.png',
|
icon: 'https://image.fulllinkai.com/202201/21/a2a7445a8b70694056dd7795ef5ecc4e.png',
|
||||||
title: '系统通知',
|
title: '系统通知',
|
||||||
path: '/pages/users/myNews',
|
path: '/pages/news/systemNews',
|
||||||
count: ''
|
count: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'https://image.fulllinkai.com/202201/21/1d8c26aa4e48a965bab9eb000db8d054.png',
|
icon: 'https://image.fulllinkai.com/202201/21/1d8c26aa4e48a965bab9eb000db8d054.png',
|
||||||
title: '好友申请',
|
title: '好友申请',
|
||||||
path: '/pages/users/friendRequest',
|
path: '/pages/news/friendRequest',
|
||||||
count: ''
|
count: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'https://image.fulllinkai.com/202201/21/1715406efd38dfe258b23f632b9c16eb.png',
|
icon: 'https://image.fulllinkai.com/202201/21/1715406efd38dfe258b23f632b9c16eb.png',
|
||||||
title: '访客/粉丝',
|
title: '访客/粉丝',
|
||||||
path: '/pages/users/visitorFriendlist?type=fans',
|
path: '/pages/news/visitor?type=fans',
|
||||||
count: ''
|
count: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'https://image.fulllinkai.com/202201/21/9571a0bdddf66ea097eecd5a4a601436.png',
|
icon: 'https://image.fulllinkai.com/202201/21/9571a0bdddf66ea097eecd5a4a601436.png',
|
||||||
title: '我看过谁',
|
title: '我看过谁',
|
||||||
path: '/pages/users/review?type=review&title=我看过谁',
|
path: '/pages/news/review?type=review&title=我看过谁',
|
||||||
count: ''
|
count: ''
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
index: null, // 滑动删除聊天消息下标
|
index: null, // 滑动删除聊天消息下标
|
||||||
groupSessionsCount: [], // 群聊消息未读数
|
groupSessionsCount: [], // 群聊消息未读数
|
||||||
teamAtList: [], // 群聊@
|
teamAtList: [], // 群聊@
|
||||||
|
page: 1,
|
||||||
|
no_more: false,
|
||||||
list: [] // 消息列表数据
|
list: [] // 消息列表数据
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -229,45 +234,41 @@ wepy.page({
|
|||||||
page: vm.page
|
page: vm.page
|
||||||
}
|
}
|
||||||
vm.$showLoading('加载中...')
|
vm.$showLoading('加载中...')
|
||||||
vm.$get({url: `${service.host}/message/sessionV2`, data}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/chat/linkmen`, data}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
vm.menuList[0].count = data.system_count
|
vm.teamAtList = wx.getStorageSync('teamAtList') || []
|
||||||
vm.menuList[1].count = data.friend_count
|
vm.groupSessionsCount = wx.getStorageSync('teamsSessionsCount') || []
|
||||||
vm.menuList[2].count = data.follow_count + data.preview_count
|
|
||||||
let {session} = data
|
|
||||||
let arrList = []
|
let arrList = []
|
||||||
if (session.data && session.data.length > 0) {
|
if (data.data && data.data.length > 0) {
|
||||||
session.data.forEach((item) => {
|
data.data.forEach((item) => {
|
||||||
if (item.chat_type == 'group_chat') {
|
if (item.chat_type == 'group_chat') {
|
||||||
arrList.push({
|
arrList.push({
|
||||||
chat_type: item.chat_type,
|
chat_type: item.chat_type,
|
||||||
icon: item.team.icon,
|
icon: item.other_photo,
|
||||||
title: item.team.tname,
|
title: item.other_nickname,
|
||||||
is_top: item.is_top,
|
is_top: item.is_top,
|
||||||
content: item.last_message ? item.last_message.body.msg ? item.last_message.other_user.nickname ? (item.last_message.other_user.nickname + ':' + item.last_message.body.msg) : (item.last_message.other_user.name + ':' + item.last_message.body.msg) : '' : '',
|
content: item.last_user_nickname + ':' + item.content,
|
||||||
last_time: item.last_message ? item.last_message.last_time : '',
|
last_time: item.last_time_str,
|
||||||
id: item.team_id,
|
id: item.join_to_id,
|
||||||
hidden_profile: 'NONE',
|
hidden_profile: 'NONE',
|
||||||
msgId: item.id,
|
msgId: item.id,
|
||||||
isTouchMove: false,
|
isTouchMove: false,
|
||||||
new_count: wx.getStorageSync('muteNotList') && wx.getStorageSync('muteNotList').length > 0 ? 0 : this.getGroupCount(item.team_id),
|
new_count: wx.getStorageSync('muteNotList') && wx.getStorageSync('muteNotList').length > 0 ? 0 : vm.getGroupCount(item.join_to_id)
|
||||||
path: `/pages/home/groupChitchat?id=${item.team_id}&name=` + encodeURIComponent(`${item.team.tname}`)
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log(item.new_count, '///////****')
|
|
||||||
arrList.push({
|
arrList.push({
|
||||||
chat_type: item.chat_type,
|
chat_type: item.chat_type,
|
||||||
icon: item.other_user ? item.other_user.avatar || item.other_user.circle_avatar : '',
|
icon: item.other_photo,
|
||||||
title: item.other_user ? item.other_user.nickname || item.other_user.name : '',
|
title: item.other_nickname,
|
||||||
is_top: item.is_top,
|
is_top: item.is_top,
|
||||||
content: item.last_message ? item.last_message.content : '',
|
content: item.content,
|
||||||
last_time: item.last_message ? item.last_message.last_time : '',
|
last_time: item.last_time_str,
|
||||||
id: item.other_user ? item.other_user.id : '',
|
id: item.join_to_id,
|
||||||
hidden_profile: item.other_user ? item.other_user.hidden_profile : '',
|
hidden_profile: '',
|
||||||
msgId: item.id,
|
type: item.other_type,
|
||||||
|
msgId: item.last_id,
|
||||||
isTouchMove: false,
|
isTouchMove: false,
|
||||||
new_count: item.new_count,
|
new_count: item.new_count
|
||||||
path: item.other_user ? `/pages/home/chitchat?id=${item.other_user.id}&name=` + encodeURIComponent(`${item.other_user.nickname ? item.other_user.nickname : item.other_user.name}`) + `&type=${item.other_user.type}` : ''
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -283,7 +284,7 @@ wepy.page({
|
|||||||
j.muteTeam = i.muteTeam
|
j.muteTeam = i.muteTeam
|
||||||
j.muteState = true
|
j.muteState = true
|
||||||
} else if (j.chat_type == 'group_chat') {
|
} else if (j.chat_type == 'group_chat') {
|
||||||
j.new_count = this.getGroupCount(j.id)
|
j.new_count = vm.getGroupCount(j.id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -306,7 +307,7 @@ wepy.page({
|
|||||||
|
|
||||||
getNewCount() {
|
getNewCount() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$get({url: `${service.host}/new/message/count`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/notice/count`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
let {new_count} = data
|
let {new_count} = data
|
||||||
let groupCountList = wx.getStorageSync('teamsSessionsCount') || []
|
let groupCountList = wx.getStorageSync('teamsSessionsCount') || []
|
||||||
@ -332,6 +333,55 @@ wepy.page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
quitGroup (e, index) {
|
||||||
|
let vm = this
|
||||||
|
wx.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: `是否确认退出${e.title}群聊?`,
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
vm.$showLoading('')
|
||||||
|
vm.$post({url: `${service.host}/team/${e.id}/leave`}).then(({code, data}) => {
|
||||||
|
if (code == 0) {
|
||||||
|
vm.$showToast(`已退出群聊`)
|
||||||
|
vm.list.splice(index, 1)
|
||||||
|
}
|
||||||
|
wx.hideLoading()
|
||||||
|
}).catch(() => {
|
||||||
|
wx.hideLoading()
|
||||||
|
})
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除联系人列表
|
||||||
|
deleteList (e, index) {
|
||||||
|
let vm = this
|
||||||
|
wx.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: `是否确认退出${e.title}群聊?`,
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
vm.$showLoading('')
|
||||||
|
vm.$post({url: `${service.host}/team/${e.id}/leave`}).then(({code, data}) => {
|
||||||
|
if (code == 0) {
|
||||||
|
vm.$showToast(`已删除`)
|
||||||
|
vm.list.splice(index, 1)
|
||||||
|
}
|
||||||
|
wx.hideLoading()
|
||||||
|
}).catch(() => {
|
||||||
|
wx.hideLoading()
|
||||||
|
})
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 获取群未读数
|
// 获取群未读数
|
||||||
getGroupCount(id) {
|
getGroupCount(id) {
|
||||||
let newCount = this.groupSessionsCount.filter(item => {
|
let newCount = this.groupSessionsCount.filter(item => {
|
||||||
@ -375,40 +425,74 @@ wepy.page({
|
|||||||
return 360 * Math.atan(_Y / _X) / (2 * Math.PI)
|
return 360 * Math.atan(_Y / _X) / (2 * Math.PI)
|
||||||
},
|
},
|
||||||
|
|
||||||
close () {
|
// 聊天对话
|
||||||
console.log('2222222')
|
jumpChatPath(e) {
|
||||||
this.$app.$options.globalData.nim.team.updateMyMemberInfo({
|
let vm = this
|
||||||
teamId: '23903306874',
|
// 校验是否完成注册资料
|
||||||
bitConfigMask: 1
|
if (!vm.$signInVerify()) {
|
||||||
})
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let url = ``
|
||||||
|
if (e.chat_type === 'group_chat') {
|
||||||
|
url = `/pages/news/groupChitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&pic=${e.icon}`
|
||||||
|
} else {
|
||||||
|
url = `/pages/news/chitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&type=${e.type}&pic=${e.icon}`
|
||||||
|
}
|
||||||
|
wx.navigateTo({url: url})
|
||||||
},
|
},
|
||||||
|
// 用户详情
|
||||||
jumpPath(e) {
|
|
||||||
console.log(e, '8888888888')
|
|
||||||
wx.navigateTo({
|
|
||||||
url: `${e.path}&pic=${e.icon}`
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
jumpDetailPath(e) {
|
jumpDetailPath(e) {
|
||||||
wx.navigateTo({
|
let vm = this
|
||||||
url: `${e.path}&pic=${e.icon}`
|
// 校验是否完成注册资料
|
||||||
})
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let url = ``
|
||||||
|
if (e.chat_type === 'group_chat') {
|
||||||
|
url = `/pages/news/groupChitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&pic=${e.icon}`
|
||||||
|
} else {
|
||||||
|
url = `/pages/home/information?id=${e.id}`
|
||||||
|
}
|
||||||
|
wx.navigateTo({url: url})
|
||||||
|
},
|
||||||
|
jumpPath(e) {
|
||||||
|
let vm = this
|
||||||
|
// 校验是否完成注册资料
|
||||||
|
if (!vm.$signInVerify()) {
|
||||||
|
vm.loginShow = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
wx.navigateTo({url: e.path})
|
||||||
|
},
|
||||||
|
hiddenLogin() {
|
||||||
|
let vm = this
|
||||||
|
vm.loginShow = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 上拉获取更多数据
|
// 上拉获取更多数据
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
let vm = this
|
||||||
|
if (!vm.no_more) {
|
||||||
|
vm.getList()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
let vm = this
|
||||||
|
vm.page = 1
|
||||||
|
vm.no_more = false
|
||||||
|
vm.getList()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.teamAtList = wx.getStorageSync('teamAtList') || []
|
let vm = this
|
||||||
this.groupSessionsCount = wx.getStorageSync('teamsSessionsCount') || []
|
vm.getNewCount()
|
||||||
this.getList()
|
|
||||||
this.getNewCount()
|
|
||||||
},
|
},
|
||||||
created() {}
|
onLoad() {
|
||||||
|
let vm = this
|
||||||
|
vm.getList()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<config>
|
<config>
|
||||||
@ -419,7 +503,8 @@ enablePullDownRefresh: true,
|
|||||||
backgroundColorTop: '#ffffff',
|
backgroundColorTop: '#ffffff',
|
||||||
backgroundColorBottom: '#ffffff',
|
backgroundColorBottom: '#ffffff',
|
||||||
usingComponents: {
|
usingComponents: {
|
||||||
cuCustom: '~@/components/cuCustom'
|
cuCustom: '~@/components/cuCustom',
|
||||||
|
loginDialog: '~@/components/loginDialog',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</config>
|
</config>
|
||||||
|
|||||||
@ -12,8 +12,8 @@ page {
|
|||||||
import wepy from '@wepy/core'
|
import wepy from '@wepy/core'
|
||||||
import https from '../../mixins/https'
|
import https from '../../mixins/https'
|
||||||
import base from '../../mixins/base'
|
import base from '../../mixins/base'
|
||||||
import {wx_login} from '../../utils/util'
|
// import {wx_login} from '../../utils/util'
|
||||||
import { IM } from '../../utils/im'
|
// import { IM } from '../../utils/im'
|
||||||
|
|
||||||
wepy.page({
|
wepy.page({
|
||||||
config: {},
|
config: {},
|
||||||
@ -22,25 +22,29 @@ wepy.page({
|
|||||||
data: {},
|
data: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
methods: {
|
methods: {
|
||||||
appLogin() {
|
// appLogin() {
|
||||||
let vm = this
|
// let vm = this
|
||||||
let app = vm.$app.$options
|
// let app = vm.$app.$options
|
||||||
wx_login().then((e) => {
|
// wx_login().then((e) => {
|
||||||
wx.hideLoading()
|
// wx.hideLoading()
|
||||||
let {accid, token} = e.data.im_user
|
// let {accid, token} = e.data.im_user
|
||||||
app.globalData.nim = IM(accid, token)
|
// app.globalData.nim = IM(accid, token)
|
||||||
|
// setTimeout(() => {
|
||||||
|
// wx.switchTab({url: `/pages/tabBar/home`})
|
||||||
|
// }, 100)
|
||||||
|
// }).catch(() => {
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
// let vm = this
|
||||||
|
// vm.appLogin()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wx.switchTab({url: `/pages/tabBar/home`})
|
wx.switchTab({url: `/pages/tabBar/home`})
|
||||||
}, 100)
|
}, 100)
|
||||||
}).catch(() => {
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
|
||||||
let vm = this
|
|
||||||
vm.appLogin()
|
|
||||||
},
|
|
||||||
onShow() {},
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -54,8 +54,10 @@ const wx_login = () => {
|
|||||||
wx.setStorageSync('mobile', data.user.mobile) // 用户手机号
|
wx.setStorageSync('mobile', data.user.mobile) // 用户手机号
|
||||||
let userInfo = {
|
let userInfo = {
|
||||||
name: data.user.nickname,
|
name: data.user.nickname,
|
||||||
avatar: data.user.avatar || 'https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png',
|
avatar: data.user.photo || 'https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png',
|
||||||
showId: data.user.id,
|
showId: data.user.id,
|
||||||
|
rank_id: data.user.rank_id,
|
||||||
|
sex: data.user.sex,
|
||||||
id: data.user.id,
|
id: data.user.id,
|
||||||
type: data.user.type
|
type: data.user.type
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user