success.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view class="success-container">
  3. <!-- 用户头像 -->
  4. <view class="avatar-container">
  5. <view class="avatar-circle"></view>
  6. </view>
  7. <!-- 面试结束提示 -->
  8. <view class="interview-status">
  9. <text class="status-text">AI面试已结束</text>
  10. </view>
  11. <!-- 提示信息 -->
  12. <view class="tips-container">
  13. <text class="tips-text">本次面试的全部环节已结束,非常感谢您的参与</text>
  14. </view>
  15. <!-- 底部按钮 -->
  16. <view class="btn-container">
  17. <button class="confirm-btn" @click="goBack">我知道了</button>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import { apiBaseUrl } from '@/common/config.js';
  23. export default {
  24. data() {
  25. return {
  26. interviewInfo: {
  27. position: '',
  28. startTime: '',
  29. endTime: '',
  30. company: ''
  31. }
  32. }
  33. },
  34. onLoad() {
  35. this.completeInterview()
  36. },
  37. methods: {
  38. async completeInterview() {
  39. try {
  40. // 完成面试的请求
  41. const completeResult = await uni.request({
  42. url: `${apiBaseUrl}/api/job/complete_interview`,
  43. method: 'POST',
  44. data: {
  45. "application_id": JSON.parse(uni.getStorageSync('appId')),
  46. "tenant_id": JSON.parse(uni.getStorageSync('userInfo')).tenant_id
  47. }
  48. });
  49. // 触发综合分析的请求
  50. const analysisResult = await uni.request({
  51. url: `${apiBaseUrl}/api/job/trigger_comprehensive_analysis`,
  52. method: 'POST',
  53. data: {
  54. "application_id": JSON.parse(uni.getStorageSync('appId')),
  55. "tenant_id": JSON.parse(uni.getStorageSync('userInfo')).tenant_id,
  56. "force_trigger": true
  57. }
  58. });
  59. // if (completeResult.statusCode === 200 && analysisResult.statusCode === 200) {
  60. // console.log('面试完成状态已更新,综合分析已触发');
  61. // } else {
  62. // console.error('操作失败');
  63. // }
  64. } catch (error) {
  65. // console.error('请求失败:', error);
  66. }
  67. },
  68. goBack() {
  69. uni.switchTab({
  70. url: '/pages/index/index'
  71. });
  72. }
  73. }
  74. }
  75. </script>
  76. <style>
  77. .success-container {
  78. display: flex;
  79. flex-direction: column;
  80. align-items: center;
  81. min-height: 100vh;
  82. background-color: #ffffff;
  83. padding: 30rpx;
  84. }
  85. .avatar-container {
  86. margin-top: 100rpx;
  87. margin-bottom: 40rpx;
  88. }
  89. .avatar-circle {
  90. width: 180rpx;
  91. height: 180rpx;
  92. background-color: #f5f5f5;
  93. border-radius: 50%;
  94. position: relative;
  95. }
  96. .avatar-circle::after {
  97. content: '';
  98. position: absolute;
  99. bottom: -30rpx;
  100. left: 50%;
  101. transform: translateX(-50%);
  102. width: 120rpx;
  103. height: 60rpx;
  104. background-color: #f5f5f5;
  105. border-radius: 60rpx 60rpx 0 0;
  106. }
  107. .interview-status {
  108. margin-top: 60rpx;
  109. margin-bottom: 20rpx;
  110. }
  111. .status-text {
  112. font-size: 36rpx;
  113. color: #003399;
  114. font-weight: normal;
  115. }
  116. .tips-container {
  117. padding: 0 60rpx;
  118. text-align: center;
  119. margin-bottom: 60rpx;
  120. }
  121. .tips-text {
  122. font-size: 28rpx;
  123. color: #999999;
  124. line-height: 1.5;
  125. }
  126. .btn-container {
  127. margin-top: 80rpx;
  128. width: 100%;
  129. padding: 0 40rpx;
  130. }
  131. .confirm-btn {
  132. width: 100%;
  133. height: 90rpx;
  134. line-height: 90rpx;
  135. background-color: #ffffff;
  136. color: #333333;
  137. border-radius: 45rpx;
  138. font-size: 32rpx;
  139. border: 1px solid #e0e0e0;
  140. }
  141. </style>