twoRule.vue 5.0 KB
<template>
	<view class="twoRule">
		<!-- 校纪校规 -->

		<!-- <view class="tel_index_bg"></view> -->

		<view class="vio_list">
			<!-- <scroll-view scroll-y="true"  class="main_box"> -->
			<view class="text-content" v-html="textAll"></view>
			<!-- </scroll-view> -->
		</view>
		
		<view class="operate-wrap"  v-if="!is_seleShow">
			<view class="btom_agree_all flex" @tap="agreeClick">
				<view class="sele_yes">
					<view class="sele_yes_img" v-show="seleShow"></view>
				</view>
				我已详细阅读,并同意和服从管理
			</view>
			<view  class="agree_btn" @tap="agreeTap">
				同意
			</view>
		</view>
	</view>
</template>

<script>
	import Vue from 'vue'
	import {
		mapState,
		mapMutations
	} from 'vuex'
	var that
	export default {
		data() {
			return {
				textAll: `1.学生不得配带首饰如耳环、耳钉、项链、戒指、手链等。
				<br/><br/>2.不能将头发染成除黑色以外的其它颜色,女生不能烫头,男生 能留过长头发,不得理成毛刺等奇异发型。
				<br/><br/>3.穿衣要干净整洁、不能敞胸露怀,裤子不能卷起裤腿,不能穿拖 鞋来学校上学。
				<br/><br/>4.不能在校园内骑车、课间活动时不能追逐、打斗、大声喧哗,更 不能骂街, (在公共场所发酒疯,闹事,骂人等等) 。不得在校门口停 放自行车。自行车支架不全者,不得骑来学校(否则没收)
				<br/><br/>5、学生在上课时不应带手机、MP3、MP4等进教室,更不能在课堂上接听电话,影响教师讲课和他人听讲。
				<br/><br/>6、不能乱花零钱,在校园内不能吃零食,课间不能买任何东西。(违者一次罚款10元)
				<br/><br/>7、不能携带凶器进校园,不能拉帮结伙打群架(违者通知家长,两次劝其退学)
				<br/><br/>8、不能喝酒吸烟,不允许骑摩托车来上学。
				<br/><br/>9、不能损坏公物,对故意损坏公物者除赔偿外,另5倍罚款.
				<br/><br/>10、不能乱丢垃圾,垃圾倒在指定位置。
				<br/><br/>11、独立认真完成作业,课间操要认真规范做。`,
				seleShow: false, //是否点击同意
				is_seleShow:false
			}
		},
		onLoad() {
			that=this
			var is_seleShow=uni.getStorageSync('seleShow')
			this.is_seleShow=is_seleShow
			this.getdata()
		},
		methods: {
			getdata(){
				///study/letter_wx
				var datas = {
					key	:'xjxg'
				}
				var jkurl = '/study/single'
							
				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.textAll=datas.content
					} 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: '获取数据失败,请检查您的网络连接'
					})
				})
			},
			
			agreeClick() { //是否选择同意
				this.seleShow = !this.seleShow
			},
			agreeTap() { //同意按钮
				if (this.seleShow === false) {
					uni.showToast({
						icon: "none",
						title: "请选择同意"
					})
				} else {
					uni.setStorageSync('seleShow', 'true');

					uni.navigateBack({
						delta: 1
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.twoRule {
		position: relative;
		padding-bottom: 40rpx;
	}

	.tel_index_bg {
		position: absolute;
		top: 0;
		z-index: 1;
		width: 100%;
		min-height: 220rpx;
		background: linear-gradient(0deg, #f8f8f8 0%, #5D9DFD 60%, #428EFE 70%, #2D81FF 100%);
	}

	.vio_list {
		width: 100%;
		padding: 30rpx 30rpx 0 30rpx;
		border-radius: 20rpx;
		position: relative;
		z-index: 2;

		.text-content {
			background: #FFFFFF;
			border-radius: 10rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #545C71;
			padding: 50rpx 32rpx;
			min-height: 300rpx;
		}
	}

	.operate-wrap {
		width: 100%;
		padding: 0 30rpx;
		margin-top: 50rpx;
	}
	.btom_agree_all {
		width: 100%;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #646464;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-bottom: 20rpx;
		.sele_yes {
			width: 28rpx;
			height: 28rpx;
			border: 2px solid #A3C8FF;
			border-radius: 50%;
			margin-right: 10rpx;
			position: relative;
			margin-right: 14rpx;
			
			.sele_yes_img {
				width: 28rpx;
				height: 28rpx;
				border: 2px solid #A3C8FF;
				border-radius: 50%;
				background-color: #2D81FF;
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
			}
		}
	}
	
	
	.agree_btn{
		width: 100%;
		height: 90rpx;
		line-height: 90rpx;
		background: #2D81FF;
		border-radius: 45rpx;
		font-size: 34rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
	}
</style>