|
@@ -2,7 +2,7 @@
|
|
|
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
|
|
|
style="background-color: #F5F6FA;">
|
|
|
<u-navbar title="消息中心" leftIconSize='0' :bgColor="bgColor" :placeholder='true' leftIconColor="#fff"
|
|
|
- titleStyle='color:#fff' rightText='一键已读' @rightClick="rightClick">
|
|
|
+ titleStyle='color:#fff' rightText='全部已读' @rightClick="rightClick">
|
|
|
</u-navbar>
|
|
|
<view class="top-bgc"></view>
|
|
|
<view class="content">
|
|
@@ -24,9 +24,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="row2 flex flex-space-between align-center">
|
|
|
- <view class="text point">
|
|
|
+ <view class="text point1">
|
|
|
{{item.newsContent}}
|
|
|
- </view>
|
|
|
+ </view>{{item.newsFlag}}
|
|
|
<view class="red-point" v-if="item.newsFlag==0"></view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -82,7 +82,7 @@
|
|
|
})
|
|
|
if (_status == '已禁用') {
|
|
|
this.isShowAlert = true
|
|
|
- this.alertTitle = '账号审核中'
|
|
|
+ this.alertTitle == '账号审核中'
|
|
|
this.confirmText = '退出APP'
|
|
|
this.showCancelButton = false
|
|
|
} else {
|
|
@@ -123,7 +123,7 @@
|
|
|
methods: {
|
|
|
confirmClick() {
|
|
|
// #ifdef APP-PLUS
|
|
|
- if (this.alertTitle = '账号审核中') {
|
|
|
+ if (this.alertTitle == '账号审核中') {
|
|
|
if (uni.getSystemInfoSync().platform == 'ios') {
|
|
|
plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
|
|
|
} else if (uni.getSystemInfoSync().platform == 'android') {
|
|
@@ -203,8 +203,14 @@
|
|
|
this.mescroll = mescroll;
|
|
|
},
|
|
|
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
|
|
|
- upCallback(page) {debugger
|
|
|
+ upCallback(page) {
|
|
|
+ console.log(page)
|
|
|
// 此处可以继续请求其他接口
|
|
|
+ if(page.num == 1){
|
|
|
+ this.news=[]
|
|
|
+ // 请求其他接口...
|
|
|
+ }
|
|
|
+
|
|
|
// 如果希望先请求其他接口,再触发upCallback,可参考以下写法
|
|
|
// if(!this.isInitxx){
|
|
|
// apiGetxx().then(res=>{
|
|
@@ -222,9 +228,7 @@
|
|
|
pageSize: page.size,
|
|
|
currentPage: page.num,
|
|
|
}).then(res => {
|
|
|
- if (page.num == 1) this.news = []; //如果是第一页需手动制空列表
|
|
|
this.news = this.news.concat(res.data.records); //追加新数据
|
|
|
- // this.news = res.data.records
|
|
|
this.mescroll.endBySize(res.data.records.length, res.data.total);
|
|
|
})
|
|
|
.catch(res => {
|
|
@@ -235,11 +239,20 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
+<style lang="scss" scoped>
|
|
|
/deep/.u-navbar__content__right__text {
|
|
|
font-size: 26rpx;
|
|
|
color: #FFFFFF;
|
|
|
}
|
|
|
+ /deep/.point1 {
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+ /* white-space: nowrap; */
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-line-clamp: 3;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
|
|
|
.top-bgc {
|
|
|
position: absolute;
|