Commit 732ef1e0 authored by 罗超's avatar 罗超

1

parent edd029d7
......@@ -584,6 +584,8 @@
"path":"message"//消息
},{
"path":"visitor"//访客
},{
"path":"systemMsg"//系统消息
},{
"path":"personal/mydate"//我的约会
}]
......
<template>
<view class="page">
<view v-for="(item,index) in listData" :key="index">
<view class="itemBox">
<view class="itemBox" @click="jumpPage(index)">
<view class="avatarBox">
<image class="imgicon" :src="item.imgurl" mode="widthFix"></image>
<u-badge size="mini" class="badge" :absolute="false" :count="item.Num"></u-badge>
......@@ -34,6 +34,21 @@
}
},
methods: {
jumpPage(index){
let url="";
if(index==0){
url=""
}else if(index==1){
url="/pages/blindDate/systemMsg"
}else if(index==2){
url=""
}else if(index==3){
url="/pages/blindDate/visitor"
}
uni.navigateTo({
url:url
})
},
getMiaiMessageCenter(){
this.request2(
{
......@@ -55,7 +70,6 @@
}
this.listData.push(res.data[key])
}
}
}
);
......@@ -100,24 +114,24 @@
height: 148rpx;
margin-left: 27rpx;
flex-grow: 5;
display: flex;
flex-wrap: wrap;
align-content: center;
border-bottom: 1rpx solid #E2E2E2;
padding-top: 40rpx;
.infoTop{
width: 100%;
// height: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
// margin-bottom: 5rpx;
// margin-bottom: 15rpx;
.infoName{
font-size: 30rpx;
font-weight: bold;
color: #000000;
}
.infoDate{
font-size: 24rpx;
font-weight: 500;
// font-weight: 500;
color: #999999;
}
}
......
<template>
<view class="page">
<u-empty v-if="sysMsgData.length == 0" text="暂无系统消息" mode="list"></u-empty>
<view v-if="sysMsgData.length > 0" style="
height: calc(100vh);
overflow: hidden;
padding-bottom: 50px;
">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower"
:style="{ height: '100%' }">
<view v-for="(item,index) in sysMsgData" :key="index">
<view class="itemBox">
<view class="date">
{{item.date}}
</view>
<view v-if="item.list" v-for="(subItem,subIndex) in item.list" :key="subIndex">
<view class="subItemBox">
<view class="top">
<image class="icon" :src="subItem.icon" mode="heightFix"></image>
<view class="type">
{{subItem.type}}
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20"
bg-color="#FFF" />
</scroll-view>
</view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
</view>
</template>
<script>
export default{
data(){
return{
pageTitle: "系统消息",
msg: {
pageIndex: 1,
pageSize: 10,
SelectType: 4,
Status: -1
},
sysMsgData:[
{date:"2021/03/01",
list:[{
type:"系统消息",
icon:"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Blind-ppplus.png",
tipMsg:"报名取消成功!",
con:'支付宝717生活狂欢节--开场动画 美术制造流程'
}]}
],
loading: false,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
}
},
methods:{
getMiaiMessagePageList(){
this.request2(
{
url: '/api/AppletMiai/GetMiaiMessagePageList',
data:this.msg
},
res => {
if(res.resultCode==1){
}
}
);
}
},
mounted() {
this.getMiaiMessagePageList();
uni.setNavigationBarTitle({
title: this.pageTitle,
});
}
}
</script>
<style lang="scss" scoped>
.page{
padding: 0 30rpx;
// width: 100%;
min-height: 100vh;
background-color: #EAEBEC;
}
.itemBox{
width: 100%;
.date {
height: 84rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 26rpx;
font-weight: 500;
color: #888888;
padding-top: 40rpx;
}
.subItemBox{
// width: 100%;
height: 290rpx;
padding: 30rpx;
background-color: #FFFFFF;
.top{
width: 100%;
height: 95rpx;
display: flex;
align-items: center;
.icon{
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.type{
font-size: 30rpx;
font-weight: 800;
color: #000000;
}
}
}
}
</style>
......@@ -47,23 +47,23 @@
<view v-for="(item,index) in visitorData" :key="index">
<view class="itemBox">
<view class="date">
{{item.DateStr}}
{{item.date.slice(0,10)}}
</view>
<view v-if="item.List" v-for="(subItem,subIndex) in item.List" :key="subIndex">
<view v-if="item.list" v-for="(subItem,subIndex) in item.list" :key="subIndex">
<view class="subItemBox">
<view class="avaBox">
<image class="avatar" src="subItem.Photo"></image>
<image class="sex" src="sex[subItem.Sex]"></image>
<image class="avatar" :src="subItem.Photo"></image>
<image class="sex" :src="sex[subItem.Sex]"></image>
</view>
<view class="rightBox">
<view class="infoBox">
<view class="name">
{{subItem.UserName}}
{{subItem.RealName||subItem.UserName}}
</view>
<view class="time">
{{subItem.CreateDateHour}}访问了你的自画像
{{subItem.CreateDate.slice(-5)}}访问了你的自画像
</view>
</view>
<view class="icon"> </view>
......@@ -89,7 +89,10 @@
data() {
return {
pageTitle: "访客",
sex:{0:"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv.png",1:"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan.png"},
sex: {
0: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv.png",
1: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan.png"
},
msg: {
pageIndex: 1,
pageSize: 10,
......@@ -143,28 +146,32 @@
res => {
if (res.resultCode == 1) {
this.loading = false;
this.handleDate(res.data.pageData,"CreateDateDay")
// this.visitorData = this.visitorData.concat(data);
let data=this.handleDate(res.data.pageData, "CreateDate","CreateDate")
console.log(data)
this.visitorData = this.visitorData.concat(data);
this.pageCount = res.data.pageCount
}
}
);
},
handleDate(array,date){
let newArr=array.reduce((results, item) => {
const current = results.find(i => i.date === item.date);
if (current) {
for (let property in item) {
if (property !== date) {
current[property] = item[property];
}
}
handleDate(arr, date,id) {
let newArr = []
arr.map((item, i) => {
let find = newArr.filter((e) => {
return e.date == item[date]
})
if (find.length > 0) {
find[0].list.push(item)
} else {
results.push({...item});
let obj = {
date: item[date],
list: [item]
}
newArr.push(obj)
}
return results;
}, []);
console.log(newArr)
}, [])
return newArr
},
lower(e) {
console.log(e)
......@@ -255,8 +262,9 @@
display: flex;
align-items: center;
.avaBox{
.avaBox {
position: relative;
.avatar {
width: 80rpx;
height: 80rpx;
......@@ -264,12 +272,13 @@
background-color: #00BFFF;
margin-right: 30rpx;
}
.sex{
width: 80rpx;
height: 80rpx;
.sex {
width: 30rpx;
height: 30rpx;
border-radius: 50%;
position:absolute;
right: 0;
position: absolute;
right: 30rpx;
bottom: 0;
}
}
......
......@@ -18,7 +18,7 @@
<u-icon name="arrow-left" size="44"></u-icon>
</view>
</view>
<!-- <view @click='yj' style="width: 200px;height: 50px;">活动</view> -->
<view @click='yj' style="width: 200px;height: 50px;">活动</view>
<u-tabs v-if="myPageData.home_pages && myPageData.home_pages.navs.length > 1" name="name" :list="myPageData.home_pages.navs"
:is-scroll="true" :active-color="mainColor" :current="active" :bar-width="80" :font-size="32" :bold="false" @change="changeHandler"></u-tabs>
<template v-for="(item, i) in myPageData.home_pages.navs">
......@@ -1133,9 +1133,7 @@
yj(){
uni.navigateTo({
// url: '/pages/blindDate/message'
url: '/pages/blindDate/visitor'
url: '/pages/blindDate/message'
})
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment