Jelajahi Sumber

Merge branch 'main' of https://gogs.mtavip.com/wangguoyu/uniProject into main

tanxue 1 bulan lalu
induk
melakukan
2dccbbee21

+ 13 - 0
api/zhengshu.js

@@ -0,0 +1,13 @@
+import request from '@/utils/request'
+export function getZhengshuList(data = {}) {
+  return request({
+    'url': '/app/mine/cert/list',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+

+ 91 - 0
components/scroll-list-card-zhengshu/scroll-list-card-zhengshu.vue

@@ -0,0 +1,91 @@
+<template>
+	<view class="scroll-list-card mobile-card-box">
+		<view>
+			<img style="width: 100rpx;height: 100rpx;;" :src="data.pic" alt="" />
+		</view>
+		<text>{{data.name}}</text>
+		<view class="timeSpan">发证日期:{{data}}</view>
+		<view class="timeSpan">到期日期:{{data.expiryDate?data.expiryDate: '永久'}}</view>
+		<view class="timeSpan">证书状态:{{data.disabled}}</view>
+	</view>
+</template>
+
+<script setup>
+	import {
+		toRefs,
+		ref,
+		computed
+	} from "vue";
+
+	const props = defineProps({
+		data: {
+			type: Object,
+		},
+	});
+	const {
+		data
+	} = toRefs(props);
+</script>
+
+<style lang="scss" scoped>
+	.mobile-card-box {
+		box-sizing: border-box;
+		margin: 0 30rpx 10rpx;
+		border-bottom: 2rpx solid #f2f1f2;
+		padding-bottom: 30rpx;
+	}
+
+	.mobile-card-title {
+		color: #333;
+		font-size: 32rpx;
+		font-weight: 500;
+		margin: 24rpx 0 24rpx 0;
+		text-overflow: ellipsis;
+		-o-text-overflow: ellipsis;
+		overflow: hidden;
+		word-wrap: break-word;
+		display: -webkit-box;
+		white-space: normal;
+		-webkit-box-orient: vertical;
+		text-align: justify;
+		-webkit-line-clamp: 2;
+		line-clamp: 2;
+		line-height: 48rpx;
+	}
+
+	// 行
+	.mobile-card-row {
+		margin-bottom: 32rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: flex-end;
+
+		text {
+			font-size: 28rpx;
+			line-height: 40rpx;
+		}
+
+		// 得分
+		.mobile-card-score {
+			font-size: 40rpx;
+			color: #f10a0a;
+		}
+
+		// 分数(有最小宽度)
+		.card-score-box {
+			min-width: 240rpx;
+			text-align: left;
+		}
+	}
+
+	// 按钮
+	.mobile-card-btn {
+		width: 60%;
+		height: 80rpx;
+		line-height: 80rpx;
+		margin: 50rpx auto;
+		background: linear-gradient(0deg, #436aff 0%, #234ff7 100%);
+		border-radius: 80rpx;
+		display: block;
+	}
+</style>

+ 7 - 0
pages.json

@@ -26,6 +26,13 @@
 				"navigationBarTitleText" : "我的"
 			}
 		},
+			{
+			"path" : "pages/my/zhengshu",
+			"style" :
+			{
+				"navigationBarTitleText" : "证书"
+			}
+		},
 		{
 			"path" : "pages/my/setting",
 			"style" :

+ 24 - 3
pages/course/kechengInfo.vue

@@ -23,9 +23,27 @@
 		</view>
 		<!-- 目录内容 -->
 		<view v-if="activeTab == '目录'" class="course-content">
-			<catalogue  ref="catalogueRef"  @kejianInfo='getKejianInfo' :options="kejianUserVo"
+			<catalogue ref="catalogueRef" @kejianInfo='getKejianInfo' :options="kejianUserVo"
 				:current-video="currentVideo"></catalogue>
 		</view>
+		<view v-if="activeTab == '介绍'" class="course-content">
+			<view v-if="!kechengData.intro" class="s-kehceng-default">
+				<view>
+					<img :src="jieshaoImg">
+					<text>还没有介绍</text>
+				</view>
+			</view>
+			<view v-else v-html="kechengData.intro" class="kecheng-tab-jieshao"></view>
+		</view>
+			<view v-if="activeTab == '评论'" class="course-content">
+			<view v-if="!kechengData.intro" class="s-kehceng-default">
+				<view>
+					<img :src="jieshaoImg">
+					<text>还没有介绍</text>
+				</view>
+			</view>
+			<view v-else v-html="kechengData.intro" class="kecheng-tab-jieshao"></view>
+		</view>
 
 	</view>
 </template>
@@ -48,6 +66,8 @@
 	const activeTab = ref('');
 	let kcId = ref('');
 	let kejianUserVo = ref(null);
+	let jieshaoImg = ref('/static/images/kecheng/kecheng-introduce.svg');
+	let kechengData = ref(null);
 	// 当前播放信息
 	const currentVideo = ref({
 		url: '',
@@ -74,16 +94,17 @@
 			console.log('res', res);
 			activeTab.value = '目录'
 			kejianUserVo.value = res.data.kejianUserVo
+			kechengData.value = res.data
 		})
 	}
 
 	function getKejianInfo(data) {
 		console.log('data', data.url);
-		
+
 		currentVideo.value = {
 			url: data.url,
 			kjId: data.kjId
-		};	
+		};
 		setTimeout(() => {
 			if (!videoContext) {
 				videoContext = uni.createVideoContext(videoId.value, this);

+ 1 - 1
pages/my/index.vue

@@ -115,7 +115,7 @@
 			// 证书
 			case 'zhengshu':
 			    uni.navigateTo({
-			    	url:'/pages/admin/my/myInfo?from=my'
+			    	url:'/pages/my/zhengshu'
 			    })
 			break;
 			

+ 34 - 0
pages/my/zhengshu.vue

@@ -0,0 +1,34 @@
+<template>
+	<custom-scroll-list :hasSearcBar="false" :refreshFn="getZhengshuList" :hasTab="false" >
+		<template #default="{list}">
+			<scroll-list-card-zhengshu  v-for="(item,index) in list" :key="item.ksId"
+				:data="item"></scroll-list-card-zhengshu>
+		</template>
+	</custom-scroll-list>
+</template>
+
+<script setup>
+	import {
+		getZhengshuList
+	} from "@/api/zhengshu.js";
+	import {
+		onLoad,
+		onReady,
+
+	} from "@dcloudio/uni-app"
+	import {
+		reactive,
+		ref
+	} from "vue";
+	function onBackPress(options) { 
+
+	    uni.redirectTo({
+	      url: '/pages/my/index' 
+	    });
+	    return true; 
+	  }
+</script>
+
+<style lang="scss">
+
+</style>

File diff ditekan karena terlalu besar
+ 47 - 0
static/images/kecheng/kecheng-introduce.svg


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini