detail.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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" v-if="item.title">
  7. <text>{{ item.experience == '不限' ? '经验不限' : item.experience + '经验' }} · {{ item.positionName || '' }} · {{ item.type == 0 ? '全职' : '兼职' }}</text>
  8. <view class="audit">
  9. <text class="icon">&#xe64f;</text>
  10. <text>已审核</text>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="bos">
  15. <view class="ms" style="margin-top: 0px">
  16. <view class="mtitle">职位描述</view>
  17. <u-parse :content="item.contents" class="item"></u-parse>
  18. </view>
  19. <!--企业信息-->
  20. <view v-if="item.type == 0">
  21. <view class="ms" @click="go('/pages/job/enterprise/detail?id=' + enterprise.id)">
  22. <view class="icon gs">&#xe646;</view>
  23. <view class="con">
  24. <view class="mti omit">{{ enterprise.name }}</view>
  25. <view class="address omit">{{ enterprise.address }}</view>
  26. </view>
  27. <text class="icon more">&#xe62b;</text>
  28. </view>
  29. <map :latitude="item.latitude" :longitude="item.longitude" :markers="covers"></map>
  30. </view>
  31. </view>
  32. <view class="bz">
  33. <text class="icon">&#xe634;</text>
  34. <text>如有疑问或者需要帮助请联系我们客服</text>
  35. <button class="contact" open-type="contact">
  36. <text class="icon">&#xe632;</text>
  37. <text>点我沟通</text>
  38. </button>
  39. </view>
  40. <view class="mfooter">
  41. <view class="cn">
  42. <button class="tob share" open-type="share">
  43. <text class="icon">&#xe637;</text>
  44. <view class="mtt">分享</view>
  45. </button>
  46. <view class="tob" @click="add()" :class="{ active: flag }">
  47. <text class="icon">&#xe626;</text>
  48. <view class="mtt">收藏</view>
  49. </view>
  50. <button class="btn" @click="send()">
  51. <text class="icon">&#xe652;</text>
  52. <text>投递简历</text>
  53. </button>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. export default {
  60. data() {
  61. return {
  62. item: {},
  63. enterprise: {},
  64. covers: [],
  65. flag: false
  66. };
  67. },
  68. onLoad(e) {
  69. this.http.request({
  70. url: '/app/position/detail/' + e.id,
  71. success: (res) => {
  72. this.item = res.data.data.position;
  73. this.enterprise = res.data.data.enterprise;
  74. this.covers.push({ latitude: this.item.latitude, longitude: this.item.longitude });
  75. }
  76. });
  77. },
  78. methods: {
  79. go(url) {
  80. uni.navigateTo({ url: url });
  81. },
  82. //收藏职位
  83. add() {
  84. this.http.request({
  85. url: '/app/favorite/add/' + this.item.id,
  86. success: (res) => {
  87. uni.showToast({ title: '收藏成功' });
  88. this.flag = true;
  89. }
  90. });
  91. },
  92. //投递简历
  93. send() {
  94. this.http.request({
  95. url: '/app/deliver/send/' + this.item.id,
  96. success: (res) => {
  97. //实名认证跳转
  98. if (res.data.code == 7878) {
  99. uni.showModal({
  100. title: '提示',
  101. content: res.data.msg,
  102. showCancel: false,
  103. success: (res) => {
  104. uni.navigateTo({ url: '/pages/user/auth' });
  105. }
  106. });
  107. return;
  108. }
  109. //完善简历跳转
  110. if (res.data.code == 7979) {
  111. uni.showModal({
  112. title: '提示',
  113. content: res.data.msg,
  114. showCancel: false,
  115. success: (res) => {
  116. uni.navigateTo({ url: '/pages/user/resume/index' });
  117. }
  118. });
  119. return;
  120. }
  121. //通知模板订阅消息
  122. uni.requestSubscribeMessage({
  123. tmplIds: ['ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM'],
  124. complete: (c) => {
  125. uni.showModal({ content: '投递成功,等待企业回应', showCancel: false });
  126. }
  127. });
  128. }
  129. });
  130. },
  131. //分享
  132. onShareAppMessage: function (res) {
  133. return {
  134. title: this.item.title,
  135. path: '/pages/job/detail?id=' + this.item.id,
  136. success: (res) => {},
  137. fail: (res) => {}
  138. };
  139. }
  140. }
  141. };
  142. </script>
  143. <style lang="scss">
  144. .title {
  145. font-weight: bold;
  146. }
  147. .price {
  148. padding-top: 5px;
  149. font-size: 15px;
  150. font-weight: bold;
  151. color: #ff5722;
  152. }
  153. .desc {
  154. padding-top: 5px;
  155. font-size: 14px;
  156. .audit {
  157. float: right;
  158. color: $main-color;
  159. }
  160. }
  161. .bos {
  162. background-color: white;
  163. padding: 20px;
  164. border-radius: 25px;
  165. .ms {
  166. margin-top: 20px;
  167. overflow: hidden;
  168. .mtitle {
  169. font-weight: bold;
  170. margin-bottom: 10px;
  171. }
  172. .item {
  173. font-size: 14px;
  174. padding-top: 7px;
  175. }
  176. .gs {
  177. float: left;
  178. width: 50px;
  179. height: 50px;
  180. border-radius: 50%;
  181. background-color: #f1f1f1;
  182. text-align: center;
  183. font-size: 30px;
  184. line-height: 47px;
  185. }
  186. .con {
  187. float: left;
  188. padding-left: 10px;
  189. width: 70%;
  190. .mti {
  191. font-weight: bold;
  192. padding-bottom: 5px;
  193. }
  194. .address {
  195. font-size: 13px;
  196. }
  197. }
  198. .more {
  199. float: right;
  200. margin-top: 14px;
  201. }
  202. }
  203. map {
  204. border-radius: 8px;
  205. overflow: hidden;
  206. margin-top: 15px;
  207. width: 100%;
  208. height: 150px;
  209. }
  210. }
  211. .bz {
  212. padding-left: 5px;
  213. font-size: 13px;
  214. .contact {
  215. background-color: #f1f1f1;
  216. float: right;
  217. font-size: 13px;
  218. color: $main-color;
  219. margin-top: -5px;
  220. }
  221. }
  222. .mfooter {
  223. background-color: white;
  224. bottom: 0px;
  225. border-top: 1px solid $line;
  226. .cn {
  227. padding: 10px 10px 15px 10px;
  228. overflow: hidden;
  229. .tob {
  230. margin-right: 15px;
  231. float: left;
  232. color: $font-c;
  233. &.active {
  234. color: $main-color;
  235. }
  236. .icon {
  237. font-size: 28px;
  238. }
  239. .mtt {
  240. font-size: 14px;
  241. }
  242. }
  243. .share {
  244. background-color: white;
  245. line-height: 22px;
  246. padding-top: 3px;
  247. }
  248. .btn {
  249. float: right;
  250. margin-top: 5px;
  251. }
  252. }
  253. }
  254. </style>