瀏覽代碼

Merge remote-tracking branch 'origin/main'

wangxy 2 周之前
父節點
當前提交
baf83ed3b3
共有 7 個文件被更改,包括 116 次插入27 次删除
  1. 1 0
      common/styles/global/components.scss
  2. 12 0
      pages.json
  3. 1 1
      pages/exam/index.vue
  4. 15 17
      pages/index/index.vue
  5. 11 0
      pages/lianxi/index.vue
  6. 69 0
      pages/score/index copy.vue
  7. 7 9
      pages/score/index.vue

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

@@ -328,6 +328,7 @@ view{box-sizing: border-box;}
 			text-align: center;line-height: 76rpx;box-sizing: border-box;margin: 30rpx;
 			text-align: center;line-height: 76rpx;box-sizing: border-box;margin: 30rpx;
 		}
 		}
 		.paragraph-qa-block-mark{background-color: #FF9100;color: #fff;border-color:#FF9100;}
 		.paragraph-qa-block-mark{background-color: #FF9100;color: #fff;border-color:#FF9100;}
+		.paragraph-qa-block-done{color: white;background-color: #0856e6;border-color:#0856e6;}
 	}
 	}
 	.answer-card-btn-box{
 	.answer-card-btn-box{
 		display: flex;border-top: 1rpx solid #E3E3E3;background-color: #FEF0F0;line-height: 1;
 		display: flex;border-top: 1rpx solid #E3E3E3;background-color: #FEF0F0;line-height: 1;

+ 12 - 0
pages.json

@@ -24,6 +24,12 @@
 			}
 			}
 		},
 		},
 		{
 		{
+			"path": "pages/lianxi/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
 			"path": "pages/my/index",
 			"path": "pages/my/index",
 			"style": {
 			"style": {
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
@@ -78,6 +84,12 @@
 				"text": "成绩"
 				"text": "成绩"
 			},
 			},
 			{
 			{
+				"pagePath": "pages/lianxi/index",
+				"iconPath": "static/images/tabbar/unselect/practise-sj.png",
+				"selectedIconPath": "static/images/tabbar/select/practise-sj.png",
+				"text": "练习"
+			},
+			{
 				"pagePath": "pages/my/index",
 				"pagePath": "pages/my/index",
 				"iconPath": "static/images/tabbar/unselect/my-sj.png",
 				"iconPath": "static/images/tabbar/unselect/my-sj.png",
 				"selectedIconPath": "static/images/tabbar/select/my-sj.png",
 				"selectedIconPath": "static/images/tabbar/select/my-sj.png",

+ 1 - 1
pages/exam/index.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-	<customNavbarVue title=""></customNavbarVue>
+	<customNavbarVue title="考试"></customNavbarVue>
 	<custom-scroll-list :refreshFn="getExamList" :tabList="tabData" :defaultTab="1" ref="scrollRef">
 	<custom-scroll-list :refreshFn="getExamList" :tabList="tabData" :defaultTab="1" ref="scrollRef">
 		<template #default="{list}">
 		<template #default="{list}">
 			<scroll-list-card v-for="(item,index) in list" :key="item.ksId" :data="item"
 			<scroll-list-card v-for="(item,index) in list" :key="item.ksId" :data="item"

+ 15 - 17
pages/index/index.vue

@@ -8,7 +8,7 @@
 		<!-- meul-box -->
 		<!-- meul-box -->
 		<view class="index-meul-box">
 		<view class="index-meul-box">
 			<view v-for="(item ,index) in menuList" :index="index" :key="index"
 			<view v-for="(item ,index) in menuList" :index="index" :key="index"
-			 @change="gridClick(index)" class="lli-grid-item">
+			 @click="gridClick(index)" class="lli-grid-item">
 				<image class="grid-item-image" :src="item.url" mode="aspectFill" />
 				<image class="grid-item-image" :src="item.url" mode="aspectFill" />
 				<text class="grid-item-text">{{item.text}}</text>
 				<text class="grid-item-text">{{item.text}}</text>
 				<view v-if="item.badge" class="grid-dot">{{item.badge}}</view>
 				<view v-if="item.badge" class="grid-dot">{{item.badge}}</view>
@@ -16,7 +16,7 @@
 		</view>
 		</view>
 
 
 		<!-- 课程list -->
 		<!-- 课程list -->
-		<view class="lli-index-title-box">
+		<!-- <view class="lli-index-title-box">
 			<text class="index-title">最热课程</text>
 			<text class="index-title">最热课程</text>
 			<text class="index-sub-title" @click="developClick">查看更多 ></text>
 			<text class="index-sub-title" @click="developClick">查看更多 ></text>
 		</view>
 		</view>
@@ -32,10 +32,10 @@
 				</view>
 				</view>
 				<text class="lli-card-name">{{item.name}}</text>
 				<text class="lli-card-name">{{item.name}}</text>
 			</uni-card>
 			</uni-card>
-		</view>
+		</view> -->
 		<!-- 考试list -->
 		<!-- 考试list -->
 		<view class="lli-index-title-box">
 		<view class="lli-index-title-box">
-			<text class="index-title">最考试</text>
+			<text class="index-title">最考试</text>
 			<text class="index-sub-title" @click="handleCheckMoreKs">查看更多 ></text>
 			<text class="index-sub-title" @click="handleCheckMoreKs">查看更多 ></text>
 		</view>
 		</view>
 		<view class="lli-card-box">
 		<view class="lli-card-box">
@@ -86,13 +86,14 @@
 
 
 	const statusCodeKc = ref(['未开始', '可以学习', '已学完', '学习中', '已结束']);
 	const statusCodeKc = ref(['未开始', '可以学习', '已学完', '学习中', '已结束']);
 	const statusCodeKs = ref(['未开始', '可以考试', '再次考试', '考试中', '已结束', '未报名', '报名审核中', '审核未通过', '等待人工评分']);
 	const statusCodeKs = ref(['未开始', '可以考试', '再次考试', '考试中', '已结束', '未报名', '报名审核中', '审核未通过', '等待人工评分']);
-	let menuList = ref([{
+	let menuList = ref([
+		{
 			url: '',
 			url: '',
-			text: '我的课程',
+			text: '我的考试',
 		},
 		},
 		{
 		{
 			url: '',
 			url: '',
-			text: '我的考试',
+			text: '我的成绩',
 		},
 		},
 		{
 		{
 			url: '',
 			url: '',
@@ -160,25 +161,22 @@
 		});
 		});
 	};
 	};
 
 
-	function gridClick(e) {
-		let {
-			index
-		} = e.detail;
+	function gridClick(index) {
 		switch (index) {
 		switch (index) {
 			case 0:
 			case 0:
 				/* uni.switchTab({
 				/* uni.switchTab({
 					url: '/pages/course/index'
 					url: '/pages/course/index'
 				}); */
 				}); */
-				uni.showToast({
-					icon: 'none',
-					title: '开发中,敬请期侍!',
-				})
-				return false
+				uni.switchTab({
+					url: '/pages/exam/index'
+				});
 				break;
 				break;
+				
 			case 1:
 			case 1:
 				uni.switchTab({
 				uni.switchTab({
-					url: '/pages/exam/index'
+					url: '/pages/score/index'
 				});
 				});
+				return false
 				break;
 				break;
 			case 2:
 			case 2:
 				uni.showToast({
 				uni.showToast({

+ 11 - 0
pages/lianxi/index.vue

@@ -0,0 +1,11 @@
+<template>
+	<view style="height: 100vh;display: flex;align-items: center;justify-content: center;color: #333;">
+		开发中,敬请期侍!
+	</view>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 69 - 0
pages/score/index copy.vue

@@ -0,0 +1,69 @@
+<template>
+	<customNavbarVue title="成绩"></customNavbarVue>
+	<custom-scroll-list-chengji ref="customChengjiRef" :refreshFn="currentRefreshFn" @tabChange="tabChange"
+		:searchBarKey="searchBarKeyName" :tabList="tabData" :defaultTab="1">
+		<template #default="{list}">
+			<scroll-list-card-chengji v-show="currentTab =='1'" @lookShijuan="lookShijuan" @lookPaiming="lookPaiming"   v-for="(item,index) in list"
+				:key="item.ksId" :data="item"></scroll-list-card-chengji>
+			<scroll-list-card-kechengji v-show="currentTab =='2'" @click="kechengChengjiClick(item)"
+				v-for="(item,index) in list" :key="item.ksId" :data="item"></scroll-list-card-kechengji>
+		</template>
+	</custom-scroll-list-chengji>
+</template>
+
+<script setup>
+	import {
+		getKaoshichengjiList,
+		getKcchengjiList
+	} from "@/api/chengji.js";
+	import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
+	import customScrollListChengji from "@/components/custom-scroll-list/custom-scroll-list-chengji.vue";
+	import {
+		onLoad,
+		onReady,
+
+	} from "@dcloudio/uni-app"
+	import {
+		reactive,
+		ref,
+		computed
+	} from "vue";
+	let currentTab = ref('1')
+	let searchBarKeyName = ref('ksName')
+	let customChengjiRef = ref(null)
+	const tabData = [{
+		label: "考试成绩",
+		value: 1,
+	}, {
+		label: "课程成绩",
+		value: 2
+	}]
+const currentRefreshFn = computed(() => 
+  currentTab.value == '1' ? getKaoshichengjiList : getKcchengjiList
+)
+	function tabChange(data) {
+		currentTab.value = data.value
+		if (currentTab.value == 1) {
+			searchBarKeyName.value = 'ksName'
+		} else {
+			searchBarKeyName.value = 'kcName'
+		}
+	//	customChengjiRef.value.tabChangeSearch(data)
+	}
+	const lookShijuan = (data) => {
+		console.log('data',data);
+		uni.navigateTo({
+			url: '/subpkgScore/pages/score/kaoshiChengjiInfo?hisId=' + data.hisId + '&name=' + data.ksName+ '&userScore=' + data.userScore+ '&ksScore=' + data.ksScore
+		});
+	}
+	const lookPaiming = (data) => {
+		console.log('datalookPaiming',data);
+		uni.navigateTo({
+			url: '/subpkgScore/pages/score/kaoshiChengjiInfo?kcId=' + data.kcId + '&name=' + data.name
+		});
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 7 - 9
pages/score/index.vue

@@ -1,14 +1,12 @@
 <template>
 <template>
 	<customNavbarVue title="成绩"></customNavbarVue>
 	<customNavbarVue title="成绩"></customNavbarVue>
-	<custom-scroll-list-chengji ref="customChengjiRef" :refreshFn="currentRefreshFn" @tabChange="tabChange"
-		:searchBarKey="searchBarKeyName" :tabList="tabData" :defaultTab="1">
-		<template #default="{list}">
-			<scroll-list-card-chengji v-show="currentTab =='1'" @lookShijuan="lookShijuan" @lookPaiming="lookPaiming"   v-for="(item,index) in list"
-				:key="item.ksId" :data="item"></scroll-list-card-chengji>
-			<scroll-list-card-kechengji v-show="currentTab =='2'" @click="kechengChengjiClick(item)"
-				v-for="(item,index) in list" :key="item.ksId" :data="item"></scroll-list-card-kechengji>
+	<custom-scroll-list ref="customChengjiRef" :refreshFn="currentRefreshFn" @tabChange="tabChange"
+		:searchBarKey="searchBarKeyName"  :defaultTab="1">
+		<template #default="{list}">
+			<scroll-list-card-chengji  @lookShijuan="lookShijuan" @lookPaiming="lookPaiming"   v-for="(item,index) in list"
+				:key="item.ksId" :data="item"></scroll-list-card-chengji>
 		</template>
 		</template>
-	</custom-scroll-list-chengji>
+	</custom-scroll-list>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
@@ -17,7 +15,7 @@
 		getKcchengjiList
 		getKcchengjiList
 	} from "@/api/chengji.js";
 	} from "@/api/chengji.js";
 	import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
 	import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
-	import customScrollListChengji from "@/components/custom-scroll-list/custom-scroll-list-chengji.vue";
+	import customScrollListChengji from "@/components/custom-scroll-list/custom-scroll-list.vue";
 	import {
 	import {
 		onLoad,
 		onLoad,
 		onReady,
 		onReady,