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

198 lines
5.9 KiB

<template>
<view class="se-p-40">
<view class="se-fs-36 se-c-black se-fw-6 se-py-20">
{{items.title}}
</view>
<!-- <view class="se-fs-26 se-c-orange se-fw-6 ">
{{items.salaryMin}} - {{items.salaryMax}}/
</view> -->
<!-- 添加日薪月薪展示 -->
<view class="se-flex se-flex-h-sb se-py-20 se-b-b">
<view class="se-flex se-flex-v-c">
<text class="se-fs-32 se-c-text-sub">日薪</text>
<text class="se-fs-40 se-c-orange se-fw-6">{{ items.salaryDay }}</text>
</view>
<view class="se-flex se-flex-v-c">
<text class="se-fs-32 se-c-text-sub">月薪</text>
<text class="se-fs-40 se-c-orange se-fw-6">{{items.salaryMin}} - {{items.salaryMax}}</text>
</view>
</view>
<view class="se-flex se-flex-v se-py-20">
<view class="se-fs-24 se-c-text">
<text>{{items.address}}</text>
<!-- <text class="se-ml-20">不限</text> -->
</view>
<view class="se-fs-24 se-c-99 se-pt-20">
该职位位于{{items.createTime}}发布
</view>
</view>
<view class="se-flex se-flex-h-sb se-py-40 se-b-b">
<view class="se-flex">
<view>
<image class="se-a-80 se-br-p-50 se-bgc-f5" :src="items.employAuthenticationPerson.image" mode=""></image>
</view>
<view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
<text class="se-fw-6 se-c-black se-fs-30">{{items.employAuthenticationCompany.name}}</text>
<text class="se-fs-24 se-c-text-third">{{items.employAuthenticationCompany.company}}</text>
</view>
</view>
</view>
<view class="se-py-40 se-b-b">
<view class="se-fs-36 se-c-black">
工作地址
</view>
<view class="se-fs-24 se-c-66 se-pt-10 se-flex se-flex-h" @click="openAddress()">
<text>{{items.address}}</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="se-py-40 se-b-b">
<view class="se-fs-36 se-c-black">
职位详情
</view>
<view class="se-pt-20">
<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>
<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>
<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>
<!-- <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> -->
</view>
</view>
<view class="se-fs-24 se-pt-20 se-pb-20 se-lh-40">
<text class="se-fs-24 se-c-text-third">岗位要求</text>
<u-parse :content="items.details"></u-parse>
</view>
<view class="se-px-20 se-pt-20">
<view class="se-px-20 se-pb-80 se-fs-20 se-flex">
<view @click="onPayment"
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">
<text>立即应聘</text>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getTaskById,orderTask,addOrderWork
} from "@/common/api.js"
export default{
data(){
return{
id:"",
items:{},
}
},
onLoad(options) {
console.info(options)
this.id = options.id
this.onTask()
},
methods:{
onTask(){
let that = this
getTaskById({id:that.id}).then(response=>{
console.info('getTaskById',response);
that.items = response.result
}).catch(error=>{
})
},
onPayment(){
uni.showLoading({
title: '加载中'
})
// 检查个人认证状态
this.$store.dispatch('onPersonalAuth', {
success: (person) => {
// 个人认证通过,继续检查简历状态
this.$store.dispatch('onResumeComplete', {
success: (resume) => {
// 简历已完成,执行接单操作
addOrderWork({id:this.id}).then(response=>{
uni.hideLoading()
console.log("下单成功");
uni.navigateTo({
url:"/pages_subpack/payment/index?id="+response.result.id
})
}).catch(error=>{
uni.hideLoading()
})
},
fail: (resume) => {
uni.hideLoading()
// 简历未完成
uni.showModal({
title: '提示',
content: '请先完成简历信息,才能接单',
showCancel: false,
confirmText: '去完善',
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url: '/pages_subpack/resume/index'
})
}
}
})
}
})
},
fail: (person) => {
uni.hideLoading()
// 个人认证未通过
uni.showModal({
title: '提示',
content: '请先完成个人认证,审核通过后才能接单',
showCancel: false,
confirmText: '去认证',
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url: '/pages_subpack/person/index'
})
}
}
})
}
})
},
openAddress(){
let that = this
console.info(that.items.latitude)
console.info(that.items.longitude)
wx.openLocation({
latitude: Number(that.items.latitude),
longitude: Number(that.items.longitude),
name: that.items.title,
address: that.items.address,
scale: 12,
success: function(res) {
console.log(JSON.stringify(res));
},
fail: function(res) {
console.log(`openLocation fail:${JSON.stringify(res)}`);
}
})
// uni.openLocation({
// latitude: 30.492121,
// longitude: 114.410324,
// name: "保利国际中心",
// address: "武汉市洪山区关山大道",
// scale: 12,
// success: function(res) {
// console.log(JSON.stringify(res));
// },
// fail: function(res) {
// console.log(`openLocation fail:${JSON.stringify(res)}`);
// }
// })
}
}
}
</script>
<style>
page{
background-color: #ffffff;
}
</style>