风险测评小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
1.9 KiB

  1. <template>
  2. <view>
  3. <uv-modal ref="modal" :showConfirmButton="false">
  4. <view class="modal__view">
  5. <view class="header">
  6. {{ title }}
  7. </view>
  8. <view class="content">
  9. <uv-parse :content="content"></uv-parse>
  10. </view>
  11. <view class="footer">
  12. <button class="btn" @click="onConfirm(false)">拒绝</button>
  13. <button class="btn btn-confirm" @click="onConfirm(true)">同意</button>
  14. </view>
  15. </view>
  16. </uv-modal>
  17. <configPopup ref="popup"></configPopup>
  18. </view>
  19. </template>
  20. <script>
  21. import { mapState } from 'vuex'
  22. export default {
  23. data() {
  24. return {
  25. key: '',
  26. title : '',
  27. content : '',
  28. }
  29. },
  30. computed : {
  31. ...mapState(['configList'])
  32. },
  33. methods: {
  34. open(key, title) {
  35. this.key = key
  36. this.title = title
  37. this.content = this.configList[key]
  38. this.$refs.modal.open()
  39. },
  40. onConfirm(confirm) {
  41. this.$emit('confirm', confirm, this.key)
  42. this.$refs.modal.close()
  43. },
  44. },
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .modal__view {
  49. width: 100%;
  50. display: flex;
  51. flex-direction: column;
  52. padding-top: 40rpx;
  53. }
  54. .header {
  55. text-align: center;
  56. font-size: 34rpx;
  57. font-family: PingFang SC;
  58. font-weight: 600;
  59. line-height: 1.4;
  60. color: #181818;
  61. }
  62. .content {
  63. padding: 8rpx 32rpx 40rpx 32rpx;
  64. max-height: 70vh;
  65. overflow-y: scroll;
  66. font-size: 28rpx;
  67. font-family: PingFang SC;
  68. font-weight: 400;
  69. line-height: 1.7;
  70. text-align: left;
  71. color: #636465;
  72. }
  73. .footer {
  74. display: flex;
  75. border-top: 1rpx solid #EEEEEE;
  76. .btn {
  77. flex: 1;
  78. display: inline-flex;
  79. align-items: center;
  80. justify-content: center;
  81. padding: 22rpx 32rpx;
  82. font-size: 32rpx;
  83. font-family: PingFang SC;
  84. font-weight: 400;
  85. line-height: 1.4;
  86. color: #393939;
  87. &-confirm {
  88. color: $uni-color;
  89. border-left: 1rpx solid #EEEEEE;
  90. }
  91. }
  92. }
  93. </style>