This commit is contained in:
2023-11-10 16:48:33 +08:00
parent b1736ff663
commit 13cc4c046f
9 changed files with 467 additions and 29 deletions

View File

@ -0,0 +1,16 @@
import request from "../../request.js"
export function getMegVoList(data) {
return request({
url: `/nurseApplet/chatRecord/getMegVoList`,
method: 'GET',
data
})
}
export function getMegList(data) {
return request({
url: `/nurseApplet/chatRecord/getMegList`,
method: 'GET',
data
})
}

View File

@ -9,30 +9,31 @@
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
},{
"path": "pages/message/message",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "消息中心"
}
}, {
"path": "pages/homepage/homepage",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
}, {
"path": "pages/myinformation/myinformation",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
}, {
"path": "pages/register/register",
"style": {
"navigationBarTitleText": "注册",
"enablePullDownRefresh": false
}
},
{
}, {
"path": "pages/medicalservice/medicalservice",
"style": {
"enablePullDownRefresh": false,
@ -45,20 +46,12 @@
"enablePullDownRefresh": false
}
}, {
"path": "pages/message/message",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/facecollection/facecollection",
"style": {
"navigationBarTitleText": "人脸采集",
"enablePullDownRefresh": false
}
},
{
}, {
"path": "pages/location/location",
"style": {
"navigationBarTitleText": "定位",
@ -625,9 +618,24 @@
},
{
"path": "testreport/testreport",
"style": {
"navigationBarTitleText": "检测报告",
"enablePullDownRefresh": false
}
},
{
"path": "notice/notice",
"style": {
"navigationBarTitleText": "",
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
},
{
"path" : "noticedetails/noticedetails",
"style" :
{
"navigationBarTitleText" : "检测报告",
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
}

View File

@ -1,22 +1,202 @@
<template>
<view class="body">
<u-empty mode="order" icon-size='220' text="暂无信息"></u-empty>
<view class="app">
<view class="item" @tap="gonotice(listone,' 通知公告')">
<image src="../../static/pages/tongzhi.png" mode=""></image>
<view class="title">
通知公告
</view>
<view class="" v-if='listone'>
<view class="time">
{{listone.sendTime}}
</view>
<view class="text">
{{listone.content}}
</view>
<view class="nostatus" v-if="listone.unreadCount>0">
</view>
</view>
</view>
<view class="item" @tap="gonotice(listtwo,' 健康推送')">
<image src="../../static/pages/jiankang.png" mode=""></image>
<view class="title">
健康推送
</view>
<view class="" v-if='listtwo'>
<view class="time">
{{listtwo.sendTime}}
</view>
<view class="text">
{{listtwo.content}}
</view>
<view class="nostatus" v-if="listtwo.unreadCount>0">
</view>
</view>
</view>
<view class="item" @tap="gonotice(listfour,' 服务推送')">
<image src="../../static/pages/fuwu.png" mode=""></image>
<view class="title">
服务推送
</view>
<view class="" v-if='listfour'>
<view class="time">
{{listfour.sendTime}}
</view>
<view class="text">
{{listfour.content}}
</view>
</view>
<view class="nostatus" v-if="listfour.unreadCount>0">
</view>
</view>
<view class="item" v-for="item in listthree" v-if="listthree.length>0" @tap='goseekadvicefrom(item)'>
<image src="../../static/docHead.png" mode=""></image>
<view class="title">
服务推送
</view>
<view class="time">
{{item.sendTime}}
</view>
<view class="text">
{{item.content}}
</view>
<view class="nostatus" v-if="item.unreadCount>0">
</view>
</view>
</view>
</template>
<script>
import {
detail,
} from '@/api/pages/homepage/homepage.js'
import {
getMegVoList
} from '@/api/pages/message/index.js'
export default {
data() {
return {
listone: null,
listtwo: null,
listthree: [],
listfour: null,
};
},
onShow() {
this.info();
},
methods: {
//gonotice
gonotice(item, title) {
uni.navigateTo({
url: `/pagesC/notice/notice?item=${JSON.stringify(item)}&title=${title}`
})
},
//
goseekadvicefrom(item) {
const list = {
id: item.consultationId,
patientId: item.recipientId,
patientName: item.recipientName,
doctorId: item.senderId,
doctorName: item.senderName,
}
uni.navigateTo({
url: `/pagesC/seekadvicefrom/seekadvicefrom?item=${JSON.stringify(list)}`
})
},
info() {
detail(uni.getStorageSync('userinfo').cardNo).then(res => {
if (res.code == 200 && res.data && res.data.crowdsNo) {
var obj = {
crowdNoList: res.data.crowdsNo.split(','),
userType: 0,
recipientId: uni.getStorageSync('patientId'),
senderId: uni.getStorageSync('patientId'),
}
getMegVoList(obj).then(res => {
this.listthree = []
this.listone = null
this.listtwo = null
this.listfour = null
res.data.forEach(e => {
e.readStatus = Number(e.readStatus)
e.messageType = Number(e.messageType)
if (Number(e.messageCategory) == 1) {
this.listone = e
}
if (Number(e.messageCategory) == 2) {
this.listtwo = e
}
if (Number(e.messageCategory) == 3) {
this.listthree.push(e)
}
if (Number(e.messageCategory) == 4) {
this.listfour = e
}
})
})
}
})
},
}
}
</script>
<style lang="scss">
.body {
margin-top: 50%;
.app {
background-color: #fff;
width: 96%;
margin: 20rpx auto;
.item {
height: 150rpx;
position: relative;
border-bottom: 2rpx solid #E6E6E6;
.nostatus {
width: 15rpx;
height: 15rpx;
background: #F10100;
border-radius: 50%;
position: absolute;
right: 20rpx;
bottom: 25%;
}
.time {
position: absolute;
right: 20rpx;
top: 20%;
font-size: 20rpx;
color: #999999;
}
.text {
width: calc(100% - 200rpx);
position: absolute;
left: 150rpx;
bottom: 20%;
font-size: 24rpx;
color: #999999;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
image {
width: 90rpx;
height: 90rpx;
position: absolute;
top: 50%;
left: 30rpx;
transform: translateY(-50%);
}
.title {
position: absolute;
top: 20%;
left: 150rpx;
font-size: 32rpx;
}
}
}
</style>

169
pagesC/notice/notice.vue Normal file
View File

@ -0,0 +1,169 @@
<template>
<view class="app">
<view class="" v-if="MegList.length>0">
<view class="items" v-for="(item, index) in MegList" :key="index">
<view class="item" @click="goToDetail(item)">
<view class="time">
{{item.sendTime}}
</view>
<view class="article">
<view class="title">
{{item.title?item.title:title}}
</view>
<view class="text">
<span>{{item.content}}</span>
<span>点击查看详情>></span>
</view>
</view>
</view>
</view>
</view>
<view class="" v-else style="margin-top: 100rpx;">
<u-empty mode="order" icon-size='220' text="暂无"></u-empty>
</view>
</view>
</template>
<script>
import {
getMegList
} from '@/api/pages/message/index.js'
import {
markRead
} from '@/api/pagesC/seekadvicefrom/seekadvicefrom.js';
export default {
data() {
return {
MegList: [],
total: 0,
obj: {
messageCategory: undefined,
patientId: undefined,
pageSize: 10,
pageNum: 1,
cityCode: undefined,
},
list: {},
title: '',
};
},
onReady() { //
uni.setNavigationBarTitle({
title: this.title,
});
},
onLoad(options) {
this.list = JSON.parse(options.item)
this.title = options.title
this.obj.messageCategory = this.list.messageCategory
this.obj.cityCode = uni.getStorageSync('region')
this.obj.patientId = this.list.recipientId
this.info();
this.Read();
},
methods: {
goToDetail(item) {
uni.navigateTo({
url: `/pagesC/noticedetails/noticedetails?item=${JSON.stringify(item)}&title=${this.title}`
})
},
info() {
getMegList(this.obj).then(res => {
this.MegList = res.rows
this.total = res.total
})
},
Read() {
this.markReadData = {
readStatus: '1',
messageCategory: this.list.messageCategory,
recipientId: this.list.recipientId
}
markRead(this.markReadData)
}
},
onReachBottom() { //
if (this.MegList.length >= this.total) {} else {
this.obj.pageNum++;
getMegList(this.obj).then(res => {
res.rows.forEach(e => {
this.MegList.push(e)
})
this.total = res.total
})
}
},
onPullDownRefresh() { //
this.obj.pageNum = 1;
this.info()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
.app {
background-color: #F6F6F6;
height: 1200rpx;
.items {
margin-bottom: 80rpx;
.item {
position: relative;
width: 100%;
height: 250rpx;
padding-top: 30rpx;
// overflow: hidden;
.article {
background-color: #fff;
position: absolute;
top: 38%;
left: 5%;
width: 90%;
.text {
font-size: 28rpx;
line-height: 80rpx;
// height: 80rpx;
letter-spacing: 1rpx;
color: #333333;
margin: 0 20rpx;
span {
display: inline-block;
max-width: 360rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.title {
font-size: 30rpx;
color: #000000;
line-height: 80rpx;
border-bottom: 1rpx solid #f6f6f6;
height: 80rpx;
margin: 0 20rpx;
}
}
.time {
padding: 8rpx 30rpx;
background-color: #e8e8e8;
font-size: 20rpx;
color: #999999;
border-radius: 18rpx;
text-align: center;
position: absolute;
left: 50%;
transform: translate(-50%, 10%);
}
}
}
}
</style>

View File

@ -0,0 +1,65 @@
<template>
<view class="app">
<view class="" style="height: 20rpx;width: 100%;background-color: #f6f6f6;">
</view>
<view class="title">
<!-- 家庭医生迎来重大版本升级 -->
{{currentItem.title?currentItem.title:title}}
</view>
<view class="time">
{{currentItem.sendTime}}
</view>
<view class="" style="height: 2rpx;width: 100%;background-color: #f6f6f6;">
</view>
<view class="text">
<text>{{currentItem.content}}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
currentItem: '',
title: '',
};
},
onLoad(options) {
this.title = options.title
this.currentItem = JSON.parse(options.item)
}
}
</script>
<style lang="scss">
.app {
.text {
font-size: 24rpx;
line-height: 40rpx;
letter-spacing: 1rpx;
color: #333333;
margin-left: 30rpx;
margin-top: 20rpx;
text {
display: block;
}
}
.time {
margin-left: 30rpx;
font-size: 22rpx;
line-height: 50rpx;
color: #999999;
}
.title {
margin-left: 30rpx;
font-size: 32rpx;
margin-top: 20rpx;
line-height: 80rpx;
color: #333333;
}
}
</style>

View File

@ -88,7 +88,7 @@
return {
baseurl: '',
title: '',
SOCKETURL: 'ws://192.168.16.212:8088/webSocket/',
SOCKETURL: 'ws://8.131.93.145:54010/webSocket/',
socketOpen: false,
sendInfo: {},
currentItem: '',
@ -157,7 +157,6 @@
this.currentItem = JSON.parse(options.item)
this.title = this.currentItem.doctorName //
this.userName = this.currentItem.patientName
console.log(this.userName)
this.SOCKETURL = this.SOCKETURL + this.currentItem.patientId
this.getPageHistory()
this.scoket()
@ -193,6 +192,7 @@
},
Read() {
let markReadData = {
readStatus: '1',
consultationId: this.currentItem.id,
recipientId: this.currentItem.patientId,
}

BIN
static/pages/fuwu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/pages/jiankang.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/pages/tongzhi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB