Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

173 linhas
3.4 KiB

  1. <template>
  2. <view class="page">
  3. <view v-if="msg" class="card">
  4. <!-- 顶部:图标 + 标题 + 标签 -->
  5. <view class="header-row">
  6. <text class="header-icon">📢</text>
  7. <text class="header-title">审核通知</text>
  8. <view class="tag" :class="msg.type === 1 ? 'tag-success' : 'tag-fail'">
  9. {{ msg.type === 1 ? '已通过' : '已驳回' }}
  10. </view>
  11. </view>
  12. <!-- 大标题 -->
  13. <view class="main-title">{{ msg.type === 1 ? '您提交的资料已通过审核' : '您提交的资料未通过审核' }}</view>
  14. <view class="time">{{ msg.create_time }}</view>
  15. <!-- 正文 -->
  16. <view class="body">
  17. <text class="greeting">尊敬的{{ msg.patient_name || '' }}:</text>
  18. <text class="body-text" v-if="msg.type === 1">您提交的个人资料经审核已通过。</text>
  19. <text class="body-text" v-else>您于 {{ formatDate(msg.create_time) }} 提交的个人资料经审核未通过。</text>
  20. <text class="body-text" v-if="msg.type === 2">请根据以下原因修改后重新提交。</text>
  21. </view>
  22. <!-- 驳回原因 -->
  23. <view v-if="msg.type === 2 && msg.reason" class="reason-box">
  24. <text class="reason-label">驳回原因:</text>
  25. <text class="reason-text">{{ msg.reason }}</text>
  26. </view>
  27. <!-- 操作按钮 -->
  28. <view v-if="msg.type === 2" class="btn-area">
  29. <u-button text="重新提交资料" @click="goMyInfo" color="#0E63E3" size="large" />
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script setup>
  35. import { ref } from 'vue'
  36. import { onLoad } from '@dcloudio/uni-app'
  37. import { get } from '@/utils/request.js'
  38. const msg = ref(null)
  39. onLoad(async (options) => {
  40. if (!options.id) return
  41. try {
  42. const res = await get('/api/mp/messageDetail', { id: options.id })
  43. msg.value = res.data
  44. } catch (e) {
  45. if (e && e.msg) uni.showToast({ title: e.msg, icon: 'none' })
  46. }
  47. })
  48. const formatDate = (dateStr) => {
  49. if (!dateStr) return ''
  50. const d = new Date(dateStr)
  51. return `${d.getFullYear()}年${d.getMonth() + 1}月${d.getDate()}日`
  52. }
  53. const goMyInfo = () => {
  54. uni.navigateTo({ url: '/pages/myinfo/myinfo' })
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. .page {
  59. min-height: 100vh;
  60. background: #f4f4f5;
  61. padding: 24rpx;
  62. }
  63. .card {
  64. background: #fff;
  65. border-radius: 10rpx;
  66. padding: 36rpx 32rpx;
  67. border: 1rpx solid #ebeef5;
  68. }
  69. .header-row {
  70. display: flex;
  71. align-items: center;
  72. gap: 12rpx;
  73. margin-bottom: 28rpx;
  74. }
  75. .header-icon {
  76. font-size: 32rpx;
  77. }
  78. .header-title {
  79. font-size: 30rpx;
  80. font-weight: 600;
  81. color: #333;
  82. }
  83. .tag {
  84. font-size: 22rpx;
  85. padding: 4rpx 16rpx;
  86. border-radius: 6rpx;
  87. &.tag-success {
  88. background: #f6ffed;
  89. color: #52c41a;
  90. border: 1rpx solid #b7eb8f;
  91. }
  92. &.tag-fail {
  93. background: #fff2f0;
  94. color: #f5222d;
  95. border: 1rpx solid #ffa39e;
  96. }
  97. }
  98. .main-title {
  99. font-size: 36rpx;
  100. font-weight: 700;
  101. color: #222;
  102. line-height: 1.4;
  103. }
  104. .time {
  105. font-size: 26rpx;
  106. color: #999;
  107. margin-top: 12rpx;
  108. margin-bottom: 36rpx;
  109. }
  110. .body {
  111. display: flex;
  112. flex-direction: column;
  113. gap: 20rpx;
  114. }
  115. .greeting {
  116. font-size: 30rpx;
  117. color: #333;
  118. }
  119. .body-text {
  120. font-size: 30rpx;
  121. color: #333;
  122. line-height: 1.7;
  123. }
  124. .reason-box {
  125. margin-top: 36rpx;
  126. background: #f0f5ff;
  127. border-left: 6rpx solid #0e63e3;
  128. border-radius: 8rpx;
  129. padding: 28rpx 24rpx;
  130. }
  131. .reason-label {
  132. font-size: 28rpx;
  133. font-weight: 600;
  134. color: #f5222d;
  135. display: block;
  136. margin-bottom: 12rpx;
  137. }
  138. .reason-text {
  139. font-size: 28rpx;
  140. color: #555;
  141. line-height: 1.7;
  142. }
  143. .btn-area {
  144. margin-top: 48rpx;
  145. }
  146. </style>