Browse Source

Merge branch 'xqy_order'

xuqiaoying 2 years ago
parent
commit
d8e63fa5b3
58 changed files with 1910 additions and 277 deletions
  1. 24 11
      common/httpList/goods.js
  2. 1 0
      common/httpList/lock.js
  3. 4 0
      common/request.js
  4. 25 6
      components/course/courseChapter.vue
  5. 42 25
      components/course/courseModule.vue
  6. 20 10
      components/course/courseSection.vue
  7. 38 5
      pages.json
  8. 0 1
      pages/course/index.vue
  9. 7 12
      pages/index/index.vue
  10. 1 1
      pages/learn/index.scss
  11. 16 34
      pages/learn/index.vue
  12. 306 0
      pages/questionBank/index.scss
  13. 202 0
      pages/questionBank/index.vue
  14. 0 1
      pages/wd/index.vue
  15. 2 2
      pages2/bank/collectById.vue
  16. 3 2
      pages2/bank/detail.vue
  17. 92 11
      pages2/bank/questionBank.vue
  18. 3 0
      pages2/bank/questionBankContinue.vue
  19. 23 5
      pages2/bank/questionBankExplain.vue
  20. 1 0
      pages2/bank/questionBankExplainDetail.vue
  21. 11 2
      pages2/bank/question_detail.vue
  22. 6 4
      pages2/bank/question_record.vue
  23. 6 3
      pages2/bank/question_record_list.vue
  24. 45 11
      pages2/bank/question_report.vue
  25. 3 1
      pages2/class/questionBank.vue
  26. 561 0
      pages2/dailyPractice/index.vue
  27. 1 1
      pages2/learn/details.vue
  28. 1 1
      pages2/learn/menu.vue
  29. 2 2
      pages2/order/confirm_pay.vue
  30. 222 0
      pages2/randomPractice/index.vue
  31. 4 0
      pages2/register/register.vue
  32. BIN
      pages2/static/daily/daily_one.png
  33. BIN
      pages2/static/daily/logo_icon.png
  34. BIN
      pages2/static/daily/punch.png
  35. BIN
      pages2/static/random/exam_situ.png
  36. 7 4
      pages2/subject/collect.vue
  37. 5 1
      pages2/subject/collectBank.vue
  38. 7 5
      pages2/wd/course.vue
  39. 4 1
      pages2/wd/free_bank.vue
  40. 3 1
      pages2/wd/question_bank.vue
  41. 5 2
      pages3/course/detail.vue
  42. 74 17
      pages3/live/detail.vue
  43. 117 54
      pages3/polyv/detail.vue
  44. 9 2
      pages4/login/login.vue
  45. 0 1
      pages4/shopping/shoppingCart.vue
  46. 6 5
      pages5/liveDetail/course.vue
  47. BIN
      static/learn/empty_status.png
  48. BIN
      static/nav1.png
  49. BIN
      static/nav1_on.png
  50. BIN
      static/nav2.png
  51. BIN
      static/nav2_on.png
  52. BIN
      static/nav3.png
  53. BIN
      static/nav3_on.png
  54. BIN
      static/nav5.png
  55. BIN
      static/nav5_on.png
  56. BIN
      static/nav6.png
  57. BIN
      static/nav6_on.png
  58. 1 33
      store/index.js

+ 24 - 11
common/httpList/goods.js

@@ -34,13 +34,13 @@ export default {
 			data: data,
 		})
 	},
-	goodsBank(data) {
-		return myRequest({
-			url: '/goods/bank/list',
-			method: 'get',
-			data: data,
-		})
-	},
+	// goodsBank(data) {
+	// 	return myRequest({
+	// 		url: '/goods/bank/list',
+	// 		method: 'get',
+	// 		data: data,
+	// 	})
+	// },
 	
 	bankExamExamList(data) {
 		return myRequest({
@@ -176,6 +176,13 @@ export default {
 			method: 'get',
 		})
 	},
+	// 随机练习
+	bankTempReport(data) {
+		return myRequest({
+			url: '/bank/exam/temp/'+data,
+			method: 'get',
+		})
+	},
 	
 	examRecordCount(data) {
 		return myRequest({
@@ -398,8 +405,15 @@ export default {
 			noToken: true
 		})
 	},
-	
-	
+	// 随时练习解析
+	goodsQuestionTempList(data) {
+		return myRequest({
+			url: '/app/common/bank/question/temp/list',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
 
 	addCart(data) {
 		return myRequest({
@@ -461,8 +475,7 @@ export default {
 		return myRequest({
 			url: '/bank/question/listUserFreeUnionBuyGoodsList',
 			method: 'get',
-			data: data,
-			compleLoading: true
+			data: data
 		})
 	},
 	

+ 1 - 0
common/httpList/lock.js

@@ -25,6 +25,7 @@ export default {
 			method: 'post',
 			data: data,
 			noLoading:true,
+			compleLoading: true,
 		})
 	},
 	

+ 4 - 0
common/request.js

@@ -1,6 +1,7 @@
 // 'http://192.168.1.222:8088','https://file-dev.xyyxt.net/'线下
 // 'https://api.xyyxt.net' 'https://file.xyyxt.net/'线上
 import store from '@/store/index.js'
+import method from '@/common/methodTool.js'
 import api from './api.js'
 var num = 1
 //接口api   
@@ -71,6 +72,7 @@ export const myRequest = (options) => {
 						if (!uni.getStorageSync('user_account')) {
 							var pages = getCurrentPages() // 获取栈实例
 							let currentRoute  = pages[pages.length-1].route; // 获取当前页面路由
+							console.log('request-->1111:', currentRoute);
 							if(currentRoute != 'pages4/login/login') {
 								uni.navigateTo({
 									url: '/pages4/login/login'
@@ -85,6 +87,7 @@ export const myRequest = (options) => {
 						uni.removeStorageSync('user_account');
 						var pages = getCurrentPages() // 获取栈实例
 						let currentRoute  = pages[pages.length-1].route; // 获取当前页面路由
+						console.log('request-->2222:', currentRoute);
 						if(currentRoute != 'pages4/login/login') {
 							uni.navigateTo({
 								url: '/pages4/login/login'
@@ -138,6 +141,7 @@ export const myRequest = (options) => {
 		} else {
 			var pages = getCurrentPages() // 获取栈实例
 			let currentRoute  = pages[pages.length-1].route; // 获取当前页面路由
+			console.log('request-->333:', currentRoute);
 			if(currentRoute != 'pages4/login/login') {
 				uni.navigateTo({
 					url: '/pages4/login/login'

+ 25 - 6
components/course/courseChapter.vue

@@ -26,10 +26,12 @@
             :levelId="levelId + '-' + itemM.sectionId"
             :testType="2"
             :ChapterSectionExam='sectionExam'
+            :menuAllList="menuAllList"
           ></courseSection>
           <!-- @togoBack='togoBack()' -->
           <u-line v-if="indexM < list.length - 1"></u-line>
         </view>
+        <!-- 章卷 -->
         <view v-if="itemM.type == 2">
           <u-line></u-line>
           <view
@@ -132,6 +134,10 @@ export default {
       type: [Number, String],
       default: 0,
     }, 
+    menuAllList: { // 课程所有子目录结构列表
+			type: Array,
+			default: () => []
+		}
   },
   components: {
     courseSection,
@@ -143,10 +149,13 @@ export default {
       examList: {},
       canLearn: false, //是否全部视频看完才可以练习、测试
       sectionExam: [],
+      // newMenuAllList: [],
     };
   },
   onLoad() {},
-  created() {},
+  created() {
+    // this.newMenuAllList = this.menuAllList
+  },
   mounted() {
     if (this.needOpen && this.chapterOpen) {
       this.updateChapterOpen(false);
@@ -178,7 +187,8 @@ export default {
           });
       });
     },
-    refreshList(isRebuild) {
+    async refreshList(isRebuild) {
+      // console.log('节的播放结束');
       let moduleId = this.menuItem.moduleId ? this.menuItem.moduleId : 0;
       if (this.isRebuild) {
         this.getReSectionList(
@@ -187,6 +197,7 @@ export default {
           moduleId
         );
       } else {
+        // console.log('重新请求');
         this.getBuySectionList(
           this.menuItem.id,
           this.menuItem.courseId,
@@ -196,6 +207,8 @@ export default {
       }
 
       this.$emit("playEnd", { isRebuild: isRebuild.isRebuild });
+      // this.newMenuAllList = await this.studyRecordMenuAllList()
+      // console.log('播放器节:', this.newMenuAllList);
     },
     findNextSection(index) {
       for (let i = index + 1; i < this.list.length; i++) {
@@ -259,7 +272,10 @@ export default {
      * 去做题
      */
     async toDo(id, goodsId = 0, moduleId = 0, chapterId = 0, item, index) {
+      console.log('menuAllList', this.menuAllList);
+      // 查询用户商品今天学习节数- /goods/todayStudySectionNum
       let learnNum = await this.goodsTodayStudySectionNum();
+      // 检查用户是否学习过节 - /grade/grade/checkGoodsStudy
       let hasLearn = await this.gradeCheckGoodsStudy(id);
 
       if (this.sectionMaxNum > 0) {
@@ -271,7 +287,6 @@ export default {
           return;
         }
       }
-      // console.log(this.learningOrder, "this.learningOrder");
       if (this.learningOrder == 1) {
         if (this.canLearn) {
           let num = await this.bankRecordDoNum(item.typeId);
@@ -336,7 +351,9 @@ export default {
         }
       } else if (this.learningOrder == 2 && !item.rebuild) {
         let canLearn = this.list[index - 1].learning == 1;
-        let rows = await this.studyRecordMenuAllList();
+        // /study/record/menuAllList - 查询课程所有子目录结构列表
+        // let rows = await this.studyRecordMenuAllList();
+        let rows = this.menuAllList
         let isStop = false;
         let newRows = [];
         for (let i = 0; i < rows.length; i++) {
@@ -359,7 +376,7 @@ export default {
             }
           }
         }
-        // console.log(newRows);
+        console.log(newRows);
         let isAllLearn = newRows.every((item) => {
           return item.studyStatus == 1;
         });
@@ -505,7 +522,7 @@ export default {
       this.down = !this.down;
       if (!this.down && this.list.length == 0) {
         // console.log(item.id, 69);
-        //获取章下面所有节试卷列表
+        //获取章下面所有节试卷列表-course/sectionExamList
         await this.$api.reSectionExamList({
           chapterId: item.chapterId || item.menuId,
           courseId: item.courseId,
@@ -612,6 +629,7 @@ export default {
     },
     getBuySectionList(chapterId, courseId, moduleId) {
       let self = this;
+      // /course/sectionList
       this.$api
         .reSectionList({
           chapterId: chapterId,
@@ -642,6 +660,7 @@ export default {
               }
             });
             self.list = res.data.data;
+            console.log('=========', this.list);
           }
         });
     },

+ 42 - 25
components/course/courseModule.vue

@@ -14,9 +14,10 @@
 				<courseChapter v-if='itemM.type != 2'  :orderGoodsId="orderGoodsId"
 						:isLive="isLive" :preItem="list[indexM - 1] || preItem" :sectionMaxNum="sectionMaxNum" :needOpen="needOpen" @playEnd="playEnd($event)" 
 						@toDo="toDo($event)" :courseId="courseId" :learningOrder="learningOrder" :goodsId="goodsId" :isBuy="isBuy" :gradeId="gradeId" 
-						:isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId">
+						:isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId" :menuAllList="menuAllList">
 				</courseChapter>
 				<u-line v-if="indexM<list.length-1"></u-line>
+				<!-- 模块卷 -->
 				<view v-if="itemM.type == 2">
 					<view
 						class="examBox"
@@ -117,6 +118,10 @@ export default {
 			type: [Number, String],
 			default: 0,
 		}, 
+		menuAllList: { // 课程所有子目录结构列表
+			type: Array,
+			default: () => []
+		}
 	},
 	components: {
 		courseChapter
@@ -155,7 +160,6 @@ export default {
 			}
 		},
 			getChapterList(moduleId) {
-					let self = this
                     // url: '/app/common/course/chapterList/'+data,
 					this.$api.chapterList(moduleId).then(res => {
 						if(res.data.code==200){
@@ -164,12 +168,11 @@ export default {
 								item.id = item.chapterId
 								item.menuType = 2;
 							}
-							self.list = res.data.data
+							this.list = res.data.data
 						}
 					});
 				},
 		getReChapterList(moduleId,courseId) {
-			let self = this
 			this.$api.reChapterList({moduleId:moduleId,gradeId:this.gradeId,courseId:courseId,rebuild:1}).then(res => {
 				if(res.data.code==200){
 					for(let i=0;i<res.data.data.length;i++){
@@ -177,12 +180,12 @@ export default {
 						item.id = item.chapterId
 						
 					}
-					self.list = res.data.data
+					this.list = res.data.data
 				}
 			});
 		},
 		getBuyChapterList(moduleId,courseId) {
-			let self = this
+			// course/chapterList
 			this.$api.reChapterList({moduleId:moduleId,gradeId:this.gradeId,courseId:courseId}).then(res => {
 				if(res.data.code==200){
 					for(let i=0;i<res.data.data.length;i++){
@@ -190,33 +193,47 @@ export default {
 						item.id = item.chapterId
 						item.menuType = 2;
 					}
-					self.list = res.data.data
+					this.list = res.data.data
 				}
 			});
-			// console.log('-----------list', this.list)
+			
 		},
 		/**
 		 * 去做题
 		 */
 		async toDoModuleExam(id, goodsId = 0, moduleId = 0, chapterId = 0, item, index) {
-			uni.navigateTo({
-			url:
-				"/pages2/class/questionBank?courseId=" +
-				this.courseId +
-				"&gradeId=" +
-				this.gradeId +
-				"&isFromVideo=1&id=" +
-				id +
-				"&goodsid=" +
-				goodsId +
-				"&moduleId=" +
-				moduleId +
-				"&chapterId=" +
-				chapterId +
-				"&orderGoodsId=" +
-				this.orderGoodsId +
-				"&type=3" + '&learning=' + item.learning,
+			// console.log('===item', item, this.menuAllList);
+			let newRows = []
+			newRows = this.menuAllList.filter(e => e.moduleId == moduleId)
+			let isAllLearn = newRows.every(item => {
+				return item.studyStatus == 1
 			})
+			if (isAllLearn) {
+				uni.navigateTo({
+					url:
+						"/pages2/class/questionBank?courseId=" +
+						this.courseId +
+						"&gradeId=" +
+						this.gradeId +
+						"&isFromVideo=1&id=" +
+						id +
+						"&goodsid=" +
+						goodsId +
+						"&moduleId=" +
+						moduleId +
+						"&chapterId=" +
+						chapterId +
+						"&orderGoodsId=" +
+						this.orderGoodsId +
+						"&type=3" + '&learning=' + item.learning,
+				})
+			} else {
+				uni.showToast({
+					icon: "none",
+					title: "请学完视频课程再进行练习和测试",
+				})
+			}
+			
 		},
 		
 	},

+ 20 - 10
components/course/courseSection.vue

@@ -2,7 +2,7 @@
 	<view style="display: flex;justify-content: space-between;align-items: center;" @click="getVideo">
 		<view style="display: flex;justify-content: space-between;margin: 20rpx 0;width: 100%;">
 			<view style="display: flex;align-items: center;flex:1;">
-				<view class="tag tagColor1" v-if="menuItem.sectionType==1">录播</view>
+				<view class="tag tagColor1" v-if="menuItem.sectionType==1">视频</view>
 				<view class="tag tagColor2" v-if="menuItem.sectionType==2">直播</view>
 				<view class="tag tagColor3" v-if="menuItem.sectionType==3">回放</view>
 				<view class="t_content">
@@ -59,7 +59,7 @@
 			<template v-if="!isLive">
 				<view v-if="(isRebuild||menuItem.rebuild>0)" class="tagRe">待重修</view>
 				<view v-else>
-					<view v-if="menuItem.learning==1" class="tagGreen">已完</view>
+					<view v-if="menuItem.learning==1" class="tagGreen">已完</view>
 				</view>
 			</template>
 
@@ -136,6 +136,10 @@ export default {
 		testType: {
 			type: Number,
 			default: 0,
+		},
+		menuAllList: { // 课程所有子目录结构列表
+			type: Array,
+			default: () => []
 		}
 	},
 	watch:{
@@ -152,11 +156,13 @@ export default {
 			moduleSectionExam: [], // 模块下的所有节试卷列表
 			chapterExams: {},
 			moduleExams: {},
+			newMenuAllList: [],
 		};
 	},
 	onLoad() {
 	},
 	created() {
+		// this.newMenuAllList = this.menuAllList
 		if (this.testType == 3) {
 			// 模块下的所有节试卷列表
 			this.$api.reSectionExamList({
@@ -170,7 +176,8 @@ export default {
 			})
 		}
 	},
-	mounted() {
+    mounted() {
+		// console.log('节的播放---', this.menuAllList)
 		this.nowTime = Number(new  Date().getTime()/1000).toFixed(0)
 		this.newId= this.menuItem.sectionId>0?this.menuItem.sectionId:this.menuItem.menuId
 		let moduleId = this.menuItem.moduleId || 0;
@@ -179,10 +186,9 @@ export default {
 		let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild?'isRebuild':''}`;
 		this.playId = playNextId;
 		uni.$off('playNext'+playNextId) //绑定前先移除之前的事件
-		uni.$once('playNext'+playNextId, (data) => {
+		uni.$once('playNext'+playNextId, async (data) => {
 			//到时会触发每个节的监听事件,只允许当前节的接收
 			let self = this
-			
 			if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId) && data.fromRebuild){  // fromRebuild 来自重修目录的点击才弹出播放下一节
 				//重修存在下一节
 				uni.showModal({
@@ -212,7 +218,10 @@ export default {
 				    }
 				});
 			} else {
+				console.log('playEnd----');
 				this.$emit('playEnd',{isRebuild:this.isRebuild})
+				// this.newMenuAllList = await this.studyRecordMenuAllList()
+				// console.log('====this.newMenuAllList', this.newMenuAllList);
 			}
 		});
 	},
@@ -302,8 +311,8 @@ export default {
 				})
 			})
 		},
-		async getVideo(){
-			console.log('this.menuItem:', this.menuItem);
+		getVideo(){
+			console.log('this.this.newMenuAllList:', this.menuAllList);
 			if(this.clickLock) {
 				return;
 			}
@@ -312,7 +321,8 @@ export default {
 			
 			if(this.learningOrder == 2 && !this.menuItem.isRebuild && !this.isLive) { //要按从头到尾顺序学习, 且不是重修课程
 				if(this.preItem) {
-					let rows = await this.studyRecordMenuAllList();
+					// let rows = await this.studyRecordMenuAllList();
+					let rows = this.menuAllList
 					let newRows = [];
 					for(let i = 0; i < rows.length; i++ ) {
 						let moduleTrue = rows[i].moduleId == this.menuItem.moduleId || rows[i].moduleId == 0
@@ -330,7 +340,7 @@ export default {
 					let isAllLearn = newRows.every(item => {
 						return item.studyStatus == 1;
 					})
-					
+					console.log('isAllLearn:', isAllLearn);
 					if(isAllLearn) {
 						this.playVideo();
 					} else {
@@ -366,7 +376,7 @@ export default {
 		},
 		async playVideo() {
 			if(this.menuItem.sectionType==1 || this.menuItem.sectionType == 3){
-				//1录播 3回放
+				//1视频 3回放
 				if(!this.isBuy){
 					//非购买
 					if(!this.menuItem.tryListen){

+ 38 - 5
pages.json

@@ -50,9 +50,9 @@
 			}
 		},
 		{
-			"path": "pages/shopping/shoppingCart",
+			"path": "pages/questionBank/index",
 			"style": {
-				"navigationBarTitleText": "购物车",
+				"navigationBarTitleText": "题库",
 				"navigationStyle": "custom", // 隐藏系统导航栏
 				"app-plus": {
 					"titleNView": false, //禁用原生导航栏 
@@ -705,6 +705,28 @@
 						"bounce": "none"
 					}
 				}
+			},
+			{
+				"path": "dailyPractice/index",
+				"style": {
+					"navigationBarTitleText": "每日一练",
+					"navigationStyle": "custom", // 隐藏系统导航栏
+					"app-plus": {
+						"titleNView": false, //禁用原生导航栏 
+						"bounce": "none"
+					}
+				}
+			},
+			{
+				"path": "randomPractice/index",
+				"style": {
+					"navigationBarTitleText": "随机练习",
+					"navigationStyle": "custom", // 隐藏系统导航栏
+					"app-plus": {
+						"titleNView": false, //禁用原生导航栏 
+						"bounce": "none"
+					}
+				}
 			}
 		]
 		 
@@ -845,6 +867,17 @@
 					"bounce": "none"
 				}
 			}
+		},
+		{
+			"path": "shopping/shoppingCart",
+			"style": {
+				"navigationBarTitleText": "购物车",
+				"navigationStyle": "custom", // 隐藏系统导航栏
+				"app-plus": {
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
+			}
 		}
     ]
 			
@@ -1047,7 +1080,7 @@
 	},
 	"tabBar": {
 		"color": "#AAAAAA",
-		"selectedColor": "#007AFF",
+		"selectedColor": "#222", //007AFF
 		"borderStyle": "black",
 		"backgroundColor": "#fff",
 		"list": [{
@@ -1069,10 +1102,10 @@
 				"text": "学习"
 			},
 			{
-				"pagePath": "pages/shopping/shoppingCart",
+				"pagePath": "pages/questionBank/index",
 				"iconPath": "static/nav3.png",
 				"selectedIconPath": "static/nav3_on.png",
-				"text": "购物车"
+				"text": "题库"
 			},
 			{
 				"pagePath": "pages/wd/index",

+ 0 - 1
pages/course/index.vue

@@ -241,7 +241,6 @@ export default {
 				pId:0,
 			},
 			current: 1,
-            tabbarlist: this.$store.state.tabLists
 		};
 	},
 	onPullDownRefresh(){

+ 7 - 12
pages/index/index.vue

@@ -56,8 +56,11 @@
 					<view style="width: 100%;display: flex;justify-content:center;margin-top: 20rpx;">
 						<view v-for="(item, index) in date" :key="index" class="card_date">{{ item }}</view>
 					</view>
-					<view style="width: 100%;display: flex;justify-content:center;margin-top: 40rpx;">
+					<view style="width: 100%; display: flex; margin-top: 40rpx; flex-wrap: wrap;">
 						<view v-for="(item, index) in date_num" :key="index" class="date_num">
+							<view class="items">
+								{{ item.date }}
+							</view>
 							<view v-if="item.color == 0" class="date_num_color0" v-show="item.date > 0">
 								{{ item.date }}
 								<view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
@@ -201,16 +204,6 @@
 			</view>
 		</view>
 
-		<!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
-		<!-- <view v-if="isLogin" class="official">
-			<u-icon name="close"></u-icon>
-			<official-account @load='bindload'></official-account>
-		</view> -->
-		<!-- v-if="isLogin && (isFollow != 1) && curClose" -->
-		<!-- <view class="officialsss">
-			<text>asdsufd</text>
-			<official-account></official-account>
-		</view> -->
 		<view :style="{'opacity':opacitys}" class="officials">
 			<view class="weixin_official_account">
 				<image class="off_logo" src="/static/index/official.png"></image>
@@ -286,7 +279,6 @@ export default {
 			isLogin:false,
 			isOld:false,
 			current: 0,
-            // tabbarlist: this.$store.state.tabLists,
 			showOfficial: false,
 			// opacity: 1,
 			isFollow: null, //是否关注过,不是1就是没关注
@@ -1369,6 +1361,9 @@ page {
 	position: relative;
 	display: inline-block;
 	margin-top: 20rpx;
+	.items {
+		width: 100%;
+	}
 }
 .course_title {
 	color: #2f4379;

+ 1 - 1
pages/learn/index.scss

@@ -383,7 +383,7 @@
 	.choose {
 		width: 280rpx;
 		height: 64rpx;
-		line-height: 64rpx;
+		line-height: 62rpx;
 		border-radius: 32rpx;
 		background-color: #007AFF;
 		color: #fff;

+ 16 - 34
pages/learn/index.vue

@@ -278,7 +278,7 @@
 				</view>
 
 				<!-- 我的题库 -->
-				<view class="my_courses">
+				<!-- <view class="my_courses">
 					<text class="titles">我的题库</text>
 					<view class="bottoms">
 						<navigator hover-class="none" url="/pages2/subject/collect">
@@ -346,7 +346,7 @@
 						</view>
 					</template>
 					
-				</view>
+				</view> -->
 			</view>
 			<!-- 没有学习的课程 -->
 			<view v-if="!allLoading && !allCourse" class="no_datas">
@@ -452,7 +452,6 @@
 				</view>
 			</view>
 		</u-popup>
-		<!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
     </view>
 </template>
 
@@ -480,12 +479,12 @@ export default {
 			gradeValue: -1,
 			sysTime: 0,
 			courseLists: [], // 课程列表
-			questionLists: [], // 题库列表
-			paramQ: {
-				pageNum: 1,
-				pageSize: 50
-			},
-			queitemIndex:'',
+			// questionLists: [], // 题库列表
+			// paramQ: {
+			// 	pageNum: 1,
+			// 	pageSize: 50
+			// },
+			// queitemIndex:'',
 			livingLists: [], // 直播列表
 			allLoading: false, // 加载样式
 			current: 2,
@@ -507,7 +506,7 @@ export default {
 	computed: {
 		...mapGetters(['userInfo']),
 		allCourse() {
-			return this.courseLists.length || this.questionLists.length || this.livingLists.length ? true : false
+			return this.courseLists.length || this.livingLists.length ? true : false
 		}
 	},
 	onLoad() {
@@ -567,9 +566,9 @@ export default {
 		// 查询直播课
 		getCourseLiveQues() {
 			this.allLoading = true
+			// this.$api.listUserFreeUnionBuyGoodsList(this.paramQ), // 查询用户拥有免费+自购题库商品 /bank/question/listUserFreeUnionBuyGoodsList
 			let arrs = [
 				this.$api.listUserVideoLive(this.paramC), // 查询用户拥有视频+直播商品 /goods/listUserVideoLive
-				this.$api.listUserFreeUnionBuyGoodsList(this.paramQ), // 查询用户拥有免费+自购题库商品 /bank/question/listUserFreeUnionBuyGoodsList
 				this.$api.getgoodsLiveList({
 					pageNum: 1,
 					pageSize: 3 // 默认3条
@@ -578,17 +577,17 @@ export default {
 			wx.stopPullDownRefresh()
 			Promise.all(arrs).then((res) => {
 				// if (res.data.code == 200) {
-					const [{ data: res1}, { data: res2}, {data: res3}] = res
+					const [{ data: res1}, { data: res2}] = res
 					if (res1.code == 200) {
 						this.courseLists = res1.rows || []
 					}
+					// if (res2.code == 200) {
+					// 	this.questionLists = res2.rows || []
+					// }
 					if (res2.code == 200) {
-						this.questionLists = res2.rows || []
-					}
-					if (res3.code == 200) {
-						this.livingLists = res3.rows || []
+						this.livingLists = res2.rows || []
 					} else {
-						this.$u.toast(res3.msg)
+						this.$u.toast(res2.msg)
 					}
 					this.allLoading = false
 				// }
@@ -895,21 +894,6 @@ export default {
 				}
 			});
 		},
-		// 进入练习
-		studyques(item,index){
-			this.queitemIndex = index;
-			let sysTime = this.$method.timest()
-			if (item.serviceStartTime && item.serviceEndTime && (sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime)) {
-				uni.showToast({
-					icon: 'none',
-					title: '不在学习服务期,不能进入学习'
-				})
-				return;
-			}
-			uni.navigateTo({
-				url:'/pages2/bank/question_detail?id='+item.goodsId+'&orderGoodsId='+item.orderGoodsId
-			})
-		},
 		radioGroupChange(e) {
 			// console.log(e)
 		},
@@ -1010,7 +994,6 @@ export default {
 			this.appointTestShow = false
 		},
 		appointment(item, appoint) {
-			console.log('====', item.examApplyGoodsList, this.userInfo)
 			this.appointItemIndex = item
 			if (item.examApplyGoodsList.length > 1) { // 多个考试预约				 
 				this.appointTestList = item.examApplyGoodsList
@@ -1021,7 +1004,6 @@ export default {
 			this.appoint_an(item, appoint_item)
 		},
 		appoint_an(item, appoint) {
-			// console.log('==appoint=', appoint)
 			var data = {
 				goodsId: item.goodsId,
 				gradeId: item.gradeId,

+ 306 - 0
pages/questionBank/index.scss

@@ -0,0 +1,306 @@
+@mixin threeDot {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+}
+.had_courses{
+	width: 100%;
+	padding: 0rpx 24rpx 31rpx;
+}
+
+.my_courses {
+	.titles {
+		font-size: 32rpx;
+		color: #333333;
+		margin: 44rpx 0rpx 24rpx 43rpx;
+		font-weight: bold;
+		display: block;
+	}
+	.course_item {
+		width: 100%;
+		// height: 278rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx 0rpx 20rpx 1rpx rgba(1,99,235,0.1000);
+		border-radius: 24rpx;
+		padding: 29rpx 29rpx 20rpx 24rpx;
+		margin-bottom: 20rpx;
+		.titlews {
+			padding-bottom: 24rpx;
+		}
+		.cou_titles {
+			margin-bottom: 12rpx;
+			color: #333333;
+			font-size: 32rpx;
+			font-weight: bold;
+			width: 100%;
+			@include threeDot();
+		}
+		.learn_ranges {
+			color: #666;
+			font-size: 24rpx;
+			.l_range {
+				width: 20rpx;
+				height: 24rpx;
+				margin-right: 9rpx;
+			}
+			.l_time {
+				color: #333;
+			}
+		}
+		.c_downs {
+			display: flex;
+			align-items: center;
+			// justify-content: flex-start;
+			justify-content: space-between;
+			padding-top: 24rpx;
+		}
+		// 状态
+		.all_status {
+			width: 654rpx;
+			background: #F8F8F8;
+			border-radius: 16rpx;
+		}
+		.class-warm {
+			padding: 20rpx 24rpx;
+			display: flex;
+			align-items: flex-start;
+
+			&__icon {
+				margin-right: 10rpx;
+			}
+
+			&__text {
+
+				.date {
+					color: #FF3B30;
+					font-size: 22rpx;
+					font-weight: 400;
+					// color: #969696;
+					margin-bottom: 8rpx;
+				}
+			}
+		}
+		.box_progress {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			margin-top: 20rpx;
+			// .disabled {
+			// 	opacity: 0.6;
+			// }
+		}
+		.study_btns {
+			width: 100%;
+			margin-top: 40rpx;
+			display: flex;
+			align-items: center;
+			// justify-content: flex-end;
+			flex-wrap: wrap;
+		}
+		.box_appoint {
+			display: flex;
+			align-items: center;
+			justify-content: flex-end;
+			.img {
+				width: 32rpx;
+				height: 32rpx;
+				margin-right: 10rpx;
+			}
+			
+		}
+		.exam_word {
+			font-size: 24rpx;
+			font-weight: 500;
+			// width: 144rpx;
+			padding: 0rpx 20rpx;
+			height: 56rpx;
+			line-height: 51rpx;
+			text-align: center;
+			background: #FFFFFF;
+			border-radius: 66rpx;
+			margin-right: 18rpx;
+			margin-bottom: 24rpx;
+		}
+		.ones {
+			color: #484848;
+			border: 2rpx solid #B9B9B9;
+		}
+		.intos {
+			color: #498AFE;
+			border: 2rpx solid #498AFE;
+		}
+	}
+	.lefts {
+		width: 204rpx;
+		height: 120rpx;
+		border-radius: 12rpx;
+		margin-right: 48rpx;
+		position: relative;
+		top: 0;
+		left: 0;
+		.lefet_img {
+			width: 100%;
+			height: 100%;
+			display: block;
+			border-radius: 16rpx;
+		}
+		.live_icon {
+			width: 65rpx;
+			height: 35rpx;
+			line-height: 35rpx;
+			border-radius: 12rpx 0rpx 12rpx 0rpx;
+			background-color: #FFB102;
+			color: #fff;
+			font-size: 20rpx;
+			text-align: center;
+			position: absolute;
+			top: 0;
+			left: 0;
+		}
+	}
+	.rights {
+		width: 380rpx;
+		height: 120rpx;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;;
+		
+		.learn_progress {
+			width: 100%;
+			height: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+		}
+		.progress_up {
+			font-size: 24rpx;
+			color: #999999;
+			width: 100%;
+			.progress_bar {
+				margin-top: 16rpx;
+			}
+		}
+		.progress_down {
+			// width: 100%;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+		}
+		.enter_into {
+			width: 144rpx;
+			height: 52rpx;
+			line-height: 52rpx;
+			background: #FFB102;
+			border-radius: 16rpx;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+			text-align: center;
+		}
+	}
+	// 收藏集,做题记录
+	.bottoms {
+		display: flex;
+		justify-content: space-between;
+		margin-bottom: 32rpx;
+		.item {
+			width: 335rpx;
+			&.collect {
+				position: relative;
+				font-size: 32rpx;
+				color: #FFFFFF;
+				height: 240rpx;
+				border-radius: 24rpx;
+				padding:32rpx;
+				
+				.text {
+					position:relative;
+					z-index: 10;
+					font-size: 32rpx;
+					font-weight: bold;
+					color: #FFFFFF;
+				}
+				
+				.img {
+					position:absolute;
+					left:0;
+					top:0;
+					width:100%;
+					height:100%;
+					
+				}
+			}
+			
+			&.list {
+				.list-in {
+					position:relative;
+					width: 335rpx;
+					height: 112rpx;
+					background: #007AFF;
+					border-radius: 24rpx;
+					display: flex;
+					align-items: center;
+					font-size: 32rpx;
+					color: #fff;
+					
+					&:first-of-type {
+						margin-bottom:16rpx;
+					}
+					
+					.text {
+						padding-left:91rpx;
+						position:relative;
+						z-index: 10;
+						font-size: 32rpx;
+						font-weight: bold;
+						color: #FFFFFF;
+					}
+					
+					.img {
+						position:absolute;
+						left:0;
+						top:0;
+						width:100%;
+						height:100%;
+					}
+				}
+			}
+		}
+	}
+}
+.no_datas {
+	margin-top: 70rpx;
+	display: flex;
+    flex-direction: column;
+    align-items: center;
+	// .courses {
+	// 	width: 360rpx;
+	// 	height: 349rpx;
+	// }
+	// .no_learns {
+	// 	font-size: 32rpx;
+	// 	color: #999;
+	// 	margin: 46rpx 0rpx 56rpx;
+	// }
+	.empty_status {
+        width: 160rpx;
+        height: 160rpx;
+        margin-bottom: 14rpx;
+        margin-top: 300rpx;
+    }
+    .word_tip {
+        font-size: 30rpx;
+        color: #888691;
+		margin-bottom: 56rpx;
+    }
+	.choose {
+		width: 280rpx;
+		height: 64rpx;
+		line-height: 62rpx;
+		border-radius: 32rpx;
+		background-color: #007AFF;
+		color: #fff;
+		font-size: 30rpx;
+		text-align: center;
+	}
+}

+ 202 - 0
pages/questionBank/index.vue

@@ -0,0 +1,202 @@
+<template>
+    <view class="questionBank">
+        <u-navbar :is-back="false" title="题库中心" :border-bottom="false"  title-color="#333333" back-icon-color="#ffffff">
+			<view class="slot-wrap">
+				<image  src="/static/logo2.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
+			</view>
+		</u-navbar>
+		<!-- 有学习的课程 -->
+		<view v-if="questionLists.length" class="had_courses">
+			<!-- 我的题库 -->
+			<view class="my_courses">
+				<text class="titles">我的题库</text>
+				<view class="bottoms">
+					<navigator hover-class="none" url="/pages2/subject/collect">
+						<view class="item collect">
+							<view class="text">收藏集<u-icon name="arrow-right"></u-icon></view>
+							<image class="img" src="/static/questionBank_collect.png"></image>
+						</view>
+					</navigator>
+					<view class="item list">
+						<navigator  hover-class="none" url="/pages2/bank/question_record">
+							<view class="list-in">
+								<image class="img" src="/static/questionBank_record.png" ></image>
+								<view class="text">
+									做题记录 <u-icon name="arrow-right"></u-icon>
+								</view>
+								
+							</view>
+						</navigator>
+						
+						<navigator  hover-class="none" url="/pages2/subject/wrong">
+							<view class="list-in">
+								<image class="img" src="/static/questionBank_wrong.png"></image>
+								<view class="text">
+									错题集 <u-icon name="arrow-right"></u-icon>
+								</view>
+							</view>
+						</navigator>
+					</view>
+				</view>
+
+				<template v-if="questionLists.length">
+					<!-- @click="studyques(item)" -->
+					<view v-for="(item, index) in questionLists" :key="index" class="course_item">
+						<view>
+							<view class="cou_titles">{{ item.goodsName }}</view>
+							<view v-if="item.serviceStartTime && item.serviceEndTime" class="learn_ranges">
+								<image class="l_range" src="/static/learn/learn_range.png"></image>
+								学习周期:
+								<text class="l_time">{{ item.serviceStartTime | formate('yyyy.mm.dd') }} - {{ item.serviceEndTime | formate('yyyy.mm.dd') }}</text>
+							</view>
+						</view>
+						<view class="c_downs">
+							<view class="lefts">
+								<image class="lefet_img" :src="$method.splitImgHost(item.coverUrl, true)" mode=""></image>
+							</view>
+							<view class="rights">
+								<view class="learn_progress">
+									<view class="progress_up">
+										<view>
+											学习进度:{{item.doNum}}/{{item.totalNum}}
+										</view>
+										<view class="progress_bar" style="width: 100%;">
+											<u-line-progress :show-percent="false" height="22" active-color="#ff9900" :percent="(item.doNum/item.totalNum)*100"></u-line-progress>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+						<!-- 按钮 -->
+						<view class="study_btns">
+							<view v-for="(child, c_index) in item.paperVos" :key="c_index" class="exam_word intos"
+							 @click.stop="toDailyPractice(item, child)">{{ child.paperName }}</view>
+							<!-- <view class="exam_word intos" @click="studyques(item)">章节练习</view> -->
+						</view>
+					</view>
+				</template>
+				
+			</view>
+		</view>
+		<!-- 没有学习的课程 -->
+		<view v-if="!allLoading && !questionLists.length" class="no_datas">
+			<!-- <image class="courses" src="/static/learn/no_course.png" mode=""></image>
+			<view class="no_learns">您目前没有可学习的题库</view> -->
+			<image src="/static/learn/empty_status.png" class="empty_status"></image>
+			<text class="word_tip">暂无题库</text>
+			<view class="choose" @click="toChoose()">立即去选购</view>
+		</view>
+    </view>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+export default {
+	data() {
+		return {
+			allLoading: false, // 加载样式
+			questionLists: [], // 题库列表
+			param: {
+				pageNum: 1,
+				pageSize: 10
+			},
+			total: 0,
+		}
+	},
+	computed: {
+		...mapGetters(['userInfo']),
+	},
+	onLoad() {},
+	onShow() {
+		this.param.pageNum = 1
+		this.questionLists = []
+		this.getBankList()
+	},
+	onPullDownRefresh() {
+		this.param.pageNum = 1
+		this.questionLists = []
+		this.getBankList()
+	},
+	onReachBottom() {
+		if (this.questionLists.length < this.total) {
+			this.param.pageNum++
+			this.getBankList()
+		}
+	},
+	methods: {
+		// 查询用户拥有免费+自购题库商品 /bank/question/listUserFreeUnionBuyGoodsList
+		getBankList() {
+			this.allLoading = true
+			this.$api.listUserFreeUnionBuyGoodsList(this.param).then((res) => {
+				if (res.data.code == 200) {
+					this.questionLists.push(...(res.data.rows || [] ))
+					console.log('this.courseList', this.questionLists)
+					this.total = res.data.total
+				}
+				this.allLoading = false
+			}).catch((err) => {
+				this.allLoading = false
+			})
+		},
+		toChoose() {
+			uni.switchTab({
+				url:'/pages/course/index'
+			})
+		},
+		toDailyPractice(item, child) {
+			this.$api.lockLockStatus({
+			  action:'bank',
+			  uuid: this.$method.getUuid()
+			}).then(res => {
+			  if(res.data.code == 200) { //有其他端在操作,不能学习
+				  uni.showToast({
+					  icon: 'none',
+					  title: res.data.msg,
+					  duration: 3000,
+				  })
+			  } else if(res.data.code == 500) { //可以学习
+				  
+				if (child.paperName == '每日一练') {
+					uni.navigateTo({
+						url: '/pages2/dailyPractice/index?goodsId=' + item.goodsId + '&orderGoodsId=' + item.orderGoodsId
+					})
+				} else if (child.paperName == '随机练习') {
+					uni.navigateTo({
+						url: '/pages2/randomPractice/index?goodsId=' + item.goodsId + '&orderGoodsId=' + item.orderGoodsId
+					})
+				} else {
+					this.studyques(item, child)
+				}
+
+			  }
+			})
+			
+			
+		},
+		// 进入练习
+		studyques(item, child){
+			let sysTime = this.$method.timest()
+			if (item.serviceStartTime && item.serviceEndTime && (sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime)) {
+				uni.showToast({
+					icon: 'none',
+					title: '不在学习服务期,不能进入学习'
+				})
+				return;
+			}
+			let paperId = child && child.paperId || ''
+			uni.navigateTo({
+				url:'/pages2/bank/question_detail?id='+item.goodsId+'&orderGoodsId='+item.orderGoodsId + '&paperId=' + paperId
+			})
+		},
+	},
+}
+</script>
+
+<style>
+page {
+	background: #eaeef1;
+}
+</style>
+<style lang="scss" scoped>
+@import './index.scss';
+</style>

+ 0 - 1
pages/wd/index.vue

@@ -152,7 +152,6 @@ export default {
 			total1:0,
 			total2:0,
 			current: 4,
-            tabbarlist: this.$store.state.tabLists
 		};
 	},
 	onLoad(option) {

+ 2 - 2
pages2/bank/collectById.vue

@@ -27,10 +27,10 @@
 					<view class="bt">
 						<view class="left">收藏数<text class="num">{{item.questionNum}}</text></view>
 						<view class="right">
-							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?orderGoodsId='+orderGoodsId+'&examId='+item.examId + '&distinction=1'">
+							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?orderGoodsId='+orderGoodsId+'&examId='+item.examId + '&distinction=1'+ '&doMode=' + item.doMode">
 								<view class="btn">重做</view>
 							</navigator>
-							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?orderGoodsId='+orderGoodsId+'&examId='+item.examId+'&explain=1' + '&distinction=1'">
+							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?orderGoodsId='+orderGoodsId+'&examId='+item.examId+'&explain=1' + '&distinction=1'+ '&doMode=' + item.doMode">
 								<view class="btn">解析</view>
 							</navigator>
 							<!-- <view class="btn">解析</view> -->

+ 3 - 2
pages2/bank/detail.vue

@@ -237,6 +237,7 @@ export default {
 				optObj[arrs[i].split('=')[0]] = arrs[i].split('=')[1]
 			}
 			this.id = optObj.id
+			uni.setStorageSync('newUser_sc', optObj.sc)
 		} else {
 			// 小程序正常跳转的
 			// this.id => goodsId
@@ -469,8 +470,8 @@ export default {
 			}
 		},
 		toShopcar() {
-			uni.switchTab({
-			    url: '/pages/shopping/shoppingCart'
+			uni.navigateTo({
+			    url: '/pages4/shopping/shoppingCart'
 			})
 		},
 		getIsBuy() {

+ 92 - 11
pages2/bank/questionBank.vue

@@ -918,11 +918,15 @@ export default {
       examData: {},
       orderGoodsId: "",
       cgType: 0, //对应设计稿弹窗编码
-      courseId: '',
+      // courseId: '',
+      entryType: '', // 进入做题页面的入口类型,daily-每日一练进来,random-随机练习, 其他的-题库做题进入
+      bankNum: 5, // 随机练习的题目数量
     };
   },
   async onLoad(option) {
-    this.courseId = option.courseId
+    this.entryType = option.entryType || ''
+    this.bankNum = option.bankNum
+    // this.courseId = option.courseId || ''
     this.orderGoodsId = option.orderGoodsId || 0;
     this.current = +option.current || 0;
     this.id = option.id;
@@ -968,11 +972,16 @@ export default {
         this.lastTime--;
       }, 1000);
     } else {
+      if (this.entryType == 'random') {
+        this.bankType = 1 // 随机练习全部都是练习类型
+        this.randomQuestionList()
+      } else {
       //进入页面
       await this.bankExam();
       // 请求题目列表
       this.goodsQuestionList();
     }
+    }
   },
   onUnload() {
     if (this.isSubmit) {
@@ -1014,7 +1023,11 @@ export default {
     bankExam() {
       return new Promise((resolve) => {
         this.$api.bankExam(this.id).then((res) => {
-          this.bankType = res.data.data.doType;
+          if (this.entryType == 'daily') { // 每日一练类型都是为练习
+            this.bankType = 1
+          } else {
+            this.bankType = res.data.data.doType;
+          }
           this.examData = res.data.data;
           if (this.bankType == 2) {
             this.needBack = true;
@@ -1320,6 +1333,7 @@ export default {
         .then((res) => {
           this.isSubmit = true;
           if (res.data.code == 200) {
+            this.entryType == 'daily' && this.dailyExam()
           }
         });
 
@@ -1334,6 +1348,7 @@ export default {
           questionIds: doWrongQuestionIds,
           recordId: this.recordId,
           type: 1, // 题库试卷传1
+          doMode: this.entryType == 'random' ? 2 : 1, // 做题模式 1章卷 2随机练习
         })
         .then((res) => {});
     },
@@ -1458,7 +1473,11 @@ export default {
             doQuestionNum: doQuestionNum,
             historyExamJson: JSON.stringify(this.questionList),
           })
-          .then((res) => {});
+          .then((res) => {
+            if (res.data.code == 200) {
+              this.entryType == 'daily' && this.dailyExam()
+            }
+          });
       }
     },
     /**
@@ -1486,7 +1505,8 @@ export default {
           goodsId: this.goodsId,
           totalQuestionNum: questionList,
           allQuestionNum: this.questionList.length,
-          courseId: this.courseId,
+          doMode: this.entryType == 'random' ? 2 : 1, // 做题模式 1章卷 2随机练习
+          // courseId: this.courseId,
           // type: ''
         })
         .then((res) => {
@@ -1519,6 +1539,43 @@ export default {
     hideDialog() {
       this.showDialog = false;
     },
+    // 请求随机练习题目列表
+    randomQuestionList() {
+      this.$http({
+        url: '/bank/exam/temp',
+        method: 'post',
+        data: {
+          goodsId: this.goodsId,
+          orderGoodsId: this.orderGoodsId,
+          number: this.bankNum
+        }
+      }).then((res) => {
+        if(res.data.code == 200) {
+          this.examData = res.data.data || {}
+          this.id = this.examData.examId
+          if (!this.examData.questionList.length) {
+            this.hideDialog();
+            uni.showModal({
+              showCancel: false,
+              content: "该试卷暂无题目",
+              success: (k) => {
+                if (k.confirm) {
+                  this.isSubmit = true;
+                  uni.navigateBack();
+                }
+              },
+            });
+            return;
+          }
+          this.dataAnlyze(this.examData.questionList || [])
+        } else {
+          this.$u.toast(res.data.msg)
+          setTimeout(() => {
+            uni.navigateBack()
+          }, 2000)
+        }
+      })
+    },
     /**
      * 请求题目列表 app/common/bank/question/list
      */
@@ -1564,7 +1621,12 @@ export default {
             }, 1000);
           } else {
           }
-          res.data.data.forEach((item, index) => {
+          this.dataAnlyze(res.data.data)
+        });
+    },
+    dataAnlyze(datas = []) {
+      console.log('datas:', datas)
+      datas.forEach((item, index) => {
             // if (typeof item.jsonStr == 'string') {
             item.jsonStr = JSON.parse(item.jsonStr);
 
@@ -1690,12 +1752,11 @@ export default {
             // }
           });
 
-          this.questionList = res.data.data;
+          this.questionList = datas;
 
           this.lastCount = this.questionList.length;
           this.examRecord();
           this.getCollectInfo(this.current);
-        });
     },
     /**
      * @param {Object} e单选点击
@@ -2141,7 +2202,7 @@ export default {
       //交卷
       this.$api
         .examRecordEdit({
-          courseId: this.courseId,
+          // courseId: this.courseId,
           examId: this.id,
           goodsId: this.goodsId,
           reportStatus: reportStatus,
@@ -2165,6 +2226,7 @@ export default {
         .then((res) => {
           this.isSubmit = true;
           if (res.data.code == 200) {
+            this.entryType == 'daily' && this.dailyExam()
             uni.showToast({
               title: "交卷成功",
               duration: 1000,
@@ -2185,7 +2247,7 @@ export default {
                   "&id=" +
                   this.recordId +
                   "&orderGoodsId=" +
-                  this.orderGoodsId,
+                  this.orderGoodsId + '&entryType=' + this.entryType + '&bankNum=' + this.bankNum,
               });
             }, 1000);
           }
@@ -2200,10 +2262,28 @@ export default {
           questionIds: doWrongQuestionIds,
           recordId: this.recordId,
           type: 1, // 题库试卷传1
+          doMode: this.entryType == 'random' ? 2 : 1, // 做题模式 1章卷 2随机练习
         })
         .then((res) => {});
     },
-
+    // 每日一练试卷打卡
+    dailyExam() {
+      const dateStamp = parseInt(new Date(new Date().toLocaleDateString()).getTime()/1000)
+      this.$http({
+        url: '/bank/question/special/exam/record',
+        method: 'post',
+        data: {
+          examId: this.id,
+          chapterExamId: this.chapterId, // 章卷ID
+          moduleExamId: this.moduleId, //模块卷ID	
+          goodsId: this.goodsId,
+          recordTime: dateStamp, // 传当天0点时间戳(秒)
+        }
+      }).then((res) => {
+        if (res.data.code == 200) {
+        }
+    })
+  },
     /**
      * @param {Object} state
      * @param {Object} index
@@ -2217,6 +2297,7 @@ export default {
             questionId: this.questionList[index].questionId,
             goodsId: this.goodsId || "",
             orderGoodsId: this.orderGoodsId,
+            doMode: this.entryType == 'random' ? 2 : 1, //做题模式 1章卷 2随机练习,只限题库,视频课程里面的不用传这个参数
           })
           .then((res) => {
             if (res.data.code == 200) {

+ 3 - 0
pages2/bank/questionBankContinue.vue

@@ -891,6 +891,7 @@ export default {
             questionId: this.questionList[index].questionId,
             goodsId: this.goodsId || "",
             orderGoodsId: this.orderGoodsId,
+            doMode: 1, //做题模式 1章卷 2随机练习
           })
           .then((res) => {
             if (res.data.code == 200) {
@@ -1350,6 +1351,7 @@ export default {
           recordId: this.recordId,
           orderGoodsId: this.orderGoodsId,
           type: 1, // 题库试卷传1
+          doMode: 1, // 做题模式 1章卷 2随机练习
         })
         .then((res) => {});
     },
@@ -1610,6 +1612,7 @@ export default {
           questionIds: doWrongQuestionIds,
           recordId: this.recordId,
           type: 1, // 题库试卷传1
+          doMode: 1, // 做题模式 1章卷 2随机练习
         })
         .then((res) => {});
     },

+ 23 - 5
pages2/bank/questionBankExplain.vue

@@ -464,6 +464,7 @@ export default {
       recordId: "",
       chapterId: "",
       moduleId: "",
+      doMode: 1, // 1-普通章卷,2-随机练习
     };
   },
   onLoad(option) {
@@ -472,7 +473,7 @@ export default {
     this.chapterId = option.chapterId || "";
     this.moduleId = option.moduleId || "";
     this.recordId = option.recordId || "";
-
+    this.doMode = option.doMode
     let showDialog = uni.getStorageSync("showDialog");
 
     if (showDialog) {
@@ -481,7 +482,12 @@ export default {
       this.showDialog = true;
       uni.setStorageSync("showDialog", "1");
     }
+    console.log('------解析解析', this.doMode);
+    if (this.doMode == 2) {
+      this.getQuestionTempList()
+    } else {
     this.goodsQuestionList();
+    }
   },
   onUnload() {},
   methods: {
@@ -491,6 +497,14 @@ export default {
     hasImgs(bank) {
       return bank.ansText.imageList.length == 0;
     },
+    // 获取随机练习解析题
+    getQuestionTempList() {
+      this.$api.goodsQuestionTempList({examId: this.id,}).then((res) => {
+        if (res.data.code == 200) {
+          this.analyseData(res.data.data)
+        }
+      })
+    },
     goodsQuestionList() {
       //解析
       this.$api
@@ -498,7 +512,13 @@ export default {
           examId: this.id,
         })
         .then((res) => {
-          res.data.data.forEach((item, index) => {
+          if (res.data.code == 200) {
+            this.analyseData(res.data.data)
+          }
+        });
+    },
+    analyseData(datas = []) {
+      datas.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
               item.jsonStr = JSON.parse(item.jsonStr);
 
@@ -568,10 +588,8 @@ export default {
             }
           });
 
-          this.questionList = res.data.data;
-        });
+          this.questionList = datas
     },
-
     openFooterTab() {
       this.show = true;
     },

+ 1 - 0
pages2/bank/questionBankExplainDetail.vue

@@ -1032,6 +1032,7 @@ export default {
             examId: this.id,
             questionId: this.questionList[index].questionId,
             goodsId: this.goodsId || "",
+            doMode: 1, //做题模式 1章卷 2随机练习
           })
           .then((res) => {
             if (res.data.code == 200) {

+ 11 - 2
pages2/bank/question_detail.vue

@@ -101,7 +101,7 @@
 								<view class="flex_auto">{{ article.examName }}</view>
 								<view class="btn" @click="toDo(article.examId, goodsData.goodsId, 0, item1.majorId)" v-if="article.recordStatus == -1">做题</view>
 								<view class="btn" @click="continueDo(article.recordId,article.examId, goodsData.goodsId, 0, item1.majorId)" v-if="article.recordStatus == 0 && article.doType == 1">继续</view>
-								<view class="btn" :class="{disabled:(article.answerNum > 0 && article.doNum >= article.answerNum)}" @click="doRepeat(article.recordId,article.examId, goodsData.goodsId, item1.majorId,0)" v-if="article.recordStatus == 1 || (article.recordStatus == 0 && article.doType == 2)">重做</view>
+								<view class="btn" :class="{disabled:(article.answerNum > 0 && article.doNum >= article.answerNum)}" @click="(article.recordId,article.examId, goodsData.goodsId, item1.majorId,0)" v-if="article.recordStatus == 1 || (article.recordStatus == 0 && article.doType == 2)">重做</view>
 							</view>
 						</view>
 					</template>
@@ -133,11 +133,13 @@ export default {
 			},
 			orderGoodsId:'',
 			firstEnter:true,
+			paperId: ''
 		};
 	},
 	onUnload() {
 		clearInterval(this.timer)
 		this.$api.lockDelLock({
+			uuid: this.$method.getUuid(),
 			action:'bank'
 		}).then(res => {
 			
@@ -147,6 +149,7 @@ export default {
 	onLoad(option) {
 		this.orderGoodsId = option.orderGoodsId
 		this.id = option.id;
+		this.paperId = option.paperId || ''
 		this.getDetail();
 		this.getLock()
 		this.timer = setInterval(this.getLock,10000)
@@ -162,7 +165,8 @@ export default {
 	methods: {
 		getLock() {
 			this.$api.lockLockAction({
-				action:'bank'
+				action:'bank',
+				uuid: this.$method.getUuid()
 			}).then(res => {
 				
 			})
@@ -246,6 +250,7 @@ export default {
 		 */
 		goodsBank() {
 			this.$api.goodsBank({
+				paperId: this.paperId,
 				orderGoodsId:this.orderGoodsId,
 				goodsId: this.id
 			}).then(res => {
@@ -267,6 +272,7 @@ export default {
 				if(this.bankList[i].type == 1) { //第一个是模块直接展开,再展开章下面的节
 					this.$api
 						.goodsChapterList({
+							paperId: this.paperId,
 							moduleExamId: this.bankList[i].majorId
 						})
 						.then(res => {
@@ -392,6 +398,7 @@ export default {
 
 			this.$api
 				.goodsChapterList({
+					paperId: this.paperId,
 					moduleExamId: id,
           orderGoodsId: this.orderGoodsId,
 					goodsId: this.id
@@ -410,6 +417,7 @@ export default {
 
 				this.$api
 					.bankExamExamList({
+						paperId: this.paperId,
 						moduleExamId:moduleExamId,
           orderGoodsId: this.orderGoodsId,
 						chapterExamId: id,
@@ -431,6 +439,7 @@ export default {
 
 				this.$api
 					.bankExamExamList({
+						paperId: this.paperId,
 						moduleExamId:moduleExamId,
           orderGoodsId: this.orderGoodsId,
 						chapterExamId: id,

+ 6 - 4
pages2/bank/question_record.vue

@@ -28,7 +28,7 @@
 					</view>
 				</view>
 				<view class="btns">
-					<view class="btn" v-if="record.status == 1" @click="doRepeat(record.goodsId, record)">重做</view>
+					<view class="btn" v-if="record.doMode == 1 && record.status == 1" @click="doRepeat(record.goodsId, record)">重做</view>
 					<view class="btn" @click="questionBankExplain(record)" v-if="record.status == 1">解析</view>
 					<view class="btn" @click="questionReport(record)" v-if="record.status == 1">报告</view>
 					<view class="btn continue" @click="doContinue(record,index)" v-if="record.courseType != 2 && record.status == 0 && record.historyExamJson">继续答题</view>
@@ -139,8 +139,8 @@ export default {
 			let moduleId = record.courseType == 2 ? record.moduleId : record.moduleExamId
 			let chapterId = record.courseType == 2 ? record.chapterId : record.chapterExamId
 			uni.navigateTo({
-				url:'/pages2/bank/questionBankExplain?id='+record.examId +'&goodsid='+record.goodsId+'&moduleId='+moduleId+'&chapterId='+chapterId+'&orderGoodsId='+record.orderGoodsId
-				
+				url:'/pages2/bank/questionBankExplain?id='+record.examId +'&goodsid='+record.goodsId+'&moduleId='+moduleId+'&chapterId='+chapterId
+				+'&orderGoodsId='+record.orderGoodsId + '&doMode=' + record.doMode
 			})
 		},
 		questionReport(record) {
@@ -149,8 +149,10 @@ export default {
                 	url: "/pages2/class/question_report?examId=" + record.examId + '&recordId=' + record.recordId + '&type=' + record.type + '&orderGoodsId='+ record.orderGoodsId,
               });
 			} else {
+				let entryType = record.doMode == 2 ? 'random' : ''
 				uni.navigateTo({
-					url:'/pages2/bank/question_report?goodsId='+record.goodsId+'&chapterId='+record.chapterExamId+'&moduleId='+record.moduleExamId+'&examId='+record.examId+'&id=' + record.recordId+'&orderGoodsId='+record.orderGoodsId
+					url:'/pages2/bank/question_report?goodsId='+record.goodsId+'&chapterId='+record.chapterExamId+'&moduleId='+record.moduleExamId
+					+'&examId='+record.examId+'&id=' + record.recordId+'&orderGoodsId='+record.orderGoodsId + '&entryType=' + entryType
 				})
 			}
 			

+ 6 - 3
pages2/bank/question_record_list.vue

@@ -17,7 +17,7 @@
 					</view>
 				</view>
 				<view class="btns">
-					<view class="btn" v-if="record.status == 1" @click="doRepeat(record.goodsId, record)">重做</view>
+					<view class="btn" v-if="record.doMode == 1 && record.status == 1" @click="doRepeat(record.goodsId, record)">重做</view>
 					<view class="btn" @click="questionBankExplain(record)" v-if="record.status == 1">解析</view>
 					<view class="btn" @click="questionReport(record)" v-if="record.status == 1">报告</view>
 					<view class="btn continue" @click="doContinue(record,index)" v-if="courseType != 2 && record.status == 0 && record.historyExamJson">继续答题</view>
@@ -127,7 +127,8 @@ export default {
 			let moduleId = this.courseType == 2 ? record.moduleId : record.moduleExamId
 			let chapterId = this.courseType == 2 ? record.chapterId : record.chapterExamId
 			uni.navigateTo({
-				url:'/pages2/bank/questionBankExplain?id='+record.examId +'&goodsid='+record.goodsId+'&moduleId='+moduleId+'&chapterId='+chapterId+'&orderGoodsId='+record.orderGoodsId
+				url:'/pages2/bank/questionBankExplain?id='+record.examId +'&goodsid='+record.goodsId+'&moduleId='+moduleId+'&chapterId='+chapterId
+				+'&orderGoodsId='+record.orderGoodsId + '&doMode=' + record.doMode
 			})
 		},
 		questionReport(record) {
@@ -136,8 +137,10 @@ export default {
                 	url: "/pages2/class/question_report?examId=" + record.examId + '&recordId=' + record.recordId + '&type=' + record.type + '&orderGoodsId='+ record.orderGoodsId,
               });
 			} else {
+				let entryType = record.doMode == 2 ? 'random' : '' // random-随机练习
 				uni.navigateTo({
-					url:'/pages2/bank/question_report?goodsId='+record.goodsId+'&chapterId='+record.chapterExamId+'&moduleId='+record.moduleExamId+'&examId='+record.examId+'&id=' + record.recordId+'&orderGoodsId='+record.orderGoodsId
+					url:'/pages2/bank/question_report?goodsId='+record.goodsId+'&chapterId='+record.chapterExamId+'&moduleId='+record.moduleExamId
+					+'&examId='+record.examId+'&id=' + record.recordId+'&orderGoodsId='+record.orderGoodsId + '&entryType=' + entryType
 				})
 			}
 			

+ 45 - 11
pages2/bank/question_report.vue

@@ -5,14 +5,14 @@
 			{{ reportdata.reportStatus === 0 ? '测试未通过' : reportdata.reportStatus === 1 ? '测试通过' : '' }}
 		</view>
 		<view class="top">
-			<view class="title">{{ reportdata.examName }}</view>
+			<view class="title">{{ examName }}</view>
 			<view class="desc">交卷时间:{{ $method.timestampToTime(reportdata.updateTime, false) }}</view>
 
 			<view class="box">
 				<view class="left">
 					<view>
 						<!-- 练习 -->
-						<template v-if="examData.doType == 1">
+						<template v-if="entryType == 'random' || (examData.doType && examData.doType == 1)">
 							<!-- ((reportdata.rightQuestionNum /
 									reportdata.doQuestionNum || 0).toFixed(0) *
 									100) -->
@@ -78,11 +78,11 @@
 				>
 					<view class="btnACs">全部解析</view>
 				</navigator>
-				<view class="btnACs" @click="doRepeat(reportdata.examId, reportdata.goodsId, reportdata.moduleExamId, reportdata.chapterExamId)">重新做题</view>
-				<view class="btnACs" v-if="nextExamId" @click="backBank">继续做题</view>
+				<view class="btnACs" v-if="entryType != 'daily'" @click="doRepeat(reportdata.examId, reportdata.goodsId, reportdata.moduleExamId, reportdata.chapterExamId)">重新做题</view>
+				<view class="btnACs" v-if="entryType != 'random' || nextExamId" @click="backBank">继续做题</view>
 			</view>
 		</view>
-		<view class="bottom">
+		<view v-show="entryType != 'random'" class="bottom">
 			<view class="circle-wrap">
 				<view class="circle-list">
 					<view class="item" v-show="reportdata.totalScore">
@@ -168,6 +168,9 @@ export default {
 			pageNum: 1,
 			pageSize: 10,
 			total: 0,
+			entryType: '', // 进入做题页面的入口类型,daily-每日一练进来,其他的-题库做题进入
+			bankNum: 5, // 随机练习的题目数量
+			examName: '', // 试卷名称
 		};
 	},
 	onUnload() {},
@@ -181,6 +184,8 @@ export default {
 		
 	async onLoad(option) {
 		console.log(option)
+		this.entryType = option.entryType
+		this.bankNum = option.bankNum
 		this.orderGoodsId = option.orderGoodsId
 		this.recordId = option.id;
 		this.examId = option.examId;
@@ -190,9 +195,13 @@ export default {
 		
 		this.examWrongRecordWrongNum();
 		this.bankExamNextExam()
-		await this.bankExam();
+		// await this.bankExam();
 		await this.examReport();
-		
+		if (this.entryType == 'random') {
+			this.bankExamTemp()
+		} else {
+			await this.bankExam();
+		}
 	},
 	onPullDownRefresh() {
 		this.pageNum = 1
@@ -242,7 +251,7 @@ export default {
 								context1.fillText(this.reportdata.performance, caculateX * 90, caculateX * 90, caculateX * 180);
 								context1.setFillStyle('#999999');
 								context1.setFontSize(caculateX * 20);
-								context1.fillText(`满分${this.reportdata.totalScore}`, caculateX * 90, caculateX * 130, caculateX * 180);
+								context1.fillText(`满分${this.reportdata.totalScore || 0}`, caculateX * 90, caculateX * 130, caculateX * 180);
 								context1.arc(caculateX * 90, caculateX * 90, caculateX * 80, -Math.PI/2, -Math.PI/2 + (this.reportdata.performance / this.reportdata.totalScore) * 2 * Math.PI, false);
 								context1.stroke();
 								context1.draw();
@@ -288,7 +297,7 @@ export default {
 								context3.fillText((this.reportdata.performance + this.reportdata.score), caculateX * 90, caculateX * 90, caculateX * 180);
 								context3.setFillStyle('#999999');
 								context3.setFontSize(caculateX * 20);
-								context3.fillText(`满分${this.reportdata.totalScore}`, caculateX * 90, caculateX * 130, caculateX * 180);
+								context3.fillText(`满分${this.reportdata.totalScore || 0}`, caculateX * 90, caculateX * 130, caculateX * 180);
 								context3.arc(caculateX * 90, caculateX * 90, caculateX * 80, -Math.PI/2, -Math.PI/2 + ((this.reportdata.performance + this.reportdata.score) / this.reportdata.totalScore) * 2 * Math.PI, false);
 								context3.stroke();
 								context3.draw();
@@ -345,6 +354,10 @@ export default {
 			})
 		},
 		backBank() {
+			if (this.entryType == 'daily') {
+				uni.navigateBack()
+				return
+			}
 			uni.navigateTo({
 				url: '/pages2/bank/questionBank?orderGoodsId='+this.orderGoodsId+'&id=' +this.nextExamId + '&goodsid=' + this.goodsId + '&moduleId=' + this.moduleId + '&chapterId=' + this.chapterId + ''
 			});
@@ -357,6 +370,7 @@ export default {
 			// });
 		},
 		bankExam(){
+			// '/bank/exam/'+data
 			return new Promise(resolve =>{
 				this.$api.bankExam(this.examId).then(res => {
 					this.examData = res.data.data;
@@ -368,6 +382,10 @@ export default {
 		 * 去做题
 		 */
 		async doRepeat(id, goodsId, moduleId = 0, chapterId = 0) {
+			if (this.entryType == 'random') {
+				uni.navigateBack()
+				return
+			}
 			// await this.getDetail(goodsId);
 			let count = await this.examRecordCount(id, goodsId);
 			let answerNum = await this.getExamDetail(id);
@@ -381,7 +399,8 @@ export default {
 			var prepage = pages[pages.length - 2]; //上一个页面
 			prepage.$vm.isRepeat = true;
 			uni.redirectTo({
-				url: '/pages2/bank/questionBank?orderGoodsId='+this.orderGoodsId+'&id=' + id + '&goodsid=' + goodsId + '&moduleId=' + moduleId + '&chapterId=' + chapterId + ''
+				url: '/pages2/bank/questionBank?orderGoodsId='+this.orderGoodsId+'&id=' + id + '&goodsid=' + goodsId + '&moduleId=' + moduleId + '&chapterId=' + chapterId
+				+ '&entryType=' + this.entryType + '&bankNum=' + this.bankNum
 			});
 		},
 		/**
@@ -430,12 +449,24 @@ export default {
 			return new Promise(resolve => {
 				this.$api.examReport(this.recordId).then(res => {
 					this.reportdata = res.data.data;
+					if (this.entryType != 'random') {
+						this.examName = this.reportdata.examName
+					}
 					this.getCanvas()
 					resolve()
 				});
 				
 			})
-		}
+		},
+		bankExamTemp() {
+			// '/bank/exam/temp/'+data
+			this.$api.bankTempReport(this.examId).then(res => {
+				if (res.data.code == 200) {
+					this.examName = res.data.data.examName
+				}
+			});
+				
+		},
 	}
 };
 </script>
@@ -497,6 +528,9 @@ page {
 		font-size: 32rpx;
 		font-weight: bold;
 		color: #333333;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
 	}
 
 	.desc {

+ 3 - 1
pages2/class/questionBank.vue

@@ -5,7 +5,7 @@
       @clickLeft="clickLeft"
       left-icon="back"
       :statusBar="true"
-      title="试卷"
+      :title="examData.examName"
     ></uni-nav-bar>
     <swiper
       class="swiper"
@@ -886,6 +886,7 @@ export default {
       learning: -1, // 1合格,0不合格
       originShowDialog: false,
       uploadLock: false, //上传图片
+      examData: {},
     };
   },
   watch: {
@@ -1309,6 +1310,7 @@ export default {
     bankExam() {
       this.$api.bankExam(this.id).then((res) => {
         this.bankType = res.data.data.doType;
+        this.examData = res.data.data
         if (this.bankType == 2) {
           this.needBack = true;
         }

+ 561 - 0
pages2/dailyPractice/index.vue

@@ -0,0 +1,561 @@
+<template>
+    <view class="daily_practice">
+        <nav-bar title="每日一练"></nav-bar>
+        <template v-if="Object.keys(dayExamDetail).length">
+            <view class="content_up">
+                <view class="reminds">
+                    <view class="remind_lefts">
+                        <image src="/pages2/static/daily/logo_icon.png" class="logo_icon"></image>
+                        <view class="left_infos">
+                            <text class="one">订阅消息</text>
+                            <text class="two">开启订阅通知,每天打卡不错过</text>
+                        </view>
+                    </view>
+                    <view class="remind_rights">
+                        <!-- 1已订阅 0未订阅 -->
+                        <view class="subscription" @click="getSubscription()">{{ dayExamDetail.subscription == 1 ? '已订阅' : '订阅'}}</view>
+                    </view>
+                </view>
+                <view class="punch_days">
+                    <view class="print_day">
+                        <view class="print_left">
+                            <text class="one">打卡天数</text>
+                            <text class="two" v-if=" dayExamDetail.examRecord == 1">恭喜你,今天的打卡已完成</text>
+                            <text class="two" v-else>打卡进度超过了{{ dayExamDetail.recordPercentage || '0%' }}的学员</text>
+                        </view>
+                        <view class="print_right">
+                            <text class="nums">{{ dayExamDetail.recordCount || 0 }}</text>天
+                        </view>
+                    </view>
+                    <view class="middle_line">
+                        <view class="half_cir_left"></view>
+                        <view class="half_cir_rig"></view>
+                    </view>
+                    <view class="examNames">
+                        <view class="exam_name">{{ dayExamDetail.examName || '' }}</view>
+                        <image src="/pages2/static/daily/daily_one.png" class="daily_one"></image>
+                    </view>
+                    <view class="learn_btns">
+                        <view class="toLearn" @click="goPractice()">{{ dayExamDetail.examRecord == 1 ? '今日已完成' : '今日打卡' }}</view>
+                    </view>
+                </view>
+            </view>
+            <view class="contents">
+                <view class="c_title">打卡记录</view>
+                <view class="punch_calendar">
+                    <view class="card_box">
+                        {{ curYear + '年' + curMonth + '月'}}
+                    </view>
+                    <!-- <u-line color="#EEEEEE" /> -->
+                    <view class="weeks">
+                        <view v-for="(item, index) in weekLists" :key="index" class="card_date">{{ item }}</view>
+                    </view>
+                    <view class="day_dailys">
+                        <view v-for="(item, index) in date_num" :key="index" class="date_nums">
+                            <view class="date_items">
+                                <image v-if="item.sign" src="/pages2/static/daily/punch.png" class="pun_icon"></image>
+                                <text v-else>{{ item.date }}</text>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </template>
+        <template v-else>
+            <view class="no_datas">
+                <image src="/static/learn/empty_status.png" class="empty_status"></image>
+                <text class="word_tip">暂无每日一练</text>
+            </view>
+        </template>
+        <!-- 订阅消息弹窗 -->
+        <!-- :mask-close-able="false" -->
+        <u-popup class="modal" v-model="meassgeModal" mode="bottom" border-radius="24" >
+            <view class="message_box">
+                <view class="officials">
+                    <image src="/pages2/static/daily/logo_icon.png" class="offi_icon"></image>
+                    <text class="apply">祥粤云学堂申请</text>
+                </view>
+                <view class="titles">{{ dayExamDetail.subscription == 1 ? '不再订阅消息' : '发送以下消息' }}</view>
+                <view class="warns">
+                    <u-icon name="checkmark-circle-fill fill_icon" color="#01C65A" size="50"></u-icon>
+                    <text class="w_tips">每日刷题提醒</text>
+                </view>
+                <view class="bottons">
+                    <view class="cancel_btn btns" @click="cancel()">取消</view>
+                    <view class="confirm_btn btns" @click="confirm()">确定</view>
+                </view>
+            </view>
+        </u-popup>
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            weekLists: ['日','一','二','三','四','五','六'],
+			date_num: [],
+            curYear: 0, // 当前年份
+            curMonth: 0, // 当前月份
+            goodsId: '',
+            orderGoodsId: '',
+            dayExamDetail: {}, // 每日一练当天信息试卷
+            dayRecordList: [], // 每日一练试卷日历打卡记录
+            meassgeModal: false,
+            options: {},
+            timer: null,
+        }
+    },
+    onLoad(option) {
+        console.log('参数option:', option);
+        this.options = option
+        this.goodsId = option.goodsId
+        this.orderGoodsId = option.orderGoodsId
+    },
+    onShow() {
+        console.log('this.options:', this.options);
+        if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
+            return
+        }
+        console.log('onshow进来了');
+        this.initCalendar()
+        this.getToDayExam()
+        if (!this.timer) {
+            this.getLock()
+		    this.timer = setInterval(this.getLock, 10000)
+        }
+    },
+    onUnload() {
+		clearInterval(this.timer)
+		this.$api.lockDelLock({
+			action: 'bank',
+            uuid: this.$method.getUuid()
+		}).then(res => {
+		})
+	},
+    methods: {
+        getLock() {
+			this.$api.lockLockAction({
+				action: 'bank',
+				uuid: this.$method.getUuid()
+			}).then(res => {
+				
+			})
+		},
+        // 初始化当月日历
+        initCalendar() {
+            let date = new Date()
+			this.curYear = date.getFullYear() //获取当前年份
+			this.curMonth = date.getMonth() + 1 //获取当前月份
+			let dd = new Date(this.curYear, this.curMonth, 0) //获取当月总天数
+			let current_month = []
+			// let weekList = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
+			for (let i = 1; i <= dd.getDate(); i++) {
+				current_month.push({
+					date: i,
+					week: new Date(date.setDate(i)).getDay(),//获取对应日期的星期
+				});
+			}
+			if (current_month[0].week != 0) {
+				for (let index = 0; index < 2; index++) {
+					let item = {
+						date: '',
+						week: index
+					}
+					current_month.splice(index, 0, item)
+				}
+			}
+			this.date_num = current_month
+            this.getDailyRecord()
+        },
+        // 获取每日一练当天的试卷信息
+        getToDayExam() {
+            // ${this.goodsId || 990}
+            this.$http({
+				url: `/bank/question/getToDayExam/${this.goodsId}`,
+				method: 'get',
+			}).then((res) => {
+                if (res.data.code == 200) {
+                    this.dayExamDetail = res.data && res.data.data || {}
+                    console.log('dayExamDetail:', this.dayExamDetail);
+                }
+            })
+        },
+        // 获取每日一练试卷日历打卡记录
+        getDailyRecord() {
+            this.$http({
+                url: '/bank/question/get/special/record',
+                method: 'get',
+                data: {
+                    goodsId: this.goodsId,
+                }
+            }).then((res) => {
+                if (res.data.code == 200) {
+                    let data = res.data.data || []
+                    this.dayRecordList = data.map((item) => {
+                        let day = 0
+                        if (item.recordTime) {
+                            day = new Date(item.recordTime * 1000).getDate()
+                        }
+                        return {
+                            ...item,
+                            day: day
+                        }
+                    })
+                    if (this.dayRecordList.length) {
+                        this.date_num.forEach((item, index) => {
+                            let findV = this.dayRecordList.find(e => e.day == item.date)
+                            if (findV) {
+                                this.$set(this.date_num[index], 'sign', true)
+                            } else {
+                                this.$set(this.date_num[index], 'sign', false)
+                            }
+                            
+                        })
+                    }
+                }
+            })
+        },
+        goPractice() {
+            const { examId, moduleExamId = 0, chapterExamId = 0 } = this.dayExamDetail
+            uni.navigateTo({
+                url:'/pages2/bank/questionBank?orderGoodsId='+ this.orderGoodsId + '&id=' + examId + '&goodsid=' + this.goodsId 
+                +'&moduleId=' + moduleExamId + '&chapterId=' + chapterExamId + '&entryType=daily'
+            })
+        },
+        confirm() {
+            this.$http({
+                url: '/bank/question/today/exam/subscription',
+                method: 'post',
+                data: {
+                    goodsId: this.goodsId,
+                    orderGoodsId: this.orderGoodsId,
+                    subscriptionStatus: this.dayExamDetail.subscription == 0 ? 1 : 0,
+                }
+            }).then((res) => {
+                if (res.data.code == 200) {
+                    let msg = this.dayExamDetail.subscription == 0 ? '订阅成功' : '取消订阅成功'
+                    this.$u.toast(msg)
+                    this.meassgeModal = false
+                    let value = this.dayExamDetail.subscription == 0 ? 1 : 0
+                    this.$set(this.dayExamDetail, 'subscription', value)
+                } else {
+                    this.$u.toast('订阅失败,请重新订阅')
+                }
+            }).catch((err) => {
+                this.$u.toast('订阅失败,请重新订阅')
+            })
+        },
+        cancel() {
+            this.meassgeModal = false
+        },
+        // 订阅消息
+        getSubscription() {
+            this.meassgeModal = true
+            
+        },
+    },
+}
+</script>
+
+<style lang="scss">
+.daily_practice {
+    width: 100%;
+}
+.content_up {
+    width: 100%;
+    height: 646rpx;
+    background: linear-gradient(#3577E8, #FAFAFA);
+    padding: 0rpx 26rpx 0rpx;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    .reminds {
+        width: 100%;
+        height: 112rpx;
+        border-radius: 14rpx;
+        background-color: #fff;
+        padding: 0rpx 24rpx;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        margin-top: 38rpx;
+        margin-bottom: 26rpx;
+    }
+    .remind_lefts {
+        display: flex;
+        align-items: center;
+    }
+    .logo_icon {
+        width: 88rpx;
+        height: 88rpx;
+        margin-right: 16rpx;
+    }
+    .left_infos {
+        display: flex;
+        flex-direction: column;
+        .one {
+            font-size: 32rpx;
+            font-family: PingFang SC-Heavy, PingFang SC;
+            font-weight: 800;
+            color: #222222;
+            margin-bottom: 2rpx;
+        }
+        .two {
+            font-size: 24rpx;
+            font-family: PingFang SC-Medium, PingFang SC;
+            font-weight: 500;
+            color: #999999;
+        }
+    }
+    .subscription {
+        width: 136rpx;
+        height: 64rpx;
+        line-height: 64rpx;
+        text-align: center;
+        background: #07C160;
+        border-radius: 8rpx;
+        font-size: 28rpx;
+        font-family: PingFang SC-Heavy, PingFang SC;
+        font-weight: 800;
+        color: #FFFFFF;
+    }
+
+    .punch_days {
+        width: 100%;
+        height: 470rpx;
+        background-color: #fff;
+        border-radius: 16rpx;
+        .print_day {
+            padding: 40rpx 40rpx 6rpx 40rpx;
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+        }
+        .print_left {
+            display: flex;
+            flex-direction: column;
+            .one {
+                margin-bottom: 8rpx;
+                font-size: 36rpx;
+                font-weight: 800;
+                color: #556176;
+            }
+            .two {
+                font-size: 26rpx;
+                font-weight: 500;
+                color: #808DA4;
+            }
+        }
+        .print_right {
+            font-size: 28rpx;
+            font-weight: 500;
+            color: #222222;
+            .nums {
+                font-size: 76rpx;
+                font-family: DIN-Medium, DIN;
+                margin-right: 6rpx;
+            }
+        }
+        .middle_line {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            .half_cir_left {
+                width: 16rpx;
+                height: 32rpx;
+                border-radius: 0rpx 16rpx 16rpx 0rpx;
+                background: #D9D9D9;
+                opacity: 1;
+            }
+            .half_cir_rig {
+                width: 16rpx;
+                height: 32rpx;
+                border-radius: 16rpx 0rpx 0rpx 16rpx;
+                background: #D9D9D9;
+                opacity: 1;
+            }
+        }
+        .examNames {
+            width: 100%;
+            padding: 0rpx 24rpx 0rpx 40rpx;
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            .exam_name {
+                width: 440rpx;
+                font-size: 32rpx;
+                font-weight: 800;
+                color: #556176;
+                line-height: 38rpx;
+            }
+            .daily_one {
+                width: 160rpx;
+                height: 160rpx;
+            }
+        }
+        .learn_btns {
+            padding-left: 40rpx;
+            .toLearn {
+                width: 240rpx;
+                height: 88rpx;
+                line-height: 88rpx;
+                text-align: center;
+                background: #3577E8;
+                border-radius: 260rpx;
+                font-size: 30rpx;
+                font-weight: bold;
+                color: #FFFFFF;
+            }
+        }
+    }
+}
+
+.contents {
+    width: 100%;
+    height: 100%;
+    background-color: #FAFAFA;
+    padding: 0rpx 26rpx 100rpx 26rpx;
+    .c_title {
+        font-size: 32rpx;
+        font-weight: 500;
+        color: #222222;
+        margin-bottom: 34rpx;
+        padding-top: 56rpx;
+    }
+}
+.punch_calendar {
+    width: 100%;
+    background: #ffffff;
+	border-radius: 24rpx;
+	padding: 38rpx 34rpx 0rpx;
+    .card_box {
+        width: 100%;
+        font-size: 32rpx;
+        font-weight: 500;
+        color: #222222;
+    }
+    .t1 {
+        color: #007AFF;
+        font-size: 24rpx;
+    }
+    .weeks {
+        width: 100%;
+        display: flex;
+        justify-content:center;
+        margin-top: 32rpx;
+        margin-bottom: 24rpx;
+    }
+    .card_date {
+        width: 14%;
+        text-align: center;
+        color: #7f8caf;
+        font-size: 26rpx;
+        font-weight: 500;
+        color: #888691;
+    }
+    .day_dailys {
+        width: 100%;
+        display: flex;
+        margin-top: 40rpx;
+        flex-wrap: wrap;
+    }
+    .date_nums {
+        width: 14%;
+        text-align: center;
+        position: relative;
+        display: inline-block;
+        margin-bottom: 32rpx;
+        .date_items {
+            width: 100%; 
+        }
+        .pun_icon {
+            width: 48rpx;
+            height: 48rpx;
+        }
+    }   
+}
+// 订阅消息弹窗
+.message_box {
+    width: 100%;
+    height: 756rpx;
+    background-color: #fff;
+    padding: 64rpx 56rpx 0rpx;
+    .officials {
+        display: flex;
+        align-items: center;
+        margin-bottom: 48rpx;
+        .offi_icon {
+            width: 56rpx;
+            height: 56rpx;
+            margin-right: 56rpx;
+        }
+        .apply {
+            font-size: 32rpx;
+            font-weight: 500;
+            color: #222222;
+        }
+    }
+    .titles {
+        font-size: 36rpx;
+        font-weight: bold;
+        color: #222222;
+        margin-bottom: 48rpx;
+    }
+    .warns {
+        padding: 38rpx 0rpx;
+        border-top: 2rpx solid #E9E9E9;
+        border-bottom: 2rpx solid #E9E9E9;
+        display: flex;
+        align-items: center;
+        .w_tips {
+            margin-left: 24rpx;
+            font-size: 32rpx;
+            font-weight: 500;
+            color: #666666;
+        }
+    }
+    .bottons {
+        width: 100%;
+        display: flex;
+        justify-content: space-around;
+        margin-top: 160rpx;
+        .btns {
+            width: 252rpx;
+            height: 84rpx;
+            line-height: 84rpx;
+            text-align: center;
+            border-radius: 16rpx;
+            font-size: 36rpx;
+            font-weight: 500;
+        }
+        .confirm_btn {
+            background: #01C65A;
+            color: #FFFFFF;
+        }
+        .cancel_btn {
+            color: #01C65A;
+            background: #F1F1F1;
+        }
+    }
+}
+.no_datas {
+    width: 100%;
+    height: 100vh;
+    background-color: #FFFFFF;
+    display: flex;
+    align-items: center;
+    // justify-content: center;
+    flex-direction: column;
+    .empty_status {
+        width: 160rpx;
+        height: 160rpx;
+        margin-bottom: 14rpx;
+        margin-top: 300rpx;
+    }
+    .word_tip {
+        font-size: 30rpx;
+        color: #888691;
+    }
+}
+</style>

+ 1 - 1
pages2/learn/details.vue

@@ -207,7 +207,7 @@ export default {
         return "测试";
       }
       if (int === 1) {
-        return "录播";
+        return "视频";
       }
       if (int === 2) {
         return "直播";

+ 1 - 1
pages2/learn/menu.vue

@@ -23,7 +23,7 @@
 							<text slot="title" class="u-page__item__title__slot-title">2Z106010 施工承发包的模式-2Z106020 施工合同...</text>
 							<view class="u-collapse-content">
 								<view class="item" v-for="(item,index) in 7" :key="index">
-									<view class="tag">录播</view><!--默认蓝色,红色加red,黄色加yellow-->
+									<view class="tag">视频</view><!--默认蓝色,红色加red,黄色加yellow-->
 									<!-- <view class="yellow">回放</view> -->
 									<!-- <view class="red">直播</view> -->
 									<view class="info">施工承发包模式-施工合同与物资标题过长...</view>

+ 2 - 2
pages2/order/confirm_pay.vue

@@ -238,8 +238,8 @@ export default {
 			} else {
 				if(this.fromCart) {
 					
-					uni.switchTab({
-						url:'/pages/shopping/shoppingCart'
+					uni.navigateTo({
+						url:'/pages4/shopping/shoppingCart'
 					})
 				} else {
 					

+ 222 - 0
pages2/randomPractice/index.vue

@@ -0,0 +1,222 @@
+<template>
+    <view class="random_practice">
+        <nav-bar title="随机练习"></nav-bar>
+        <view class="contents">
+            <view class="exam_si">试卷情况</view>
+            <image src="/pages2/static/random/exam_situ.png" class="examSitu"></image>
+            <view class="nums">
+                <view class="n_item">
+                    <text class="do_num">{{ questionNum.doNum || 0 }}</text>
+                    <text class="word">已完成题数</text>
+                </view>
+                <view class="n_item">
+                    <text class="do_num">{{ questionNum.totalNum || 0 }}</text>
+                    <text class="word">总题数</text>
+                </view>
+                <view class="n_item">
+                    <text class="do_num">{{ accuracy }}</text>
+                    <text class="word">正确率</text>
+                </view>
+            </view>
+            <view class="number_crad">
+                <view class="title">选择做题数量</view>
+                <view class="crads">
+                    <view v-for="(item, index) in numberLists" :key="index" class="items"
+                     :class="{nactive: item == number}" @click="changeNum(item)">
+                        {{item}}
+                    </view>
+                </view>
+                <view class="starts" @click="startPractice()">
+                    开始做题
+                </view>
+            </view>
+            
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            goodsId: '',
+            orderGoodsId: '',
+            numberLists: [5, 10, 15, 20, 50, 100],
+            number: 5,
+            questionNum: {},
+            timer: null,
+        }
+    },
+    onLoad(option) {
+        this.goodsId = option.goodsId
+        this.orderGoodsId = option.orderGoodsId
+        this.getLock()
+		this.timer = setInterval(this.getLock, 10000)
+    },
+    onShow() {
+        this.getQuestionTempNum()
+    },
+    onUnload() {
+		clearInterval(this.timer)
+		this.$api.lockDelLock({
+			action: 'bank',
+            uuid: this.$method.getUuid()
+		}).then(res => {
+		})
+	},
+    computed: {
+        accuracy() {
+            if (this.questionNum.rightNum >= this.questionNum.totalNum) {
+                return '100%'
+            } else {
+                let value = (this.questionNum.rightNum / this.questionNum.totalNum ) * 100
+                return value.toFixed(2) + '%'
+            }
+        }
+    },
+    methods: {
+        getLock() {
+			this.$api.lockLockAction({
+				action: 'bank',
+				uuid: this.$method.getUuid()
+			}).then(res => {
+			})
+		},
+        changeNum(item) {
+            this.number = item
+        },
+        getQuestionTempNum() {
+            this.$http({
+                url: `/goods/bank/questionTempNum/${this.orderGoodsId}`,
+                method: 'get',
+            }).then((res) => {
+                if (res.data.code == 200) {
+                    this.questionNum = res.data.data || {}
+                }
+            })
+        },
+        startPractice() {
+            this.$http({
+                url: '/bank/exam/temp',
+                method: 'post',
+                data: {
+                    goodsId: this.goodsId,
+                    orderGoodsId: this.orderGoodsId,
+                    number: this.number
+                }
+            }).then((res) => {
+                if(res.data.code == 200) {
+                    uni.navigateTo({
+                        url:'/pages2/bank/questionBank?orderGoodsId='+ this.orderGoodsId + '&id=""' + '&goodsid=' + this.goodsId 
+                        +'&moduleId=0' + '&chapterId=0' + '&entryType=random' + '&bankNum=' + this.number
+                    })
+                } else {
+                    this.$u.toast(res.data.msg)
+                }
+            })
+            
+        }
+    },
+}
+</script>
+
+<style lang="scss">
+.random_practice {
+    width: 100%;
+    padding: 24rpx 26rpx;
+    background: #FAFAFA;
+}
+.contents {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    .examSitu {
+        width: 200rpx;
+        height: 200rpx;
+        margin-bottom: 56rpx;
+    }
+    .exam_si {
+        color: #222222;
+        font-size: 32rpx;
+        font-weight: bold;
+        margin: 80rpx 0rpx 40rpx 0rpx;
+    }
+    .nums {
+        width: 100%;
+        display: flex;
+        align-items: center;
+        justify-content: space-around;
+        margin-bottom: 132rpx;
+        .n_item {
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            .do_num {
+                font-size: 48rpx;
+                font-family: DIN-Medium, DIN;
+                font-weight: 500;
+                color: #222222;
+                margin-bottom: 8rpx;
+            }
+            .word {
+                font-size: 24rpx;
+                font-family: PingFang SC-Medium, PingFang SC;
+                font-weight: 500;
+                color: #808DA4;
+            }
+        }
+    }
+}
+
+.number_crad {
+    width: 100%;
+    padding: 0rpx 26rpx;
+    text-align: center;
+    background-color: #fff;
+    margin-bottom: 178rpx;
+    border-radius: 24rpx;
+    .title {
+        font-size: 36rpx;
+        font-family: PingFang SC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #222222;
+        margin: 56rpx 0rpx;
+    }
+    .crads {
+        display: flex;
+        flex-wrap: wrap;
+        justify-content: space-between;
+        .items {
+            width: 204rpx;
+            height: 96rpx;
+            line-height: 96rpx;
+            text-align: center;
+            background: #F8F8FA;
+            border-radius: 24rpx;
+            margin-bottom: 28rpx;
+            font-size: 48rpx;
+            font-family: DIN Alternate-Bold, DIN Alternate;
+            font-weight: bold;
+            color: #222222;
+            &.nactive {
+                background: #E8F6FF;
+                color: #3577E8;
+            }
+        }
+    }
+    .starts {
+        width: 646rpx;
+        height: 96rpx;
+        line-height: 96rpx;
+        text-align: center;
+        color: #fff;
+        font-size: 32rpx;
+        font-weight: bold;
+        background: #3577E8;
+        border-radius: 24rpx;
+        margin: 52rpx 0rpx 40rpx 0rpx;
+    }
+}
+</style>

+ 4 - 0
pages2/register/register.vue

@@ -391,10 +391,14 @@ export default {
 						code:this.form.code,
 						pwd:this.form.pwd
 						}
+					if (uni.getStorageSync('newUser_sc')) {
+						datas['shareCode'] = uni.getStorageSync('newUser_sc')
+					}
 					that.$api.registerUser(datas).then(
 						res => {
 							that.isUse = false
 							if (res.data.code == 200) {
+								uni.removeStorageSync('newUser_sc')
 								uni.showModal({
 									title: '提示',
 									content: '注册成功',

BIN
pages2/static/daily/daily_one.png


BIN
pages2/static/daily/logo_icon.png


BIN
pages2/static/daily/punch.png


BIN
pages2/static/random/exam_situ.png


+ 7 - 4
pages2/subject/collect.vue

@@ -39,10 +39,10 @@
 					<view class="bt">
 						<view class="left">收藏数<text class="num">{{item.questionNum}}</text></view>
 						<view class="right">
-							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?examId='+item.examId + '&distinction=1'">
+							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?examId='+item.examId + '&distinction=1' + '&doMode=' + item.doMode">
 								<view class="btn">重做</view>
 							</navigator>
-							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?examId='+item.examId+'&explain=1' + '&distinction=1'">
+							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?examId='+item.examId+'&explain=1' + '&distinction=1'+ '&doMode=' + item.doMode">
 								<view class="btn">解析</view>
 							</navigator>
 							<!-- <view class="btn">解析</view> -->
@@ -63,10 +63,10 @@
 					<view class="bt">
 						<view class="left">收藏数<text class="num">{{item.num}}</text></view>
 						<view class="right">
-							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?type='+item.type + '&distinction=2'">
+							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?type='+item.type + '&distinction=2'+ '&doMode=' + item.doMode">
 								<view class="btn">重做</view>
 							</navigator>
-							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?type='+item.type+'&explain=1' + '&distinction=2'">
+							<navigator  hover-class="none" :url="'/pages2/subject/collectBank?type='+item.type+'&explain=1' + '&distinction=2'+ '&doMode=' + item.doMode">
 								<view class="btn">解析</view>
 							</navigator>
 							<!-- <navigator  hover-class="none" :url="'/pages2/subject/collectTypeBank?type='+item.type + '&distinction=2'">
@@ -170,6 +170,9 @@ export default {
 			})
 		},
 		collectQuestionTypeList() {
+			// let params = {}
+			// this.paperid && (params['paperId'] = this.paperid)
+			// this.orderGoodsId && (params['orderGoodsId'])
 			this.$api.collectQuestionTypeList({
 				paperId:this.paperid,
 				orderGoodsId:this.orderGoodsId

+ 5 - 1
pages2/subject/collectBank.vue

@@ -736,15 +736,18 @@ export default {
       orderGoodsId: "",
       distinction: 1, // 1试卷归类,2题型归类
       subjectType: 0, // 题目类型
+      doMode: 1, 
     };
   },
   onLoad(option) {
     this.orderGoodsId = option.orderGoodsId || "";
-    const { examId, explain, type, distinction} = option
+    const { examId, explain, type, distinction, doMode} = option
     this.examId = examId
     this.explain = explain
     this.distinction = distinction
     this.subjectType = type
+    this.doMode = doMode || 1
+    // console.log('--doMode-', this.doMode);
     let showDialog = uni.getStorageSync("showDialog");
 
     if (showDialog) {
@@ -942,6 +945,7 @@ export default {
             questionId: bank.questionId,
             goodsId: bank.goodsId || "",
             orderGoodsId: bank.orderGoodsId,
+            doMode: this.doMode, //做题模式 1章卷 2随机练习
           })
           .then((res) => {
             if (res.data.code == 200) {

+ 7 - 5
pages2/wd/course.vue

@@ -80,17 +80,19 @@ export default {
     this.gradeId = Number(option.gid);
     this.orderGoodsId = Number(option.orderGoodsId);
     // 公众号模板消息的数据埋点
-    if (option.informId) { // 从公众号消息点击进来上报一次,其他地方进来和没登录需要跳到登录页,登录后返回的不需要上报
+    if (option.informId) {
       this.informId = option.informId
-      this.clickOfficial()
+      // this.clickOfficial()
     }
+    
+    this.$store.getters.dictObj;
+  },
+  onShow(option) {
     if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
       return;
     }
     this.courseCourseList();
-    this.$store.getters.dictObj;
-  },
-  onShow(option) {
+    this.informId && this.clickOfficial() // 从公众号消息点击进来上报一次
     if (this.itemIndex !== "") {
       this.refreshByIndex();
     }

+ 4 - 1
pages2/wd/free_bank.vue

@@ -62,12 +62,14 @@
 		},
 		onLoad(option) {
 			this.$api.lockLockAction({
+				uuid: this.$method.getUuid(),
 				action:'bank'
 			}).then(res => {
 				
 			})
 			this.timer = setInterval(() => {
 				this.$api.lockLockAction({
+					uuid: this.$method.getUuid(),
 					action:'bank'
 				}).then(res => {
 					
@@ -79,9 +81,10 @@
 		onUnload() {
 			clearInterval(this.timer)
 			this.$api.lockDelLock({
+				uuid: this.$method.getUuid(),
 				action:'bank'
 			}).then(res => {
-				
+				uni.hideLoading()
 			})
 			// websocket.sendMsg('delAction')
 		},

+ 3 - 1
pages2/wd/question_bank.vue

@@ -69,9 +69,10 @@
 		onUnload() {
 			clearInterval(this.timer)
 			this.$api.lockDelLock({
+				uuid: this.$method.getUuid(),
 				action:'bank'
 			}).then(res => {
-				
+				uni.hideLoading()
 			})
 			// websocket.sendMsg('delAction')
 		},
@@ -81,6 +82,7 @@
 		methods: {
 			getLock() {
 				this.$api.lockLockAction({
+					uuid: this.$method.getUuid(),
 					action:'bank'
 				}).then(res => {
 					

+ 5 - 2
pages3/course/detail.vue

@@ -279,8 +279,11 @@ export default {
 			for (let i = 0; i < arrs.length; i++) {
 				optObj[arrs[i].split('=')[0]] = arrs[i].split('=')[1]
 			}
+			// console.log('optObj:', optObj);
 			this.id = optObj.id
 			this.goodsType = optObj.goodsType
+			console.log('optObj.sc:', optObj.sc);
+			uni.setStorageSync('newUser_sc', optObj.sc)
 		} else {
 			// 小程序正常跳转的
 			// this.id => goodsId
@@ -697,8 +700,8 @@ export default {
 			this.current = index;
 		},
 		toShopcar() {
-			uni.switchTab({
-			    url: '/pages/shopping/shoppingCart'
+			uni.navigateTo({
+			    url: '/pages4/shopping/shoppingCart'
 			})
 		},
 		getIsBuy() {

+ 74 - 17
pages3/live/detail.vue

@@ -553,17 +553,23 @@
       v-model="noticeShow"
       class="notice_modal"
       mode="center"
-      border-radius="14"
-      width="700rpx"
-      height="900rpx"
+      border-radius="28"
+      width="650rpx"
+      height="622rpx"
+      :mask-close-able="false"
+      @close="closeNotice"
     >
       <div class="content">
-        <scroll-view scroll-y="true" style="height: 100%">
           <view class="title">学员须知</view>
-          <text class="text">
-            {{ goodsData.buyNote }}
-          </text>
-        </scroll-view>
+          <scroll-view scroll-y="true">
+            <view class="text" v-html="goodsData.buyNote && goodsData.buyNote.replace(/\n|\r\n/g, '<br>')">
+            </view>
+          </scroll-view>
+          <view class="had_read" :class="{'gray': CountTo >= 0}" @click="noticeConfirm()">
+            <text v-if="CountTo >= 0">请阅读学员须知,30s后可关闭</text>
+            <text v-else>我已阅读学员须知</text>
+            <text v-if="CountTo >= 0">{{ ' ' + CountTo + 's' }}</text>
+          </view>
       </div>
     </u-popup>
 		
@@ -749,12 +755,14 @@ export default {
       subList: [],
       subIndex: 0,
       compareFaceData: 0, // 拍照匹配相似度
+      CountTo: 30, // 倒计时
     };
   },
   computed: {
     ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
   },
   onLoad(option) {
+    console.log('--option--', option);
     this.options = option
     this.courseId = option.courseId || ''
     this.goodsId = Number(option.goodsId);
@@ -762,19 +770,20 @@ export default {
     this.orderGoodsId = Number(option.orderGoodsId) || '';
 
     // 公众号模板消息的数据埋点
-    if (option.informId) { // 从公众号消息点击进来上报一次,其他地方进来和没登录需要跳到登录页,登录后返回的不需要上报
+    if (option.informId) {
       this.informId = option.informId
-      this.clickOfficial()
+      // this.clickOfficial()
     }
-    
-    this.$store.getters.dictObj;
 
   },
   onShow() {
+    console.log('this.options:', this.options);
     if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
       return;
     }
     this.courseCourseList();
+    this.informId && this.clickOfficial() // 从公众号消息点击进来上报一次
+    this.$store.getters.dictObj;
     //相机授权
 		// this.userConfirmInfoDetail().then(res => {
 			
@@ -979,9 +988,12 @@ export default {
         clearInterval(this.lockTimer);
         this.$api
           .lockDelLock({
+            uuid: this.$method.getUuid(),
             action: "jxjy",
           })
-          .then((res) => {});
+          .then((res) => {
+            uni.hideLoading()
+          });
       }
     },
     changeCourses() {
@@ -1002,7 +1014,10 @@ export default {
       this.originOnMount()
     },
     clickLeft() {
-      uni.navigateBack()
+      // uni.navigateBack()
+      uni.switchTab({
+				url:'/pages/learn/index'
+			})
     },
 		/**
 		 * 获取上次观看的直播
@@ -1102,9 +1117,31 @@ export default {
 			}).then(res => {
 				let nowTime = Number(new  Date().getTime()/1000).toFixed(0)
 				// this.livingItem = res.data.data[0]
+        if (res.data.data) {
 				this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);
+        let isShowNotice = res.data.data.every(e => e.studyStatus == -1)
+          if (this.CountTo == 30 && isShowNotice) { // studyStatus 全部等于-1的时候就是没有看过
+            this.noticeShow = true
+            var timer = setInterval(() => {
+              this.CountTo--
+              if( this.CountTo < 0 ) {
+                clearInterval(timer)
+              }
+            }, 1000)
+          } else {
+            this.CountTo = -1
+          }
+      } else {
+        this.CountTo = -1
+      }
 			})
 		},
+    noticeConfirm() {
+      console.log('CountTo:', this.CountTo);
+      if (this.CountTo < 0) {
+        this.noticeShow = false
+      }
+    },
 		studyRecordGetChannelBasicInfo(channelId) {
 			return new Promise((resolve) => {
 				this.$api
@@ -3032,17 +3069,37 @@ page {
   .content {
     width: 100%;
     height: 100%;
-    padding: 20rpx;
+    padding: 56rpx 56rpx 56rpx 64rpx;
 
     .title {
-      color: #333;
+      color: #222;
       line-height: 40rpx;
-      font-size: 30rpx;
+      font-size: 36rpx;
       text-align: center;
       font-weight: bold;
+      margin-bottom: 24rpx;
     }
     .text {
+      height: 340rpx;
       line-height: 40rpx;
+      text-indent: 2em;
+      font-size: 32rpx;
+      color: #222;
+    }
+    .had_read {
+      width: 100%;
+      height: 88rpx;
+      line-height: 88rpx;
+      text-align: center;
+      background: #3577E8;
+      border-radius: 240rpx;
+      font-size: 32rpx;
+      font-weight: 500;
+      color: #fff;
+      margin-top: 20rpx;
+      &.gray {
+        background: #BBBEC5;
+      }
     }
   }
 }

+ 117 - 54
pages3/polyv/detail.vue

@@ -150,6 +150,7 @@
                 :menuItem="item"
                 :levelId="item.menuId"
                 :goodsType='1'
+                :menuAllList="menuAllList"
               ></courseModule
             ></view>
             <!--章 -->
@@ -169,6 +170,7 @@
                 :menuItem="item"
                 :levelId="'0-' + item.menuId"
                 :goodsType='1'
+                :menuAllList="menuAllList"
               ></courseChapter
             ></view>
             <!--节 -->
@@ -189,6 +191,7 @@
                 :levelId="'0-0-' + item.menuId"
                 :goodsType='1'
                 :testType="3"
+                :menuAllList="menuAllList"
               ></courseSection
             ></view>
             <!-- @togoBack="togoBack($event)" -->
@@ -532,19 +535,24 @@
     <u-popup
       v-model="noticeShow"
       class="notice_modal"
-			@close="closeNotice"
       mode="center"
-      border-radius="14"
-      width="700rpx"
-      height="900rpx"
+      border-radius="28"
+      width="650rpx"
+      height="622rpx"
+      :mask-close-able="false"
+      @close="closeNotice"
     >
       <div class="content">
-        <scroll-view scroll-y="true" style="height: 100%">
           <view class="title">学员须知</view>
-          <text class="text">
-            {{ goodsData.buyNote }}
-          </text>
-        </scroll-view>
+          <scroll-view scroll-y="true">
+            <view class="text" v-html="goodsData.buyNote && goodsData.buyNote.replace(/\n|\r\n/g, '<br>')">
+            </view>
+          </scroll-view>
+          <view class="had_read" :class="{'gray': CountTo >= 0}" @click="noticeConfirm()">
+            <text v-if="CountTo >= 0">请阅读学员须知,30s后可关闭</text>
+            <text v-else>我已阅读学员须知</text>
+            <text v-if="CountTo >= 0">{{ ' ' + CountTo + 's' }}</text>
+          </view>
       </div>
     </u-popup>
 		
@@ -599,7 +607,7 @@
                             <text> {{ item.stuAllNum + item.recordNum }}/{{ item.secAllNum + item.examNum}}</text>
                           </view>
                         </view>
-                        <view class="course_rights" @click="jump(item, index, 'jump')">
+                        <view class="course_rights" @click="jump(item, gTindex, 'jump')">
                           <view class="cicles">
                             <u-icon name="arrow-right" color="#498AFE" size="20"></u-icon>
                           </view>
@@ -742,6 +750,8 @@ export default {
       compareFaceData: 0, // 拍照匹配相似度
       prendreAutoCarme: false, // 是否发起授权相机
       studyTimer: null, // 学习记录定时器
+      CountTo: 30, // 倒计时
+      menuAllList: [],
     };
   },
   computed: {
@@ -766,7 +776,7 @@ export default {
     }
   },
   onLoad(option) {
-    console.log('index:--onLoad')
+    console.log('--option--', option);
     this.courseId = Number(option.id) || '';
     this.goodsId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId) || '';
@@ -775,39 +785,32 @@ export default {
 		this.option = option
 
     // 公众号模板消息的数据埋点
-    if (option.informId) { // 从公众号消息点击进来上报一次,其他地方进来和没登录需要跳到登录页,登录后返回的不需要上报
+    if (option.informId) {
       this.informId = option.informId
-      this.clickOfficial()
+      // this.clickOfficial()
     }
     
-    this.$store.getters.dictObj;
-  },
-  onReady() {
-    console.log('index:--onReady')
   },
   onShow() {
-    console.log('index:--onShow')
+    console.log('this.option:', this.option);
     if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
       return;
     }
+    console.log('onshow返回之后');
     this.courseCourseList();
+    this.informId && this.clickOfficial() // 从公众号消息点击进来上报一次
+    this.$store.getters.dictObj;
   },
   onUnload() {
-    console.log('index:--onUnload')
     this.originUnload()
   },
   onHide() {
-    console.log('index:--onHide')
     this.originUnload()
   },
   mounted() {
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
-    // 调用节的方法
-    // togoBack(value) {
-    //   this.$refs.MoudleSection[0].ModuleExam()
-    // },
     // 新增微信公众号模板消息点击数据
     clickOfficial() {
       this.$http({
@@ -816,6 +819,7 @@ export default {
         data: { informId: this.informId }
       }).then((res) => {
         if (res.data.code == 200) {
+          console.log('上报埋点');
         }
       })
     },
@@ -848,7 +852,7 @@ export default {
             }
           })
 					this.subList = [...allItem, ...newArr]
-          
+          console.log('this.courseList:', this.courseList, 'length:',res.data.rows.length);
           if (res.data.rows.length) {
             this.courseBusiness(res.data.rows[0].businessId)
           }
@@ -866,6 +870,7 @@ export default {
      * 获取业务层次详情
      */
     courseBusiness(businessId) {
+      // '/app/common/course/business/'+data,
       this.$api.courseBusiness(businessId).then((res) => {
         this.businessData = res.data.data
       });
@@ -961,7 +966,7 @@ export default {
             this.goodsTeacher.push(data)
           }) 
         }
-        // console.log(this.goodsTeacher,'this.goodsTeacher', this.courseId);
+        console.log(this.goodsTeacher,'this.goodsTeacher', this.courseId);
         this.goodsTeacher.forEach((item) => {
           if(item.courseList.some(x => x.courseId == this.courseId)){
             this.teacherList = item.teaList
@@ -1098,7 +1103,9 @@ export default {
             action: "jxjy",
             uuid:this.$method.getUuid()
           })
-          .then((res) => {});
+          .then((res) => {
+            uni.hideLoading()
+          });
       }
       uni.removeStorageSync('current')
     },
@@ -1123,26 +1130,11 @@ export default {
     },
     // 进入学习
     async jump(item, index, type) {
-      // console.log('item------>', index,item,'courseId:',item.courseId, 'goodsId:', this.goodsId, 'orderGoodsId:',item.orderGoodsId)
-      this.vid = ''
-      this.hasStart = true
-      await this.originUnload()
+      // console.log('item------>', index,item,this.goodsTeacher)
 
-      if (type) {
-        this.teacherIndex = 0
-        this.goodsTeacher.forEach((citem) => {
-            if(citem.courseList.some(x => x.courseId == item.courseId)){
-              this.teacherList = citem.teaList
-            }
-        })
-      }
-      this.reStart = false
-      this.courseId = item.courseId
-      this.gradeId = item.gradeId
-      this.toggleCourseShow = false
-      
-      
       if (index == 0) {
+        await this.nextCourses(item, type)
+
         if (item.rebuild === 0) {
           //未重修
           this.$navTo.togo("/pages2/learn/details", {
@@ -1191,9 +1183,10 @@ export default {
           //学习顺序是从头到尾学习,没学完上一课不能学习下一课
           let prevItem = this.courseList[index - 1]; //上一课
           if (
-            prevItem.stuAllNum + prevItem.recordNum ==
-            prevItem.secAllNum + prevItem.examNum
+            prevItem.stuAllNum == prevItem.secAllNum
           ) {
+            await this.nextCourses(item, type)
+
             if (item.rebuild === 0) {
               //未重修
               this.$navTo.togo("/pages2/learn/details", {
@@ -1243,6 +1236,7 @@ export default {
             });
           }
         } else {
+          await this.nextCourses(item, type)
           if (item.rebuild === 0) {
             //未重修
             this.$navTo.togo("/pages2/learn/details", {
@@ -1288,8 +1282,29 @@ export default {
         }
       }
     },
+    async nextCourses(item, type) {
+      this.vid = ''
+      this.hasStart = true
+      await this.originUnload()
+
+      if (type) {
+        this.teacherIndex = 0
+        this.goodsTeacher.forEach((citem) => {
+            if(citem.courseList.some(x => x.courseId == item.courseId)){
+              this.teacherList = citem.teaList
+            }
+        })
+      }
+      this.reStart = false
+      this.courseId = item.courseId
+      this.gradeId = item.gradeId
+      this.toggleCourseShow = false
+    },
     clickLeft() {
-      uni.navigateBack()
+      // uni.navigateBack()
+      uni.switchTab({
+				url:'/pages/learn/index'
+			})
     },
 		markCancel() {
 			uni.navigateBack({
@@ -1316,13 +1331,28 @@ export default {
 				
 			})
 		},
+    noticeConfirm() {
+      if (this.CountTo < 0) {
+        this.noticeShow = false
+      }
+    },
 		baseHandoutTipList() {
 			this.$api.baseHandoutTipList({
 				orderGoodsId:this.orderGoodsId
 			}).then(res => {
 				if(res.data.rows.length == 0) {
 					this.noticeShow = true;
-				}
+          if (this.CountTo == 30) {
+            var timer = setInterval(() => {
+              this.CountTo--
+              if( this.CountTo < 0 ) {
+                clearInterval(timer)
+              }
+            }, 1000)
+          }
+				} else {
+          this.CountTo = -1
+        }
 			})
 		},
 		/**
@@ -1545,6 +1575,7 @@ export default {
             });
         }
       } else {
+        console.log('--模块大节播放完毕,刷新列表-');
         //没有重修目录
         this.$api
           .reMenuList({ courseId: this.courseId, gradeId: this.gradeId ,orderGoodsId: this.orderGoodsId,})
@@ -1571,6 +1602,7 @@ export default {
 			})
 		},
 		studyRecordMenuAllList() {
+      // study/record/menuAllList
 			this.$api.studyRecordMenuAllList({
 				courseId:this.courseId,
 				gradeId:this.gradeId,
@@ -1579,7 +1611,8 @@ export default {
 				let nowTime = Number(new  Date().getTime()/1000).toFixed(0)
 				// this.livingItem = res.data.data[0]
         if (res.data.data) {
-				this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);
+          this.menuAllList = res.data.data
+				this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);          
         }
 			})
 		},
@@ -2382,6 +2415,7 @@ export default {
       this.$api.studyRecord(data).then((res) => {
         if (res.data.code == 200) {
           if (status > 0) {
+            this.studyRecordMenuAllList()
             let moduleId = this.moduleId || 0;
             let chapterId = this.chapterId || 0;
             let playNextIdisRebuild = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}isRebuild`;
@@ -2391,6 +2425,7 @@ export default {
               fromRebuild: this.isRebuild,
             }); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
             uni.$emit("playNext" + playNextId); //通知播放结束
+            console.log("playNext" + playNextIdisRebuild, '-----l', "playNext" + playNextId);
           }
 
           self.ossAvatarUrl = "";
@@ -2401,7 +2436,9 @@ export default {
             title: res.data.msg,
           });
         }
-      });
+      }).catch(err => {
+        this.studyRecordMenuAllList()
+      })
     },
     uploadFile(options, int) {
       var self = this;
@@ -2788,6 +2825,7 @@ export default {
     },
     getGoodsDetail() {
       let self = this;
+      // '/goods/'+ data,
       this.$api.goodsDetail(this.goodsId).then((res) => {
         this.goodsData = res.data.data;
 				if(self.goodsData.buyNote) {
@@ -2843,6 +2881,7 @@ export default {
         });
     },
     getReMenuList() {
+      console.log('重修的目录');
       let self = this;
       this.$api
         .reMenuList({
@@ -2860,6 +2899,7 @@ export default {
               item.name = item.menuName;
             }
             self.reMenuList = res.data.rows;
+            console.log('reMenuList:' , this.reMenuList);
             if (self.reMenuList.length > 0) {
               this.showNotes = false;
               self.list = [
@@ -2899,6 +2939,7 @@ export default {
         });
     },
     getMenuList() {
+      console.log('menuList的目录');
       let self = this;
       // /course/menuList 查询课程目录结构列表
       this.$api
@@ -2923,11 +2964,13 @@ export default {
                 break;
               }
             }
+            console.log('menuList: ---', this.menuList, 'menuIndex:', this.menuIndex);
           }
         });
     },
     courseDetail() {
       let self = this;
+      // '/course/'+data,
       this.$api.courseDetail(this.courseId).then((res) => {
         if (res.data.code == 200) {
           // if (res.data.data.educationName == "继续教育") {
@@ -3725,17 +3768,37 @@ page {
   .content {
     width: 100%;
     height: 100%;
-    padding: 20rpx;
+    padding: 56rpx 56rpx 56rpx 64rpx;
 
     .title {
-      color: #333;
+      color: #222;
       line-height: 40rpx;
-      font-size: 30rpx;
+      font-size: 36rpx;
       text-align: center;
       font-weight: bold;
+      margin-bottom: 24rpx;
     }
     .text {
+      height: 340rpx;
       line-height: 40rpx;
+      text-indent: 2em;
+      font-size: 32rpx;
+      color: #222;
+    }
+    .had_read {
+      width: 100%;
+      height: 88rpx;
+      line-height: 88rpx;
+      text-align: center;
+      background: #3577E8;
+      border-radius: 240rpx;
+      font-size: 32rpx;
+      font-weight: 500;
+      color: #fff;
+      margin-top: 20rpx;
+      &.gray {
+        background: #BBBEC5;
+      }
     }
   }
 }

+ 9 - 2
pages4/login/login.vue

@@ -116,6 +116,7 @@ export default {
 			codeTips: '',
 			isUse:false,
 			scanCode: '', // pc端扫码登录获取的标志码
+			newUser_sc: '', // 用户扫码进来详情页获取的sc
 			isBack:false
 		};
 	},
@@ -125,11 +126,15 @@ export default {
 		if(option.isBack){
 			this.isBack = option.isBack;
 		} 
+		console.log('登录后的this.isBack:', option.isBack, typeof this.isBack);
 		// else if (option.scanCode) {
 		// 	this.scanCode = option.scanCode
 		// }
 		// this.from = option.from; 
-		
+		if (uni.getStorageSync('newUser_sc')) {
+			this.newUser_sc = uni.getStorageSync('newUser_sc')
+		}
+		console.log('---this.newUser_sc:', this.newUser_sc);
 	},
 	onShow() {
 		// 获取code
@@ -149,7 +154,8 @@ export default {
 			this.$api.wxLogin({
 				code: this.code,
 				encryptedData: e.detail.encryptedData,
-				iv:  e.detail.iv
+				iv:  e.detail.iv,
+				shareCode: this.newUser_sc
 			}).then(res => {
 				if (res.data.code == 200) {
 					this.loginCallback(res, 'wxlogin')
@@ -351,6 +357,7 @@ export default {
 		loginCallback(res, types) {
 			console.log('登录页面:', this.isBack)
 			// if(res.data.data && res.data.data.full_info){
+				uni.removeStorageSync('newUser_sc')
 				//信息完善,直接进入页面
 				uni.setStorageSync('user_account', res.data.data.user_account);
 				uni.setStorageSync('token', res.data.data.token);

+ 0 - 1
pages/shopping/shoppingCart.vue → pages4/shopping/shoppingCart.vue

@@ -189,7 +189,6 @@ export default {
 			cAreaIndex: 0,
 			examIndex: 0,
 			current: 3,
-            tabbarlist: this.$store.state.tabLists
 		};
 	},
 	computed: { ...mapGetters(['userInfo','hideBuyState']) },

+ 6 - 5
pages5/liveDetail/course.vue

@@ -73,17 +73,18 @@ export default {
     this.gradeId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId);
     // 公众号模板消息的数据埋点
-    if (option.informId) { // 从公众号消息点击进来上报一次,其他地方进来和没登录需要跳到登录页,登录后返回的不需要上报
+    if (option.informId) {
       this.informId = option.informId
-      this.clickOfficial()
+      // this.clickOfficial()
     }
+    this.$store.getters.dictObj;
+  },
+  onShow() {
     if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
       return;
     }
     this.courseCourseList();
-    this.$store.getters.dictObj;
-  },
-  onShow() {
+    this.informId && this.clickOfficial() // 从公众号消息点击进来上报一次
     if (this.itemIndex !== "") {
       this.refreshByIndex();
     }

BIN
static/learn/empty_status.png


BIN
static/nav1.png


BIN
static/nav1_on.png


BIN
static/nav2.png


BIN
static/nav2_on.png


BIN
static/nav3.png


BIN
static/nav3_on.png


BIN
static/nav5.png


BIN
static/nav5_on.png


BIN
static/nav6.png


BIN
static/nav6_on.png


+ 1 - 33
store/index.js

@@ -27,38 +27,6 @@ const store = new Vuex.Store({
 		tabNums: 0, // '我的'右上角的数字
 		sysTime:0, //系统时间
 		scene: 0, //进入小程序的场景值
-		tabLists: [{
-			iconPath: "/static/nav1.png",
-			selectedIconPath: "/static/nav1_on.png",
-			text: '首页',
-			pagePath: "/pages/index/index"
-		},
-		{
-			iconPath: "/static/nav2.png",
-			selectedIconPath: "/static/nav2_on.png",
-			text: '选课',
-			pagePath: "/pages/course/index"
-		},
-		{
-			iconPath: "/static/nav6.png",
-			selectedIconPath: "/static/nav6_on.png",
-			text: '学习',
-			midButton: true,
-			pagePath: "/pages/learn/index"
-		},
-		{
-			iconPath: "/static/nav3.png",
-			selectedIconPath: "/static/nav3_on.png",
-			text: '购物车',
-			pagePath: "/pages/shopping/shoppingCart"
-		},
-		{
-			iconPath: "/static/nav5.png",
-			selectedIconPath: "/static/nav5_on.png",
-			text: '我的',
-			count: 0,
-			pagePath: "/pages/wd/index"
-		}]
 	},
 	getters: {
 		sysTime: state => {
@@ -129,7 +97,7 @@ const store = new Vuex.Store({
 			state.sysTime = time;
 		},
 		tabNum(state, nums) {
-			state.tabLists[4].count = nums
+			// state.tabLists[4].count = nums
 			// if (nums) {
 			// 	uni.setTabBarBadge({
 			// 		index: 4,