zhengkaixin 1 anno fa
parent
commit
e05ef8c4e3

+ 8 - 0
apis/pagejs/packages.js

@@ -167,4 +167,12 @@ export function myReceivedRegistration(data) {
  		data: data,
  		url: '/mobile/recruit/myReceivedRegistration'
  	})
+}
+
+export function jobHuntDetail(data) {
+ 	return requestWhite({
+ 		method: 'post',
+ 		data: data,
+ 		url: '/mobile/job/jobHuntDetail'
+ 	})
 }

+ 143 - 10
pages/packages/choreInformation/jobSearchDetails.vue

@@ -91,18 +91,27 @@
 	 <!-- 底部按钮 -->
 	 <view class="bottom">
 		 <!-- 分享 -->
-		 <view class="share">
-			 <view class="icon">
-			 	<img src="@/assets/img/riFill-share-circle-fill@1x.png" alt="">
-			 </view>
-		 	 <view class="text">
-		 	 	分享
-		 	 </view>
+		 <view >
+			 <button class="share" open-type="share">
+				 <view class="icon">
+					<img src="@/assets/img/riFill-share-circle-fill@1x.png" alt="">
+				 </view>
+				 <view class="text">
+					分享
+				 </view>
+			 </button>
 		 </view>
 		 <view class="btn">
-		 	<button class="dialing">一键拨号</button>
-			<button class="invite">立即邀请</button>
+		 	<button class="dialing"  @click="showPhone=true" >一键拨号</button>
+			<button class="invite"  :class="{
+					isJoin:isJoin
+				}"  @click="isJoinBtn"
+			
+			>{{isJoin?'已邀请':'立即邀请'}}</button>
 		 </view>
+	 	<u-modal v-model="showPhone" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266"
+	 		:show-cancel-button="true" ref="uModal" :asyncClose="true" title="联系电话" :content="info.contactsPhone"
+	 		:content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
 	 	
 	 </view>
 	</view>
@@ -113,11 +122,129 @@
 	export default {
 		data() {
 			return {
-				
+				id: "",
+				showPhone: false,
+				confirmText: '拨打电话',
+				content: "",
+				isJoin: false,
+				share: 0,
+				info: {}
+			}
+		},
+		onShareAppMessage(res) {
+			if (res.from === 'button') { // 来自页面内分享按钮
+				console.log(res.target)
+			}
+			return {
+				title: this.showTitle,
+				path: '/?shareMP=1&t=jobSearchDetails&id=' + this.id
+			}
+		},
+		onLoad(op) {
+			//uni.showShareMenu()
+			this.id = op.id
+			if (op.shareMP) {
+				this.share = op.shareMP
 			}
+			this.getInfo()
 		},
 		methods: {
 			
+			isJoinBtn() {
+				if (this.isJoin) {
+					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
+				}
+				 
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.joinRecruit({
+					recruitId: 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({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			getInfo() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.jobHuntDetail({
+					id: this.id,
+				}).then((res) => {
+					this.isJoin = res.data.isJoin;
+					this.info = res.data.recruitInformationInfo;
+			
+					uni.hideLoading();
+			
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			}
 		}
 	}
 </script>
@@ -264,6 +391,9 @@
 	  bottom: 0;
 	  left: 0;
 	  right: 0;
+	  .share {
+	  	background-color: #fff;
+	  }
 	  // 分享
 	  .icon{
 		  width: 48rpx;
@@ -303,6 +433,9 @@
 			  text-align: center;
 			  
 		  }
+		  .isJoin{
+		  	background-color: #19be6d;
+		  }
 	  }
   }
 </style>

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

@@ -114,7 +114,7 @@
 				
 			</view>
 			<u-modal v-model="showPhone" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266"
-				:show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="info.contactsPhone"
+				:show-cancel-button="true" ref="uModal" :asyncClose="true" title="联系电话" :content="info.contactsPhone"
 				:content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
 
 		</view>

+ 247 - 242
pages/packages/search/search.vue

@@ -1,243 +1,248 @@
-<template>
-	<view>
-		<u-navbar back-text="搜索" back-icon-size="28" back-icon-color="#ffffff"
-			:background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
-
-		<!-- 搜索框 -->
-		<view class="search">
-			<view class="search-box">
-				<view class="option">
-					<nxsearch :selectList="selectList" button="inside"  @search="doSearch" @confirm="doSearch" v-model="searchQuery.keyword" placeholder="输入关键字找工作" />
-         
-
-				</view>
-			</view>
-		</view>
-		<!-- 搜索历史 -->
-		<view class="search-history">
-			<view class="top">
-				<view class="title">
-					搜索历史
-				</view>
-				<view class="clear" @click="clear()" >
-					清空历史
-				</view>
-			</view>
-			<view class="history">
-				<view class="tag" v-for="(mod,index) in searchHistory"  :key="index" v-text="mod" @click="searchQuery.keyword=mod,submit()">
-					打杂
-				</view>
-				
-			</view>
-			
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/pagejs/packages.js'
-	import nxsearch from "@/components/nx-search.vue"
-
-	export default {
-		components: {
-			nxsearch
-		},
-
-		data() {
-			return {
-				step:true,//步骤 ,true第一步查询,false第二步显示结果
-				
-				
-				searchQuery: {
-					keyword: '',
-					selectIndex: 0
-				},
-				selectList: [
-					{
-						id: 1,
-						name: '找零工'
-					},
-					{
-						id: 0,
-						name: '找工作'
-					}
-				],
-				recordsTotal:0,
-				listForm:{
-						typeId:"",
-						title:"",
-				        pageIndex: 1,
-				        pageSize: 4,
-				        totalPage: 1,
-				       
-				    },
-				list: [
-				 ],
-				searchHistory:[],
-
-			}
-		},
-		onLoad(op){
-			if(op.type){
-				this.searchQuery.selectIndex=op.type
-			}
-			
-			var sz=this.carhelp.get("setSearchHistory");
-			if(sz){
-				this.searchHistory=sz
-			}else{
-				this.searchHistory= []
-			}
-		},
-		onReachBottom() {
-			if (this.list.length < this.recordsTotal) {			
-				this.myLoadmore();
-			}
-		},
-		methods: {
-			ckInfo(id){
-				var url="/pages/news/articleDetails?id="+id;
-				uni.navigateTo({
-					url:url
-				})
-			},
-			clear(){
-			    this.setSearchHistory([]);
-			    mui.toast("搜索内容已清空");
-			},
-			setHistory(){
-			    //搜索记录保存
-				var key =this.searchQuery.keyword;
-			    var sz=this.searchHistory;
-			    if(!sz){
-			        sz=[];
-			    }
-			    var temp =[];
-			    //去重 ,后插入的,排队到最前面
-			    if(sz.length){
-			        for(var i in sz){
-			            if(i==0){
-			                temp.push(key);
-			            }
-			            if(sz[i]==key){
-			                continue;
-			            }
-			            temp.push(sz[i]);
-			
-			            if(temp.length==10){
-			                break
-			            }
-			
-			        }
-			    }else{
-			        temp.push(key);
-			    }
-				
-			    this.setSearchHistory(temp);
-			},
-			setSearchHistory(obj){
-				this.searchHistory=obj
-					this.carhelp.set("setSearchHistory",obj)
-			},
-			blur(){
-			   
-			},
-			focus(){
-				this.step=true;
-			},
-			 submit(){
-				 if(!this.searchQuery.keyword){
-					return 
-				 }
-			    this.setHistory()
-				this.step=false;
-				this.listForm.pageIndex=1
-				// var ref =this.$refs.searchinput.getRef()
-				// ref.blur()
-				 this.query();
-			},
-			myLoadmore(){
-				this.listForm.pageIndex += 1;
-				this.query();
-			},
-			query(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API.findRecruitSearch({
-					pageIndex:1,
-					pageSize:20,
-					type:this.selectList[this.searchQuery.selectIndex].id,
-					content:this.searchQuery.keyword
-				}).then((res) => {
-					uni.hideLoading();
-					this.tabList[this.current].list=res.data.data
-					this.tabList[this.current].recordsTotal=res.data.recordsTotal
-					
-				}).catch(error => {
-				
-					uni.showToast({
-						title: error
-					})
-					//this.getPhone()
-					
-				})
-			},
-             // 执行搜索
-            doSearch(searchQuery) {
-                console.log('searchQuery', searchQuery);
-				this.submit()
-            },
-
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	// 搜索框
-	.search {
-		padding: 16rpx 32rpx;
-
-		.search-box {
-			border-radius: 50px;
-			// background-color: rgba(243, 246, 249, 1);
-			height: 72rpx;
-			line-height: 72rpx;
-		}
-	}
-	// 搜索历史
-	.search-history{
-		padding: 0 32rpx;
-		margin-top: 40rpx;
-      .top{
-		  display: flex;
-		  justify-content: space-between;
-		  align-items: center;
-		  .title{
-			  color: #101010;
-		  }
-		  .clear{
-			  color: rgba(169, 169, 169, 1);
-			  font-size: 24rpx;
-		  }
-	  }
-	  .history{
-		  display: flex;
-		  margin-top: 16rpx;
-		  .tag{
-			  width: 144rpx;
-			  height: 56rpx;
-			  line-height: 56rpx;
-			  border-radius: 4px;
-			  background-color: rgba(241, 244, 247, 1);
-			  color: rgba(88, 88, 88, 1);
-			  font-size: 12px;
-			  text-align: center;
-			  font-family: Arial;
-			  margin-right: 16rpx;
-		  }
-	  }
-	}
-	 
+<template>
+	<view>
+		<u-navbar back-text="搜索" back-icon-size="28" back-icon-color="#ffffff"
+			:background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
+
+		<!-- 搜索框 -->
+		<view class="search">
+			<view class="search-box">
+				<view class="option">
+					<nxsearch :selectList="selectList" button="inside" @search="doSearch" @confirm="doSearch"
+						v-model="searchQuery.keyword" placeholder="输入关键字找工作" />
+
+
+				</view>
+			</view>
+		</view>
+		<!-- 搜索历史 -->
+		<view class="search-history">
+			<view class="top">
+				<view class="title">
+					搜索历史
+				</view>
+				<view class="clear" @click="clear()">
+					清空历史
+				</view>
+			</view>
+			<view class="history">
+				<view class="tag" v-for="(mod,index) in searchHistory" :key="index" v-text="mod"
+					@click="searchQuery.keyword=mod,submit()">
+					打杂
+				</view>
+
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/packages.js'
+	import nxsearch from "@/components/nx-search.vue"
+
+	export default {
+		components: {
+			nxsearch
+		},
+
+		data() {
+			return {
+				step: true, //步骤 ,true第一步查询,false第二步显示结果
+
+
+				searchQuery: {
+					keyword: '',
+					selectIndex: 0
+				},
+				selectList: [{
+						id: 1,
+						name: '找零工'
+					},
+					{
+						id: 0,
+						name: '找工作'
+					}
+				],
+				recordsTotal: 0,
+				listForm: {
+					typeId: "",
+					title: "",
+					pageIndex: 1,
+					pageSize: 4,
+					totalPage: 1,
+				},
+				list: [],
+				searchHistory: [],
+
+			}
+		},
+		onLoad(op) {
+			if (op.type) {
+				this.searchQuery.selectIndex = op.type
+			}
+
+			var sz = this.carhelp.get("setSearchHistory");
+			if (sz) {
+				this.searchHistory = sz
+			} else {
+				this.searchHistory = []
+			}
+		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
+		methods: {
+			ckInfo(id) {
+				var url = "/pages/news/articleDetails?id=" + id;
+				uni.navigateTo({
+					url: url
+				})
+			},
+			clear() {
+				this.setSearchHistory([]);
+				mui.toast("搜索内容已清空");
+			},
+			setHistory() {
+				//搜索记录保存
+				var key = this.searchQuery.keyword;
+				var sz = this.searchHistory;
+				if (!sz) {
+					sz = [];
+				}
+				var temp = [];
+				//去重 ,后插入的,排队到最前面
+				if (sz.length) {
+					for (var i in sz) {
+						if (i == 0) {
+							temp.push(key);
+						}
+						if (sz[i] == key) {
+							continue;
+						}
+						temp.push(sz[i]);
+
+						if (temp.length == 10) {
+							break
+						}
+
+					}
+				} else {
+					temp.push(key);
+				}
+
+				this.setSearchHistory(temp);
+			},
+			setSearchHistory(obj) {
+				this.searchHistory = obj
+				this.carhelp.set("setSearchHistory", obj)
+			},
+			blur() {
+
+			},
+			focus() {
+				this.step = true;
+			},
+			submit() {
+				if (!this.searchQuery.keyword) {
+					return
+				}
+				this.setHistory()
+				this.step = false;
+				this.listForm.pageIndex = 1
+				// var ref =this.$refs.searchinput.getRef()
+				// ref.blur()
+				this.query();
+			},
+			myLoadmore() {
+				this.listForm.pageIndex += 1;
+				this.query();
+			},
+			query() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.findRecruitSearch({
+					pageIndex: 1,
+					pageSize: 20,
+					status: this.selectList[this.searchQuery.selectIndex].id,
+					content: this.searchQuery.keyword
+				}).then((res) => {
+					uni.hideLoading();
+					this.tabList[this.current].list = res.data.data
+					this.tabList[this.current].recordsTotal = res.data.recordsTotal
+
+				}).catch(error => {
+
+					uni.showToast({
+						title: error
+					})
+					//this.getPhone()
+
+				})
+			},
+			// 执行搜索
+			doSearch(searchQuery) {
+				console.log('searchQuery', searchQuery);
+				this.searchQuery=searchQuery;
+				this.submit()
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	// 搜索框
+	.search {
+		padding: 16rpx 32rpx;
+
+		.search-box {
+			border-radius: 50px;
+			// background-color: rgba(243, 246, 249, 1);
+			height: 72rpx;
+			line-height: 72rpx;
+		}
+	}
+
+	// 搜索历史
+	.search-history {
+		padding: 0 32rpx;
+		margin-top: 40rpx;
+
+		.top {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.title {
+				color: #101010;
+			}
+
+			.clear {
+				color: rgba(169, 169, 169, 1);
+				font-size: 24rpx;
+			}
+		}
+
+		.history {
+			display: flex;
+			margin-top: 16rpx;
+
+			.tag {
+				width: 144rpx;
+				height: 56rpx;
+				line-height: 56rpx;
+				border-radius: 4px;
+				background-color: rgba(241, 244, 247, 1);
+				color: rgba(88, 88, 88, 1);
+				font-size: 12px;
+				text-align: center;
+				font-family: Arial;
+				margin-right: 16rpx;
+			}
+		}
+	}
 </style>

+ 1 - 2
pages/tab/choreInformation/choreInformation.vue

@@ -182,8 +182,7 @@
 					},
 				],
 				tabList: [{
-					name: '最新',
-				
+					name: '最新',
 					pageIndex: 1,
 					pageSize: 20,
 					statusType:"1",