index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="notice adffc" v-if="show">
  3. <view class="notice-box adffc">
  4. <view class="notice-box-title">{{title}}</view>
  5. <image class="notice-box-close" :src="imgBase+'remind_close.png'" @click="close"></image>
  6. <view class="notice-box-content">
  7. <u-parse :content='content' style="color: #667E90;font-size: 26rpx;line-height: 42rpx;"></u-parse>
  8. </view>
  9. <view class="notice-box-bottom">
  10. <view class="notice-box-bottom-btn" @click="handleKnow">{{btnText}}</view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. props:{
  18. title:{
  19. typeof:String,
  20. default:'问卷须知'
  21. },
  22. btnText:{
  23. typeof:String,
  24. default:'我已知晓'
  25. },
  26. show:{
  27. typeof:Boolean,
  28. default:false
  29. },
  30. content:{
  31. typeof:String,
  32. default:''
  33. }
  34. },
  35. data(){
  36. return {
  37. }
  38. },
  39. methods:{
  40. close(){
  41. this.$emit('close')
  42. },
  43. handleKnow(){
  44. this.$emit('handleKnow')
  45. }
  46. }
  47. }
  48. </script>
  49. <style scoped lang="scss">
  50. .notice{
  51. position: fixed;
  52. left: 0;
  53. right: 0;
  54. top: 0;
  55. bottom: 0;
  56. background: rgba(0, 0, 0, .6);
  57. z-index: 1000;
  58. justify-content: flex-end;
  59. &-box{
  60. height: calc(100% - 317rpx);
  61. background: #FFFFFF;
  62. border-radius: 24rpx 24rpx 0rpx 0rpx;
  63. position: relative;
  64. &-title{
  65. font-family: PingFang-SC, PingFang-SC;
  66. font-weight: bold;
  67. font-size: 36rpx;
  68. color: #002846;
  69. line-height: 36rpx;
  70. text-align: center;
  71. margin-top: 48rpx;
  72. }
  73. &-close{
  74. width: 48rpx;
  75. height: 48rpx;
  76. position: absolute;
  77. top: 48rpx;
  78. right: 30rpx;
  79. }
  80. &-content{
  81. overflow-y: auto;
  82. padding: 43rpx 40rpx 182rpx;
  83. }
  84. &-bottom{
  85. background: #FFFFFF;
  86. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  87. padding: 20rpx 50rpx 54rpx;
  88. position: absolute;
  89. left: 0;
  90. right: 0;
  91. bottom: 0;
  92. &-btn{
  93. width: 100%;
  94. height: 88rpx;
  95. background: #904A87;
  96. border-radius: 44rpx;
  97. font-family: PingFang-SC, PingFang-SC;
  98. font-weight: bold;
  99. font-size: 32rpx;
  100. color: #FFFFFF;
  101. line-height: 88rpx;
  102. text-align: center;
  103. letter-spacing: 2rpx;
  104. }
  105. }
  106. }
  107. }
  108. </style>