study.vue 7.0 KB
<template>
	<view class="study">
		<!-- 学习 -->
		<view class="header-wrap">
			<view class="nav-all-wrap no-margin area flex">
				<view class="nav-wrap flex" @tap="$sjuNav.navigateTo(`/pagesB/twoMailbox/twoMailbox`)">
					<view class="nav-img-wrap flex">
						<image class="nav-img" src="/static/images/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/images/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/images/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/images/bjbg.png" mode="aspectFit" />
					</view>
					<view class="nav-text">
						班级班规
					</view>
				</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/images/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/images/tkjsxz.png" mode="aspectFit" />
				</view>
				<view>
					<view class="nav-text">
						听课教室选座
					</view>
					<view class="seat-sele">
						选座中
					</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-wrap area">
			<image src="/static/images/rxdj.png" mode="aspectFit"></image>
			<view class="check-in flex">
				<view class="check-in-left">
					<view class="">
						入学登记
					</view>
					<view class="check-in-quick">
						赶快去登记信息吧!
					</view>
				</view>
				<view class="check-in-btn" @tap="$service.jump" data-url="/pagesStu/stu_register/stu_register">
					去登记
				</view>
			</view>
		</view>
		<view class="entrance-wrap area">
			<image src="/static/images/xuexicepingbj.png" mode="aspectFit"></image>
			<view class="check-in flex">
				<view class="check-in-left">
					<view class="">
						入学评测
					</view>
					<view class="check-in-quick">
						赶快去登记信息吧!
					</view>
				</view>
				<view class="check-in-btn check-in-btn2" @click="toEvaluating">
					去查看
				</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;
	}

	.nav-all-wrap {
		justify-content: space-between;
		align-items: center;
		margin-top: 28rpx;

		.nav-wrap {
			width: 334rpx;
			height: 132rpx;
			background: #FFFFFF;
			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 {
			height: 26rpx;
			line-height: 26rpx;
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #ADADAD;
			margin-top: 6rpx;
		}
	}

	.entrance-wrap {
		height: 253rpx;
		border-radius: 20rpx;
		margin-top: 28rpx;
		position: relative;

		image {
			width: 100%;
			height: 100%;
			position: absolute;
			top: 0;
			left: 0;
			z-index: 1;
		}

		.check-in {
			width: 100%;
			height: 100%;
			// justify-content: space-around;
			align-items: center;
			position: absolute;
			top: 0;
			left: 0;
			z-index: 2;

			.check-in-left {
				font-size: 36rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				margin: -46rpx 60rpx 0 80rpx;

				.check-in-quick {
					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #FFFFFF;
				}
			}

			.check-in-btn {
				width: 260rpx;
				height: 80rpx;
				line-height: 80rpx;
				text-align: center;
				background: #FFFFFF;
				opacity: 0.9;
				border-radius: 40rpx;
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #2D81FF;
				margin-top: -46rpx;
			}
			.check-in-btn2{
				color: #fea13a;
			}
		}
	}
	
	.evaluating{
		height: 200rpx;
		background-color: red;
	}
</style>