Browse Source

增加摄像头椭圆

chenxiong 3 years ago
parent
commit
f10c34bb5b
3 changed files with 18 additions and 3 deletions
  1. 5 1
      components/course/courseModule.vue
  2. 1 1
      pages2/class/questionBank.vue
  3. 12 1
      pages2/order/confirm_list.vue

+ 5 - 1
components/course/courseModule.vue

@@ -7,7 +7,7 @@
 		</view>
 		<view v-if="!down">
 			<view v-for="(itemM,indexM) in list" >
-				<courseChapter :courseId="courseId" :goodsId="goodsId" :isBuy="isBuy" :gradeId="gradeId" :isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId"></courseChapter>
+				<courseChapter :courseId="courseId" :learningOrder="learningOrder" :goodsId="goodsId" :isBuy="isBuy" :gradeId="gradeId" :isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId"></courseChapter>
 				<u-line v-if="indexM<list.length-1"></u-line>
 			</view>
 		</view>
@@ -19,6 +19,10 @@ import courseChapter from '@/components/course/courseChapter.vue';
 export default {
 	name: 'courseModule',
 	props: {
+		learningOrder:{ //是否设置学习顺序 1 设置 0不设置
+			type:String,
+			defaule:'0'
+		},
 		menuItem: {
 			type: Object,
 			default: {}

+ 1 - 1
pages2/class/questionBank.vue

@@ -467,7 +467,7 @@
 					<view style="width: 100%; height: 979rpx;position: fixed;" v-if="photoPopup">
 						<camera device-position="front" flash="off" @error="error" style="width: 100%; height: 100%;" ></camera>
 					</view>
-					<view class="custom"><image src="@/pages2/static/zhezhao.png" mode=""></image></view>
+					<view class="custom"><image src="/static/zhezhao.png" mode=""></image></view>
 				</view>
 				<view class="btnResult" @click="takePhoto">拍照</view>
 			</view>

+ 12 - 1
pages2/order/confirm_list.vue

@@ -52,7 +52,7 @@
 											<u-radio
 												shape="circle"
 												:name="index"
-												:disabled="item.studentNum == item.studentUpper"
+												:disabled="item.studentNum > 0 && item.studentNum == item.studentUpper"
 											>
 												<view :class="item.checked?'white-box blue-box':'white-box'" >
 													<view>
@@ -301,12 +301,23 @@ export default {
 			this.$api.goodsGradeList({goodsId:this.id}).then(res => {
 				if(res.data.code==200){
 					self.gradeList = res.data.rows
+					
 					if(self.gradeList.length==0){
 						let item = {
 							className:'系统分班',
 							gradeId:0
 						}
 						self.gradeList.push(item)
+					} else {
+						let isGradeFull = self.gradeList.every(item => (item.studentNum > 0 && item.studentNum == item.studentUpper))
+						//所有班级都满了
+						if(isGradeFull) {
+							let item = {
+								className:'系统分班',
+								gradeId:0
+							}
+							self.gradeList.unshift(item)
+						}
 					}
 				}
 			});