notice done

This commit is contained in:
unknown 2020-02-27 02:05:19 +08:00
parent 3bfb5c1517
commit 619777f933
3 changed files with 82 additions and 3 deletions

View File

@ -67,6 +67,12 @@
"navigationBarTitleText": "修改密码"
}
}
,{
"path" : "pages/notice/detail/noticeDetail",
"style" : {
"navigationBarTitleText": "通知页面详情"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",

View File

@ -0,0 +1,63 @@
<template>
<view class="notice">
<view class="title"> {{notice.title}} </view>
<view class="content">
<view ><text class="ad_au_text">{{notice.context}}</text></view>
</view>
<view class="footer"> 时间: {{notice.timeStr}}</view>
</view>
</template>
<script>
export default {
data() {
return {
notice:{}
}
},
onLoad: function(options) {
let _that = this;
let index = parseInt(options.index);
// this.checkLoginStatus();
let info = JSON.parse( uni.getStorageSync('notice-'+ (index)));
if (info) {
// this.setData({
// notice: info
// })
_that.notice = info
}
uni.clearStorageSync('notice-'+index);
}
}
</script>
<style>
.user-container {
padding: 25rpx 10rpx;
background-color: #F0F0F0;
/*border: 1px solid black;*/
}
.notice {
margin: 10rpx 7rpx;
padding: 25rpx;
background-color: #ffffff;
border-radius: 7rpx;
}
.title {
border-bottom: 1rpx solid #dedede;
font-weight: 700;
font-size: 34rpx;
color: #00AA00;
}
.content{
padding: 15rpx 0;
font-size: 25rpx;
color: #7B7B7B;
}
.footer {
padding: 15rpx 0;
font-size: 22rpx;
color: #ADADAD;
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<view class="user-container">
<block v-for="(item,index) in notices" :key="index" wx:key="index" >
<view class="noticesList-list">
<view class="noticesList-list" @tap="_toDetailHref(item,index)">
<view class="title"> {{item.title}} </view>
<view class="content">
<view ><text class="ad_au_text">{{item.context}}</text></view>
@ -58,8 +58,18 @@
})
}
});
}
},
_toDetailHref:function(_item,_index){
let that= this;
console.log("_index",_index);
let index = _index;
console.log("json==>",JSON.stringify(_item));
uni.setStorageSync('notice-'+ index, JSON.stringify(_item));
uni.navigateTo({
url:'/pages/notice/detail/noticeDetail?index=' + index
});
}
}
}
</script>