|
@@ -1,70 +1,78 @@
|
|
|
<template>
|
|
|
<view class="messBox">
|
|
|
<statusBar :item="navbarData"></statusBar>
|
|
|
-
|
|
|
- <view class="mesItem" @click="goToMesDetail">
|
|
|
- <view class="leftBox" >
|
|
|
- <view class="mesImg">
|
|
|
- <image src="http://43.139.158.220:5007/img/static/message/notice.svg" mode="aspectFill"></image>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="mesBrief">
|
|
|
- <view class="tit">活动通知</view>
|
|
|
- <view class="breif fz-font" style="line-height: 40rpx;">活动报名成功</view>
|
|
|
+ <view class="" v-if="isLogin==1">
|
|
|
+ <view class="mesItem" @click="goToMesDetail">
|
|
|
+ <view class="leftBox">
|
|
|
+ <view class="mesImg">
|
|
|
+ <image src="http://43.139.158.220:5007/img/static/message/notice.svg" mode="aspectFill"></image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="mesBrief">
|
|
|
+ <view class="tit">活动通知</view>
|
|
|
+ <view class="breif fz-font" style="line-height: 40rpx;">活动报名成功</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="right">
|
|
|
- <view class="">
|
|
|
- <view v-if="isAll" class="newMessage"></view>
|
|
|
+
|
|
|
+ <view class="right">
|
|
|
+ <view class="">
|
|
|
+ <view v-if="isAll" class="newMessage"></view>
|
|
|
+ </view>
|
|
|
+ <view class="mesTime fz-font">07-12</view>
|
|
|
</view>
|
|
|
- <view class="mesTime fz-font">07-12</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
- <view class="mesItem" @click="goToMeGXt">
|
|
|
- <view class="leftBox">
|
|
|
- <view class="mesImg">
|
|
|
- <image src="http://43.139.158.220:5007/img/static/message/system.svg" mode=""></image>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="mesBrief">
|
|
|
- <view class="tit ">系统通知</view>
|
|
|
- <view class="breif fz-font" style="line-height: 40rpx;">已加入xxxxxx教研室</view>
|
|
|
+
|
|
|
+
|
|
|
+ <view class="mesItem" @click="goToMeGXt">
|
|
|
+ <view class="leftBox">
|
|
|
+ <view class="mesImg">
|
|
|
+ <image src="http://43.139.158.220:5007/img/static/message/system.svg" mode=""></image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="mesBrief">
|
|
|
+ <view class="tit ">系统通知</view>
|
|
|
+ <view class="breif fz-font" style="line-height: 40rpx;">已加入xxxxxx教研室</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="right">
|
|
|
- <view class="">
|
|
|
- <view v-if="xt" class="newMessage"></view>
|
|
|
+
|
|
|
+ <view class="right">
|
|
|
+ <view class="">
|
|
|
+ <view v-if="xt" class="newMessage"></view>
|
|
|
+ </view>
|
|
|
+ <view class="mesTime fz-font">07-12</view>
|
|
|
</view>
|
|
|
- <view class="mesTime fz-font" >07-12</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="mesItem" @click="goToMegDy">
|
|
|
- <view class="leftBox">
|
|
|
- <view class="mesImg">
|
|
|
- <image src="http://43.139.158.220:5007/img/static/message/subscribe.svg" mode=""></image>
|
|
|
+
|
|
|
+ <view class="mesItem" @click="goToMegDy">
|
|
|
+ <view class="leftBox">
|
|
|
+ <view class="mesImg">
|
|
|
+ <image src="http://43.139.158.220:5007/img/static/message/subscribe.svg" mode=""></image>
|
|
|
+ </view>
|
|
|
+ <view class="mesBrief">
|
|
|
+ <view class="tit ">订阅消息</view>
|
|
|
+ <view class="breif fz-font" style="line-height: 40rpx;">xxx教研室更新了课程</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="mesBrief">
|
|
|
- <view class="tit ">订阅消息</view>
|
|
|
- <view class="breif fz-font" style="line-height: 40rpx;">xxx教研室更新了课程</view>
|
|
|
+ <view class="right">
|
|
|
+ <view class="">
|
|
|
+ <view v-if="dy" class="newMessage"></view>
|
|
|
+ </view>
|
|
|
+ <view class="mesTime fz-font">07-12</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="right">
|
|
|
-
|
|
|
- <view class="">
|
|
|
- <view v-if="dy" class="newMessage"></view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="mesTime fz-font">07-12</view>
|
|
|
+ </view>
|
|
|
+ <view v-else class="noLogin"> <!-- 未登录展示样式 -->
|
|
|
+ <view class="mid">
|
|
|
+ <image src="http://43.139.158.220:5007/img/static/yym/Vector.png" mode="aspectFill"></image>
|
|
|
+ <view class="tit" style="">您暂时还没有消息</view>
|
|
|
+ <view class="brief fz-font" style="color: rgba(0, 0, 0, 0.4);">快去登录查看消息吧</view>
|
|
|
+ <view class="btn" @click="gotoLogin">去登录</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -72,18 +80,19 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- navbarData:{
|
|
|
- title:'消息'
|
|
|
+ navbarData: {
|
|
|
+ title: '消息'
|
|
|
},
|
|
|
// msgList:[
|
|
|
// {tit:'hd',isClick:0},
|
|
|
// {tit:'hd',isClick:0},
|
|
|
// {tit:'hd',isClick:0},
|
|
|
// ]
|
|
|
- isAll:1,
|
|
|
- xt:1,
|
|
|
- dy:1
|
|
|
-
|
|
|
+ isAll: 1,
|
|
|
+ xt: 1,
|
|
|
+ dy: 1,
|
|
|
+ isLogin: 0
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -91,27 +100,34 @@
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/hdxx/hdxx'
|
|
|
});
|
|
|
- this.isAll=0
|
|
|
+ this.isAll = 0
|
|
|
},
|
|
|
- goToMeGXt(){
|
|
|
+ goToMeGXt() {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/messageSystem/messageSystem'
|
|
|
});
|
|
|
- this.xt=0
|
|
|
+ this.xt = 0
|
|
|
},
|
|
|
goToMegDy() {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/messageDy/messageDy'
|
|
|
});
|
|
|
- this.dy=0
|
|
|
+ this.dy = 0
|
|
|
},
|
|
|
-
|
|
|
+ gotoLogin() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ this.isLogin = uni.getStorageSync('login');
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-
|
|
|
.messBox {
|
|
|
background: #fff;
|
|
|
display: flex;
|
|
@@ -119,6 +135,51 @@
|
|
|
flex-wrap: nowrap;
|
|
|
// align-items: center;
|
|
|
|
|
|
+ // 未登录展示样式
|
|
|
+ .noLogin {
|
|
|
+ width: 750rpx;
|
|
|
+ height: 80vh;
|
|
|
+ background-color: #f0f2f5;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .mid {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ height: 20vh;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .tit {
|
|
|
+ margin-top: 30rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(0, 0, 0, 0.8);
|
|
|
+ line-height: 48rpx;
|
|
|
+ font-size: 34rpx;
|
|
|
+ }
|
|
|
+ .brief{
|
|
|
+ margin-top: 10rpx;
|
|
|
+ }
|
|
|
+ image {
|
|
|
+ width: 175rpx;
|
|
|
+ height: 148rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn {
|
|
|
+ margin-top: 30rpx;
|
|
|
+ width: 160rpx;
|
|
|
+ height: 64rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ background-color: rgba(0, 86, 168, 1);
|
|
|
+ border-radius: 100rpx;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.mesItem {
|
|
|
display: flex;
|
|
|
// flex-direction: row;
|
|
@@ -141,7 +202,8 @@
|
|
|
height: 96rpx;
|
|
|
// padding: 30rpx 5rpx;
|
|
|
margin-right: 25rpx;
|
|
|
- image{
|
|
|
+
|
|
|
+ image {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
@@ -151,17 +213,20 @@
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
justify-content: space-between;
|
|
|
- .tit{
|
|
|
+
|
|
|
+ .tit {
|
|
|
font-size: 32rpx;
|
|
|
font-weight: 400;
|
|
|
line-height: 48rpx;
|
|
|
color: #333333;
|
|
|
}
|
|
|
- .breif{
|
|
|
+
|
|
|
+ .breif {
|
|
|
// font-size: 16px;
|
|
|
color: rgba(51, 51, 51, 1);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
// .mesBrief:nth-child(1){
|
|
|
// // font-size: 36rpx;
|
|
|
// }
|
|
@@ -170,17 +235,19 @@
|
|
|
// padding: 10rpx 0 0 0;
|
|
|
// }
|
|
|
}
|
|
|
- .right{
|
|
|
+
|
|
|
+ .right {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
padding-top: 10px;
|
|
|
+
|
|
|
.mesTime {
|
|
|
color: #999;
|
|
|
bottom: 30px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.newMessage {
|
|
|
width: 16rpx;
|
|
|
height: 16rpx;
|
|
@@ -189,7 +256,7 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|