detail.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. //实名认证跳转
  84. if (res.data.code == 7878) {
  85. uni.showModal({
  86. title: '提示',
  87. content: res.data.msg,
  88. showCancel: false,
  89. success: (res) => {
  90. uni.navigateTo({ url: '/pages/user/auth' });
  91. }
  92. });
  93. return;
  94. }
  95. //完善简历跳转
  96. if (res.data.code == 7979) {
  97. uni.showModal({
  98. title: '提示',
  99. content: res.data.msg,
  100. showCancel: false,
  101. success: (res) => {
  102. uni.navigateTo({ url: '/pages/user/resume/index' });
  103. }
  104. });
  105. return;
  106. }
  107. //通知模板订阅消息
  108. uni.requestSubscribeMessage({
  109. tmplIds: ['ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM'],
  110. complete: (c) => {
  111. uni.showModal({ content: '投递成功,等待企业回应', showCancel: false });
  112. }
  113. });
  114. }
  115. });
  116. },
  117. //分享
  118. onShareAppMessage: function (res) {
  119. return {
  120. title: this.item.title,
  121. path: '/pages/job/detail?id=' + this.item.id,
  122. success: (res) => {},
  123. fail: (res) => {}
  124. };
  125. }
  126. }
  127. };
  128. </script>
  129. <style lang="scss">
  130. .title {
  131. font-weight: bold;
  132. }
  133. .price {
  134. padding-top: 5px;
  135. font-size: 15px;
  136. font-weight: bold;
  137. color: #ff5722;
  138. }
  139. .desc {
  140. padding-top: 5px;
  141. font-size: 14px;
  142. }
  143. .bos {
  144. background-color: white;
  145. padding: 20px;
  146. border-radius: 25px;
  147. .ms {
  148. margin-top: 20px;
  149. overflow: hidden;
  150. .mtitle {
  151. font-weight: bold;
  152. margin-bottom: 10px;
  153. }
  154. .item {
  155. font-size: 14px;
  156. padding-top: 7px;
  157. }
  158. .gs {
  159. float: left;
  160. width: 50px;
  161. height: 50px;
  162. border-radius: 50%;
  163. background-color: #f1f1f1;
  164. text-align: center;
  165. font-size: 30px;
  166. line-height: 47px;
  167. }
  168. .con {
  169. float: left;
  170. padding-left: 10px;
  171. width: 70%;
  172. .mti {
  173. font-weight: bold;
  174. padding-bottom: 5px;
  175. }
  176. .address {
  177. font-size: 13px;
  178. }
  179. }
  180. .more {
  181. float: right;
  182. margin-top: 14px;
  183. }
  184. }
  185. map {
  186. border-radius: 8px;
  187. overflow: hidden;
  188. margin-top: 15px;
  189. width: 100%;
  190. height: 150px;
  191. }
  192. }
  193. .mfooter {
  194. background-color: white;
  195. bottom: 0px;
  196. border-top: 1px solid $line;
  197. .cn {
  198. padding: 10px 10px 15px 10px;
  199. overflow: hidden;
  200. .tob {
  201. margin-right: 15px;
  202. float: left;
  203. color: $font-c;
  204. &.active {
  205. color: $main-color;
  206. }
  207. .icon {
  208. font-size: 28px;
  209. }
  210. .mtt {
  211. font-size: 14px;
  212. }
  213. }
  214. .share {
  215. background-color: white;
  216. line-height: 22px;
  217. padding-top: 3px;
  218. }
  219. .btn {
  220. float: right;
  221. margin-top: 5px;
  222. }
  223. }
  224. }
  225. </style>