Prechádzať zdrojové kódy

修改部分存在的问题

空白格 3 rokov pred
rodič
commit
e5a5b908ae

+ 3 - 0
h5_web/common/apiurl.js

@@ -46,6 +46,9 @@ const apiurl = {
 	signOfflineUrl: '/adaptTrainOffline/sign',
 	// 根据身份证号读取信息
 	getIdInfoUrl: '/veteEduc/idcard/',
+	// 合作学校分页数据
+	getSchoolListUrl: '/school/list',
+	
 	// 学院模块
 	school: {
 		// 合作学校分页数据

+ 3 - 0
h5_web/common/http.api.js

@@ -50,6 +50,8 @@ const install = (Vue, vm) => {
 	let postSignOffline = (params = {}) => vm.$u.post(apiurl.signOfflineUrl, params);
 	// 根据身份证号读取信息
 	let getIdInfo = (params = {}) => vm.$u.get(apiurl.getIdInfoUrl+params.id);
+	// 获取学院分页数据
+	let getSchoolList = (params = {}) => vm.$u.get(apiurl.getSchoolListUrl, params)
 	
 	// 学院模块
 	let school = {
@@ -96,6 +98,7 @@ const install = (Vue, vm) => {
 		postSignOffline,
 		getAdaptTrainIdOffline,
 		getIdInfo,
+		getSchoolList,
 		school,
 		company
 	};

+ 8 - 6
h5_web/pages/businessDetails/businessDetails.scss

@@ -61,7 +61,7 @@
 			width: calc(100% - 60rpx);
 			height: 64rpx;
 			line-height: 64rpx;
-			margin: 36rpx auto 63rpx;
+			margin: 36rpx auto 0;
 			background-color: rgba($color: #fff, $alpha: 0.8);
 			border-radius: 32rpx;
 			padding: 0 31rpx;
@@ -99,7 +99,7 @@
 		/* 公司概况 */
 		&-survey {
 			width: calc(100% - 60rpx);
-			margin: 0 auto;
+			margin: 63rpx auto 0;
 			background-color: #fff;
 			border-radius: 10rpx;
 			padding: 28rpx 33rpx;
@@ -166,13 +166,15 @@
 				margin-bottom: 20rpx;
 			}
 			.pic-list {
-				display: flex;
-				justify-content: space-between;
-				flex-wrap: wrap;
+				// display: flex;
+				// justify-content: space-between;
+				// flex-wrap: nowrap;
 				&-item {
 					width: calc(50% - 8rpx);
 					margin-bottom: 8rpx;
-					image {
+					display: inline-block;
+					margin-right: 10rpx;
+					.image {
 						width: 100%;
 						height: 206rpx;
 						border-radius: 5rpx;

+ 22 - 13
h5_web/pages/businessDetails/businessDetails.vue

@@ -9,7 +9,7 @@
 				<image :src="companyInfo.logoUrl" mode=""></image>
 			</view>
 			<view class="business-details-content-name">{{ companyInfo.companyName }}</view>
-			<view class="business-details-content-evaluate">
+			<!-- <view class="business-details-content-evaluate">
 				<view class="left">
 					<view class="evaluate">优秀</view>
 					<view class="describe">综合评分</view>
@@ -26,7 +26,7 @@
 					详情
 					<u-icon class="icon" name="arrow-right" color="#666666"></u-icon>
 				</view>
-			</view>
+			</view> -->
 			
 			<!-- 公司概况 -->
 			<view class="business-details-content-survey">
@@ -59,18 +59,17 @@
 			</view>
 			
 			<!-- 公司相册 -->
-			<!-- <view class="business-details-content-album">
+			<view class="business-details-content-album">
 				<view class="title">公司相册</view>
-				<view class="pic-list">
-					<view
-						class="pic-list-item"
-						v-for="(item, index) in picList"
-						:key="index"
-					>
-						<image :src="item.url" mode=""></image>
-					</view>
-				</view>
-			</view> -->
+					<scroll-view scroll-x="true" class="pic" style="width: 100%; overflow:hidden; white-space: nowrap;" v-if="companyInfo.environmentUrlList && companyInfo.environmentUrlList.length > 0">
+						<view class="pic-list">
+							<view class="pic-list-item" v-for="(item, index) in companyInfo.environmentUrlList" :key="index">
+								<u-image :src="item" mode="" height="206" @tap="picClick(index)"/>
+							</view>
+						</view>
+					</scroll-view>
+					<u-empty v-else text="该公司暂未发布公司相册" mode="data"></u-empty>
+			</view>
 			
 			<!-- 公司职位 -->
 			<view class="business-details-content-position">
@@ -221,6 +220,16 @@
 					url,
 					params
 				})
+			},
+			/**
+			 * 图片预览
+			 * @param { Number } index
+			 */
+			picClick(index) {
+				uni.previewImage({
+					current: index,
+					urls: this.companyInfo.environmentUrlList
+				})
 			}
 		}
 	}

+ 3 - 2
h5_web/pages/cooperativeEnterprise/cooperativeEnterprise.scss

@@ -36,8 +36,9 @@
 				.image {
 					margin-right: 22rpx;
 					image {
-						width: 82rpx;
-						height: 82rpx;
+						width: 112rpx;
+						height: 112rpx;
+						border: solid 1px #E1E1E1;
 						border-radius: 10rpx;
 					}
 				}

+ 1 - 1
h5_web/pages/mine/mine.scss

@@ -148,7 +148,7 @@
 		&-cell1 {
 			width: calc(100% - 60rpx);
 			margin: 20rpx auto;
-			padding: 34rpx;
+			padding: 0 34rpx;
 			background-color: #fff;
 			border-radius: 10rpx;
 			.cell-icon {

+ 14 - 1
h5_web/pages/mine/mine.vue

@@ -97,6 +97,7 @@
       :active-color="tabbarConfig.activeColor"
       :mid-button-size="tabbarConfig.midButtonSize"
     ></u-tabbar>
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
@@ -121,7 +122,19 @@
 			 */
 			getMemberinfo(){
 				this.$u.api.getmemberinfo().then(res => {
-					this.memberinfo = res.data;
+					if (res.code === 200){
+						this.memberinfo = res.data;
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
+					}
+				}).catch(err => {
+					this.$refs.uToast.show({
+						title: err.msg,
+						type: 'error'
+					})
 				})
 			},
 			/**

+ 2 - 2
h5_web/pages/schoolDetails/schoolDetails.scss

@@ -38,7 +38,7 @@
 			width: calc(100% - 60rpx);
 			height: 64rpx;
 			line-height: 64rpx;
-			margin: 36rpx auto 63rpx;
+			margin: 36rpx auto 0;
 			background-color: rgba($color: #fff, $alpha: 0.8);
 			border-radius: 32rpx;
 			padding: 0 31rpx;
@@ -75,7 +75,7 @@
 		/* 学校信息 */
 		&-survey {
 			width: calc(100% - 60rpx);
-			margin: 0 auto;
+			margin: 63rpx auto 0;
 			background-color: #fff;
 			border-radius: 10rpx;
 			padding: 28rpx 33rpx;

+ 8 - 10
h5_web/pages/schoolDetails/schoolDetails.vue

@@ -7,10 +7,10 @@
 				<image :src="schoolInfo.schoolLogoUrl" mode=""></image>
 			</view>
 			<view class="school-details-content-name">{{ schoolInfo.schoolName }}</view>
-			<view class="school-details-content-evaluate">
+			<!-- <view class="school-details-content-evaluate">
 				<view class="left">
 					<view class="evaluate">优秀</view>
-					<!-- <view class="describe">综合评分</view>
+					<view class="describe">综合评分</view>
 					<view class="star">
 						<u-icon name="star-fill" color="#EF651F"></u-icon>
 						<u-icon name="star-fill" color="#EF651F"></u-icon>
@@ -18,13 +18,13 @@
 						<u-icon name="star-fill" color="#EF651F"></u-icon>
 						<u-icon name="star-fill" color="#EF651F"></u-icon>
 					</view>
-					<view class="grade">4.8</view> -->
+					<view class="grade">4.8</view>
 				</view>
 				<view class="right">
 					详情
 					<u-icon class="icon" name="arrow-right" color="#666666"></u-icon>
 				</view>
-			</view>
+			</view> -->
 			<!-- 学校概况 -->
 			<view class="school-details-content-survey">
 				<view class="title">学校概况</view>
@@ -126,13 +126,11 @@
 		},
 		onShow() {
 			this.getSchoolTypeList()
-			uni.showLoading({
-				title: '加载中'
-			})
 			if (this.schoolId) {
-				setTimeout(() => {
-					this.getSchoolDetails(this.schoolId)
-				}, 300)
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.getSchoolDetails(this.schoolId)
 			}
 		},
 		methods: {