Browse Source

对接企业模块

空白格 3 years ago
parent
commit
c3f8e0f84b

+ 9 - 0
h5_web/common/apiurl.js

@@ -54,6 +54,15 @@ const apiurl = {
 		getSchoolDetailsUrl: '/school/getDetail/',
 		// 获取专业详情
 		getProfessonDetailsUrl: '/school/getProfessonDetail/'
+	},
+	// 公司模块
+	company: {
+		// 公司列表
+		getCompanyListUrl: '/company/list',
+		// 公司详情
+		getCompanyDetailsUrl: '/company/getDetail/',
+		// 岗位列表
+		getCompanyPostListUrl: '/companypost/list/'
 	}
 }
 

+ 11 - 1
h5_web/common/http.api.js

@@ -61,6 +61,15 @@ const install = (Vue, vm) => {
 		getProfessonDetails: (params = {}) => vm.$u.get(apiurl.school.getProfessonDetailsUrl + params.id)
 	}
 	
+	// 公司模块
+	let company = {
+		// 获取公司列表
+		getCompanyList: (params = {}) => vm.$u.get(apiurl.company.getCompanyListUrl, params),
+		// 获取公司详情
+		getCompanyDetails: (params = {}) => vm.$u.get(apiurl.company.getCompanyDetailsUrl + params.id),
+		// 获取岗位列表
+		getCompanyPostList: (params = {}) => vm.$u.get(apiurl.company.getCompanyPostListUrl + params.id, params)
+	}
 	
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
 	vm.$u.api = {
@@ -87,7 +96,8 @@ const install = (Vue, vm) => {
 		postSignOffline,
 		getAdaptTrainIdOffline,
 		getIdInfo,
-		school
+		school,
+		company
 	};
 }
 

+ 13 - 14
h5_web/pages.json

@@ -302,7 +302,7 @@
 				"navigationBarBackgroundColor": "#fff",
 				"backgroundColor": "#f2f2f2"
 			}
-			
+
 		}, {
 			"path": "pages/jobDetails/jobDetails",
 			"style": {
@@ -311,7 +311,7 @@
 				"navigationBarBackgroundColor": "#3D5D4C",
 				"navigationBarTextStyle": "white"
 			}
-			
+
 		}, {
 			"path": "pages/resumeDeliveryResults/resumeDeliveryResults",
 			"style": {
@@ -319,7 +319,7 @@
 				"enablePullDownRefresh": false,
 				"navigationStyle": "custom"
 			}
-			
+
 		}, {
 			"path": "pages/applyEducationCode/applyEducationCode",
 			"style": {
@@ -328,7 +328,7 @@
 				"navigationBarBackgroundColor": "#3D5D4C",
 				"navigationBarTextStyle": "white"
 			}
-			
+
 		}, {
 			"path": "pages/applyEducationCode/applyEducationSuccess",
 			"style": {
@@ -370,17 +370,16 @@
 				"navigationBarBackgroundColor": "#3D5D4C",
 				"navigationBarTextStyle": "white"
 			}
+		}, {
+			"path": "pages/notification/notification",
+			"style": {
+				"navigationBarTitleText": "消息通知",
+				"enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#3D5D4C",
+				"navigationBarTextStyle": "white"
+			}
+
 		}
-		// {
-		// 	"path": "pages/notification/notification",
-		// 	"style": {
-		// 		"navigationBarTitleText": "消息通知",
-		// 		"enablePullDownRefresh": false,
-		// 		"navigationBarBackgroundColor": "#3D5D4C",
-		// 		"navigationBarTextStyle": "white"
-		// 	}
-			
-		// }
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 124 - 50
h5_web/pages/businessDetails/businessDetails.vue

@@ -2,18 +2,13 @@
 <template>
 	<view class="business-details">
 		<!-- 背景 -->
-		<view class="business-details-bg">
-			<!-- <view class="business-details-bg-1"></view>
-			<view class="business-details-bg-2"></view>
-			<image src="../../static/img/company-details-bg-1.png" mode=""></image> -->
-		</view>
-		
+		<view class="business-details-bg"></view>
 		<!-- 内容 -->
 		<view class="business-details-content">
 			<view class="business-details-content-logo">
-				<image src="../../static/img/avatar.jpg" mode=""></image>
+				<image :src="companyInfo.logoUrl" mode=""></image>
 			</view>
-			<view class="business-details-content-name">中国平安银行股份有限公司</view>
+			<view class="business-details-content-name">{{ companyInfo.companyName }}</view>
 			<view class="business-details-content-evaluate">
 				<view class="left">
 					<view class="evaluate">优秀</view>
@@ -37,13 +32,13 @@
 			<view class="business-details-content-survey">
 				<view class="title">公司概况</view>
 				<view class="item">
-					<view>公司全称:中国平安银行股份有限公司贵州分公司</view>
-					<view>公司简称:平安银行</view>
-					<view>所属行业:金融</view>
-					<view>公司规模:1000人以上</view>
-					<view>联系方式:400-888-1234</view>
+					<view>公司全称:{{ companyInfo.companyName }}</view>
+					<view>公司简称:{{ companyInfo.nickName }}</view>
+					<view>所属行业:{{ getCompanyTradeName(companyInfo.trade) }}</view>
+					<view>公司规模:{{ getCompanyScopeName(companyInfo.scope) }}</view>
+					<view>联系方式:{{ companyInfo.linkPhone }}</view>
 					<view class="address">
-						<view>公司地址:贵州省乌当区顺海中路88号</view>
+						<view>公司地址:{{ companyInfo.companyAddress }}</view>
 						<view>
 							<image src="../../static/img/dingwei.png"/>
 							查看位置
@@ -56,14 +51,15 @@
 			<view class="business-details-content-introduce">
 				<view class="title">公司介绍</view>
 				<view class="content">
-					平安银行,全称平安银行股份有限公司,是中国平安保险(集团)股份有限公司控股的一家跨区域经营的股份制商业银行,为中国大陆12家全国性股份制商业银行之一。注册资本为人民币51.2335亿元,总资产近1.37万亿元,总部位于广东省深圳市。
-					中国平安保险(集团)股份有限公司(以下简称“中国平安”)及其控股子公司持有平安银行股份共计约26.84亿股,占比约52.38%,为平安银行的控股股东。在全中国各地设有34家分行,在香港设有代表处。
-					2012年1月,现平安银行的前身深圳发展银行收购平安保险集团旗下的深圳平安银行,收购完成后,深圳发展银行更名为新的平安银行,组建新的平安银行正式对外营业。2019年6月26日,平安银行等8家银行首批上线运行企业信息联网核查系统。
+					<view class="content" v-if="companyInfo.detatil">
+						<u-parse :html="companyInfo.detatil"/>
+					</view>
+					<u-empty v-else text="暂无公司介绍" mode="data"></u-empty>
 				</view>
 			</view>
 			
 			<!-- 公司相册 -->
-			<view class="business-details-content-album">
+			<!-- <view class="business-details-content-album">
 				<view class="title">公司相册</view>
 				<view class="pic-list">
 					<view
@@ -74,17 +70,17 @@
 						<image :src="item.url" mode=""></image>
 					</view>
 				</view>
-			</view>
+			</view> -->
 			
 			<!-- 公司职位 -->
 			<view class="business-details-content-position">
 				<view class="title">公司职位</view>
-				<view class="position-list">
+				<view class="position-list" v-if="positionList.length > 0">
 					<view
 						class="position-list-item"
 						v-for="(item, index) in positionList"
 						:key="index"
-						@click="jumpPage('/pages/jobDetails/jobDetails')"
+						@click="jumpPage('/pages/jobDetails/jobDetails', { id: item.id })"
 					>
 						<view class="left">
 							<view class="logo">
@@ -102,8 +98,10 @@
 						</view>
 					</view>
 				</view>
+				<u-empty v-else text="该公司暂未发布职位" mode="data"></u-empty>
 			</view>
 		</view>
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
@@ -111,42 +109,118 @@
 	export default {
 		data() {
 			return {
-				// 公司相册
-				picList: [
-					{
-						url: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5883681.s21i.faiusr.com%2F2%2FABUIABACGAAgpdOXrQUo6bG5wgYw9AM4uwI.jpg&refer=http%3A%2F%2F5883681.s21i.faiusr.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1637389823&t=ae7d50157800667800f24911b60c4a3b'
-					},
-					{
-						url: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg105.job1001.com%2Fupload%2Falbum%2F2015-01-09%2F1420776447-A8AMV7X_960_600.JPG&refer=http%3A%2F%2Fimg105.job1001.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1637389823&t=b67bd35034b7a1f74dd4d453ecc24e4a'
-					}
-				],
+				// 公司id
+				companyId: '',
+				// 公司详情
+				companyInfo: '',
+				companyScopeList: [],
+				companyTradeList: [],
 				// 公司职位
-				positionList: [
-					{
-						icon: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.tatait.com%2FUpLoadFiles%2F20130723%2F2013072319120209.jpg&refer=http%3A%2F%2Fwww.tatait.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1637390645&t=8c9969db409a72105fc18f8702b21013',
-						position: '业务员',
-						content: '白云区|经验不限|中等专科',
-						address: '平安银行贵州分公司',
-						money: '4.0K-8.0K',
-						date: '2020.12.25'
-					},
-					{
-						icon: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.tatait.com%2FUpLoadFiles%2F20130723%2F2013072319120209.jpg&refer=http%3A%2F%2Fwww.tatait.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1637390645&t=8c9969db409a72105fc18f8702b21013',
-						position: '业务员',
-						content: '白云区|经验不限|中等专科',
-						address: '平安银行贵州分公司',
-						money: '4.0K-8.0K',
-						date: '2020.12.25'
-					}
-				]
+				positionList: []
+			}
+		},
+		onLoad(page) {
+			this.getDict('company_scope');
+			this.getDict('company_trade');
+			if (page.id) {
+				this.companyId = page.id
+			}
+		},
+		onShow() {
+			if (this.companyId) {
+				this.getDetails(this.companyId)
+				this.getCompanyPost(this.companyId, 1, 1000)
+			} else {
+				this.$refs.uToast.show({
+					title: '参数不全!',
+					type: 'warning'
+				})
 			}
 		},
 		methods: {
+			/**
+			 * 获取详情
+			 * @param { String } id 获取详情企业id
+			 */
+			getDetails(id) {
+				this.$u.api.company.getCompanyDetails({
+					id: id
+				}).then(res => {
+					if (res.code === 200) {
+						this.companyInfo = res.data
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
+					}
+				}).catch((err) => {
+					this.$refs.uToast.show({
+						title: '系统异常!',
+						type: 'error'
+					})
+				})
+			},
+			/**
+			 * 获取字典
+			 * company_scope  公司规模
+			 * company_trade  公司类型
+			 */
+			getDict(key) {
+				this.$u.api.getDictdataUrl({
+					key: key
+				}).then(res => {
+					if (res.code === 200) {
+						if (key === 'company_scope') {
+							this.companyScopeList = res.data
+						} else if (key === 'company_trade') {
+							this.companyTradeList = res.data;
+						}
+					}
+				})
+			},
+			/**
+			 * @param {Object} val
+			 */
+			getCompanyScopeName(val) {
+				let name;
+				this.companyScopeList.forEach(item => {
+					if (Number(item.text) === Number(val)) {
+						name = item.label
+					}
+				})
+				return name;
+			},
+			/**
+			 * @param {Object} val
+			 */
+			getCompanyTradeName(val) {
+				let name;
+				this.companyTradeList.forEach(item => {
+					if (Number(item.text) === Number(val)) {
+						name = item.label
+					}
+				})
+				return name;
+			},
+			/**
+			 * @param {Object} url
+			 */
+			getCompanyPost(id, pageNum, pageSize) {
+				this.$u.api.company.getCompanyPostList({ id, pageNum, pageSize}).then(res => {
+					if (res.code === 200) {
+						this.positionList = res.data.rows
+					}
+				})
+			},
 			/**
 			 * 跳转到指定页面
 			 */
-			jumpPage(url) {
-				this.$u.route(url)
+			jumpPage(url, params) {
+				this.$u.route({
+					url,
+					params
+				})
 			}
 		}
 	}

+ 116 - 69
h5_web/pages/cooperativeEnterprise/cooperativeEnterprise.vue

@@ -17,6 +17,8 @@
 					:show-action="false"
 					bg-color="#ffffff"
 					height="70"
+					@search="searchKeyword"
+					@clear="searchKeyword"
 				/>
 			</view>
 			
@@ -39,17 +41,17 @@
 					class="enterprose-list-content-item"
 					v-for="(item, index) in companyList"
 					:key="index"
-					@click="jumpPage('/pages/businessDetails/businessDetails', { id: item.company})"
+					@click="jumpPage('/pages/businessDetails/businessDetails', { id: item.id})"
 				>
 					<view class="enterprose-list-content-item-left">
 						<view class="image">
-							<image :src="item.img" mode=""></image>
+							<image :src="item.logoUrl" mode=""></image>
 						</view>
 						<view class="info">
-							<view>{{ item.company }}</view>
+							<view>{{ item.companyName }}</view>
 							<view class="company">
-								<view class="icon"><u-icon name="star-fill" color="#EF651F"/>{{ item.star }}</view>
-								<view>{{ item.content }}</view>
+								<!-- <view class="icon"><u-icon name="star-fill" color="#EF651F"/>{{ item.star }}</view> -->
+								<view>{{ getCompanyScopeName(item.scope) }} · {{ getCompanyTradeName(item.trade) }}</view>
 							</view>
 						</view>
 					</view>
@@ -59,6 +61,7 @@
 				</view>
 			</view>
 		</z-paging>
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
@@ -68,42 +71,124 @@
 			return {
 				// 搜索关键词
 				keyword: '',
+				// 选中类型
+				tradeType: '',
 				// tab
-				tabList: [
-					{
-						name: '全部'
-					},
-					{
-						name: '金融类'
-					},
-					{
-						name: '酒店类'
-					},
-					{
-						name: 'IT类'
-					},
-					{
-						name: '餐饮类'
-					},
-					{
-						name: '保险类'
-					},
-					{
-						name: '其他'
-					}
-				],
+				tabList: [],
 				// tab选中项
 				tabCur: 0,
 				// 公司列表
-				companyList: []
+				companyList: [],
+				// 企业规模
+				companyScopeList: [],
+				// 企业类型
+				companyTradeList: []
 			}
 		},
+		onShow() {
+			this.getDict('company_scope');
+			this.getDict('company_trade');
+		},
 		methods: {
+			/**
+			 * 获取企业列表
+			 * @param { Number } pageNum
+			 * @param { Number } pageSize
+			 * @param { String } companyName
+			 * @param { String } trade
+			 */
+			getList(pageNum, pageSize, companyName, trade) {
+				this.$u.api.company.getCompanyList({
+					pageNum,
+					pageSize,
+					companyName,
+					trade
+				}).then(res => {
+					if (res.code === 200) {
+						this.$refs.paging.complete(res.data.rows)
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
+					}
+				}).catch(err => {
+					this.$refs.uToast.show({
+						title: '系统异常!',
+						type: 'error'
+					})
+				})
+			},
+			/**
+			 * 获取字典
+			 * company_scope  公司规模
+			 * company_trade  公司类型
+			 */
+			getDict(key) {
+				this.$u.api.getDictdataUrl({
+					key: key
+				}).then(res => {
+					if (res.code === 200) {
+						if (key === 'company_scope') {
+							this.companyScopeList = res.data
+						} else if (key === 'company_trade') {
+							this.companyTradeList = res.data;
+							this.tabList = res.data.map(item => {
+								return {
+									...item,
+									name: item.label,
+									value: item.text
+								}
+							})
+							this.tabList.unshift({
+								value: '',
+								name: '全部'
+							})
+						}
+					}
+				})
+			},
+			/**
+			 * @param {Object} val
+			 */
+			getCompanyScopeName(val) {
+				let name;
+				this.companyScopeList.forEach(item => {
+					if (Number(item.text) === Number(val)) {
+						name = item.label
+					}
+				})
+				return name;
+			},
+			/**
+			 * @param {Object} val
+			 */
+			getCompanyTradeName(val) {
+				let name;
+				this.companyTradeList.forEach(item => {
+					if (Number(item.text) === Number(val)) {
+						name = item.label
+					}
+				})
+				return name;
+			},
+			/**
+			 * @param { String } value
+			 */
+			searchKeyword(value) {
+				this.getList(1, 10, this.keyword, this.tradeType)
+			},
 			/**
 			 * tab切换
 			 */
 			tabChange(val) {
 				this.tabCur = val
+				this.tabList.forEach((item, index) => {
+					if (index === val) {
+						this.tradeType = item.value
+					}
+				})
+				this.getList(1, 10, this.keyword, this.tradeType)
 			},
 			/**
 			 * @param {String} url
@@ -116,48 +201,10 @@
 				})
 			},
 			/**
-			 * 
+			 * 列表加载触发
 			 */
 			queryList(pageNo, pageSize) {
-				this.$refs.paging.complete(
-				[
-					{
-						img: require('@/static/img/avatar.jpg'),
-						position: '保安员',
-						company: '保利贵州酒店管理有限公司',
-						content: '20-99人 · 餐饮',
-						area: '4.0 ~ 8.0k',
-						date: '2020-12.25',
-						star: 4.2
-					},
-					{
-						img: require('@/static/img/avatar.jpg'),
-						position: '保安员',
-						company: '保利贵州酒店管理有限公司',
-						content: '20-99人 · 餐饮',
-						area: '4.0 ~ 8.0k',
-						date: '2020-12.25',
-						star: 4.2
-					},
-					{
-						img: require('@/static/img/avatar.jpg'),
-						position: '保安员',
-						company: '保利贵州酒店管理有限公司',
-						content: '20-99人 · 餐饮',
-						area: '4.0 ~ 8.0k',
-						date: '2020-12.25',
-						star: 4.2
-					},
-					{
-						img: require('@/static/img/avatar.jpg'),
-						position: '保安员',
-						company: '保利贵州酒店管理有限公司',
-						content: '20-99人 · 餐饮',
-						area: '4.0 ~ 8.0k',
-						date: '2020-12.25',
-						star: 4.2
-					}
-				])
+				this.getList(pageNo, pageSize, this.keyword, this.tradeType)
 			}
 		}
 	}

+ 4 - 0
h5_web/pages/mine/mine.scss

@@ -174,6 +174,10 @@
 				width: 36rpx;
 				height: 30rpx;
 			}
+			.shezhi {
+				width: 32rpx;
+				height: 32rpx;
+			}
 		}
 	}
 }

+ 9 - 0
h5_web/pages/mine/mine.vue

@@ -78,6 +78,15 @@
 					</u-cell-item>
 				</u-cell-group>
 			</view>
+			
+			<!-- 单元格 -->
+			<view class="mine-info-cell1">
+				<u-cell-group :border="false">
+					<u-cell-item title="设置" @click="jumpPage('/pages/setting/setting')">
+						<image class="cell-icon shezhi" slot="icon" src="../../static/img/shezhi.png" mode=""></image>
+					</u-cell-item>
+				</u-cell-group>
+			</view>
 		</view>
     <!-- ########################## -- 底部导航栏 -- ################################ -->
     <u-tabbar

+ 11 - 2
h5_web/pages/schoolDetails/schoolDetails.vue

@@ -56,7 +56,9 @@
 			<!-- 学校信息 -->
 			<view class="school-details-content-introduce">
 				<view class="title">学校信息</view>
-				<view class="content" v-if="schoolInfo.detatil">{{ schoolInfo.detatil }}</view>
+				<view class="content" v-if="schoolInfo.detatil">
+					<u-parse :html="schoolInfo.detatil"/>
+				</view>
 				<u-empty v-else text="暂无学校信息" mode="data"></u-empty>
 			</view>
 			
@@ -124,8 +126,13 @@
 		},
 		onShow() {
 			this.getSchoolTypeList()
+			uni.showLoading({
+				title: '加载中'
+			})
 			if (this.schoolId) {
-				this.getSchoolDetails(this.schoolId)
+				setTimeout(() => {
+					this.getSchoolDetails(this.schoolId)
+				}, 300)
 			}
 		},
 		methods: {
@@ -137,10 +144,12 @@
 				this.$u.api.school.getSchoolDetails({
 					id: id
 				}).then(res => {
+					uni.hideLoading()
 					if (res.code === 200) {
 						this.schoolInfo = res.data
 					}
 				}).catch(err => {
+					uni.hideLoading()
 					this.$refs.uToast.show({
 						title: err.data.message,
 						type: 'error'