zhengkaixin 1 ano atrás
pai
commit
150a0e342e

+ 16 - 2
apis/pagejs/packages.js

@@ -75,11 +75,25 @@ export function shareWorksList(data) {
  	})
 }
 
+export function cancelTraining(data) {
+ 	return requestWhite({
+ 		method: 'post',
+ 		data: data,
+ 		url: '/mobile/training/cancelTraining'
+ 	})
+}
+export function joinTraining(data) {
+ 	return requestWhite({
+ 		method: 'post',
+ 		data: data,
+ 		url: '/mobile/training/joinTraining'
+ 	})
+}
 export function trainingDetail(data) {
  	return requestWhite({
  		method: 'post',
  		data: data,
- 		url: '/mobile/news/trainingDetail'
+ 		url: '/mobile/training/trainingDetail'
  	})
 }
 
@@ -87,7 +101,7 @@ export function trainingList(data) {
  	return requestWhite({
  		method: 'post',
  		data: data,
- 		url: '/mobile/news/trainingList'
+ 		url: '/mobile/training/trainingList'
  	})
 }
 

+ 2 - 2
config/.env.dev.js

@@ -1,6 +1,6 @@
 const UNI_APP = {  
 	ProjectName :"荆州经开区共享用工平台",
-	 BASE_URL: 'http://192.168.77.162:8086/jk-temporary-workers-server/',
+	BASE_URL: 'http://192.168.77.162:8086/jk-temporary-workers-server/',
 	BASE_URL:"https://equipment.xiaoxinda.com/jk-temporary-workers-server/",
 	//IMG_URL:"http://www.jsrailway.com.cn/",
 	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
@@ -14,7 +14,7 @@ const UNI_APP = {
 	openId:"o_5WO4hc7MyyVNjSDePRIft6AokI",//个人企业都注册
 	
 	//openId:"001",// 个人企业 未注册
-	openId:"002",// 个人  注册 ,企业未
+	//openId:"002",// 个人  注册 ,企业未
 	//openId:"323",// 个人  未注册 ,企业 注册
 	 
 	//小鹏管家appid

+ 17 - 0
main.js

@@ -32,6 +32,23 @@ Vue.mixin({
 
 	},
 	methods: {
+		getAge(item){
+			var age=''
+			if(item&&item.idCard){
+				if(item.idCard.length==18){
+					var idCard=item.idCard.substring(6,10)
+					age=eval(new Date().getFullYear()+"-"+idCard)
+				}
+			}
+			return age
+		},
+		getTime(item){
+			var time=item.updateTime?item.updateTime:item.createTime;
+			if(time){
+				return time.substring(0,10)
+			}
+			return  ''
+		},
 		getUnit(settlementMethod,item){
 			
 			if(item){

+ 52 - 30
pages/main/index/index.vue

@@ -16,7 +16,7 @@
 		</view>
 		<!-- 幻灯片 -->
 		<view class="swiper">
-			<u-swiper :list="bannerlist"></u-swiper>
+			<u-swiper :list="bannerlist" @click="clickBanner"  ></u-swiper>
 
 		</view>
 		<!-- 功能区 -->
@@ -104,7 +104,7 @@
 					<view class="content-1">
 						<!-- 职位 -->
 						<view class="position">
-							<b>{{item.positionName}}</b>
+							{{item.positionName}}
 						</view>
 						<!-- 薪水 -->
 						<view class="salary">
@@ -114,16 +114,20 @@
 					<view class="content-2">
 						<!-- 标签 -->
 						<view class="tag">
-							<!-- <view class="tag-item">
-								个人
-							</view> -->
+							<view class="tag-item">
+								{{item.workArea}}
+							</view>
 							<view class="tag-item">
 								{{item.settlementMethodN}}
 							</view>
+							<view class="tag-item">
+								{{item.industryN}}
+							</view>
+							
 						</view>
 						<!-- 日期 -->
 						<view class="date">
-							{{item.createTime}}
+							{{getTime(item)}}
 						</view>
 					</view>
 					<view class="content-3">
@@ -131,7 +135,7 @@
 							{{item.contacts}}
 						</view>
 						<view class="address">
-							{{item.workArea}}{{item.address}}
+							{{item.address}}
 						</view>
 					</view>
 				</view>
@@ -172,15 +176,7 @@
 				backColor: {
 					color: '#ffffff'
 				},
-				bannerlist: [{
-						image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
-					},
-					{
-						image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
-					},
-					{
-						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
-					}
+				bannerlist: [
 				],
 				tabList: [{
 					name: '最新',
@@ -213,17 +209,12 @@
 				
 			}
 		},
+		
 		onLoad(op) {
-			if(op.shareMP){
-				if(op.t=='jobDetails'){
-					uni.navigateTo({
-						url:"/pages/packages/jobInformation/jobDetails?id="+op.id
-					})
-				}
-			}
+			
 			this.findRecruitHomePage();
-			this.bannerList()
-			this.findByOpenId();
+			this.getBannerList()
+			this.findByOpenId(op);
 		},
 		computed:{
 			showRecordsTotal(){
@@ -234,18 +225,36 @@
 			}
 		},
 		methods: {
-			bannerList(){
+			clickBanner(index,list) {
+					
+				var mod = list[index]
+			
+				if(mod){
+					if(mod.linkUrl){
+						console.log(mod)
+						uni.navigateTo({
+							url:mod.linkUrl
+						})
+					}
+				}
+			},
+			getBannerList(){
 				API.bannerList({
 								
 				}).then((res) => {
-									 
-				
+					this.bannerlist	=res.data.data.map(item=>{
+						return {
+							image:item.picUrl,
+							linkUrl:item.linkUrl
+						}
+					})	 
+					console.log(this.bannerlist)
 									 
 				}).catch(error => {
 									
 				})
 			},
-			findByOpenId(){
+			findByOpenId(op){
 				
 				 API_weixin.findByOpenId({
 					 openId:this.carhelp.getOpenId(),
@@ -256,6 +265,18 @@
 					 this.carhelp.setToken(res.data.token);
 					 this.carhelp.setPersonInfoPlus(res.data);
 					 
+					 if(op.shareMP){
+					 	if(op.t=='jobDetails'){
+					 		uni.navigateTo({
+					 			url:"/pages/packages/jobInformation/jobDetails?id="+op.id
+					 		})
+					 	}
+					 	if(op.t=='jobSearchDetails'){
+					 		uni.navigateTo({
+					 			url:"/pages/packages/choreInformation/jobSearchDetails?id="+op.id
+					 		})
+					 	}
+					 }
 				 }).catch(error => {
 					
 				 })
@@ -433,7 +454,7 @@
 						display: flex;
 
 						.tag-item {
-							width: 64rpx;
+							min-width: 64rpx;
 							height: 36rpx;
 							line-height: 36rpx;
 							border-radius: 8rpx;
@@ -442,6 +463,7 @@
 							font-size: 24rpx;
 							text-align: center;
 							margin-right: 12rpx;
+							padding: 0 12rpx;
 						}
 					}
 

+ 8 - 14
pages/packages/choreInformation/jobSearchDetails.vue

@@ -17,7 +17,7 @@
 					更新时间:{{getTime(info)}}
 				</view>
 				<view class="views">
-					浏览量:1
+					浏览量:{{info.browseNumber}}
 				</view>
 			</view>
 		</view>
@@ -69,16 +69,16 @@
 						<!-- 标签 -->
 						<view class="tags">
 							<view class="tag-item">
-								男
+								{{personInfo.gender==1?'':'女'}}
 							</view>
 							<view class="tag-item">
-								21
+								{{personInfo.age}}
 							</view>
 							<view class="tag-item">
-								2年以上
+								{{info.educationN}}
 							</view>
 							<view class="tag-item">
-								 高中
+								{{info.workExperienceN}}
 							</view>
 						</view>
 					</view>
@@ -185,8 +185,8 @@
 				console.log(res.target)
 			}
 			return {
-				title: this.showTitle,
-				path: '/?shareMP=1&t=jobSearchDetails&id=' + this.id
+				title: '求职详情',
+				path: '/pages/main/index/index?shareMP=1&t=jobSearchDetails&id=' + this.id
 			}
 		},
 		onLoad(op) {
@@ -198,13 +198,7 @@
 			this.getInfo()
 		},
 		methods: {
-			getTime(item){
-				var time=item.updateTime?item.updateTime:item.createTime;
-				if(time){
-					return time.substring(0,10)
-				}
-				return  ''
-			},
+			
 			confirmPhone() {
 				this.showPhone = false;
 				uni.makePhoneCall({

+ 1 - 2
pages/packages/jobInformation/jobDetails.vue

@@ -167,7 +167,7 @@
 			}
 			return {
 				title: this.showTitle,
-				path: '/?shareMP=1&t=jobDetails&id=' + this.id
+				path: '/pages/main/index/index?shareMP=1&t=jobDetails&id=' + this.id
 			}
 		},
 		computed: {
@@ -193,7 +193,6 @@
 					phoneNumber: this.info.contactsPhone
 				});
 			},
-
 			isJoinBtn() {
 				if (this.isJoin) {
 					return

+ 2 - 2
pages/packages/mine/myJobInformation/myJobInformation.vue

@@ -16,8 +16,8 @@
 						</view>
 					</view>
 					<view class="gender-age" v-if="userInfo.status==1">
-						<text class="text">女</text>|
-						<text class="text">28</text>
+						<text class="text">{{userInfo.gender==1?'男':''}}</text>|
+						<text class="text">{{getAge(userInfo)}}岁</text>
 					</view>
 				</view>
 

+ 5 - 8
pages/packages/news/articleDetail.vue

@@ -55,14 +55,11 @@
 					id:this.id
 				}).then((res) => {
 					uni.hideLoading()					
-					this.newsDetail = res.data.newsInfo;
-					
-					this.$nextTick(()=>{
-					    var list =document.getElementsByClassName("news-content")[0].getElementsByTagName("img");
-					    for(var i=0;i<list.length;i++){
-					        list[i].style='width: 100%;height: 100%;'
-					    } 
-					})
+					var newsDetail = res.data.newsInfo;
+					if(newsDetail.content){
+						newsDetail.content=newsDetail.content.replaceAll('alt','width="100%" height="100%" /> <p')
+					}
+					this.newsDetail=newsDetail
 				}).catch(error => {
 					uni.showToast({icon: 'none',
 						title: error,

+ 1 - 7
pages/packages/search/search.vue

@@ -401,13 +401,7 @@
 			}
 		},
 		methods: {
-			getTime(item){
-				var time=item.updateTime?item.updateTime:item.createTime;
-				if(time){
-					return time.substring(0,10)
-				}
-				return  ''
-			},
+			
 			popupShowOpen2(){
 				
 				if(this.workList.length==0){

+ 12 - 7
pages/packages/shareEmployment/articleDetail.vue

@@ -65,14 +65,15 @@
 					mask: true,
 				})
 				API_packages.shareWorksDetail({id: this.form.id}).then((res) => {
-					this.form = res.data.shareWorksInfo;
+					
+					var newsDetail=res.data.shareWorksInfo;
+					if(newsDetail.content){
+						newsDetail.content=newsDetail.content.replaceAll('alt','width="100%" height="100%" /> <p')
+					}
+					this.form=newsDetail
+										
 					this.photo = res.data.personInfo.photo;
-					this.$nextTick(()=>{
-					    var list =document.getElementsByClassName("news-content")[0].getElementsByTagName("img");
-					    for(var i=0;i<list.length;i++){
-					        list[i].style='width: 100%;height: 100%;'
-					    } 
-					})
+					
 					uni.hideLoading();
 				}).catch(error => {
 					uni.showToast({icon: 'none',
@@ -140,6 +141,10 @@
 		.content{
 			color: rgba(16, 16, 16, 1);
 			line-height: 56rpx;
+			img{
+				width: 100%;
+				height: 100%;
+			}
 			// text-align: j;
 		}
 		// 图片

+ 12 - 5
pages/packages/skillTraining/skillTraining.vue

@@ -10,18 +10,18 @@
 			<view class="picture">
 				
 				<img  
-				:src=" item.file?item.file: errorFile" alt="">
+				:src=" item.thumbnailImage?item.thumbnailImage: errorFile" alt="">
 			</view>
 			<u-line color="#e6e6e6" />
 			<!-- 标题 -->
 			<view class="title">
-				{{item.name}}
+				{{item.title}}
 			</view>
 			<!-- 报名状态 -->
 			<view class="state" :class="{
-				state2:item.status!=1
+				state2:getStatus(item)
 			}">
-				{{item.status==1?'开放报名':'结束报名'}}
+				{{getStatus(item)?'结束报名':'开放报名'}} <span v-if="item.endTime" style="float: right;" >结束时间:{{item.endTime}}</span>
 			</view>
 		</view>
 		
@@ -35,6 +35,7 @@
 <script>
 	var file=require("@/assets/img/traniningPicture.png")
 	import * as API from '@/apis/pagejs/packages.js'
+import { newDate } from '../../../apis/utils';
 	export default {
 		data() {
 			return {
@@ -59,6 +60,12 @@
 			this.getList();
 		},
 		methods: {
+			getStatus(item){
+				if(item.endTime){
+					return new Date()>new Date(item.endTime)
+				}
+				return  true
+			},
 			myLoadmore() {
 				this.listFrom.pageIndex += 1;
 				this.getList();
@@ -130,7 +137,7 @@
 		.state {
 			color: rgba(0, 185, 98, 1);
 			font-size: 24rpx;
-			margin-top: 60rpx;
+			margin-top: 30rpx;
 		}
 
 		.state2 {

+ 151 - 8
pages/packages/skillTraining/trainingRegistration.vue

@@ -11,9 +11,9 @@
 			<view class="title">
 				培训详情
 			</view>
-			<!-- <view class="picture">
-				<img src="@/assets/img/traniningPicture.png" alt="">
-			</view> -->
+			<view class="picture" v-if="info.thumbnailImage">
+				<img :src="info.thumbnailImage" alt="">
+			</view>
 			<!-- 详细信息 -->
 			<view class="details" v-html="info.content">
 				
@@ -45,7 +45,11 @@
 
 		<!-- 报名按钮 -->
 		<view class="bottom">
-			<button class="sign-up">我要报名</button>
+			<button class="sign-up"   v-if="getStatus()"  :class="{
+					isJoin:isJoin
+				}" @click="isJoinBtn" >{{isJoin?'取消报名':'我要报名'}}</button>
+			<button class="sign-up isEnd"  v-else style="background: #999999;">已结束</button>
+				
 		</view>
 	</view>
 </template>
@@ -56,6 +60,7 @@
 		data() {
 			return {
 				id: "",
+				isJoin: false,
 				info: {
 
 				},
@@ -66,16 +71,150 @@
 			this.getInfo()
 		},
 		methods: {
-			getInfo(bl) {
+			getStatus(){
+				if(this.info&&this.info.endTime){
+					return new Date()<new Date(this.info.endTime)
+				}
+				return  true
+			},
+			cancelTrainingBtn(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.cancelTraining({
+					trainingId: this.id,
+				}).then((res) => {
+					this.isJoin = false;
+					//this.info=res.data.recruitInformationInfo;
+					
+					uni.hideLoading();
+					uni.showToast({
+						title: "取消成功!",
+						icon: "none"
+					})
+				}).catch(error => {
+					uni.showToast({icon: 'none',
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			isJoinBtn() {
+				if(this.getStatus()){
+					return
+				}
+				if (this.isJoin) {
+					this.cancelTrainingBtn()
+					return
+				}
+				var user = this.carhelp.getPersonInfo();
+			
+				if (!user) {
+					uni.showModal({
+						title: '提示',
+						content: '登录并实名认证创建简历后可以报名',
+						confirmText: "前往登录",
+						showCancel: true,
+						success: function(res) {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: '/pages/tab/mine/mine'
+								})
+			
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+					return
+				}
+				if (user.status != 1) {
+					uni.showModal({
+						title: '提示',
+						content: '实名认证并创建简历后可以报名',
+						confirmText: "实名认证",
+						showCancel: true,
+						success: function(res) {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: '/pages/packages/mine/otherServices/authentication'
+								})
+			
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+					return
+				}
+				var jobInformationInfo = this.carhelp.getPersonInfoPlus().jobInformationInfo;
+				if (!user) {
+					uni.showModal({
+						title: '提示',
+						content: '创建简历后可以报名',
+						confirmText: "创建简历",
+						showCancel: true,
+						success: function(res) {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: '/pages/packages/mine/myJobInformation/myJobInformation'
+								})
+			
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+					return
+				}
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.joinTraining({
+						trainingId: this.id,
+				}).then((res) => {
+					this.isJoin = true;
+					//this.info=res.data.recruitInformationInfo;
+					uni.showModal({
+						title: '提示',
+						content: '报名成功',
+						showCancel: false,
+						success: function(res) {
+							if (res.confirm) {
+			
+								//uni.navigateBack()
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+					uni.hideLoading();
+			
+				}).catch(error => {
+					uni.showToast({icon: 'none',
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			getInfo() {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
 				API.trainingDetail({
-					id: this.id,
+					trainingId: this.id,
 				}).then((res) => {
 					uni.hideLoading();
-					this.info=res.data.trainingInfo;
+					
+					this.isJoin = res.data.isJoin;
+					var newsDetail=res.data.trainingInfo;
+					if(newsDetail.content){
+						newsDetail.content=newsDetail.content.replaceAll('alt','width="100%" height="100%" /> <p')
+					}
+					this.info=newsDetail
 					
 				}).catch(error => {
 					uni.showToast({icon: 'none',
@@ -189,7 +328,8 @@
 		bottom: 0;
 		left: 0;
 		right: 0;
-
+		
+		
 		.sign-up {
 
 			height: 96rpx;
@@ -200,5 +340,8 @@
 			font-size: 36rpx;
 			text-align: center;
 		}
+		.isJoin {
+			background-color: #19be6d;
+		}
 	}
 </style>

+ 12 - 15
pages/tab/choreInformation/choreInformation.vue

@@ -50,19 +50,22 @@
 					</view>
 					<view class="bottom">
 						<view class="tags">
-						<!-- 	<view class="tag-item">
-								男
+							<view class="tag-item">
+								{{item.gender==1?'':'女'}}
 							</view>
 							<view class="tag-item">
-								21
-							</view> -->
+								{{item.age}}
+							</view>
 							<view class="tag-item">
 								{{item.educationN}}
 							</view>
+							<view class="tag-item">
+								{{item.workExperienceN}}
+							</view>
 						</view>
 
 						<view class="date">
-							更新时间:{{getTime(item)}}
+							{{getTime(item)}}
 						</view>
 					</view>
 				</view>
@@ -217,13 +220,7 @@
 			}
 		},
 		methods: {
-			getTime(item){
-				var time=item.updateTime?item.updateTime:item.createTime;
-				if(time){
-					return time.substring(0,10)
-				}
-				return  ''
-			},
+			
 			queryBtn(){
 				this.popupShow=false;
 				this.current = 0;
@@ -405,7 +402,7 @@
 		}
 
 		.result-item {
-			padding: 32rpx 0;
+			padding: 24rpx 0;
 			margin: 0 32rpx;
 			display: flex;
 			border-bottom: 1px solid #f1f1f1;
@@ -449,7 +446,7 @@
 
 				// 发布人
 				.issuer {
-					margin-top: 16rpx;
+					margin-top: 8rpx;
 				}
 
 				// 标签和时间
@@ -457,7 +454,7 @@
 					display: flex;
 					justify-content: space-between;
 					align-items: center;
-					margin-top: 24rpx;
+					margin-top: 12rpx;
 
 					.tags {
 						display: flex;

+ 11 - 3
pages/tab/jobInformation/jobInformation.vue

@@ -46,13 +46,20 @@
 				<view class="content-2">
 					<!-- 标签 -->
 					<view class="tag">
+						<view class="tag-item">
+							{{item.workArea}}
+						</view>
 						<view class="tag-item">
 							{{item.settlementMethodN}}
 						</view>
+						<view class="tag-item">
+							{{item.industryN}}
+						</view>
+						
 					</view>
 					<!-- 日期 -->
 					<view class="date">
-						{{item.createTime}}
+						{{getTime(item)}}
 					</view>
 				</view>
 				<view class="content-3">
@@ -60,7 +67,7 @@
 						{{item.contacts}}
 					</view>
 					<view class="address">
-						{{item.workArea}}
+						{{item.address}}
 					</view>
 				</view>
 			</view>
@@ -443,7 +450,7 @@
 					display: flex;
 
 					.tag-item {
-						width: 64rpx;
+						min-width: 64rpx;
 						height: 36rpx;
 						line-height: 36rpx;
 						border-radius: 8rpx;
@@ -452,6 +459,7 @@
 						font-size: 24rpx;
 						text-align: center;
 						margin-right: 12rpx;
+						padding: 0 12rpx;
 					}
 				}
 

+ 1 - 1
uni_modules/uview-ui/components/u-swiper/u-swiper.vue

@@ -211,7 +211,7 @@
 		},
 		methods: {
 			listClick(index) {
-				this.$emit('click', index);
+				this.$emit('click', index,this.list);
 			},
 			change(e) {
 				let current = e.detail.current;