study.vue 7.0 KB
<template>
	<view class="study">
		<!-- 学习 -->
		<view class="nav-all-wrap area flex no-margin">
			<view class="nav-wrap flex" @tap="$sjuNav.navigateTo(`/pagesB/twoMailbox/twoMailbox`)">
				<view class="nav-img-wrap flex">
					<image class="nav-img" src="/static/imagesV2/study/xzxx.png" mode="aspectFit"></image>
				</view>
				<view class="nav-text">
					校长信箱
				</view>
			</view>
			<view class="nav-wrap flex" @tap="$sjuNav.navigateTo(`/pagesB/twoCurriculum/twoCurriculum`)">
				<view class="nav-img-wrap flex">
					<image class="nav-img" src="/static/imagesV2/study/kcb.png" mode="aspectFit" />
				</view>
				<view class="nav-text">
					课程表
				</view>
			</view>
		</view>
		<view class="nav-all-wrap area flex">
			<view class="nav-wrap flex" @tap="$sjuNav.navigateTo(`/pagesB/twoRule/twoRule`)">
				<view class="nav-img-wrap flex">
					<image class="nav-img" src="/static/imagesV2/study/xjxg.png" mode="aspectFit"></image>
				</view>
				<view class="nav-text">
					校纪校规
				</view>
			</view>
			<view class="nav-wrap flex" @tap="$sjuNav.navigateTo(`/pagesB/twoClassRules/twoClassRules`)">
				<view class="nav-img-wrap flex">
					<image class="nav-img" src="/static/imagesV2/study/bjbg.png" mode="aspectFit" />
				</view>
				<view class="nav-text">
					班级班规
				</view>
			</view>
		</view>
		
		<view class="nav-all-wrap area flex">
			<view class="nav-wrap flex" @tap="$sjuNav.navigateTo(`/pagesB/oneMyCredit/oneMyCredit`)">
				<view class="nav-img-wrap flex">
					<image class="nav-img" src="/static/imagesV2/study/xfqk.png" mode="aspectFit"></image>
				</view>
				<view class="nav-text">
					学分情况
				</view>
			</view>
			<!-- <view class="nav-wrap flex" @tap="$service.jump" data-url="/pagesStu/stu_selection/stu_selection"> -->
			<view class="nav-wrap flex" @tap="getxzdata" data-url="/pagesStu/stu_selection/stu_selection">
				
				<view class="nav-img-wrap flex">
					<image class="nav-img" src="/static/imagesV2/study/tkjsxz.png" mode="aspectFit" />
				</view>
				<view>
					<view class="nav-text">
						听课教室选座
					</view>
					<view class="seat-sele">
						<image src="/static/imagesV2/study/xuanzuo.png" mode="aspectFit" />
					</view>
					
				</view>
			</view>
			<!-- <view class="nav-wrap flex" @tap="$service.jump" data-url="/pagesStu/stu_myseat/stu_myseat">
				<view class="nav-img-wrap flex">
					<image class="nav-img" src="/static/images/tkjsxz.png" mode="aspectFit" />
				</view>
				<view>
					<view class="nav-text">
						听课教室选座
					</view>
					<view class="seat-sele">
						已选中
					</view>
				</view>
			</view> -->
		</view>
		
		<view class="entrance-container area" >
			<view class="entrance-wrap" @tap="$service.jump" data-url="/pagesStu/stu_register/stu_register">
				<image class="entrance-wrap-bg" src="/static/imagesV2/study/rxdj.png" mode="aspectFit"></image>
				<view class="check-in">
					<view class="check-in-title">
						入学登记
					</view>
					<view class="check-in-msg">
						赶快去登记信息吧!
					</view>
					<view class="check-in-go">
						<image src="/static/imagesV2/study/rxdj-go.png" mode="aspectFit"></image>
					</view>
				</view>
			</view>
			<view class="entrance-wrap" @click="toEvaluating">
				<image class="entrance-wrap-bg" src="/static/imagesV2/study/xuexicepingbj.png" mode="aspectFit"></image>
				<view class="check-in">
					<view class="check-in-title">
						入学评测
					</view>
					<view class="check-in-msg">
						赶快去登记信息吧!
					</view>
					<view class="check-in-go">
						<image src="/static/imagesV2/study/xuexicepingbj-go.png" mode="aspectFit"></image>
					</view>
				</view>
			</view>
		</view>
		</view>
</template>

<script>
	import Vue from 'vue'
	import {
		mapState,
		mapMutations
	} from 'vuex'
	var that 
	export default {
		data() {
			return {

			}
		},
		onLoad(e) {
			that=this
			
		},
		methods: {
			toEvaluating() {
				var datas = {}
				var jkurl = '/study/has_ruxue_baogao'
				that.$service.P_post(jkurl).then(res => {
					if(res.code == 1){
						uni.navigateTo({
							url: '/pagesStu/stu_evaluating/stu_evaluating'
						})
					}
				})
				
			},
			getxzdata(){
				///study/letter_wx
				var datas = {}
				var jkurl = '/study/class_room'
							
				that.$service.P_post(jkurl, datas).then(res => {
					that.btnkg = 0
					console.log(res)
					if (res.code == 1) {
						that.htmlReset = 0
						var datas = res.data
						console.log(typeof datas)
						if(datas.type==2||datas.type==3){
							uni.navigateTo({
								url:'/pagesStu/stu_selection/stu_selection'
							})
						}else if(datas.type==4){
							uni.navigateTo({
								url:'/pagesStu/stu_myseat/stu_myseat'
							})
						}else{
							uni.showToast({
								icon: 'none',
								title: '暂无听课数据'
							})
						}
					} else {
							
						if (res.msg) {
							uni.showToast({
								icon: 'none',
								title: res.msg
							})
						} else {
							uni.showToast({
								icon: 'none',
								title: '获取数据失败'
							})
						}
					}
				}).catch(e => {
					that.htmlReset = 1
					that.btnkg = 0
					// that.$refs.htmlLoading.htmlReset_fuc(1)
					console.log(e)
					uni.showToast({
						icon: 'none',
						title: '获取数据失败,请检查您的网络连接'
					})
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.no-margin {
		margin-top: 0 !important;
	}
	.study {
		min-height: 100vh;
		background-color: #fff;
		padding-top: 28rpx;
	}
	.nav-all-wrap {
		justify-content: space-between;
		align-items: center;
		margin-top: 28rpx;

		.nav-wrap {
			width: 334rpx;
			height: 150rpx;
			position: relative;
			background: #F7F7F7;
			border-radius: 20rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #333333;
			align-items: center;

			.nav-img-wrap {
				width: 68rpx;
				height: 76rpx;
				border-radius: 50%;
				justify-content: center;
				align-items: center;
				margin: 0 22rpx;

				.nav-img {
					width: 68rpx;
					height: 76rpx;
					border-radius: 50%;
				}
			}

			.nav-text {
				margin-top: -8rpx;
			}
		}

		.seat-sele {
			position: absolute;
			top: 0;
			right: 0;
			width: 100rpx;
			height: 40rpx;
		}
	}
	.entrance-container {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.entrance-wrap {
		width: 334rpx;
		height: 250rpx;
		margin-top: 28rpx;
		position: relative;

		.entrance-wrap-bg {
			width: 100%;
			height: 100%;
			position: absolute;
			top: 0;
			left: 0;
			z-index: 1;
		}

		.check-in {
			width: 100%;
			height: 100%;
			position: absolute;
			top: 0;
			left: 0;
			z-index: 2;
			padding: 30rpx;
			box-sizing: border-box;
			
			.check-in-title {
				font-size: 36rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
			}
			.check-in-msg {
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				margin-top: 20rpx;
			}
			
			.check-in-go {
				width: 78rpx;
				height: 40rpx;
				margin-top: 20rpx;
			}
		}
	}
	
	.evaluating{
		height: 200rpx;
		background-color: red;
	}
</style>