detail.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. <u-popup :show="show" round="15" mode="center" :closeable="true" :closeOnClickOverlay="false" :customStyle="{ width: '85%' }" @close="show = false">
  69. <view class="popup">
  70. <view class="xy mt10 mb15">
  71. <u-checkbox-group class="checkbox" v-model="item.checked">
  72. <u-checkbox size="15" shape="circle" label="我已阅读并同意" labelSize="14" name="true"></u-checkbox>
  73. </u-checkbox-group>
  74. <text class="a" @click="go('/pages/other/agreement?title=兼职协议')">《兼职协议》</text>
  75. </view>
  76. <button class="btn" @click="ok()">确定</button>
  77. </view>
  78. </u-popup>
  79. </view>
  80. </template>
  81. <script>
  82. export default {
  83. data() {
  84. return {
  85. item: {},
  86. enterprise: {},
  87. covers: [],
  88. flag: false,
  89. show: false
  90. };
  91. },
  92. onLoad(e) {
  93. this.http.request({
  94. url: '/app/position/detail/' + e.id,
  95. success: (res) => {
  96. this.item = res.data.data.position;
  97. this.enterprise = res.data.data.enterprise;
  98. this.covers.push({ latitude: this.item.latitude, longitude: this.item.longitude });
  99. this.item.days = this.util.days(this.item.startDate, this.item.endDate);
  100. }
  101. });
  102. },
  103. methods: {
  104. go(url) {
  105. uni.navigateTo({ url: url });
  106. },
  107. //收藏职位
  108. add() {
  109. this.http.request({
  110. url: '/app/favorite/add/' + this.item.id,
  111. success: (res) => {
  112. uni.showToast({ title: '收藏成功' });
  113. this.flag = true;
  114. }
  115. });
  116. },
  117. //投递简历
  118. send() {
  119. if (this.item.type == 1) {
  120. this.show = true;
  121. } else {
  122. this.ok();
  123. }
  124. },
  125. ok() {
  126. if (this.item.type == 1) {
  127. let rule = [{ name: 'checked', checkType: 'notnull', errorMsg: '请同意并勾选协议' }];
  128. if (!this.verify.check(this.item, rule)) {
  129. uni.showModal({ content: this.verify.error, showCancel: false });
  130. return false;
  131. }
  132. }
  133. this.show = false;
  134. this.http.request({
  135. url: '/app/deliver/send/' + this.item.id,
  136. success: (res) => {
  137. //实名认证跳转
  138. if (res.data.code == 7878) {
  139. uni.showModal({
  140. title: '提示',
  141. content: res.data.msg,
  142. showCancel: false,
  143. success: (res) => {
  144. uni.navigateTo({ url: '/pages/user/auth' });
  145. }
  146. });
  147. return;
  148. }
  149. //完善简历跳转
  150. if (res.data.code == 7979) {
  151. uni.showModal({
  152. title: '提示',
  153. content: res.data.msg,
  154. showCancel: false,
  155. success: (res) => {
  156. uni.navigateTo({ url: '/pages/user/resume/index' });
  157. }
  158. });
  159. return;
  160. }
  161. let tmplIds = [];
  162. if (this.item.type == 0) {
  163. tmplIds = ['ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM'];
  164. }
  165. if (this.item.type == 1) {
  166. tmplIds = ['yhFtY-hzXerPnIxXcYcRCAjQUf8CdLoYEQQi5nBgim0', '87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'];
  167. }
  168. //通知模板订阅消息
  169. uni.requestSubscribeMessage({
  170. tmplIds: tmplIds,
  171. complete: (c) => {
  172. uni.showModal({ content: this.item.type == 0 ? '投递成功,等待企业回应' : '报名成功,等待雇主审核', showCancel: false });
  173. }
  174. });
  175. }
  176. });
  177. }
  178. },
  179. onShareAppMessage(res) {
  180. return {
  181. title: this.item.title,
  182. path: '/pages/job/detail?id=' + this.item.id,
  183. success: (res) => {},
  184. fail: (res) => {}
  185. };
  186. }
  187. };
  188. </script>
  189. <style lang="scss">
  190. .mfooter {
  191. background-color: white;
  192. bottom: 0px;
  193. border-top: 1px solid $line;
  194. .cn {
  195. padding: 10px 10px 15px 10px;
  196. overflow: hidden;
  197. .tob {
  198. margin-right: 15px;
  199. float: left;
  200. color: $font-c;
  201. &.active {
  202. color: $main-color;
  203. }
  204. .icon {
  205. font-size: 28px;
  206. }
  207. .mtt {
  208. font-size: 14px;
  209. }
  210. }
  211. .share {
  212. background-color: white;
  213. line-height: 22px;
  214. padding-top: 3px;
  215. }
  216. .btn {
  217. float: right;
  218. margin-top: 5px;
  219. }
  220. }
  221. }
  222. </style>