detail.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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 omit">{{ 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="mfooter">
  27. <view class="cn">
  28. <button class="tob">
  29. <text class="icon">&#xe637;</text>
  30. <view class="mtt">分享</view>
  31. </button>
  32. <view class="tob" @click="add()" :class="{ active: flag }">
  33. <text class="icon">&#xe626;</text>
  34. <view class="mtt">收藏</view>
  35. </view>
  36. <button class="btn" @click="send()">
  37. <text class="icon">&#xe652;</text>
  38. <text>投递简历</text>
  39. </button>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. item: {},
  49. enterprise: {},
  50. covers: [],
  51. flag: false
  52. };
  53. },
  54. onLoad(e) {
  55. this.http.request({
  56. url: '/app/position/detail/' + e.id,
  57. success: (res) => {
  58. this.item = res.data.data.position;
  59. this.enterprise = res.data.data.enterprise;
  60. this.covers.push({ latitude: this.item.latitude, longitude: this.item.longitude });
  61. }
  62. });
  63. },
  64. methods: {
  65. go(url) {
  66. uni.navigateTo({ url: url });
  67. },
  68. //收藏职位
  69. add() {
  70. this.http.request({
  71. url: '/app/favorite/add/' + this.item.id,
  72. success: (res) => {
  73. uni.showModal({ content: '收藏成功', showCancel: false });
  74. this.flag = true;
  75. }
  76. });
  77. },
  78. //投递简历
  79. send() {
  80. this.http.request({
  81. url: '/app/deliver/send/' + this.item.id,
  82. success: (res) => {
  83. if (res.data.code == 7979) {
  84. uni.showModal({
  85. title: '提示',
  86. content: res.data.msg,
  87. showCancel: false,
  88. success: (res) => {
  89. uni.navigateTo({ url: '/pages/user/resume/index' });
  90. }
  91. });
  92. } else {
  93. uni.showModal({ content: '投递成功,等待企业回应', showCancel: false });
  94. }
  95. }
  96. });
  97. }
  98. }
  99. };
  100. </script>
  101. <style lang="scss">
  102. .title {
  103. font-weight: bold;
  104. }
  105. .price {
  106. padding-top: 5px;
  107. font-size: 15px;
  108. font-weight: bold;
  109. color: #ff5722;
  110. }
  111. .desc {
  112. padding-top: 5px;
  113. font-size: 14px;
  114. }
  115. .bos {
  116. background-color: white;
  117. padding: 20px;
  118. border-radius: 25px;
  119. .ms {
  120. margin-top: 20px;
  121. overflow: hidden;
  122. .mtitle {
  123. font-weight: bold;
  124. margin-bottom: 10px;
  125. }
  126. .item {
  127. font-size: 14px;
  128. padding-top: 7px;
  129. }
  130. .gs {
  131. float: left;
  132. width: 50px;
  133. height: 50px;
  134. border-radius: 50%;
  135. background-color: #f1f1f1;
  136. text-align: center;
  137. font-size: 30px;
  138. line-height: 47px;
  139. }
  140. .con {
  141. float: left;
  142. padding-left: 10px;
  143. width: 70%;
  144. .mti {
  145. font-weight: bold;
  146. padding-bottom: 5px;
  147. }
  148. .address {
  149. font-size: 13px;
  150. }
  151. }
  152. .more {
  153. float: right;
  154. margin-top: 14px;
  155. }
  156. }
  157. map {
  158. border-radius: 8px;
  159. overflow: hidden;
  160. margin-top: 15px;
  161. width: 100%;
  162. height: 150px;
  163. }
  164. }
  165. .mfooter {
  166. background-color: white;
  167. bottom: 0px;
  168. border-top: 1px solid $line;
  169. .cn {
  170. padding: 10px 10px 18px 10px;
  171. overflow: hidden;
  172. .tob {
  173. margin-right: 15px;
  174. float: left;
  175. color: $font-c;
  176. &.active {
  177. color: $main-color;
  178. }
  179. .icon {
  180. font-size: 28px;
  181. }
  182. .mtt {
  183. font-size: 14px;
  184. }
  185. }
  186. .btn {
  187. float: right;
  188. margin-top: 5px;
  189. }
  190. }
  191. }
  192. </style>