tanxue 5 месяцев назад
Родитель
Сommit
f8638e4a94

+ 28 - 0
common/styles/global/components.scss

@@ -54,6 +54,34 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
 	background-image: url("@/static/images/tabbar/tabbar-bg.png");@include ezy-no-repeat-cover(top);
 }
 
+/***** 标题栏  *****/
+// 三个元素
+.ezy-navBar-box{
+	display: flex;align-items: center;justify-content: space-between;
+	padding: 0 20rpx;box-sizing: border-box;
+	.nav-bar-icon{
+		width: 63rpx;height: 63rpx;
+		background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
+	}
+	.nav-bar-title{
+		font-size: 36rpx;color: #fff;
+	}
+	.nav-bar-other{
+		font-size: 30rpx;color: #fff;
+		.key-note{color: #ffff01;}
+	}
+}
+
+/***** 单选题 *****/
+.ezy-danxuan-box{
+	.danxuan-title{
+		width: 231rpx;height: 63rpx;
+		background-image: url("@/static/images/exam/danxuan-title.png");@include ezy-no-repeat-cover();
+	}
+	.danxuan-question{
+		
+	}
+}
 
 /***** 模拟标题栏 *****/
 .ezy-title-bar {

+ 22 - 1
common/styles/global/pages.scss

@@ -242,7 +242,28 @@
 		font-size: 32rpx;
 	}
 }
-	
+
+// 考试页
+.ezy-exam-page{
+	width: 100%;height: 100vh;background-color: #0ab2f0;
+	padding-top:var(--status-bar-height);display: flex;flex-direction: column;
+	.exam-body-box{
+		flex: 1;width: 92%;height: auto;background-color: rgba(255, 255, 255, 0.6);border-radius: 4px;
+		margin: 32rpx auto;position: relative;padding: 2%;box-sizing: border-box;display: flex;flex-direction: column;
+	}
+	.exam-body-box::before{
+		content: "";display: block;background-color: rgba(255, 255, 255, 0.8);
+		position: absolute;top: 2%;left: 3%;right: 3%;bottom: 2%;z-index: 1;
+	}
+	.ezy-exam-swiper{
+		flex: 1;z-index: 2;
+	}
+	.exam-submit-btn{
+		width: 87rpx;height: 125rpx;@include ezy-no-repeat-cover;z-index: 2;
+		background-image: url("@/static/images/exam/submit-btn.png");
+	}
+}
+
 	// height:$titleBar-tabBar-page;
 .lli-develop-expect-page{
 	display: flex;flex-direction: column;justify-content: space-between;align-items: center;

+ 3 - 3
components/question/danxuan.vue

@@ -1,9 +1,9 @@
 <template>
-	<view v-if="question">
+	<view v-if="question" class="ezy-danxuan-box">
 		<!-- 标题区域 -->
-		<view>单选题:</view>
+		<view class="danxuan-title"></view>
 		<!-- 题干区域 -->
-		<view v-html="data.name"></view>
+		<view v-html="data.name" class="danxuan-question"></view>
 		<!-- 选项区域 -->
 		<view>
 			<view v-for="(item,index) in data.contents" :class="formatClass(index)" :key="index" @click="onSelect(index)">

+ 1 - 1
pages/login/login.vue

@@ -84,7 +84,7 @@
 			},
 			loginBtn() {
 				let req = {
-					tel: this.loginData.phoneNumber,
+					tel: 1,
 					code: this.loginData.yzmNumber,
 				}
 				login(req).then(res => {

+ 20 - 16
pages/unitTest/index.vue

@@ -1,21 +1,25 @@
 <template>
-	<view>
-		<view>
-			<uni-icons type="left" size="30" @click="handleBack"></uni-icons>
-			<text>单元测试</text>
-			<view><text>{{count}}</text>/<text>{{total}}</text></view>
+	<view class="ezy-exam-page">
+		<view class="ezy-navBar-box">
+			<view @click="handleBack" class="nav-bar-icon"></view>
+			<text class="nav-bar-title">单元测试</text>
+			<view class="nav-bar-other"><text class="key-note">{{count}}</text>/<text>{{total}}</text></view>
 		</view>
-		<w-swiper :list="list" :swiperHeight="300" :positionIndex="current">
-			<template v-slot:default="{item}">
-				<view class="body" v-if="item.mta_show">
-					<danxuan :question="item" v-if="item.type == '1'"></danxuan>
-					<panduan :question="item" v-if="item.type == '2'"></panduan>
-          <!-- <tiankong :question="item" v-if="item.type == '3'"></tiankong> -->
-				</view>
-			</template>
-		</w-swiper>
-		<button class="transition-button" v-if="isLast" type="primary"
-			@click="handleSubmit(uniPointsRef)">submit</button>
+		
+		<view class="exam-body-box">
+			<w-swiper :list="list" :positionIndex="current" class="ezy-exam-swiper">
+				<template v-slot:default="{item}">
+					<view class="body" v-if="item.mta_show">
+						<danxuan :question="item" v-if="item.type == '1'"></danxuan>
+						<panduan :question="item" v-if="item.type == '2'"></panduan>
+			  <!-- <tiankong :question="item" v-if="item.type == '3'"></tiankong> -->
+					</view>
+				</template>
+			</w-swiper>
+			<view class="exam-submit-btn" v-if="isLast" 
+				@click="handleSubmit(uniPointsRef)"></view>
+		</view>
+		
 
 		<!-- 答卷 -->
 		<chengji ref="chengjiRef" :list="list" :jieId="jieId" :zhangId="zhangId"