用工小程序前端代码
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.

214 lines
6.7 KiB

9 months ago
7 months ago
9 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
6 months ago
9 months ago
6 months ago
9 months ago
6 months ago
9 months ago
6 months ago
6 months ago
7 months ago
9 months ago
9 months ago
9 months ago
7 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
9 months ago
6 months ago
6 months ago
6 months ago
9 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. this.addOrderWork()
  110. },
  111. fail: (resume) => {
  112. uni.hideLoading()
  113. // 简历未完成
  114. uni.showModal({
  115. title: '提示',
  116. content: '请先完成简历信息,才能接单',
  117. showCancel: false,
  118. confirmText: '去完善',
  119. success: (res) => {
  120. if (res.confirm) {
  121. uni.navigateTo({
  122. url: '/pages_subpack/resume/index'
  123. })
  124. }
  125. }
  126. })
  127. }
  128. })
  129. },
  130. fail: (person) => {
  131. uni.hideLoading()
  132. // 个人认证未通过
  133. uni.showModal({
  134. title: '提示',
  135. content: '请先完成个人认证,审核通过后才能接单',
  136. showCancel: false,
  137. confirmText: '去认证',
  138. success: (res) => {
  139. if (res.confirm) {
  140. uni.navigateTo({
  141. url: '/pages_subpack/person/index'
  142. })
  143. }
  144. }
  145. })
  146. }
  147. })
  148. },
  149. addOrderWork(){
  150. // 简历已完成,执行接单操作
  151. addOrderWork({id:this.id}).then(response=>{
  152. uni.hideLoading()
  153. console.log("下单成功");
  154. uni.navigateTo({
  155. url:"/pages_subpack/payment/index?id="+response.result.id
  156. })
  157. }).catch(error=>{
  158. console.log(error);
  159. setTimeout(()=>{
  160. if (error.result && error.result.id) {
  161. if(error.result.orderStatusSeek == 'Y'){
  162. uni.navigateTo({
  163. url:"/pages_subpack/order-detail/index?orderId="+error.result.id
  164. })
  165. }else{
  166. uni.navigateTo({
  167. url:"/pages_subpack/payment/index?id="+error.result.id
  168. })
  169. }
  170. }
  171. }, 800);
  172. uni.hideLoading()
  173. })
  174. },
  175. openAddress(){
  176. let that = this
  177. console.info(that.items.latitude)
  178. console.info(that.items.longitude)
  179. wx.openLocation({
  180. latitude: Number(that.items.latitude),
  181. longitude: Number(that.items.longitude),
  182. name: that.items.title,
  183. address: that.items.address,
  184. scale: 12,
  185. success: function(res) {
  186. console.log(JSON.stringify(res));
  187. },
  188. fail: function(res) {
  189. console.log(`openLocation fail:${JSON.stringify(res)}`);
  190. }
  191. })
  192. // uni.openLocation({
  193. // latitude: 30.492121,
  194. // longitude: 114.410324,
  195. // name: "保利国际中心",
  196. // address: "武汉市洪山区关山大道",
  197. // scale: 12,
  198. // success: function(res) {
  199. // console.log(JSON.stringify(res));
  200. // },
  201. // fail: function(res) {
  202. // console.log(`openLocation fail:${JSON.stringify(res)}`);
  203. // }
  204. // })
  205. }
  206. }
  207. }
  208. </script>
  209. <style>
  210. page{
  211. background-color: #ffffff;
  212. }
  213. </style>