Commit 2f3fe2f8 authored by 罗超's avatar 罗超

1

parent 28be22b8
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"type": "uniCloud",
"default": {
"launchtype": "remote"
}
}
]
}
......@@ -114,6 +114,7 @@ body {
}
swiper {
height: unset;
}
image{will-change: transform}
</style>
......@@ -55,7 +55,7 @@
"sdkConfigs" : {
"share" : {
"weixin" : {
"appid" : "wxbb033190e0ffa5db",
"appid" : "wxcf0727a7c78b501e",
"UniversalLinks" : ""
}
}
......@@ -66,7 +66,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wxbb033190e0ffa5db",
"appid" : "wxcf0727a7c78b501e",
"setting" : {
"urlCheck" : false,
"minified" : false
......
......@@ -580,7 +580,12 @@
"path":"personal/myrecruitstick"//我的招募贴
},{
"path":"richText"//富文本编辑页面
}]
},{
"path":"message"//消息
},{
"path":"visitor"//访客
}
]
},
//韩国馆项目 { "root": "pages/kotra", "pages": [{ "path": "contanctus" },{ "path": "contanctDetail" },{ "path": "compInformation" },{
"path": "activeInner"
......
<template>
<view class="page">
<view v-for="(item,index) in listData" :key="index">
<view class="itemBox">
<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>
</view>
<view class="infoBox">
<view class="infoTop">
<view class="infoName">
{{item.Title}}
</view>
<view class="infoDate">
{{item.Time}}
</view>
</view>
<view class="infoTipMsg">
{{item.Description}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "消息",
listData: []
}
},
methods: {
getMiaiMessageCenter(){
this.request2(
{
url: '/api/AppletMiai/GetMiaiMessageCenter',
data:{}
},
res => {
if(res.resultCode==1){
this.listData=[]
for(let key in res.data ){
if(key=="CircleModel"){
res.data.CircleModel.imgurl="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Blind-quan.png"
}else if(key=="PPPlusModel"){
res.data.PPPlusModel.imgurl="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Blind-xitong.png"
}else if(key=="SystemModel"){
res.data.SystemModel.imgurl="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Blind-ppplus.png"
}else if(key=="VisitorModel"){
res.data.VisitorModel.imgurl="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Blind-fangke.png"
}
this.listData.push(res.data[key])
}
}
}
);
}
},
mounted() {
this.getMiaiMessageCenter()
uni.setNavigationBarTitle({
title: this.pageTitle,
});
}
}
</script>
<style lang="scss" scoped>
.page {
padding: 0 30rpx;
}
.itemBox {
width: 100%;
height: 148rpx;
display: flex;
align-items: center;
.avatarBox{
position: relative;
width: 88rpx;
height: 88rpx;
.imgicon{
width: 88rpx;
height: 88rpx;
}
/deep/.badge{
position: absolute;
top: 0rpx;
right: 0rpx;
}
}
}
.infoBox{
height: 148rpx;
margin-left: 27rpx;
flex-grow: 5;
display: flex;
flex-wrap: wrap;
align-content: center;
border-bottom: 1rpx solid #E2E2E2;
.infoTop{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
// margin-bottom: 5rpx;
.infoName{
font-size: 30rpx;
font-weight: bold;
color: #000000;
}
.infoDate{
font-size: 24rpx;
font-weight: 500;
color: #999999;
}
}
.infoTipMsg{
font-size: 24rpx;
font-weight: 500;
color: #999999;
}
}
</style>
<template>
<view class="page">
<!-- <view class="navBox">
<view v-for="(item,index) in navList" :key="index">
<view class="nav">
{{item.name}}
</view>
</view>
</view> -->
<u-tabs :list="navList" :is-scroll="false" :current="current" @change="change" :active-color="mainColor">
</u-tabs>
<view class="visitBox">
<view class="visit">
<view class="num">
{{allVisit}}
</view>
<view class="name">
总浏览量
</view>
</view>
<view class="visit">
<view class="num">
{{todayVisit}}
</view>
<view class="name">
今日访客
</view>
</view>
<view class="visit">
<view class="num">
{{todayVisit}}
</view>
<view class="name">
今日浏览量
</view>
</view>
</view>
<u-empty v-if="visitorData.length == 0" text="暂无访问记录" mode="list"></u-empty>
<view v-if="visitorData.length > 0" style="
height: calc(100vh-160rpx-80rpx);
width: calc(100vw);
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 visitorData" :key="index">
<view class="itemBox">
<view class="date">
{{item.DateStr}}
</view>
<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>
</view>
<view class="rightBox">
<view class="infoBox">
<view class="name">
{{subItem.UserName}}
</view>
<view class="time">
{{subItem.CreateDateHour}}访问了你的自画像
</view>
</view>
<view class="icon"> </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: "访客",
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,
VsisitorType: 1,
Status: -1
},
pageCount: 0,
mainColor: "",
secondary: '',
pricecolor: '',
navList: [{
name: "谁看过我"
}, {
name: "我看过谁"
}],
current: 0,
allVisit: 100, //总浏览量
todayVisit: 1, //今日访客,今日浏览量
visitorData: [],
loading: false,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
}
},
methods: {
change(index) {
this.current = index;
},
getMiaiMessageVisitorStatistics() {
this.request2({
url: '/api/AppletMiai/GetMiaiMessageVisitorStatistics',
data: {}
},
res => {
if (res.resultCode == 1) {
this.allVisit = res.data.TCount
this.todayVisit = res.data.PeopleNum
}
}
);
},
getMiaiMessageVisitorPageList() {
this.request2({
url: '/api/AppletMiai/GetMiaiMessageVisitorPageList',
data: this.msg
},
res => {
if (res.resultCode == 1) {
this.loading = false;
this.handleDate(res.data.pageData,"CreateDateDay")
// 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];
}
}
} else {
results.push({...item});
}
return results;
}, []);
console.log(newArr)
},
lower(e) {
console.log(e)
if (this.msg.pageIndex < this.pageCount) {
this.msg.pageIndex++;
this.status = "loading";
this.getMiaiMessageVisitorPageList();
} else {
this.status = "nomore";
}
},
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.pricecolor = this.$uiConfig.pricecolor;
},
mounted() {
this.getMiaiMessageVisitorStatistics()
this.getMiaiMessageVisitorPageList()
uni.setNavigationBarTitle({
title: this.pageTitle,
});
}
}
</script>
<style lang="scss" scoped>
.page {
padding: 0 30rpx;
}
.navBox {
width: 100%;
height: 115rpx;
// display: flex;
// justify-content: space-around;
// align-items: center;
.nav {
width: 170rpx;
height: 56rpx;
border-radius: 28rpx;
font-size: 28rpx;
font-weight: 500;
color: #888888;
text-align: center;
}
}
.visitBox {
height: 160rpx;
display: flex;
justify-content: space-around;
align-items: center;
.visit {
width: 115rpx;
height: 72rpx;
.num {
text-align: center;
font-size: 40rpx;
font-weight: bold;
color: #111111;
}
.name {
text-align: center;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
}
}
}
.itemBox {
.date {
font-size: 26rpx;
font-weight: 500;
color: #111111;
margin-top: 40rpx;
}
.subItemBox {
height: 140rpx;
display: flex;
align-items: center;
.avaBox{
position: relative;
.avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background-color: #00BFFF;
margin-right: 30rpx;
}
.sex{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
position:absolute;
right: 0;
bottom: 0;
}
}
.rightBox {
flex-grow: 5;
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
border-bottom: 1rpx solid #E2E2E2;
.infoBox {
.name {
margin-bottom: 5rpx;
font-size: 30rpx;
font-weight: 800;
color: #000000;
}
.time {
font-size: 24rpx;
font-weight: 500;
color: #888888;
}
}
.icon {
width: 30rpx;
height: 6rpx;
background-color: #000000;
}
}
}
}
</style>
......@@ -1127,9 +1127,11 @@
getPickcar(Name) { //选择取消地址
this.$refs.city[0].getPickcar(Name)
},
yj(){
uni.navigateTo({
url: '/pages/kotra/baomingorder'
// url: '/pages/blindDate/message'
url: '/pages/blindDate/visitor'
})
}
},
......
......@@ -113,7 +113,7 @@ export default {
// 获取小程序APPID
Vue.prototype.GetMiniAppId = function() {
let appObj = {};
let appType = 8;
let appType = 2;
switch (appType) {
case 1: //赞羊
appObj = {
......
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