wangguoyu 5 maanden geleden
bovenliggende
commit
1a5c260496
1 gewijzigde bestanden met toevoegingen van 108 en 54 verwijderingen
  1. 108 54
      pages/study/index.vue

+ 108 - 54
pages/study/index.vue

@@ -5,11 +5,15 @@
 			<view class="chapter-box" @click="handleCheckCatalogue">{{infoData.numberStr}}</view>
 			<view class="chapter-title-box">{{infoData.zhangName}}</view>
 			<view>
-				<view class="brand-item" v-for="(item,index) in infoData.jieList" :key="index" @click="listClick(item)"
+				<view class="brand-item" v-for="(item,index) in infoData.jieList" :key="index" @click="listClick(item,index)"
 					:class="index ==0?'brand-active':''">
-					<view class="brand-icon" v-if="index ==0">1</view>
+					<!-- 	<view class="brand-icon" v-if="index ==0">1</view>
 					<view class="brand-lock" v-else></view>
-					<view class="brand-content">{{item.jieName}}</view>
+					<view class="brand-content">{{item.jieName}}</view> -->
+					<view class="brand-icon" v-if="index === 0">1</view>
+					<view class="brand-lock" v-else></view>
+					<view class="brand-content" v-if="index !== infoData.jieList.length - 1">{{ item.jieName }}</view>
+					<view class="brand-content" v-if="index === infoData.jieList.length - 1">{{ item.jieName }}</view>
 				</view>
 			</view>
 
@@ -170,60 +174,110 @@
 		uni.navigateTo({
 			url: `/pages/unitTest/index?jieId=1&zhangId=${zhangId}&nianji=${nianji}&xueqi=${xueqi}`
 		})
+	}
+	function goLookShipin(data) {
+		data.videoId = 'b997f16cb9cb474cb93526cff77d8801'
+		data.progressMarkers = [{
+		    offset: 30,
+		    isCustomized: true,
+		    coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/9A3F562E595E4764AD1DD546FA52C6E5-6-2.png',
+		    title: 'test title',
+		    time: '04:01-07:50',
+		    describe: 'test string',
+		   }, {
+		    offset: 150,
+		    isCustomized: true,
+		    coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/1E7F402241CD4C0F94AD2BBB5CCC3EC7-6-2.png',
+		    title: 'test title',
+		    time: '04:05-07:50',
+		    describe: 'test string',
+		   }, {
+		    offset: 250,
+		    isCustomized: true,
+		    coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
+		    title: 'test title',
+		    time: '04:07-07:50',
+		    describe: 'test string',
+		   }, {
+		    offset: 550,
+		    isCustomized: true,
+		    coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
+		    title: 'test title',
+		    time: '04:09-07:50',
+		    describe: 'test string',
+		   }, {
+		    offset: 320,
+		    isCustomized: true,
+		    coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
+		    title: 'test title',
+		    time: '04:11-07:50',
+		    describe: 'test string',
+		   }, {
+		    offset: 650,
+		    isCustomized: true,
+		    coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
+		    title: 'test title',
+		    time: '04:15-07:50',
+		    describe: 'test string',
+		   }]
+		data.zhangId = infoData.zhangId
+		data.nianji = infoData.nianji
+		data.xueqi = infoData.xueqi
+		const pageData = {
+			//	videoId:data.videoId,
+			videoId: 'b997f16cb9cb474cb93526cff77d8801',
+			progressMarkers: [{
+				offset: 30,
+				isCustomized: true,
+				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/9A3F562E595E4764AD1DD546FA52C6E5-6-2.png',
+				title: 'test title',
+				describe: 'test string',
+			}, {
+				offset: 150,
+				isCustomized: true,
+				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/1E7F402241CD4C0F94AD2BBB5CCC3EC7-6-2.png',
+				title: 'test title',
+				describe: 'test string',
+			}, {
+				offset: 250,
+				isCustomized: true,
+				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
+				title: 'test title',
+				describe: 'test string',
+			}, {
+				offset: 550,
+				isCustomized: true,
+				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
+				title: 'test title',
+				describe: 'test string',
+			}, {
+				offset: 320,
+				isCustomized: true,
+				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
+				title: 'test title',
+				describe: 'test string',
+			}, {
+				offset: 650,
+				isCustomized: true,
+				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
+				title: 'test title',
+				describe: 'test string',
+			}],
+		}
+		uni.navigateTo({
+			//url: '/pages/study/lookShipin?studyData=' + JSON.stringify(pageData)
+			url: '/pages/study/lookShipin?studyData=' + JSON.stringify(data)
+		})
 	}
+	
 
-	function listClick(data) {
-
-		data.videoId = 'b997f16cb9cb474cb93526cff77d8801'
-		data.progressMarkers = []
-		data.zhangId = infoData.zhangId
-		data.nianji = infoData.nianji
-		data.xueqi = infoData.xueqi
-		const pageData = {
-			//	videoId:data.videoId,
-			videoId: 'b997f16cb9cb474cb93526cff77d8801',
-			progressMarkers: [{
-				offset: 30,
-				isCustomized: true,
-				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/9A3F562E595E4764AD1DD546FA52C6E5-6-2.png',
-				title: 'test title',
-				describe: 'test string',
-			}, {
-				offset: 150,
-				isCustomized: true,
-				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/1E7F402241CD4C0F94AD2BBB5CCC3EC7-6-2.png',
-				title: 'test title',
-				describe: 'test string',
-			}, {
-				offset: 250,
-				isCustomized: true,
-				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
-				title: 'test title',
-				describe: 'test string',
-			}, {
-				offset: 550,
-				isCustomized: true,
-				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
-				title: 'test title',
-				describe: 'test string',
-			}, {
-				offset: 320,
-				isCustomized: true,
-				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
-				title: 'test title',
-				describe: 'test string',
-			}, {
-				offset: 650,
-				isCustomized: true,
-				coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
-				title: 'test title',
-				describe: 'test string',
-			}],
+	function listClick(data,index) {
+		if(index ==infoData.jieList.length-1){
+			// 最后一项
+			goKaoshi()
+		}else{
+			goLookShipin(data)
 		}
-		uni.navigateTo({
-			//url: '/pages/study/lookShipin?studyData=' + JSON.stringify(pageData)
-			url: '/pages/study/lookShipin?studyData=' + JSON.stringify(data)
-		})
 	}
 
 	function handleCheckCatalogue() {