detail.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <view style="padding-bottom: 100px;">
  3. <view class="dtop">
  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="price" v-if="item.type == 1">{{ item.salary }}¥</view>
  7. <view class="desc" v-if="item.title">
  8. <text v-if="item.type == 0">{{ item.experience == '不限' ? '经验不限' : item.experience + '经验' }}</text>
  9. <text>{{ item.positionName || '' }}</text>
  10. <text>{{ item.type == 0 ? '全职' : '完工结算' }}</text>
  11. <view class="audit">
  12. <text class="icon">&#xe64f;</text>
  13. <text>已审核</text>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="mbos">
  18. <view class="ms" style="margin-top: 0px">
  19. <view v-if="item.type == 1">
  20. <view class="mtitle">兼职时间</view>
  21. <view class="desc mb15">{{ item.startDate }}至{{ item.endDate }},共计:{{ item.days }}天</view>
  22. <view class="mtitle">兼职地点</view>
  23. <view class="desc mb15">{{ item.address || '工作地点不限' }}</view>
  24. <view class="mtitle">结算方式</view>
  25. <view class="desc mb15">在规定时间内完工结算(平台打款)</view>
  26. </view>
  27. <view class="mtitle">{{ item.type == 0 ? '职位描述' : '兼职描述' }}</view>
  28. <u-parse :content="item.contents" class="item"></u-parse>
  29. <map :latitude="item.latitude" :longitude="item.longitude" :markers="covers" v-if="item.latitude && item.type == 1"></map>
  30. </view>
  31. <!--企业信息-->
  32. <view v-if="item.type == 0">
  33. <view class="ms" @click="go('/pages/job/enterprise/detail?id=' + enterprise.id)">
  34. <view class="icon gs">&#xe646;</view>
  35. <view class="con">
  36. <view class="mti omit">{{ enterprise.name }}</view>
  37. <view class="address omit">{{ enterprise.address }}</view>
  38. </view>
  39. <text class="icon more">&#xe62b;</text>
  40. </view>
  41. <map :latitude="item.latitude" :longitude="item.longitude" :markers="covers"></map>
  42. </view>
  43. </view>
  44. <view class="bz pl5">
  45. <text class="icon">&#xe634;</text>
  46. <text>如有疑问或者需要帮助请联系我们客服</text>
  47. <button class="contact" open-type="contact">
  48. <text class="icon">&#xe632;</text>
  49. <text>点我沟通</text>
  50. </button>
  51. </view>
  52. <view class="mfooter">
  53. <view class="cn">
  54. <button class="tob share" open-type="share">
  55. <text class="icon">&#xe637;</text>
  56. <view class="mtt">分享</view>
  57. </button>
  58. <view class="tob" @click="add()" :class="{ active: flag }">
  59. <text class="icon">&#xe626;</text>
  60. <view class="mtt">收藏</view>
  61. </view>
  62. <button class="btn" @click="send()">
  63. <text class="icon">&#xe652;</text>
  64. <text>{{ item.type == 0 ? '投递简历' : '立即报名' }}</text>
  65. </button>
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {
  74. item: {},
  75. enterprise: {},
  76. covers: [],
  77. flag: false
  78. };
  79. },
  80. onLoad(e) {
  81. this.http.request({
  82. url: '/app/position/detail/' + e.id,
  83. success: (res) => {
  84. this.item = res.data.data.position;
  85. this.enterprise = res.data.data.enterprise;
  86. this.covers.push({ latitude: this.item.latitude, longitude: this.item.longitude });
  87. this.item.days = this.util.days(this.item.startDate, this.item.endDate);
  88. }
  89. });
  90. },
  91. methods: {
  92. go(url) {
  93. uni.navigateTo({ url: url });
  94. },
  95. //收藏职位
  96. add() {
  97. this.http.request({
  98. url: '/app/favorite/add/' + this.item.id,
  99. success: (res) => {
  100. uni.showToast({ title: '收藏成功' });
  101. this.flag = true;
  102. }
  103. });
  104. },
  105. //投递简历
  106. send() {
  107. this.http.request({
  108. url: '/app/deliver/send/' + this.item.id,
  109. success: (res) => {
  110. //实名认证跳转
  111. if (res.data.code == 7878) {
  112. uni.showModal({
  113. title: '提示',
  114. content: res.data.msg,
  115. showCancel: false,
  116. success: (res) => {
  117. uni.navigateTo({ url: '/pages/user/auth' });
  118. }
  119. });
  120. return;
  121. }
  122. //完善简历跳转
  123. if (res.data.code == 7979) {
  124. uni.showModal({
  125. title: '提示',
  126. content: res.data.msg,
  127. showCancel: false,
  128. success: (res) => {
  129. uni.navigateTo({ url: '/pages/user/resume/index' });
  130. }
  131. });
  132. return;
  133. }
  134. let tmplIds = [];
  135. if (this.item.type == 0) {
  136. tmplIds = ['ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM'];
  137. }
  138. if (this.item.type == 1) {
  139. tmplIds = ['yhFtY-hzXerPnIxXcYcRCAjQUf8CdLoYEQQi5nBgim0', '87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'];
  140. }
  141. //通知模板订阅消息
  142. uni.requestSubscribeMessage({
  143. tmplIds: tmplIds,
  144. complete: (c) => {
  145. uni.showModal({ content: this.item.type == 0 ? '投递成功,等待企业回应' : '报名成功,等待雇主审核', showCancel: false });
  146. }
  147. });
  148. }
  149. });
  150. },
  151. //分享
  152. onShareAppMessage: function (res) {
  153. return {
  154. title: this.item.title,
  155. path: '/pages/job/detail?id=' + this.item.id,
  156. success: (res) => {},
  157. fail: (res) => {}
  158. };
  159. }
  160. }
  161. };
  162. </script>
  163. <style lang="scss">
  164. .mfooter {
  165. background-color: white;
  166. bottom: 0px;
  167. border-top: 1px solid $line;
  168. .cn {
  169. padding: 10px 10px 15px 10px;
  170. overflow: hidden;
  171. .tob {
  172. margin-right: 15px;
  173. float: left;
  174. color: $font-c;
  175. &.active {
  176. color: $main-color;
  177. }
  178. .icon {
  179. font-size: 28px;
  180. }
  181. .mtt {
  182. font-size: 14px;
  183. }
  184. }
  185. .share {
  186. background-color: white;
  187. line-height: 22px;
  188. padding-top: 3px;
  189. }
  190. .btn {
  191. float: right;
  192. margin-top: 5px;
  193. }
  194. }
  195. }
  196. </style>