修改
This commit is contained in:
parent
c24ade1d96
commit
29125adb5c
10
pages.json
10
pages.json
@ -9,13 +9,19 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
|
"path": "pages/Healthknowledge/Healthknowledge",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "护理新闻",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
}, {
|
||||||
"path": "pages/confirmCompletion/confirmCompletion",
|
"path": "pages/confirmCompletion/confirmCompletion",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "当前工单",
|
"navigationBarTitleText": "当前工单",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/MyBenefits/MyBenefits",
|
"path": "pages/MyBenefits/MyBenefits",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的收益",
|
"navigationBarTitleText": "我的收益",
|
||||||
|
|||||||
170
pages/Healthknowledge/Healthknowledge.vue
Normal file
170
pages/Healthknowledge/Healthknowledge.vue
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<!-- <u-tabs :list="tabList" :current="tabcurrent" @change="change"></u-tabs>
|
||||||
|
<view class="Healthknowledge" v-if="informationCategoryVOList">
|
||||||
|
<view class="list">
|
||||||
|
<view class="item" v-for="(item,index) in informationCategoryVOList" :key="index"
|
||||||
|
@tap='gohealthitem(item)'>
|
||||||
|
<view class="text">
|
||||||
|
{{item.informationTitle}}
|
||||||
|
</view>
|
||||||
|
<view class="author"></view>
|
||||||
|
<image :src="item.leadThumbnailUrl" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="Healthknowledge">
|
||||||
|
<view class="list">
|
||||||
|
<view class="item">
|
||||||
|
<view class="text">
|
||||||
|
护理 I 致力于打造专业护理人才
|
||||||
|
</view>
|
||||||
|
<view class="author"> 生活小窍门,是指人们在日常生活中总结出来的知识和经验,和生活小常识非常相似</view>
|
||||||
|
<image src="../../static/jnks.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="noorder" v-else>
|
||||||
|
<u-empty mode="data" icon-size='220' text='暂无内容'></u-empty>
|
||||||
|
</view> -->
|
||||||
|
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tabcurrent: 0,
|
||||||
|
tabList: [{
|
||||||
|
name: '护理新闻'
|
||||||
|
}],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
informationCategoryVOList: null,
|
||||||
|
total: 0,
|
||||||
|
scrollTop: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {},
|
||||||
|
onLoad() {
|
||||||
|
// this.pageNum = 1
|
||||||
|
// this.getHeathHousing();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//跳转item
|
||||||
|
gohealthitem(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getHeathHousing() {
|
||||||
|
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
res.rows.forEach(e => {
|
||||||
|
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
||||||
|
})
|
||||||
|
this.informationCategoryVOList = res.rows
|
||||||
|
}
|
||||||
|
this.total = res.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
change() {},
|
||||||
|
},
|
||||||
|
onPageScroll(e) {
|
||||||
|
this.scrollTop = e.scrollTop;
|
||||||
|
},
|
||||||
|
onReachBottom() { //下滑加载
|
||||||
|
if (this.informationCategoryVOList.length >= this.total) {} else {
|
||||||
|
this.pageNum++
|
||||||
|
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
|
||||||
|
if (res.rows) {
|
||||||
|
res.rows.forEach(e => {
|
||||||
|
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
||||||
|
this.informationCategoryVOList.push(e)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPullDownRefresh() { //下拉刷新
|
||||||
|
this.pageNum = 1;
|
||||||
|
this.getHeathHousing();
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.app {
|
||||||
|
padding: 0;
|
||||||
|
text-align: justify;
|
||||||
|
|
||||||
|
.noorder {
|
||||||
|
margin-top: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Healthknowledge {
|
||||||
|
width: 94%;
|
||||||
|
margin: 20rpx auto;
|
||||||
|
padding: 0 30rpx 50rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
position: relative;
|
||||||
|
line-height: 46rpx;
|
||||||
|
|
||||||
|
.list {
|
||||||
|
width: 100%;
|
||||||
|
margin: 20rpx auto 0;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 100%;
|
||||||
|
height: 250rpx;
|
||||||
|
position: relative;
|
||||||
|
border-bottom: 2rpx solid #CDC9C9;
|
||||||
|
|
||||||
|
image {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20rpx;
|
||||||
|
width: 65%;
|
||||||
|
left: 0;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #969494;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
position: absolute;
|
||||||
|
top: 20rpx;
|
||||||
|
left: 0;
|
||||||
|
width: 65%;
|
||||||
|
font-size: 30rpx;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 5; //行数需设置
|
||||||
|
line-clamp: 5;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 38rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -48,11 +48,11 @@
|
|||||||
<view class="title">
|
<view class="title">
|
||||||
护理新闻
|
护理新闻
|
||||||
</view>
|
</view>
|
||||||
<view class="righttitle" @tap='gostudy'>
|
<view class="righttitle" @tap='goHealthknowledge'>
|
||||||
查看更多
|
查看更多
|
||||||
<u-icon name="arrow-right" color='#969494'></u-icon>
|
<u-icon name="arrow-right" color='#969494'></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="items">
|
<view class="items" @tap='goHealthknowledge'>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<image src="../../static/jnks.png" mode=""></image>
|
<image src="../../static/jnks.png" mode=""></image>
|
||||||
<view class="toptext">
|
<view class="toptext">
|
||||||
@ -128,6 +128,11 @@
|
|||||||
url: '/pages/study/study'
|
url: '/pages/study/study'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
goHealthknowledge() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/Healthknowledge/Healthknowledge',
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -198,11 +198,11 @@
|
|||||||
if (that.timer) {
|
if (that.timer) {
|
||||||
clearTimeout(that.timer)
|
clearTimeout(that.timer)
|
||||||
}
|
}
|
||||||
// that.timer = setTimeout(e => {
|
that.timer = setTimeout(e => {
|
||||||
// uni.switchTab({
|
uni.switchTab({
|
||||||
// url: '/pages/homepage/homepage'
|
url: '/pages/homepage/homepage'
|
||||||
// })
|
})
|
||||||
// }, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user