1
This commit is contained in:
parent
11f2287704
commit
64ec8aa50e
11
pages.json
11
pages.json
@ -95,7 +95,7 @@
|
||||
{
|
||||
"path": "pages/components/subscribe",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
"navigationBarTitleText": "订阅"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -106,7 +106,14 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "通告详情"
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"path": "subscribe-set",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订阅设置"
|
||||
}
|
||||
}
|
||||
]
|
||||
}],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
@ -10,19 +10,41 @@
|
||||
<view v-for="(item,index) in menus" @click="itemClick(index,item)" class="dl-menu"
|
||||
:class="index==menuIndex?'dl-menu click':'dl-menu'">{{item}}</view>
|
||||
</view>
|
||||
<view class="seting">
|
||||
<view class="seting" @click="goSet()">
|
||||
<image src="@/static/set.png" mode="aspectFit"></image>
|
||||
设置
|
||||
</view>
|
||||
</view>
|
||||
<!-- 通告列表 -->
|
||||
<view class="dl-body">
|
||||
<view class="dl-item-box">
|
||||
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
|
||||
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<notice-item v-if="dataList.length>0" :dataList="dataList" @goDetail="goDetail()"></notice-item>
|
||||
<view style="text-align: center" v-if="dataList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import noticeItem from '@/pages/components/notice-item.vue'
|
||||
export default {
|
||||
components: {
|
||||
noticeItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menus: ['订阅', '关注'],
|
||||
menuIndex: 0,
|
||||
dataList: ['', '', '', ''],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -39,6 +61,32 @@
|
||||
}
|
||||
this.menuIndex = index
|
||||
},
|
||||
/**
|
||||
* 上滑加载数据
|
||||
*/
|
||||
onReachBottomCus() {
|
||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {
|
||||
toast("没有更多数据了")
|
||||
return
|
||||
}
|
||||
//页码+1,调用获取数据的方法获取第二页数据
|
||||
this.queryParams.pageNum++
|
||||
},
|
||||
/**
|
||||
* 下拉刷新数据
|
||||
*/
|
||||
onRefresherrefresh() {
|
||||
this.isTriggered = true
|
||||
this.queryParams.pageNum = 1
|
||||
this.total = 0
|
||||
},
|
||||
/**
|
||||
* 去订阅设置页面
|
||||
*/
|
||||
goSet() {
|
||||
this.$tab.navigateTo(`/pages/notice/subscribe-set`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -82,10 +130,10 @@
|
||||
padding-top: 20rpx;
|
||||
|
||||
.dl-menu {
|
||||
width: 100rpx;
|
||||
width: 80rpx;
|
||||
font-size: 30rpx;
|
||||
margin: 0 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-bottom: 15rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@ -97,10 +145,31 @@
|
||||
}
|
||||
|
||||
.seting {
|
||||
width: 200rpx;
|
||||
width: 180rpx;
|
||||
display: flex;
|
||||
align-items: self-end;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dl-body {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #EEEEEE;
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
|
||||
.dl-item-box {
|
||||
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 365rpx);
|
||||
isplay: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -537,7 +537,7 @@
|
||||
|
||||
.fork-info {
|
||||
flex: none;
|
||||
width: 250rpx;
|
||||
width: 270rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="uni-popup-dialog">
|
||||
<!-- <view class="uni-dialog-title">
|
||||
<view class="uni-dialog-title" v-show="!iconPath">
|
||||
<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view v-if="mode === 'base'" class="uni-dialog-content">
|
||||
<slot>
|
||||
<image v-if="iconPath" :src="iconPath" mode="aspectFit"></image>
|
||||
@ -159,6 +159,9 @@
|
||||
* 点击确认按钮
|
||||
*/
|
||||
onOk() {
|
||||
this.$nextTick(() => {
|
||||
this.val = ""
|
||||
})
|
||||
if (this.mode === 'input') {
|
||||
this.$emit('confirm', this.val)
|
||||
} else {
|
||||
@ -171,6 +174,9 @@
|
||||
* 点击取消按钮
|
||||
*/
|
||||
closeDialog() {
|
||||
this.$nextTick(() => {
|
||||
this.val = ""
|
||||
})
|
||||
this.$emit('close')
|
||||
if (this.beforeClose) return
|
||||
this.popup.close()
|
||||
@ -268,6 +274,7 @@
|
||||
}
|
||||
|
||||
.uni-dialog-input {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
border: 1px #eee solid;
|
||||
|
Loading…
Reference in New Issue
Block a user