7 Commits

Author SHA1 Message Date
史典卓
1cd5363723 flat:暂存 2025-08-05 18:28:07 +08:00
史典卓
e698f0624f flat: yic 2025-05-06 16:13:25 +08:00
史典卓
23284483c4 flat: 赞存 2025-03-26 09:54:42 +08:00
史典卓
5e3a853a2a flat:暂存 2024-11-14 17:29:54 +08:00
史典卓
7845b6333c flat: 地图 2024-10-24 14:42:47 +08:00
Apcallover
ba14872e89 flat:登录调用顺序 2024-07-24 14:45:29 +08:00
Apcallover
23aaa5a4ab flat:管陶县 2024-07-17 15:49:00 +08:00
50 changed files with 8405 additions and 7141 deletions

View File

@@ -16,11 +16,7 @@
export default { export default {
onLaunch: function(options) { onLaunch: function(options) {
this.$store.dispatch('InitArea') this.$store.dispatch('InitArea')
if (options.query.token) { if (this.$store.state.user.token) {
uni.reLaunch({
url: '/pages/login/blank?token=' + options.query.token
})
} else if (this.$store.state.user.token) {
this.$store.dispatch('startRefreshTokenTimer') this.$store.dispatch('startRefreshTokenTimer')
this.$store.dispatch('startRefreshNewsTimer') this.$store.dispatch('startRefreshNewsTimer')
this.$store.dispatch('refreshAuthState') this.$store.dispatch('refreshAuthState')

View File

@@ -33,8 +33,13 @@ export async function uploadFile(file) {
'Authorization': `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`, 'Authorization': `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
} }
header[website.tokenName] = "bearer " + token header[website.tokenName] = "bearer " + token
// 馆陶替换url
let url = `/api/jobslink-api/resource/file/save?bussinessType=5`
if (url.startsWith('/api')) {
url = url.replace(/^\/api/, '/api/gt');
}
uni.uploadFile({ uni.uploadFile({
url: `${baseUrl}/api/jobslink-api/resource/file/save?bussinessType=5`, url: baseUrl + url,
header, header,
filePath: file.url, filePath: file.url,
// formData: formdata, // formData: formdata,

View File

@@ -367,36 +367,40 @@ const workwageUnitCategoryState = [
const addressColumn = [ const addressColumn = [
[{ [{
value: '95', value: '4',
label: "绵竹市" label: "馆陶县"
}, },
{ {
value: '185', value: '5',
label: "广汉市" label: "馆陶镇"
}, },
{ {
value: '143', value: '6',
label: "旌阳区" label: "房寨镇"
}, },
{ {
value: '150', value: '7',
label: "罗江区" label: "魏僧寨镇"
}, },
{ {
value: '42', value: '8',
label: "什邡市" label: "柴堡镇"
}, },
{ {
value: '156', value: '9',
label: "中江县" label: "寿山寺"
}, },
{ {
value: '44139628', value: '10',
label: "经济技术开发区" label: " 王桥乡"
}, },
{ {
value: '79194151', value: '11',
label: "德阳市开发区" label: "路桥乡"
},
{
value: '12',
label: "南徐村乡"
}, },
] ]
] ]

View File

@@ -34,7 +34,7 @@
</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)">
@@ -57,7 +57,10 @@
dateFormat dateFormat
} from "../../untils/format.js"; } from "../../untils/format.js";
import dictionary from '@/common/textdata.js'; import dictionary from '@/common/textdata.js';
import {
addZeroPrefix,
getDistanceFromLatLonInKm
} from '@/untils/tools.js'
export default { export default {
beforeCreate: function() {}, beforeCreate: function() {},
props: { props: {
@@ -78,6 +81,9 @@
near: { near: {
type: Boolean, type: Boolean,
default: false default: false
},
position: {
default: null
} }
}, },
data() { data() {
@@ -94,6 +100,24 @@
} }
}, },
methods: { methods: {
distance(item) {
const {
lon,
lat
} = item
if (this.position && lon > 0) {
const {
longitude,
latitude
} = this.position
const {
m,
km
} = getDistanceFromLatLonInKm(lat, lon, latitude, longitude)
return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`
}
return '--km'
},
goComment: function(no) { goComment: function(no) {
uni.navigateTo({ uni.navigateTo({
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}` url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`

View File

@@ -34,7 +34,7 @@
</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)">
@@ -60,7 +60,10 @@
import { import {
defaults defaults
} from "lodash"; } from "lodash";
import {
addZeroPrefix,
getDistanceFromLatLonInKm
} from '@/untils/tools.js'
export default { export default {
beforeCreate: function() {}, beforeCreate: function() {},
props: { props: {
@@ -81,6 +84,9 @@
near: { near: {
type: Boolean, type: Boolean,
default: false default: false
},
position: {
default: null
} }
}, },
data() { data() {
@@ -101,6 +107,24 @@
} }
}, },
methods: { methods: {
distance(item) {
const {
lon,
lat
} = item
if (this.position && lon > 0) {
const {
longitude,
latitude
} = this.position
const {
m,
km
} = getDistanceFromLatLonInKm(lat, lon, latitude, longitude)
return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`
}
return '--km'
},
goComment: function(no) { goComment: function(no) {
uni.navigateTo({ uni.navigateTo({
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}` url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`

View File

@@ -5,46 +5,6 @@
</template> </template>
<script> <script>
import 'ol/ol.css';
import Map from 'ol/Map';
import View from 'ol/View';
import TileLayer from 'ol/layer/Tile';
import SourceVector from 'ol/source/Vector';
import LayerVector from 'ol/layer/Vector';
import * as control from 'ol/control';
import {
toLonLat
} from 'ol/proj';
import Overlay from 'ol/Overlay';
import {
toStringHDMS
} from 'ol/coordinate';
import {
Select
} from 'ol/interaction'
import {
GeoJSON
} from 'ol/format';
import {
Style,
Circle,
Fill,
Stroke,
Icon,
Text
} from 'ol/style';
import Feature from 'ol/Feature';
import {
Point,
Polygon
} from 'ol/geom';
import {
Logo,
TileSuperMapRest,
FeatureService,
GetFeaturesByGeometryParameters
} from '@supermap/iclient-ol';
const geoJSONParser = new GeoJSON();
let mypoint = require('@/static/img/mypoint.png'); let mypoint = require('@/static/img/mypoint.png');
export default { export default {
name: "uMapView", name: "uMapView",
@@ -114,297 +74,12 @@
}; };
}, },
mounted() { mounted() {
if (this.init) {
this.initMap()
}
},
methods: {
initMap(options) {
let lat, lon;
if (options) {
lat = options.lat
lon = options.lon
} else {
lat = this.latitude
lon = this.longitude
}
this.map = new Map({
target: 'map',
controls: control.defaults({
attribution: false,
zoom: this.ScaleZoom,
}),
layers: [
new TileLayer({ // 使用瓦片
source: new TileSuperMapRest({
url: this.MapUrl,
wrapX: true,
}),
projection: 'EPSG:4326',
}),
],
view: new View({
center: [lon, lat],
maxZoom: this.maxZoom,
minZoom: this.minZoom,
zoom: this.zoom,
projection: 'EPSG:4326',
})
});
//添加查询结果图层
this.vectorSource = new SourceVector({
wrapX: false
});
const resultLayer = new LayerVector({
source: this.vectorSource,
});
//添加点图层
this.addPointsSource = new SourceVector({
wrapX: false
});
const addPointsLayer = new LayerVector({
source: this.addPointsSource,
});
this.map.addLayer(addPointsLayer);
this.map.addLayer(resultLayer);
this.map.on('pointermove', (e) => {
if (this.isShowToolTip) {
this.helpTooltip.setPosition(undefined);
this.helpTooltipElement.classList.add('hidden');
}
this.$emit('regionchange', e.pixel)
});
this.map.on('singleclick', (e) => {
this.$emit('clickMap', e.coordinate)
});
if (this.open) {
this.addFeature([{
id: 1,
latitude: lat,
longitude: lon,
iconPath: mypoint,
title: '',
width: 20,
height: 20
}])
}
if (this.flagTip) {
this.createHelpTooltip()
}
}, },
addMarker(point) { methods: {}
console.log('point', point)
// this.ceateMarker([104.404419, 31.133980])
},
addFeature(covers) {
console.log(covers)
const features = covers.map((item) => ({
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [item.longitude, item.latitude],
},
properties: {
iconPath: item.iconPath,
text: item.title,
value: JSON.stringify(item),
scale: item.id === 1 ? [0.15, 0.15] : [0.1, 0.1]
}
}))
this.careateFeature(features)
},
ceateMarker(point) {
// 创建一个坐标点
const pointed = new Point(point); // 这里的[0, 0]应该替换为您的经度和纬度
// 创建一个特征
const pointFeature = new Feature({
geometry: pointed,
name: 'My Point'
});
pointFeature.setStyle(new Style({
image: new Circle({
fill: new Fill({
color: [255, 0, 0, 0.5]
}),
stroke: new Stroke({
color: 'red',
width: 2
}),
radius: 8
})
}));
pointFeature.setProperties({
POP: 1,
CAPITAL: 'test'
});
this.addPointsSource.clear()
// 将特征添加到矢量图层
this.addPointsSource.addFeature(pointFeature);
// 确保更新地图视图以显示新的标点
this.map.getView().fit(this.addPointsSource.getExtent());
// // 或者移动视图
// _this.map.getView().animate({
// duration: 850,
// zoom: 5,
// center: point,
// });
},
careateFeature(result) {
if (this.vectorSourceIcon) {
this.vectorSourceIcon.clear()
const geojsonObject = {
type: 'FeatureCollection',
features: result,
};
this.vectorSourceIcon.addFeatures(geoJSONParser.readFeatures(geojsonObject))
this.vectorSourceIcon.changed()
return
}
const geojsonObject = {
type: 'FeatureCollection',
features: result,
};
// 创建一个图层作为点位
this.vectorSourceIcon = new SourceVector({
features: geoJSONParser.readFeatures(geojsonObject)
});
this.vectorLayerIcon = new LayerVector({
source: this.vectorSourceIcon,
style: feature => {
return new Style({
image: new Icon({
anchor: [0.5, 0.9],
scale: feature.get('scale'),
src: feature.get('iconPath'),
}),
text: new Text({
text: feature.get('text'),
fill: new Fill({
color: '#000'
}),
stroke: new Stroke({
color: '#fff',
width: 3
}),
font: 'normal 12px Calibri, sans-serif',
textAlign: 'center', // 文本对齐
offsetX: 0,
offsetY: 15,
rotation: 0, // 文本旋转
}),
});
}
});
this.map.addLayer(this.vectorLayerIcon);
// 添加事件
this.selectInteraction = new Select({
layers: [this.vectorLayerIcon]
});
this.selectInteraction.on('select', (event) => {
const selectedFeatures = event.selected;
if (selectedFeatures.length) {
const select = selectedFeatures[0].values_
this.$emit('markertap', JSON.parse(select.value))
// tooltip
if (this.flagTip) {
const coordinate = selectedFeatures[0].values_.geometry.flatCoordinates;
this.helpTooltipElement.innerHTML = select.text;
console.log(this.helpTooltip)
this.helpTooltip.setPosition(coordinate);
this.helpTooltipElement.classList.remove('hidden');
this.map.addOverlay(this.helpTooltip);
this.isShowToolTip = true
}
}
});
this.map.addInteraction(this.selectInteraction);
},
createHelpTooltip() {
this.helpTooltipElement
if (this.helpTooltipElement) {
this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement);
}
this.helpTooltipElement = document.createElement('div');
this.helpTooltipElement.className = 'tooltip hidden';
this.helpTooltip = new Overlay({
element: this.helpTooltipElement,
offset: [-30, 20],
positioning: 'center-left'
});
}
}
} }
</script> </script>
<style scoped> <style scoped>
.app-content {}
.editPane {
position: absolute;
right: 65px;
top: 8px;
text-align: center;
background: #FFF;
z-index: 1000;
border-radius: 4px;
}
.ol-popup {
position: absolute;
background-color: white;
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
padding: 15px;
border-radius: 10px;
border: 1px solid #cccccc;
bottom: 12px;
left: -50px;
min-width: 120px;
white-space: nowrap;
}
.ol-popup:after,
.ol-popup:before {
top: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.ol-popup:after {
border-top-color: white;
border-width: 10px;
left: 48px;
margin-left: -10px;
}
.ol-popup:before {
border-top-color: #cccccc;
border-width: 11px;
left: 48px;
margin-left: -11px;
}
.tooltip {
position: relative;
background: rgba(0, 0, 0, 0.5);
border-radius: 4px;
color: white;
padding: 4px 8px;
opacity: 0.7;
white-space: nowrap;
}
</style> </style>

View File

@@ -0,0 +1,410 @@
<template>
<view class="app-content">
<view id="map" style="width: 100%;height: 100%;"></view>
</view>
</template>
<script>
import 'ol/ol.css';
import Map from 'ol/Map';
import View from 'ol/View';
import TileLayer from 'ol/layer/Tile';
import SourceVector from 'ol/source/Vector';
import LayerVector from 'ol/layer/Vector';
import * as control from 'ol/control';
import {
toLonLat
} from 'ol/proj';
import Overlay from 'ol/Overlay';
import {
toStringHDMS
} from 'ol/coordinate';
import {
Select
} from 'ol/interaction'
import {
GeoJSON
} from 'ol/format';
import {
Style,
Circle,
Fill,
Stroke,
Icon,
Text
} from 'ol/style';
import Feature from 'ol/Feature';
import {
Point,
Polygon
} from 'ol/geom';
import {
Logo,
TileSuperMapRest,
FeatureService,
GetFeaturesByGeometryParameters
} from '@supermap/iclient-ol';
const geoJSONParser = new GeoJSON();
let mypoint = require('@/static/img/mypoint.png');
export default {
name: "uMapView",
props: {
latitude: {
required: true,
},
longitude: {
required: true,
},
zoom: {
type: Number,
required: false,
default: 10,
},
maxZoom: {
type: Number,
required: false,
default: 20,
},
minZoom: {
type: Number,
required: false,
default: 0,
},
ScaleZoom: {
type: Boolean,
required: false,
default: false,
},
MapUrl: { // 瓦片地图URL
type: String,
required: true,
default: '',
},
flagTip: {
type: Boolean,
required: false,
default: false,
},
open: {
type: Boolean,
required: false,
default: false,
},
init: {
type: Boolean,
required: false,
default: true,
}
},
data() {
return {
// 实例化对象
map: null,
addPointsSource: null,
vectorSource: null,
vectorSourceIcon: null,
vectorLayerIcon: null,
selectInteraction: null,
helpTooltipElement: null,
helpTooltip: null,
isclearPoint: null,
overlay: null,
// 控制参数
isShowToolTip: false,
};
},
mounted() {
if (this.init) {
this.initMap()
}
},
methods: {
initMap(options) {
let lat, lon;
if (options) {
lat = options.lat
lon = options.lon
} else {
lat = this.latitude
lon = this.longitude
}
this.map = new Map({
target: 'map',
controls: control.defaults({
attribution: false,
zoom: this.ScaleZoom,
}),
layers: [
new TileLayer({ // 使用瓦片
source: new TileSuperMapRest({
url: this.MapUrl,
wrapX: true,
}),
projection: 'EPSG:4326',
}),
],
view: new View({
center: [lon, lat],
maxZoom: this.maxZoom,
minZoom: this.minZoom,
zoom: this.zoom,
projection: 'EPSG:4326',
})
});
//添加查询结果图层
this.vectorSource = new SourceVector({
wrapX: false
});
const resultLayer = new LayerVector({
source: this.vectorSource,
});
//添加点图层
this.addPointsSource = new SourceVector({
wrapX: false
});
const addPointsLayer = new LayerVector({
source: this.addPointsSource,
});
this.map.addLayer(addPointsLayer);
this.map.addLayer(resultLayer);
this.map.on('pointermove', (e) => {
if (this.isShowToolTip) {
this.helpTooltip.setPosition(undefined);
this.helpTooltipElement.classList.add('hidden');
}
this.$emit('regionchange', e.pixel)
});
this.map.on('singleclick', (e) => {
this.$emit('clickMap', e.coordinate)
});
if (this.open) {
this.addFeature([{
id: 1,
latitude: lat,
longitude: lon,
iconPath: mypoint,
title: '',
width: 20,
height: 20
}])
}
if (this.flagTip) {
this.createHelpTooltip()
}
},
addMarker(point) {
console.log('point', point)
// this.ceateMarker([104.404419, 31.133980])
},
addFeature(covers) {
console.log(covers)
const features = covers.map((item) => ({
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [item.longitude, item.latitude],
},
properties: {
iconPath: item.iconPath,
text: item.title,
value: JSON.stringify(item),
scale: item.id === 1 ? [0.15, 0.15] : [0.1, 0.1]
}
}))
this.careateFeature(features)
},
ceateMarker(point) {
// 创建一个坐标点
const pointed = new Point(point); // 这里的[0, 0]应该替换为您的经度和纬度
// 创建一个特征
const pointFeature = new Feature({
geometry: pointed,
name: 'My Point'
});
pointFeature.setStyle(new Style({
image: new Circle({
fill: new Fill({
color: [255, 0, 0, 0.5]
}),
stroke: new Stroke({
color: 'red',
width: 2
}),
radius: 8
})
}));
pointFeature.setProperties({
POP: 1,
CAPITAL: 'test'
});
this.addPointsSource.clear()
// 将特征添加到矢量图层
this.addPointsSource.addFeature(pointFeature);
// 确保更新地图视图以显示新的标点
this.map.getView().fit(this.addPointsSource.getExtent());
// // 或者移动视图
// _this.map.getView().animate({
// duration: 850,
// zoom: 5,
// center: point,
// });
},
careateFeature(result) {
if (this.vectorSourceIcon) {
this.vectorSourceIcon.clear()
const geojsonObject = {
type: 'FeatureCollection',
features: result,
};
this.vectorSourceIcon.addFeatures(geoJSONParser.readFeatures(geojsonObject))
this.vectorSourceIcon.changed()
return
}
const geojsonObject = {
type: 'FeatureCollection',
features: result,
};
// 创建一个图层作为点位
this.vectorSourceIcon = new SourceVector({
features: geoJSONParser.readFeatures(geojsonObject)
});
this.vectorLayerIcon = new LayerVector({
source: this.vectorSourceIcon,
style: feature => {
return new Style({
image: new Icon({
anchor: [0.5, 0.9],
scale: feature.get('scale'),
src: feature.get('iconPath'),
}),
text: new Text({
text: feature.get('text'),
fill: new Fill({
color: '#000'
}),
stroke: new Stroke({
color: '#fff',
width: 3
}),
font: 'normal 12px Calibri, sans-serif',
textAlign: 'center', // 文本对齐
offsetX: 0,
offsetY: 15,
rotation: 0, // 文本旋转
}),
});
}
});
this.map.addLayer(this.vectorLayerIcon);
// 添加事件
this.selectInteraction = new Select({
layers: [this.vectorLayerIcon]
});
this.selectInteraction.on('select', (event) => {
const selectedFeatures = event.selected;
if (selectedFeatures.length) {
const select = selectedFeatures[0].values_
this.$emit('markertap', JSON.parse(select.value))
// tooltip
if (this.flagTip) {
const coordinate = selectedFeatures[0].values_.geometry.flatCoordinates;
this.helpTooltipElement.innerHTML = select.text;
console.log(this.helpTooltip)
this.helpTooltip.setPosition(coordinate);
this.helpTooltipElement.classList.remove('hidden');
this.map.addOverlay(this.helpTooltip);
this.isShowToolTip = true
}
}
});
this.map.addInteraction(this.selectInteraction);
},
createHelpTooltip() {
this.helpTooltipElement
if (this.helpTooltipElement) {
this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement);
}
this.helpTooltipElement = document.createElement('div');
this.helpTooltipElement.className = 'tooltip hidden';
this.helpTooltip = new Overlay({
element: this.helpTooltipElement,
offset: [-30, 20],
positioning: 'center-left'
});
}
}
}
</script>
<style scoped>
.app-content {}
.editPane {
position: absolute;
right: 65px;
top: 8px;
text-align: center;
background: #FFF;
z-index: 1000;
border-radius: 4px;
}
.ol-popup {
position: absolute;
background-color: white;
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
padding: 15px;
border-radius: 10px;
border: 1px solid #cccccc;
bottom: 12px;
left: -50px;
min-width: 120px;
white-space: nowrap;
}
.ol-popup:after,
.ol-popup:before {
top: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.ol-popup:after {
border-top-color: white;
border-width: 10px;
left: 48px;
margin-left: -10px;
}
.ol-popup:before {
border-top-color: #cccccc;
border-width: 11px;
left: 48px;
margin-left: -11px;
}
.tooltip {
position: relative;
background: rgba(0, 0, 0, 0.5);
border-radius: 4px;
color: white;
padding: 4px 8px;
opacity: 0.7;
white-space: nowrap;
}
</style>

View File

@@ -3,7 +3,7 @@ module.exports = {
// 图片地址 // 图片地址
imageUrl: '', imageUrl: '',
// 天地图tk // 天地图tk
apiKey: 'e4266a5e84fe6c10f60c559967f0a03f', apiKey: 'aa9b92683ff22363aa17baa16599cff8',
// 显示标题 // 显示标题
showTitle: false, showTitle: false,
// map 1、黑色模块 2、白色模块 // map 1、黑色模块 2、白色模块

View File

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View File

@@ -16,6 +16,10 @@ import {
import empty from '@/components/empty/empty.vue' import empty from '@/components/empty/empty.vue'
function haslogin() {
return !!store.state.user.token
}
function navTo(url, needLogin) { function navTo(url, needLogin) {
console.log(url) console.log(url)
if (needLogin) { if (needLogin) {
@@ -46,11 +50,12 @@ Vue.component('jl-button', JlButton)
Vue.component('jl-form', JlForm) Vue.component('jl-form', JlForm)
Vue.component('jl-form-item', JlFormItem) Vue.component('jl-form-item', JlFormItem)
Vue.component('cs-button', CSButton) Vue.component('cs-button', CSButton)
Vue.component('super-map', superMapView) // Vue.component('super-map', superMapView)
Vue.component('empty', empty) Vue.component('empty', empty)
Vue.prototype.$api = { Vue.prototype.$api = {
msg, msg,
sleep sleep,
haslogin
} }
Vue.prototype.tools = tools Vue.prototype.tools = tools
Vue.prototype.$config = config Vue.prototype.$config = config

View File

@@ -5,6 +5,7 @@
"versionName": "1.0.0", "versionName": "1.0.0",
"versionCode": "100", "versionCode": "100",
"transformPx": false, "transformPx": false,
"sassImplementationName": "node-sass",
"app-plus": { "app-plus": {
"usingComponents": true, "usingComponents": true,
"compilerVersion": 3, "compilerVersion": 3,
@@ -65,11 +66,7 @@
}, },
"h5": { "h5": {
"sdkConfigs": { "sdkConfigs": {
"maps": { "maps": {}
"qqmap": {
"key": "FW3BZ-6JTK6-GCUS5-MZCRR-3GPR5-HJFEI"
}
}
}, },
"template": "index.html", "template": "index.html",
"router": { "router": {

View File

@@ -7,7 +7,7 @@
<block v-for="(page, pIndex) in data" :key="pIndex"> <block v-for="(page, pIndex) in data" :key="pIndex">
<block v-for="(item, index) in page" :key="item.id"> <block v-for="(item, index) in page" :key="item.id">
<view class="probody"> <view class="probody">
<company-list :companyitem="item" :noApply="false"></company-list> <company-list :companyitem="item" :position="userLocation" :noApply="false"></company-list>
<view class="baddd"></view> <view class="baddd"></view>
<!-- <block> <!-- <block>
<image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image> <image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image>
@@ -33,7 +33,9 @@
import { import {
myCollection myCollection
} from '@/api/mission.js'; } from '@/api/mission.js';
import {
mapGetters
} from 'vuex'
export default { export default {
components: { components: {
vTabs, vTabs,
@@ -48,6 +50,9 @@
total: 0 total: 0
} }
}, },
computed: {
...mapGetters(['userLocation']),
},
onLoad: function() { onLoad: function() {
this.init() this.init()
}, },

View File

@@ -7,7 +7,7 @@
<block v-for="(page, pIndex) in data" :key="pIndex"> <block v-for="(page, pIndex) in data" :key="pIndex">
<block v-for="(item, index) in page" :key="item.id"> <block v-for="(item, index) in page" :key="item.id">
<view class="probody"> <view class="probody">
<company-list :companyitem="item" :noApply="false"></company-list> <company-list :companyitem="item" :position="userLocation" :noApply="false"></company-list>
<view class="baddd"></view> <view class="baddd"></view>
<!-- <block> <!-- <block>
<image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image> <image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image>
@@ -33,7 +33,9 @@
import { import {
myMission myMission
} from '@/api/mission.js'; } from '@/api/mission.js';
import {
mapGetters
} from 'vuex'
export default { export default {
components: { components: {
vTabs, vTabs,
@@ -66,6 +68,9 @@
onPullDownRefresh: function() { onPullDownRefresh: function() {
this.init() this.init()
}, },
computed: {
...mapGetters(['userLocation']),
},
methods: { methods: {
init() { init() {
this.current = 1 this.current = 1

View File

@@ -79,7 +79,7 @@
{ {
"path": "pages/project/newProject", "path": "pages/project/newProject",
"style": { "style": {
"navigationBarTitleText": "德阳市灵活就业平台", "navigationBarTitleText": "宜昌市灵活就业平台",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }

View File

@@ -7,18 +7,29 @@
<!-- <image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx; color: blue;" mode=""></image> --> <!-- <image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx; color: blue;" mode=""></image> -->
<view class="headd_left"> <view class="headd_left">
<u-icon name="search" color="#2297fa" size="24"></u-icon> <u-icon name="search" color="#2297fa" size="24"></u-icon>
<input placeholder-class="search_style" type="text" confirm-type="搜索" v-model="keywords" <input
placeholder="搜零工岗位/搜全职岗位/搜政策" /> placeholder-class="search_style"
</view> type="text"
<view class="headd_right"> confirm-type="搜索"
搜索 v-model="keywords"
placeholder="搜零工岗位/搜全职岗位/搜政策"
/>
</view> </view>
<view class="headd_right">搜索</view>
</view> </view>
</uni-nav-bar> </uni-nav-bar>
<!-- <view class="homeHead"> --> <!-- <view class="homeHead"> -->
<view class="headSwiper"> <view class="headSwiper">
<swiper :indicator-dots="true" indicator-active-color="#fff" indicator-color="rgba(255,255,255,0.80)" <swiper
:autoplay="true" :interval="3000" :duration="1000" class="yswiper" :circular="true"> :indicator-dots="true"
indicator-active-color="#fff"
indicator-color="rgba(255,255,255,0.80)"
:autoplay="true"
:interval="3000"
:duration="1000"
class="yswiper"
:circular="true"
>
<swiper-item v-for="(item, index) in swiperList" :key="index" v-if="item.isShow !== '2'"> <swiper-item v-for="(item, index) in swiperList" :key="index" v-if="item.isShow !== '2'">
<view class="swiper-item"> <view class="swiper-item">
<image :src="item.image" mode="" class="swiperImg"></image> <image :src="item.image" mode="" class="swiperImg"></image>
@@ -31,18 +42,29 @@
<view class="policyImgIndex"> <view class="policyImgIndex">
<image src="../../static/img/index/newPolicy.png"></image> <image src="../../static/img/index/newPolicy.png"></image>
</view> </view>
<swiper style="width: 100%;height: 100rpx; line-height: 100rpx;margin-left: 164rpx;" <swiper
:indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :vertical="true" style="width: 100%; height: 100rpx; line-height: 100rpx; margin-left: 164rpx"
:circular="true"> :indicator-dots="true"
<swiper-item v-for="(item,index) in policyContentList" :key="index" :autoplay="true"
@click="goPolicyInfo(item.id)"> :interval="3000"
:duration="1000"
:vertical="true"
:circular="true"
>
<swiper-item
v-for="(item, index) in policyContentList"
:key="index"
@click="goPolicyInfo(item.id)"
>
<view class="swiper-item"> <view class="swiper-item">
<view class="policyText"> <view class="policyText">
<view class="textTitle">{{ item.articleTitle }}</view> <view class="textTitle">{{ item.articleTitle }}</view>
<view class="textDate">{{ dateFormat(item.createTime) }}</view> <view class="textDate">{{ dateFormat(item.createTime) }}</view>
<image src="../../static/img/right.svg" mode="" <image
style="width: 18rpx;height: 32rpx;position:absolute;top: 12rpx;right:0;"> src="../../static/img/right.svg"
</image> mode=""
style="width: 18rpx; height: 32rpx; position: absolute; top: 12rpx; right: 0"
></image>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
@@ -52,7 +74,6 @@
<!-- </view> --> <!-- </view> -->
</view> </view>
<view class="jobService"> <view class="jobService">
<view class="cardTips">就业服务</view> <view class="cardTips">就业服务</view>
<view class="serviceItem" @click="goures()"> <view class="serviceItem" @click="goures()">
@@ -176,7 +197,7 @@
</view> </view>
<view class="font24">就业帮助</view> <view class="font24">就业帮助</view>
</view> --> </view> -->
<view class="helpCardItem" style="border-right: 1px solid #F5F6F7;" @click=""> <view class="helpCardItem" style="border-right: 1px solid #f5f6f7" @click="">
<view class="cardItemIcon" @click="navTo('/pageMy/setUserBase/applicationsRecord')"> <view class="cardItemIcon" @click="navTo('/pageMy/setUserBase/applicationsRecord')">
<image src="../../static/img/index/legal.png" mode=""></image> <image src="../../static/img/index/legal.png" mode=""></image>
</view> </view>
@@ -191,39 +212,52 @@
</view> </view>
</view> </view>
<view class="info_market"> <!-- <view class="info_market">
<view class="market_top"> <view class="market_top">
<view class="top_log"></view> <view class="top_log"></view>
<view class="next_market" @click="navTo('/pages/market/market')">去市场</view> <view class="next_market" @click="navTo('/pages/market/market')">去市场</view>
</view> </view>
<!-- <view class="market_bottom"> <view class="market_bottom">
<view>了解市场<u-icon name="arrow-right" color="#666666" size="13"></u-icon></view> <view>了解市场<u-icon name="arrow-right" color="#666666" size="13"></u-icon></view>
<view>我要咨询<u-icon name="arrow-right" color="#666666" size="13"></u-icon></view> <view>我要咨询<u-icon name="arrow-right" color="#666666" size="13"></u-icon></view>
</view> -->
</view> </view>
</view> -->
<view class="latestMission"> <view class="latestMission">
<view class="cardTips" <view
style="margin: 0 26rpx;display: flex;align-items: center;justify-content: space-between;padding-bottom: 10rpx;"> class="cardTips"
style="
margin: 0 26rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 10rpx;
"
>
<view>政策资讯</view> <view>政策资讯</view>
<view style="display: flex;align-items: center;" @click="toNewProject"> <view style="display: flex; align-items: center" @click="toNewProject">
<view style="color:#707070;font-size:26rpx;margin-right: 10rpx;">更多</view> <view style="color: #707070; font-size: 26rpx; margin-right: 10rpx">更多</view>
<image src="../../static/img/right.svg" mode="" style="width: 14rpx;height: 26rpx;"></image> <image src="../../static/img/right.svg" mode="" style="width: 14rpx; height: 26rpx"></image>
</view> </view>
</view> </view>
<view class="newPeojectList"> <view class="newPeojectList">
<!-- <block v-if="companyList.length>0" v-for="(item, index) in companyList" :key="item.id"> <!-- <block v-if="companyList.length>0" v-for="(item, index) in companyList" :key="item.id">
<view class="baddd"></view> <view class="baddd"></view>
<company-list :companyitem="item"></company-list> <company-list :companyitem="item"></company-list>
</block> --> </block> -->
<view style="background-color: #fff;padding: 20rpx 30rpx;"> <view style="background-color: #fff; padding: 20rpx 30rpx">
<view v-for="(item,index) in policyContentList" :key="index" <view
style="display: flex;align-items: center;padding: 20rpx 0;" @click="toArticleDetail(item.id)"> v-for="(item, index) in policyContentList"
<image :src="item.headPic" :key="index"
style="width: 80rpx;height: 80rpx;margin-right: 20rpx;border-radius: 10rpx;" mode=""> style="display: flex; align-items: center; padding: 20rpx 0"
</image> @click="toArticleDetail(item.id)"
<view style="flex: 1; font-size: 28rpx;">{{ item.articleTitle }}</view> >
<image
:src="item.headPic"
style="width: 80rpx; height: 80rpx; margin-right: 20rpx; border-radius: 10rpx"
mode=""
></image>
<view style="flex: 1; font-size: 28rpx">{{ item.articleTitle }}</view>
</view> </view>
</view> </view>
<view v-if="policyContentList.length <= 0"> <view v-if="policyContentList.length <= 0">
@@ -232,10 +266,9 @@
<view class="baddd"></view> <view class="baddd"></view>
</view> </view>
</view> </view>
</view> </view>
<view class="homeFooter"> <view class="homeFooter">
<view class="atBottom">德阳市人力资源和社会保障局主办</view> <view class="atBottom">宜昌市人力资源和社会保障局主办</view>
<!-- <image src="../../static/img/index/seeMore.png" mode="" @click="goMore()"></image> --> <!-- <image src="../../static/img/index/seeMore.png" mode="" @click="goMore()"></image> -->
</view> </view>
<policy-content ref="pContent"></policy-content> <policy-content ref="pContent"></policy-content>
@@ -246,37 +279,20 @@
import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'; import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue';
import uniSearchBar from '@/components/uni-search-bar/uni-search-bar.vue'; import uniSearchBar from '@/components/uni-search-bar/uni-search-bar.vue';
import companyList from '@/components/companyList/companyList.vue'; import companyList from '@/components/companyList/companyList.vue';
import policyContent from '../user/policyContent.vue' import policyContent from '../user/policyContent.vue';
import { import { labourUnionDetail } from '@/api/federation.js';
labourUnionDetail import { newMission, recMission } from '@/api/mission.js';
} from '@/api/federation.js' import { mapGetters } from 'vuex';
import { import { setStore, getStore } from '@/untils/store.js';
newMission, import { getSwiperList, getPolicyContent } from '@/api/newIndex.js';
recMission import { myResume } from '@/api/resume.js';
} from '@/api/mission.js'; import { dateFormat } from '../../untils/format.js';
import {
mapGetters
} from 'vuex'
import {
setStore,
getStore
} from '@/untils/store.js'
import {
getSwiperList,
getPolicyContent
} from '@/api/newIndex.js'
import {
myResume,
} from '@/api/resume.js';
import {
dateFormat
} from "../../untils/format.js";
export default { export default {
components: { components: {
uniNavBar, uniNavBar,
uniSearchBar, uniSearchBar,
companyList, companyList,
policyContent policyContent,
}, },
data() { data() {
return { return {
@@ -289,42 +305,44 @@
policyContentList: [], policyContentList: [],
policyType: 1, policyType: 1,
swiperType: 1, swiperType: 1,
isResume: true,
}; };
}, },
onLoad: function(options) { onLoad: function (options) {},
myResume().then(res => {
const data = res.data.data
if (!(data.education && data.telephone && data.wage && data.workplace)) {
this.goures()
this.$api.sleep(1000).then(() => {
this.$api.msg('请输入基本信息')
})
}
})
},
onShow: function () { onShow: function () {
if (!this.$store.state.user.token) { if (!this.$store.state.user.token) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/login' url: '/pages/login/login',
}) });
return return;
} }
this.$store.dispatch('refreshAuthState').then((e) => { this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth var auth = this.$store.state.auth;
if (!auth.bankCardState) { if (!auth.bankCardState) {
this.step() this.step();
} }
}) });
this.download() this.download();
this.getSwiperList() this.getSwiperList();
this.getPolicy() this.getPolicy();
if (this.isResume) {
this.isResume = false;
myResume().then((res) => {
const data = res.data.data;
if (!(data.education && data.telephone && data.wage && data.workplace)) {
this.goures();
this.$api.sleep(1000).then(() => {
this.$api.msg('请输入基本信息');
});
}
});
}
}, },
onReady() { onReady() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.face.homeTitle title: this.face.homeTitle,
}); });
}, },
/*下拉刷新*/ /*下拉刷新*/
onPullDownRefresh: function () { onPullDownRefresh: function () {
@@ -334,38 +352,39 @@
}, 1000); }, 1000);
}, },
computed: { computed: {
...mapGetters(['face', 'authInfo']) ...mapGetters(['face', 'authInfo']),
}, },
onShareAppMessage(obj) { onShareAppMessage(obj) {
return { return {
title: '智慧就业', title: '智慧就业',
path: '/pages/index/index', path: '/pages/index/index',
} };
}, },
methods: { methods: {
getPolicy() { getPolicy() {
getPolicyContent(this.policyType).then(res => { getPolicyContent(this.policyType).then((res) => {
this.policyContentList = res.data.data.records this.policyContentList = res.data.data.records;
}) });
}, },
swiperItemSrc() { swiperItemSrc() {
/* /*
查看是否加入工会 查看是否加入工会
加入数据记录长度不为0 加入数据记录长度不为0
*/ */
labourUnionDetail(this.authInfo.idNumber).then(res => { labourUnionDetail(this.authInfo.idNumber).then((res) => {
const data = res.data.data.records; const data = res.data.data.records;
if (data.length == 0) { //未查到数据,代表未加入工会 if (data.length == 0) {
//未查到数据,代表未加入工会
this.go('/pageMy/federation/forMembership/Notice'); this.go('/pageMy/federation/forMembership/Notice');
} else { } else {
this.go('/pageMy/federation/vip/information'); this.go('/pageMy/federation/vip/information');
} }
}) });
}, },
step() { step() {
var that = this var that = this;
that.open = true that.open = true;
uni.showModal({ uni.showModal({
id: 'testModal', id: 'testModal',
title: '实名认证', title: '实名认证',
@@ -374,37 +393,37 @@
confirmText: '立即认证', confirmText: '立即认证',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
that.goSign(0) that.goSign(0);
} else if (res.cancel) { } else if (res.cancel) {
that.step() that.step();
}
that.open = false
} }
that.open = false;
},
}); });
}, },
// 步骤 // 步骤
goSign(active) { goSign(active) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/projectInfo/signContract?active=${active}` url: `/pages/projectInfo/signContract?active=${active}`,
}) });
}, },
go(url) { go(url) {
uni.navigateTo({ uni.navigateTo({
url url,
}) });
}, },
download: function () { download: function () {
this.isLogin = this.$store.state.user.token ? true : false; this.isLogin = this.$store.state.user.token ? true : false;
newMission().then(res => { newMission().then((res) => {
this.companyList = res.data.data; this.companyList = res.data.data;
}); });
if (this.$store.state.user.token) { if (this.$store.state.user.token) {
uni.$emit('newsReadChange') uni.$emit('newsReadChange');
this.$store.dispatch("getUnreadNum"); this.$store.dispatch('getUnreadNum');
recMission().then(res => { recMission().then((res) => {
this.recommendList = res.data.data; this.recommendList = res.data.data;
}) });
}; }
}, },
goLocation: function () { goLocation: function () {
if (!this.$store.state.user.token) { if (!this.$store.state.user.token) {
@@ -414,23 +433,23 @@
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/login/login" url: '/pages/login/login',
}); });
} else if (res.cancel) { } else if (res.cancel) {
return return;
}
} }
},
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '../mapSeach/mapSeach' url: '../mapSeach/mapSeach',
}); });
} }
}, },
goResume: function () { goResume: function () {
uni.navigateTo({ uni.navigateTo({
url: '/pageMy/my/resume/addSkill' url: '/pageMy/my/resume/addSkill',
}) });
}, },
goMore: function () { goMore: function () {
uni.setStorageSync('active', 2); uni.setStorageSync('active', 2);
@@ -446,39 +465,39 @@
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/login/login" url: '/pages/login/login',
}); });
} else if (res.cancel) { } else if (res.cancel) {
return return;
}
} }
},
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pageMy/my/resume/index' url: '/pageMy/my/resume/index',
}); });
} }
}, },
toNewTask() { toNewTask() {
uni.navigateTo({ uni.navigateTo({
url: `/pages/project/newProject?tabIndex=${0}` url: `/pages/project/newProject?tabIndex=${0}`,
}); });
}, },
toNewWork() { toNewWork() {
uni.navigateTo({ uni.navigateTo({
url: `/pages/project/newProject?tabIndex=${1}` url: `/pages/project/newProject?tabIndex=${1}`,
}); });
}, },
toNewProject() { toNewProject() {
uni.navigateTo({ uni.navigateTo({
url: `/pages/project/newProject?tabIndex=${2}` url: `/pages/project/newProject?tabIndex=${2}`,
}); });
}, },
toArticleDetail(id) { toArticleDetail(id) {
if (id) { if (id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/user/policyContent?id=${id}` url: `/pages/user/policyContent?id=${id}`,
}) });
} }
}, },
gouserSet: function () { gouserSet: function () {
@@ -489,16 +508,16 @@
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/login/login" url: '/pages/login/login',
}); });
} else if (res.cancel) { } else if (res.cancel) {
return return;
}
} }
},
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pageMy/setUserBase/index' url: '/pageMy/setUserBase/index',
}); });
} }
}, },
@@ -510,27 +529,27 @@
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
uni.redirectTo({ uni.redirectTo({
url: '/pages/login/login' url: '/pages/login/login',
}) });
} else if (res.cancel) { } else if (res.cancel) {
return return;
}
} }
},
}); });
} else { } else {
// if (this.keywords) { // if (this.keywords) {
uni.navigateTo({ uni.navigateTo({
url: '../seach/seach?keywords=' + this.keywords url: '../seach/seach?keywords=' + this.keywords,
}); });
this.keywords = '' this.keywords = '';
// } // }
} }
}, },
getSwiperList() { getSwiperList() {
getSwiperList(this.swiperType).then(res => { getSwiperList(this.swiperType).then((res) => {
const data = res.data.data; const data = res.data.data;
this.swiperList = data; this.swiperList = data;
}) });
}, },
dateFormat, dateFormat,
@@ -539,17 +558,16 @@
// var val=encodeURIComponent(data) // var val=encodeURIComponent(data)
uni.navigateTo({ uni.navigateTo({
url: `/pages/user/policyContent?id=${data}` url: `/pages/user/policyContent?id=${data}`,
}) });
} else { } else {
// uni.showToast({ // uni.showToast({
// title:'暂无内容', // title:'暂无内容',
// icon:'none' // icon:'none'
// }) // })
} }
} },
} },
}; };
</script> </script>
@@ -557,7 +575,7 @@
.info_market { .info_market {
margin: 24rpx; margin: 24rpx;
height: fit-content; height: fit-content;
background-color: #FFFFFE; background-color: #fffffe;
border-radius: 18rpx; border-radius: 18rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -577,12 +595,11 @@
background-size: cover; background-size: cover;
height: 60rpx; height: 60rpx;
width: 450rpx; width: 450rpx;
} }
.next_market { .next_market {
font-size: 26rpx; font-size: 26rpx;
color: #FFFFFF; color: #ffffff;
background: linear-gradient(to right, rgba(137, 168, 253, 1), rgba(87, 129, 250, 1)); background: linear-gradient(to right, rgba(137, 168, 253, 1), rgba(87, 129, 250, 1));
width: 120rpx; width: 120rpx;
height: 60rpx; height: 60rpx;
@@ -603,12 +620,11 @@
view { view {
display: flex; display: flex;
} }
} }
} }
.home_logo { .home_logo {
background: url(@/static/img/index/inLogo.png) no-repeat center center; background: url(@/static/img/index/inLogo3.png) no-repeat center center;
background-size: cover; background-size: cover;
height: 76rpx; height: 76rpx;
width: 560rpx; width: 560rpx;
@@ -632,14 +648,14 @@
} }
page { page {
background: #F5F6F7; background: #f5f6f7;
padding: 0 !important; padding: 0 !important;
} }
.homeHead { .homeHead {
width: 100%; width: 100%;
height: auto; height: auto;
background-color: #FFFFFF; background-color: #ffffff;
margin-top: -20rpx; margin-top: -20rpx;
padding-bottom: 32rpx; padding-bottom: 32rpx;
} }
@@ -682,7 +698,6 @@
width: 4rpx; width: 4rpx;
height: 30rpx; height: 30rpx;
background-color: #2297fa; background-color: #2297fa;
} }
} }
@@ -720,14 +735,13 @@
.newPolicy { .newPolicy {
width: 690rpx; width: 690rpx;
height: 100rpx; height: 100rpx;
background: #FEFFFE; background: #fefffe;
box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.06); box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx; border-radius: 16rpx;
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.newPolicy .policyContent { .newPolicy .policyContent {
@@ -738,7 +752,6 @@
} }
.swiper-item { .swiper-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@@ -791,13 +804,12 @@
.jobService { .jobService {
width: 100%; width: 100%;
height: 440rpx; height: 440rpx;
background: #FEFFFE; background: #fefffe;
// margin-top: 16rpx; // margin-top: 16rpx;
padding: 24rpx 0rpx 0rpx 32rpx; padding: 24rpx 0rpx 0rpx 32rpx;
} }
.cardTips { .cardTips {
height: 50rpx; height: 50rpx;
font-size: 36rpx; font-size: 36rpx;
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;
@@ -810,13 +822,12 @@
.serviceItem { .serviceItem {
width: 338rpx; width: 338rpx;
height: 168rpx; height: 168rpx;
background: #FEFFFE; background: #fefffe;
box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.06); box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 8rpx; border-radius: 8rpx;
float: left; float: left;
margin-right: 8rpx; margin-right: 8rpx;
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
.serviceItem .serviceItemContent { .serviceItem .serviceItemContent {
@@ -832,12 +843,11 @@
margin-left: 16rpx; margin-left: 16rpx;
} }
.hotFunction { .hotFunction {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
@@ -857,7 +867,6 @@
border-radius: 16rpx; border-radius: 16rpx;
} }
.serviceItem .itemIcon image, .serviceItem .itemIcon image,
.serviceItem .itemIcon { .serviceItem .itemIcon {
width: 84rpx; width: 84rpx;
@@ -878,13 +887,12 @@
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
} }
.helpSupport { .helpSupport {
width: 100%; width: 100%;
height: auto; height: auto;
background: #FEFFFE; background: #fefffe;
padding: 24rpx 0rpx 36rpx 32rpx; padding: 24rpx 0rpx 36rpx 32rpx;
margin-top: 16rpx; margin-top: 16rpx;
} }
@@ -892,7 +900,7 @@
.helpCard { .helpCard {
width: 690rpx; width: 690rpx;
height: 144rpx; height: 144rpx;
background: #FEFFFF; background: #feffff;
box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.06); box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 8px; border-radius: 8px;
display: flex; display: flex;
@@ -925,10 +933,9 @@
.latestMission { .latestMission {
width: 100%; width: 100%;
height: auto; height: auto;
background: #FEFFFE; background: #fefffe;
margin-top: 16rpx; margin-top: 16rpx;
padding: 24rpx 0 0 0; padding: 24rpx 0 0 0;
} }
.baddd { .baddd {
@@ -971,7 +978,6 @@
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.homeFooter image { .homeFooter image {

View File

@@ -6,15 +6,16 @@
</view> --> </view> -->
<!-- #endif --> <!-- #endif -->
<jl-input type="text" v-model="phone" placeholder="请输入手机号" @confirm="login"></jl-input> <jl-input type="text" v-model="phone" placeholder="请输入手机号" @confirm="login"></jl-input>
<jl-input type="text" v-model="password" placeholder="请输入登录密码" @confirm="login" showPassword clearable></jl-input> <jl-input type="text" v-model="password" placeholder="请输入登录密码" @confirm="login" showPassword
clearable></jl-input>
<!-- <code-input ref="code" v-model="code" :getCode="getCaptcha" @key-change="keyChange" @confirm="login"></code-input> --> <!-- <code-input ref="code" v-model="code" :getCode="getCaptcha" @key-change="keyChange" @confirm="login"></code-input> -->
<view v-if="loading" class="btn nocheck" loading="true"></view> <view v-if="loading" class="btn nocheck" loading="true"></view>
<view v-else-if="validate" class="btn" @click="login">立即登录</view> <view v-else-if="validate" class="btn" @click="login">立即登录</view>
<view v-else class="btn nocheck">立即登录</view> <view v-else class="btn nocheck">立即登录</view>
<!-- <view class="changeLogintype"> <view class="changeLogintype">
<view class="" @click="goReg">手机注册</view> <view class="" @click="goReg">手机注册</view>
<view class="" @click="goForget">忘记密码</view> <view class="" @click="goForget">忘记密码</view>
</view> --> </view>
</login-template> </login-template>
</template> </template>
@@ -73,8 +74,8 @@
}, },
login(e) { login(e) {
if (this.validate) { if (this.validate) {
this.userChecked = true; // this.userChecked = true;
console.log(this.userChecked) // console.log(this.userChecked)
// if (!this.userChecked) { // if (!this.userChecked) {
// uni.showToast({ // uni.showToast({
// title:'请先阅读并同意《服务及隐私协议》', // title:'请先阅读并同意《服务及隐私协议》',
@@ -105,7 +106,8 @@
}).catch((err) => { }).catch((err) => {
this.loading = false this.loading = false
// this.$refs.code.refushCode() // this.$refs.code.refushCode()
location.href = "https://dy12333.org.cn/h5/" // location.href = "https://dy12333.org.cn/h5/"
this.$api.msg('登录失败')
}); });
// } // }
} }
@@ -167,4 +169,15 @@
} }
/* #endif */ /* #endif */
.changeLogintype {
margin: 0 auto;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #1B66FF;
margin-top: 15px;
display: flex;
align-items: center;
justify-content: space-between;
}
</style> </style>

View File

@@ -5,11 +5,12 @@
<slot></slot> <slot></slot>
<view v-if="!hideBottom" class="bottomt"> <view v-if="!hideBottom" class="bottomt">
<view class="bottomt-box"> <view class="bottomt-box">
<!-- <view class="check-icon" @click="checkChanged"> <view class="check-icon" @click="checkChanged">
<image v-if="userChecked" src="../../static/img/checkOk.png" style="width: 30rpx;height:30rpx;"></image> <image v-if="userChecked" :src="checked" style="width: 30rpx;height:30rpx;">
</image>
<view class="noneCheck" v-else></view> <view class="noneCheck" v-else></view>
</view> </view>
已阅读并同意<text class="bottomtText" @click="goMent">服务及隐私协议</text> --> 已阅读并同意<text class="bottomtText" @click="goMent">服务及隐私协议</text>
</view> </view>
@@ -18,12 +19,15 @@
</template> </template>
<script> <script>
import {mapGetters} from 'vuex' import checked from '../../static/img/checkOk.png'
import {
mapGetters
} from 'vuex'
export default { export default {
data() { data() {
return { return {
checked
} }
}, },
props: { props: {
@@ -81,12 +85,14 @@
left: 0; left: 0;
width: 100%; width: 100%;
text-align: center; text-align: center;
.bottomt-box { .bottomt-box {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
} }
.check-icon { .check-icon {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
@@ -95,6 +101,7 @@
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
margin-right: 12rpx; margin-right: 12rpx;
.noneCheck { .noneCheck {
width: 26rpx; width: 26rpx;
height: 26rpx; height: 26rpx;

View File

@@ -133,7 +133,7 @@
getLocation: function() { getLocation: function() {
var that = this; var that = this;
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'wgs84',
success: function(res) { success: function(res) {
//初始化当前点 //初始化当前点
var point = { var point = {

View File

@@ -31,13 +31,14 @@
</view> </view>
<view class="conatiner_card"> <view class="conatiner_card">
<view class="row blod fs_34">德阳市智慧就业市场</view> <view class="row blod fs_34">宜昌市智慧就业市场</view>
<view class="row color_666 fs_30 marT_30"> <view class="row color_666 fs_30 marT_30">
<u-icon style="margin-right: 10rpx;" name="calendar" color="#666666" size="16"></u-icon>营业时间 <u-icon style="margin-right: 10rpx" name="calendar" color="#666666" size="16"></u-icon>
营业时间
</view> </view>
<view class="row color_666 fs_30">上午9:00-12:00 下午14:00-18:00</view> <view class="row color_666 fs_30">上午9:00-12:00 下午14:00-18:00</view>
<view class="row color_666 fs_30 marT_30"> <view class="row color_666 fs_30 marT_30">
<u-icon style="margin-right: 10rpx;" name="map" color="#666666" size="16"></u-icon> <u-icon style="margin-right: 10rpx" name="map" color="#666666" size="16"></u-icon>
四川省德阳市旌阳区天山南路1段108号 四川省德阳市旌阳区天山南路1段108号
<!-- <u-icon style="margin-left: 10rpx;" name="arrow-right" color="#666666" size="16"></u-icon> --> <!-- <u-icon style="margin-left: 10rpx;" name="arrow-right" color="#666666" size="16"></u-icon> -->
</view> </view>
@@ -66,19 +67,15 @@
<script> <script>
export default { export default {
data() { data() {
return { return {};
}
}, },
methods: { methods: {},
};
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@function designTo($num) { @function designTo($num) {
@return ($num / 620rpx) * 750rpx @return ($num / 620rpx) * 750rpx;
} }
@for $i from 10 to 60 { @for $i from 10 to 60 {
@@ -113,7 +110,7 @@
.container_head { .container_head {
min-height: 300rpx; min-height: 300rpx;
padding: 28rpx; padding: 28rpx;
background: linear-gradient(to bottom, rgba(69, 112, 250, 1), rgba(69, 112, 250, .0)); background: linear-gradient(to bottom, rgba(69, 112, 250, 1), rgba(69, 112, 250, 0));
.row { .row {
display: flex; display: flex;
@@ -121,12 +118,13 @@
justify-content: space-between; justify-content: space-between;
.head_left { .head_left {
color: #FFFFFF; color: #ffffff;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
flex-direction: column; flex-direction: column;
.left_title {} .left_title {
}
.left_content { .left_content {
height: designTo(87rpx); height: designTo(87rpx);
@@ -173,7 +171,7 @@
.conatiner_card { .conatiner_card {
margin: 28rpx; margin: 28rpx;
background-color: #FFFFFF; background-color: #ffffff;
height: fit-content; height: fit-content;
border-radius: 20rpx; border-radius: 20rpx;
padding: designTo(28rpx); padding: designTo(28rpx);
@@ -198,7 +196,7 @@
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
background-color: #FFFFFF; background-color: #ffffff;
height: designTo(108rpx); height: designTo(108rpx);
padding: 0 28rpx designTo(30rpx) 28rpx; padding: 0 28rpx designTo(30rpx) 28rpx;
@@ -210,7 +208,7 @@
} }
.chioe_btn { .chioe_btn {
color: #FFFFFF; color: #ffffff;
background: linear-gradient(to right, #fbaf1a, #fbaf1a); background: linear-gradient(to right, #fbaf1a, #fbaf1a);
height: designTo(66rpx); height: designTo(66rpx);
width: designTo(228rpx); width: designTo(228rpx);

View File

@@ -113,10 +113,10 @@
<!-- <view class="btn-out" @click="logout"> <!-- <view class="btn-out" @click="logout">
退出登录 退出登录
</view> --> </view> -->
<view class="bottom" @click="makePhoneCall"> <!-- <view class="bottom" @click="makePhoneCall">
<view>德阳市人社局 电话0838-2505580</view> <view>德阳市人社局 电话0838-2505580</view>
<view>地址德阳市旌阳区天山南路1段-102</view> <view>地址德阳市旌阳区天山南路1段-102</view>
</view> </view> -->
<cs-button></cs-button> <cs-button></cs-button>
</view> </view>
</template> </template>

View File

@@ -3,16 +3,27 @@
<view class="app-top"> <view class="app-top">
<view class="top-search"> <view class="top-search">
<view class="top-input"> <view class="top-input">
<input class="put" type="text" placeholder-class="put-pla" v-model="searchValue" <input
placeholder="搜索附近岗位或任务"> class="put"
type="text"
placeholder-class="put-pla"
v-model="searchValue"
placeholder="搜索附近岗位或任务"
/>
<button class="input-btn" @tap="search">搜索</button> <button class="input-btn" @tap="search">搜索</button>
</view> </view>
</view> </view>
</view> </view>
<view class="view-map"> <view class="view-map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" <!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:zoom="14" :min-zoom="10" :max-zoom="20" @markertap="clickmark" @regionchange="show = false" :zoom="14" :min-zoom="10" :max-zoom="20" @markertap="clickmark" @regionchange="show = false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map> :MapUrl="$config.supperMap" :flag-tip="false"></super-map> -->
<zhuo-tianditu-MultiPoint-Mapper
ref="tMap"
@onSelect="clickmark"
:api-key="$config.apiKey"
></zhuo-tianditu-MultiPoint-Mapper>
<!-- <view id="map" ></view> --> <!-- <view id="map" ></view> -->
<!-- <map style="width: 100%;height: 100%;" scale="16" :latitude="latitude" :longitude="longitude" <!-- <map style="width: 100%;height: 100%;" scale="16" :latitude="latitude" :longitude="longitude"
:markers="covers" @markertap="clickmark" @regionchange="show = false"></map> --> :markers="covers" @markertap="clickmark" @regionchange="show = false"></map> -->
@@ -36,7 +47,8 @@
{{ productInfo.experienceDesc }} | {{ education[productInfo.education] }} {{ productInfo.experienceDesc }} | {{ education[productInfo.education] }}
</view> </view>
<button class="btns" hover-class="active" @tap="openMap"> <button class="btns" hover-class="active" @tap="openMap">
<image class="btn-img" src="../../static/img/direction2.png" />查看详情 <image class="btn-img" src="../../static/img/direction2.png" />
查看详情
</button> </button>
</view> </view>
</view> </view>
@@ -49,14 +61,10 @@
</template> </template>
<script> <script>
import { import { addZeroPrefix, getDistanceFromLatLonInKm } from '@/untils/tools.js';
addZeroPrefix,
getDistanceFromLatLonInKm
} from '@/untils/tools.js'
import testData from '@/common/textdata.js'; import testData from '@/common/textdata.js';
import { import { geQueryJobsByNearby } from '@/api/map.js';
geQueryJobsByNearby import { mapGetters } from 'vuex';
} from '@/api/map.js'
let taskpoint = require('../../static/img/taskpoint.png'); let taskpoint = require('../../static/img/taskpoint.png');
let gwpoint = require('../../static/img/gwpoint.png'); let gwpoint = require('../../static/img/gwpoint.png');
let mypoint = require('../../static/img/mypoint.png'); let mypoint = require('../../static/img/mypoint.png');
@@ -67,7 +75,7 @@
show: false, show: false,
ID: 1, ID: 1,
searchValue: '', searchValue: '',
latitude: 31.133980, latitude: 31.13398,
longitude: 104.404419, longitude: 104.404419,
covers: [], covers: [],
rateValue: 2, rateValue: 2,
@@ -75,41 +83,45 @@
}; };
}, },
computed: { computed: {
...mapGetters(['userLocation']),
distance() { distance() {
const { const { lon, lat } = this.productInfo;
lon,
lat
} = this.productInfo
if (lon) { if (lon) {
const { const { m, km } = getDistanceFromLatLonInKm(lat, lon, this.latitude, this.longitude);
m, return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`;
km
} = getDistanceFromLatLonInKm(lat, lon, this.latitude, this.longitude)
return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`
}
return '无'
} }
return '无';
},
}, },
mounted() { mounted() {
const _this = this const _this = this;
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'wgs84',
success: function (res) { success: function (res) {
const { console.log(res, '成功获得周边信息');
longitude, const { longitude, latitude } = res;
latitude _this.latitude = latitude;
} = res _this.longitude = longitude;
_this.latitude = latitude
_this.longitude = longitude
_this.getList(longitude, latitude).then((covers) => { _this.getList(longitude, latitude).then((covers) => {
_this.$refs.uMap.addFeature(covers) _this.covers = covers;
}) _this.$nextTick(() => {
_this.$refs.tMap.addFeature(covers);
});
});
}, },
fail: function (err) { fail: function (err) {
_this.$api.msg('无法获得周边信息') console.log(err, '无法获得周边信息');
_this.$api.msg('无法获得周边信息');
}, },
complete: function(e) {} complete: function (e) {},
}) });
console.log('userLocation', this.userLocation);
if (this.userLocation) {
const { longitude, latitude } = this.userLocation;
this.$refs.tMap.open(longitude, latitude);
} else {
this.$store.dispatch('getUserLocation');
}
}, },
onShow() { onShow() {
// const _this = this // const _this = this
@@ -124,45 +136,43 @@
// }) // })
}, },
methods: { methods: {
onSelect(item) {},
openMap(lon, lat) { openMap(lon, lat) {
//打开地图,并将门店位置传入 //打开地图,并将门店位置传入
// type: post 岗位 mission 任务 // type: post 岗位 mission 任务
switch (this.productInfo.type) { switch (this.productInfo.type) {
case 'post': case 'post':
const no = encodeURIComponent(1) const no = encodeURIComponent(this.productInfo.id);
uni.navigateTo({ uni.navigateTo({
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=${1}` url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=${1}`,
}) });
break break;
case 'mission': case 'mission':
const no1 = encodeURIComponent(this.productInfo.missionNo) const no1 = encodeURIComponent(this.productInfo.missionNo);
uni.navigateTo({ uni.navigateTo({
url: `/pages/projectInfo/projectInfo?missionNo=${no1}&isCan=${1}` url: `/pages/projectInfo/projectInfo?missionNo=${no1}&isCan=${1}`,
}) });
break break;
} }
}, },
search() { search() {
const _this = this const _this = this;
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'wgs84',
success: function (res) { success: function (res) {
const { const { longitude, latitude } = res;
longitude, _this.latitude = latitude;
latitude _this.longitude = longitude;
} = res
_this.latitude = latitude
_this.longitude = longitude
_this.getList(longitude, latitude).then((covers) => { _this.getList(longitude, latitude).then((covers) => {
_this.$api.msg('成功获得周边信息') _this.$api.msg('成功获得周边信息');
_this.$refs.uMap.addFeature(covers) _this.$refs.uMap.addFeature(covers);
}) });
}, },
fail: function (err) { fail: function (err) {
_this.$api.msg('无法获得周边信息') _this.$api.msg('无法获得周边信息');
}, },
complete: function(e) {} complete: function (e) {},
}) });
// this.getList(this.longitude, this.latitude).then((covers) => { // this.getList(this.longitude, this.latitude).then((covers) => {
// this.$api.msg('成功获得周边信息') // this.$api.msg('成功获得周边信息')
// console.log(covers) // console.log(covers)
@@ -170,25 +180,25 @@
// }) // })
}, },
clickmark(cover) { clickmark(cover) {
if (cover.markerId === 1) return if (cover.markerId === 1) return;
this.show = true; this.show = true;
this.productInfo = cover.info this.productInfo = cover.info;
}, },
mockGetLocation() { mockGetLocation() {
return new Promise((resolve) => { return new Promise((resolve) => {
resolve({ resolve({
"longitude": 104.40632, longitude: 104.40632,
"latitude": 31.122989, latitude: 31.122989,
"altitude": null, altitude: null,
"accuracy": 25.998, accuracy: 25.998,
"altitudeAccuracy": null, altitudeAccuracy: null,
"heading": null, heading: null,
"speed": null, speed: null,
"errMsg": "getLocation:ok", errMsg: 'getLocation:ok',
"verticalAccuracy": 0, verticalAccuracy: 0,
"horizontalAccuracy": 25.998 horizontalAccuracy: 25.998,
}) });
}) });
}, },
async getList(lon, lat) { async getList(lon, lat) {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
@@ -196,14 +206,17 @@
lon, lon,
lat, lat,
distanceRange: 20, distanceRange: 20,
taskTitle: this.searchValue taskTitle: this.searchValue,
} };
let resData = await geQueryJobsByNearby(params) let resData = await geQueryJobsByNearby(params);
if (resData.data.code === 200) { if (resData.data.code === 200) {
const arr = resData.data.data.map((item) => ({ const arr = resData.data.data.map((item) => ({
id: item.id, id: item.id,
longitude: item.lon, longitude: item.lon,
latitude: item.lat, latitude: item.lat,
lon: item.lon,
lat: item.lat,
label: item.missionTitle,
iconPath: item.type === 'post' ? gwpoint : taskpoint, iconPath: item.type === 'post' ? gwpoint : taskpoint,
width: 20, width: 20,
height: 20, height: 20,
@@ -213,8 +226,8 @@
fontSize: 10, fontSize: 10,
borderColor: 'blue', borderColor: 'blue',
}, },
info: item info: item,
})) }));
arr.push({ arr.push({
id: 1, id: 1,
latitude: lat, latitude: lat,
@@ -222,15 +235,17 @@
iconPath: mypoint, iconPath: mypoint,
title: '我的位置', title: '我的位置',
width: 20, width: 20,
height: 20 height: 20,
}) lon: lat,
resolve(arr) lat: lon,
} label: '我的位置',
});
}) resolve(arr);
}
}
} }
});
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -247,8 +262,8 @@
} }
.active { .active {
background: #EAEAEA !important; background: #eaeaea !important;
color: #AFAFAF; color: #afafaf;
} }
.card_mark { .card_mark {
@@ -256,11 +271,11 @@
width: 56rpx; width: 56rpx;
height: 28rpx; height: 28rpx;
border-radius: 12rpx 0 12rpx 12rpx; border-radius: 12rpx 0 12rpx 12rpx;
background: linear-gradient(157deg, #A043C1 0%, #4133A2 100%); background: linear-gradient(157deg, #a043c1 0%, #4133a2 100%);
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang-SC-Bold, PingFang-SC; font-family: PingFang-SC-Bold, PingFang-SC;
font-weight: bold; font-weight: bold;
color: #FFFFFF; color: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -288,7 +303,7 @@
.swiper-item { .swiper-item {
width: 660rpx; width: 660rpx;
height: 406rpx; height: 406rpx;
background: #FFFFFF; background: #ffffff;
box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5); box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5);
border-radius: 27rpx; border-radius: 27rpx;
overflow: hidden; overflow: hidden;
@@ -318,12 +333,12 @@
justify-content: center; justify-content: center;
width: 223rpx; width: 223rpx;
height: 64rpx; height: 64rpx;
background: linear-gradient(to right, #A043C1 0%, #4133A2 100%); background: linear-gradient(to right, #a043c1 0%, #4133a2 100%);
border-radius: 15rpx; border-radius: 15rpx;
color: #FFFFFF; color: #ffffff;
font-size: 26rpx; font-size: 26rpx;
font-weight: 800; font-weight: 800;
color: #FFFFFF; color: #ffffff;
line-height: 64rpx; line-height: 64rpx;
.btn-img { .btn-img {
@@ -335,8 +350,6 @@
} }
} }
} }
} }
} }
@@ -368,7 +381,7 @@
.put { .put {
padding-left: 30rpx; padding-left: 30rpx;
height: 72rpx; height: 72rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 36rpx; border-radius: 36rpx;
} }
@@ -385,12 +398,12 @@
right: 30rpx; right: 30rpx;
top: 50%; top: 50%;
transform: translate(0, -50%); transform: translate(0, -50%);
color: #FFFFFF; color: #ffffff;
width: 120rpx; width: 120rpx;
height: 56rpx; height: 56rpx;
line-height: 56rpx; line-height: 56rpx;
font-size: 28rpx; font-size: 28rpx;
background: linear-gradient(157deg, #A043C1 0%, #4133A2 100%); background: linear-gradient(157deg, #a043c1 0%, #4133a2 100%);
border-radius: 29rpx; border-radius: 29rpx;
} }
} }

View File

@@ -31,7 +31,7 @@
<block v-if="activeTab == 0"> <block v-if="activeTab == 0">
<view v-if="newList.length > 0"> <view v-if="newList.length > 0">
<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>
@@ -51,7 +51,7 @@
<view v-if="companyList.length > 0"> <view v-if="companyList.length > 0">
<block v-for="(item, index) in companyList" :key="item.id"> <block v-for="(item, index) in companyList" :key="item.id">
<workList :companyitem="item" :near="activeTab === 0"></workList> <workList :companyitem="item" :position="userLocation" :near="activeTab === 0"></workList>
</block> </block>
</view> </view>
<view v-else> <view v-else>
@@ -109,7 +109,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,
@@ -117,15 +119,16 @@
verticalMenu, verticalMenu,
workList workList
}, },
computed: {
...mapGetters(['userLocation']),
},
data() { data() {
return { return {
policyContentList: [], policyContentList: [],
activeTab: 0, activeTab: '0',
companyList: [], companyList: [],
recommendList: [], recommendList: [],
newList: [], newList: [],
nearPage: { nearPage: {
current: 1, current: 1,
size: 10, size: 10,
@@ -142,10 +145,7 @@
total: 0 total: 0
}, },
currentAddress: '', currentAddress: '',
currentPoint: {
latitude: 0,
longitude: 0
},
key: 'FW3BZ-6JTK6-GCUS5-MZCRR-3GPR5-HJFEI', key: 'FW3BZ-6JTK6-GCUS5-MZCRR-3GPR5-HJFEI',
open: false, open: false,
showPopUp: false, showPopUp: false,
@@ -157,10 +157,11 @@
if (option.tabIndex) { if (option.tabIndex) {
this.activeTab = option.tabIndex this.activeTab = option.tabIndex
} }
this.getData() this.$store.dispatch('getUserLocation')
this.getPolicy() this.download()
}, },
onShow: function() { onShow: function() {
const enumTitle = { const enumTitle = {
"0": '最新零工岗位', "0": '最新零工岗位',
"1": '最新全职岗位', "1": '最新全职岗位',
@@ -169,7 +170,7 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: enumTitle[this.activeTab] title: enumTitle[this.activeTab]
}) })
if (this.$store.state.user.token) { if (this.$api.haslogin()) {
this.$store.dispatch('refreshAuthState').then((e) => { this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth var auth = this.$store.state.auth
if (!auth.bankCardState) { if (!auth.bankCardState) {
@@ -177,7 +178,6 @@
} }
}) })
} }
const value = uni.getStorageSync('active'); const value = uni.getStorageSync('active');
if (value) { if (value) {
this.activeTab = value; this.activeTab = value;
@@ -190,13 +190,7 @@
}, },
/*下拉刷新*/ /*下拉刷新*/
onPullDownRefresh: function() { onPullDownRefresh: function() {
if (!this.$store.state.user.token) {
uni.redirectTo({
url: "/pages/login/login"
});
} else {
this.download(); this.download();
}
}, },
methods: { methods: {
step() { step() {
@@ -228,30 +222,6 @@
url: '/pageMy/my/resume/addSkill' url: '/pageMy/my/resume/addSkill'
}) })
}, },
/*定位*/
getLocation: function() {
var that = this;
uni.getLocation({
type: 'gcj02',
success: function(res) {
that.currentPoint = {
latitude: res.latitude,
longitude: res.longitude
}
// that.getAddrByPoint(res);
that.getNearList(that.currentPoint)
},
complete: function(e) {}
});
},
/*逆地址解析*/
getAddrByPoint: function(point) {
var that = this;
var location = point.latitude + ',' + point.longitude
getcoder(location, encodeURI(that.key), 0).then(res => {
that.currentAddress = res.data.result.address
});
},
goSeach: function() { goSeach: function() {
uni.navigateTo({ uni.navigateTo({
url: '../seach/seach' url: '../seach/seach'
@@ -271,8 +241,8 @@
this.activeTab = e; this.activeTab = e;
}, },
//附近任务; //附近任务;
getNearList: function(point) { getNearList: function() {
nearMission(this.nearPage.current, this.nearPage.size).then(res => { nearMission(this.nearPage.current, this.nearPage.size, 1).then(res => {
if (this.nearPage.current === 1) { if (this.nearPage.current === 1) {
this.companyList = []; this.companyList = [];
} }
@@ -313,7 +283,7 @@
}, },
//最新任务; //最新任务;
getNewList: function() { getNewList: function() {
newMissionAll(this.newPage.current, this.newPage.size, '').then(res => { newMissionAll(this.newPage.current, this.newPage.size, '', 1).then(res => {
if (this.newPage.current === 1) { if (this.newPage.current === 1) {
this.newList = []; this.newList = [];
} }
@@ -326,32 +296,31 @@
}, },
//上拉加载 //上拉加载
upLoad: function() { upLoad: function() {
if (this.activeTab === 0) { if (this.activeTab === '0') {
if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) {
this.getNearList(this.currentPoint);
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
}
if (this.activeTab === 1) {
if (this.recommendPage.current <= Math.ceil(this.recommendPage.total / this.recommendPage
.size)) {
this.getRecommendList();
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
}
if (this.activeTab === 2) {
if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) { if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) {
this.getNewList(); this.getNewList()
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
}
if (this.activeTab === '1') {
if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) {
this.getNearList();
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
}
if (this.activeTab === '2') {
if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) {
this.getPolicy();
} else { } else {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
@@ -365,25 +334,24 @@
download: function() { download: function() {
console.log(this.activeTab) console.log(this.activeTab)
if (this.activeTab === '0') { if (this.activeTab === '0') {
this.nearPage.current = 1; this.newPage.current = 1;
console.log('123123') this.getNewList();
this.getLocation();
setTimeout(function() { setTimeout(function() {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, 1000); }, 1000);
return return
} }
if (this.activeTab === '1') { if (this.activeTab === '1') {
this.recommendPage.current = 1; this.nearPage.current = 1;
this.getRecommendList(); this.getNearList();
setTimeout(function() { setTimeout(function() {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, 1000); }, 1000);
return return
} }
if (this.activeTab === '2') { if (this.activeTab === '2') {
this.newPage.current = 1; // this.newPage.current = 1;
this.getNewList(); this.getPolicy();
setTimeout(function() { setTimeout(function() {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, 1000); }, 1000);
@@ -391,20 +359,13 @@
} }
}, },
getData: function() { getData: function() {
if (!this.$store.state.user.token) {
uni.redirectTo({
url: "/pages/login/login"
});
} else {
uni.$emit('newsReadChange'); uni.$emit('newsReadChange');
this.nearPage.current = 1; this.nearPage.current = 1;
this.recommendPage.current = 1; this.recommendPage.current = 1;
this.newPage.current = 1; this.newPage.current = 1;
this.getLocation();
this.getRecommendList(); this.getRecommendList();
this.getNewList(); this.getNewList();
this.getNearList(); this.getNearList();
}
}, },
@@ -442,7 +403,8 @@
.content { .content {
background-color: #f3f4f8; background-color: #f3f4f8;
padding-top: 20rpx; padding-top: 20rpx;
min-height: 80vh; /* min-height: 80vh; */
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
} }

View File

@@ -244,7 +244,7 @@
getLocation: function() { getLocation: function() {
var that = this; var that = this;
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'wgs84',
success: function(res) { success: function(res) {
that.currentPoint = { that.currentPoint = {
latitude: res.latitude, latitude: res.latitude,

View File

@@ -3,21 +3,29 @@
<view class="titleSearch"> <view class="titleSearch">
<view class="searchName"> </view> <view class="searchName"> </view>
<u-search placeholder="搜零工岗位/搜全职岗位/搜政策" @focus="goSeach" shape="round" :showAction="false"></u-search> <u-search
placeholder="搜零工岗位/搜全职岗位/搜政策"
@focus="goSeach"
shape="round"
:showAction="false"
></u-search>
</view> </view>
<view class="navPosition" @click="navTo('/pages/project/map')"> <view class="navPosition" @click="navTo('/pages/project/map')">
<u-icon name="map" color="#2979ff" size="16"></u-icon> <u-icon name="map" color="#2979ff" size="16"></u-icon>
<view class="positionText">德阳市地图服务</view> <view class="positionText">宜昌市地图服务</view>
<u-icon name="arrow-right" color="#666666" size="14"></u-icon> <u-icon name="arrow-right" color="#666666" size="14"></u-icon>
</view> </view>
<view class="content"> <view class="content">
<view class="typeButtonWrapper"> <view class="typeButtonWrapper">
<view class="typeButtonLeft"> <view class="typeButtonLeft">
<view
<view v-for="(item, index) in nonReactiveArray" :key="index" v-for="(item, index) in nonReactiveArray"
:class="['typeButton', index == activeTab ? 'activeButton' : '']" @click="changeTab(index)">{{ :key="index"
item :class="['typeButton', index == activeTab ? 'activeButton' : '']"
}}</view> @click="changeTab(index)"
>
{{ item }}
</view>
</view> </view>
<!-- 筛选 --> <!-- 筛选 -->
<view class="screenButton" @click="showPopUp = true"> <view class="screenButton" @click="showPopUp = true">
@@ -33,7 +41,7 @@
</u-popup> </u-popup>
<block v-if="activeTab == 0 || this.activeTab === 2"> <block v-if="activeTab == 0 || this.activeTab === 2">
<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" :position="userLocation"></companyList> <companyList :companyitem="item" :position="userLocation"></companyList>
</block> </block>
@@ -53,16 +61,14 @@
</view> --> </view> -->
</view> </view>
<view v-if="companyList.length > 0" style="padding-bottom: 20rpx;"> <view v-if="companyList.length > 0" style="padding-bottom: 20rpx">
<block v-for="(item, index) in companyList" :key="item.id"> <block v-for="(item, index) in companyList" :key="item.id">
<workList :companyitem="item" :near="activeTab === 0"></workList> <workList :companyitem="item" :near="activeTab === 0"></workList>
</block> </block>
</view> </view>
<view v-else> <view v-else>
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image> <image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
<view class="nothingContnt"> <view class="nothingContnt">暂无信息</view>
暂无信息
</view>
</view> </view>
</block> </block>
<!-- <block v-if="activeTab == 2 "> <!-- <block v-if="activeTab == 2 ">
@@ -93,7 +99,6 @@
<cs-button></cs-button> <cs-button></cs-button>
</view> </view>
</view> </view>
</template> </template>
@@ -101,8 +106,8 @@
import vTabs from '@/components/v-tabs/v-tabs.vue'; import vTabs from '@/components/v-tabs/v-tabs.vue';
import testData from '@/common/textdata.js'; import testData from '@/common/textdata.js';
import companyList from '@/components/companyList/companyList.vue'; import companyList from '@/components/companyList/companyList.vue';
import workList from '@/components/companyList/workList.vue' import workList from '@/components/companyList/workList.vue';
import userrecruitList from './userrecruitList.vue' import userrecruitList from './userrecruitList.vue';
import { import {
newMissionAll, newMissionAll,
recommendMission, recommendMission,
@@ -111,26 +116,18 @@
recommendMissionSearch, recommendMissionSearch,
nearMissionSearch, nearMissionSearch,
} from '@/api/mission.js'; } from '@/api/mission.js';
import { import { getPolicyContent } from '@/api/newIndex.js';
getPolicyContent import { getPushListByUserId } from '@/api/userrecruit.js';
} from '@/api/newIndex.js' import { getcoder } from '@/api/map.js';
import {
getPushListByUserId
} from '@/api/userrecruit.js'
import {
getcoder
} from "@/api/map.js";
import verticalMenu from '@/components/vertical-menu/vertical-menu.vue'; import verticalMenu from '@/components/vertical-menu/vertical-menu.vue';
import { import { mapGetters } from 'vuex';
mapGetters
} from 'vuex'
export default { export default {
components: { components: {
vTabs, vTabs,
companyList, companyList,
verticalMenu, verticalMenu,
workList, workList,
userrecruitList userrecruitList,
}, },
computed: { computed: {
...mapGetters(['userLocation']), ...mapGetters(['userLocation']),
@@ -146,27 +143,27 @@
nearPage: { nearPage: {
current: 1, current: 1,
size: 10, size: 10,
total: 0 total: 0,
}, },
recommendPage: { recommendPage: {
current: 1, current: 1,
size: 10, size: 10,
total: 0 total: 0,
}, },
newPage: { newPage: {
current: 1, current: 1,
size: 10, size: 10,
total: 0 total: 0,
}, },
policyPage: { policyPage: {
current: 1, current: 1,
size: 10, size: 10,
total: 0 total: 0,
}, },
currentAddress: '', currentAddress: '',
currentPoint: { currentPoint: {
latitude: 0, latitude: 0,
longitude: 0 longitude: 0,
}, },
key: 'FW3BZ-6JTK6-GCUS5-MZCRR-3GPR5-HJFEI', key: 'FW3BZ-6JTK6-GCUS5-MZCRR-3GPR5-HJFEI',
open: false, open: false,
@@ -175,12 +172,12 @@
searchData: {}, searchData: {},
// nonReactiveArray: ["推荐任务", "推荐岗位", "个体户招工"], // nonReactiveArray: ["推荐任务", "推荐岗位", "个体户招工"],
nonReactiveArray: ["推荐零工岗位", "推荐全职岗位", "全部零工岗位", "全部全职岗位"], nonReactiveArray: ['推荐零工岗位', '推荐全职岗位', '全部零工岗位', '全部全职岗位'],
} };
}, },
onLoad: function () { onLoad: function () {
this.getData() this.getData();
console.log('userLocation', this.userLocation) console.log('userLocation', this.userLocation);
// this.getPolicy() // this.getPolicy()
}, },
onShow: function () { onShow: function () {
@@ -188,28 +185,28 @@
if (this.$store.state.user.token) { if (this.$store.state.user.token) {
this.$store.dispatch('refreshAuthState').then((e) => { this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth var auth = this.$store.state.auth;
if (!auth.bankCardState) { if (!auth.bankCardState) {
this.step() this.step();
} }
}) });
} }
const value = uni.getStorageSync('active'); const value = uni.getStorageSync('active');
if (value) { if (value) {
this.activeTab = value; this.activeTab = value;
uni.removeStorageSync('active') uni.removeStorageSync('active');
} }
}, },
/*页面滚动到底部 换页*/ /*页面滚动到底部 换页*/
onReachBottom: function () { onReachBottom: function () {
this.upLoad() this.upLoad();
}, },
/*下拉刷新*/ /*下拉刷新*/
onPullDownRefresh: function () { onPullDownRefresh: function () {
if (!this.$store.state.user.token) { if (!this.$store.state.user.token) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/login/login" url: '/pages/login/login',
}); });
} else { } else {
this.download(); this.download();
@@ -217,8 +214,8 @@
}, },
methods: { methods: {
step() { step() {
var that = this var that = this;
that.open = true that.open = true;
uni.showModal({ uni.showModal({
title: '实名认证', title: '实名认证',
content: `检查到您还未实名认证,实名认证之后才可进行操作哦`, content: `检查到您还未实名认证,实名认证之后才可进行操作哦`,
@@ -226,59 +223,59 @@
confirmText: '立即认证', confirmText: '立即认证',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
that.goSign(0) that.goSign(0);
} else if (res.cancel) { } else if (res.cancel) {
that.step() that.step();
}
that.open = false
} }
that.open = false;
},
}); });
}, },
// 步骤 // 步骤
goSign(active) { goSign(active) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/projectInfo/signContract?active=${active}` url: `/pages/projectInfo/signContract?active=${active}`,
}) });
}, },
goResume: function () { goResume: function () {
uni.navigateTo({ uni.navigateTo({
url: '/pageMy/my/resume/addSkill' url: '/pageMy/my/resume/addSkill',
}) });
}, },
/*定位*/ /*定位*/
getLocation: function () { getLocation: function () {
var that = this; var that = this;
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'wgs84',
success: function (res) { success: function (res) {
that.currentPoint = { that.currentPoint = {
latitude: res.latitude, latitude: res.latitude,
longitude: res.longitude longitude: res.longitude,
} };
console.log('打印', res) console.log('打印', res);
// that.getAddrByPoint(res); // that.getAddrByPoint(res);
that.getNearList(that.currentPoint) that.getNearList(that.currentPoint);
}, },
complete: function(e) {} complete: function (e) {},
}); });
}, },
/*逆地址解析*/ /*逆地址解析*/
getAddrByPoint: function (point) { getAddrByPoint: function (point) {
var that = this; var that = this;
var location = point.latitude + ',' + point.longitude var location = point.latitude + ',' + point.longitude;
getcoder(location, encodeURI(that.key), 0).then(res => { getcoder(location, encodeURI(that.key), 0).then((res) => {
that.currentAddress = res.data.result.address that.currentAddress = res.data.result.address;
}); });
}, },
goSeach: function () { goSeach: function () {
uni.navigateTo({ uni.navigateTo({
url: '../seach/seach' url: '../seach/seach',
}) });
}, },
gomap: function () { gomap: function () {
uni.navigateTo({ uni.navigateTo({
url: '../mapSeach/mapSeach' url: '../mapSeach/mapSeach',
}) });
}, },
changeTab: function (e) { changeTab: function (e) {
this.isSearch = false; this.isSearch = false;
@@ -292,9 +289,8 @@
// var val=encodeURIComponent(data) // var val=encodeURIComponent(data)
uni.navigateTo({ uni.navigateTo({
url: `/pages/user/policyContent?id=${data}` url: `/pages/user/policyContent?id=${data}`,
}) });
} else { } else {
// uni.showToast({ // uni.showToast({
// title:'暂无内容', // title:'暂无内容',
@@ -307,39 +303,34 @@
let params = { let params = {
current: this.policyPage.current, current: this.policyPage.current,
size: this.policyPage.size, size: this.policyPage.size,
} };
getPushListByUserId(params).then((res) => { getPushListByUserId(params).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
const { const { records, current, total, size } = res.data.data;
records, console.log('个体招工', records, current, total, size);
current,
total,
size
} = res.data.data
console.log('个体招工', records, current, total, size)
if (!records.length) { if (!records.length) {
return uni.showToast({ return uni.showToast({
icon: "none", icon: 'none',
title: '没有更多了', title: '没有更多了',
}) });
} }
if (current === 1) { if (current === 1) {
this.policyContentList = records this.policyContentList = records;
} else { } else {
this.policyContentList = this.policyContentList.concat(records); this.policyContentList = this.policyContentList.concat(records);
} }
this.policyPage.current = current + 1; this.policyPage.current = current + 1;
this.policyPage.total = total; this.policyPage.total = total;
} }
}) });
// getPolicyContent(1).then(res=>{ // getPolicyContent(1).then(res=>{
// this.policyContentList=res.data.data.records // this.policyContentList=res.data.data.records
// }) // })
}, },
//推荐岗位; //推荐岗位;
getNearList: function () { getNearList: function () {
const isAll = this.activeTab === 3 ? 1 : 0 const isAll = this.activeTab === 3 ? 1 : 0;
nearMission(this.nearPage.current, this.nearPage.size, isAll).then(res => { nearMission(this.nearPage.current, this.nearPage.size, isAll).then((res) => {
if (this.nearPage.current === 1) { if (this.nearPage.current === 1) {
this.companyList = []; this.companyList = [];
} }
@@ -348,12 +339,12 @@
if (res.data.data && res.data.data.records.length) { if (res.data.data && res.data.data.records.length) {
this.companyList = this.companyList.concat(res.data.data.records); this.companyList = this.companyList.concat(res.data.data.records);
} }
}) });
}, },
//推荐任务; //推荐任务;
getNewList: function () { getNewList: function () {
const isAll = this.activeTab === 2 ? 1 : 0 const isAll = this.activeTab === 2 ? 1 : 0;
newMissionAll(this.newPage.current, this.newPage.size, '', isAll).then(res => { newMissionAll(this.newPage.current, this.newPage.size, '', isAll).then((res) => {
if (this.newPage.current === 1) { if (this.newPage.current === 1) {
this.newList = []; this.newList = [];
} }
@@ -362,30 +353,28 @@
this.newList = this.newList.concat(res.data.data.records); this.newList = this.newList.concat(res.data.data.records);
this.newPage.current += 1; this.newPage.current += 1;
} }
}) });
}, },
//上拉加载 //上拉加载
upLoad: function () { upLoad: function () {
if (this.activeTab === 0 || this.activeTab === 2) { if (this.activeTab === 0 || this.activeTab === 2) {
console.log(this.newPage) console.log(this.newPage);
if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) { if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) {
if (this.isSearch) { if (this.isSearch) {
this.getNewListSearch() this.getNewListSearch();
} else { } else {
this.getNewList(); this.getNewList();
} }
} else { } else {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: '已经是最后一页', title: '已经是最后一页',
}) });
} }
return return;
} }
if (this.activeTab === 1 || this.activeTab === 3) { if (this.activeTab === 1 || this.activeTab === 3) {
if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) { if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) {
if (this.isSearch) { if (this.isSearch) {
this.getNearListSearch(); this.getNearListSearch();
} else { } else {
@@ -393,11 +382,11 @@
} }
} else { } else {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: '已经是最后一页', title: '已经是最后一页',
}) });
} }
return return;
} }
// if (this.activeTab === 2) { // if (this.activeTab === 2) {
// if (this.policyPage.current <= Math.ceil(this.policyPage.total / this.policyPage // if (this.policyPage.current <= Math.ceil(this.policyPage.total / this.policyPage
@@ -423,19 +412,19 @@
this.nearPage.current = 1; this.nearPage.current = 1;
this.newPage.current = 1; this.newPage.current = 1;
this.getLocation(); this.getLocation();
this.getNewList() this.getNewList();
setTimeout(function () { setTimeout(function () {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, 1000); }, 1000);
return return;
} }
if (this.activeTab === 1 || this.activeTab === 3) { if (this.activeTab === 1 || this.activeTab === 3) {
this.nearPage.current === 1 this.nearPage.current === 1;
this.getNearList() this.getNearList();
setTimeout(function () { setTimeout(function () {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, 1000); }, 1000);
return return;
} }
// if (this.activeTab === 2) { // if (this.activeTab === 2) {
// this.policyPage.current = 1; // this.policyPage.current = 1;
@@ -449,7 +438,7 @@
getData: function () { getData: function () {
if (!this.$store.state.user.token) { if (!this.$store.state.user.token) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/login/login" url: '/pages/login/login',
}); });
} else { } else {
uni.$emit('newsReadChange'); uni.$emit('newsReadChange');
@@ -463,96 +452,82 @@
} }
}, },
closePopUp() { closePopUp() {
this.showPopUp = false this.showPopUp = false;
}, },
subMitPopUp({ subMitPopUp({ submitData, areaModal, industryModal }) {
submitData,
areaModal,
industryModal
}) {
this.searchData = { this.searchData = {
submitData, submitData,
areaModal, areaModal,
industryModal industryModal,
} };
console.log(this.searchData, this.activeTab, '------'); console.log(this.searchData, this.activeTab, '------');
if (submitData || areaModal || industryModal) { if (submitData || areaModal || industryModal) {
this.isSearch = true; this.isSearch = true;
} }
this.newPage.current = 1; this.newPage.current = 1;
this.nearPage.current = 1 this.nearPage.current = 1;
this.policyPage.current = 1 this.policyPage.current = 1;
switch (this.activeTab) { switch (this.activeTab) {
case 0: case 0:
this.getNewListSearch() this.getNewListSearch();
break; break;
case 1: case 1:
this.getNearListSearch() this.getNearListSearch();
break; break;
case 2: case 2:
this.getPolicySearch() this.getPolicySearch();
break; break;
default: default:
break; break;
} }
this.showPopUp = false this.showPopUp = false;
}, },
//个体户招工搜索; //个体户招工搜索;
getPolicySearch: function () { getPolicySearch: function () {
const { const { submitData, areaModal, industryModal } = this.searchData;
submitData,
areaModal,
industryModal
} = this.searchData;
let params = { let params = {
current: this.policyPage.current, current: this.policyPage.current,
size: this.policyPage.size, size: this.policyPage.size,
education: submitData["学历"], education: submitData['学历'],
salary: submitData["工资"], salary: submitData['工资'],
industry: industryModal?.industry, industry: industryModal?.industry,
// province: areaModal?.address1[0], // province: areaModal?.address1[0],
// city: areaModal?.address1[1], // city: areaModal?.address1[1],
cityId: areaModal?.info.map((v) => v.areaName).join('-') cityId: areaModal?.info.map((v) => v.areaName).join('-'),
} };
if (params.cityId === '') { if (params.cityId === '') {
delete params.cityId delete params.cityId;
} }
nearMissionSearch(params).then(res => { nearMissionSearch(params).then((res) => {
if (this.policyPage.current === 1) { if (this.policyPage.current === 1) {
this.policyContentList = []; this.policyContentList = [];
} }
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 this.policyContentList = this.policyContentList.concat(res.data.data.records);
.records);
} }
});
})
}, },
//推荐岗位搜索; //推荐岗位搜索;
getNearListSearch: function () { getNearListSearch: function () {
const { const { submitData, areaModal, industryModal } = this.searchData;
submitData, console.log(this.searchData);
areaModal,
industryModal
} = this.searchData;
console.log(this.searchData)
let params = { let params = {
current: this.nearPage.current, current: this.nearPage.current,
size: this.nearPage.size, size: this.nearPage.size,
education: submitData["学历"], education: submitData['学历'],
salary: submitData["工资"], salary: submitData['工资'],
industry: industryModal?.industry, industry: industryModal?.industry,
// province: areaModal?.address1[0], // province: areaModal?.address1[0],
// city: areaModal?.address1[1], // city: areaModal?.address1[1],
cityId: areaModal?.info.map((v) => v.areaName).join('-') cityId: areaModal?.info.map((v) => v.areaName).join('-'),
} };
if (params.cityId === '') { if (params.cityId === '') {
delete params.cityId delete params.cityId;
} }
newMissionAllSearch(params).then(res => { newMissionAllSearch(params).then((res) => {
if (this.nearPage.current === 1) { if (this.nearPage.current === 1) {
this.companyList = []; this.companyList = [];
} }
@@ -561,30 +536,26 @@
if (res.data.data && res.data.data.records.length) { if (res.data.data && res.data.data.records.length) {
this.companyList = this.companyList.concat(res.data.data.records); this.companyList = this.companyList.concat(res.data.data.records);
} }
}) });
}, },
//推荐任务搜索; //推荐任务搜索;
getNewListSearch: function () { getNewListSearch: function () {
const { const { submitData, areaModal, industryModal } = this.searchData;
submitData,
areaModal,
industryModal
} = this.searchData;
let params = { let params = {
current: this.policyPage.current, current: this.policyPage.current,
size: this.policyPage.size, size: this.policyPage.size,
education: submitData["学历"], education: submitData['学历'],
salary: submitData["工资"], salary: submitData['工资'],
industry: industryModal?.industry, industry: industryModal?.industry,
// province: areaModal?.address1[0], // province: areaModal?.address1[0],
// city: areaModal?.address1[1], // city: areaModal?.address1[1],
wageUnitCategory: submitData["wageUnitCategory"], wageUnitCategory: submitData['wageUnitCategory'],
cityId: areaModal?.info.map((v) => v.areaName).join('-') cityId: areaModal?.info.map((v) => v.areaName).join('-'),
} };
if (params.cityId === '') { if (params.cityId === '') {
delete params.cityId delete params.cityId;
} }
recommendMissionSearch(params).then(res => { recommendMissionSearch(params).then((res) => {
if (this.newPage.current === 1) { if (this.newPage.current === 1) {
this.newList = []; this.newList = [];
} }
@@ -594,10 +565,10 @@
this.newList = this.newList.concat(res.data.data.records); this.newList = this.newList.concat(res.data.data.records);
this.newPage.current += 1; this.newPage.current += 1;
} }
}) });
}, },
} },
} };
</script> </script>
<style scoped> <style scoped>
@@ -622,8 +593,6 @@
padding: 20rpx; padding: 20rpx;
} }
.searchName { .searchName {
margin-right: 28rpx; margin-right: 28rpx;
} }
@@ -634,8 +603,6 @@
min-height: 80vh; min-height: 80vh;
} }
.screenButton { .screenButton {
/* position: absolute; /* position: absolute;
top: 10px; top: 10px;
@@ -687,10 +654,8 @@
position: absolute; position: absolute;
top: 3px; top: 3px;
right: 3px; right: 3px;
} }
.topseach { .topseach {
width: 25px; width: 25px;
height: 25px; height: 25px;
@@ -755,8 +720,6 @@
margin-top: 300rpx; margin-top: 300rpx;
} }
.popUpWrapper { .popUpWrapper {
width: 100%; width: 100%;
} }

View File

@@ -101,9 +101,10 @@
工作地址{{info.address || '暂无'}} 工作地址{{info.address || '暂无'}}
</view> </view>
<view class="map"> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" <!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap" :init="false" :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap" :init="false"
:flag-tip="false"></super-map> :flag-tip="false"></super-map> -->
<zhuo-tianditu-MultiPoint-Mapper ref="tMap" :api-key="$config.apiKey"></zhuo-tianditu-MultiPoint-Mapper>
</view> </view>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> --> <!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</view> </view>
@@ -324,6 +325,8 @@
detail(self.missionNo).then(res => { detail(self.missionNo).then(res => {
self.info = res.data.data; self.info = res.data.data;
self.status = res.data.data.detailStatus; self.status = res.data.data.detailStatus;
this.$refs.tMap.open(self.info.lon, self.info.lat)
// AddressToLocation({ // AddressToLocation({
// smart_address: res.data.data.address // smart_address: res.data.data.address
// }).then((result) => { // }).then((result) => {
@@ -337,13 +340,18 @@
// self.longitude = self.info.lon; // self.longitude = self.info.lon;
// self.covers[0].latitude = self.info.lat; // self.covers[0].latitude = self.info.lat;
// self.covers[0].longitude = self.info.lon; // self.covers[0].longitude = self.info.lon;
if (!(self.info.lat && self.info.lat === -1)) { if (self.info.lon > 1 && self.info.lat > 1) {
self.$refs.uMap.initMap({ self.$nextTick(() => {
self.$api.sleep(500).then(() => {
this.$refs.tMap.addFeature([{
id: self.info.id,
label: self.info.missionTitle,
lat: self.info.lat, lat: self.info.lat,
lon: self.info.lon, lon: self.info.lon,
}])
})
}) })
} }
self.showDetail = true; self.showDetail = true;
self.getCollectStatus(); self.getCollectStatus();
if (self.type === 1) { if (self.type === 1) {

View File

@@ -105,9 +105,10 @@
</view> </view>
<view class="map"> <view class="map">
<!-- <seeLocation ref="cMap" :apikey="$config.apiKey"></seeLocation> --> <!-- <seeLocation ref="cMap" :apikey="$config.apiKey"></seeLocation> -->
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" <!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap" :init="false" :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap" :init="false"
:flag-tip="false"></super-map> :flag-tip="false"></super-map> -->
<zhuo-tianditu-MultiPoint-Mapper ref="tMap" :api-key="$config.apiKey"></zhuo-tianditu-MultiPoint-Mapper>
</view> </view>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> --> <!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</view> </view>
@@ -332,14 +333,21 @@
self.info = resData.data.data; self.info = resData.data.data;
self.status = resData.data.data.status; self.status = resData.data.data.status;
self.missionNo = resData.data.data.missionNo; self.missionNo = resData.data.data.missionNo;
self.latitude = self.info.lat; // self.latitude = self.info.lat;
self.longitude = self.info.lon; // self.longitude = self.info.lon;
self.covers[0].latitude = self.info.lat; // self.covers[0].latitude = self.info.lat;
self.covers[0].longitude = self.info.lon; // self.covers[0].longitude = self.info.lon;
if (!(self.info.lat && self.info.lat === -1)) { this.$refs.tMap.open(self.info.lon, self.info.lat)
self.$refs.uMap.initMap({ if (self.info.lon > 1 && self.info.lat > 1) {
this.$nextTick(() => {
self.$api.sleep(1000).then(() => {
this.$refs.tMap.addFeature([{
id: self.info.id,
label: self.info.jobName,
lat: self.info.lat, lat: self.info.lat,
lon: self.info.lon, lon: self.info.lon,
}])
})
}) })
} }
// this.$refs.cMap.open() // this.$refs.cMap.open()

View File

@@ -109,9 +109,10 @@
工作地址{{info.address || '暂无'}} 工作地址{{info.address || '暂无'}}
</view> </view>
<view class="map"> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" <!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false" :init="false" :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false" :init="false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map> :MapUrl="$config.supperMap" :flag-tip="false"></super-map> -->
<zhuo-tianditu-MultiPoint-Mapper ref="tMap" :api-key="$config.apiKey"></zhuo-tianditu-MultiPoint-Mapper>
</view> </view>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> --> <!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</view> </view>
@@ -338,10 +339,17 @@
self.longitude = self.info.lon; self.longitude = self.info.lon;
self.covers[0].latitude = self.info.lat; self.covers[0].latitude = self.info.lat;
self.covers[0].longitude = self.info.lon; self.covers[0].longitude = self.info.lon;
if (!(self.info.lat && self.info.lat === -1)) { this.$refs.tMap.open(self.info.lon, self.info.lat)
self.$refs.uMap.initMap({ if (self.info.lon > 1 && self.info.lat > 1) {
self.$nextTick(() => {
self.$api.sleep(1000).then(() => {
this.$refs.tMap.addFeature([{
id: self.info.id,
label: self.info.jobName,
lat: self.info.lat, lat: self.info.lat,
lon: self.info.lon, lon: self.info.lon,
}])
})
}) })
} }
self.showDetail = true; self.showDetail = true;

View File

@@ -106,9 +106,10 @@
工作地址{{info.address || '暂无'}} 工作地址{{info.address || '暂无'}}
</view> </view>
<view class="map"> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" <!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false" :init="false" :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false" :init="false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map> :MapUrl="$config.supperMap" :flag-tip="false"></super-map> -->
<zhuo-tianditu-MultiPoint-Mapper ref="tMap" :api-key="$config.apiKey"></zhuo-tianditu-MultiPoint-Mapper>
</view> </view>
</view> </view>
<view class="" style="height:200rpx;background-color: #f6f6f6;" v-if="isShow!=='0'"></view> <view class="" style="height:200rpx;background-color: #f6f6f6;" v-if="isShow!=='0'"></view>
@@ -272,6 +273,7 @@
this.id = option.id; //消息id this.id = option.id; //消息id
} }
}, },
mounted() {},
onShow: function() { onShow: function() {
this.showDetail = true this.showDetail = true
this.getData(); this.getData();
@@ -316,14 +318,22 @@
self.info = res.data.data; self.info = res.data.data;
self.status = res.data.data.status; self.status = res.data.data.status;
self.missionNo = res.data.data.missionNo; self.missionNo = res.data.data.missionNo;
self.latitude = self.info.lat; this.$refs.tMap.open(self.info.lon, self.info.lat)
self.longitude = self.info.lon;
self.covers[0].latitude = self.info.lat; // self.latitude = self.info.lat;
self.covers[0].longitude = self.info.lon; // self.longitude = self.info.lon;
if (!(self.info.lat && self.info.lat === -1)) { // self.covers[0].latitude = self.info.lat;
self.$refs.uMap.initMap({ // self.covers[0].longitude = self.info.lon;
if (self.info.lon > 1 && self.info.lat > 1) {
self.$nextTick(() => {
self.$api.sleep(1000).then(() => {
this.$refs.tMap.addFeature([{
id: self.info.id,
label: self.info.jobName,
lat: self.info.lat, lat: self.info.lat,
lon: self.info.lon, lon: self.info.lon,
}])
})
}) })
} }
self.showDetail = true; self.showDetail = true;

View File

@@ -16,33 +16,84 @@
<u-form-item label="法人身份证号" labelWidth="100" prop="masterIdentity" borderBottom ref="item1"> <u-form-item label="法人身份证号" labelWidth="100" prop="masterIdentity" borderBottom ref="item1">
<u--input v-model="formData.masterIdentity" placeholder="请输入法人身份证号"></u--input> <u--input v-model="formData.masterIdentity" placeholder="请输入法人身份证号"></u--input>
</u-form-item> </u-form-item>
<u-form-item label="所在地区" labelWidth="100" prop="cityId" borderBottom ref="item1" <u-form-item
@click="showAddress = true; hideKeyboard()"> label="所属机构"
<PickerList placeholder="请选择所在地区" :columns="dic.addressColumn" :visibel="showAddress" labelWidth="100"
v-model="formData.cityId" @cancel="showAddress = false"> prop="cityId"
</PickerList> borderBottom
ref="item1"
@click="
showAddress = true;
hideKeyboard();
"
>
<PickerList
placeholder="请选择所属机构"
:columns="dic.addressColumn"
:visibel="showAddress"
v-model="formData.cityId"
@cancel="showAddress = false"
></PickerList>
</u-form-item> </u-form-item>
<u-form-item label="详细地址" labelWidth="100" prop="companyAddress" borderBottom ref="item1"> <u-form-item label="详细地址" labelWidth="100" prop="companyAddress" borderBottom ref="item1">
<u--input v-model="formData.companyAddress" placeholder="请输入详细地址"></u--input> <u--input v-model="formData.companyAddress" placeholder="请输入详细地址"></u--input>
</u-form-item> </u-form-item>
<u-form-item label="用工单位性质" labelWidth="100" prop="nature" borderBottom ref="item1" <u-form-item
@click="showJobCompanyNature = true; hideKeyboard()"> label="用工单位性质"
<PickerList placeholder="请选择企业性质" :columns="[xzDic]" :visibel="showJobCompanyNature" labelWidth="100"
labelName="dictValue" valueName="dictKey" v-model="formData.nature" prop="nature"
@cancel="showJobCompanyNature = false"> borderBottom
</PickerList> ref="item1"
@click="
showJobCompanyNature = true;
hideKeyboard();
"
>
<PickerList
placeholder="请选择企业性质"
:columns="[xzDic]"
:visibel="showJobCompanyNature"
labelName="dictValue"
valueName="dictKey"
v-model="formData.nature"
@cancel="showJobCompanyNature = false"
></PickerList>
</u-form-item> </u-form-item>
<u-form-item label="所属行业" labelWidth="100" prop="tradeId" borderBottom ref="item1" <u-form-item
@click="showjobCompanyIndustry = true; hideKeyboard()"> label="所属行业"
<PickerList placeholder="请选择所属行业" :columns="dic.tradeArr" labelName="name" valueName="id" labelWidth="100"
:visibel="showjobCompanyIndustry" v-model="formData.tradeId" prop="tradeId"
@cancel="showjobCompanyIndustry = false"> borderBottom
</PickerList> ref="item1"
@click="
showjobCompanyIndustry = true;
hideKeyboard();
"
>
<PickerList
placeholder="请选择所属行业"
:columns="dic.tradeArr"
labelName="name"
valueName="id"
:visibel="showjobCompanyIndustry"
v-model="formData.tradeId"
@cancel="showjobCompanyIndustry = false"
></PickerList>
</u-form-item> </u-form-item>
<u-form-item label="用工单位介绍" labelWidth="100" labelPosition="top" prop="companyDesc" borderBottom <u-form-item
ref="item1"> label="用工单位介绍"
<u--textarea v-model="formData.companyDesc" placeholder="请输入用工单位介绍" count labelWidth="100"
maxlength="200"></u--textarea> labelPosition="top"
prop="companyDesc"
borderBottom
ref="item1"
>
<u--textarea
v-model="formData.companyDesc"
placeholder="请输入用工单位介绍"
count
maxlength="200"
></u--textarea>
</u-form-item> </u-form-item>
</view> </view>
<view class="card"> <view class="card">
@@ -59,17 +110,23 @@
<view class="card_title">证件资料</view> <view class="card_title">证件资料</view>
<view class="card_content"> <view class="card_content">
<u-form-item labelWidth="100" prop="identityUrl4Id"> <u-form-item labelWidth="100" prop="identityUrl4Id">
<UploadIdNumber v-model="formData.identityUrl4Id" contentStyle="marginTop: 30rpx" <UploadIdNumber
backImg="/static/img/idcard.png"> v-model="formData.identityUrl4Id"
</UploadIdNumber> contentStyle="marginTop: 30rpx"
backImg="/static/img/idcard.png"
></UploadIdNumber>
</u-form-item> </u-form-item>
<u-form-item labelWidth="100" prop="identityUrl5Id"> <u-form-item labelWidth="100" prop="identityUrl5Id">
<UploadIdNumber v-model="formData.identityUrl5Id" backImg="/static/img/backidcard1.png"> <UploadIdNumber
</UploadIdNumber> v-model="formData.identityUrl5Id"
backImg="/static/img/backidcard1.png"
></UploadIdNumber>
</u-form-item> </u-form-item>
<u-form-item labelWidth="100" prop="authUrlId"> <u-form-item labelWidth="100" prop="authUrlId">
<UploadIdNumber v-model="formData.authUrlId" backImg="/static/img/businessLicense.jpg"> <UploadIdNumber
</UploadIdNumber> v-model="formData.authUrlId"
backImg="/static/img/businessLicense.jpg"
></UploadIdNumber>
</u-form-item> </u-form-item>
</view> </view>
</view> </view>
@@ -85,22 +142,16 @@
<script> <script>
import UploadIdNumber from './uploadIdNumber.vue'; import UploadIdNumber from './uploadIdNumber.vue';
import dic from '@/common/dic.js' import dic from '@/common/dic.js';
import PickerList from './pickerList.vue'; import PickerList from './pickerList.vue';
import { import { addInviteCompanyAuth, getInviteCompanyAuthInfo, getDictionary2 } from '@/api/userrecruit.js';
addInviteCompanyAuth, import { mapState } from 'vuex';
getInviteCompanyAuthInfo,
getDictionary2
} from '@/api/userrecruit.js'
import {
mapState
} from 'vuex'
const rules = { const rules = {
comname: { comname: {
type: 'string', type: 'string',
required: true, required: true,
message: '请输入用工单位', message: '请输入用工单位',
trigger: ['change'] trigger: ['change'],
}, },
companyTid: { companyTid: {
type: 'string', type: 'string',
@@ -108,88 +159,88 @@
max: 18, max: 18,
min: 18, min: 18,
message: '请输入18位统一信用代码', message: '请输入18位统一信用代码',
trigger: ['change'] trigger: ['change'],
}, },
masterName: { masterName: {
type: 'string', type: 'string',
required: true, required: true,
message: '请输入法人姓名', message: '请输入法人姓名',
trigger: ['change'] trigger: ['change'],
}, },
masterIdentity: { masterIdentity: {
type: 'string', type: 'string',
required: true, required: true,
pattern: /^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[Xx\d]$/, pattern: /^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[Xx\d]$/,
message: '请输入法人身份证号', message: '请输入法人身份证号',
trigger: ['change'] trigger: ['change'],
}, },
cityId: { cityId: {
type: 'string', type: 'string',
required: true, required: true,
message: '请选择所在地区', message: '请选择所在地区',
trigger: ['change'] trigger: ['change'],
}, },
companyAddress: { companyAddress: {
type: 'string', type: 'string',
required: true, required: true,
message: '请输入详细地址', message: '请输入详细地址',
trigger: ['change'] trigger: ['change'],
}, },
nature: { nature: {
type: 'string', type: 'string',
required: true, required: true,
message: '请选择企业性质', message: '请选择企业性质',
trigger: ['change'] trigger: ['change'],
}, },
tradeId: { tradeId: {
type: 'string', type: 'string',
required: true, required: true,
message: '请选择行业', message: '请选择行业',
trigger: ['change'] trigger: ['change'],
}, },
companyDesc: { companyDesc: {
type: 'string', type: 'string',
min: 20, min: 20,
required: true, required: true,
message: '请输入企业介绍最少20个字符', message: '请输入企业介绍最少20个字符',
trigger: ['change'] trigger: ['change'],
}, },
manager: { manager: {
type: 'string', type: 'string',
required: true, required: true,
message: '请输入联系人', message: '请输入联系人',
trigger: ['change'] trigger: ['change'],
}, },
telphone: { telphone: {
type: 'string', type: 'string',
required: true, required: true,
pattern: /^1[3-9]{1}[0-9]{9}$/, pattern: /^1[3-9]{1}[0-9]{9}$/,
message: '请输入手机号码', message: '请输入手机号码',
trigger: ['change'] trigger: ['change'],
}, },
identityUrl4Id: { identityUrl4Id: {
type: 'string', type: 'string',
required: true, required: true,
message: '请上传法人身份证(人像)', message: '请上传法人身份证(人像)',
trigger: ['change'] trigger: ['change'],
}, },
identityUrl5Id: { identityUrl5Id: {
type: 'string', type: 'string',
required: true, required: true,
message: '请上传法人身份证(国徽)', message: '请上传法人身份证(国徽)',
trigger: ['change'] trigger: ['change'],
}, },
authUrlId: { authUrlId: {
type: 'string', type: 'string',
required: true, required: true,
message: '请上传企业营业执照', message: '请上传企业营业执照',
trigger: ['change'] trigger: ['change'],
}, },
} };
export default { export default {
components: { components: {
UploadIdNumber, UploadIdNumber,
PickerList PickerList,
}, },
data() { data() {
return { return {
@@ -199,28 +250,28 @@
dic, dic,
xzDic: [], xzDic: [],
formData: {}, formData: {},
rules rules,
}; };
}, },
onLoad(options) { onLoad(options) {
if (options.reviewStatus === '9') { if (options.reviewStatus === '9') {
this.getInfo() this.getInfo();
} }
this.getDictInfo() this.getDictInfo();
}, },
computed: { computed: {
...mapState({ ...mapState({
authInfo: (state) => state.auth.authInfo, authInfo: (state) => state.auth.authInfo,
userInfo: (state) => state.user.userInfo userInfo: (state) => state.user.userInfo,
}), }),
}, },
created() { created() {
this.formData.manager = this.authInfo.realName this.formData.manager = this.authInfo.realName;
this.formData.idNumber = this.authInfo.idNumber this.formData.idNumber = this.authInfo.idNumber;
}, },
methods: { methods: {
hideKeyboard() { hideKeyboard() {
uni.hideKeyboard() uni.hideKeyboard();
}, },
async submit() { async submit() {
let params = { let params = {
@@ -228,9 +279,11 @@
nature: Number(this.formData.nature), nature: Number(this.formData.nature),
cityId: Number(this.formData.cityId), cityId: Number(this.formData.cityId),
tradeId: Number(this.formData.tradeId), tradeId: Number(this.formData.tradeId),
} };
const _this = this const _this = this;
this.$refs.formOne.validate().then(async (res) => { this.$refs.formOne
.validate()
.then(async (res) => {
let params = { let params = {
..._this.formData, ..._this.formData,
nature: Number(_this.formData.nature), nature: Number(_this.formData.nature),
@@ -238,55 +291,56 @@
tradeId: Number(_this.formData.tradeId), tradeId: Number(_this.formData.tradeId),
manager: _this.authInfo.realName, manager: _this.authInfo.realName,
idNumber: _this.authInfo.idNumber, idNumber: _this.authInfo.idNumber,
companyName: dic.addressColumn[0].filter((item) => item.value == _this companyName: dic.addressColumn[0].filter((item) => item.value == _this.formData.cityId)[0]
.formData.cityId)[0].label .label,
} };
console.log(params) console.log(params);
let resData = await addInviteCompanyAuth(params) let resData = await addInviteCompanyAuth(params);
if (resData.data.code === 200) { if (resData.data.code === 200) {
uni.navigateBack(1) uni.navigateBack(1);
_this.$api.sleep(1000).then(() => { _this.$api.sleep(1000).then(() => {
_this.$api.msg('已完成企业信息认证') _this.$api.msg('已完成企业信息认证');
}) });
} }
}).catch(errors => { })
.catch((errors) => {
if (/[\u4e00-\u9fff]/.test(errors.message)) { if (/[\u4e00-\u9fff]/.test(errors.message)) {
_this.$api.msg(errors.message) _this.$api.msg(errors.message);
} }
}) });
}, },
async getInfo() { async getInfo() {
let params = { let params = {
idNumber: this.authInfo.idNumber idNumber: this.authInfo.idNumber,
} };
let resData = await getInviteCompanyAuthInfo(params) let resData = await getInviteCompanyAuthInfo(params);
if (resData.data.code === 200) { if (resData.data.code === 200) {
console.log(resData.data.data) console.log(resData.data.data);
this.formData = { this.formData = {
...resData.data.data, ...resData.data.data,
nature: String(resData.data.data.nature), nature: String(resData.data.data.nature),
cityId: String(resData.data.data.cityId), cityId: String(resData.data.data.cityId),
tradeId: String(resData.data.data.tradeId), tradeId: String(resData.data.data.tradeId),
} };
} }
}, },
reset() { reset() {
const _this = this const _this = this;
uni.showModal({ uni.showModal({
content: '重置将清空表单,确定重置吗?', content: '重置将清空表单,确定重置吗?',
success() { success() {
_this.formData = {} _this.formData = {};
}, },
}) });
}, },
async getDictInfo() { async getDictInfo() {
let resData = await getDictionary2() let resData = await getDictionary2();
if (resData.data.code === 200) { if (resData.data.code === 200) {
this.xzDic = resData.data.data this.xzDic = resData.data.data;
}
} }
}, },
} },
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -1,18 +1,27 @@
<template> <template>
<view class="content_upload" :style="contentStyle"> <view class="content_upload" :style="contentStyle">
<u-upload :fileList="ImgUrl" @afterRead="afterRead" :deletable="true" @delete="deletePic" name="6" :maxCount="1" <u-upload
:width="width" :height="height"> :fileList="ImgUrl"
<image :src="backImg" :style="`width: ${width}px;height: ${height}px;`"></image> @afterRead="afterRead"
<image class="iconimg" src="/static/img/Takingpictures.png" :deletable="true"
:style="`width: ${width/4}px;height: ${width/4}px;`"></image> @delete="deletePic"
name="6"
:maxCount="1"
:width="width"
:height="height"
>
<image :src="backImg" :style="{ width: width + 'px', height: height + 'px' }"></image>
<image
class="iconimg"
src="/static/img/Takingpictures.png"
:style="{ width: width / 4 + 'px', height: height / 4 + 'px' }"
></image>
</u-upload> </u-upload>
</view> </view>
</template> </template>
<script> <script>
import { import { uploadFile } from '@/api/upload.js';
uploadFile
} from '@/api/upload.js'
export default { export default {
name: 'UploadIdNumber', name: 'UploadIdNumber',
props: { props: {
@@ -22,45 +31,45 @@
}, },
value: { value: {
type: String, type: String,
default: null default: null,
}, },
width: { width: {
type: Number, type: Number,
default: 280 default: 280,
}, },
height: { height: {
type: Number, type: Number,
default: 150 default: 150,
}, },
contentStyle: { contentStyle: {
type: String, type: String,
default: '' default: '',
} },
}, },
computed: { computed: {
ImgUrl(val) { ImgUrl(val) {
return this.value ? [{ return this.value
? [
{
name: 'img.jpg', name: 'img.jpg',
url: this.value url: this.value,
}] : [] },
} ]
: [];
},
}, },
methods: { methods: {
afterRead({ afterRead({ file, index, name }) {
file,
index,
name
}) {
// this.$emit("input", file); // this.$emit("input", file);
uploadFile(file).then((url) => { uploadFile(file).then((url) => {
this.$emit("input", url); this.$emit('input', url);
}) });
}, },
deletePic() { deletePic() {
this.$emit("input", null); this.$emit('input', null);
}, },
} },
} };
</script> </script>
<style scoped> <style scoped>

View File

@@ -87,9 +87,10 @@
任务地址{{ info.address }} 任务地址{{ info.address }}
</view> </view>
<view class="map"> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" <!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap" :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap"
:flag-tip="false"></super-map> :flag-tip="false"></super-map> -->
<zhuo-tianditu-MultiPoint-Mapper ref="tMap" :api-key="$config.apiKey"></zhuo-tianditu-MultiPoint-Mapper>
</view> </view>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> --> <!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</view> </view>
@@ -282,10 +283,23 @@
recruit_missionDetail(self.missionNo, self.type).then(res => { recruit_missionDetail(self.missionNo, self.type).then(res => {
self.info = res.data.data; self.info = res.data.data;
self.status = res.data.data.detailStatus; self.status = res.data.data.detailStatus;
self.latitude = self.info.lat; // self.latitude = self.info.lat;
self.longitude = self.info.lon; // self.longitude = self.info.lon;
self.covers[0].latitude = self.info.lat; // self.covers[0].latitude = self.info.lat;
self.covers[0].longitude = self.info.lon; // self.covers[0].longitude = self.info.lon;
this.$refs.tMap.open(self.info.lon, self.info.lat)
if (self.info.lon > 1 && self.info.lat > 1) {
self.$nextTick(() => {
self.$api.sleep(1000).then(() => {
this.$refs.tMap.addFeature([{
id: self.info.id,
label: self.info.missionTitle,
lat: self.info.lat,
lon: self.info.lon,
}])
})
})
}
self.showDetail = true; self.showDetail = true;
if (self.type === 1) { if (self.type === 1) {
// 设置已读 // 设置已读

View File

@@ -95,9 +95,10 @@
岗位地址{{ info.address }} 岗位地址{{ info.address }}
</view> </view>
<view class="map"> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" <!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap" :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap"
:flag-tip="false"></super-map> :flag-tip="false"></super-map> -->
<zhuo-tianditu-MultiPoint-Mapper ref="tMap" :api-key="$config.apiKey"></zhuo-tianditu-MultiPoint-Mapper>
</view> </view>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> --> <!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</view> </view>
@@ -263,10 +264,23 @@
self.info = resData.data.data; self.info = resData.data.data;
self.status = resData.data.data.status; self.status = resData.data.data.status;
self.missionNo = resData.data.data.missionNo; self.missionNo = resData.data.data.missionNo;
self.latitude = self.info.lat; // self.latitude = self.info.lat;
self.longitude = self.info.lon; // self.longitude = self.info.lon;
self.covers[0].latitude = self.info.lat; // self.covers[0].latitude = self.info.lat;
self.covers[0].longitude = self.info.lon; // self.covers[0].longitude = self.info.lon;
this.$refs.tMap.open(self.info.lon, self.info.lat)
if (self.info.lon > 1 && self.info.lat > 1) {
self.$nextTick(() => {
self.$api.sleep(1000).then(() => {
this.$refs.tMap.addFeature([{
id: self.info.id,
label: self.info.jobName,
lat: self.info.lat,
lon: self.info.lon,
}])
})
})
}
self.showDetail = true; self.showDetail = true;
} }
}, },

View File

@@ -95,9 +95,10 @@
岗位地址{{ info.address }} 岗位地址{{ info.address }}
</view> </view>
<view class="map"> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" <!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap" :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap"
:flag-tip="false"></super-map> :flag-tip="false"></super-map> -->
<zhuo-tianditu-MultiPoint-Mapper ref="tMap" :api-key="$config.apiKey"></zhuo-tianditu-MultiPoint-Mapper>
</view> </view>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> --> <!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</view> </view>
@@ -250,10 +251,23 @@
self.info = res.data.data; self.info = res.data.data;
self.status = res.data.data.status; self.status = res.data.data.status;
self.missionNo = res.data.data.missionNo; self.missionNo = res.data.data.missionNo;
self.latitude = self.info.lat; // self.latitude = self.info.lat;
self.longitude = self.info.lon; // self.longitude = self.info.lon;
self.covers[0].latitude = self.info.lat; // self.covers[0].latitude = self.info.lat;
self.covers[0].longitude = self.info.lon; // self.covers[0].longitude = self.info.lon;
this.$refs.tMap.open(self.info.lon, self.info.lat)
if (self.info.lon > 1 && self.info.lat > 1) {
self.$nextTick(() => {
self.$api.sleep(1000).then(() => {
this.$refs.tMap.addFeature([{
id: self.info.id,
label: self.info.jobName,
lat: self.info.lat,
lon: self.info.lon,
}])
})
})
}
self.showDetail = true; self.showDetail = true;
}, error => { }, error => {
console.log(error); console.log(error);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@@ -10,7 +10,7 @@ export default {
}) !== false, }) !== false,
homeTitle: getStore({ homeTitle: getStore({
name: 'homeTitle' name: 'homeTitle'
}) || '德阳市智慧就业服务平台' }) || '管陶县智慧就业服务平台'
}, },
actions: {}, actions: {},
mutations: { mutations: {

View File

@@ -89,7 +89,7 @@ const user = {
// longitude: 104.404419, // longitude: 104.404419,
// }) // })
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'wgs84',
success: function(res) { success: function(res) {
const { const {
longitude, longitude,

View File

@@ -0,0 +1,226 @@
<template>
<view style="width: 100%;height: 100%;">
<view id="mapDiv" class="mapDiv" :apikey="apiKey" :prop="option" :change:prop="Trenderjs.initTMap"></view>
</view>
</template>
<script>
import tools from '../../tools.js'
import iconPath from '../../static/point.png'
export default {
name: 'TianDiTu-Map',
data() {
return {
Tmap: null,
option: {
type: '',
apikey: '',
cover: null,
lng: '',
lat: '',
png: iconPath
}
}
},
props: {
apiKey: {
type: String,
require: true,
default: ''
},
customIcon: {
type: String,
default: ''
}
},
methods: {
compliteonLoadTianDiTu() {
this.$emit('onLoadTianDiTu')
},
initCharts(lng, lat) {
this.option = {
...this.option,
apikey: this.apiKey,
lng,
lat,
png: this.customIcon || this.option.png,
type: 'open'
}
},
upDataCharts(lng, lat) {
this.option = {
...this.option,
type: 'Icon',
lng,
lat,
png: this.customIcon || this.option.png,
type: 'update'
}
},
addFeature(cover) {
this.option = {
...this.option,
type: 'Icon',
cover,
png: this.customIcon || this.option.png,
type: 'addFeature'
}
},
selectItem(info) {
this.$emit('onSelect', info)
}
}
}
</script>
<script module="Trenderjs" lang="renderjs">
var Tmap = null;
export default {
data() {
return {
options: {},
}
},
mounted() {
// if (typeof window.T === 'object') {
// console.warn('--------天地图已加载--------');
// } else {
// if (this.apiKey) {
// const script = document.createElement('script')
// script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.apiKey
// script.onload = this.initChartsRender.bind(this)
// document.head.appendChild(script)
// }
// }
},
methods: {
initTMap(newValue, oldValue, ownerInstance, instance) {
this.options = newValue
if (newValue.type === 'open' && newValue.apikey) {
if (!window.T) {
const script = document.createElement('script')
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.options.apikey
script.onload = this.initChartsRender.bind(this)
document.head.appendChild(script)
console.log('open')
} else {
const {
lng,
lat
} = this.options
Tmap = null;
Tmap = new T.Map('mapDiv', {
projection: 'EPSG:4326',
});
this.upDataChartsRender(lng, lat)
}
} else {
const {
lng,
lat,
cover
} = newValue
switch (newValue.type) {
case 'update':
this.upDataChartsRender(lng, lat)
break;
case 'addFeature':
Tmap.clearOverLays()
cover.map((item, index) => {
this.setIcon(item.lon, item.lat, false, true, false, item)
})
break;
default:
break;
}
}
},
initChartsRender() {
this.$ownerInstance.callMethod('compliteonLoadTianDiTu')
const {
lng,
lat
} = this.options
var that = this;
Tmap = new T.Map('mapDiv', {
projection: 'EPSG:4326',
});
this.upDataChartsRender(lng, lat)
},
upDataChartsRender(lng, lat, zoom = 15) {
if (!Tmap) return
Tmap.centerAndZoom(new T.LngLat(lng, lat), zoom);
},
setIcon(lng, lat, isClear, isClick = false, isLabel = false, item) {
if (isClear) {
Tmap.clearOverLays()
}
const latlng = new T.LngLat(lng, lat)
const icon = new T.Icon({
iconUrl: this.options.png,
iconSize: new T.Point(30, 30),
iconAnchor: new T.Point(15, 30)
});
if (isLabel) {
const label = new T.Label({
text: `<div style="max-width: 50px; overflow: hidden">${item.label}</div>`,
position: latlng,
offset: new T.Point(-50, 0)
});
Tmap.addOverLay(label);
}
const marker = new T.Marker(latlng, {
icon
});
if (isClick) {
this.removeMarkerClick(marker);
//注册标注的点击事件
marker.addEventListener("click", this.MarkerClick.bind(null, item));
}
Tmap.addOverLay(marker);
},
removeMarkerClick(marker) {
//移除标注的点击事件
marker.removeEventListener("click", this.MarkerClick);
},
MarkerClick(item, e) {
this.openInfo(item.label, e)
this.$ownerInstance.callMethod('selectItem', item)
},
openInfo(content, e) {
const point = e.lnglat;
const marker = new T.Marker(point); // 创建标注
const markerInfoWin = new T.InfoWindow(content, {
offset: new T.Point(0, -30)
}); // 创建信息窗口对象
Tmap.openInfoWindow(markerInfoWin, point); //开启信息窗口
}
},
}
</script>
<style scoped>
#mapDiv {
width: 100%;
height: 100%;
}
/deep/ .tdt-control-copyright {
display: none;
}
/deep/ .tdt-label {
/* background: transparent;
box-shadow: none;
border: 0; */
}
/deep/ .tdt-pane {
z-index: 0;
}
</style>

View File

@@ -0,0 +1,206 @@
<template>
<view style="width: 100%; height: 100%;">
<view class="mask" style="width: 100%; height: 100%;">
<tiandituMap ref="tiandituMapRefs" @onLoadTianDiTu="initMaps" @onSelect="selectPoint" :apiKey="apiKey"
:customIcon="icon">
</tiandituMap>
</view>
</view>
</template>
<script>
import tiandituMap from './tianditu-map.vue'
import tools from '../../tools.js'
export default {
name: 'zhuozhuoTiandituPlugin',
components: {
tiandituMap,
},
props: {
apiKey: {
type: String,
require: true,
default: ''
},
icon: {
type: String,
default: ''
}
},
data() {
return {
winWidth: 0,
winHeight: 0,
winTop: 0,
visible: false,
datalist: [],
selectItem: {},
iStatusBarHeight: 0,
option: {
apikey: 123123,
}
}
},
created() {
var that = this
// #ifdef APP
// 44 + 10 44: search Input height
const searchHeight = this.search ? 54 : 10
const {
statusBarHeight,
screenHeight,
windowHeight
} = uni.getSystemInfoSync()
if (screenHeight === windowHeight) {
that.iStatusBarHeight = statusBarHeight + searchHeight;
} else {
that.iStatusBarHeight = 0;
}
// #endif
uni.getSystemInfo({
success: function(res) {
that.winWidth = res.windowWidth
that.winHeight = res.windowHeight
that.winTop = res.windowTop
}
});
},
methods: {
open(lon, lat) {
if (lon && lat) {
this.visible = true
this.$nextTick(() => {
this.$refs.tiandituMapRefs.initCharts(lon, lat)
})
} else {
console.error('请传入lon, lat')
}
},
upDateLonLat(cover) {
if (lon && lat) {
this.$refs.tiandituMapRefs.upDataCharts(lon && lat)
} else {
console.error('请传入lon, lat')
}
},
addFeature(cover) {
if (cover && Array.isArray(cover) && cover.length) {
this.$refs.tiandituMapRefs.addFeature(cover)
} else {
console.error('请传入 cover', cover)
}
},
selectPoint(e) {
this.$emit('onSelect', e)
},
initMaps() {
console.warn('--------天地图加载完成--------');
this.$emit('onLoad')
},
}
}
</script>
<style scope>
.mask {
/* overflow: hidden; */
/* position: fixed;
left: 0;
z-index: 399; */
background-color: #FFFFFF;
}
/* footer */
.list-boxd {
position: absolute;
bottom: 0;
left: 0;
z-index: 401;
right: 0;
border-radius: 14px 14px 0 0;
background: #FFFFFF;
transition: all 1s;
}
.list-header {
height: 20px;
position: relative;
border-bottom: 1px solid #f3f4f6;
cursor: pointer;
}
.list-header::after {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
content: '';
height: 6px;
width: 60px;
border-top: 1px solid #e8e8e8;
border-bottom: 1px solid #e8e8e8;
}
.list-content {
max-height: 50vh;
overflow-y: scroll;
}
.card {
min-height: 44px;
padding: 12px;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
}
.card-left {
display: flex;
flex-direction: column;
justify-content: center;
}
.card-right {
padding-right: 10px;
}
.arrow {
border-top: 2px solid #666666;
border-right: 2px solid #666666;
width: 10px;
height: 10px;
transform: rotate(45deg);
}
.card:active {
background-color: #f3f4f6;
}
.card::after {
position: absolute;
content: '';
bottom: 0;
height: 1px;
background-color: #e8e8e8;
width: 90%;
}
.card:last-child::after {
height: 0;
background-color: #FFFFFF;
}
.card-title {
font-size: 18px;
}
.card-text {
color: #e8e8e8;
font-size: 13px;
}
</style>

View File

@@ -0,0 +1,83 @@
{
"id": "zhuo-tianditu-MultiPoint-Mapper",
"displayName": "zhuo-tianditu-MultiPoint-Mapper",
"version": "1.0.0",
"description": "zhuo-tianditu-MultiPoint-Mapper",
"keywords": [
"zhuo-tianditu-MultiPoint-Mapper"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "u",
"aliyun": "u",
"alipay": "u"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u",
"app-uvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

View File

@@ -0,0 +1 @@
# zhuo-tianditu-MultiPoint-Mapper

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,106 @@
/**
* @param title String提示的内容
* @param duration String提示的延迟时间单位毫秒默认1500
* @param mask Boolean是否显示透明蒙层防止触摸穿透默认false
* @param icon String图标success、error、fail、exception、loading、none默认none
**/
export function createMessage(title, duration = 1500, mask = false, icon = "none") {
uni.showToast({
title,
duration: duration,
mask,
icon
});
}
/**
* @param url String请求的地址默认none
* @param data Object请求的参数默认{}
* @param method String请求的方式默认GET
* @param loading Boolean是否需要loading 默认false
* @param header Objectheaders默认{}
* @returns promise
**/
export function createRequest(url, data = {}, loading = false, method = 'GET', header = {}) {
if (loading) {
uni.showLoading({
title: '请稍后',
mask: true
})
}
return new Promise((resolve, reject) => {
uni.request({
url: url,
method: method,
data: data,
header: header,
success: res => {
if (res.statusCode === 200) {
resolve(res.data)
} else {
if (res.data.msg) {
const str = typeof res.data.resolve === 'string' ? ',' + res.data.resolve :
''
createMessage(res.data.msg + str)
}
throw new Error('请求错误 ' + url)
reject()
}
},
fail: (err) => {
reject(err)
},
complete: () => {
uni.hideLoading();
}
});
})
}
/**
* 数据格式化
* @param obj Object响应的数据
* @param type Number 0 1处理类型
* @returns Object {address = string, name = string, location = {lon, lat }, infomation = {}}
*/
export function formatterAdressLocation(obj, type) {
switch (type) {
case 1:
return {
address: obj.formatted_address,
name: '',
location: obj.location,
infomation: obj.addressComponent
}
break;
case 2:
const [lon, lat] = obj.lonlat.split(',')
return {
address: obj.address,
name: obj.name,
location: {
lon,
lat
},
infomation: obj
}
break
case 3:
return {
address: obj.location.keyWord,
name: '',
location: {
lon: obj.location.lon,
lat: obj.location.lat,
},
infomation: obj.location
}
default:
break;
}
}
export default {
createMessage,
createRequest,
formatterAdressLocation
}

View File

@@ -86,6 +86,10 @@ async function DoAjax(options, config = {}) {
if (baseUrl) { if (baseUrl) {
options.url = baseUrl + options.url options.url = baseUrl + options.url
} }
// 馆陶替换url
if (options.url.startsWith('/api')) {
options.url = options.url.replace(/^\/api/, '/api/gt');
}
options = Object.assign({}, options, { options = Object.assign({}, options, {
header header
}); });
@@ -190,24 +194,24 @@ export function Promisify(func) {
export function GoLogin() { export function GoLogin() {
if (showModal) { if (showModal) {
showModal = false showModal = false
location.href = "https://dy12333.org.cn/h5/" // location.href = "https://dy12333.org.cn/h5/"
// uni.showModal({ uni.showModal({
// title: "提示", title: "提示",
// content: "您还未登录,点击确认去登录", content: "您还未登录,点击确认去登录",
// success({ success({
// confirm confirm
// }) { }) {
// if (confirm) { if (confirm) {
// uni.redirectTo({ uni.redirectTo({
// url: "/pages/login/login" url: "/pages/login/login"
// }); });
// } }
// showModal = true showModal = true
// }, },
// fail() { fail() {
// showModal = true showModal = true
// } }
// }) })
} }
} }

View File

@@ -6,10 +6,12 @@ module.exports = {
port: 1887, port: 1887,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://10.165.0.173:8000', // target: 'http://192.168.1.115:8000',
// target: 'http://39.98.184.58:8000',
target: 'http://39.98.44.136:80',
ws: true, ws: true,
pathRewrite: { pathRewrite: {
'^/api': '/' '^/api': '/api'
} }
}, },
'/qq/map': { '/qq/map': {