stu_jspf_index.vue 7.8 KB
<template>
	<view class="wrap_box">
		<view class="wrap_boxV2">
			<view class="wrap_boxV2-i"  @click="$service.jump" data-url="/pages_v2/stu_js_list/stu_js_list">
				<view class="wrap_boxV2-i-l">
					<view class="wrap_boxV2-i-l-1">讲师评分</view>
					<view class="wrap_boxV2-i-l-2">关于讲师的评分与建议</view>
				</view>
				<view class="wrap_boxV2-i-r">
					去评分 <u-icon name="edit-pen" color="#2D81FF"></u-icon>
				</view>
			</view>
			<view class="wrap_boxV2-i"  @click="go_jspf(2)" data-url="/pages_v2/stu_js_pj_z/stu_js_pj_z">
				<view class="wrap_boxV2-i-l">
					<view class="wrap_boxV2-i-l-1">班主任评分</view>
					<view class="wrap_boxV2-i-l-2">关于班主任的评分与建议</view>
				</view>
				<view class="wrap_boxV2-i-r">
					去评分 <u-icon name="edit-pen" color="#2D81FF"></u-icon>
				</view>
			</view>
			<view class="wrap_boxV2-i" @click="$service.jump" data-url="/pages_v2/stu_js_list1/stu_js_list1">
				<view class="wrap_boxV2-i-l">
					<view class="wrap_boxV2-i-l-1">综合办老师评分</view>
					<view class="wrap_boxV2-i-l-2">关于综合办老师的评分与建议</view>
				</view>
				<view class="wrap_boxV2-i-r">
					去评分 <u-icon name="edit-pen" color="#2D81FF"></u-icon>
				</view>
			</view>
			<view class="wrap_boxV2-i"  v-if="showObj.assistant === 1"  @click="go_jspf(4)" data-url="/pages_v2/stu_js_list2/stu_js_list2">
				<view class="wrap_boxV2-i-l">
					<view class="wrap_boxV2-i-l-1">助教老师评分</view>
					<view class="wrap_boxV2-i-l-2">关于助教老师的评分与建议</view>
				</view>
				<view class="wrap_boxV2-i-r">
					去评分 <u-icon name="edit-pen" color="#2D81FF"></u-icon>
				</view>
			</view>
			<view class="wrap_boxV2-i"  v-if="showObj.manager === 1"  @click="$service.jump" data-url="/pages_v2/stu_js_list3/stu_js_list3">
				<view class="wrap_boxV2-i-l">
					<view class="wrap_boxV2-i-l-1">学校负责人评分</view>
					<view class="wrap_boxV2-i-l-2">关于学校负责人的评分与建议</view>
				</view>
				<view class="wrap_boxV2-i-r">
					去评分 <u-icon name="edit-pen" color="#2D81FF"></u-icon>
				</view>
			</view>
			<view class="wrap_boxV2-i"  v-if="showObj.school === 1"  @click="$service.jump" data-url="/pages_v2/stu_js_pj4/stu_js_pj4">
				<view class="wrap_boxV2-i-l">
					<view class="wrap_boxV2-i-l-1">学校总体评分</view>
					<view class="wrap_boxV2-i-l-2">关于学校的评分与建议</view>
				</view>
				<view class="wrap_boxV2-i-r">
					去评分 <u-icon name="edit-pen" color="#2D81FF"></u-icon>
				</view>
			</view>
			<view class="wrap_boxV2-i" @click="$service.jump" data-url="/pages_v2/stu_js_list4/stu_js_list4">
				<view class="wrap_boxV2-i-l">
					<view class="wrap_boxV2-i-l-1">面试老师评分</view>
					<view class="wrap_boxV2-i-l-2">关于面试老师的评分与建议</view>
				</view>
				<view class="wrap_boxV2-i-r">
					去评分 <u-icon name="edit-pen" color="#2D81FF"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import Vue from 'vue'
	import {
		mapState,
		mapMutations
	} from 'vuex'
	var that 
	export default {
		data() {
			return {
				options:'',
				datas:'',
				showObj: {}
			}
		},
		computed: {
		...mapState(['hasLogin', 'forcedLogin', 'userName', 'userinfo','nowtime']),
		},
		onLoad(e) {
			that=this
			that.options=e||{}
			console.log(e)
			
			// that.getdata()
		},
		onShow() {
			this.getSet()
		},
		methods: {
			// ...mapMutations(['wxshouquan','login']),
			test(){},
			go_jspf(type){
				var datas={
					type:type
				}
				if(that.btnkg==1){
					return
				}
				that.btnkg=1
				var jkurl='/content/verif'
				
				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 (typeof datas == 'string') {
						// 	datas = JSON.parse(datas)
						// }
						console.log(res)
						if(type === 2) {
							uni.navigateTo({
								url:'/pages_v2/stu_js_pj_z/stu_js_pj_z?title='+res.data
							})
						} else {
							uni.navigateTo({
								url:'/pages_v2/stu_js_pj2/stu_js_pj2?title='+res.data
							})
						}
						
						
					} 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: '获取数据失败,请检查您的网络连接'
					})
				})
			},
			getSet() {
				var jkurl='/content/set'
				that.$service.P_post(jkurl, {}).then(res => {
					console.log('set', res)
					this.showObj = res.data
				})
			},
			getdata(){
				
				var datas={
					key: that.options.type
				}
				var jkurl='/info'
				
				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 (typeof datas == 'string') {
							datas = JSON.parse(datas)
						}
						console.log(res)
						that.datas=datas.info.content
						if(datas.info.title){
							uni.setNavigationBarTitle({
								title:datas.info.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: '获取数据失败,请检查您的网络连接'
					})
				})
			},
			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: #F8F8F8;
}
.wrap_boxV2{
	padding: 25rpx;
	.wrap_boxV2-i{
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 30rpx;
		background-color: #fff;
		border-radius: 20rpx;
		margin-bottom: 20rpx;
		.wrap_boxV2-i-l{
			.wrap_boxV2-i-l-1{
				font-size: 30rpx;
				color: #323232;
			}
			.wrap_boxV2-i-l-2{
				color: #979797;
				font-size: 26rpx;
				margin-top: 15rpx;
			}
		}
		.wrap_boxV2-i-r{
			color: #2D81FF;
			font-size: 28rpx;
			display: flex;
			align-items: center;
		}
	}
}
.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%);
}
.bz_box{
	width: 100%;
	position: relative;
	z-index: 2;
	padding: 30rpx;
}
.jspf_li{
	width: 100%;
	// height: 200rpx;
	background: #FFFFFF;
	border-radius: 20rpx;
	padding: 30rpx 44rpx;
	&+.jspf_li{
		margin-top: 10rpx;
	}
	.go_pf{
		font-size: 25rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		width: 150rpx;
		height: 60rpx;
		background: #2D81FF;
		border-radius: 40rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: 16rpx
	}
	.jspf_li_tit{
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #545D71;
	}
	.jspf_li_tit1{
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #B6B9C0;
	}
}
</style>