Commit acc28e46 authored by 罗超's avatar 罗超

.

parent 218605fc
{ // 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"
}
}
]
}
<style>
.circleNews .ftBox {
width: 100%;
height: 100%;
padding: 0 15px;
}
.circleNews .interDList {
width: 100%;
margin-top: 20px;
}
.circleNews .box-top {
display: flex;
align-items: center;
}
.circleNews .box-top-l {
width: 80rpx;
height: 80rpx;
position: relative;
border-radius: 50%;
}
.circleNews .gstyle {
position: absolute;
right: 0;
bottom: 0;
width: 15px;
height: 15px;
}
.circleNews .box-top-r {
width: calc(100vw - 30px - 80rpx - 15px);
margin-left: 15px;
}
.circleNews .box-top-r-n {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 15px;
color: #000000;
font-weight: bold;
}
.circleNews .box-c {
width: 100%;
padding: 10px 0;
font-size: 13px;
color: #000000;
display: flex;
align-items: flex-start;
}
.circleNews .box-b {
width: 100%;
display: flex;
align-items: center;
background: #F5F5F5;
min-height: 45px;
border-radius: 2px;
}
.box-b-text {
display: flex;
align-items: center;
font-size: 13px;
color: #111111;
margin-left: 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ftBox-right-text {
width: 55px;
height: 55px;
border-radius: 2px;
font-size: 14px;
color: #333333;
background: #F5F5F5;
}
</style>
<template> <template>
<view class="circleNews"> <view class="circleNews">
<u-empty v-if="g.length == 0" text="暂无消息记录" mode="list"></u-empty> <u-empty v-if="g.length == 0" text="暂无消息记录" mode="list"></u-empty>
<view v-if="g.length > 0" style=" <view v-if="g.length > 0" style="
height: calc(100vh); height: calc(100vh);
width: calc(100vw);
overflow: hidden; overflow: hidden;
"> ">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower"
...@@ -152,6 +62,8 @@ ...@@ -152,6 +62,8 @@
</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" />
</view> </view>
<view class="ftBox" v-if="type==2"> <view class="ftBox" v-if="type==2">
<view class="interDList" v-for="(x, i) in g" :key="i"> <view class="interDList" v-for="(x, i) in g" :key="i">
...@@ -177,19 +89,19 @@ ...@@ -177,19 +89,19 @@
<view style="margin-left: 5px;">{{x.Content}}</view> <view style="margin-left: 5px;">{{x.Content}}</view>
</view> </view>
<view class="box-b" @click="jumpPPDetail(x.ReplyContent[0])"> <view class="box-b" @click="jumpPPDetail(x.ReplyContent[0])">
<image <image :src="x.ReplyContent[0].ImageList[0]" mode="widthFix"
:src="x.ReplyContent[0].ImageList[0]" style="width: 55px;height: 55px;position: relative;"></image>
mode="widthFix" style="width: 55px;height: 55px;position: relative;"></image>
<view class="box-b-text" style="width: calc(100vw - 30px - 55px - 30px);"> <view class="box-b-text" style="width: calc(100vw - 30px - 55px - 30px);">
<text :style="{color:mainColor}">{{x.ReplyContent[0].UserName}}:</text> <text :style="{color:mainColor}">{{x.ReplyContent[0].UserName}}:</text>
{{x.ReplyContent[0].ActivityTitle}} {{x.ReplyContent[0].ActivityTitle}}
</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" />
</view> </view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20"
bg-color="#FFF" />
</scroll-view> </scroll-view>
</view> </view>
...@@ -229,52 +141,12 @@ ...@@ -229,52 +141,12 @@
nomore: "没有更多了", nomore: "没有更多了",
}, },
windowWidth: 0, windowWidth: 0,
msgType: {
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.pricecolor = this.$uiConfig.pricecolor;
this.windowWidth = this.$utils.SystemInfo().windowWidth;
},
mounted() {
let currentPages = getCurrentPages();
// let u = "/" + currentPages[currentPages.length - 1].route;
// let pages = wx.getStorageSync("basedata") ?
// wx.getStorageSync("basedata").bar_title :
// [];
// pages.forEach((x) => {
// if (x.value == u) {
// this.pageTitle = x.new_name ? x.new_name : x.name;
// }
// });
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(options) {
this.msg.SelectType = options.pageType;
this.type = options.pageType;
if (options.pageType == 1) {
this.pageTitle = "圈子消息"
} else if (options.pageType == 2) {
this.pageTitle = "拼拼Plus"
} }
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
}; };
this.showAuth = true;
} else {
this.init();
}
}, },
methods: { methods: {
init() { init() {
this.loading = true; this.loading = true;
...@@ -317,24 +189,170 @@ ...@@ -317,24 +189,170 @@
}, },
//跳转拼拼plus详情 //跳转拼拼plus详情
jumpPPDetail(x){ jumpPPDetail(x) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/blindDate/postDetails?Id='+x.Id url: '/pages/blindDate/postDetails?Id=' + x.Id
}) })
}, },
//跳转q圈子详情 //跳转圈子详情
jumpCircleDetail(x){ jumpCircleDetail(x) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/friendcircle/mydetails?ID=' + x.id+'&index='+-1 url: '/pages/friendcircle/mydetails?ID=' + x.Id + '&index=' + -1
}) })
},
//设置全部消息为已看
setAllMsgSee() {
this.request2({
url: '/api/AppletMiai/DelMiaiMessageInfoBatch',
data: {
TypeIds: this.msg.SelectType
},
},
res => {
if (res.resultCode == 1) {
}
}
);
}
},
onShow() {
this.setAllMsgSee()
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.pricecolor = this.$uiConfig.pricecolor;
this.windowWidth = this.$utils.SystemInfo().windowWidth;
},
mounted() {
let currentPages = getCurrentPages();
// let u = "/" + currentPages[currentPages.length - 1].route;
// let pages = wx.getStorageSync("basedata") ?
// wx.getStorageSync("basedata").bar_title :
// [];
// pages.forEach((x) => {
// if (x.value == u) {
// this.pageTitle = x.new_name ? x.new_name : x.name;
// }
// });
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(options) {
this.msg.SelectType = options.pageType;
this.type = options.pageType;
if (options.pageType == 1) {
this.pageTitle = "圈子消息"
} else if (options.pageType == 2) {
this.pageTitle = "拼拼Plus"
}
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else {
this.init();
} }
}, },
}; };
</script> </script>
<style> <style>
.circleNews { .circleNews .ftBox {
/* width: 100%; */
/* height: 100%; */
padding: 0 15px;
}
.circleNews .interDList {
width: 100%;
padding-top: 20px;
}
.circleNews .box-top {
display: flex;
align-items: center;
}
.circleNews .box-top-l {
width: 80rpx;
height: 80rpx;
position: relative;
border-radius: 50%;
}
.circleNews .gstyle {
position: absolute;
right: 0;
bottom: 0;
width: 15px;
height: 15px;
}
.circleNews .box-top-r {
width: calc(100vw - 30px - 80rpx - 15px);
margin-left: 15px;
}
.circleNews .box-top-r-n {
width: 100%; width: 100%;
height: 100vh; overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 15px;
color: #000000;
font-weight: bold;
}
.circleNews .box-c {
width: 100%;
padding: 10px 0;
font-size: 13px;
color: #000000;
display: flex;
align-items: flex-start;
}
.circleNews .box-b {
width: 100%;
display: flex;
align-items: center;
background: #F5F5F5;
min-height: 45px;
border-radius: 2px;
}
.box-b-text {
display: flex;
align-items: center;
font-size: 13px;
color: #111111;
margin-left: 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ftBox-right-text {
width: 55px;
height: 55px;
border-radius: 2px;
font-size: 14px;
color: #333333;
background: #F5F5F5;
}
.circleNews {
/* width: 100%; */
/* height: 100vh; */
background: #FFF; background: #FFF;
} }
</style> </style>
...@@ -22,15 +22,22 @@ ...@@ -22,15 +22,22 @@
</view> </view>
</view> </view>
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view> </view>
</template> </template>
<script> <script>
import auth from "@/components/auth/index.vue";
export default { export default {
components: {
auth
},
data() { data() {
return { return {
pageTitle: "消息", pageTitle: "消息",
listData: [] listData: [],
showAuth:false,
u:{},
} }
}, },
methods: { methods: {
...@@ -73,10 +80,31 @@ ...@@ -73,10 +80,31 @@
} }
} }
); );
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.getMiaiMessageCenter();
},
//关闭登录窗口
gbAuth(){
uni.navigateBack()
},
},
onShow() {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.getMiaiMessageCenter();
} }
}, },
mounted() { mounted() {
this.getMiaiMessageCenter()
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
}); });
......
<template> <template>
<view class="page"> <view class="page">
<u-empty v-if="sysMsgData.length == 0" text="暂无系统消息" mode="list"></u-empty> <u-empty v-if="sysMsgData.length == 0" text="暂无系统消息" mode="list"></u-empty>
<view v-if="sysMsgData.length > 0" style=" <view v-if="sysMsgData.length > 0" class="viewBox">
height: calc(100vh);
overflow: hidden;
">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower"
:style="{ height: '100%' }"> :style="{ height: '100%' }">
<view v-for="(item,index) in sysMsgData" :key="index"> <view v-for="(item,index) in sysMsgData" :key="index">
...@@ -108,6 +105,7 @@ ...@@ -108,6 +105,7 @@
return newArr return newArr
}, },
lower(e) { lower(e) {
console.log("1")
if (this.msg.pageIndex < this.pageCount) { if (this.msg.pageIndex < this.pageCount) {
this.msg.pageIndex++; this.msg.pageIndex++;
this.status = "loading"; this.status = "loading";
...@@ -116,9 +114,27 @@ ...@@ -116,9 +114,27 @@
this.status = "nomore"; this.status = "nomore";
} }
}, },
//设置全部消息为已看
setAllMsgSee() {
this.request2({
url: '/api/AppletMiai/DelMiaiMessageInfoBatch',
data: {
TypeIds: "8,9,10"
}, },
mounted() { },
res => {
if (res.resultCode == 1) {
}
}
);
}
},
onShow() {
this.getMiaiMessagePageList(); this.getMiaiMessagePageList();
this.setAllMsgSee();
},
mounted() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
}); });
...@@ -135,7 +151,10 @@ ...@@ -135,7 +151,10 @@
min-height: 100vh; min-height: 100vh;
background-color: #EAEBEC; background-color: #EAEBEC;
} }
.viewBox{
height: calc(100vh);
overflow: hidden;
}
.itemBox { .itemBox {
.date { .date {
height: 84rpx; height: 84rpx;
......
...@@ -184,15 +184,34 @@ ...@@ -184,15 +184,34 @@
this.status = "nomore"; this.status = "nomore";
} }
}, },
//设置全部消息为已看
setAllMsgSee() {
this.request2({
url: '/api/AppletMiai/DelMiaiMessageInfoBatch',
data: {
TypeIds: "7"
},
},
res => {
if (res.resultCode == 1) {
}
}
);
}
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
this.pricecolor = this.$uiConfig.pricecolor; this.pricecolor = this.$uiConfig.pricecolor;
}, },
onShow(){
// this.setAllMsgSee();
this.getMiaiMessageVisitorPageList()
},
mounted() { mounted() {
this.getMiaiMessageVisitorStatistics() this.getMiaiMessageVisitorStatistics()
this.getMiaiMessageVisitorPageList()
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
}); });
......
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