wangguoyu 1 ヶ月 前
コミット
e21b8b11f4

+ 1 - 1
config.js

@@ -1,6 +1,6 @@
 // 应用全局配置
 export default   {
-  baseUrl: 'https://kf1.mtavip.com/api',
+  baseUrl: 'https://kf3.mtavip.com/api',
   // baseUrl: 'http://localhost:8080',
   // 应用信息
   appInfo: {

+ 8 - 6
pages.json

@@ -157,12 +157,14 @@
 				"iconPath": "static/images/tabbar/unselect/exam-sj.png",
 				"selectedIconPath": "static/images/tabbar/select/exam-sj.png",
 				"text": "考试"
-			}, {
-				"pagePath": "pages/course/index",
-				"iconPath": "static/images/tabbar/unselect/kecheng-sj.png",
-				"selectedIconPath": "static/images/tabbar/select/kecheng-sj.png",
-				"text": "课程"
-			}, {
+			}, 
+			// {
+			// 	"pagePath": "pages/course/index",
+			// 	"iconPath": "static/images/tabbar/unselect/kecheng-sj.png",
+			// 	"selectedIconPath": "static/images/tabbar/select/kecheng-sj.png",
+			// 	"text": "课程"
+			// }, 
+			{
 				"pagePath": "pages/score/index",
 				"iconPath": "static/images/tabbar/unselect/score-sj.png",
 				"selectedIconPath": "static/images/tabbar/select/score-sj.png",

+ 3 - 8
pages/exam/index.vue

@@ -1,12 +1,7 @@
 <template>
-	<custom-scroll-list :refreshFn="getExamList" :tabList="tabData" :defaultTab="1" ref="scrollRef">
-		<template #default="{list}">
-			<scroll-list-card v-for="(item,index) in list" :key="item.ksId" :data="item"
-				@btnClick="handleClick"></scroll-list-card>
-		</template>
-	</custom-scroll-list>
-	<!-- 考试须知 -->
-	<kaoshixuzhi ref="ksxzRef" @confirm="handleConfirm"></kaoshixuzhi>
+ <view>
+	 考试
+ </view>
 </template>
 
 <script setup>

+ 124 - 0
pages/exam/indexBf.vue

@@ -0,0 +1,124 @@
+<template>
+	<custom-scroll-list :refreshFn="getExamList" :tabList="tabData" :defaultTab="1" ref="scrollRef">
+		<template #default="{list}">
+			<scroll-list-card v-for="(item,index) in list" :key="item.ksId" :data="item"
+				@btnClick="handleClick"></scroll-list-card>
+		</template>
+	</custom-scroll-list>
+	<!-- 考试须知 -->
+	<kaoshixuzhi ref="ksxzRef" @confirm="handleConfirm"></kaoshixuzhi>
+</template>
+
+<script setup>
+	import {
+		getExamList,
+		kaoShiApply,
+		getClientKaoshiInfo
+	} from "@/api/exam.js";
+	import {
+		onReady,
+	} from "@dcloudio/uni-app"
+	import {
+		reactive,
+		ref
+	} from "vue";
+	import kaoshixuzhi from "@/components/kaoshixuzhi/kaoshixuzhi.vue"
+
+	const activeKs = ref(null);
+	const scrollRef = ref(null);
+	const examNoticeInfo = ref(null);
+	const ksxzRef = ref(null);
+
+	const tabData = [{
+			label: "可以考试",
+			value: 1,
+		},
+		{
+			label: "已结束",
+			value: 4,
+		}
+	]
+
+	function goKaoshiPage(data) {
+		/* uni.redirectTo({
+			url: `/pages/exam/exam?ksId=${data.ksId}&zhuapai=${data.zhuapai}`
+		}) */
+		uni.navigateTo({
+			url: `/pages/exam/exam?ksId=${data.ksId}&zhuapai=${data.zhuapai}`
+		})
+	}
+	
+	function handleConfirm() {
+		goKaoshiPage(activeKs.value)
+	}
+
+	function showKaoshiXuzhi() {
+		const option = {
+			ksId: activeKs.value.ksId
+		}
+		getClientKaoshiInfo(option).then(res => {
+			examNoticeInfo.value = res.data;
+			// 校验抓拍
+			doCheckZhuapai()
+		})
+
+	}
+
+	function doCheckZhuapai() {
+		if (examNoticeInfo.value.zhuapai) {
+			// 存在抓拍
+		} else {
+			// 不存在抓拍
+			ksxzRef.value.showDialog(examNoticeInfo.value)
+		}
+	}
+
+	function handleClick(data) {
+		activeKs.value = data;
+		if (data.status == 0) {
+			// 未开始
+			// goKaoshiPage(data);
+			showKaoshiXuzhi()
+		}
+		if (data.status == 1) {
+			// 可以考试
+			// goKaoshiPage(data);
+			showKaoshiXuzhi()
+		}
+		if (data.status == 2) {
+			// 再次考试
+			// goKaoshiPage(data);
+			showKaoshiXuzhi()
+		}
+		if (data.status == 3) {
+			// 考试中
+			// goKaoshiPage(data);
+			showKaoshiXuzhi()
+		}
+		if (data.status == 4) {
+			// 已结束
+			uni.showToast({
+				title: '考试已结束',
+				icon: 'none'
+			})
+		}
+		if (data.status == 5) {
+			// 未报名
+			kaoShiApply({
+				ksId: data.ksId
+			}).then(res => {
+				uni.showToast({
+					title: '报名成功',
+					icon: 'none'
+				})
+				scrollRef.value.onRefresh()
+			})
+		}
+
+	}
+
+</script>
+
+<style lang="scss">
+
+</style>

+ 229 - 132
pages/index/index.vue

@@ -2,7 +2,7 @@
 	<view class="lli-index-page">
 		<!-- banner -->
 		<view class="index-imgbox">
-		    <img :src="banners||defaultbanners" class="index-banner-img"/>
+			<img :src="banners||defaultbanners" class="index-banner-img" />
 		</view>
 		<!-- meul-box -->
 		<view class="index-meul-box">
@@ -18,15 +18,16 @@
 				</uni-grid-item>
 			</uni-grid>
 		</view>
-		
+
 		<!-- 课程list -->
 		<view class="lli-index-title-box">
 			<text class="index-title">最热课程</text>
 			<text class="index-sub-title" @click="developClick">查看更多 ></text>
 		</view>
 		<view class="lli-card-box">
-			<uni-card padding="0" margin="0" spacing="0" :is-shadow="false" :border="false" 
-			v-for="(item ,index) in courseCardList" :index="index" :key="index" class="lli-card-item" @click="developClick(index)">
+			<uni-card padding="0" margin="0" spacing="0" :is-shadow="false" :border="false"
+				v-for="(item ,index) in courseCardList" :index="index" :key="index" class="lli-card-item"
+				@click="developClick(index)">
 				<view class="custom-cover">
 					<image class="lli-card-image" mode="aspectFill" :src="item.pic || defultKcImg"></image>
 					<view class="cover-content" v-if="item.status">
@@ -42,8 +43,9 @@
 			<text class="index-sub-title" @click="handleCheckMoreKs">查看更多 ></text>
 		</view>
 		<view class="lli-card-box">
-			<uni-card padding="0" margin="0" spacing="0" :is-shadow="false" :border="false" 
-			v-for="(item ,index) in examCardList" :index="index" :key="index" class="lli-card-item" @click="handleClickKs(item)">
+			<uni-card padding="0" margin="0" spacing="0" :is-shadow="false" :border="false"
+				v-for="(item ,index) in examCardList" :index="index" :key="index" class="lli-card-item"
+				@click="handleClickKs(item)">
 				<view class="custom-cover">
 					<image class="lli-card-image" mode="aspectFill" :src="item.pic || defultKsImg"></image>
 					<view class="cover-content" v-if="item.status">
@@ -53,9 +55,9 @@
 				<text class="lli-card-name">{{item.ksName}}</text>
 			</uni-card>
 		</view>
-		
-		
-		
+
+
+
 		<!-- 考试须知 -->
 		<kaoshixuzhi ref="ksxzRef" @confirm="handleConfirm"></kaoshixuzhi>
 	</view>
@@ -67,111 +69,128 @@
 		getClientKaoshiInfo
 	} from "@/api/exam.js";
 	import kaoshixuzhi from "@/components/kaoshixuzhi/kaoshixuzhi.vue"
-	import {ref,reactive} from "vue";
-	import {getCourseList, getNoticeCount,getExamList} from '@/api/index.js';
-	import {onLoad} from "@dcloudio/uni-app"
-	const banners= ref('');
-	const defaultbanners= ref('/static/images/index/index-banner.png');
-	const defultKsImg= ref('/static/images/index/index-ks-default.png');
-	const defultKcImg= ref('/static/images/index/index-kc-default.png');
-	const statusCodeKc= ref(['未开始', '可以学习', '已学完', '学习中', '已结束']);
-	const statusCodeKs= ref(['未开始', '可以考试', '再次考试', '考试中', '已结束', '未报名', '报名审核中', '审核未通过', '等待人工评分']);
+	import {
+		ref,
+		reactive
+	} from "vue";
+	import {
+		getCourseList,
+		getNoticeCount,
+		getExamList
+	} from '@/api/index.js';
+	import {
+		onLoad
+	} from "@dcloudio/uni-app"
+	const banners = ref('');
+	const defaultbanners = ref('/static/images/index/index-banner.png');
+	const defultKsImg = ref('/static/images/index/index-ks-default.png');
+	const defultKcImg = ref('/static/images/index/index-kc-default.png');
+	const statusCodeKc = ref(['未开始', '可以学习', '已学完', '学习中', '已结束']);
+	const statusCodeKs = ref(['未开始', '可以考试', '再次考试', '考试中', '已结束', '未报名', '报名审核中', '审核未通过', '等待人工评分']);
 	let menuList = ref([{
-	      		url: '/static/images/index/index-kc-img.png',
-	      		text: '我的课程',
-	      	},
-	      	{
-	      		url: '/static/images/index/index-ks-img.png',
-	      		text: '我的考试',
-	      	},
-	      	{
-	      		url: '/static/images/index/index-lx-img.png',
-	      		text: '每日一练',
-	      	},
-	      	{
-	      		url: '/static/images/index/index-gg-img.png',
-	      		text: '公告',
-				badge:0,
-	      	},
-	      ]);
+			url: '/static/images/index/index-kc-img.png',
+			text: '我的课程',
+		},
+		{
+			url: '/static/images/index/index-ks-img.png',
+			text: '我的考试',
+		},
+		{
+			url: '/static/images/index/index-lx-img.png',
+			text: '每日一练',
+		},
+		{
+			url: '/static/images/index/index-gg-img.png',
+			text: '公告',
+			badge: 0,
+		},
+	]);
 	let courseCardList = ref([]);
 	let examCardList = ref([]);
 	let noticeCount = ref(0);
 	const examNoticeInfo = ref(null); // 考试须知数据
 	const ksxzRef = ref(null);
 	const activeKs = ref(null);
-	
+
 	onLoad(() => {
 		getNoticeCountData();
 		getCourseListData();
 		getExamListData();
 	});
-	
+
 	function getNoticeCountData() {
 		let req = {
-		          'page': 1,
-		          'size': 4,
-		          'status': 1,
-		        };
+			'page': 1,
+			'size': 4,
+			'status': 1,
+		};
 		getNoticeCount(req).then(res => {
-		    menuList.value[3].badge = res.data.noticeCount || 0;
+			menuList.value[3].badge = res.data.noticeCount || 0;
 		});
 	};
-	
+
 	function getCourseListData() {
 		let req = {
-		          'page': 1,
-		          'size': 4,
-		          'status': 1,
-		        };
+			'page': 1,
+			'size': 4,
+			'status': 1,
+		};
 		getCourseList(req).then(res => {
-		          courseCardList.value = res.data.data || [];
+			courseCardList.value = res.data.data || [];
 		});
 	};
-	
+
 	function getExamListData() {
 		let req = {
-		          'page': 1,
-		          'size': 4,
-		          'status': 1,
-		        };
+			'page': 1,
+			'size': 4,
+			'status': 1,
+		};
 		getExamList(req).then(res => {
-		          examCardList.value = res.data.data || [];
+			examCardList.value = res.data.data || [];
 		});
 	};
-	
-	function gridClick(e){
-		let {index} = e.detail;
+
+	function gridClick(e) {
+		let {
+			index
+		} = e.detail;
 		switch (index) {
 			case 0:
-			    uni.switchTab({
-			    	url: '/pages/course/index'
-			    });
-			    break;
+				uni.switchTab({
+					url: '/pages/course/index'
+				});
+				break;
 			case 1:
-			    uni.switchTab({
-			    	url: '/pages/exam/index'
-			    });
-			    break;
+				uni.switchTab({
+					url: '/pages/exam/index'
+				});
+				break;
 			case 2:
-			    uni.navigateTo({
-			    	url: '/pages/lianxi/index'
-			    })
-			    break;
+				uni.showToast({
+					icon: 'none',
+					title: '开发中,敬请期侍!',
+				})
+				return false
+				uni.navigateTo({
+					url: '/pages/lianxi/index'
+				})
+				break;
 			case 3:
-			    uni.navigateTo({
-			    	url:'/pages/my/mesList?from=indexPeixun'
-			    })
-			    break;
-				}
+				uni.navigateTo({
+					url: '/pages/my/mesList?from=indexPeixun'
+				})
+				break;
+		}
 	}
-	function developClick(){
+
+	function developClick() {
 		uni.showToast({
 			icon: 'none',
 			title: '开发中,敬请期侍!',
 		});
 	}
-	
+
 	function goKaoshiPage(data) {
 		/* uni.redirectTo({
 			url: `/pages/exam/exam?ksId=${data.ksId}&zhuapai=${data.zhuapai}`
@@ -180,11 +199,11 @@
 			url: `/pages/exam/exam?ksId=${data.ksId}&zhuapai=${data.zhuapai}`
 		})
 	}
-	
+
 	function handleConfirm() {
 		goKaoshiPage(activeKs.value)
 	}
-	
+
 	function showKaoshiXuzhi() {
 		const option = {
 			ksId: activeKs.value.ksId
@@ -194,9 +213,9 @@
 			// 校验抓拍
 			doCheckZhuapai()
 		})
-	
+
 	}
-	
+
 	function doCheckZhuapai() {
 		if (examNoticeInfo.value.zhuapai) {
 			// 存在抓拍
@@ -205,10 +224,10 @@
 			ksxzRef.value.showDialog(examNoticeInfo.value)
 		}
 	}
-	
+
 	function handleClickKs(data) {
 		activeKs.value = data;
-		console.log('ddddd',data)
+		console.log('ddddd', data)
 		if (data.status == 0) {
 			// 未开始
 			showKaoshiXuzhi()
@@ -244,36 +263,38 @@
 				scrollRef.value.onRefresh()
 			})
 		}
-	
+
 	}
-	
+
 	function handleCheckMoreKs() {
 		uni.switchTab({
 			url: '/pages/exam/index'
 		})
 	}
-	
 </script>
 
 <style lang="scss">
-.lli-index-page{
-	padding: 24rpx;
-	background: #FCFBFC;
-	min-height: 100vh;
-	// banner
-	.index-imgbox {
-	    text-align: center;width: 100%;
-	    .index-banner-img {
-	      width: 702rpx;
-	      height: 242rpx;
-	      display: inline-block;
-	      border-radius: 4px;
-	    }
-	}
-	
-	//meul-box
-	.index-meul-box{
-		.lli-grid-item {
+	.lli-index-page {
+		padding: 24rpx;
+		background: #FCFBFC;
+		min-height: 100vh;
+
+		// banner
+		.index-imgbox {
+			text-align: center;
+			width: 100%;
+
+			.index-banner-img {
+				width: 702rpx;
+				height: 242rpx;
+				display: inline-block;
+				border-radius: 4px;
+			}
+		}
+
+		//meul-box
+		.index-meul-box {
+			.lli-grid-item {
 				flex: 1;
 				/* #ifndef APP-NVUE */
 				display: flex;
@@ -283,35 +304,111 @@
 				justify-content: center;
 				padding: 15px 0;
 			}
-		.grid-item-image {width: 99rpx;height: 113rpx;}
-		.grid-item-text {font-size: 24rpx;color: $uni-text-color;}
-		.grid-dot {position: absolute;top: 5px;right: 15px;}
-	}
-	
-	// title-box
-	.lli-index-title-box{
-		margin: 44rpx 0 32rpx;display: flex;justify-content: space-between;align-items: center;
-		.index-title{font-size: 32rpx;color: #333;font-weight: 800;display: inline-flex;align-items: center;}
-		.index-title:before{content:'';width: 3px;height: 30rpx;background: $uni-primary;margin-right: 8px;display: block;}
-		.index-sub-title{font-size: 24rpx;color: #9c9c9c;font-weight: normal;cursor: pointer;}
-	}
-	
-	// card
-	.lli-card-box{width: 100%;display: flex;justify-content: space-between;flex-wrap: wrap;margin-bottom: 8px;cursor: pointer;}
-	.lli-card-item{
-		width: 49%;flex: unset;border-radius: 20rpx;background-color: #ffffff;
-		padding: 12rpx 12rpx 0;box-sizing: border-box;margin-bottom: 20rpx;
-		.lli-card-image{max-width: 100%;height: 180rpx;border-radius: 8rpx;}
-		.custom-cover {max-width: 100%;height: 180rpx;border-radius: 8rpx;overflow: hidden;position: relative;}
-		.cover-content {
-			position: absolute;bottom: 0;left: 0;padding: 4rpx 12rpx;background: rgba(0, 0, 0, 0.29);
-			color: #fff;font-size: 22rpx;border-radius: 0 10rpx 0 10rpx;
+
+			.grid-item-image {
+				width: 99rpx;
+				height: 113rpx;
+			}
+
+			.grid-item-text {
+				font-size: 24rpx;
+				color: $uni-text-color;
+			}
+
+			.grid-dot {
+				position: absolute;
+				top: 5px;
+				right: 15px;
+			}
+		}
+
+		// title-box
+		.lli-index-title-box {
+			margin: 44rpx 0 32rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.index-title {
+				font-size: 32rpx;
+				color: #333;
+				font-weight: 800;
+				display: inline-flex;
+				align-items: center;
+			}
+
+			.index-title:before {
+				content: '';
+				width: 3px;
+				height: 30rpx;
+				background: $uni-primary;
+				margin-right: 8px;
+				display: block;
+			}
+
+			.index-sub-title {
+				font-size: 24rpx;
+				color: #9c9c9c;
+				font-weight: normal;
+				cursor: pointer;
+			}
 		}
-		.lli-card-name{
-			font-size: 28rpx;line-height: 36rpx;color: #565656;margin: 20rpx 0;
-			display: -webkit-box;-webkit-line-clamp: 2;overflow: hidden;
-			text-overflow: ellipsis;-webkit-box-orient: vertical;
+
+		// card
+		.lli-card-box {
+			width: 100%;
+			display: flex;
+			justify-content: space-between;
+			flex-wrap: wrap;
+			margin-bottom: 8px;
+			cursor: pointer;
+		}
+
+		.lli-card-item {
+			width: 49%;
+			flex: unset;
+			border-radius: 20rpx;
+			background-color: #ffffff;
+			padding: 12rpx 12rpx 0;
+			box-sizing: border-box;
+			margin-bottom: 20rpx;
+
+			.lli-card-image {
+				max-width: 100%;
+				height: 180rpx;
+				border-radius: 8rpx;
+			}
+
+			.custom-cover {
+				max-width: 100%;
+				height: 180rpx;
+				border-radius: 8rpx;
+				overflow: hidden;
+				position: relative;
+			}
+
+			.cover-content {
+				position: absolute;
+				bottom: 0;
+				left: 0;
+				padding: 4rpx 12rpx;
+				background: rgba(0, 0, 0, 0.29);
+				color: #fff;
+				font-size: 22rpx;
+				border-radius: 0 10rpx 0 10rpx;
+			}
+
+			.lli-card-name {
+				font-size: 28rpx;
+				line-height: 36rpx;
+				color: #565656;
+				margin: 20rpx 0;
+				display: -webkit-box;
+				-webkit-line-clamp: 2;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				-webkit-box-orient: vertical;
+			}
 		}
 	}
-}
-</style>
+</style>

+ 3 - 7
pages/lianxi/index.vue

@@ -1,11 +1,7 @@
 <template>
-	<custom-scroll-list :refreshFn="getLianxiList" :tabList="tabData" :defaultTab="1" ref="scrollRef"
-		placeholder="请输入练习名称">
-		<template #default="{list}">
-			<scroll-list-card-lianxi v-for="(item,index) in list" :key="item.lxId" :data="item"
-				@btnClick="handleClick"></scroll-list-card-lianxi>
-		</template>
-	</custom-scroll-list>
+	<view>
+		练习
+	</view>
 </template>
 
 <script setup>

+ 40 - 0
pages/lianxi/indexBf.vue

@@ -0,0 +1,40 @@
+<template>
+	<custom-scroll-list :refreshFn="getLianxiList" :tabList="tabData" :defaultTab="1" ref="scrollRef"
+		placeholder="请输入练习名称">
+		<template #default="{list}">
+			<scroll-list-card-lianxi v-for="(item,index) in list" :key="item.lxId" :data="item"
+				@btnClick="handleClick"></scroll-list-card-lianxi>
+		</template>
+	</custom-scroll-list>
+</template>
+
+<script setup>
+	import scrollListCardLianxi from "@/components/score-lianxi-card-lianxi/score-lianxi-card-lianxi.vue"
+	import {
+		getLianxiList,
+	} from "@/api/lianxi.js";
+	import {
+		ref
+	} from "vue";
+
+
+	const tabData = [{
+			label: "开始练习",
+			value: 1,
+		},
+		{
+			label: "已结束",
+			value: 2,
+		}
+	]
+
+	function handleClick(data) {
+		uni.redirectTo({
+			url: `/pages/lianxi/lianxi?lxId=${data.lxId}`
+		})
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 2 - 62
pages/my/index.vue

@@ -1,66 +1,6 @@
 <template>
-	<view class="mobile-my-page">
-		<view class="user-info-box">
-		    <view class="user-img-box">
-		        <img class="head-img" :src="myInfoData.userImg" v-if="myInfoData.userImg">
-		        <icon class="phone-default-userImg" v-else></icon>
-		    </view>
-		    <view class="user-content-box">
-		        <view class="user-name">{{myInfoData.userName}}</view>
-		        <view class="user-info">
-		            <view>{{myInfoData.realName}}</view><text v-if="myInfoData.realName && myInfoData.orgName"></text>
-		            <view>{{myInfoData.orgName}}</view><text v-if="myInfoData.orgName && myInfoData.positionName"></text>
-		            <view>{{myInfoData.positionName}}</view>
-		        </view>
-		    </view>
-		</view>
-		
-		<view class="my-list-box">
-			<view class="list-row" @click="goToPage('xuefen')">
-				<icon class="list-icon xuefen-icon"></icon>
-				<text>学分</text>
-				<text class="row-content">{{myInfoData.credit}}分</text>
-			</view>
-			<view class="list-row" @click="goToPage('xiaoxi')">
-				<icon class="list-icon xiaoxi-icon"></icon>
-				<text>消息</text>
-				<text class="row-content">{{myInfoData.countNotice}}条</text>
-			</view>
-			<view class="list-row" @click="goToPage('zhengshu')">
-				<icon class="list-icon zhengshu-icon"></icon>
-				<text>证书</text>
-				<text class="row-content">{{myInfoData.countCert}}个</text>
-			</view>
-		</view>
-		<view class="my-list-box">
-			<view class="list-row" @click="goToPage('cuoti')">
-				<icon class="list-icon cuoti-icon"></icon>
-				<text>错题</text>
-			</view>
-			<view class="list-row" @click="goToPage('baoming')">
-				<icon class="list-icon baoming-icon"></icon>
-				<text>报名</text>
-			</view>
-			<view class="list-row" @click="goToPage('sxtcs')">
-				<icon class="list-icon sxtcs-icon"></icon>
-				<text>摄像头测试</text>
-			</view>
-			<view class="list-row" @click="goToPage('sxtsm')">
-				<icon class="list-icon sxtsm-icon"></icon>
-				<text>摄像头说明</text>
-			</view>
-			<view class="list-row" @click="goToPage('shezhi')">
-				<icon class="list-icon shezhi-icon"></icon>
-				<text>设置</text>
-			</view>
-		</view>
-		
-		<view>
-			<cameraCommon ref="cameraCommonRef"></cameraCommon>
-		</view>
-		<view>
-			<shexiangtoushuoming ref="shexiangtoushuomingRef" :content="messageContent"  title="注意" okBtn="知道了"></shexiangtoushuoming>
-		</view>
+	<view>
+		我的
 	</view>
 </template>
 

+ 171 - 0
pages/my/indexBf.vue

@@ -0,0 +1,171 @@
+<template>
+	<view class="mobile-my-page">
+		<view class="user-info-box">
+		    <view class="user-img-box">
+		        <img class="head-img" :src="myInfoData.userImg" v-if="myInfoData.userImg">
+		        <icon class="phone-default-userImg" v-else></icon>
+		    </view>
+		    <view class="user-content-box">
+		        <view class="user-name">{{myInfoData.userName}}</view>
+		        <view class="user-info">
+		            <view>{{myInfoData.realName}}</view><text v-if="myInfoData.realName && myInfoData.orgName"></text>
+		            <view>{{myInfoData.orgName}}</view><text v-if="myInfoData.orgName && myInfoData.positionName"></text>
+		            <view>{{myInfoData.positionName}}</view>
+		        </view>
+		    </view>
+		</view>
+		
+		<view class="my-list-box">
+			<view class="list-row" @click="goToPage('xuefen')">
+				<icon class="list-icon xuefen-icon"></icon>
+				<text>学分</text>
+				<text class="row-content">{{myInfoData.credit}}分</text>
+			</view>
+			<view class="list-row" @click="goToPage('xiaoxi')">
+				<icon class="list-icon xiaoxi-icon"></icon>
+				<text>消息</text>
+				<text class="row-content">{{myInfoData.countNotice}}条</text>
+			</view>
+			<view class="list-row" @click="goToPage('zhengshu')">
+				<icon class="list-icon zhengshu-icon"></icon>
+				<text>证书</text>
+				<text class="row-content">{{myInfoData.countCert}}个</text>
+			</view>
+		</view>
+		<view class="my-list-box">
+			<view class="list-row" @click="goToPage('cuoti')">
+				<icon class="list-icon cuoti-icon"></icon>
+				<text>错题</text>
+			</view>
+			<view class="list-row" @click="goToPage('baoming')">
+				<icon class="list-icon baoming-icon"></icon>
+				<text>报名</text>
+			</view>
+			<view class="list-row" @click="goToPage('sxtcs')">
+				<icon class="list-icon sxtcs-icon"></icon>
+				<text>摄像头测试</text>
+			</view>
+			<view class="list-row" @click="goToPage('sxtsm')">
+				<icon class="list-icon sxtsm-icon"></icon>
+				<text>摄像头说明</text>
+			</view>
+			<view class="list-row" @click="goToPage('shezhi')">
+				<icon class="list-icon shezhi-icon"></icon>
+				<text>设置</text>
+			</view>
+		</view>
+		
+		<view>
+			<cameraCommon ref="cameraCommonRef"></cameraCommon>
+		</view>
+		<view>
+			<shexiangtoushuoming ref="shexiangtoushuomingRef" :content="messageContent"  title="注意" okBtn="知道了"></shexiangtoushuoming>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import {reactive,ref} from "vue";
+	import {toast} from "@/utils/common";
+	import {getMineInfo} from '@/api/my.js'
+	import {onLoad,onShow} from '@dcloudio/uni-app';
+	import cameraCommon from "@/components/dialog/cameraCommon.vue";
+	import shexiangtoushuoming from "@/components/dialog/shexiangtoushuoming.vue";
+	let myInfoData = reactive({
+		userImg: '',
+		realName: '',
+		orgName: '',
+		userName: '',
+		positionName:'',
+		credit:'',
+		countCert:'',
+		countNotice:'',
+
+	});
+	const cameraCommonRef = ref(null)
+	const shexiangtoushuomingRef = ref(null)
+	const messageContent = ref('请在考试前使用摄像头测试功能,测试摄像头是否可以正常工作,在测试前请先确保摄像头设备可以正常使用.')
+	onLoad(() => {})
+	
+	onShow(() => {getMyInit()})
+	
+	function getMyInit() {
+		getUserInfo();
+	}
+	
+	function getUserInfo(){
+		getMineInfo({}).then(res => {
+			myInfoData.userImg= res.data.icon;
+			myInfoData.realName = res.data.realName;
+			myInfoData.orgName = res.data.orgName;
+			myInfoData.userName = res.data.userName;
+			myInfoData.positionName = res.data.positionName;
+			myInfoData.credit = res.data.credit;
+			myInfoData.countCert = res.data.countCert;
+			myInfoData.countNotice = res.data.countNotice;
+		})
+	}
+	
+	function goToPage(data){
+		switch (data) {
+			// 学分
+			case 'xuefen':
+			    uni.navigateTo({
+			    	url:'/pages/my/credit'
+			    })
+			break;
+			
+			// 消息
+			case 'xiaoxi':
+			    uni.navigateTo({
+			    	url:'/pages/my/mesList?from=my'
+			    })
+			break;
+			
+			// 证书
+			case 'zhengshu':
+			    uni.navigateTo({
+			    	url:'/pages/my/zhengshu'
+			    })
+			break;
+			
+			// 错题
+			case 'cuoti':
+			    uni.navigateTo({
+			    	url:'/pages/cuoti/index'
+			    })
+			break;
+			
+			// 报名
+			case 'baoming':
+			    uni.navigateTo({
+			    	url:'/pages/baoming/index'
+			    })
+			break;
+			
+			// 摄像头测试
+			case 'sxtcs':
+			cameraCommonRef.value.handleShow()
+			    // uni.navigateTo({
+			    // 	url:'/pages/admin/my/myInfo?from=my'
+			    // })
+			break;
+			
+			// 摄像头说明
+			case 'sxtsm':
+			  shexiangtoushuomingRef.value.handleShow()
+			break;
+			
+			// 设置
+			case 'shezhi':
+			    uni.navigateTo({
+			    	url:'/pages/my/setting'
+			    })
+			break;
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 3 - 9
pages/score/index.vue

@@ -1,13 +1,7 @@
 <template>
-	<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>
+		<view>
+			成绩
+		</view>
 </template>
 
 <script setup>

+ 67 - 0
pages/score/indexBf.vue

@@ -0,0 +1,67 @@
+<template>
+	<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 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: '/pages/score/kaoshiChengjiInfo?lxId=' + data.lxId + '&name=' + data.name
+		});
+	}
+	const lookPaiming = (data) => {
+		console.log('datalookPaiming',data);
+		// uni.navigateTo({
+		// 	url: '/pages/score/kaoshiChengjiInfo?kcId=' + data.kcId + '&name=' + data.name
+		// });
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 6 - 6
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,25 +1,25 @@
 {
-  "hash": "d5dc56da",
-  "configHash": "5978ec27",
+  "hash": "5cf7a34b",
+  "configHash": "47a2096c",
   "lockfileHash": "1a6e42c4",
-  "browserHash": "18e26302",
+  "browserHash": "60ced6ae",
   "optimized": {
     "crypto-js": {
       "src": "../../../../../node_modules/crypto-js/index.js",
       "file": "crypto-js.js",
-      "fileHash": "b3825758",
+      "fileHash": "a7ac8fa4",
       "needsInterop": true
     },
     "jsencrypt": {
       "src": "../../../../../node_modules/jsencrypt/lib/index.js",
       "file": "jsencrypt.js",
-      "fileHash": "9a788be8",
+      "fileHash": "81449a40",
       "needsInterop": false
     },
     "ts-md5/dist/md5": {
       "src": "../../../../../node_modules/ts-md5/dist/md5.js",
       "file": "ts-md5_dist_md5.js",
-      "fileHash": "e451a9a4",
+      "fileHash": "1be2f08c",
       "needsInterop": true
     }
   },