204 lines
5.4 KiB
Vue
204 lines
5.4 KiB
Vue
<template>
|
|
<view class="page" :style="themeColor">
|
|
<view class="flex align-stretch benben-position-layout flex platformAnnouncement1682308013_flex_0"
|
|
:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
|
|
<view class='flex align-center justify-between flex-sub platformAnnouncement1682308013_fd0_0'>
|
|
<view class='flex align-center platformAnnouncement1682308013_fd0_0_c0' @tap.stop="handleJumpDiy"
|
|
data-type="back" data-url="1">
|
|
<text class='fu-iconfont2 platformAnnouncement1682308013_fd0_0_c0_c0'></text>
|
|
</view>
|
|
<view class='flex align-center'>
|
|
<text class='platformAnnouncement1682308013_fd0_0_c1_c0'>平台消息</text>
|
|
</view>
|
|
<view class='flex align-center platformAnnouncement1682308013_fd0_0_c2'>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
|
|
|
|
<view class="flex flex-direction flex-wrap align-stretch justify-center benben-flex-layout">
|
|
<view v-for="(item,index) in lists" :key="index" class='flex flex-direction flex-wrap align-stretch platformAnnouncement1682308013_fd1_0'
|
|
@tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/messageDetails/messageDetails?id=` + item.id">
|
|
<text class='platformAnnouncement1682308013_fd1_0_c0'>{{item.title}}</text>
|
|
<text class='platformAnnouncement1682308013_fd1_0_c1'>{{item.content}}</text>
|
|
<text class='platformAnnouncement1682308013_fd1_0_c2'>{{item.create_time}}</text>
|
|
</view>
|
|
</view>
|
|
<!-- 空布局 start -->
|
|
<fu-empty-ui v-if="lists.length == 0 && isInit"></fu-empty-ui>
|
|
<!-- 空布局 end -->
|
|
<!-- 页面加载 start -->
|
|
|
|
<!-- 页面加载 end -->
|
|
<!-- 底部数据加载状态 start-->
|
|
<uni-load-more v-if="lists.length > 8" :status="status"></uni-load-more>
|
|
|
|
|
|
|
|
</view>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
components: {},
|
|
|
|
|
|
data() {
|
|
return {
|
|
"type_id": "",
|
|
lists: [], //订单列表
|
|
page: 1, //页码说
|
|
size: 10, //一页显示几条数据
|
|
status: 'more', // 加载状态 more:有更多数据 noMore:已加载全部数据 loading:数据加载中
|
|
isInit: false, //是否已经初始化
|
|
isShowLoading: false, //是否显示页面初始化加载loading
|
|
};
|
|
},
|
|
computed: {
|
|
themeColor() {
|
|
return this.$store.getters.themeColor
|
|
},
|
|
|
|
},
|
|
watch: {},
|
|
onLoad(options) {
|
|
this.getOrderList()
|
|
},
|
|
onPullDownRefresh() {
|
|
this.page = 1;
|
|
this.status = 'more';
|
|
this.getOrderList(false);
|
|
},
|
|
onReachBottom() {
|
|
this.getOrderList();
|
|
},
|
|
methods: {
|
|
getOrderList(value) {
|
|
// this.isShow = false;
|
|
if (this.status != 'more') return;
|
|
this.status = 'loading';
|
|
let data = {
|
|
page: this.page,
|
|
list_rows: this.size,
|
|
};
|
|
console.log('请求的数据', data);
|
|
if (this.page == 1 && value) {
|
|
this.isShowLoading = true;
|
|
}
|
|
this.$api.get(global.apiUrls.get6437c28c6c105, data)
|
|
.then(res => {
|
|
console.log('抵用券明细', res);
|
|
this.isShowLoading = false;
|
|
if (res.data.code == 1) {
|
|
var curPageData = res.data.data.data;
|
|
let total = res.data.data.total;
|
|
if (this.page == 1) this.lists = [];
|
|
this.lists = this.lists.concat(curPageData);
|
|
if (this.lists.length < total) {
|
|
this.status = 'more';
|
|
this.page++;
|
|
} else {
|
|
this.status = 'noMore';
|
|
}
|
|
} else {
|
|
this.$message.info(res.data.msg);
|
|
}
|
|
this.isInit = true;
|
|
uni.stopPullDownRefresh();
|
|
})
|
|
.catch(err => {
|
|
this.isShowLoading = false;
|
|
uni.stopPullDownRefresh();
|
|
});
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.page {
|
|
width: 100vw;
|
|
overflow-x: hidden;
|
|
min-height: calc(100vh - var(--window-bottom));
|
|
background: #F8F8F8;
|
|
background-size: 100% auto !important;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_flex_0 {
|
|
background: #fff;
|
|
width: 750rpx;
|
|
height: 88rpx;
|
|
overflow: hidden;
|
|
z-index: 10;
|
|
top: 0rpx;
|
|
background-size: 100% auto !important;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_fd0_0_c2 {
|
|
width: 180rpx;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_fd0_0_c1_c0 {
|
|
font-size: 36rpx;
|
|
font-weight: 500;
|
|
color: #333;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_fd0_0_c0_c0 {
|
|
font-size: 32rpx;
|
|
font-weight: 500;
|
|
color: #333;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_fd0_0_c0 {
|
|
width: 180rpx;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_fd0_0 {
|
|
padding: 0rpx 32rpx 0rpx 32rpx;
|
|
line-height: 88rpx;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_fd1_0_c2 {
|
|
margin: 24rpx 0rpx 0rpx 0rpx;
|
|
text-align: right;
|
|
line-height: 29rpx;
|
|
font-size: 24rpx;
|
|
font-weight: 400;
|
|
color: #999999;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_fd1_0_c1 {
|
|
margin: 24rpx 0rpx 0rpx 0rpx;
|
|
line-height: 46rpx;
|
|
font-size: 28rpx;
|
|
font-weight: 400;
|
|
color: #666666;
|
|
-webkit-line-clamp: 3;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_fd1_0_c0 {
|
|
line-height: 36rpx;
|
|
font-size: 32rpx;
|
|
font-weight: 500;
|
|
color: #333333;
|
|
-webkit-line-clamp: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
|
|
.platformAnnouncement1682308013_fd1_0 {
|
|
background: #fff;
|
|
margin: 24rpx 32rpx 0rpx 32rpx;
|
|
padding: 32rpx 24rpx 24rpx 24rpx;
|
|
background-size: 100% auto !important;
|
|
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
|
}
|
|
</style>
|
|
|