Эх сурвалжийг харах

Merge branch 'master' into feature-mycourse

chenxiong 3 жил өмнө
parent
commit
fc5b8c9971

+ 9 - 1
common/api.js

@@ -7,6 +7,10 @@ import system from './httpList/system.js'
 import goods from './httpList/goods.js'
 import business from './httpList/business.js'
 import course from './httpList/course.js'
+import grade from './httpList/grade.js'
+import base from './httpList/base.js'
+import apply from './httpList/apply.js'
+import systemPlan from './httpList/systemPlan.js'
 export default {
 	...login,
 	...polyvVideo,
@@ -16,5 +20,9 @@ export default {
 	...wxpay,
 	...goods,
 	...business,
-	...course
+	...course,
+	...grade,
+	...base,
+	...apply,
+	...systemPlan,
 }

+ 62 - 0
common/httpList/apply.js

@@ -0,0 +1,62 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//新增用户预约考试
+	addApply(data) {
+		return myRequest({
+			url: '/apply',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改用户预约考试
+	editApply(data) {
+		return myRequest({
+			url: '/apply/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//查询报考数据列表
+	getApplylist(data) {
+		return myRequest({
+			url: '/apply/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//点击预约报考按钮
+	getApplysubscribe(data) {
+		return myRequest({
+			url: '/apply/subscribe',
+			method: 'get',
+			data: data
+		})
+	},
+	//获得考试的考试地点
+	getApplysubscribeApplySite(data) {
+		return myRequest({
+			url: '/apply/subscribeApplySite',
+			method: 'get',
+			data: data
+		})
+	},
+	//获得考试的考培地点
+	getApplysubscribeApplySiteTrain(data) {
+		return myRequest({
+			url: '/apply/subscribeApplySiteTrain',
+			method: 'get',
+			data: data
+		})
+	},
+	//预约报考下一步按钮 1 进入有考陪有考试地点得预约考试 2进入无考陪有考试地点预约考试 3无考试次数购买商品
+	getApplysubscribeNext(data) {
+		return myRequest({
+			url: '/apply/subscribeNext',
+			method: 'get',
+			data: data
+		})
+	}
+	
+}

+ 27 - 0
common/httpList/base.js

@@ -0,0 +1,27 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	getProvinceList(data) {
+		return myRequest({
+			url: '/apply/areas/list',
+			method: 'get',
+			data: data
+		})
+	},
+	getCityList(data) {
+		return myRequest({
+			url: '/apply/areas/cityList',
+			method: 'get',
+			data: data
+		})
+	},
+	getExamine(data) {
+		return myRequest({
+			url: '/course/examine/list',
+			method: 'get',
+			data: data
+		})
+	}
+	
+}

+ 36 - 0
common/httpList/course.js

@@ -10,5 +10,41 @@ export default {
 			noToken: true
 		})
 	},
+	chapterList(data) {
+		return myRequest({
+			url: '/app/common/course/chapterList',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	sectionList(data) {
+		return myRequest({
+			url: '/app/common/course/sectionList',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	courseGoodsList(data) {
+		return myRequest({
+			url: '/course/goodsList',
+			method: 'get',
+			data: data
+		})
+	},
+	courseCourseList(data) {
+		return myRequest({
+			url: '/course/courseList',
+			method: 'get',
+			data: data
+		})
+	},
+	courseDetail(data) {
+		return myRequest({
+			url: '/course/'+data,
+			method: 'get'
+		})
+	}
 	
 }

+ 13 - 0
common/httpList/grade.js

@@ -0,0 +1,13 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	goodsGradeList(data) {
+		return myRequest({
+			url: '/grade/grade/list',
+			method: 'get',
+			data: data
+		})
+	}
+	
+}

+ 54 - 0
common/httpList/systemPlan.js

@@ -0,0 +1,54 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//新增学习计划
+	addsystemplan(data) {
+		return myRequest({
+			url: '/system/plan',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改学习计划
+	editsystemplan(data) {
+		return myRequest({
+			url: '/system/plan',
+			method: 'post',
+			data: data
+		})
+	},
+	//查询学习计划列表
+	getsystemplanlist(data) {
+		return myRequest({
+			url: '/system/plan/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//查询学员拥有商品能生成学习计划的商品
+	getsystemplanlistGoods(data) {
+		return myRequest({
+			url: '/system/plan/listGoods',
+			method: 'get',
+			data: data
+		})
+	},
+	//获得展示的日历学习计划,不添加到数据库
+	getsystemplanlistPlan(data) {
+		return myRequest({
+			url: '/system/plan/listPlan',
+			method: 'get',
+			data: data
+		})
+	},
+	//获取学习计划详细信息
+	systemplanInfo(data) {
+		return myRequest({
+			url: '/system/plan/' + data,
+			method: 'post',
+			data: data
+		})
+	}
+
+}

+ 4 - 1
common/methodTool.js

@@ -72,7 +72,7 @@ export default {
 		return Y + M + D + h + m + s;
 	},
 	//当前时间距离目标时间还有多久
-	GetRTime(EndTime) {
+	GetRTime(EndTime, isDay = true) {
 		var EndTime = EndTime //结束时间
 		var NowTime = new Date(); //当前时间
 		//后台给我的是10位 精确到秒的 所有下面我就除以了1000,不要小数点后面的
@@ -97,6 +97,9 @@ export default {
 		if (parseInt(s) < 10) {
 			s = "0" + s;
 		}
+		if (isDay) {
+			return d;
+		}
 		return d + '天' + h + '小时' + m + '分' + s + '秒'
 	},
 	TimeTotimestamp(date) {

+ 1 - 1
common/request.js

@@ -4,7 +4,7 @@
 import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
-export const BASE_URL = 'http://42.192.164.187:19005'//接口api
+export const BASE_URL = 'http://192.168.1.222:5055'//接口api
 export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'//图片上传api  'https://file.xyyxt.net/
 export const tenantId = '867735392558919680'
 export const myRequest = (options) => {

+ 1 - 1
manifest.json

@@ -75,7 +75,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx8295c6fa6b0b3106",
+        "appid" : "wxd0fac11d52c8808b",
         "setting" : {
             "urlCheck" : false,
             "postcss" : true,

+ 10 - 0
pages.json

@@ -477,6 +477,16 @@
 						"bounce": "none"
 					}
 				}
+			},
+			{
+				"path": "wd/course",
+				"style": {
+					"navigationBarTitleText": "所有课程",
+					"app-plus": {
+						"titleNView": false, //禁用原生导航栏 
+						"bounce": "none"
+					}
+				}
 			}
 		]/*,
 		 "plugins": {

+ 8 - 0
pages/course/index.vue

@@ -53,6 +53,7 @@
 							</view>
 						</view>
 					</navigator>
+					<view class="emptyTip" v-if="list2.length==0">暂未上架相关网课~</view>
 				</view>
 			</view>
 			<view v-show="current==1">
@@ -71,6 +72,7 @@
 							</view>
 						</view>
 					</navigator>
+					<view class="emptyTip" v-if="list2.length==0">暂未上架相关题库~</view>
 				</view>
 			</view>
 		</view>
@@ -305,6 +307,12 @@ export default {
 	
 </style>
 <style scoped>
+	.emptyTip{
+		color: #999999;
+		font-size: 32rpx;
+		text-align: center;
+		margin-top: 20%;
+	}
 	.popuBox{
 		top: 92px;
 		width: 100%;

+ 301 - 132
pages/shopping/shoppingCart.vue

@@ -9,6 +9,7 @@
 			<view style="padding: 30rpx;padding-bottom: 98rpx;">
 				<uni-swipe-action>
 				 <u-checkbox-group
+				 @change="checkboxGroupChange"
 				     placement="column">
 						  <view>
 				<uni-swipe-action-item :autoClose="false" @change="swipeChange($event, item)" :show="item.show" v-for="(item,index) in list" :key="index" >
@@ -37,10 +38,16 @@
 								</view>
 								
 							</view>
-							<u-line color="#D6D6DB" />
-							<view style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(index)">
-								<view style="color: #666666;font-size: 24rpx;margin-left: 60rpx;">选择班级</view>
-								<view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+							<view v-if="item.templateType!=null">
+								<u-line color="#D6D6DB" />
+								<view v-if="item.templateType=='class'" style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(0,item,index)">
+									<view style="color: #666666;font-size: 24rpx;">{{!item.gradObj.className?'选择班级':item.gradObj.className}}</view>
+									<view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+								</view>
+								<view v-if="item.templateType=='apply'"  style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(1,item,index)">
+									<view style="color: #666666;font-size: 24rpx;" >{{!item.applyAreas.areaName?'报考地区':item.examDate.examineName+'-'+item.applyAreas.areaName+'-'+item.applyAreas.cityName}}</view>
+									<view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+								</view>
 							</view>
 						</view>
 					</view>
@@ -75,83 +82,81 @@
 					</view>
 				</view>
 			</view>
-			
-			<u-popup v-model="show" mode="bottom"border-radius="40">
-				<view class="popup_box">
-					<view style="margin-bottom: 20rpx;">
-						<view class="line1"></view>
-						<view class="grade">选择班级</view>
-					</view>
-					<u-line color="#D6D6DB" />
-					<view>
-						<scroll-view scroll-y="true" style="height: 500rpx;">
-							<view>
-								<u-checkbox-group @change="checkboxGroupChange1">
-									<view v-for="(item, index) in list" :key="index" >
-										<view style="display: flex;align-items: center;padding: 20rpx;">
+		<u-popup v-model="show" mode="bottom"border-radius="40">
+			<view class="popup_box">
+				<view style="margin-bottom: 20rpx;">
+					<view class="line1"></view>
+					<view class="grade">选择班级</view>
+				</view>
+				<u-line color="#D6D6DB" />
+				<view>
+					<scroll-view scroll-y="true" style="height: 500rpx;">
+						<view>
+							<u-radio-group v-model="gradeValue" >
+								<view v-for="(item, index) in gradeList" :key="index" >
+									<view style="display: flex;align-items: center;padding: 20rpx;">
+										<view>
+											<u-radio
+												shape="circle"
+												:name="index"
+											></u-radio>
+										</view>
+										<view :class="item.checked?'white-box blue-box':'white-box'" >
 											<view>
-												<u-checkbox
-													shape="circle"
-													@change="checkboxChange1" 
-													v-model="item.checked" 
-													:name="item.name"
-												></u-checkbox>
-											</view>
-											<view :class="item.checked?'white-box blue-box':'white-box'" >
-												<view>
-													<view class="blackTxt">2021年第1期二级建造师继续教育选修课(市政)标题过长换行显示</view>
-													<view class="redTxt">有效期至:2021/11/30</view>
-													<view class="redTxt">本班还剩41天将结束学习</view>
-												</view>
+												<view class="blackTxt">{{item.className}}</view>
+												<view class="redTxt" v-if="item.classEndTime">有效期至:{{$method.timestampToTime(item.classEndTime)}}</view>
+												<view class="redTxt" v-if="item.classEndTime">本班还剩{{$method.GetRTime(item.classEndTime)}}天将结束学习</view>
 											</view>
 										</view>
 									</view>
-								</u-checkbox-group>
-							</view>
-						</scroll-view>
-					</view>
-					<view class="confrim-btn">
-						<view class="okBtn">确定</view>
-					</view>
-				</view>
-			</u-popup>
-			<u-popup v-model="show1" mode="bottom"border-radius="40">
-				<view class="popup_box">
-					<view style="margin-bottom: 20rpx;">
-						<view class="line1"></view>
-						<view class="grade">选择考期/地区</view>
-					</view>
-					<u-line color="#D6D6DB" />
-					<view style="display: flex;height: 500rpx;">
-						<view style="width: 50%;">
-							<view class="topTxt">考期</view>
-							<view>
-								<picker-view  :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
-									<picker-view-column>
-										<view class="picker-item" v-for="(item,index) in list1" :key="index">{{item.label}}</view>
-									</picker-view-column>
-								</picker-view>
-							</view>
+									<u-line color="#D6D6DB" />
+								</view>
+							</u-radio-group>
 						</view>
-						<view style="width: 50%;">
-							<view class="topTxt">地区</view>
-							<view>
-								<picker-view  :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
-									<picker-view-column>
-										<view class="picker-item" v-for="(item,index) in list2" :key="index">{{item.label}}</view>
-									</picker-view-column>
-									<picker-view-column>
-										<view class="picker-item" v-for="(item,index) in list3" :key="index">{{item.label}}</view>
-									</picker-view-column>
-								</picker-view>
-							</view>
+					</scroll-view>
+				</view>
+				<view class="confrim-btn">
+					<view class="okBtn" @click="okPopup(0)">确定</view>
+				</view>
+			</view>
+		</u-popup>
+		<u-popup v-model="show1" mode="bottom"border-radius="40">
+			<view class="popup_box">
+				<view style="margin-bottom: 20rpx;">
+					<view class="line1"></view>
+					<view class="grade">选择考期/地区</view>
+				</view>
+				<u-line color="#D6D6DB" />
+				<view style="display: flex;height: 500rpx;">
+					<view style="width: 50%;">
+						<view class="topTxt">考期</view>
+						<view>
+							<picker-view  :indicator-style="indicatorStyle" :value="value" @change="bindChangeE" class="picker-view">
+								<picker-view-column>
+									<view class="picker-item" v-for="(item,index) in examine" :key="index">{{item.examineName}}</view>
+								</picker-view-column>
+							</picker-view>
 						</view>
 					</view>
-					<view class="confrim-btn">
-						<view class="okBtn">确定</view>
+					<view style="width: 50%;">
+						<view class="topTxt">地区</view>
+						<view>
+							<picker-view  :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
+								<picker-view-column>
+									<view class="picker-item" v-for="(item,index) in provinceList" :key="index">{{item.areaName}}</view>
+								</picker-view-column>
+								<picker-view-column>
+									<view class="picker-item" v-for="(item,index) in cityList" :key="index">{{item.areaName}}</view>
+								</picker-view-column>
+							</picker-view>
+						</view>
 					</view>
 				</view>
-			</u-popup>
+				<view class="confrim-btn">
+					<view class="okBtn" @click="okPopup(1)">确定</view>
+				</view>
+			</view>
+		</u-popup>
 		</view>
 		<view v-show="!isLogin">
 			<view style="display: flex;align-items:center;flex-direction: column;margin-top: 40%;font-size: 32rpx;">
@@ -166,64 +171,31 @@
 	export default {
 		data() {
 			return {
+				gradeValue:-1,
 				isLogin:false,
 				allChecked:false,
 				checkboxValue1:[],
 				list: [
-				],
-				list1:[
-						{
-							value: '1',
-							label: '2021年6月'
-						},
-						{
-							value: '2',
-							label: '2021年7月'
-						}
-					],
-					list1:[
-						{
-							value: '1',
-							label: '2021年6月'
-						},
-						{
-							value: '2',
-							label: '2021年7月'
-						},
-						{
-							value: '3',
-							label: '2021年8月'
-						},
-						{
-							value: '4',
-							label: '2021年9月'
-						}
-					],
-					list2:[
-						{
-							value: '1',
-							label: '广东'
-						},
-						{
-							value: '2',
-							label: '北京'
-						}
-					],
-					list3:[
-						{
-							value: '1',
-							label: '广州'
-						},
-						{
-							value: '2',
-							label: '深圳'
-						}
-					],
-					value1:'',
+				],	
+				value1:'',
 				show:false,
 				show1:false,
 				totalPrice:0.00,
-				isOld:false
+				isOld:false,
+				checkboxList:[],
+				gradeList:[],
+				examine:[],
+				provinceList:[],
+				cityList:[],
+				detail:{},
+				detailIndex:-1,
+				applyObj:{
+					applyAreasJson:null,
+					examDateJson:null
+				},
+				pAreaIndex:0,
+				cAreaIndex:0,
+				examIndex:0,
 			}
 		},
 		onLoad(option) {
@@ -242,6 +214,173 @@
 			
 		},
 		methods: {
+			bindChangeE(e){
+				console.log(e.detail.value)
+				this.examIndex = e.detail.value[0]
+			},
+			bindChange(e) {
+				const val = e.detail.value
+				if(this.pAreaIndex!=e.detail.value[0]){
+					this.pAreaIndex = e.detail.value[0]
+					this.getCityList(this.provinceList[this.pAreaIndex].areaId)
+				}
+				if(this.cAreaIndex!=e.detail.value[1]){
+					this.cAreaIndex = e.detail.value[1]
+				}
+				
+			},
+			checkAreaData(){
+				if(this.examine.length==0){
+					uni.showModal({
+						title: "提示",
+						content: '请选择考期',
+						showCancel: false
+					})
+					return false
+				}
+				if(this.provinceList.length==0){
+					uni.showModal({
+						title: "提示",
+						content: '请选择报考地区',
+						showCancel: false
+					})
+					return false
+				}
+				if(this.cityList.length==0){
+					uni.showModal({
+						title: "提示",
+						content: '请选择报考地区',
+						showCancel: false
+					})
+					return false
+				}
+				return true
+			},
+			checkData(){
+				if(this.detail.templateType=='class'){
+					if(this.gradeValue<0){
+						uni.showModal({
+							title: "提示",
+							content: '请选择班级',
+							showCancel: false
+						})
+						return false
+					}
+				}
+				else if(this.detail.templateType=='apply'){
+					if(!this.applyObj.applyAreasJson){
+						uni.showModal({
+							title: "提示",
+							content: '请选择报考地区',
+							showCancel: false
+						})
+						return false
+					}
+					if(!this.applyObj.examDateJson){
+						uni.showModal({
+							title: "提示",
+							content: '请选择考期',
+							showCancel: false
+						})
+						return false
+					}
+				}
+				return true;
+			},
+			//弹出框确定
+			okPopup(index){
+				if(index==0){
+					if(!this.checkData()){
+						return
+					}
+					this.gradeIndex = this.gradeValue
+					this.list[this.detailIndex].gradObj = this.gradeList[this.gradeIndex] //商品赋值选中班级
+					this.show = false
+				}else{
+					if(!this.checkAreaData()){
+						return
+					}
+					this.examDate = this.examine[this.examIndex]
+					let pData = this.provinceList[this.pAreaIndex]
+					let cData = this.cityList[this.cAreaIndex]
+					this.applyAreas = {areaName:pData.areaName,areaId:pData.areaId,cityId:cData.areaId,cityName:cData.areaName}
+				//	this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas)
+				//	this.applyObj.examDateJson = JSON.stringify(this.examDate)
+					this.list[this.detailIndex].examDate = this.examDate //商品赋值选中考期地区
+					this.list[this.detailIndex].applyAreas = this.applyAreas //商品赋值选中考期地区
+					this.show1 = false
+				}
+			},
+			getExamine(id) {
+				let self = this
+				this.$api.getExamine({projectId:id}).then(res => {
+					if(res.data.code==200){
+						self.examine = res.data.rows
+					}
+				});
+			},
+			getCityList(id) {
+				let self = this
+				this.$api.getCityList({parentId:id}).then(res => {
+					if(res.data.code==200){
+						self.cityList = res.data.rows
+					}
+				});
+			},
+			getProvinceList() {
+				let self = this
+				if(self.provinceList.length>0){
+					return
+				}
+				this.$api.getProvinceList().then(res => {
+					if(res.data.code==200){
+						self.provinceList = res.data.rows
+						if(self.provinceList.length>0){
+							self.getCityList(self.provinceList[0].areaId)
+						}
+						
+					}
+				});
+			},
+			goodsGradeList(goodsId) {
+				let self = this
+				this.$api.goodsGradeList({goodsId:goodsId}).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)
+						}
+					}
+				});
+			},
+			openPopup(index,item,itemIndex){
+				this.detail = item
+				this.detailIndex = itemIndex
+				if(index==0){
+					this.gradeValue = -1
+					this.show = true
+					this.goodsGradeList(item.goodsId)
+				}else{
+					this.applyObj={
+						applyAreasJson:null,
+						examDateJson:null
+					}
+					this.pAreaIndex=0,
+					this.cAreaIndex=0,
+					this.examIndex=0,
+					this.show1 = true
+					this.getProvinceList()
+					this.getExamine(item.projectId)
+				}
+				
+			},
+			checkboxGroupChange(e){
+				this.checkboxList = e
+			},
 			countPrice(list){
 				
 			},
@@ -256,6 +395,7 @@
 				let self = this
 				this.allChecked = false
 				this.totalPrice = 0.00
+				this.checkboxList =[]
 				this.$api.cartList().then(res => {
 					if(res.data.code==200){
 						for (let i = 0; i < res.data.rows.length; i++) {
@@ -267,6 +407,9 @@
 								item.disabled = false
 							}
 							item.show = false
+							item.gradObj = {} //存储班级
+							item.applyAreas = {} 
+							item.examDate = {} 
 						}
 						self.list = res.data.rows
 					}
@@ -284,6 +427,38 @@
 				item.show = e;
 			},
 			goBuy(){
+				if(this.checkboxList.length==0){
+					uni.showModal({
+						title: "提示",
+						content: '请选择商品',
+						showCancel: false
+					})
+					return 
+				}
+				for(let i =0;i<this.checkboxList.length;i++){
+					let index = this.checkboxList[i]
+					let item = this.list[index]
+					if(item.templateType=='class'){
+						if(!item.gradObj.className){
+							uni.showModal({
+								title: "提示",
+								content: '请选择班级',
+								showCancel: false
+							})
+							return false
+						}
+					}
+					if(item.templateType=='apply'){
+						if(!item.applyAreas.areaName){
+							uni.showModal({
+								title: "提示",
+								content: '请选择报考地区',
+								showCancel: false
+							})
+							return false
+						}
+					}
+				}
 				this.$navTo.togo('/pages2/order/confirm_pay');
 			},
 			checkboxChange(n) {
@@ -294,24 +469,19 @@
 					this.totalPrice -= this.list[n.name].standPrice
 				}
 			},
-			openPopup(index){
-				if(index==0){
-					this.show = true
-				}else{
-					this.show1 = true
-				}
-				
-			},
 			checkboxAllChange(n){
 				this.totalPrice = 0.00
+				this.checkboxList = []
 				if(n.value){
 					for(let i =0;i<this.list.length;i++){
 						this.list[i].checked = true
 						this.totalPrice += this.list[i].standPrice
+						this.checkboxList.push(i)
 					}
 				}else{
 					for(let i =0;i<this.list.length;i++){
 						this.list[i].checked = false
+						
 					}
 				}
 			}
@@ -371,7 +541,6 @@
 	}
 	.white-box{
 		width: 646rpx;
-		height: 220rpx;
 		border-radius: 24rpx;
 		align-items: center;
 		display: flex;

+ 3 - 3
pages/wd/index.vue

@@ -13,7 +13,7 @@
 		<view  v-if="isLogin" class="loginBox">
 			<view style="width: 100%;height: 40px;background-color: #F0F1F5;position: fixed;top: 150px;z-index: 100;"></view>
 			<view style="display: flex;height: 160rpx;align-items: center; position: fixed;z-index: 999;top: 110px;" v-if="isLogin">
-				<image  :src="$method.splitImgHost(userInfo.avatar, true)" class="avatar"></image>
+				<image  :src="userInfo?$method.splitImgHost(userInfo.avatar, true):''" class="avatar"></image>
 				<view style="margin-left: 20rpx;z-index: 999;">
 					<view style="color: #FFFFFF;font-size: 36rpx;padding: 10rpx;">{{userInfo.realname}}</view>
 					<view style="color: #333333;font-size: 36rpx;padding: 10rpx;">{{userInfo.telphone}}</view>
@@ -30,7 +30,7 @@
 						今天有 <text style="color: #007AFF;margin: 0 5rpx;">3</text> 个学习任务
 					</view>
 				</navigator>
-				<view class="menu_box">
+				<navigator url="/pages2/learn/my_learn" class="menu_box">
 					<view style="display: flex;align-items: center;">
 						<image src="/static/icon/my_icon2.png" class="my_icon"></image>
 						<view>我的学时</view>
@@ -38,7 +38,7 @@
 					<view>
 						累计<text style="color: #007AFF;margin: 0 5rpx;">3</text> 学时未通过
 					</view>
-				</view>
+				</navigator>
 				<view class="two_menu">
 					<navigator url="/pages2/wd/class" class="small_menu">
 						<image src="/static/icon/my_icon3.png" class="my_icon"></image>

+ 86 - 67
pages2/appointment/index.vue

@@ -2,48 +2,50 @@
 	<view class="safeArea">
 		<view class="appointment">
 			<view class="appointmentItem appointmentHead">
-				<view class="imgBox">
-					<image src="/static/login_bg.jpg"></image>
-				</view>
+				<view class="imgBox"><image :src="$method.splitImgHost(listData.splitImgHost)"></image></view>
 				<u-line color="#EEEEEE" />
-				<view class="title">这是一个考试标题过长换行过长换行过长换行过长换行过长换行</view>
+				<view class="title">{{ listData.applyName }}</view>
 			</view>
 			<view class="appointmentItem appointmentTime">
 				<view class="item">
 					<view class="labelName">报名时间:</view>
-					<view class="valName">2021/12/1 ~ 2021/12/31</view>
+					<view class="valName">{{ $method.timestampToTime(listData.applyStartTime) }} ~ {{ $method.timestampToTime(listData.applyEndTime) }}</view>
 				</view>
 				<u-line color="#EEEEEE" />
 				<view class="item">
 					<view class="labelName">温馨提示:</view>
-					<view class="valName">预约开放期登录CCMS,进入主页,显示预核准的已报科目考试,点击预约考试科目,按流程选择考试考点、具体考试时间,提交完成。</view>
+					<view class="valName">{{ listData.applyIntroduce }}</view>
 				</view>
 			</view>
 			<view class="appointmentItem appointmentMajor">
 				<view class="top">
 					<view class="labelName">报考专业:</view>
-					<view class="valName">XXX专业名称XXX</view>
+					<view class="valName">{{ listData.major }}</view>
 				</view>
 			</view>
 			<view class="appointmentItem appointmentInfo">
-				<view class="item"><text class="labelName">姓<text style="opacity: 0;">姓</text>名:</text>倪虹洁</view>
+				<view class="item">
+					<text class="labelName">
+						姓
+						<text style="opacity: 0;">姓</text>
+						名:
+					</text>
+					{{ listData.realname }}
+				</view>
 				<u-line color="#EEEEEE" />
-				<view class="item"><text class="labelName">身份证:</text>44046354687236685698</view>
+				<view class="item">
+					<text class="labelName">身份证:</text>
+					{{ listData.idCard }}
+				</view>
 			</view>
 			<view class="appointmentItem appointmentType">
 				<view class="item">
 					<view class="labelName">学员类型:</view>
 					<u-radio-group placement="column">
-					   <u-radio
-					     :customStyle="{marginBottom: '8px'}"
-					     v-for="(item, index) in radiolist"
-					     :key="index"
-					     :label="item.name"
-					     :name="item.name"
-					     @change="radioChange"
-					   >{{item.name}}
-					   </u-radio>
-					 </u-radio-group>
+						<u-radio :customStyle="{ marginBottom: '8px' }" v-for="(item, index) in radiolist" :key="index" :label="item.label" :name="item.name" @change="radioChange">
+							{{ item.name }}
+						</u-radio>
+					</u-radio-group>
 				</view>
 			</view>
 			<view class="btn" @click="next">下一步</view>
@@ -59,7 +61,7 @@
 					<view class="item">请先购买补考机会。</view>
 				</view>
 				<view class="btn">
-					<view class="btn1 cancel" @click="showTip=false">知道了</view>
+					<view class="btn1 cancel" @click="showTip = false">知道了</view>
 					<view class="btn1 submit" @click="submit">马上缴费</view>
 				</view>
 			</view>
@@ -73,47 +75,64 @@ export default {
 	data() {
 		return {
 			showTip: false,
-			radiolist: [{name: '非补考学员'},{name: '补考学员'}]
+			radiolist: [{ name: '非补考学员', label: '1' }, { name: '补考学员', label: '2' }],
+			goodsId: 0,
+			gradeId: 0,
+			applyStatus:'',
+			listData: {} //页面数据
 		};
 	},
-	onLoad(option) {},
+	onLoad(option) {
+		this.goodsId = Number(option.goodsId);
+		this.gradeId = Number(option.gradeId);
+		this.getInfo();
+	},
 	methods: {
-		radioChange(e){
-			console.log(e)
+		getInfo() {
+			var data = {
+				goodsId: this.goodsId,
+				gradeId: this.gradeId
+			};
+			this.$api.getApplysubscribe(data).then(res => {
+				console.log(res.data, 123);
+				this.listData = res.data.data;
+			});
+		},
+		radioChange(e) {
+			console.log(e);
 		},
-		next(){
-			this.showTip = true
+		next() {
+			this.showTip = true;
 		},
-		submit(){
+		submit() {
 			this.$navTo.togo('/pages2/appointment/order');
 		}
-	},
-
+	}
 };
 </script>
-<style >
-page{
-	background-color: #EAEEF1;
+<style>
+page {
+	background-color: #eaeef1;
 }
-.appointmentType .u-radio__label{
-	margin-left:16rpx!important;
-	margin-right: 116rpx!important;;
+.appointmentType .u-radio__label {
+	margin-left: 16rpx !important;
+	margin-right: 116rpx !important;
 }
-.tipModel .u-mode-center-box{
-	background-color: transparent!important;
+.tipModel .u-mode-center-box {
+	background-color: transparent !important;
 }
 </style>
 <style scoped lang="scss">
-.appointment{
+.appointment {
 	padding: 16rpx;
-	.appointmentItem{
-		background: #FFFFFF;
+	.appointmentItem {
+		background: #ffffff;
 		border-radius: 16rpx;
 		margin-bottom: 16rpx;
-		.item{
+		.item {
 			padding: 24rpx 0;
 		}
-		.labelName{
+		.labelName {
 			font-size: 28rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
@@ -121,97 +140,97 @@ page{
 			margin-bottom: 16rpx;
 			line-height: 1;
 		}
-		.valName{
+		.valName {
 			font-size: 30rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
 			color: #333333;
 		}
 	}
-	.appointmentHead{
+	.appointmentHead {
 		padding-top: 16rpx;
-		.imgBox{
+		.imgBox {
 			width: 590rpx;
 			height: 232rpx;
 			margin: 0 auto;
 			background: #ccc;
 			overflow: hidden;
 		}
-		.title{
-			padding:24rpx 28rpx 31rpx 31rpx;
+		.title {
+			padding: 24rpx 28rpx 31rpx 31rpx;
 			font-size: 30rpx;
 			font-weight: bold;
 			font-family: PingFang SC;
 			color: #333333;
 		}
 	}
-	.appointmentTime{
+	.appointmentTime {
 		padding: 10rpx 30rpx 0;
 	}
-	.appointmentMajor{
+	.appointmentMajor {
 		padding: 34rpx 30rpx 24rpx;
 	}
-	.appointmentInfo{
+	.appointmentInfo {
 		padding: 8rpx 30rpx;
 	}
-	.appointmentType{
+	.appointmentType {
 		padding: 8rpx 30rpx 4rpx;
-		.u-radio__label{
-			margin-left:16rpx;
+		.u-radio__label {
+			margin-left: 16rpx;
 			margin-right: 116rpx;
 		}
 	}
-	.btn{
+	.btn {
 		width: 526rpx;
 		height: 80rpx;
 		line-height: 80rpx;
-		background: #007AFF;
+		background: #007aff;
 		border-radius: 40rpx;
 		font-size: 30rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
-		color: #FFFFFF;
+		color: #ffffff;
 		margin: 40rpx auto;
 		text-align: center;
 	}
 }
-.tipBox{
+.tipBox {
 	width: 640rpx;
 	padding: 30rpx 36rpx 40rpx;
-	background: #FFFFFF;
+	background: #ffffff;
 	border-radius: 24rpx;
 	font-family: PingFang SC;
-	.title{
+	.title {
 		text-align: center;
 		font-size: 30rpx;
 		font-weight: bold;
 		color: #333333;
 		margin-bottom: 40rpx;
 	}
-	.main{
+	.main {
 		font-size: 30rpx;
 		font-weight: 500;
 		color: #666666;
 		line-height: 48rpx;
 		margin-bottom: 40rpx;
 	}
-	.btn{
+	.btn {
 		display: flex;
 		justify-content: center;
-		.btn1{
+		.btn1 {
 			width: 200rpx;
 			height: 80rpx;
 			line-height: 80rpx;
 			text-align: center;
-			background: #F5F5F5;
+			background: #f5f5f5;
 			border-radius: 40px;
 			font-size: 30rpx;
 			font-weight: bold;
-			color: #007AFF;
+			color: #007aff;
 			margin: 0 20rpx;
-			&.submit{
-				background: #007AFF;
-				color:#fff;
+			&.submit {
+				background: #007aff;
+				color: #fff;
 			}
 		}
 	}

+ 42 - 30
pages2/class/detail.vue

@@ -11,7 +11,7 @@
 			<view >
 				<u-row>
 					<u-col span="10" >
-						<view class="video_t1">施工承发包模式-施工合同与物资采购合...</view>
+						<view class="video_t1">{{detail.courseName}}</view>
 					</u-col>
 					<u-col span="2">
 						<view class="video_t1_t">
@@ -34,39 +34,15 @@
 				<view class="menuBox" v-for="(item, index) in menuList">
 					<!--模块 -->
 					<view v-if="item.type==1">
-						<view class="b_title">
-							2Z106000 施工合同管理-模块标题
-						</view>
-						<view style="color: #666666;font-size: 24rpx;margin: 30rpx 0;" v-for="(item1, index1) in item.list">
-							<u-icon :name="item1.showChildren?'arrow-down':'arrow-right'" color="#666666" size="28" @click="open(item1)"></u-icon>
-							<text @click="open(item1)">2Z106010 施工承发包的模式-2Z106020 施工合同...</text>
-							<view v-for="(item2, index2) in item1.children" v-if="item1.showChildren" >
-								<view style="display: flex;align-items: center;margin: 20rpx 0;">
-									<view class="tag1">录播</view>
-									<view class="t_content1">施工承发包模式-施工合同与物资采购合同</view>
-								</view>
-							</view>
-						</view>
+						<courseModule  :menuItem="item"></courseModule>
 					</view>
 					<!--章 -->
 					<view v-if="item.type==2">
-						<u-icon :name="item.showChildren?'arrow-down':'arrow-right'" color="#666666" size="28" @click="open(item)"></u-icon>
-						<text @click="open(item1)">2Z106010 施工承发包的模式-2Z106020 施工合同...</text>
-						<view v-for="(item2, index2) in item.list" v-if="item.showChildren">
-							<view style="display: flex;align-items: center;margin: 20rpx 0;">
-								<view class="tag1">录播</view>
-								<view class="t_content1">施工承发包模式-施工合同与物资采购合同</view>
-							</view>
-						</view>
+						<courseChapter  :menuItem="item"></courseChapter>
 					</view>
 					<!--节 -->
 					<view v-if="item.type==3">
-						<view v-for="(item2, index2) in item.list" >
-							<view style="display: flex;align-items: center;margin: 20rpx 0;">
-								<view class="tag1">录播</view>
-								<view class="t_content1">施工承发包模式-施工合同与物资采购合同</view>
-							</view>
-						</view>
+						<courseSection  :menuItem="item"></courseSection>
 					</view>
 				</view>
 			</view>
@@ -137,10 +113,20 @@
 </template>
 
 <script>
+import courseModule from '@/pages2/components/course/courseModule.vue';
+import courseChapter from '@/pages2/components/course/courseChapter.vue';
+import courseSection from '@/pages2/components/course/courseSection.vue';
 import { mapGetters } from 'vuex';
 export default {
+	components: {
+		courseModule,
+		courseChapter,
+		courseSection
+	},
 	data() {
 		return {
+			detail:{},
+			courseId:0,
 			placeholder:"您可以在这里输入笔记内容\n还可以点击左侧图标为笔记加上时间标记",
 			inputStyle:{
 				background: 'rgba(244, 244, 244, 0.98)',
@@ -188,7 +174,8 @@ export default {
 					list:[{},{}]
 				}
 			],
-			current:0
+			current:0,
+			menuList:[]
 		};
 	},
 	onUnload() {
@@ -196,12 +183,37 @@ export default {
 	},
 	computed: { ...mapGetters(['userInfo']) },
 	onLoad(option) {
-
+		this.courseId = option.id
+		this.courseDetail()
+		this.getMenuList()
+		console.log(this.courseId,66)
 	},
 	onShow() {
 		
 	},
 	methods: {
+		getMenuList() {
+			let self = this
+			this.$api.menuList({courseId:this.courseId}).then(res => {
+				if(res.data.code==200){
+					for(let i=0;i<res.data.rows.length;i++){
+						let item = res.data.rows[i]
+						item.down = true
+						item.id = item.menuId
+						item.name = item.menuName
+					}
+					self.menuList = res.data.rows
+				}
+			});
+		},
+		courseDetail() {
+			let self = this
+			this.$api.courseDetail(this.courseId).then(res => {
+				if(res.data.code==200){
+					self.detail = res.data.data
+				}
+			});
+		},
 		open(item){
 			item.showChildren = !item.showChildren
 		},

+ 87 - 0
pages2/components/course/courseChapter.vue

@@ -0,0 +1,87 @@
+<template>
+	<view style="margin: 20rpx 0;">
+		<view class="title" @click="openChapter(menuItem)">
+		<image src="/static/icon/up1.png" class="icon_up" v-if="down"></image>
+		<image src="/static/icon/down1.png" class="icon_up" v-if="!down"></image>
+		<text style="margin-left: 30rpx;">{{menuItem.name}}</text>
+		</view>
+		<view v-if="!down">
+			<view v-for="(itemM,indexM) in list" >
+				<courseSection  :menuItem="itemM"></courseSection>
+				<u-line v-if="indexM<list.length-1"></u-line>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+import courseSection from '@/pages2/components/course/courseSection.vue';
+export default {
+	name: 'courseChapter',
+	props: {
+		menuItem: {
+			type: Object,
+			default: {}
+		}
+	},
+	components: {
+		courseSection
+	},
+	data() {
+		return {
+			down:true,
+			list:[]
+	
+		};
+	},
+	onLoad() {},
+	created() {
+		
+	},
+	mounted() {
+		
+	},
+	methods: {
+		openChapter(item){
+			this.down = !this.down
+			if(!this.down&&this.list.length==0){
+				this.getSectionList(item.id)
+			}
+		},
+		getSectionList(chapterId) {
+			let self = this
+			this.$api.sectionList({chapterId:chapterId}).then(res => {
+				if(res.data.code==200){
+					for(let i=0;i<res.data.data.length;i++){
+						let item = res.data.data[i]
+						item.id = item.sectionId
+						//判断是否试听
+						item.tryListen = false
+						if(self.goodsAuditionConfigIdList.indexOf(item.id)!==-1){
+							item.tryListen = true
+						}	
+					}
+					self.list = res.data.data
+				}
+			});
+		},
+	},computed: { ...mapGetters(['goodsAuditionConfigIdList']) },
+};
+</script>
+
+<style scoped>
+	.icon_up{
+		width: 24rpx;
+		height: 24rpx;
+	}
+.title{
+	font-size: 24rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #666666;
+	white-space:nowrap;
+	overflow:hidden;
+	text-overflow:ellipsis; 
+}
+</style>

+ 81 - 0
pages2/components/course/courseModule.vue

@@ -0,0 +1,81 @@
+<template>
+	<view style="margin: 20rpx 0;">
+		<view class="title" @click="openModule(menuItem)">
+		<image src="/static/icon/up1.png" class="icon_up" v-if="down"></image>
+		<image src="/static/icon/down1.png" class="icon_up" v-if="!down"></image>
+		<text style="margin-left: 10rpx;">{{menuItem.name}}</text>
+		</view>
+		<view v-if="!down">
+			<view v-for="(itemM,indexM) in list" >
+				<courseChapter  :menuItem="itemM"></courseChapter>
+				<u-line v-if="indexM<list.length-1"></u-line>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import courseChapter from '@/pages2/components/course/courseChapter.vue';
+export default {
+	name: 'courseModule',
+	props: {
+		menuItem: {
+			type: Object,
+			default: {}
+		}
+	},
+	components: {
+		courseChapter
+	},
+	data() {
+		return {
+			 down:true,
+			 list:[]
+		};
+	},
+	onLoad() {},
+	created() {
+		
+	},
+	mounted() {
+		
+	},
+	methods: {
+		openModule(item){
+			this.down = !this.down
+			if(!this.down&&this.list.length==0){
+				this.getChapterList(item.id)
+			}
+		},
+		getChapterList(moduleId) {
+			let self = this
+			this.$api.chapterList({moduleId:moduleId}).then(res => {
+				if(res.data.code==200){
+					for(let i=0;i<res.data.data.length;i++){
+						let item = res.data.data[i]
+						item.id = item.chapterId
+						
+					}
+					self.list = res.data.data
+				}
+			});
+		},
+	}
+};
+</script>
+
+<style scoped>
+	.icon_up{
+		width: 24rpx;
+		height: 24rpx;
+	}
+.title{
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #333333;
+	white-space:nowrap;
+	overflow:hidden;
+	text-overflow:ellipsis; 
+}
+</style>

+ 106 - 0
pages2/components/course/courseSection.vue

@@ -0,0 +1,106 @@
+<template>
+	<view style="display: flex;justify-content: space-between;align-items: center;">
+		<view style="display: flex;align-items: center;margin: 20rpx 0;">
+			<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">
+				<view>{{menuItem.name}}</view>
+				<view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.liveStartTime">
+					<view v-if="menuItem.liveStartTime>nowTime">
+						<text>{{$method.timestampToTime(menuItem.liveStartTime)}}</text>-
+						<text>{{$method.timestampToTime(menuItem.liveEndTime)}}</text>
+					</view>
+					<view v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
+						<text>直播中</text>
+					</view>
+					<view v-if="menuItem.liveEndTime<nowTime">
+						<text>回放</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view v-if="menuItem.tryListen" class="tryBox">
+			试看
+		</view>
+	</view>
+</template>
+
+<script>
+
+export default {
+	name: 'courseSection',
+	props: {
+		menuItem: {
+			type: Object,
+			default: {}
+		}
+	},
+	data() {
+		return {
+			nowTime:0
+		};
+	},
+	onLoad() {},
+	created() {
+		
+	},
+	mounted() {
+		this.nowTime = Number(new  Date().getTime()/1000).toFixed(0)
+	},
+	methods: {
+		
+	}
+	
+};
+</script>
+
+<style scoped>
+	.tryBox{
+		width: 96rpx;
+		height: 48rpx;
+		background: #007AFF;
+		border-radius: 24rpx;
+		color: #FFFFFF;
+		font-size: 30rpx;
+		line-height: 48rpx;
+		text-align: center;
+	}
+	.icon_up{
+		width: 24rpx;
+		height: 24rpx;
+	}
+	.t_content3{
+		color: #007AFF;
+	}
+	.t_content2{
+		color: #007AFF;
+	}
+	.t_content1{
+		color: #007AFF;
+	}
+	.t_content{
+		margin-left: 10rpx;
+		color: #666666;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis; 
+	}
+	.tagColor3{
+		border: 2rpx solid #FF9500;
+		color: #FF9500;
+	}
+	.tagColor2{
+		border: 2rpx solid #FF3B30;
+		color: #FF3B30;
+	}
+	.tagColor1{
+		border: 2rpx solid #007AFF;
+		color: #007AFF;
+	}
+	.tag{
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		padding: 5rpx;
+	}
+</style>

+ 86 - 31
pages2/course/detail.vue

@@ -1,10 +1,10 @@
 <template>
 	<view>
-		<view style="background-color: #FFFFFF;">
+		<view class="videoBox" >
 			<view >
-				<image :src="$method.splitImgHost(detail.coverUrl)" style="height: 461rpx;width: 100%;"></image>
-				<view style="padding:20rpx">
-					<view style="display: flex;margin-top: 13rpx;">
+				<image :src="$method.splitImgHost(detail.coverUrl)" style="height: 460rpx;width: 100%;"></image>
+				<view style="padding:20rpx;height: 120rpx;">
+					<view style="display: flex;">
 						<view class="yearTag">{{detail.year}}</view>
 						<view class="titleTag">{{detail.goodsName}}</view>
 					</view>
@@ -16,29 +16,37 @@
 				</view>
 			</view>
 			<u-line color="#D6D6DB" />
-			<view>
+			<view style="height: 80rpx;">
 				<view style="width: 160px;margin: 0 auto;"><u-tabs :list="list" item-width="150" font-size="24" bar-width="110" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
 			</view>
-			<u-line color="#D6D6DB" />
+			
 		</view>
-		<view style="padding: 20rpx;" v-show="current==0">
+		<view style="padding: 20rpx;position: relative;top: 680rpx;" v-show="current==0">
 			<view class="content">
 				<view v-html="detail.mobileDetailHtml"></view>
 			</view>
 		</view>
-		<view style="padding: 20rpx;" v-show="current==1">
+		<view style="padding: 20rpx;padding-bottom: 100rpx;position: relative;top: 680rpx;" v-show="current==1">
 			<view >
 				<view v-for="(item,index) in courseList" >
-					<view class="courseItem" @click="openCourse(item)">
-						<view>{{item.courseName}}</view>
-						<view>
-							<u-icon name="arrow-down" v-if="item.down"></u-icon>
-							<u-icon name="arrow-up" v-if="!item.down"></u-icon>
+					<view class="courseItemBox" >
+						<view class="courseItem" @click="openCourse(item)">
+							<view class="courseName">{{item.courseName}}</view>
+							<view>
+								<image src="/static/icon/up.png" class="icon_up" v-if="item.down"></image>
+								<image src="/static/icon/down.png" class="icon_up" v-if="!item.down"></image>
+							</view>
+						</view>
+						<view v-show="!item.down">
+							<view v-for="(itemM,indexM) in menuList" >
+								<courseModule v-if="itemM.type==1" :menuItem="itemM"></courseModule>
+								<courseChapter v-if="itemM.type==2" :menuItem="itemM"></courseChapter>
+								<courseSection v-if="itemM.type==3" :menuItem="itemM"></courseSection>
+								<u-line></u-line>
+							</view>
 						</view>
 					</view>
-					<view v-if="item.down">
-						
-					</view>
+					
 				</view>
 			</view>
 		</view>
@@ -46,15 +54,23 @@
 			<view class="priceTag">¥ {{detail.standPrice}}</view>
 			<view style="display: flex;color: #FFFFFF;align-items: center;">
 				<view class="btn1" @click="addCart">加购物车</view>
-				<view class="btn2" @click="buy">立即购买</view>
+				<view class="btn2" @click="buy">立即购买 </view>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+import courseModule from '@/pages2/components/course/courseModule.vue';
+import courseChapter from '@/pages2/components/course/courseChapter.vue';
+import courseSection from '@/pages2/components/course/courseSection.vue';
 import { mapGetters } from 'vuex';
 export default {
+	components: {
+		courseModule,
+		courseChapter,
+		courseSection
+	},
 	data() {
 		return {
 			id:0,
@@ -68,13 +84,14 @@ export default {
 			],
 			current:0,
 			detail:{},
-			courseList:[]	
+			courseList:[],
+			menuList:[]
 		};
 	},
 	onUnload() {
 		
 	},
-	computed: { ...mapGetters(['userInfo']) },
+	computed: { ...mapGetters(['userInfo','goodsAuditionConfigIdList']) },
 	onLoad(option) {
 		this.id = option.id;
 		this.getDetail()
@@ -86,8 +103,8 @@ export default {
 	methods: {
 		openCourse(item){
 			item.down = !item.down
-			if(!item.down){
-				this.menuList(item.courseId)
+			if(!item.down&&this.menuList.length==0){
+				this.getMenuList(item.courseId)
 			}
 			
 		},
@@ -108,7 +125,6 @@ export default {
 			let self = this
 			this.$api.goodsCourseList(this.id).then(res => {
 				if(res.data.code==200){
-					
 					for(let i=0;i<res.data.rows.length;i++){
 						let item = res.data.rows[i]
 						item.down = true
@@ -117,21 +133,41 @@ export default {
 				}
 			});
 		},
-		menuList(courseId) {
+		getMenuList(courseId) {
 			let self = this
 			this.$api.menuList({courseId:courseId}).then(res => {
 				if(res.data.code==200){
-					
-					console.log(res.data)
+					for(let i=0;i<res.data.rows.length;i++){
+						let item = res.data.rows[i]
+						item.down = true
+						item.id = item.menuId
+						item.name = item.menuName
+						
+						if(item.type==3){
+							//判断是否试听
+							item.tryListen = false
+							if(self.goodsAuditionConfigIdList.indexOf(item.id)!==-1){
+								item.tryListen = true
+							}	
+						}
+					}
+					self.menuList = res.data.rows
 				}
 			});
 		},
 		getDetail() {
 			let self = this
+			let sectionIdList = []
 			this.$api.goodsDetail(this.id).then(res => {
 				if(res.data.code==200){
 					self.detail = res.data.data
-					console.log(self.detail.mobileDetailHtml)
+					if(self.detail.goodsAuditionConfig){
+						let configList = JSON.parse(self.detail.goodsAuditionConfig)
+						for (var itemChild of configList) {
+							sectionIdList.push(itemChild.sectionId)//存储试听节ID
+						}
+						self.$store.commit('setGoodsAuditionConfigIdList', {goodsAuditionConfigIdList:sectionIdList});
+					}
 				}
 			});
 		},
@@ -139,7 +175,7 @@ export default {
 			if(this.$method.isGoLogin()){
 				return
 			}
-			this.$navTo.togo('/pages2/order/confirm_list');
+			this.$navTo.togo('/pages2/order/confirm_list?id='+this.id);
 		},
 		addCart(){
 			if(this.$method.isGoLogin()){
@@ -162,21 +198,40 @@ export default {
 	}
 </style>
 <style scope>
+	.courseName{
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis; 
+	}
+	.videoBox{
+		position: fixed;
+		background-color: #FFFFFF;
+		width: 100%;
+		height: 680rpx;
+		z-index: 999;
+	}
+	.icon_up{
+		width: 32rpx;
+		height: 32rpx;
+	}
 	.contentBox{
 		
 	}
-	.courseItem{
-		width: 100%;
-		height: 80rpx;
+	.courseItemBox{
 		background: #FFFFFF;
 		border-radius: 16rpx;
+		padding: 0 10rpx;
+		margin-bottom: 20rpx;
+	}
+	.courseItem{
+		height: 80rpx;
 		color: #333333;
 		font-size: 32rpx;
 		line-height: 80rpx;
 		font-weight: bold;
-		padding: 0 10rpx;
 		display: flex;
 		justify-content: space-between;
+
 	}
 	.content{
 		background-color: #FFFFFF;

+ 1 - 1
pages2/learn/details.vue

@@ -9,7 +9,7 @@
 				<u-line color="#EEEEEE" />
 				<view class="info">
 					<view class="item" v-for="item in 7">
-						<view class="imgbox"><image src="@/static/intro.png" style="width:100%" mode="heightFix"></image></view>
+						<view class="imgbox"><image src="@/static/wd_bg.png" style="width:100%" mode="heightFix"></image></view>
 						<view class="time">2021/10/25 14:25:20</view>
 					</view>
 				</view>

+ 205 - 107
pages2/order/confirm_list.vue

@@ -1,30 +1,35 @@
 <template>
 	<view>
 		<view style="padding: 30rpx;padding-bottom: 98rpx;">
-			<view v-for="(item,index) in list" :key="index" >
+			<view  >
 				<view class="item">
 					<view style="display: flex;justify-content: space-between;padding-bottom: 15rpx;">
-						<image src="/static/login_bg.jpg" style="height: 134rpx;width: 388rpx;border-radius: 16rpx;"></image>
+						<image :src="$method.splitImgHost(detail.coverUrl)" style="height: 134rpx;width: 278rpx;border-radius: 16rpx;"></image>
 						<view style="margin-left: 20rpx;">
 							<view style="color: #333333;font-size: 30rpx;font-weight: bold;">
-								2020年二建建筑工程管理与实
-								务(实务专题班)
+								{{detail.goodsName}}
 							</view>
 							<view class="priceTag">
-								¥ 999.00
+								¥ {{detail.standPrice}}
 							</view>
 						</view>
 					</view>
-					<u-line color="#D6D6DB" />
-					<view style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(index)">
-						<view style="color: #666666;font-size: 24rpx;">选择班级</view>
-						<view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+					<view v-if="detail.templateType!=null">
+						<u-line color="#D6D6DB" />
+						<view v-if="detail.templateType=='class'" style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(0)">
+							<view style="color: #666666;font-size: 24rpx;">{{gradeIndex<0?'选择班级':gradeList[gradeIndex].className}}</view>
+							<view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+						</view>
+						<view v-if="detail.templateType=='apply'"  style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(1)">
+							<view style="color: #666666;font-size: 24rpx;" >{{!applyAreas.areaName?'报考地区':examDate.examineName+'-'+applyAreas.areaName+'-'+applyAreas.cityName}}</view>
+							<view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+						</view>
 					</view>
 				</view>
 			</view>
 		</view>
 		<view class="bottomBox safeArea">
-			<view class="priceTag">¥ 999.00</view>
+			<view class="priceTag">¥ {{detail.standPrice}}</view>
 			<view style="display: flex;color: #FFFFFF;align-items: center;">
 				<view class="btn2" @click="goBuy()">确认购买</view>
 			</view>
@@ -40,32 +45,30 @@
 				<view>
 					<scroll-view scroll-y="true" style="height: 500rpx;">
 						<view>
-							<u-checkbox-group @change="checkboxGroupChange">
-								<view v-for="(item, index) in list" :key="index" >
+							<u-radio-group v-model="gradeValue" @change="radioGroupChange">
+								<view v-for="(item, index) in gradeList" :key="index" >
 									<view style="display: flex;align-items: center;padding: 20rpx;">
 										<view>
-											<u-checkbox
+											<u-radio
 												shape="circle"
-												@change="checkboxChange" 
-												v-model="item.checked" 
-												:name="item.name"
-											></u-checkbox>
+												:name="index"
+											></u-radio>
 										</view>
 										<view :class="item.checked?'white-box blue-box':'white-box'" >
 											<view>
-												<view class="blackTxt">2021年第1期二级建造师继续教育选修课(市政)标题过长换行显示</view>
-												<view class="redTxt">有效期至:2021/11/30</view>
-												<view class="redTxt">本班还剩41天将结束学习</view>
+												<view class="blackTxt">{{item.className}}</view>
+												<view class="redTxt" v-if="item.classEndTime">有效期至:{{$method.timestampToTime(item.classEndTime)}}</view>
+												<view class="redTxt" v-if="item.classEndTime">本班还剩{{$method.GetRTime(item.classEndTime)}}天将结束学习</view>
 											</view>
 										</view>
 									</view>
 								</view>
-							</u-checkbox-group>
+							</u-radio-group>
 						</view>
 					</scroll-view>
 				</view>
 				<view class="confrim-btn">
-					<view class="okBtn">确定</view>
+					<view class="okBtn" @click="okPopup(0)">确定</view>
 				</view>
 			</view>
 		</u-popup>
@@ -80,9 +83,9 @@
 					<view style="width: 50%;">
 						<view class="topTxt">考期</view>
 						<view>
-							<picker-view  :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
+							<picker-view  :indicator-style="indicatorStyle" :value="value" @change="bindChangeE" class="picker-view">
 								<picker-view-column>
-									<view class="picker-item" v-for="(item,index) in list1" :key="index">{{item.label}}</view>
+									<view class="picker-item" v-for="(item,index) in examine" :key="index">{{item.examineName}}</view>
 								</picker-view-column>
 							</picker-view>
 						</view>
@@ -92,17 +95,17 @@
 						<view>
 							<picker-view  :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
 								<picker-view-column>
-									<view class="picker-item" v-for="(item,index) in list2" :key="index">{{item.label}}</view>
+									<view class="picker-item" v-for="(item,index) in provinceList" :key="index">{{item.areaName}}</view>
 								</picker-view-column>
 								<picker-view-column>
-									<view class="picker-item" v-for="(item,index) in list3" :key="index">{{item.label}}</view>
+									<view class="picker-item" v-for="(item,index) in cityList" :key="index">{{item.areaName}}</view>
 								</picker-view-column>
 							</picker-view>
 						</view>
 					</view>
 				</view>
 				<view class="confrim-btn">
-					<view class="okBtn">确定</view>
+					<view class="okBtn" @click="okPopup(1)">确定</view>
 				</view>
 			</view>
 		</u-popup>
@@ -118,80 +121,35 @@ export default {
 	},
 	data() {
 		return {
+			gradeValue:-1,
+			gradeIndex:-1,
+			id:0,
 			indicatorStyle: `height: 50px;`,
 			showArea:true,
 			show1:false,
-			list:[{
-					name: 'apple',
-					checked: false,
-					disabled: false
-				},
-				{
-					name: 'banner',
-					checked: false,
-					disabled: false
-				},
-				{
-					name: 'orange',
-					checked: false,
-					disabled: false
-				}],
-				list1:[
-					{
-						value: '1',
-						label: '2021年6月'
-					},
-					{
-						value: '2',
-						label: '2021年7月'
-					}
-				],
-				list1:[
-					{
-						value: '1',
-						label: '2021年6月'
-					},
-					{
-						value: '2',
-						label: '2021年7月'
-					},
-					{
-						value: '3',
-						label: '2021年8月'
-					},
-					{
-						value: '4',
-						label: '2021年9月'
-					}
-				],
-				list2:[
-					{
-						value: '1',
-						label: '广东'
-					},
-					{
-						value: '2',
-						label: '北京'
-					}
-				],
-				list3:[
-					{
-						value: '1',
-						label: '广州'
-					},
-					{
-						value: '2',
-						label: '深圳'
-					}
-				],
-				value1:'',
-			show:false
+			value1:'',
+			show:false,
+			detail:{},
+			gradeList:[],
+			provinceList:[],
+			cityList:[],
+			pAreaIndex:0,
+			cAreaIndex:0,
+			examine:[],
+			examIndex:0,
+			applyAreas:{},
+			examDate:{},
+			applyObj:{
+				applyAreasJson:null,
+				examDateJson:null
+			}
 		};
 	},
 	onPullDownRefresh(){
 	},
 	onLoad(option) {
-		
+		this.id = option.id;
+		this.getDetail()
 	},
 	onShow() {
 		/* if(this.current === 2 && this.$method.isLogin()){
@@ -199,30 +157,171 @@ export default {
 		} */
 	},
 	methods: {
+		getExamine(id) {
+			let self = this
+			this.$api.getExamine({projectId:id}).then(res => {
+				if(res.data.code==200){
+					self.examine = res.data.rows
+				}
+			});
+		},
+		getCityList(id) {
+			let self = this
+			this.$api.getCityList({parentId:id}).then(res => {
+				if(res.data.code==200){
+					self.cityList = res.data.rows
+				}
+			});
+		},
+		getProvinceList() {
+			let self = this
+			if(self.provinceList.length>0){
+				return
+			}
+			this.$api.getProvinceList().then(res => {
+				if(res.data.code==200){
+					self.provinceList = res.data.rows
+					if(self.provinceList.length>0){
+						self.getCityList(self.provinceList[0].areaId)
+					}
+					
+				}
+			});
+		},
+		//弹出框确定
+		okPopup(index){
+			if(index==0){
+				if(!this.checkData()){
+					return
+				}
+				this.gradeIndex = this.gradeValue
+				this.show = false
+			}else{
+				if(!this.checkAreaData()){
+					return
+				}
+				this.examDate = this.examine[this.examIndex]
+				let pData = this.provinceList[this.pAreaIndex]
+				let cData = this.cityList[this.cAreaIndex]
+				this.applyAreas = {areaName:pData.areaName,areaId:pData.areaId,cityId:cData.areaId,cityName:cData.areaName}
+				this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas)
+				this.applyObj.examDateJson = JSON.stringify(this.examDate)
+				this.show1 = false
+			}
+		},
+		checkAreaData(){
+			if(this.examine.length==0){
+				uni.showModal({
+					title: "提示",
+					content: '请选择考期',
+					showCancel: false
+				})
+				return false
+			}
+			if(this.provinceList.length==0){
+				uni.showModal({
+					title: "提示",
+					content: '请选择报考地区',
+					showCancel: false
+				})
+				return false
+			}
+			if(this.cityList.length==0){
+				uni.showModal({
+					title: "提示",
+					content: '请选择报考地区',
+					showCancel: false
+				})
+				return false
+			}
+			return true
+		},
+		checkData(){
+			if(this.detail.templateType=='class'){
+				if(this.gradeValue<0){
+					uni.showModal({
+						title: "提示",
+						content: '请选择班级',
+						showCancel: false
+					})
+					return false
+				}
+			}
+			else if(this.detail.templateType=='apply'){
+				if(!this.applyObj.applyAreasJson){
+					uni.showModal({
+						title: "提示",
+						content: '请选择报考地区',
+						showCancel: false
+					})
+					return false
+				}
+				if(!this.applyObj.examDateJson){
+					uni.showModal({
+						title: "提示",
+						content: '请选择考期',
+						showCancel: false
+					})
+					return false
+				}
+			}
+			return true;
+		},
+		radioGroupChange(e){
+			console.log(e);
+		},
+		goodsGradeList() {
+			let self = this
+			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)
+					}
+				}
+			});
+		},
 		goBuy(){
+			if(!this.checkData()){
+				return
+			}
 			this.$navTo.togo('/pages2/order/confirm_pay');
 		},
-		bindChange(e) {
-			const val = e.detail.value
+		getDetail() {
+			let self = this
+			this.$api.goodsDetail(this.id).then(res => {
+				if(res.data.code==200){
+					self.detail = res.data.data
+					self.getExamine(self.detail.projectId)
+				}
+			});
 		},
-		checkboxChange(e) {
-			//console.log(e);
+		bindChangeE(e){
+			console.log(e.detail.value)
+			this.examIndex = e.detail.value[0]
 		},
-		// 选中任一checkbox时,由checkbox-group触发
-		checkboxGroupChange(e) {
-			// console.log(e);
-		},
-		// 全选
-		checkedAll() {
-			this.list.map(val => {
-				val.checked = true;
-			})
+		bindChange(e) {
+			const val = e.detail.value
+			if(this.pAreaIndex!=e.detail.value[0]){
+				this.pAreaIndex = e.detail.value[0]
+				this.getCityList(this.provinceList[this.pAreaIndex].areaId)
+			}
+			if(this.cAreaIndex!=e.detail.value[1]){
+				this.cAreaIndex = e.detail.value[1]
+			}
+			
 		},
 		openPopup(index){
 			if(index==0){
 				this.show = true
+				this.goodsGradeList()
 			}else{
 				this.show1 = true
+				this.getProvinceList()
 			}
 			
 		}
@@ -271,7 +370,6 @@ export default {
 	}
 	.white-box{
 		width: 646rpx;
-		height: 220rpx;
 		border-radius: 24rpx;
 		align-items: center;
 		display: flex;

+ 108 - 85
pages2/wd/class.vue

@@ -1,20 +1,23 @@
 <template>
 	<view style="padding: 30rpx;">
-		<navigator url="/pages2/class/detail" v-for="(item, index) in list" :key="index" style="margin-bottom: 30rpx;">
+		<navigator :url="'/pages2/wd/course?id='+item.goodsId" v-for="(item, index) in goodsList" :key="index" style="margin-bottom: 30rpx;">
 			<view class="class_item">
-				<image src="/static/login_bg.jpg" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
-				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">
-					2020年二建建筑工程管理与实务(实务专题
-					班)
-				</view>
+				<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
+				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">{{ item.goodsName }}</view>
 				<view class=".content_box">
 					<image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
-					共<text class="content"> 3 </text>科<text class="content"> 120</text> 节
-					<text class="content"> 60 </text>学时
+					共
+					<text class="content">3</text>
+					科
+					<text class="content">120</text>
+					节
+					<text class="content">60</text>
+					学时
 				</view>
 				<view class=".content_box">
 					<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
-					学习有效期:<text class="content"> 2020.11.20 - 2021.12.19 </text>
+					学习有效期:
+					<text class="content">{{ $method.timestampToTime(item.validityStartTime) }} - {{ $method.timestampToTime(item.validityEndTime) }}</text>
 				</view>
 			</view>
 			<view class="bottomBox">
@@ -23,107 +26,127 @@
 					学习进度:26/120
 				</view>
 				<view class="box_progress">
-					<view style="width: 60%;">
-						<u-line-progress active-color="#ff9900" :percent="70"></u-line-progress>
-					</view>
-					<view>
-						<u-button type="warning" size="mini" @click.stop="studyIn">进入学习</u-button>
-					</view>
+					<view style="width: 60%;"><u-line-progress active-color="#ff9900" :percent="70"></u-line-progress></view>
+					<view><u-button type="warning" size="mini" @click.stop="studyIn">进入学习</u-button></view>
 				</view>
 				<view class="box_progress">
-					<view style="width: 60%;">
-						<text style="color: #333333;white-space: nowrap;text-overflow: ellipsis;">这是一个考试标题</text>
-					</view>
-					<view>
-						<u-button :plain="true" type="primary" size="mini" @click.stop="appointment">预约考试</u-button>
-					</view>
+					<view style="width: 60%;"><text style="color: #333333;white-space: nowrap;text-overflow: ellipsis;">这是一个考试标题</text></view>
+					<view><u-button :plain="true" type="primary" size="mini" @click.stop="appointment(item)">预约考试</u-button></view>
 				</view>
-				<view class="box_progress">
-					<view style="width: 60%;">
-						<text style="color: #2979ff;white-space: nowrap;text-overflow: ellipsis;">【机电全科】2021年一建黄金A</text>
-					</view>
-					<view>
-						<u-button type="primary" size="mini">进入刷题</u-button>
-					</view>
+				<view class="box_progress" v-if="false">
+					<view style="width: 60%;"><text style="color: #2979ff;white-space: nowrap;text-overflow: ellipsis;">【机电全科】2021年一建黄金A</text></view>
+					<view><u-button type="primary" size="mini">进入刷题</u-button></view>
 				</view>
 			</view>
-			
 		</navigator>
 	</view>
 </template>
 
 <script>
+<<<<<<< HEAD
+export default {
+	data() {
+		return {
+			list: [1, 2, 3],
+			goodsList: []
+		};
+	},
+	onLoad(option) {
+		this.courseGoodsList();
+	},
+	onShow() {},
+	methods: {
+		courseGoodsList() {
+			let self = this;
+			this.$api.courseGoodsList().then(res => {
+				if (res.data.code == 200) {
+					self.goodsList = res.data.rows;
+				}
+			});
+=======
 	export default {
 		data() {
 			return {
-				list:[
-					1,2,3
-				]
+				goodsList:[]
 				
 			}
 		},
 		onLoad(option) {
-			// this.getDict()
+			 this.courseGoodsList()
 		},
 		onShow(){
 			
+>>>>>>> 4a93964cbb34c8e446d0e60cb99d616e47507617
 		},
-		methods: {
-			studyIn(){
-				this.$navTo.togo('/pages2/verify/input');
-			},
-			appointment(){
-				this.$navTo.togo('/pages2/appointment/index');
-			}
+		studyIn() {
+			this.$navTo.togo('/pages2/verify/input');
 		},
-		
+		appointment(item) {
+			var data = {
+				goodsId: item.goodsId,
+				gradeId: item.gradeId
+			};
+			this.$api.getApplysubscribe(data).then(res => {
+				if (res.data.code === 500) {
+					uni.showModal({
+						showCancel: false,
+						content: res.data.msg
+					});
+				}
+				if (res.data.code === 200) {
+					this.$navTo.togo('/pages2/appointment/index', {
+						goodsId: item.goodsId,
+						gradeId: item.gradeId
+					});
+				}
+			});
+		}
 	}
+};
 </script>
-<style >
-	page {
-			background: #EAEEF1;
-		}
+<style>
+page {
+	background: #eaeef1;
+}
 </style>
 <style scope>
-	
-	.box_progress{
-		display: flex;
-		justify-content:space-between;
-		align-items: center;
-		margin-top: 20rpx;
-	}
-	.bottomBox{
-		background: #FFFFFF;
-		width: 94%;
-		border-bottom-left-radius: 24rpx;
-		border-bottom-right-radius: 24rpx;
-		margin: 0 auto;
-		padding: 20rpx;
-	}
-	.content_box{
-		display: flex;
-		align-items: center;
-		color: #999999;
-		margin-top: 8rpx;
-	}
-	.content{
-		color: #000000;
-		margin: 0 8rpx;
-	}
-	.wk_icon{
-		width: 24rpx;
-		height: 24rpx;
-		margin-right: 8rpx;
-	}
+.box_progress {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	margin-top: 20rpx;
+}
+.bottomBox {
+	background: #ffffff;
+	width: 94%;
+	border-bottom-left-radius: 24rpx;
+	border-bottom-right-radius: 24rpx;
+	margin: 0 auto;
+	padding: 20rpx;
+}
+.content_box {
+	display: flex;
+	align-items: center;
+	color: #999999;
+	margin-top: 8rpx;
+}
+.content {
+	color: #000000;
+	margin: 0 8rpx;
+}
+.wk_icon {
+	width: 24rpx;
+	height: 24rpx;
+	margin-right: 8rpx;
+}
 
-	.class_item{
-		width: 100%;
-		height: 553rpx;
-		background: #FFFFFF;
-		box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
-		border-radius: 24rpx;
-		padding: 20rpx;
-		z-index: 999;
-		position: relative;
-	}
+.class_item {
+	width: 100%;
+	background: #ffffff;
+	box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
+	border-radius: 24rpx;
+	padding: 20rpx;
+	z-index: 999;
+	position: relative;
+}
 </style>

+ 111 - 0
pages2/wd/course.vue

@@ -0,0 +1,111 @@
+<template>
+	<view style="padding: 30rpx;">
+		<navigator :url="'/pages2/class/detail?id='+item.courseId" v-for="(item, index) in courseList" :key="index" style="margin-bottom: 30rpx;">
+			<view class="class_item">
+				<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
+				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">
+					{{item.courseName}}
+				</view>
+			</view>
+			<view class="bottomBox">
+				<view class=".content_box">
+					<image src="/static/icon/wk_icon3.png" class="wk_icon"></image>
+					学习进度:26/120
+				</view>
+				<view class="box_progress">
+					<view style="width: 60%;">
+						<u-line-progress active-color="#ff9900" :percent="70"></u-line-progress>
+					</view>
+					<view>
+						<u-button type="warning" size="mini" @click.stop="studyIn">进入学习</u-button>
+					</view>
+				</view>
+				
+			</view>
+			
+		</navigator>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				goodsId:0,
+				courseList:[]
+				
+			}
+		},
+		onLoad(option) {
+			this.goodsId = option.id
+			 this.courseCourseList()
+		},
+		onShow(){
+			
+		},
+		methods: {
+			courseCourseList() {
+				let self = this
+				this.$api.courseCourseList({goodsId:this.goodsId}).then(res => {
+					if(res.data.code==200){
+						self.courseList = res.data.rows
+					}
+				});
+			},
+			studyIn(){
+				this.$navTo.togo('/pages2/verify/input');
+			},
+			appointment(){
+				this.$navTo.togo('/pages2/appointment/index');
+			}
+		},
+		
+	}
+</script>
+<style >
+	page {
+			background: #EAEEF1;
+		}
+</style>
+<style scope>
+	
+	.box_progress{
+		display: flex;
+		justify-content:space-between;
+		align-items: center;
+		margin-top: 20rpx;
+	}
+	.bottomBox{
+		background: #FFFFFF;
+		width: 94%;
+		border-bottom-left-radius: 24rpx;
+		border-bottom-right-radius: 24rpx;
+		margin: 0 auto;
+		padding: 20rpx;
+	}
+	.content_box{
+		display: flex;
+		align-items: center;
+		color: #999999;
+		margin-top: 8rpx;
+	}
+	.content{
+		color: #000000;
+		margin: 0 8rpx;
+	}
+	.wk_icon{
+		width: 24rpx;
+		height: 24rpx;
+		margin-right: 8rpx;
+	}
+
+	.class_item{
+		width: 100%;
+		background: #FFFFFF;
+		box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
+		border-radius: 24rpx;
+		padding: 20rpx;
+		z-index: 999;
+		position: relative;
+	}
+</style>

BIN
static/goods.png


BIN
static/icon/down.png


BIN
static/icon/down1.png


BIN
static/icon/up.png


BIN
static/icon/up1.png


BIN
static/intro.png


BIN
static/job@3xactive.png


+ 8 - 1
store/index.js

@@ -10,7 +10,8 @@ const store = new Vuex.Store({
         userName: '',
 		userInfo:null,
 		dictObj:null,
-		allowLoading:true
+		allowLoading:true,
+		goodsAuditionConfigIdList:[] //当前访问页面的试听节ID
     },  
 	 getters: {
 		userInfo: state => {
@@ -27,11 +28,17 @@ const store = new Vuex.Store({
 		allowLoading:state => {
 			return state.allowLoading
 		},
+		goodsAuditionConfigIdList:state => {
+			return state.goodsAuditionConfigIdList
+		}
 	},
     mutations: { 
         updateUserInfo(state, provider) {
             state.userInfo = provider.userInfo;  
         },
+		setGoodsAuditionConfigIdList(state, provider){
+			state.goodsAuditionConfigIdList = provider.goodsAuditionConfigIdList;  
+		},
     }  
 })  
 async function getUserInfo(state){