flat: 添加定位
This commit is contained in:
1
App.vue
1
App.vue
@@ -24,6 +24,7 @@
|
|||||||
this.$store.dispatch('startRefreshTokenTimer')
|
this.$store.dispatch('startRefreshTokenTimer')
|
||||||
this.$store.dispatch('startRefreshNewsTimer')
|
this.$store.dispatch('startRefreshNewsTimer')
|
||||||
this.$store.dispatch('refreshAuthState')
|
this.$store.dispatch('refreshAuthState')
|
||||||
|
this.$store.dispatch('getUserLocation')
|
||||||
}
|
}
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// 企业定制
|
// 企业定制
|
||||||
|
|||||||
@@ -1,226 +1,254 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="body" @click="goInfo(companyitem.missionNo)">
|
<view class="body" @click="goInfo(companyitem.missionNo)">
|
||||||
<view class="heads">
|
<view class="heads">
|
||||||
<view class="head_left">
|
<view class="head_left">
|
||||||
<rich-text :nodes="string">
|
<rich-text :nodes="string">
|
||||||
</rich-text>
|
</rich-text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="head_right">
|
<view class="head_right">
|
||||||
{{ companyitem.wage }} {{ wageUnit[companyitem.wageUnitCategory] }}
|
{{ companyitem.wage }} {{ wageUnit[companyitem.wageUnitCategory] }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ask">
|
<view class="ask">
|
||||||
<view class="askList">
|
<view class="askList">
|
||||||
{{ companyitem.tradeNames }}
|
{{ companyitem.tradeNames }}
|
||||||
</view>
|
</view>
|
||||||
<view class="askList" v-for="(item, index) in skillNames" :key="index">
|
<view class="askList" v-for="(item, index) in skillNames" :key="index">
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="allName">
|
<!-- <view class="allName">
|
||||||
{{ companyitem.companyName }}
|
{{ companyitem.companyName }}
|
||||||
</view> -->
|
</view> -->
|
||||||
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
|
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
|
||||||
<view class="timeAddress" style="position: relative;">
|
<view class="timeAddress" style="position: relative;">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" mode="">
|
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" mode="">
|
||||||
</image>
|
</image>
|
||||||
<view style="font-size: 26rpx;color:#333;">{{ companyitem.missionCompanyName }}</view>
|
<view style="font-size: 26rpx;color:#333;">{{ companyitem.missionCompanyName }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view v-if="near">
|
<!-- <view v-if="near">
|
||||||
{{ companyitem.distanceStr }}km
|
{{ companyitem.distanceStr }}km
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
{{ getCity(companyitem.cityId) }}
|
{{ getCity(companyitem.cityId) }}
|
||||||
</view> -->
|
</view> -->
|
||||||
<view style="display: flex;align-items: center;position:absolute;right:0;">
|
<view style="display: flex;align-items: center;position:absolute;right:0;">
|
||||||
<image src="../../static/img/location_new.png" style="width: 30rpx;height: 30rpx;" mode=""></image>
|
<image src="../../static/img/location_new.png" style="width: 30rpx;height: 30rpx;" mode=""></image>
|
||||||
<view>--km</view>
|
<view>{{distance(companyitem)}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="comment" v-if='comment' @tap.stop="goComment(companyitem.missionNo)">
|
<view class="comment" v-if='comment' @tap.stop="goComment(companyitem.missionNo)">
|
||||||
<view class="comment_content commentimg" v-if='companyitem.scoreAll > 0'>
|
<view class="comment_content commentimg" v-if='companyitem.scoreAll > 0'>
|
||||||
<image class="commentimg_image" src="../../static/img/star.full.svg"
|
<image class="commentimg_image" src="../../static/img/star.full.svg"
|
||||||
v-for="index1 in companyitem.scoreAll" mode="" :key="index1"></image>
|
v-for="index1 in companyitem.scoreAll" mode="" :key="index1"></image>
|
||||||
<image class="commentimg_image" src="../../static/img/star.empty.svg"
|
<image class="commentimg_image" src="../../static/img/star.empty.svg"
|
||||||
v-for="index2 in (5 - companyitem.scoreAll)" mode="" :key="index2"></image>
|
v-for="index2 in (5 - companyitem.scoreAll)" mode="" :key="index2"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="comment_content allName gocomment" v-else>
|
<view class="comment_content allName gocomment" v-else>
|
||||||
评价
|
评价
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
toDoller,
|
toDoller,
|
||||||
dateFormat
|
dateFormat
|
||||||
} from "../../untils/format.js";
|
} from "../../untils/format.js";
|
||||||
import dictionary from '@/common/textdata.js';
|
import dictionary from '@/common/textdata.js';
|
||||||
|
import {
|
||||||
export default {
|
addZeroPrefix,
|
||||||
beforeCreate: function() {},
|
getDistanceFromLatLonInKm
|
||||||
props: {
|
} from '@/untils/tools.js'
|
||||||
companyitem: {
|
export default {
|
||||||
type: Object,
|
beforeCreate: function() {},
|
||||||
default () {
|
props: {
|
||||||
return []
|
companyitem: {
|
||||||
}
|
type: Object,
|
||||||
},
|
default () {
|
||||||
comment: {
|
return []
|
||||||
type: Boolean,
|
}
|
||||||
default: false
|
},
|
||||||
},
|
comment: {
|
||||||
noApply: {
|
type: Boolean,
|
||||||
type: Boolean,
|
default: false
|
||||||
default: true
|
},
|
||||||
},
|
noApply: {
|
||||||
near: {
|
type: Boolean,
|
||||||
type: Boolean,
|
default: true
|
||||||
default: false
|
},
|
||||||
}
|
near: {
|
||||||
},
|
type: Boolean,
|
||||||
data() {
|
default: false
|
||||||
return {
|
},
|
||||||
...dictionary,
|
position: {
|
||||||
string: "<div style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>" + this.companyitem
|
default: null
|
||||||
.missionTitle +
|
}
|
||||||
"</div>"
|
},
|
||||||
};
|
data() {
|
||||||
},
|
return {
|
||||||
computed: {
|
...dictionary,
|
||||||
skillNames() {
|
string: "<div style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>" + this.companyitem
|
||||||
return this.companyitem.skillNames.split(',')
|
.missionTitle +
|
||||||
}
|
"</div>"
|
||||||
},
|
};
|
||||||
methods: {
|
},
|
||||||
goComment: function(no) {
|
computed: {
|
||||||
uni.navigateTo({
|
skillNames() {
|
||||||
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
|
if (this.companyitem.skillNames) {
|
||||||
})
|
return this.companyitem.skillNames.split(',')
|
||||||
},
|
} else {
|
||||||
goInfo: function(no) {
|
return []
|
||||||
const isCan = this.noApply === false ? '0' : '1'
|
}
|
||||||
uni.navigateTo({
|
}
|
||||||
url: `/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(no)}&isCan=${isCan}`
|
},
|
||||||
})
|
methods: {
|
||||||
},
|
distance(item) {
|
||||||
getCity: function(val) {
|
const {
|
||||||
if (val) {
|
lon,
|
||||||
let areas = this.$store.getters.getAreaParents(val)
|
lat
|
||||||
if (areas.length === 3) {
|
} = item
|
||||||
return areas[0].label + '-' + areas[1].label + '-' + areas[2].label
|
if (this.position && lon) {
|
||||||
}
|
const {
|
||||||
}
|
longitude,
|
||||||
},
|
latitude
|
||||||
toDoller,
|
} = this.position
|
||||||
dateFormat
|
const {
|
||||||
}
|
m,
|
||||||
}
|
km
|
||||||
</script>
|
} = getDistanceFromLatLonInKm(lat, lon, latitude, longitude)
|
||||||
|
return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`
|
||||||
<style>
|
}
|
||||||
.commentimg_image {
|
return '--km'
|
||||||
width: 40rpx;
|
},
|
||||||
height: 40rpx;
|
goComment: function(no) {
|
||||||
}
|
uni.navigateTo({
|
||||||
|
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
|
||||||
.commentimg {
|
})
|
||||||
display: flex;
|
},
|
||||||
align-items: center;
|
goInfo: function(no) {
|
||||||
justify-content: flex-end;
|
const isCan = this.noApply === false ? '0' : '1'
|
||||||
}
|
uni.navigateTo({
|
||||||
|
url: `/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(no)}&isCan=${isCan}`
|
||||||
.gocomment {
|
})
|
||||||
font-size: 26rpx !important;
|
},
|
||||||
border-radius: 5rpx;
|
getCity: function(val) {
|
||||||
border: 1rpx solid #c3c3c3;
|
if (val) {
|
||||||
width: 160rpx;
|
let areas = this.$store.getters.getAreaParents(val)
|
||||||
text-align: center;
|
if (areas.length === 3) {
|
||||||
float: right;
|
return areas[0].label + '-' + areas[1].label + '-' + areas[2].label
|
||||||
height: 50rpx;
|
}
|
||||||
line-height: 50rpx;
|
}
|
||||||
}
|
},
|
||||||
|
toDoller,
|
||||||
.timeAddress {
|
dateFormat
|
||||||
display: flex;
|
}
|
||||||
align-items: center;
|
}
|
||||||
justify-content: space-between;
|
</script>
|
||||||
font-family: PingFangSC-Regular;
|
|
||||||
font-size: 24rpx;
|
<style>
|
||||||
color: #999999;
|
.commentimg_image {
|
||||||
margin: 10rpx 0;
|
width: 40rpx;
|
||||||
padding: 10rpx 0;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.allName {
|
.commentimg {
|
||||||
font-family: PingFangSC-Regular;
|
display: flex;
|
||||||
font-size: 28rpx;
|
align-items: center;
|
||||||
color: #666666;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.askList {
|
.gocomment {
|
||||||
/* width: 14%; */
|
font-size: 26rpx !important;
|
||||||
font-family: PingFangSC-Regular;
|
border-radius: 5rpx;
|
||||||
font-size: 24rpx;
|
border: 1rpx solid #c3c3c3;
|
||||||
color: #666666;
|
width: 160rpx;
|
||||||
background-color: #f6f6f6;
|
text-align: center;
|
||||||
padding: 5rpx 15rpx;
|
float: right;
|
||||||
margin-right: 10rpx;
|
height: 50rpx;
|
||||||
margin-bottom: 10rpx;
|
line-height: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ask {
|
.timeAddress {
|
||||||
overflow: hidden;
|
display: flex;
|
||||||
width: 100%;
|
align-items: center;
|
||||||
display: flex;
|
justify-content: space-between;
|
||||||
align-items: center;
|
font-family: PingFangSC-Regular;
|
||||||
flex-wrap: wrap;
|
font-size: 24rpx;
|
||||||
justify-content: flex-start;
|
color: #999999;
|
||||||
margin: 20rpx 0;
|
margin: 10rpx 0;
|
||||||
}
|
padding: 10rpx 0;
|
||||||
|
}
|
||||||
.head_right {
|
|
||||||
ont-family: PingFangSC-Medium;
|
.allName {
|
||||||
font-size: 28rpx;
|
font-family: PingFangSC-Regular;
|
||||||
color: #F46161;
|
font-size: 28rpx;
|
||||||
font-weight: bold;
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head_left {
|
.askList {
|
||||||
font-family: PingFangSC-Medium;
|
/* width: 14%; */
|
||||||
font-size: 32rpx;
|
font-family: PingFangSC-Regular;
|
||||||
font-weight: bold;
|
font-size: 24rpx;
|
||||||
color: #333333;
|
color: #666666;
|
||||||
width: 350rpx;
|
background-color: #f6f6f6;
|
||||||
overflow: hidden;
|
padding: 5rpx 15rpx;
|
||||||
white-space: nowrap;
|
margin-right: 10rpx;
|
||||||
/*不换行*/
|
margin-bottom: 10rpx;
|
||||||
text-overflow: ellipsis;
|
}
|
||||||
/*超出部分文字以...显示*/
|
|
||||||
}
|
.ask {
|
||||||
|
overflow: hidden;
|
||||||
.highlight {
|
width: 100%;
|
||||||
color: #F46161;
|
display: flex;
|
||||||
}
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
.body {
|
justify-content: flex-start;
|
||||||
width: 690rpx;
|
margin: 20rpx 0;
|
||||||
margin: 0rpx auto;
|
}
|
||||||
background-color: #fefefe;
|
|
||||||
overflow: hidden;
|
.head_right {
|
||||||
box-sizing: border-box;
|
ont-family: PingFangSC-Medium;
|
||||||
padding: 20rpx;
|
font-size: 28rpx;
|
||||||
padding-bottom: 0;
|
color: #F46161;
|
||||||
border-radius: 20rpx;
|
font-weight: bold;
|
||||||
margin-top: 20rpx;
|
}
|
||||||
}
|
|
||||||
|
.head_left {
|
||||||
.heads {
|
font-family: PingFangSC-Medium;
|
||||||
display: flex;
|
font-size: 32rpx;
|
||||||
align-items: center;
|
font-weight: bold;
|
||||||
justify-content: space-between;
|
color: #333333;
|
||||||
}
|
width: 350rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
/*不换行*/
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/*超出部分文字以...显示*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
color: #F46161;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
width: 690rpx;
|
||||||
|
margin: 0rpx auto;
|
||||||
|
background-color: #fefefe;
|
||||||
|
overflow: hidden;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20rpx;
|
||||||
|
padding-bottom: 0;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heads {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,234 +1,259 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="body" @click="goInfo(companyitem.id)">
|
<view class="body" @click="goInfo(companyitem.id)">
|
||||||
<view class="heads">
|
<view class="heads">
|
||||||
<view class="head_left">
|
<view class="head_left">
|
||||||
<rich-text :nodes="string">
|
<rich-text :nodes="string">
|
||||||
</rich-text>
|
</rich-text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="head_right">
|
<view class="head_right">
|
||||||
{{ companyitem.wage }}{{ wageUnit[companyitem.wageUnitCategory] }}
|
{{ companyitem.wage }}{{ wageUnit[companyitem.wageUnitCategory] }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ask">
|
<view class="ask">
|
||||||
<view class="askList">
|
<view class="askList">
|
||||||
{{ companyitem.tradeNames }}
|
{{ companyitem.tradeNames }}
|
||||||
</view>
|
</view>
|
||||||
<view class="askList" v-for="(item, index) in skillNames" :key="index">
|
<view class="askList" v-for="(item, index) in skillNames" :key="index">
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="allName">
|
<!-- <view class="allName">
|
||||||
{{ companyitem.jobCompanyName }}
|
{{ companyitem.jobCompanyName }}
|
||||||
</view> -->
|
</view> -->
|
||||||
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
|
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
|
||||||
<view class="timeAddress" style="position: relative;">
|
<view class="timeAddress" style="position: relative;">
|
||||||
<!-- <view v-if="companyitem.missionCompanyName">
|
<!-- <view v-if="companyitem.missionCompanyName">
|
||||||
{{ companyitem.missionCompanyName }}
|
{{ companyitem.missionCompanyName }}
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- <view>
|
<!-- <view>
|
||||||
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
|
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
|
||||||
{{ companyitem.jobCompanyName }}
|
{{ companyitem.jobCompanyName }}
|
||||||
</view> -->
|
</view> -->
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" mode="">
|
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" mode="">
|
||||||
</image>
|
</image>
|
||||||
<view style="font-size: 26rpx;color:#333;">{{ companyitem.jobCompanyName }}</view>
|
<view style="font-size: 26rpx;color:#333;">{{ companyitem.jobCompanyName }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view v-if="near">
|
<!-- <view v-if="near">
|
||||||
{{ companyitem.distanceStr }}km
|
{{ companyitem.distanceStr }}km
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
{{ getCity(companyitem.cityId) }}
|
{{ getCity(companyitem.cityId) }}
|
||||||
</view> -->
|
</view> -->
|
||||||
<view style="display: flex;align-items: center;position:absolute;right:0;">
|
<view style="display: flex;align-items: center;position:absolute;right:0;">
|
||||||
<image src="../../static/img/location_new.png" style="width: 30rpx;height: 30rpx;" mode=""></image>
|
<image src="../../static/img/location_new.png" style="width: 30rpx;height: 30rpx;" mode=""></image>
|
||||||
<view>--km</view>
|
<view>{{distance(companyitem)}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="comment" v-if='comment' @tap.stop="goComment(companyitem.missionNo)">
|
<view class="comment" v-if='comment' @tap.stop="goComment(companyitem.missionNo)">
|
||||||
<view class="comment_content commentimg" v-if='companyitem.scoreAll > 0'>
|
<view class="comment_content commentimg" v-if='companyitem.scoreAll > 0'>
|
||||||
<image class="commentimg_image" src="../../static/img/star.full.svg"
|
<image class="commentimg_image" src="../../static/img/star.full.svg"
|
||||||
v-for="index1 in companyitem.scoreAll" mode="" :key="index1"></image>
|
v-for="index1 in companyitem.scoreAll" mode="" :key="index1"></image>
|
||||||
<image class="commentimg_image" src="../../static/img/star.empty.svg"
|
<image class="commentimg_image" src="../../static/img/star.empty.svg"
|
||||||
v-for="index2 in (5 - companyitem.scoreAll)" mode="" :key="index2"></image>
|
v-for="index2 in (5 - companyitem.scoreAll)" mode="" :key="index2"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="comment_content allName gocomment" v-else>
|
<view class="comment_content allName gocomment" v-else>
|
||||||
评价
|
评价
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
toDoller,
|
toDoller,
|
||||||
dateFormat
|
dateFormat
|
||||||
} from "../../untils/format.js";
|
} from "../../untils/format.js";
|
||||||
import dictionary from '@/common/textdata.js';
|
import dictionary from '@/common/textdata.js';
|
||||||
|
import {
|
||||||
export default {
|
addZeroPrefix,
|
||||||
beforeCreate: function() {},
|
getDistanceFromLatLonInKm
|
||||||
props: {
|
} from '@/untils/tools.js'
|
||||||
companyitem: {
|
export default {
|
||||||
type: Object,
|
beforeCreate: function() {},
|
||||||
default () {
|
props: {
|
||||||
return []
|
companyitem: {
|
||||||
}
|
type: Object,
|
||||||
},
|
default () {
|
||||||
comment: {
|
return []
|
||||||
type: Boolean,
|
}
|
||||||
default: false
|
},
|
||||||
},
|
comment: {
|
||||||
noApply: {
|
type: Boolean,
|
||||||
type: Boolean,
|
default: false
|
||||||
default: true
|
},
|
||||||
},
|
noApply: {
|
||||||
near: {
|
type: Boolean,
|
||||||
type: Boolean,
|
default: true
|
||||||
default: false
|
},
|
||||||
}
|
near: {
|
||||||
},
|
type: Boolean,
|
||||||
data() {
|
default: false
|
||||||
return {
|
}
|
||||||
...dictionary,
|
},
|
||||||
string: "<div style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>" + this.companyitem
|
data() {
|
||||||
.jobName +
|
return {
|
||||||
"</div>"
|
...dictionary,
|
||||||
};
|
string: "<div style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>" + this.companyitem
|
||||||
},
|
.jobName +
|
||||||
computed: {
|
"</div>"
|
||||||
skillNames() {
|
};
|
||||||
return this.companyitem.skillNames.split(',')
|
},
|
||||||
}
|
computed: {
|
||||||
},
|
skillNames() {
|
||||||
methods: {
|
if (this.companyitem.skillNames) {
|
||||||
goComment: function(no) {
|
return this.companyitem.skillNames.split(',')
|
||||||
uni.navigateTo({
|
} else {
|
||||||
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
|
return []
|
||||||
})
|
}
|
||||||
},
|
}
|
||||||
goInfo: function(no) {
|
},
|
||||||
console.log('11111')
|
methods: {
|
||||||
const isCan = this.noApply === false ? '0' : '1'
|
distance(item) {
|
||||||
uni.navigateTo({
|
const {
|
||||||
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=${isCan}`
|
lon,
|
||||||
})
|
lat
|
||||||
},
|
} = item
|
||||||
getCity: function(val) {
|
if (this.position && lon) {
|
||||||
if (val) {
|
const {
|
||||||
let areas = this.$store.getters.getAreaParents(val)
|
longitude,
|
||||||
if (areas.length === 3) {
|
latitude
|
||||||
return areas[0].label + '-' + areas[1].label + '-' + areas[2].label
|
} = this.position
|
||||||
}
|
const {
|
||||||
}
|
m,
|
||||||
},
|
km
|
||||||
toDoller,
|
} = getDistanceFromLatLonInKm(lat, lon, latitude, longitude)
|
||||||
dateFormat
|
return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`
|
||||||
}
|
}
|
||||||
}
|
return '--km'
|
||||||
</script>
|
},
|
||||||
|
goComment: function(no) {
|
||||||
<style>
|
uni.navigateTo({
|
||||||
.commentimg_image {
|
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
|
||||||
width: 40rpx;
|
})
|
||||||
height: 40rpx;
|
},
|
||||||
}
|
goInfo: function(no) {
|
||||||
|
console.log('11111')
|
||||||
.commentimg {
|
const isCan = this.noApply === false ? '0' : '1'
|
||||||
display: flex;
|
uni.navigateTo({
|
||||||
align-items: center;
|
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=${isCan}`
|
||||||
justify-content: flex-end;
|
})
|
||||||
}
|
},
|
||||||
|
getCity: function(val) {
|
||||||
.gocomment {
|
if (val) {
|
||||||
font-size: 26rpx !important;
|
let areas = this.$store.getters.getAreaParents(val)
|
||||||
border-radius: 5rpx;
|
if (areas.length === 3) {
|
||||||
border: 1rpx solid #c3c3c3;
|
return areas[0].label + '-' + areas[1].label + '-' + areas[2].label
|
||||||
width: 160rpx;
|
}
|
||||||
text-align: center;
|
}
|
||||||
float: right;
|
},
|
||||||
height: 50rpx;
|
toDoller,
|
||||||
line-height: 50rpx;
|
dateFormat
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.timeAddress {
|
</script>
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
<style>
|
||||||
justify-content: space-between;
|
.commentimg_image {
|
||||||
font-family: PingFangSC-Regular;
|
width: 40rpx;
|
||||||
font-size: 24rpx;
|
height: 40rpx;
|
||||||
color: #999999;
|
}
|
||||||
margin: 10rpx 0;
|
|
||||||
padding: 10rpx 0;
|
.commentimg {
|
||||||
}
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
.allName {
|
justify-content: flex-end;
|
||||||
font-family: PingFangSC-Regular;
|
}
|
||||||
font-size: 28rpx;
|
|
||||||
color: #666666;
|
.gocomment {
|
||||||
}
|
font-size: 26rpx !important;
|
||||||
|
border-radius: 5rpx;
|
||||||
.askList {
|
border: 1rpx solid #c3c3c3;
|
||||||
/* width: 14%; */
|
width: 160rpx;
|
||||||
font-family: PingFangSC-Regular;
|
text-align: center;
|
||||||
font-size: 24rpx;
|
float: right;
|
||||||
color: #666666;
|
height: 50rpx;
|
||||||
background-color: #f6f6f6;
|
line-height: 50rpx;
|
||||||
padding: 5rpx 15rpx;
|
}
|
||||||
margin-right: 10rpx;
|
|
||||||
margin-bottom: 10rpx;
|
.timeAddress {
|
||||||
}
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
.ask {
|
justify-content: space-between;
|
||||||
overflow: hidden;
|
font-family: PingFangSC-Regular;
|
||||||
width: 100%;
|
font-size: 24rpx;
|
||||||
display: flex;
|
color: #999999;
|
||||||
align-items: center;
|
margin: 10rpx 0;
|
||||||
flex-wrap: wrap;
|
padding: 10rpx 0;
|
||||||
justify-content: flex-start;
|
}
|
||||||
margin: 20rpx 0;
|
|
||||||
}
|
.allName {
|
||||||
|
font-family: PingFangSC-Regular;
|
||||||
.head_right {
|
font-size: 28rpx;
|
||||||
ont-family: PingFangSC-Medium;
|
color: #666666;
|
||||||
font-size: 28rpx;
|
}
|
||||||
color: #F46161;
|
|
||||||
font-weight: bold;
|
.askList {
|
||||||
}
|
/* width: 14%; */
|
||||||
|
font-family: PingFangSC-Regular;
|
||||||
.head_left {
|
font-size: 24rpx;
|
||||||
font-family: PingFangSC-Medium;
|
color: #666666;
|
||||||
font-size: 32rpx;
|
background-color: #f6f6f6;
|
||||||
font-weight: bold;
|
padding: 5rpx 15rpx;
|
||||||
color: #333333;
|
margin-right: 10rpx;
|
||||||
width: 350rpx;
|
margin-bottom: 10rpx;
|
||||||
overflow: hidden;
|
}
|
||||||
white-space: nowrap;
|
|
||||||
/*不换行*/
|
.ask {
|
||||||
text-overflow: ellipsis;
|
overflow: hidden;
|
||||||
/*超出部分文字以...显示*/
|
width: 100%;
|
||||||
}
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
.highlight {
|
flex-wrap: wrap;
|
||||||
color: #F46161;
|
justify-content: flex-start;
|
||||||
}
|
margin: 20rpx 0;
|
||||||
|
}
|
||||||
.body {
|
|
||||||
width: 690rpx;
|
.head_right {
|
||||||
margin: 0rpx auto;
|
ont-family: PingFangSC-Medium;
|
||||||
background-color: #fefefe;
|
font-size: 28rpx;
|
||||||
overflow: hidden;
|
color: #F46161;
|
||||||
box-sizing: border-box;
|
font-weight: bold;
|
||||||
padding: 20rpx;
|
}
|
||||||
padding-bottom: 0;
|
|
||||||
border-radius: 20rpx;
|
.head_left {
|
||||||
margin-top: 20rpx;
|
font-family: PingFangSC-Medium;
|
||||||
}
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
.heads {
|
color: #333333;
|
||||||
display: flex;
|
width: 350rpx;
|
||||||
align-items: center;
|
overflow: hidden;
|
||||||
justify-content: space-between;
|
white-space: nowrap;
|
||||||
}
|
/*不换行*/
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/*超出部分文字以...显示*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
color: #F46161;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
width: 690rpx;
|
||||||
|
margin: 0rpx auto;
|
||||||
|
background-color: #fefefe;
|
||||||
|
overflow: hidden;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20rpx;
|
||||||
|
padding-bottom: 0;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heads {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,292 +1,292 @@
|
|||||||
<template>
|
<template>
|
||||||
<view style="background-color: #fefefe;">
|
<view style="background-color: #fefefe;">
|
||||||
<view class="titles">
|
<view class="titles">
|
||||||
添加职业技能
|
添加职业技能
|
||||||
</view>
|
</view>
|
||||||
<view class="slo">
|
<view class="slo">
|
||||||
添加职业技能,获得个性化的职位推荐
|
添加职业技能,获得个性化的职位推荐
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="jobcontent" @click="goAddind">
|
<!-- <view class="jobcontent" @click="goAddind">
|
||||||
<view class="jobinfo">
|
<view class="jobinfo">
|
||||||
<view class="jobAddress">
|
<view class="jobAddress">
|
||||||
我所属的行业
|
我所属的行业
|
||||||
</view>
|
</view>
|
||||||
<view v-if="tradeName" class="jobText">{{ tradeName }}</view>
|
<view v-if="tradeName" class="jobText">{{ tradeName }}</view>
|
||||||
<view v-else class="jobText nochoose">请选择</view>
|
<view v-else class="jobText nochoose">请选择</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="../../../static/img/right.svg" mode=""></image>
|
<image src="../../../static/img/right.svg" mode=""></image>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="border"></view>
|
<view class="border"></view>
|
||||||
<view class="jobcontent" @click="skill">
|
<view class="jobcontent" @click="skill">
|
||||||
<view class="jobinfo">
|
<view class="jobinfo">
|
||||||
<view class="jobAddress">
|
<view class="jobAddress">
|
||||||
零工工种
|
第一技能
|
||||||
</view>
|
</view>
|
||||||
<view v-if="worktypesName" class="jobText">{{ worktypesName }}</view>
|
<view v-if="worktypesName" class="jobText">{{ worktypesName }}</view>
|
||||||
<view v-else class="jobText nochoose">请选择</view>
|
<view v-else class="jobText nochoose">请选择</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="../../../static/img/right.svg" mode=""></image>
|
<image src="../../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="border"></view>
|
<view class="border"></view>
|
||||||
<view class="jobcontent" @click="skillLevel">
|
<view class="jobcontent" @click="skillLevel">
|
||||||
<view class="jobinfo">
|
<view class="jobinfo">
|
||||||
<view class="jobAddress">
|
<view class="jobAddress">
|
||||||
岗位工种
|
第二技能
|
||||||
</view>
|
</view>
|
||||||
<view v-if="skillsName" class="jobText">{{ skillsName }}</view>
|
<view v-if="skillsName" class="jobText">{{ skillsName }}</view>
|
||||||
<view v-else class="jobText nochoose">请选择</view>
|
<view v-else class="jobText nochoose">请选择</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="../../../static/img/right.svg" mode=""></image>
|
<image src="../../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="border"></view>
|
<view class="border"></view>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<view v-if="skillsName" class="bottombtn" @click="submit">确定</view>
|
<view v-if="skillsName" class="bottombtn" @click="submit">确定</view>
|
||||||
<view v-else class="bottombtn disabledBtn">确定</view>
|
<view v-else class="bottombtn disabledBtn">确定</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
addSkills
|
addSkills
|
||||||
} from '@/api/resume.js'
|
} from '@/api/resume.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tradeId: '',
|
tradeId: '',
|
||||||
tradeName: '',
|
tradeName: '',
|
||||||
worktypesId: '',
|
worktypesId: '',
|
||||||
worktypesName: '',
|
worktypesName: '',
|
||||||
skillsId: '',
|
skillsId: '',
|
||||||
skillsName: '',
|
skillsName: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(query) {
|
onLoad(query) {
|
||||||
uni.$off('setInd')
|
uni.$off('setInd')
|
||||||
uni.$on('setInd', ({
|
uni.$on('setInd', ({
|
||||||
id,
|
id,
|
||||||
name
|
name
|
||||||
}) => {
|
}) => {
|
||||||
this.tradeId = id
|
this.tradeId = id
|
||||||
this.tradeName = name
|
this.tradeName = name
|
||||||
this.worktypesId = ''
|
this.worktypesId = ''
|
||||||
this.worktypesName = ''
|
this.worktypesName = ''
|
||||||
this.skillsId = ''
|
this.skillsId = ''
|
||||||
this.skillsName = ''
|
this.skillsName = ''
|
||||||
})
|
})
|
||||||
uni.$off('setworkTypes')
|
uni.$off('setworkTypes')
|
||||||
uni.$on('setworkTypes', ({
|
uni.$on('setworkTypes', ({
|
||||||
detail
|
detail
|
||||||
}) => {
|
}) => {
|
||||||
console.log(detail, "id,name");
|
console.log(detail, "id,name");
|
||||||
// this.worktypesId = id
|
// this.worktypesId = id
|
||||||
this.worktypesName = detail.parentLabel + "-" + detail.label
|
this.worktypesName = detail.parentLabel + "-" + detail.label
|
||||||
// this.skillsId = ''
|
// this.skillsId = ''
|
||||||
// this.skillsName = ''
|
// this.skillsName = ''
|
||||||
})
|
})
|
||||||
uni.$off('setSkill')
|
uni.$off('setSkill')
|
||||||
uni.$on('setSkill', ({
|
uni.$on('setSkill', ({
|
||||||
detail
|
detail
|
||||||
}) => {
|
}) => {
|
||||||
console.log('detail,', detail)
|
console.log('detail,', detail)
|
||||||
// this.skillsId = id
|
// this.skillsId = id
|
||||||
this.skillsName = `${detail.parentLabel}-${detail.parentTwoLabel}-${detail.label}`
|
this.skillsName = `${detail.parentLabel}-${detail.parentTwoLabel}-${detail.label}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goAddind: function () {
|
goAddind: function() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: './addInd?id=' + this.tradeId
|
url: './addInd?id=' + this.tradeId
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
skill: function () {
|
skill: function() {
|
||||||
// if (this.tradeId) {
|
// if (this.tradeId) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `./skill?id=${this.worktypesId}&tradeId=${this.tradeId}&maxLayer=2&type=1`
|
url: `./skill?id=${this.worktypesId}&tradeId=${this.tradeId}&maxLayer=2&type=1`
|
||||||
})
|
})
|
||||||
// } else {
|
// } else {
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title: '请先选择从事的行业',
|
// title: '请先选择从事的行业',
|
||||||
// icon: 'none'
|
// icon: 'none'
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
skillLevel: function () {
|
skillLevel: function() {
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `./skillLevel?id=${this.skillsId}&worktypesId=${this.worktypesId}&maxLayer=3&type=2`
|
url: `./skillLevel?id=${this.skillsId}&worktypesId=${this.worktypesId}&maxLayer=3&type=2`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit: async function () {
|
submit: async function() {
|
||||||
// console.log(this.tradeName, this.worktypesName, this.skillsName);
|
// console.log(this.tradeName, this.worktypesName, this.skillsName);
|
||||||
let result = this.worktypesName.split('-');
|
let result = this.worktypesName.split('-');
|
||||||
let result1 = this.skillsName.split('-');
|
let result1 = this.skillsName.split('-');
|
||||||
|
|
||||||
// 工种
|
// 工种
|
||||||
await addSkills(this.tradeName, result[0], result[1], 0)
|
await addSkills(this.tradeName, result[0], result[1], 0)
|
||||||
// 岗位
|
// 岗位
|
||||||
await addSkills(this.tradeName, `${result1[0]}、${result1[1]}`, result1[2], 1)
|
await addSkills(this.tradeName, `${result1[0]}、${result1[1]}`, result1[2], 1)
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.slo {
|
.slo {
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.titles {
|
.titles {
|
||||||
font-family: PingFangSC-Medium;
|
font-family: PingFangSC-Medium;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
padding-top: 30rpx;
|
padding-top: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.border {
|
.border {
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
width: 720rpx;
|
width: 720rpx;
|
||||||
border-bottom: 2rpx solid #ddd;
|
border-bottom: 2rpx solid #ddd;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jobText {
|
.jobText {
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nochoose {
|
.nochoose {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jobAddress {
|
.jobAddress {
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jobcontent {
|
.jobcontent {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
|
|
||||||
background: #fefefe;
|
background: #fefefe;
|
||||||
display: flex;
|
display: flex;
|
||||||
/* align-items: center; */
|
/* align-items: center; */
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
line-height: 63rpx;
|
line-height: 63rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jobcontent image {
|
.jobcontent image {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.listBody {}
|
.listBody {}
|
||||||
|
|
||||||
.list_text {
|
.list_text {
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list image {
|
.list image {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
height: 126rpx;
|
height: 126rpx;
|
||||||
background: #fefefe;
|
background: #fefefe;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title image {
|
.title image {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 10rpx 30rpx;
|
padding: 10rpx 30rpx;
|
||||||
background-color: #fefefe;
|
background-color: #fefefe;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.userInfo {
|
.userInfo {
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
font-family: PingFangSC-Medium;
|
font-family: PingFangSC-Medium;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head image:last-child {
|
.head image:last-child {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head image {
|
.head image {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head {
|
.head {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
background-color: #fefefe;
|
background-color: #fefefe;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottombtn {
|
.bottombtn {
|
||||||
background-color: #1b66ff;
|
background-color: #1b66ff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
font-family: PingFangSC-Medium;
|
font-family: PingFangSC-Medium;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
background-color: #fefefe;
|
background-color: #fefefe;
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
padding-bottom: 80rpx;
|
padding-bottom: 80rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disabledBtn {
|
.disabledBtn {
|
||||||
background-color: #c8c9cc;
|
background-color: #c8c9cc;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<block v-if="activeTab == 0">
|
<block v-if="activeTab == 0">
|
||||||
<view v-if="newList.length > 0" style="padding-bottom: 20rpx;">
|
<view v-if="newList.length > 0" style="padding-bottom: 20rpx;">
|
||||||
<block v-for="(item, index) in newList" :key="index">
|
<block v-for="(item, index) in newList" :key="index">
|
||||||
<companyList :companyitem="item"></companyList>
|
<companyList :companyitem="item" :position="userLocation"></companyList>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
@@ -125,7 +125,9 @@
|
|||||||
getcoder
|
getcoder
|
||||||
} from "@/api/map.js";
|
} from "@/api/map.js";
|
||||||
import verticalMenu from '@/components/vertical-menu/vertical-menu.vue';
|
import verticalMenu from '@/components/vertical-menu/vertical-menu.vue';
|
||||||
|
import {
|
||||||
|
mapGetters
|
||||||
|
} from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
vTabs,
|
vTabs,
|
||||||
@@ -134,7 +136,9 @@
|
|||||||
workList,
|
workList,
|
||||||
userrecruitList
|
userrecruitList
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['userLocation']),
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
policyContentList: [],
|
policyContentList: [],
|
||||||
@@ -180,6 +184,7 @@
|
|||||||
},
|
},
|
||||||
onLoad: function() {
|
onLoad: function() {
|
||||||
this.getData()
|
this.getData()
|
||||||
|
console.log('userLocation', this.userLocation)
|
||||||
// this.getPolicy()
|
// this.getPolicy()
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
@@ -398,7 +403,8 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.activeTab === 2) {
|
if (this.activeTab === 2) {
|
||||||
if (this.policyPage.current <= Math.ceil(this.policyPage.total / this.policyPage.size)) {
|
if (this.policyPage.current <= Math.ceil(this.policyPage.total / this.policyPage
|
||||||
|
.size)) {
|
||||||
if (this.isSearch) {
|
if (this.isSearch) {
|
||||||
this.getPolicySearch()
|
this.getPolicySearch()
|
||||||
} else {
|
} else {
|
||||||
@@ -527,7 +533,8 @@
|
|||||||
this.policyPage.current += 1;
|
this.policyPage.current += 1;
|
||||||
this.policyPage.total = res.data.data.total;
|
this.policyPage.total = res.data.data.total;
|
||||||
if (res.data.data && res.data.data.records.length) {
|
if (res.data.data && res.data.data.records.length) {
|
||||||
this.policyContentList = this.policyContentList.concat(res.data.data.records);
|
this.policyContentList = this.policyContentList.concat(res.data.data
|
||||||
|
.records);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
const getters = {
|
const getters = {
|
||||||
language: state => state.common.language,
|
language: state => state.common.language,
|
||||||
website: state => state.common.website,
|
website: state => state.common.website,
|
||||||
userInfo: state => state.user.userInfo,
|
userInfo: state => state.user.userInfo,
|
||||||
userChecked:state=>state.user.userChecked,
|
userChecked: state => state.user.userChecked,
|
||||||
area: state => state.area,
|
area: state => state.area,
|
||||||
news: state=> state.news,
|
news: state => state.news,
|
||||||
auth: state => state.auth,
|
auth: state => state.auth,
|
||||||
authPass: (state,getters) => getters.auth.laborState && getters.auth.realNameState && getters.auth.bankCardState && getters.auth.insureState,
|
authPass: (state, getters) => getters.auth.laborState && getters.auth.realNameState && getters.auth
|
||||||
authInfo: state => state.auth.authInfo,
|
.bankCardState && getters.auth.insureState,
|
||||||
face: state => state.face,
|
authInfo: state => state.auth.authInfo,
|
||||||
realName: state => state.authentication.realName,
|
face: state => state.face,
|
||||||
bankCard: state => state.authentication.bankCard,
|
realName: state => state.authentication.realName,
|
||||||
autograph: state => state.authentication.autograph,
|
bankCard: state => state.authentication.bankCard,
|
||||||
sendTimes:state => state.user.sendTimes,//接收短信的次数
|
autograph: state => state.authentication.autograph,
|
||||||
}
|
sendTimes: state => state.user.sendTimes, //接收短信的次数
|
||||||
|
userLocation: state => state.user.userLocation, //用户位置
|
||||||
export default getters
|
}
|
||||||
|
|
||||||
|
export default getters
|
||||||
@@ -64,8 +64,36 @@ const user = {
|
|||||||
seeEnterprise: getStore({ //用户发送短信次数
|
seeEnterprise: getStore({ //用户发送短信次数
|
||||||
name: 'enterprise'
|
name: 'enterprise'
|
||||||
}) || 0, // 0 个体招工 ; 企业招工
|
}) || 0, // 0 个体招工 ; 企业招工
|
||||||
|
userLocation: null
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
getUserLocation({
|
||||||
|
commit,
|
||||||
|
dispatch
|
||||||
|
}) {
|
||||||
|
console.log('getUserLocation null1')
|
||||||
|
commit('setLocation', {
|
||||||
|
latitude: 31.133980,
|
||||||
|
longitude: 104.404419,
|
||||||
|
})
|
||||||
|
// uni.getLocation({
|
||||||
|
// type: 'gcj02',
|
||||||
|
// success: function(res) {
|
||||||
|
// const {
|
||||||
|
// longitude,
|
||||||
|
// latitude
|
||||||
|
// } = res
|
||||||
|
// commit('setLocation', {
|
||||||
|
// longitude,
|
||||||
|
// latitude
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// fail: function(err) {
|
||||||
|
// commit('setLocation', null)
|
||||||
|
// },
|
||||||
|
// complete: function(e) {}
|
||||||
|
// })
|
||||||
|
},
|
||||||
//用户点击radio按钮
|
//用户点击radio按钮
|
||||||
UserCheckedBtn({
|
UserCheckedBtn({
|
||||||
commit
|
commit
|
||||||
@@ -186,6 +214,9 @@ const user = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
setLocation(state, val) {
|
||||||
|
state.userLocation = val
|
||||||
|
},
|
||||||
setEnterprise(state, val) { // 0 个体招工 ; 企业招工
|
setEnterprise(state, val) { // 0 个体招工 ; 企业招工
|
||||||
state.seeEnterprise = val;
|
state.seeEnterprise = val;
|
||||||
setStore({
|
setStore({
|
||||||
|
|||||||
Reference in New Issue
Block a user