lsw il y a 10 mois
Parent
commit
5754da6620

+ 1 - 1
app/App.vue

@@ -30,7 +30,7 @@ button::after {
 /**挂载iconfont字体图标*/
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/c/font_4507607_i7dnujjm0kj.ttf?t=1718351208557') format('truetype');
+	src: url('https://at.alicdn.com/t/c/font_4507607_2j8og21e0fv.ttf?t=1718384228460') format('truetype');
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 .icon {

+ 7 - 7
app/common/common.scss

@@ -162,17 +162,17 @@
 		.out {
 			padding: 5px;
 			.int {
-				padding: 8px 5px 8px 5px;
+				padding: 5px 5px 5px 5px;
 				position: relative;
 				.icon {
-					font-size: 30px;
-					width: 50px;
-					height: 50px;
+					font-size: 25px;
+					width: 45px;
+					height: 45px;
 					margin: 0 auto;
 					color: white;
-					border-radius: 8px;
-					line-height: 52px;
-					box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+					border-radius: 18px;
+					line-height: 47px;
+					box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
 				}
 				.title {
 					font-size: 14px;

+ 3 - 3
app/components/job/job.vue

@@ -7,9 +7,9 @@
 			</view>
 			<view class="bot">
 				<view class="address omit">
-					<text>{{ item.regionName }}</text>
-					<text class="icon">&#xe757;</text>
-					<text>{{ item.location }}</text>
+					<text>{{ item.regionName || '地点不限' }}</text>
+					<text class="icon" v-if="item.location">&#xe757;</text>
+					<text>{{ item.location || '' }}</text>
 				</view>
 				<view class="distance" v-if="item.distance">距离你{{ item.distance }}km</view>
 			</view>

+ 12 - 8
app/pages.json

@@ -11,6 +11,12 @@
 			}
 		},
 		{
+			"path": "pages/job/map",
+			"style": {
+				"navigationBarTitleText": "地图找工"
+			}
+		},
+		{
 			"path": "pages/job/list",
 			"style": {
 				"navigationBarTitleText": "找工作",
@@ -205,17 +211,15 @@
 			}
 		},
 		{
-			"path" : "pages/user/resume/preview",
-			"style" : 
-			{
-				"navigationBarTitleText" : "查看简历"
+			"path": "pages/user/resume/preview",
+			"style": {
+				"navigationBarTitleText": "查看简历"
 			}
 		},
 		{
-			"path" : "pages/other/setting",
-			"style" : 
-			{
-				"navigationBarTitleText" : "设置"
+			"path": "pages/other/setting",
+			"style": {
+				"navigationBarTitleText": "设置"
 			}
 		}
 	],

+ 51 - 128
app/pages/index/index.vue

@@ -12,59 +12,48 @@
 		</view>
 		<!--轮播图-->
 		<view class="banner">
-			<u-swiper circular :radius="5" :indicator="true" keyName="pic" :list="bannerList" :height="150" class="uni-swiper" @click="click"></u-swiper>
+			<u-swiper circular :radius="5" :indicator="true" keyName="pic" :list="bannerList" :height="160" class="uni-swiper" @click="click"></u-swiper>
 		</view>
-		<!--找工作-->
-		<view class="tab">
-			<u-tabs :scrollable="false" :inactiveStyle="{ fontSize: '17px' }" :activeStyle="{ color: '#3c9cff', fontSize: '17px' }" :list="tab" :current="current" @click="click"></u-tabs>
-		</view>
-		<view class="jobs" v-if="current == 0">
-			<view class="full_time" v-for="(item, index) in jobs" :key="index" @click="detail(item)">
+		<!--菜单-->
+		<view class="menu">
+			<view class="cd" @click="go('/pages/job/map')">
 				<view class="out">
 					<view class="int">
-						<image :src="item.url" mode="aspectFill"></image>
-						<view class="title omit">{{ item.name }}</view>
-						<view class="desc">{{ item.job }}</view>
-						<view class="price">{{ item.price }}/月</view>
-						<view class="address">
-							<text class="icon">&#xe62e;</text>
-							<text>南宁青秀山</text>
-						</view>
+						<view class="icon" style="background-color: #03a9f4">&#xe647;</view>
+						<view class="title">地图找工</view>
 					</view>
 				</view>
 			</view>
-		</view>
-		<view class="jobs" v-if="current == 1">
-			<view class="full_time" v-for="(item, index) in jobs" :key="index" @click="detail(item)">
+			<view class="cd" @click="go('/pages/job/list?type=0')">
 				<view class="out">
 					<view class="int">
-						<image :src="item.url" mode="aspectFill"></image>
-						<view class="title omit">{{ item.name }}</view>
-						<view class="desc">{{ item.job }}</view>
-						<view class="price">{{ item.price }}元/月</view>
-						<view class="address">
-							<text class="icon">&#xe62e;</text>
-							<text>距你2km</text>
-						</view>
+						<view class="icon" style="background-color: #4581fb">&#xe9d9;</view>
+						<view class="title">全职</view>
 					</view>
 				</view>
 			</view>
-		</view>
-		<view class="jobs" v-if="current == 2">
-			<view class="part_time" v-for="(item, index) in jobs" :key="index" @click="detail(item)">
-				<view class="title omit">兼职{{ item.job }}</view>
-				<view class="price">
-					300/天
-					<text class="icon">&#xe619;</text>
-					日结
+			<view class="cd" @click="go('/pages/job/list?type=1')">
+				<view class="out">
+					<view class="int">
+						<view class="icon" style="background-color: #ff5722">&#xe62a;</view>
+						<view class="title">兼职</view>
+					</view>
 				</view>
-				<text class="date">4.16-4.17</text>
-				<view class="address">
-					<text @click.stop="company()">{{ item.name }}</text>
-					<text class="add">申请</text>
+			</view>
+			<view class="cd" @click="go('/pages/index/index')">
+				<view class="out">
+					<view class="int">
+						<view class="icon" style="background-color: #03a9f4">&#xe725;</view>
+						<view class="title">结算广场</view>
+					</view>
 				</view>
 			</view>
 		</view>
+		<!--找工作-->
+		<!-- 		<view class="tab">
+			<u-tabs :inactiveStyle="{ fontSize: '15px' }" :activeStyle="{ color: '#3c9cff', fontSize: '17px' }" :list="tab" :current="current" @click="click"></u-tabs>
+		</view> -->
+		<view class="jobs" v-if="current == 0"></view>
 	</view>
 </template>
 <script>
@@ -73,67 +62,37 @@ export default {
 		return {
 			ip: this.http.ip,
 			current: 0,
-			tab: [{ name: '你的工作' }, { name: '身边工作' }, { name: '现结工作' }],
+			tab: [{ name: '最新工作' }, { name: '身边工作' }, { name: '现结工作' }],
 			user: {},
-			jobs: [
-				{
-					name: '广西龙坚贸易有限公司',
-					job: '装卸搬运工',
-					price: '4000',
-					url: 'https://chenglantimes.com/prod-api/profile/upload/2024/04/29/1714401904451.jpg'
-				},
-				{
-					name: '韵达速递',
-					job: '快递装卸工',
-					price: '4700',
-					url: 'https://chenglantimes.com/prod-api/profile/upload/2024/04/29/1714401871968.jpg'
-				},
-				{
-					name: '北京滴滴有限公司',
-					job: '滴滴快车专车司机',
-					price: '4200',
-					url: 'https://chenglantimes.com/prod-api/profile/upload/2024/04/29/1714401886712.jpg'
-				},
-				{
-					name: '北京美团外卖有限公司',
-					job: '美团骑手送餐员',
-					price: '3700',
-					url: 'https://chenglantimes.com/prod-api/profile/upload/2024/04/29/1714401895824.jpg'
-				},
-				{
-					name: '字节跳动有限公司',
-					job: '女主播',
-					price: '5500',
-					url: 'https://chenglantimes.com/prod-api/profile/upload/2024/04/29/1714402008141.jpg'
-				},
-				{
-					name: '广西龙坚贸易有限公司',
-					job: '装卸搬运工',
-					price: '4000',
-					url: 'https://chenglantimes.com/prod-api/profile/upload/2024/04/29/1714402008141.jpg'
-				}
-			],
 			bannerList: [],
 			noticeList: []
 		};
 	},
-	onShow() {
-		this.getLocation();
-		if (this.hasLogin()) {
-			//this.getUserInfo();
-		}
-	},
+	onShow() {},
 	onLoad() {
-		this.getData();
-		this.http.request({
-			url: '/app/common/column/city/all',
-			success: (res) => {
-				uni.setStorageSync('city_all', res.data.data);
-			}
-		});
+		this.initData();
 	},
 	methods: {
-		getLocation() {
+		initData() {
+			//首页数据
+			this.http.request({
+				url: '/app/home/index',
+				success: (res) => {
+					this.contract = res.data.data.contract;
+					this.bannerList = res.data.data.bannerList;
+					res.data.data.noticeList.forEach((item) => {
+						this.noticeList.push(item.title);
+					});
+				}
+			});
+			//初始化所有地区
+			this.http.request({
+				url: '/app/common/column/city/all',
+				success: (res) => {
+					uni.setStorageSync('city_all', res.data.data);
+				}
+			});
+			//授权获取位置
 			uni.authorize({
 				scope: 'scope.userLocation',
 				success: (s) => {
@@ -149,47 +108,11 @@ export default {
 				}
 			});
 		},
-		detail() {
-			uni.navigateTo({
-				url: '/pages/clsd/job/detail'
-			});
-		},
-		company() {
-			uni.navigateTo({
-				url: '/pages/clsd/job/company'
-			});
-		},
 		click(e) {
 			this.current = e.index;
 		},
-		getUserInfo() {
-			this.http.request({
-				url: '/app/user/info',
-				success: (res) => {
-					this.user = res.data.data;
-				}
-			});
-		},
-		getData() {
-			this.http.request({
-				url: '/app/home/index',
-				success: (res) => {
-					this.contract = res.data.data.contract;
-					this.bannerList = res.data.data.bannerList;
-					res.data.data.noticeList.forEach((item) => {
-						this.noticeList.push(item.title);
-					});
-				}
-			});
-		},
 		go(url) {
-			if (this.hasLogin()) {
-				uni.navigateTo({
-					url: '/pages/index/index'
-				});
-			} else {
-				uni.navigateTo({ url: '/pages/user/login' });
-			}
+			uni.navigateTo({ url: url });
 		}
 	}
 };

+ 12 - 1
app/pages/job/detail.vue

@@ -70,7 +70,18 @@ export default {
 			this.http.request({
 				url: '/app/deliver/send/' + this.item.id,
 				success: (res) => {
-					uni.showModal({content: '投递成功,等待企业回应',showCancel: false});
+					if (res.data.code == 7979) {
+						uni.showModal({
+							title: '提示',
+							content: res.data.msg,
+							showCancel: false,
+							success: (res) => {
+								uni.navigateTo({ url: '/pages/user/resume/index' });
+							}
+						});
+					} else {
+						uni.showModal({ content: '投递成功,等待企业回应', showCancel: false });
+					}
 				}
 			});
 		}

+ 4 - 1
app/pages/job/list.vue

@@ -38,6 +38,9 @@ export default {
 			this.param.longitude = this.getLocation().longitude;
 		}
 		this.param.type = e.type || 0;
+		setTimeout(() => {
+			uni.setNavigationBarTitle({ title: this.param.type == 0 ? '全职' : '兼职' });
+		}, 300);
 		this.getData();
 	},
 	methods: {
@@ -57,7 +60,7 @@ export default {
 			this.refresh();
 		},
 		confirm(e) {
-			Object.assign(this.param,e);
+			Object.assign(this.param, e);
 			this.refresh();
 		},
 		go(url) {

+ 108 - 0
app/pages/job/map.vue

@@ -0,0 +1,108 @@
+<template>
+	<view>
+		<view class="search">
+			<view class="bbc">
+				<u-search placeholder="搜索工作" :disabled="true" bgColor="white" :showAction="false" @click="go('/pages/job/search')"></u-search>
+			</view>
+		</view>
+		<map :latitude="param.latitude" scale="10.3" show-location :longitude="param.longitude" :markers="markers" @markertap="click"></map>
+		<view class="footer" v-show="item.id">
+			<view class="bbc">
+				<view class="item_job" @click="go('/pages/job/detail?id=' + item.id)">
+					<view class="top">
+						<view class="title omit">{{ item.title }}</view>
+						<view class="salary">{{ item.salary }}</view>
+					</view>
+					<view class="bot">
+						<view class="address omit">
+							<text>{{ item.regionName }}</text>
+							<text class="icon">&#xe757;</text>
+							<text>{{ item.location }}</text>
+						</view>
+						<view class="distance" v-if="item.distance">距离你{{ item.distance }}km</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			a1: 'https://chenglantimes.com/prod-api/profile/upload/2024/06/15/a1.png',
+			a2: 'https://chenglantimes.com/prod-api/profile/upload/2024/06/15/a2.png',
+			item: {},
+			list: [],
+			param: { orderBy: 'id', type: 0 },
+			markers: []
+		};
+	},
+	onLoad(e) {
+		if (this.getLocation()) {
+			this.param.latitude = this.getLocation().latitude;
+			this.param.longitude = this.getLocation().longitude;
+		}
+		this.getData();
+	},
+	methods: {
+		getData() {
+			this.http.request({
+				url: '/app/position/map',
+				data: this.param,
+				success: (res) => {
+					this.list = res.data.data;
+					this.list.forEach((item, index) => {
+						this.markers.push({
+							id: index,
+							width: 40,
+							height: 40,
+							latitude: item.latitude,
+							longitude: item.longitude,
+							iconPath: this.a1
+						});
+					});
+				}
+			});
+		},
+		click(e) {
+			this.item = this.list[e.markerId];
+			let marker = this.markers.filter((item) => item.id == e.markerId)[0];
+			this.markers.forEach((item) => (item.iconPath = this.a1));
+			marker.iconPath = this.a2;
+		},
+		go(url) {
+			uni.navigateTo({ url: url });
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.search {
+	position: fixed;
+	width: 100%;
+	top: 0px;
+	z-index: 11;
+}
+map {
+	width: 100%;
+	height: 100%;
+	position: fixed;
+	top: 0px;
+	z-index: 1;
+}
+.bbc {
+	padding: 15px;
+	.item_job {
+		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
+	}
+}
+.footer {
+	position: fixed;
+	width: 100%;
+	bottom: 20px;
+	z-index: 11;
+}
+</style>

+ 7 - 2
app/pages/user/index.vue

@@ -170,10 +170,15 @@ export default {
 		};
 	},
 	onShow() {
-		/* 	 this.user = {
-				token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjRjMzVmMzYyLTE1ZDItNDcxNi05NGEzLTI0YzljNGNmYTExNiJ9.jb5HwsEUCPCuwvIXseSjARBbTHjR3sD0crQTRb4PdwY5YSGa7V4WiMAvYFdbc1HNkdd9H0IQLLjgLP9ZSRUlxA'
+		/* 		 	 this.user = {
+				token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQwZGQzNWVlLTE5OWQtNDJhMy1hY2IxLTAxMmQwODI2YWNlZiJ9.2UejJW9OjqrkCQGzJHrSqO4JyzTeoezBt9m6y0xbMdIQvl0mko6gCRuXNmAOWUBvyowB7eYhk55RRcPzJUez8w'
 			};
 			uni.setStorageSync('user', this.user); */
+/* 		this.user = {
+			token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjM1MDZmY2NkLTg3ODMtNDc1OS1hYTY2LWY1ODMzNmU1MDYyZCJ9.GDs8mOUVSsqQMxZVHxyQi97Tfba4ztGsa_zT6Fjct0OVlXfQwwzioUtVX27UNRyzdOv0-ySbxGawoJzYjEidwA'
+		};
+		uni.setStorageSync('user', this.user); */
+
 		if (this.hasLogin()) {
 			this.getUserInfo();
 		} else {

+ 1 - 1
app/pages/user/resume/deliver/list.vue

@@ -5,7 +5,7 @@
 				<view class="title omit">{{ item.title }}</view>
 				<view class="salary">{{ item.salary }}</view>
 			</view>
-			<view class="bot br">
+			<view class="bot bt">
 				<view class="address omit">{{ item.address }}</view>
 				<view class="distance">{{ item.createTime }}</view>
 			</view>

+ 8 - 8
app/pages/user/resume/index.vue

@@ -7,10 +7,10 @@
 					<view class="name">
 						<text>{{ item.name ? item.name : '姓名' }}</text>
 					</view>
-					<view class="item">年龄:{{ item.age }},性别:{{ item.sex }}</view>
-					<view class="item">工作经验:{{ item.experience }}年</view>
-					<view class="item">手机号码:{{ item.phone }}</view>
-					<view class="item">电子邮箱:{{ item.email }}</view>
+					<view class="item">年龄:{{ item.age || '' }},性别:{{ item.sex || '' }}</view>
+					<view class="item">工作经验:{{ item.experience || '' }}年</view>
+					<view class="item">手机号码:{{ item.phone || '' }}</view>
+					<view class="item">电子邮箱:{{ item.email || '' }}</view>
 				</view>
 				<image :src="item.avatar ? ip + item.avatar : '../../../static/ls.jpg'" mode="widthFix" class="tx" v-if="item.avatar"></image>
 			</view>
@@ -20,16 +20,16 @@
 			<view class="label">
 				<text class="title">个人优势</text>
 			</view>
-			<view class="ellip">{{ item.advantage }}</view>
+			<view class="ellip">{{ item.advantage || '还未输入个人优势' }}</view>
 		</view>
 		<!--求职期望-->
 		<view class="row">
 			<view class="label">
 				<text class="title">求职期望</text>
 			</view>
-			<view class="item">工作城市:{{ item.cityName }}</view>
-			<view class="item">意向工作:{{ item.positionName }}</view>
-			<view class="item">期望薪资:{{ item.salary }}</view>
+			<view class="item">工作城市:{{ item.cityName || '' }}</view>
+			<view class="item">意向工作:{{ item.positionName || '' }}</view>
+			<view class="item">期望薪资:{{ item.salary || '' }}</view>
 		</view>
 		<button class="btn" @click="go('/pages/user/resume/edit?item=' + JSON.stringify(item))">编辑</button>
 	</view>

+ 6 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_PositionController.java

@@ -34,6 +34,12 @@ public class Api_PositionController extends BaseController {
         return getDataTable(list);
     }
 
+    @GetMapping("/map")
+    public AjaxResult map(@Validated PositionQueryDto dto) {
+        List<PositionListVo> list = positionService.indexList(dto);
+        return AjaxResult.success(list);
+    }
+
     @GetMapping("/detail/{id}")
     public AjaxResult detail(@PathVariable("id") Long id) {
         return positionService.detail(id);

+ 1 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/config/InterceptorConfig.java

@@ -25,6 +25,7 @@ public class InterceptorConfig implements WebMvcConfigurer {
         registration.excludePathPatterns("/app/notice/**"); //排除
         registration.excludePathPatterns("/app/news/**"); //排除
         registration.excludePathPatterns("/app/position/list"); //排除
+        registration.excludePathPatterns("/app/position/map"); //排除
         registration.excludePathPatterns("/app/position/detail/**"); //排除
         registration.excludePathPatterns("/app/enterprise/detail/**"); //排除
     }

+ 8 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/vo/PositionListVo.java

@@ -14,6 +14,8 @@ public class PositionListVo{
 
     private Long id;
 
+    private Integer type;
+
     @ApiModelProperty(value = "职位名称")
     private String title;
 
@@ -29,6 +31,12 @@ public class PositionListVo{
     @ApiModelProperty(value = "地点名")
     private String location;
 
+    @ApiModelProperty(value = "经度")
+    private String longitude;
+
+    @ApiModelProperty(value = "维度")
+    private String latitude;
+
     @ApiModelProperty(value = "距离km")
     private String distance;
 

+ 5 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/ResumeDeliverServiceImpl.java

@@ -3,6 +3,7 @@ package com.ruoyi.web.work.service.impl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.web.work.api.util.AppUtil;
 import com.ruoyi.web.work.domain.Position;
 import com.ruoyi.web.work.domain.Resume;
@@ -45,6 +46,10 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
         if (position == null || position.getState() != 0 || position.getAudit() != 1) {
             return AjaxResult.error("该职位不存在或已下架");
         }
+        Resume resume = resumeService.getById(AppUtil.getUser().getId());
+        if (StringUtils.isEmpty(resume.getName()) || StringUtils.isEmpty(resume.getAvatar())) {
+            return AjaxResult.error(7979,"请先完善简历再投递");
+        }
         ResumeDeliver resumeDeliver = resumeDeliverMapper.check(position.getId(), AppUtil.getUser().getId());
         if (resumeDeliver != null) {
             return AjaxResult.error("请勿重复投递简历");

+ 6 - 3
ruoyi-admin/src/main/resources/mapper/work/PositionMapper.xml

@@ -24,19 +24,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="indexList" resultType="com.ruoyi.web.work.domain.vo.PositionListVo">
         SELECT
         id,
+        type,
         title,
         experience,
         salary,
         region_name,
-        location
+        location,
+        latitude,
+        longitude
         <if test="longitude !=null and longitude !=null ">,ROUND( ST_Distance_Sphere ( POINT ( #{longitude}, #{latitude} ), POINT ( longitude, latitude ))/ 1000, 2 ) AS distance</if>
         FROM
         tb_position
         WHERE
         state = 0
         AND audit = 1
-        AND type = #{type}
-        <if test="enterpriseId != null "> and user_id = #{enterpriseId}</if>
+        <if test="type != null "> AND type = #{type}</if>
+        <if test="enterpriseId != null "> AND user_id = #{enterpriseId}</if>
         <if test="title != null and title != ''"> AND title LIKE concat('%', #{title}, '%')</if>
         <if test="positionId != null"> AND position_id=#{positionId}</if>
         <if test="experience != null  and experience.size() > 0">AND experience IN (<foreach collection="experience" item="name" separator=",">#{name}</foreach>)</if>