用工小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

197 lines
5.9 KiB

8 months ago
6 months ago
8 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
5 months ago
8 months ago
5 months ago
8 months ago
5 months ago
8 months ago
5 months ago
5 months ago
6 months ago
8 months ago
8 months ago
8 months ago
6 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
8 months ago
5 months ago
5 months ago
8 months ago
  1. <template>
  2. <view class="se-p-40">
  3. <view class="se-fs-36 se-c-black se-fw-6 se-py-20">
  4. {{items.title}}
  5. </view>
  6. <!-- <view class="se-fs-26 se-c-orange se-fw-6 ">
  7. {{items.salaryMin}} - {{items.salaryMax}}/
  8. </view> -->
  9. <!-- 添加日薪月薪展示 -->
  10. <view class="se-flex se-flex-h-sb se-py-20 se-b-b">
  11. <view class="se-flex se-flex-v-c">
  12. <text class="se-fs-32 se-c-text-sub">日薪</text>
  13. <text class="se-fs-40 se-c-orange se-fw-6">{{ items.salaryDay }}</text>
  14. </view>
  15. <view class="se-flex se-flex-v-c">
  16. <text class="se-fs-32 se-c-text-sub">月薪</text>
  17. <text class="se-fs-40 se-c-orange se-fw-6">{{items.salaryMin}} - {{items.salaryMax}}</text>
  18. </view>
  19. </view>
  20. <view class="se-flex se-flex-v se-py-20">
  21. <view class="se-fs-24 se-c-text">
  22. <text>{{items.address}}</text>
  23. <!-- <text class="se-ml-20">不限</text> -->
  24. </view>
  25. <view class="se-fs-24 se-c-99 se-pt-20">
  26. 该职位位于{{items.createTime}}发布
  27. </view>
  28. </view>
  29. <view class="se-flex se-flex-h-sb se-py-40 se-b-b">
  30. <view class="se-flex">
  31. <view>
  32. <image class="se-a-80 se-br-p-50 se-bgc-f5" :src="items.employAuthenticationPerson.image" mode=""></image>
  33. </view>
  34. <view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
  35. <text class="se-fw-6 se-c-black se-fs-30">{{items.employAuthenticationCompany.name}}</text>
  36. <text class="se-fs-24 se-c-text-third">{{items.employAuthenticationCompany.company}}</text>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="se-py-40 se-b-b">
  41. <view class="se-fs-36 se-c-black">
  42. 工作地址
  43. </view>
  44. <view class="se-fs-24 se-c-66 se-pt-10 se-flex se-flex-h" @click="openAddress()">
  45. <text>{{items.address}}</text>
  46. <u-icon name="arrow-right"></u-icon>
  47. </view>
  48. </view>
  49. <view class="se-py-40 se-b-b">
  50. <view class="se-fs-36 se-c-black">
  51. 职位详情
  52. </view>
  53. <view class="se-pt-20">
  54. <text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.payType">{{items.payType}}</text>
  55. <text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.categoryOne">{{items.categoryOne}}</text>
  56. <text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.categoryTwo">{{items.categoryTwo}}</text>
  57. <!-- <text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">水泥搬运</text> -->
  58. </view>
  59. </view>
  60. <view class="se-fs-24 se-pt-20 se-pb-20 se-lh-40">
  61. <text class="se-fs-24 se-c-text-third">岗位要求</text>
  62. <u-parse :content="items.details"></u-parse>
  63. </view>
  64. <view class="se-px-20 se-pt-20">
  65. <view class="se-px-20 se-pb-80 se-fs-20 se-flex">
  66. <view @click="onPayment"
  67. class="se-mx-10 se-flex-1 se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-28 se-c-white se-bgc-orange">
  68. <text>立即应聘</text>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. import {
  76. getTaskById,orderTask,addOrderWork
  77. } from "@/common/api.js"
  78. export default{
  79. data(){
  80. return{
  81. id:"",
  82. items:{},
  83. }
  84. },
  85. onLoad(options) {
  86. console.info(options)
  87. this.id = options.id
  88. this.onTask()
  89. },
  90. methods:{
  91. onTask(){
  92. let that = this
  93. getTaskById({id:that.id}).then(response=>{
  94. console.info('getTaskById',response);
  95. that.items = response.result
  96. }).catch(error=>{
  97. })
  98. },
  99. onPayment(){
  100. uni.showLoading({
  101. title: '加载中'
  102. })
  103. // 检查个人认证状态
  104. this.$store.dispatch('onPersonalAuth', {
  105. success: (person) => {
  106. // 个人认证通过,继续检查简历状态
  107. this.$store.dispatch('onResumeComplete', {
  108. success: (resume) => {
  109. // 简历已完成,执行接单操作
  110. addOrderWork({id:this.id}).then(response=>{
  111. uni.hideLoading()
  112. console.log("下单成功");
  113. uni.navigateTo({
  114. url:"/pages_subpack/payment/index?id="+response.result.id
  115. })
  116. }).catch(error=>{
  117. uni.hideLoading()
  118. })
  119. },
  120. fail: (resume) => {
  121. uni.hideLoading()
  122. // 简历未完成
  123. uni.showModal({
  124. title: '提示',
  125. content: '请先完成简历信息,才能接单',
  126. showCancel: false,
  127. confirmText: '去完善',
  128. success: (res) => {
  129. if (res.confirm) {
  130. uni.navigateTo({
  131. url: '/pages_subpack/resume/index'
  132. })
  133. }
  134. }
  135. })
  136. }
  137. })
  138. },
  139. fail: (person) => {
  140. uni.hideLoading()
  141. // 个人认证未通过
  142. uni.showModal({
  143. title: '提示',
  144. content: '请先完成个人认证,审核通过后才能接单',
  145. showCancel: false,
  146. confirmText: '去认证',
  147. success: (res) => {
  148. if (res.confirm) {
  149. uni.navigateTo({
  150. url: '/pages_subpack/person/index'
  151. })
  152. }
  153. }
  154. })
  155. }
  156. })
  157. },
  158. openAddress(){
  159. let that = this
  160. console.info(that.items.latitude)
  161. console.info(that.items.longitude)
  162. wx.openLocation({
  163. latitude: Number(that.items.latitude),
  164. longitude: Number(that.items.longitude),
  165. name: that.items.title,
  166. address: that.items.address,
  167. scale: 12,
  168. success: function(res) {
  169. console.log(JSON.stringify(res));
  170. },
  171. fail: function(res) {
  172. console.log(`openLocation fail:${JSON.stringify(res)}`);
  173. }
  174. })
  175. // uni.openLocation({
  176. // latitude: 30.492121,
  177. // longitude: 114.410324,
  178. // name: "保利国际中心",
  179. // address: "武汉市洪山区关山大道",
  180. // scale: 12,
  181. // success: function(res) {
  182. // console.log(JSON.stringify(res));
  183. // },
  184. // fail: function(res) {
  185. // console.log(`openLocation fail:${JSON.stringify(res)}`);
  186. // }
  187. // })
  188. }
  189. }
  190. }
  191. </script>
  192. <style>
  193. page{
  194. background-color: #ffffff;
  195. }
  196. </style>