diff --git a/api/map.js b/api/map.js
index 25db316..d312e50 100644
--- a/api/map.js
+++ b/api/map.js
@@ -59,4 +59,10 @@ export const querySearch = (keyword, key) => {
reject(err)
})
})
-}
\ No newline at end of file
+}
+
+export const geQueryJobsByNearby = (params) => request({
+ url: '/api/jobslink-api/nearby/job/queryJobsByNearby',
+ method: 'get',
+ params
+});
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 11e5f77..95e07f3 100644
--- a/pages.json
+++ b/pages.json
@@ -398,6 +398,15 @@
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": false
}
+ },
+ {
+ "path": "pages/project/map",
+ "style": {
+ "backgroundTextStyle": "dark",
+ "navigationBarTextStyle": "black",
+ "enablePullDownRefresh": true,
+ "navigationStyle": "custom"
+ }
}
],
"subPackages": [{
diff --git a/pages/project/map.vue b/pages/project/map.vue
new file mode 100644
index 0000000..fdba1ef
--- /dev/null
+++ b/pages/project/map.vue
@@ -0,0 +1,434 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{productInfo.missionTitle}}
+
+
+ {{ productInfo.cityId }} | {{productInfo.address}} | 距离:{{distance}}
+
+
+
+ 招聘时间: {{productInfo.stime}}-{{productInfo.etime}}
+
+
+
+ {{productInfo.experienceDesc}} | {{education[productInfo.education]}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/project/project.vue b/pages/project/project.vue
index e0b0f27..e4466a7 100644
--- a/pages/project/project.vue
+++ b/pages/project/project.vue
@@ -3,9 +3,9 @@
搜 索
-
+
-
+
四川德阳市
@@ -174,7 +174,8 @@
isSearch: false,
searchData: {},
- nonReactiveArray: ["推荐零工岗位", "推荐全职岗位"],
+ // nonReactiveArray: ["推荐任务", "推荐岗位", "个体户招工"],
+ nonReactiveArray: ["推荐零工任务", "推荐岗位"],
}
},
onLoad: function() {
diff --git a/static/img/direction.png b/static/img/direction.png
new file mode 100644
index 0000000..952b10d
Binary files /dev/null and b/static/img/direction.png differ
diff --git a/static/img/direction2.png b/static/img/direction2.png
new file mode 100644
index 0000000..e340e1c
Binary files /dev/null and b/static/img/direction2.png differ
diff --git a/static/img/gwpoint.png b/static/img/gwpoint.png
new file mode 100644
index 0000000..9614f00
Binary files /dev/null and b/static/img/gwpoint.png differ
diff --git a/static/img/mypoint.png b/static/img/mypoint.png
new file mode 100644
index 0000000..825734b
Binary files /dev/null and b/static/img/mypoint.png differ
diff --git a/static/img/taskpoint.png b/static/img/taskpoint.png
new file mode 100644
index 0000000..b4eb315
Binary files /dev/null and b/static/img/taskpoint.png differ
diff --git a/untils/tools.js b/untils/tools.js
index ca303be..0e3e4b9 100644
--- a/untils/tools.js
+++ b/untils/tools.js
@@ -1,4 +1,4 @@
-function onDialingPhoneNumber(phone) {
+export function onDialingPhoneNumber(phone) {
return new Promise((resolve, reject) => {
uni.makePhoneCall({
phoneNumber: phone, // 电话号码
@@ -11,8 +11,39 @@ function onDialingPhoneNumber(phone) {
});
})
}
+/**
+ * 个位数,加0前缀
+ * @param {*} number
+ * @returns
+ */
+export function addZeroPrefix(number) {
+ return number < 10 ? `0${number}` : number
+}
+
+export function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2) {
+ const R = 6371; // 地球平均半径,单位为公里
+ const dLat = deg2rad(lat2 - lat1);
+ const dLon = deg2rad(lon2 - lon1);
+ const a =
+ Math.sin(dLat / 2) * Math.sin(dLat / 2) +
+ Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
+ Math.sin(dLon / 2) * Math.sin(dLon / 2);
+ const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
+ const d = R * c;
+ return {
+ km: d,
+ m: d * 1000
+ };
+}
+
+// 将角度转换为弧度
+function deg2rad(deg) {
+ return deg * (Math.PI / 180);
+}
export default {
- onDialingPhoneNumber
+ onDialingPhoneNumber,
+ addZeroPrefix,
+ getDistanceFromLatLonInKm
}
\ No newline at end of file