my_invitation_send_detail.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view>
  3. <view class="wrapper" >
  4. <!-- 上方邀请号和照片 -->
  5. <view class="above">
  6. <view>
  7. <view class="aboveTitle">
  8. <text>邀请号:</text>
  9. <text>{{Info.id}}</text>
  10. </view>
  11. <view class="aboveTitle">
  12. <text>对方:</text>
  13. <text>{{Info.toUname}}</text>
  14. </view>
  15. </view>
  16. <!-- 头像 -->
  17. <image v-if="Info.sex === null" class="headerPortrait" mode="widthFix" :src="Info.imgUrl"></image>
  18. <image v-else-if="Info.sex === '男' " class="headerPortrait" mode="widthFix" src="/static/boy.png"></image>
  19. <image v-else-if="Info.sex === '女' " class="headerPortrait" mode="widthFix" src="/static/girl.png"></image>
  20. </view>
  21. <!-- 中间详细信息 -->
  22. <view>
  23. <view class="midTitle">
  24. <text>对方ID:</text>
  25. <text>{{Info.toUid}}</text>
  26. </view>
  27. <view class="midTitle">
  28. <text>需求号:</text>
  29. <text class="toLink" @click="toNeedDetail">{{Info.requireId}}</text>
  30. </view>
  31. <view class="midTitle">
  32. <text>课程号:</text>
  33. <text class="toLink" @click="toCourseDetail">{{Info.courseId}}</text>
  34. </view>
  35. <view class="midTitle">
  36. <text>需求金额:</text>
  37. <text>{{Info.requireSalary}}</text>
  38. </view>
  39. <view class="midTitle">
  40. <text>邀请内容:</text>
  41. <text>{{Info.requireDetail}}</text>
  42. </view>
  43. </view>
  44. <view class="bottomWrapper">
  45. <view class="bottomTitle">
  46. <text>邀请日期:</text>
  47. <text>{{Info.datetime}}</text>
  48. </view>
  49. <view class="bottomTitle">
  50. <text>对方阅读状态:</text>
  51. <text class="operateState">{{Info.readStatus}}</text>
  52. </view>
  53. <view class="bottomTitle">
  54. <text>对方操作状态:</text>
  55. <text class="operateState">{{Info.operateStatus}}</text>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. data() {
  64. return {
  65. Info:[],
  66. };
  67. },
  68. onLoad(option) {
  69. if (option.id !== undefined) {
  70. const id = decodeURIComponent(option.id)
  71. this.getInvitationDetail(id)
  72. }
  73. },
  74. methods:{
  75. toNeedDetail() {
  76. uni.navigateTo({
  77. url: '/subpkg/student/require/student_require_all_detail?requireId=' + encodeURIComponent(this.Info.requireId)
  78. })
  79. },
  80. toCourseDetail() {
  81. uni.navigateTo({
  82. url: '/subpkg/teacher/course/teacher_course_all_detail?courseId=' + encodeURIComponent(this.Info.courseId)
  83. })
  84. },
  85. async getInvitationDetail(id) {
  86. const { data: result } = await uni.$http.get('/education/invite-info/getInvitationDetail', {inviteId: id})
  87. this.Info = result.data.one
  88. }
  89. }
  90. }
  91. </script>
  92. <!-- 设置页面背景 -->
  93. <style lang="scss">
  94. page{
  95. height: 100%;
  96. // background-color: #FFF;
  97. }
  98. </style>
  99. <style lang="scss" scoped>
  100. /* 设置背景 */
  101. .wrapper{
  102. width: 93%;
  103. padding: 20rpx;
  104. margin-left: 10rpx;
  105. border-radius: 20rpx;
  106. background-color: #FFF;
  107. }
  108. /* 上方邀请号和照片 */
  109. .above{
  110. display: flex;
  111. width: 95%;
  112. justify-content: space-between;
  113. }
  114. /* 上方、中间左侧文字 */
  115. .aboveTitle,
  116. .midTitle,
  117. .bottomTitle{
  118. padding-bottom: 20rpx;
  119. }
  120. /* 头像 */
  121. .headerPortrait{
  122. width: 200rpx;
  123. }
  124. .bottomWrapper{
  125. margin-top: 160rpx;
  126. }
  127. /* 设置链接样式 */
  128. .toLink{
  129. color: skyblue;
  130. text-decoration: underline;
  131. }
  132. /* 设置操作状态字体 */
  133. .operateState{
  134. font-weight: bold;
  135. color: red;
  136. }
  137. </style>