Kaynağa Gözat

公告详情

xionghaojie 3 yıl önce
ebeveyn
işleme
d24edd5522

+ 12 - 6
pages.json

@@ -1,11 +1,11 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
-		{
-			"path": "pages/index/index",
-			"style": {
-				"navigationBarTitleText": "就培云考试系统"
-			}
-		},
+		// {
+		// 	"path": "pages/index/index",
+		// 	"style": {
+		// 		"navigationBarTitleText": "就培云考试系统"
+		// 	}
+		// },
 		{
 			"path": "pages/login/login",
 			"style": {
@@ -35,6 +35,12 @@
 			"style": {
 				"navigationBarTitleText": "证书查询系统"
 			}
+		},
+		{
+			"path": "pages/contentDetail/contentDetail",
+			"style": {
+				"navigationBarTitleText": ""
+			}
 		}
 		
     ],

+ 180 - 0
pages/contentDetail/contentDetail.css

@@ -0,0 +1,180 @@
+.project {
+	height: 70px;
+	line-height: 70px;
+	background: #1AA1E6;
+	font-size: 24px;
+	color: #FFFFFF;
+	font-weight: bold;
+}
+
+.project-content {
+	margin: 38px 0;
+	justify-content: center;
+	align-items: stretch;
+}
+
+/* 考试 */
+.test-box {
+	width: 890px;
+	/* min-height: 812px; */
+	background: #FFFFFF;
+	border-radius: 0px 0px 0px 0px;
+	opacity: 1;
+	border: 3px solid #FFFFFF;
+	position: relative;
+	padding: 30px;
+	box-sizing: border-box;
+}
+
+.test-title {
+	font-size: 26px;
+	font-family: Source Han Sans CN-Bold, Source Han Sans CN;
+	font-weight: bold;
+	color: #333333;
+	line-height: 36px;
+	text-align: center;
+	margin-top: 20px;
+}
+
+.test-time {
+	text-align: center;
+	margin-top: 10px;
+	font-size: 14px;
+	margin-bottom: 20px;
+}
+
+.yj-icon {
+	width: 77px;
+	height: 81px;
+	margin: 76px auto 0;
+}
+
+.yj-label {
+	text-align: center;
+	font-size: 18px;
+	margin-top: 18px;
+}
+.chufen-number{
+	color: #F45D44;
+	font-size: 46px;
+	margin: 76px auto 0;
+	text-align: center;
+}
+.score {
+	justify-content: center;
+	margin-top: 30px;
+	margin-bottom: 60px;
+	padding-left: 30px;
+}
+.score-label{
+	font-size: 16px;
+	color: #999999;
+}
+.score-value{
+	font-size: 24px;
+	color: #1AA1E6;
+	margin-top: 20px;
+}
+.line{
+	width: 1px;
+	height: 57px;
+	color: #DEDEDE;
+	background-color: #DEDEDE;
+	margin: 0 30px;
+}
+.back-btn{
+	width: 190px;
+	height: 46px;
+	background: #F5F5F5;
+	border-radius: 50px 50px 50px 50px;
+	opacity: 1;
+	font-size: 14px;
+	justify-content: center;
+	margin:200px auto 0;
+}
+.back-btn image{
+	width: 19px;
+	height: 15px;
+	margin-right: 10px;
+}
+
+
+.test-info {
+	width: 280px;
+	flex-direction: column;
+	margin-left: 30px;
+}
+
+/* 考试信息 */
+.test-people {
+	width: 100%;
+	background-color: #FFFFFF;
+	padding: 12px 11px;
+	box-sizing: border-box;
+}
+
+.test-people image {
+	width: 80px;
+	height: 89px;
+	margin-right: 19px;
+}
+
+.test-people-info {
+	flex-direction: column;
+	justify-content: space-between;
+	font-size: 14px;
+	flex: 1;
+	align-items: flex-start;
+}
+
+.test-people-label {
+	color: #999999;
+	line-height: 36px;
+	margin-right: 8px;
+}
+
+/* 考试公告 */
+.note-box {
+	width: 100%;
+	background-color: #FFFFFF;
+	padding: 20px;
+	box-sizing: border-box;
+	margin-bottom: 20px;
+}
+
+.note-title {
+	margin-bottom: 18px;
+	font-size: 16px;
+}
+
+.note-title-icon {
+	width: 18px;
+	height: 18px;
+	margin-right: 10px;
+}
+
+.note-item {
+	justify-content: space-between;
+	font-size: 12px;
+	font-weight: 400;
+	line-height: 30px;
+	font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+	cursor: pointer;
+}
+
+.note-item-content {
+	color: #666666;
+	flex: 1;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	margin-right: 10px;
+}
+
+.note-item-content:hover {
+	text-decoration: underline #666666;
+}
+
+.note-item-date {
+	color: #999999;
+}

+ 94 - 0
pages/contentDetail/contentDetail.vue

@@ -0,0 +1,94 @@
+<template>
+	<view>
+		<Headers></Headers>
+		<view class="project">
+			<view style="width: 1200px;margin: auto;">在线考试系统</view>
+		</view>
+		
+		<view class="project-content ddflex">
+			<!-- 成绩区域 -->
+			<view class="test-box">
+				<view class="test-title">二手车评估师考试</view>
+				<view class="test-time">
+					<text style="color: #999999;margin-right: 10px;">发布日期</text>
+					<text>2022-08-25 09:30:00</text>
+				</view>
+				<mp-html :content="content" :lazy-load="true" @imgtap="choose"></mp-html>
+				
+			</view>
+			<!-- 答题卡区域 -->
+			<view class="test-info ddflex">
+				<view class="note-box">
+					<view class="note-title ddflex">
+						<image class="note-title-icon" src="/static/images/ksgg.png"></image>
+						<view>考试公告</view>
+					</view>
+					<view>
+						<view class="note-item ddflex">
+							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章2022年“技能+学历”双证教育班培训简章2022年“技能+学历”双证教育班培训简章</view>
+							<!-- <view class="note-item-date">2022-08-25</view> -->
+						</view>
+						<view class="note-item ddflex">
+							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章</view>
+							<!-- <view class="note-item-date">2022-08-25</view> -->
+						</view>
+						<view class="note-item ddflex">
+							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章</view>
+							<!-- <view class="note-item-date">2022-08-25</view> -->
+						</view>
+					</view>
+				</view>
+				<!-- 注意事项 -->
+				<view class="note-box">
+					<view class="note-title ddflex">
+						<image class="note-title-icon" src="/static/images/zysx.png"></image>
+						<view>注意事项</view>
+					</view>
+					<view>
+						<view class="note-item ddflex">
+							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章2022年“技能+学历”双证教育班培训简章2022年“技能+学历”双证教育班培训简章</view>
+							<!-- <view class="note-item-date">2022-08-25</view> -->
+						</view>
+						<view class="note-item ddflex">
+							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章</view>
+							<!-- <view class="note-item-date">2022-08-25</view> -->
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<Foot></Foot>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require('../../utils/request.js');
+	import mpHtml from "../../components/mp-html/mp-html.vue";
+	export default {
+		data() {
+			return {
+				id:null,
+				content:''
+			}
+		},
+		onReady() {},
+		onLoad(options) {
+			this.id = options.id
+			this.getDetail()
+		},
+		methods: {
+			getDetail(){
+				req.getRequest('https://mock.apifox.cn/m1/2171629-0-default/api/content/detail',{},res=>{
+					this.content = res
+				})
+			}
+		}
+	}
+
+</script>
+
+<style>
+	@import url('./contentDetail.css');
+</style>

+ 3 - 3
pages/login/login.css

@@ -16,7 +16,7 @@
 .register {
 	background: #fff;
 	margin: 60px auto 0;
-	padding: 5px 110px;
+	padding: 60px 110px;
 	position: relative;
 	border-radius: 40px;
 	position: relative;
@@ -40,8 +40,8 @@
 }
 
 .re-con-pic image {
-	width: 500px;
-	height: 500px;
+	width: 563px;
+	height: 427px;
 }
 
 .re-tit {

+ 55 - 139
pages/login/login.vue

@@ -5,8 +5,8 @@
 		<view class="ddflex" style="flex-direction: column;">
 			<view class="register ddflex">
 				<view class="re-con-pic">
-					<view class="re-con-pic-title">在线考试系统</view>
-					<image src="/static/images/loginBg.png"></image>
+					<!-- <view class="re-con-pic-title">在线考试系统</view> -->
+					<image src="/static/images/loginBg1.png"></image>
 				</view>
 				<view class="re-con">
 					<view class="re-tit">考生登录</view>
@@ -15,7 +15,7 @@
 						<input v-model="testNumber" type="number" placeholder="准考证号" maxlength="11" placeholder-class="placeholder" class="re-ipt flex" />
 					</view>
 					<uni-data-select
-					      v-model="password"
+					      v-model="testProject"
 					      :localdata="range"
 					      @change="changeTestPro"
 						  placeholder="考试项目"
@@ -25,7 +25,7 @@
 						<view class="yzm-box" @click="refresh()"><canvas :style="{ width: width + 'px', height: height + 'px' }" canvas-id="imgcanvas"></canvas></view>
 					</view> -->
 					<view class="re-btn" @click="okLogin()">登录</view>
-					<view class="re-btn-text">考生成绩查询</view>
+					<view class="re-btn-text" @click="jumpUrl('/pages/scoreQuery/scoreQuery')">考生成绩查询</view>
 				</view>
 			</view>
 			<view class="bottom-content ddflex">
@@ -36,17 +36,9 @@
 						<view>考试公告</view>
 					</view>
 					<view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章2022年“技能+学历”双证教育班培训简章2022年“技能+学历”双证教育班培训简章</view>
-							<view class="note-item-date">2022-08-25</view>
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章</view>
-							<view class="note-item-date">2022-08-25</view>
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章</view>
-							<view class="note-item-date">2022-08-25</view>
+						<view class="note-item ddflex" v-for="item,index in otherInfo" :key="index" @click="jumpUrl('/pages/contentDetail/contentDetail?id='+item.id)">
+							<view class="note-item-content">{{item.title}}</view>
+							<view class="note-item-date">{{dateFormat(item.creatDate)}}</view>
 						</view>
 					</view>
 				</view>
@@ -57,13 +49,9 @@
 						<view>注意事项</view>
 					</view>
 					<view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章2022年“技能+学历”双证教育班培训简章2022年“技能+学历”双证教育班培训简章</view>
-							<view class="note-item-date">2022-08-25</view>
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">2022年“技能+学历”双证教育班培训简章</view>
-							<view class="note-item-date">2022-08-25</view>
+						<view class="note-item ddflex" v-for="item,index in noteInfo" :key="index+'zy'" @click="jumpUrl('/pages/contentDetail/contentDetail?id='+item.id)">
+							<view class="note-item-content">{{item.title}}</view>
+							<view class="note-item-date">{{dateFormat(item.creatDate)}}</view>
 						</view>
 					</view>
 				</view>
@@ -84,63 +72,77 @@ export default {
 			width: 115,
 			height: 36,
 			testNumber: '',
-			password: '',
+			testProject:'',
 			code: '',
 			isCheckArg: true,
-			range:[
-				{ value: 0, text: "考试项目1" },
-				{ value: 1, text: "考试项目2" },
-				{ value: 2, text: "考试项目3" }
-			]
+			range:[],
+			otherInfo:[],//考试公告
+			noteInfo:[],//注意事项
 		};
 	},
 	onLoad() {
 		var tha = this;
+		this.getTestProject()
+		this.getTextOtherInfo()
+		this.getTextNoteInfo()
 		setTimeout(function() {
 			tha.initCode();
 		}, 200);
 	},
 	methods: {
-		changeEnv() {
-			// this.isCheckArg = !this.isCheckArg;
+		jumpUrl(url){
+			uni.navigateTo({
+				url:url
+			})
 		},
-		
 		// 考试下拉框
 		changeTestPro(e){
 			console.log("e:", e);
 		},
-
+		// 获取考试项目
+		getTestProject(){
+			console.log('11')
+			req.getRequest('https://mock.apifox.cn/m1/2171629-0-default/api/test/project',{},res=>{
+				console.log('this.range',res)
+				this.range = res.map(item=>{return {text:item.title,value:item.id}})
+				console.log(this.range)
+			})
+		},
+		// 考试公告
+		getTextOtherInfo(){
+			req.getRequest('https://mock.apifox.cn/m1/2171629-0-default/api/ksgg',{},res=>{
+				this.otherInfo = res
+			})
+		},
+		// 考试公告
+		getTextNoteInfo(){
+			req.getRequest('https://mock.apifox.cn/m1/2171629-0-default/api/ksgg',{type:2},res=>{
+				this.noteInfo = res
+			})
+		},
 		okLogin() {
-			uni.reLaunch({
-				url: '/pages/test/test'
-			});
-			return false
-			
-			
 			if (!this.testNumber) {
 				return req.msg('请输入准考证号');
 			}
-			if (!this.password) {
-				return req.msg('请输入密码');
-			}
-			if (!this.code) {
-				return req.msg('请输入验证码');
-			}
-			var imgCode = uni.getStorageSync('imgcode');
-			if (this.code.toUpperCase() != imgCode.toUpperCase()) {
-				req.msg('请输入正确的验证码');
-				this.initCode();
-				return;
+			if (!this.testProject) {
+				return req.msg('请选择考试项目');
 			}
 			var formP = {
-				account: this.mobile,
-				password: this.password
+				testNumber: this.testNumber,
+				testProject: this.testProject
 			};
+			uni.reLaunch({
+				url: '/pages/test/test'
+			});
+			return false
 			req.postRequest('/api/v3/hy/account/pwdLogin', formP, data => {
 				this.getUserInfo();
 			});
 		},
-
+		// 时间格式化
+		dateFormat(date){
+			return req.dateFormat(date).v5
+		},
 		getUserInfo() {
 			req.getRequest(
 				'/api/v3/hy/account/userInfo',
@@ -161,93 +163,7 @@ export default {
 			);
 		},
 
-		initCode() {
-			console.log('start');
-			var context = uni.createCanvasContext('imgcanvas', this),
-				w = this.width,
-				h = this.height;
-			context.setFillStyle('white');
-			context.setLineWidth(5);
-			context.fillRect(0, 0, w, h);
-			var pool = [
-					'A',
-					'B',
-					'C',
-					'D',
-					'E',
-					'F',
-					'G',
-					'H',
-					'I',
-					'J',
-					'K',
-					'L',
-					'I',
-					'M',
-					'N',
-					'O',
-					'P',
-					'Q',
-					'R',
-					'S',
-					'T',
-					'U',
-					'V',
-					'W',
-					'S',
-					'Y',
-					'Z',
-					'1',
-					'2',
-					'3',
-					'4',
-					'5',
-					'6',
-					'7',
-					'8',
-					'9',
-					'0'
-				],
-				str = '';
-			for (var i = 0; i < 4; i++) {
-				var c = pool[this.rn(0, pool.length - 1)]; //随机的字
-				var deg = this.rn(-30, 30); //字体的旋转角度
-				context.setFontSize(18);
-				context.setTextBaseline('top');
-				context.setFillStyle(this.rc(80, 150));
-				context.save();
-				context.translate(30 * i + 15, parseInt(h / 1.5));
-				context.rotate((deg * Math.PI) / 180);
-				context.fillText(c, -15 + 5, -15);
-				context.restore();
-				str += c;
-			}
-			uni.setStorage({
-				key: 'imgcode',
-				data: str
-			});
-			for (var i = 0; i < 40; i++) {
-				context.beginPath();
-				context.arc(this.rn(0, w), this.rn(0, h), 1, 0, 2 * Math.PI);
-				context.closePath();
-				context.setFillStyle(this.rc(150, 200));
-				context.fill();
-			}
-			context.draw();
-			console.log('end');
-		},
-		rc(min, max) {
-			var r = this.rn(min, max);
-			var g = this.rn(min, max);
-			var b = this.rn(min, max);
-			return 'rgb(' + r + ',' + g + ',' + b + ')';
-		},
-		rn(max, min) {
-			return parseInt(Math.random() * (max - min)) + min;
-		},
-		refresh() {
-			this.initCode();
-		}
+		
 	}
 };
 </script>

+ 2 - 1
pages/test/test.vue

@@ -116,7 +116,8 @@
 					<view>您正在结束作答</view>
 					<image src="/static/images/close.png" @click="close()"></image>
 				</view>
-				<view class="popup-content">您已完成全部考题,是否确定交卷?</view>
+				<!-- {{(quests.filter(item=>{return item.isSubmit}).length<quests.length)?'您还有未完成的考题,是否确定交卷?':'您已完成全部考题,是否确定交卷?'}} -->
+				<view class="popup-content">{{(quests.filter(item=>{return item.isSubmit}).length < quests.length ? '您还有未完成的考题,是否确定交卷?':'您已完成全部考题,是否确定交卷?')}}</view>
 				<view class="popup-bottom ddflex">
 					<view class="popup-btn1" @click="close()">继续考试</view>
 					<view class="popup-btn2" @click="submit">确定交卷</view>

BIN
static/images/loginBg1.png


+ 1 - 0
utils/request.js

@@ -783,6 +783,7 @@ const dateFormat = (dat)=>{
 		v2:year +"/"+ mon +"/"+ data +" "+ hour +":"+ min +":"+ seon,
 		v3:year +"/"+ mon +"/"+ data,
 		v4:year +"年"+ mon +"月"+ data +"日",
+		v5:year +"-"+ mon +"-"+ data,
 		week:str,
 		text:text
 	};