detail.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view>
  3. <view class="main">
  4. <view class="title">{{ item.title }}</view>
  5. <view class="price" v-if="item.type == 0">{{ item.salary == '面议' ? item.salary : item.salary + '/月' }}</view>
  6. <view class="desc">{{ item.experience }} · {{ item.positionName }} · {{ item.type == 0 ? '全职' : '兼职' }}</view>
  7. </view>
  8. <view class="bos">
  9. <view class="ms" style="margin-top: 0px">
  10. <view class="mtitle">职位描述</view>
  11. <u-parse :content="item.contents" class="item"></u-parse>
  12. </view>
  13. <!--企业信息-->
  14. <view v-if="item.type == 0">
  15. <view class="ms" @click="go('/pages/job/enterprise/detail?id=' + enterprise.id)">
  16. <view class="icon gs">&#xe646;</view>
  17. <view class="con">
  18. <view class="mti">{{ enterprise.name }}</view>
  19. <view class="address omit">{{ enterprise.address }}</view>
  20. </view>
  21. <text class="icon more">&#xe62b;</text>
  22. </view>
  23. <map :latitude="item.latitude" :longitude="item.longitude" :markers="covers"></map>
  24. </view>
  25. </view>
  26. <view class="footer">
  27. <view class="td">
  28. <button class="btn">投递简历</button>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. item: {},
  38. enterprise: {},
  39. covers: []
  40. };
  41. },
  42. onLoad(e) {
  43. this.http.request({
  44. url: '/app/position/detail/' + e.id,
  45. success: (res) => {
  46. this.item = res.data.data.position;
  47. this.enterprise = res.data.data.enterprise;
  48. this.covers.push({ latitude: this.item.latitude, longitude: this.item.longitude });
  49. }
  50. });
  51. },
  52. methods: {
  53. go(url) {
  54. uni.navigateTo({ url: url });
  55. }
  56. }
  57. };
  58. </script>
  59. <style lang="scss">
  60. .title {
  61. font-weight: bold;
  62. }
  63. .price {
  64. padding-top: 5px;
  65. font-size: 15px;
  66. font-weight: bold;
  67. color: #ff5722;
  68. }
  69. .desc {
  70. padding-top: 5px;
  71. font-size: 14px;
  72. }
  73. .bos {
  74. background-color: white;
  75. padding: 20px;
  76. border-radius: 25px;
  77. .ms {
  78. margin-top: 20px;
  79. overflow: hidden;
  80. .mtitle {
  81. font-weight: bold;
  82. margin-bottom: 10px;
  83. }
  84. .item {
  85. font-size: 14px;
  86. padding-top: 7px;
  87. }
  88. .gs {
  89. float: left;
  90. width: 50px;
  91. height: 50px;
  92. border-radius: 50%;
  93. background-color: #f1f1f1;
  94. text-align: center;
  95. font-size: 30px;
  96. line-height: 47px;
  97. }
  98. .con {
  99. float: left;
  100. padding-left: 10px;
  101. width: 70%;
  102. .mti {
  103. font-weight: bold;
  104. padding-bottom: 5px;
  105. }
  106. .address {
  107. font-size: 13px;
  108. }
  109. }
  110. .more {
  111. float: right;
  112. margin-top: 14px;
  113. }
  114. }
  115. map {
  116. border-radius: 8px;
  117. overflow: hidden;
  118. margin-top: 15px;
  119. width: 100%;
  120. height: 150px;
  121. }
  122. }
  123. .footer {
  124. position: fixed;
  125. width: 100%;
  126. bottom: 20px;
  127. .td {
  128. width: 100%;
  129. .btn {
  130. width: 60%;
  131. }
  132. }
  133. }
  134. </style>