Commit 8ae75ec7 authored by linxin's avatar linxin

消息中心实时查数据

parent 26119cf2
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
top: 0; top: 0;
} }
.scrollContent { .scrollContent {
padding-top: 2.92rem; padding-top: 2.05rem;
padding-bottom: 20px; padding-bottom: 20px;
} }
.tab-style { .tab-style {
...@@ -176,18 +176,18 @@ export default { ...@@ -176,18 +176,18 @@ export default {
} }
} }
.platform-ios { .platform-ios {
#startList { #reimburse {
.scrollContent { .scrollContent {
padding-top: 3.32rem; padding-top: 2.45rem;
} }
} }
} }
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) { @media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios { .platform-ios {
#startList { #reimburse {
.scrollContent { .scrollContent {
padding-top: 3.72rem; padding-top: 3.05rem;
} }
} }
} }
...@@ -195,9 +195,9 @@ export default { ...@@ -195,9 +195,9 @@ export default {
// iPhoneXR适配 // iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) { @media (device-width: 414px) and (device-height: 896px) {
.platform-ios { .platform-ios {
#startList { #reimburse {
.scrollContent { .scrollContent {
padding-top: 3.72rem; padding-top: 3.05rem;
} }
} }
} }
......
...@@ -3,57 +3,56 @@ ...@@ -3,57 +3,56 @@
<h-header class="bar-custom"> <h-header class="bar-custom">
<div slot="center" class="top-word">消息通知</div> <div slot="center" class="top-word">消息通知</div>
</h-header> </h-header>
<h-content class="content"> <!-- <h-content class="content"> -->
<scroll
ref="scroll" :updateData="[list]" :pullUp="true" class="has-header"
@pullingUp="getInfo">
<section v-for="(item,parentIndex) in list" :key="parentIndex" class="msg-wrap"> <section v-for="(item,parentIndex) in list" :key="parentIndex" class="msg-wrap">
<item-option ref="itemOption"> <item-option ref="itemOption">
<list-item> <list-item>
<item :hasBorder="false" :proportion="[2,2]"> <item :hasBorder="false" :proportion="[2,2]">
<div slot="left-icon" class="left-icon left-icon-box"><img src="@/assets/messageCenter/messageIcon.png"></div> <div v-if="item.notice_type==3" slot="left-icon" class="left-icon left-icon-box">
<div slot="name" class="font-color">{{ item.msg_title }}</div> <img src="@/assets/messageCenter/messageIcon.png" >
<div slot="content" class="time-color">{{ item.msg_time }}</div> </div>
<div v-if="item.notice_type==2" slot="left-icon" class="left-icon over-icon-box">
<img src="@/assets/messageCenter/overIcon.png" >
</div>
<div v-if="item.notice_type==1" slot="left-icon" class="left-icon red-icon-box">
<img src="@/assets/messageCenter/message.png" >
</div>
<div
slot="name"
:class="{'font-color':true,'over-color':item.notice_type==2,'red':item.notice_type==1}"
>{{ item.notice_title }}</div>
<div slot="content" class="time-color">{{ item.notice_time }}</div>
</item> </item>
<div class="msg-content"> <div class="msg-content">
<div class="text"> <div class="text">
<div <div
ref="textContainer" :class="{'retract': item.status}" ref="textContainer"
:style="{'max-height':item.status ? textHeight: ''}"> :class="{'retract': item.status}"
{{ item.msg_content }} :style="{'max-height':item.status ? textHeight: ''}"
</div> >{{ item.notice_body }}</div>
<div class="btn"> <div class="btn">
<p v-if="item.status" @click="item.status = false">展开</p> <p v-if="item.status" @click="item.status = false">展开</p>
<p v-if="item.status == false" @click="item.status = true">收起</p> <p v-if="item.status == false" @click="item.status = true">收起</p>
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="detail-wrap"> <div v-if="item.notice_type==2" class="detail-wrap" @click="goDetail">
<div class="detail-wrap-content"> <div class="detail-wrap-content">
<span>查看详情</span> <span>查看详情</span>
<img src="@/assets/messageCenter/right-gray.png"> <img src="@/assets/messageCenter/right-gray.png" >
</div> </div>
</div>--> </div>
</list-item> </list-item>
<div slot="buttons"> <div slot="buttons">
<option-button type="warn" text="删除" @click.native="deleteFun(parentIndex)"/> <option-button type="warn" text="删除" @click.native="deleteFun(parentIndex)" />
</div> </div>
</item-option> </item-option>
</section> </section>
<!--逾期消息--> <!-- </h-content> -->
<section v-for="(item,Index) in overList" class="msg-wrap"> </scroll></h-view>
<list-item>
<item :hasBorder="false" :proportion="[2,2]">
<div slot="left-icon" class="left-icon over-icon-box"><img src="@/assets/messageCenter/overIcon.png"></div>
<div slot="name" class="over-color">{{ item.msg_title }}</div>
<div slot="content" class="time-color">{{ item.msg_time }}</div>
</item>
<div class="msg-content">
<div class="text" style="padding-bottom: 10px;">
<div>{{ item.msg_content }}</div>
</div>
</div>
</list-item>
</section>
</h-content>
</h-view>
</template> </template>
<script> <script>
export default { export default {
...@@ -61,41 +60,20 @@ export default { ...@@ -61,41 +60,20 @@ export default {
return { return {
textHeight: null, textHeight: null,
isFold: true, isFold: true,
// list:[], pagenum: 1,
list: [ list: [],
{
msg_title: '视频面签',
msg_content: '您有一条保证缴纳确认信息待您确认,请确认:2001于2019-08-29进行视频面签,届时请注意接收视频消息!',
msg_time: '2019-10-20',
},
{
msg_title: '保证金确认',
msg_content: '您有一条保证缴纳确认信息待您确认,请确认!',
msg_time: '2019-10-20',
},
{
msg_title: '进件确认',
msg_content: '进件号:201903022201待您确认,请确认!',
msg_time: '2019-10-20',
},
],
overList: [
{
msg_title: '逾期提醒',
msg_content: '您好,您的合同CON20190802001已逾期1期,请及时还款,谢谢!',
msg_time: '2019-10-20',
},
],
} }
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
// vm.getInfo() vm.list = []
vm.pagenum = 1
vm.getInfo()
}) })
}, },
mounted () { mounted () {
this.list.forEach((item, index) => { this.list.forEach((item, index) => {
this.$set(this.list, index, Object.assign({}, item, {status: null})) this.$set(this.list, index, Object.assign({}, item, { status: null }))
}) })
// DOM 加载完执行 // DOM 加载完执行
this.$nextTick(() => { this.$nextTick(() => {
...@@ -103,7 +81,7 @@ export default { ...@@ -103,7 +81,7 @@ export default {
}) })
window.onresize = () => { window.onresize = () => {
this.list.forEach((item, index) => { this.list.forEach((item, index) => {
this.$set(this.list, index, Object.assign({}, item, {status: null})) this.$set(this.list, index, Object.assign({}, item, { status: null }))
}) })
setTimeout(() => { setTimeout(() => {
this.calculateText() this.calculateText()
...@@ -120,23 +98,53 @@ export default { ...@@ -120,23 +98,53 @@ export default {
for (let i = 0; i < txtDom.length; i++) { for (let i = 0; i < txtDom.length; i++) {
let curHeight = txtDom[i].offsetHeight let curHeight = txtDom[i].offsetHeight
if (curHeight > twoHeight) { if (curHeight > twoHeight) {
this.$set(this.list, i, Object.assign({}, this.list[i], {status: true})) this.$set(
this.list,
i,
Object.assign({}, this.list[i], { status: true })
)
} else { } else {
this.$set(this.list, i, Object.assign({}, this.list[i], {status: null})) this.$set(
this.list,
i,
Object.assign({}, this.list[i], { status: null })
)
} }
} }
}, },
goDetail () {
this.$router.push({
name: 'RejectDetail',
})
},
getInfo () { getInfo () {
let vm = this let vm = this
let url = process.env.basePath + 'hls_app_notice_query' let url = process.env.basePath + 'hls_app_notice_query'
let param = { let param = {
phone: window.localStorage.getItem('user_phone'), phone: window.localStorage.getItem('user_phone'),
pagesize: '10',
pagenum: vm.pagenum,
} }
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) { vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.list = res.lists let returnData = []
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) {
vm.list.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.list.push(array[index])
})
vm.pagenum++
vm.$refs.scroll.update(false)
}
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
...@@ -160,170 +168,217 @@ export default { ...@@ -160,170 +168,217 @@ export default {
} }
</script> </script>
<style lang="less"> <style lang="less">
@import "../../styles/mixin"; @import "../../styles/mixin";
#message-center { #message-center {
.content { // .content {
padding-top: 10px; // padding-top: 10px;
// }
.swipeout-list {
height: auto;
padding: 0;
.function {
right: -22% !important;
} }
.swipeout-list{
height: auto;
padding: 0;
.function{
right: -22% !important;
} }
} .msg-wrap {
.msg-wrap { margin: 0 2% 10px 2%;
margin: 0 2% 10px 2%; // padding-top: 10px;
// background-color:rgb(239,239,239)
.msg-content { .msg-content {
margin-left: 14%; margin-left: 14%;
margin-right: 4%; margin-right: 4%;
line-height: 20px;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #4B4A4B;
}
.nowrap {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical
}
}
.text {
position: relative;
font-size: 14px;
line-height: 20px; line-height: 20px;
letter-spacing: 2px; font-family: PingFangSC-Regular;
color: #666666; font-size: 14px;
color: #4b4a4b;
padding-bottom: 10px;
} }
.retract { .nowrap {
position: relative;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical -webkit-box-orient: vertical;
} }
}
.retract:after { .text {
/*content: '...'; position: relative;
font-size: 14px;
line-height: 20px;
letter-spacing: 2px;
color: #666666;
}
.retract {
position: relative;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.retract:after {
/*content: '...';
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 2px; right: 2px;
width: 84px; width: 84px;
padding-left: 30px; padding-left: 30px;
background: linear-gradient(to right, transparent, #fff 45%);*/ background: linear-gradient(to right, transparent, #fff 45%);*/
content: '...'; content: "...";
position: absolute;
bottom: -0.02rem;
right: 0.04rem;
width: 62px;
padding-left: 3px;
background: #fff;
}
.btn {
position: absolute;
right: 0;
bottom: -1px;
font-size: 14px;
line-height: 19px;
letter-spacing: 2px;
color: @headerColor;
cursor: pointer;
}
.more {
font-size: 14px;
line-height: 20px;
letter-spacing: 2px;
color: #666666;
visibility: hidden;
}
.left-icon-box {
position: relative;
width: 26px;
height: 26px;
background: #efefef;
border-radius: 8px;
img {
position: absolute; position: absolute;
bottom: -0.02rem; left: 6px;
right: 0.04rem; z-index: 100;
width: 62px; top: 6px;
padding-left: 3px;
background: #FFF;
} }
}
.btn { .over-icon-box {
position: relative;
width: 26px;
height: 26px;
background: #ffffe0;
border-radius: 8px;
img {
position: absolute; position: absolute;
right: 0; left: 6px;
bottom: -1px; z-index: 100;
font-size: 14px; top: 6px;
line-height: 19px;
letter-spacing: 2px;
color: @headerColor;
cursor: pointer;
} }
}
.more { .red-icon-box {
font-size: 14px; position: relative;
line-height: 20px; width: 26px;
letter-spacing: 2px; height: 26px;
color: #666666; background: #fdd1d5;
visibility: hidden; border-radius: 8px;
img {
position: absolute;
left: 6px;
z-index: 100;
top: 6px;
} }
.left-icon-box{ }
position: relative; .contents {
width: 26px; .add-name {
height: 26px; .font-color {
background: #efefef; font-family: PingFangSC-Semibold;
border-radius: 8px; font-size: 15px;
img{ color: #4b4a4b;
position: absolute; }
left: 6px; .over-color {
z-index: 100; color: #fdb62f;
top: 6px; }
.red {
color: #d81e06;
} }
} }
.over-icon-box{ .add-content {
position: relative; .time-color {
width: 26px; font-family: PingFangSC-Regular;
height: 26px; font-size: 13px;
background: #FFFFE0; color: rgba(56, 63, 69, 0.6);
border-radius: 8px;
img{
position: absolute;
left: 6px;
z-index: 100;
top: 6px;
} }
} }
.hls-list-item{ img {
padding-bottom: 10px; width: 14px;
height: 14px;
} }
.contents{ }
.add-name{ .detail-wrap {
.font-color{ margin-top: 10px;
font-family: PingFangSC-Semibold; width: 100%;
font-size: 15px; height: 35px;
color: #4B4A4B; padding: 0 4% 0 14%;
} display: flex;
.over-color{ justify-content: center;
font-family: PingFangSC-Semibold; align-items: center;
font-size: 15px; .detail-wrap-content {
color: #FDB62F; width: 100%;
} height: 100%;
} display: flex;
.add-content{ border-top: 1px solid #F3F3F7;
.time-color{ justify-content: space-between;
font-family: PingFangSC-Regular; align-items: center;
font-size: 13px; span {
color: rgba(56,63,69,0.60); font-family: PingFangSC-Semibold;
} font-size: 14px;
color: #4b4a4b;
} }
img{ img {
width: 14px; width: 14px;
height: 14px;
} }
} }
.detail-wrap{ }
margin-top: 10px; .content {
width: 100%; position: absolute;
height: 40px; top: 0;
padding: 0 4% 0 14%; }
display: flex; .scrollContent {
justify-content: center; padding-top: 1rem;
align-items: center; padding-bottom: 20px;
.detail-wrap-content{ }
width: 100%; }
height: 100%; .platform-ios {
display: flex; #message-center {
justify-content: space-between; .scrollContent {
align-items: center; padding-top: 1.4rem;
.border-top; }
span{ }
font-family: PingFangSC-Semibold; }
font-size: 0.3rem; @media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
color: #4B4A4B; .platform-ios {
} #message-center {
img{ .scrollContent {
width: 14px; padding-top: 2rem;
}
} }
} }
} }
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#message-center {
.scrollContent {
padding-top: 2rem;
}
}
}
}
</style> </style>
<template>
<h-view id="rejectDetail">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()" >
<span>消息详情</span>
</div>
</h-header>
<h-content>
<div class="userInfo">审批意见</div>
<div class="info-content">
<p>XXXXXXXXX。请联系业务员重新提交申请,谢谢!</p>
</div>
</h-content>
</h-view>
</template>
<script>
export default {
}
</script>
<style lang="less" >
#rejectDetail{
.userInfo {
height: 45px;
line-height: 45px;
color: @headerColor;
margin-top: 5px;
font-size: 15px;
margin-left: 16px;
position: relative;
}
.userInfo::before {
content: "";
display: block;
width: 4px;
height: 20px;
background-color: @headerColor;
position: absolute;
left: -15px;
top: 12px;
}
.info-content{
width:90%;
margin: 0 auto;
line-height: 20px;
p{
text-indent: 35px;
}
}
}
</style>
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
} }
} }
.platform-ios { .platform-ios {
#startList { #reimburse {
.scrollContent { .scrollContent {
padding-top: 2.2rem; padding-top: 2.2rem;
} }
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) { @media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios { .platform-ios {
#startList { #reimburse {
.scrollContent { .scrollContent {
padding-top: 2.62rem; padding-top: 2.62rem;
} }
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
// iPhoneXR适配 // iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) { @media (device-width: 414px) and (device-height: 896px) {
.platform-ios { .platform-ios {
#startList { #reimburse {
.scrollContent { .scrollContent {
padding-top: 2.62rem; padding-top: 2.62rem;
} }
......
...@@ -356,7 +356,7 @@ export default { ...@@ -356,7 +356,7 @@ export default {
top: 0; top: 0;
} }
.scrollContent { .scrollContent {
padding-top: 2.72rem; padding-top: 2.52rem;
padding-bottom: 20px; padding-bottom: 20px;
} }
.tab-style { .tab-style {
...@@ -365,16 +365,16 @@ export default { ...@@ -365,16 +365,16 @@ export default {
} }
} }
.platform-ios { .platform-ios {
#startList { #videoList {
.scrollContent { .scrollContent {
padding-top: 3.12rem; padding-top: 2.92rem;
} }
} }
} }
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) { @media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios { .platform-ios {
#startList { #videoList {
.scrollContent { .scrollContent {
padding-top: 3.52rem; padding-top: 3.52rem;
} }
...@@ -384,7 +384,7 @@ export default { ...@@ -384,7 +384,7 @@ export default {
// iPhoneXR适配 // iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) { @media (device-width: 414px) and (device-height: 896px) {
.platform-ios { .platform-ios {
#startList { #videoList {
.scrollContent { .scrollContent {
padding-top: 3.52rem; padding-top: 3.52rem;
} }
......
...@@ -70,6 +70,7 @@ import ProDetailed from '@/pages/productQuery/product-detailed' ...@@ -70,6 +70,7 @@ import ProDetailed from '@/pages/productQuery/product-detailed'
// 消息中心 // 消息中心
import MessageCenter from '@/pages/messageCenter/message-list' import MessageCenter from '@/pages/messageCenter/message-list'
import ProductList from '@/pages/productQuery/product-list' import ProductList from '@/pages/productQuery/product-list'
import RejectDetail from '@/pages/messageCenter/reject-detail'
// 帮助与反馈 // 帮助与反馈
import HelpList from '@/pages/help/help-list' import HelpList from '@/pages/help/help-list'
...@@ -133,7 +134,7 @@ export default new Router({ ...@@ -133,7 +134,7 @@ export default new Router({
children: [ children: [
{path: '/tab/home-page', component: HomePage, name: 'HomePage', meta: {keepAlive: false}}, {path: '/tab/home-page', component: HomePage, name: 'HomePage', meta: {keepAlive: false}},
{path: '/tab/my-info', component: MyInfo, name: 'MyInfo', meta: {keepAlive: true}}, {path: '/tab/my-info', component: MyInfo, name: 'MyInfo', meta: {keepAlive: true}},
{path: '/tab/message-center', component: MessageCenter, name: 'MessageCenter', meta: {keepAlive: false}}, {path: '/tab/message-center', component: MessageCenter, name: 'MessageCenter', meta: {keepAlive: true}},
], ],
}, },
...@@ -253,6 +254,8 @@ export default new Router({ ...@@ -253,6 +254,8 @@ export default new Router({
{path: '/drawback-detail', component: DrawbackDetail, name: 'DrawbackDetail', meta: {keepAlive: false}}, {path: '/drawback-detail', component: DrawbackDetail, name: 'DrawbackDetail', meta: {keepAlive: false}},
// 视屏面签 // 视屏面签
{path: '/video-sign', component: VideoSign, name: 'VideoSign', meta: {keepAlive: true}}, {path: '/video-sign', component: VideoSign, name: 'VideoSign', meta: {keepAlive: true}},
// 消息中心
{path: '/reject-detail', component: RejectDetail, name: 'RejectDetail', meta: {keepAlive: true}},
], ],
scrollBehavior (to, from, savedPosition) { scrollBehavior (to, from, savedPosition) {
if (to.hash) { if (to.hash) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment