task_detail.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view>
  3. <view class="dtop">
  4. <view class="title">{{ item.title || '' }}</view>
  5. </view>
  6. <view class="mbos">
  7. <view class="ms mt0">
  8. <view class="mtitle">兼职金额</view>
  9. <view class="desc mb15">{{ item.salary }}元</view>
  10. <view class="mtitle">兼职时间</view>
  11. <view class="desc mb15">{{ item.startDate }}至{{ item.endDate }},共计:{{ item.days }}天</view>
  12. <view class="mtitle">兼职地点</view>
  13. <view class="desc mb15">{{ item.address || '工作地点不限' }}</view>
  14. <view class="mtitle">结算方式</view>
  15. <view class="desc mb15">在规定时间内完工结算(平台打款)</view>
  16. <view class="mtitle">兼职描述</view>
  17. <u-parse :content="item.contents" class="item"></u-parse>
  18. <map :latitude="item.latitude" :longitude="item.longitude" :markers="covers" v-if="item.latitude"></map>
  19. </view>
  20. </view>
  21. <view class="mfooter">
  22. <view class="cn">
  23. <button class="btn" @click="go('/pages/user/resume/application/task_list?taskId=' + item.taskId)">
  24. <text class="icon">&#xe652;</text>
  25. <text>任务日志</text>
  26. </button>
  27. <button class="btn" @click="send()">
  28. <text class="icon">&#xe652;</text>
  29. <text>确认完成</text>
  30. </button>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. item: {}
  40. };
  41. },
  42. onLoad(e) {
  43. this.http.request({
  44. url: '/app/position/detail/' + e.id,
  45. success: (res) => {
  46. this.item = res.data.data.position;
  47. this.item.days = this.util.days(this.item.startDate, this.item.endDate);
  48. this.item.taskId = e.taskId;
  49. }
  50. });
  51. },
  52. methods: {
  53. go(url) {
  54. uni.navigateTo({ url: url });
  55. },
  56. //投递简历
  57. send() {
  58. this.http.request({
  59. url: '/app/deliver/send/' + this.item.id,
  60. success: (res) => {
  61. //实名认证跳转
  62. if (res.data.code == 7878) {
  63. uni.showModal({
  64. title: '提示',
  65. content: res.data.msg,
  66. showCancel: false,
  67. success: (res) => {
  68. uni.navigateTo({ url: '/pages/user/auth' });
  69. }
  70. });
  71. return;
  72. }
  73. //完善简历跳转
  74. if (res.data.code == 7979) {
  75. uni.showModal({
  76. title: '提示',
  77. content: res.data.msg,
  78. showCancel: false,
  79. success: (res) => {
  80. uni.navigateTo({ url: '/pages/user/resume/index' });
  81. }
  82. });
  83. return;
  84. }
  85. let tmplIds = [];
  86. if (this.item.type == 0) {
  87. tmplIds = ['ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM'];
  88. }
  89. if (this.item.type == 1) {
  90. tmplIds = ['yhFtY-hzXerPnIxXcYcRCLpbkuNrzn5yk-rWgHVX2Aw', '87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'];
  91. }
  92. //通知模板订阅消息
  93. uni.requestSubscribeMessage({
  94. tmplIds: tmplIds,
  95. complete: (c) => {
  96. uni.showModal({ content: this.item.type == 0 ? '投递成功,等待企业回应' : '报名成功,等待雇主审核', showCancel: false });
  97. }
  98. });
  99. }
  100. });
  101. }
  102. }
  103. };
  104. </script>
  105. <style lang="scss">
  106. .mfooter {
  107. background-color: white;
  108. bottom: 0px;
  109. border-top: 1px solid $line;
  110. .cn {
  111. padding: 10px 10px 15px 10px;
  112. overflow: hidden;
  113. .btn {
  114. flex: 1;
  115. }
  116. }
  117. }
  118. </style>