detail.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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 share" open-type="share">
  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.showToast({ title: '收藏成功' });
  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. onShareAppMessage: function (res) {
  100. return {
  101. title: this.item.title,
  102. path: '/pages/job/detail?id=' + this.item.id,
  103. success: (res) => {},
  104. fail: (res) => {}
  105. };
  106. }
  107. }
  108. };
  109. </script>
  110. <style lang="scss">
  111. .title {
  112. font-weight: bold;
  113. }
  114. .price {
  115. padding-top: 5px;
  116. font-size: 15px;
  117. font-weight: bold;
  118. color: #ff5722;
  119. }
  120. .desc {
  121. padding-top: 5px;
  122. font-size: 14px;
  123. }
  124. .bos {
  125. background-color: white;
  126. padding: 20px;
  127. border-radius: 25px;
  128. .ms {
  129. margin-top: 20px;
  130. overflow: hidden;
  131. .mtitle {
  132. font-weight: bold;
  133. margin-bottom: 10px;
  134. }
  135. .item {
  136. font-size: 14px;
  137. padding-top: 7px;
  138. }
  139. .gs {
  140. float: left;
  141. width: 50px;
  142. height: 50px;
  143. border-radius: 50%;
  144. background-color: #f1f1f1;
  145. text-align: center;
  146. font-size: 30px;
  147. line-height: 47px;
  148. }
  149. .con {
  150. float: left;
  151. padding-left: 10px;
  152. width: 70%;
  153. .mti {
  154. font-weight: bold;
  155. padding-bottom: 5px;
  156. }
  157. .address {
  158. font-size: 13px;
  159. }
  160. }
  161. .more {
  162. float: right;
  163. margin-top: 14px;
  164. }
  165. }
  166. map {
  167. border-radius: 8px;
  168. overflow: hidden;
  169. margin-top: 15px;
  170. width: 100%;
  171. height: 150px;
  172. }
  173. }
  174. .mfooter {
  175. background-color: white;
  176. bottom: 0px;
  177. border-top: 1px solid $line;
  178. .cn {
  179. padding: 10px 10px 15px 10px;
  180. overflow: hidden;
  181. .tob {
  182. margin-right: 15px;
  183. float: left;
  184. color: $font-c;
  185. &.active {
  186. color: $main-color;
  187. }
  188. .icon {
  189. font-size: 28px;
  190. }
  191. .mtt {
  192. font-size: 14px;
  193. }
  194. }
  195. .share {
  196. background-color: white;
  197. line-height: 22px;
  198. padding-top: 3px;
  199. }
  200. .btn {
  201. float: right;
  202. margin-top: 5px;
  203. }
  204. }
  205. }
  206. </style>