普兆健康管家前端代码仓库
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.

98 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. font-size: 28rpx;
  65. font-family: PingFang SC;
  66. font-weight: 400;
  67. line-height: 1.7;
  68. text-align: left;
  69. color: #636465;
  70. }
  71. .footer {
  72. display: flex;
  73. border-top: 1rpx solid #EEEEEE;
  74. .btn {
  75. flex: 1;
  76. display: inline-flex;
  77. align-items: center;
  78. justify-content: center;
  79. padding: 22rpx 32rpx;
  80. font-size: 32rpx;
  81. font-family: PingFang SC;
  82. font-weight: 400;
  83. line-height: 1.4;
  84. color: #393939;
  85. &-confirm {
  86. color: $uni-color;
  87. border-left: 1rpx solid #EEEEEE;
  88. }
  89. }
  90. }
  91. </style>