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

217 lines
6.9 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
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 != null && items.payType != undefined">
  55. <template v-if="items.payType == 0">提前支付</template>
  56. <template v-else>先试用后支付</template>
  57. </text>
  58. <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>
  59. <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>
  60. <!-- <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> -->
  61. </view>
  62. </view>
  63. <view class="se-fs-24 se-pt-20 se-pb-20 se-lh-40">
  64. <text class="se-fs-24 se-c-text-third">岗位要求</text>
  65. <u-parse :content="items.details"></u-parse>
  66. </view>
  67. <view class="se-px-20 se-pt-20">
  68. <view class="se-px-20 se-pb-80 se-fs-20 se-flex">
  69. <view @click="onPayment"
  70. 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">
  71. <text>立即应聘</text>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. import {
  79. getTaskById,orderTask,addOrderWork
  80. } from "@/common/api.js"
  81. export default{
  82. data(){
  83. return{
  84. id:"",
  85. items:{},
  86. }
  87. },
  88. onLoad(options) {
  89. console.info(options)
  90. this.id = options.id
  91. this.onTask()
  92. },
  93. methods:{
  94. onTask(){
  95. let that = this
  96. getTaskById({id:that.id}).then(response=>{
  97. console.info('getTaskById',response);
  98. that.items = response.result
  99. }).catch(error=>{
  100. })
  101. },
  102. onPayment(){
  103. uni.showLoading({
  104. title: '加载中'
  105. })
  106. // 检查个人认证状态
  107. this.$store.dispatch('onPersonalAuth', {
  108. success: (person) => {
  109. // 个人认证通过,继续检查简历状态
  110. this.$store.dispatch('onResumeComplete', {
  111. success: (resume) => {
  112. this.addOrderWork()
  113. },
  114. fail: (resume) => {
  115. uni.hideLoading()
  116. // 简历未完成
  117. uni.showModal({
  118. title: '提示',
  119. content: '请先完成简历信息,才能接单',
  120. showCancel: false,
  121. confirmText: '去完善',
  122. success: (res) => {
  123. if (res.confirm) {
  124. uni.navigateTo({
  125. url: '/pages_subpack/resume/index'
  126. })
  127. }
  128. }
  129. })
  130. }
  131. })
  132. },
  133. fail: (person) => {
  134. uni.hideLoading()
  135. // 个人认证未通过
  136. uni.showModal({
  137. title: '提示',
  138. content: '请先完成个人认证,审核通过后才能接单',
  139. showCancel: false,
  140. confirmText: '去认证',
  141. success: (res) => {
  142. if (res.confirm) {
  143. uni.navigateTo({
  144. url: '/pages_subpack/person/index'
  145. })
  146. }
  147. }
  148. })
  149. }
  150. })
  151. },
  152. addOrderWork(){
  153. // 简历已完成,执行接单操作
  154. addOrderWork({id:this.id}).then(response=>{
  155. uni.hideLoading()
  156. console.log("下单成功");
  157. uni.navigateTo({
  158. url:"/pages_subpack/payment/index?id="+response.result.id
  159. })
  160. }).catch(error=>{
  161. console.log(error);
  162. setTimeout(()=>{
  163. if (error.result && error.result.id) {
  164. if(error.result.orderStatusSeek == 'Y'){
  165. uni.navigateTo({
  166. url:"/pages_subpack/order-detail/index?orderId="+error.result.id
  167. })
  168. }else{
  169. uni.navigateTo({
  170. url:"/pages_subpack/payment/index?id="+error.result.id
  171. })
  172. }
  173. }
  174. }, 800);
  175. uni.hideLoading()
  176. })
  177. },
  178. openAddress(){
  179. let that = this
  180. console.info(that.items.latitude)
  181. console.info(that.items.longitude)
  182. wx.openLocation({
  183. latitude: Number(that.items.latitude),
  184. longitude: Number(that.items.longitude),
  185. name: that.items.title,
  186. address: that.items.address,
  187. scale: 12,
  188. success: function(res) {
  189. console.log(JSON.stringify(res));
  190. },
  191. fail: function(res) {
  192. console.log(`openLocation fail:${JSON.stringify(res)}`);
  193. }
  194. })
  195. // uni.openLocation({
  196. // latitude: 30.492121,
  197. // longitude: 114.410324,
  198. // name: "保利国际中心",
  199. // address: "武汉市洪山区关山大道",
  200. // scale: 12,
  201. // success: function(res) {
  202. // console.log(JSON.stringify(res));
  203. // },
  204. // fail: function(res) {
  205. // console.log(`openLocation fail:${JSON.stringify(res)}`);
  206. // }
  207. // })
  208. }
  209. }
  210. }
  211. </script>
  212. <style>
  213. page{
  214. background-color: #ffffff;
  215. }
  216. </style>