stu_myseat.vue 4.0 KB
<template>
	<view class="wrap_box">

		<view v-if="datas.info">
			<view class="course-info" >
				<view class="course-info-title">
					<text class="classroom">{{datas.info.pid}}</text>
					<view class="tit">
						{{datas.info.title}} 
					</view>
				</view>
				<view class="course-info-content">
					课程详情:{{datas.info.content}}
				</view>
			</view>
			
			<view class="my_seat">
				<view class="my_seat_bg">
					<image src="/static/imagesV2/stu_myseat/bg.png" mode="aspectFill"></image>
				</view>
				<view class="my_seat_info">
					<view class="value">
						{{datas.seat_title}}
					</view>
					<view class="label">
						你选的座位
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import Vue from 'vue'
	import {
		mapState,
		mapMutations
	} from 'vuex'
	var that 
	export default {
		data() {
			return {
				options:'',
				
				datas:'',
				x: 0,
				y: 0,
				old: {
						x: 0,
						y: 0
				}
			}
		},
		computed: {
			...mapState(['hasLogin', 'forcedLogin', 'userName', 'userinfo','nowtime']),
			
		},
		onLoad(e) {
			that=this
			that.options=e||{}
			console.log(e)
			// if(e.type==0){
			// 	uni.setNavigationBarTitle({
			// 		title:'公务员目标制定'
			// 	})
			// }
			// if(e.type==1){
			// 	uni.setNavigationBarTitle({
			// 		title:'事业单位目标制定'
			// 	})
			// }
			// if(e.type==2){
			// 	uni.setNavigationBarTitle({
			// 		title:'特岗教师目标制定'
			// 	})
			// }
			that.getdata()
		},
		onShow() {
			
		},
		methods: {
			// ...mapMutations(['wxshouquan','login']),
			test(){},
			
			getdata(){
				///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)
						that.datas=datas
						// that.x=datas.width*20+'rpx'
					} 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: '获取数据失败,请检查您的网络连接'
					})
				})
			},
			
			getimg(img){
				return service.getimg(img)
			},
			jump(e) {
				var that = this
				if (that.btnkg == 1) {
					return
				} else {
					that.btnkg = 1
					setTimeout(function() {
						that.btnkg = 0
					}, 2000)
				}
				console.log(e.currentTarget.dataset.type)
				service.jump(e)
			},
			goback(){
			  uni.navigateBack()
			},
			func(){
				// that.$store.commit('setSystem',datas.system)
			}
		}
	}
</script>

<style lang="scss" scoped>
.wrap_box{
	width: 100%;
	// padding: 30rpx;
	min-height: 100vh;
	// #ifdef H5
	min-height: calc(100vh - 44px);
	// #endif
	background: #fff;
	position: relative;
}

.course-info {
	padding: 20rpx;
	&-title {
		display: flex;
		align-items: center;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #323232;
		.classroom {
			background: #FE7631;
			border-radius: 5rpx;
			padding: 7rpx 20rpx;
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #FAFBFA;
			margin-right: 20rpx;
		}
		.tit {
			flex: 1;
		}
	}
	&-content {
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #646464;
		margin-top: 20rpx;
	}
}


.my_seat{
	margin: 20rpx;
	background: #FAFAFA;
	border-radius: 20px;
	padding: 65rpx 0 40rpx;
	&_bg{
		width: 280rpx;
		height: 280rpx;
		margin: 0 auto;
	}
	&_info{
		margin-top: -30rpx;
		text-align: center;
		.value {
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #2D81FF;
		}
		.label {
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #646464;
			margin-top: 20rpx;
		}
	}
}
</style>