web-base-h5/components/noticePopup.vue

162 lines
3.0 KiB
Vue
Raw Normal View History

2025-03-23 09:29:40 +08:00
<!--
* @Descripttion:
* @version:
* @Author: kBank
* @Date: 2022-08-08 10:42:29
-->
<template>
2025-04-11 10:43:47 +08:00
<u-popup
:show="noticeFlag"
class="notice"
width="70%"
@close="closeTap"
mode="center"
>
2025-03-23 09:29:40 +08:00
<div class="title">
{{ content.title }}
</div>
2025-04-11 10:43:47 +08:00
<div class="close-icons" @click="closeTap">
<u-icon name="close"></u-icon>
</div>
2025-03-23 09:29:40 +08:00
<div class="img-auto" v-html="content.content"></div>
</u-popup>
</template>
<script>
import * as api from '@/config/login.js'
export default {
2025-04-11 10:43:47 +08:00
name: 'Title',
2025-03-23 09:29:40 +08:00
props: {
userInfo: {
type: Object,
},
publishLocationIndex: {
type: Number,
},
},
data() {
return {
noticeFlag: false,
2025-04-11 10:43:47 +08:00
content: '',
}
2025-03-23 09:29:40 +08:00
},
mounted() {
2025-09-25 11:18:52 +08:00
// this.getUserTc()
2025-03-23 09:29:40 +08:00
},
methods: {
2025-04-11 10:43:47 +08:00
closeTap() {
this.noticeFlag = false
2025-09-25 11:18:52 +08:00
this.$emit('close')
2025-04-11 10:43:47 +08:00
},
2025-03-23 09:29:40 +08:00
getUserTc(data) {
2025-04-11 10:43:47 +08:00
api
.indexPopScreen({
grade: this.userInfo.pkGradeId,
awards: this.userInfo.pkAwardsId,
})
.then(res => {
if (res.code == '200') {
let list = JSON.parse(localStorage.getItem('menuList'))
2025-04-11 11:33:42 +08:00
let arr = res.data[0]?.publishLocation.split(',') || []
2025-04-11 10:43:47 +08:00
arr.forEach(items => {
if (items == this.publishLocationIndex) {
this.noticeFlag = true
this.content = res.data[0]
2025-09-25 11:18:52 +08:00
} else {
this.$emit('close')
2025-04-11 10:43:47 +08:00
}
})
}
})
2025-03-23 09:29:40 +08:00
},
},
2025-04-11 10:43:47 +08:00
}
2025-03-23 09:29:40 +08:00
</script>
<style lang="scss" scoped>
2025-04-11 10:43:47 +08:00
.close-icons {
position: absolute;
right: 30rpx;
top: 30rpx;
}
::v-deep .u-popup__content {
height: 1120rpx;
width: 690rpx;
2025-03-23 09:29:40 +08:00
}
// .notice{
// height: 700rpx;
// }
2025-03-23 09:29:40 +08:00
::v-deep .el-dialog__headerbtn i {
font-size: 24px;
//visibility: hidden;
color: #333;
}
2025-04-11 10:43:47 +08:00
::v-deep .el-dialog {
margin-top: 113px !important;
height: 815px;
2025-03-23 09:29:40 +08:00
margin-bottom: 0;
}
2025-04-11 10:43:47 +08:00
::v-deep .el-dialog__body {
2025-03-23 09:29:40 +08:00
padding-bottom: 20px;
}
.surebtn1 {
display: flex;
align-items: center;
justify-content: center;
padding-top: 20px;
//justify-content: space-around;
.btn {
width: 200px;
height: 66px;
background: #d5251d;
border-radius: 6px 6px 6px 6px;
text-align: center;
font-size: 22px;
2025-04-11 10:43:47 +08:00
font-family:
PingFang SC-Medium,
PingFang SC;
2025-03-23 09:29:40 +08:00
font-weight: 500;
color: #ffffff;
line-height: 66px;
cursor: pointer;
}
.hh {
background: #cccccc;
margin-right: 78px;
}
}
::v-deep .el-dialog__header {
text-align: center;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
padding-bottom: 20px;
}
::v-deep .el-dialog__title {
font-size: 32px;
color: #333;
font-weight: bold;
}
::v-deep .el-dialog__body {
text-align: center;
padding-top: 10px;
}
.title {
2025-04-11 10:43:47 +08:00
font-size: 40rpx;
text-align: center;
margin: 20rpx auto;
2025-03-23 09:29:40 +08:00
color: #333;
font-weight: bold;
}
.img-auto {
text-align: center;
height: 685px;
overflow-y: auto;
::v-deep p {
font-size: 14px;
}
::v-deep img {
max-width: 100%;
height: auto;
}
}
2025-04-11 10:43:47 +08:00
</style>