he2802 4 жил өмнө
parent
commit
dde7aa6cce

+ 5 - 1
common/api.js

@@ -11,6 +11,8 @@ import chapter from './httpList/chapter.js'
 import collect from './httpList/collect.js'
 import advertising from './httpList/advertising.js'
 import system from './httpList/system.js'
+import record from './httpList/record.js'
+import plan from './httpList/plan.js'
 export default {
 	...login,
 	...polyvVideo,
@@ -24,5 +26,7 @@ export default {
 	...chapter,
 	...collect,
 	...advertising,
-	...system
+	...system,
+	...record,
+	...plan
 }

+ 19 - 0
common/httpList/plan.js

@@ -0,0 +1,19 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	planGenerate(data) {
+		return myRequest({
+			url: '/plan/generate',
+			method: 'get',
+			data: data
+		})
+	},
+	planUserPlan(data) {
+		return myRequest({
+			url: '/plan/userPlan',
+			method: 'get',
+			data: data
+		})
+	},
+}

+ 14 - 0
common/httpList/record.js

@@ -0,0 +1,14 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+
+	appuserInfo(data) {
+		return myRequest({
+			url: '/study/record/add',
+			method: 'post',
+			data: data,
+		})
+	},
+	
+}

+ 21 - 0
common/httpList/userInfo.js

@@ -31,4 +31,25 @@ export default {
 			data: data,
 		})
 	},
+	getUserBuy(data) {
+		return myRequest({
+			url: '/system/user/list',
+			method: 'get',
+			data: data,
+		})
+	},
+	studyRecord(data) {
+		return myRequest({
+			url: '/study/record',
+			method: 'post',
+			data: data,
+		})
+	},
+	studyRecordList(data) {
+		return myRequest({
+			url: '/study/record/list',
+			method: 'get',
+			data: data,
+		})
+	},
 }

+ 4 - 0
common/methodTool.js

@@ -41,5 +41,9 @@ export default {
 			return Y+M+D;
 		}
 	    return Y+M+D+h+m+s;
+	},
+	TimeTotimestamp(date) {
+		var newDate = new Date(date)
+		return (newDate.getTime()/1000)
 	}
 }

+ 2 - 2
components/home.vue

@@ -12,7 +12,7 @@
 				<view class="calendar_card">
 					<view class="card_box">
 						<u-row gutter="16">
-							<u-col span="11">
+							<u-col span="11" v-if="false">
 								<view>
 									<text class="t1">距离</text>
 									<text class="t2">二级建造师</text>
@@ -49,7 +49,7 @@
 				<view style="margin-top: 20rpx;">
 					<u-row gutter="16">
 						<u-col span="1">
-							<view style="padding: 5rpx;"><image src="/static/select.png" class="arr-icon" @click="show = true"></image></view>
+							<view style="padding: 5rpx;"><image src="/static/select.png" class="arr-icon" @click="show = false"></image></view>
 						</u-col>
 						<u-col span="11">
 							<view>

+ 18 - 5
components/my.vue

@@ -19,8 +19,8 @@
 						</navigator>
 					</view>
 					<navigator url="/pages2/wd/level" hover-class="none" style="position: relative;margin-top: 20rpx;">
-						<view class="progress_text">349/1000</view>
-						<u-line-progress height="8" active-color="#2F4379" :percent="70" :show-percent="false"></u-line-progress>
+						<view class="progress_text">0/1000</view>
+						<u-line-progress height="8" active-color="#2F4379" :percent="0" :show-percent="false"></u-line-progress>
 					</navigator>
 				</u-col>
 				<view class="qiandao">
@@ -60,10 +60,10 @@
 					<u-icon name="arrow-right"  size="28"></u-icon>
 				</view>
 				<scroll-view class="r_sliper" scroll-x="true" >
-					<view v-for="(item,index) in list" :key="index" style="margin-right: 20rpx;display:inline-block">
-						<image src="http://192.168.0.222:8080/img/banner1.png" class="r_image"></image>
+					<view v-for="(item,index) in list" :key="index" style="margin-right: 20rpx;display:inline-block" @click="jumpDetail(item)">
+						<image :src="$method.splitImgHost(item.coverUrl)" class="r_image"></image>
 						<view class="r_t2">
-							二级建造师市政公用工程
+							{{item.courseName}}
 						</view>
 					</view>
 				</scroll-view>
@@ -134,6 +134,12 @@
 			};
 		},
 		methods: {
+			jumpDetail(item){
+				this.$navTo.togo('/pages2/course/detail', {
+					id: item.courseId
+				});
+				return;
+			},
 			init(){
 				this.getInfoAttached()
 			},
@@ -145,6 +151,13 @@
 				this.$api.appInfoAttached().then(res => {
 					self.collectTotal = res.data.data.collectTotal
 				});
+				this.studyRecordList()
+			},
+			studyRecordList(){
+				let self = this
+				this.$api.studyRecordList().then(res => {
+					self.list = res.data.rows
+				});
 			},
 			
 		},

+ 11 - 1
pages.json

@@ -45,7 +45,17 @@
 					"bounce": "none"
 				}
 			}
-		}, {
+		}, 
+		{
+			"path": "plan/create",
+			"style": {
+				"navigationBarTitleText": "创建计划",
+				"app-plus": {
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
+			}
+		},{
 			"path": "index/search",
 			"style": {
 				"navigationBarTitleText": "搜索",

+ 1 - 1
pages/wd/index.vue

@@ -17,7 +17,7 @@
 						</navigator>
 					</view>
 					<navigator url="/pages2/wd/level" hover-class="none" style="position: relative;margin-top: 20rpx;">
-						<view class="progress_text">349/1000</view>
+						<view class="progress_text">0/1000</view>
 						<u-line-progress height="8" active-color="#2F4379" :percent="70" :show-percent="false"></u-line-progress>
 					</navigator>
 				</u-col>

+ 1 - 0
pages2/bank/detail.vue

@@ -266,6 +266,7 @@ export default {
 	},
 	onShow() {},
 	methods: {
+
 		getBankDList(options) {
 			var data = {
 				bankId: options.bankId

+ 49 - 3
pages2/course/detail.vue

@@ -18,6 +18,8 @@
 					isAllowSeek="ifViewed"
 					:showPlaybackRateBtn="false"
 					:enablePlayGesture="true"
+					:playbackRate=playbackRate
+					@statechange="onStateChange"
 				></polyv-player>
 			</view>
 			<view>
@@ -182,6 +184,7 @@
 export default {
 	data() {
 		return {
+			playbackRate:[0.5,0.8,1.0,1.25,1.5],
 			list: [
 				{
 					name: '课程目录'
@@ -229,9 +232,24 @@ export default {
 			commendList: [], //推荐课程列表
 			collecStatus: false, //收藏状态
 			initH4: 0,
-			id:0
+			id:0,
+			PlayDuration:0,
+			firstPlay:true
 		};
 	},
+	onUnload(){
+		var polyvPlayerContext = this.selectComponent('#playerVideo');
+		if(polyvPlayerContext!=null){
+			//存储播放记录
+			let PlayCurrentTime = polyvPlayerContext.getCurrentTime()
+			if(PlayCurrentTime){
+				let key = this.vid
+				uni.setStorageSync(key, PlayCurrentTime);
+				this.addStudyRecord(PlayCurrentTime)
+			}
+			
+		}	
+	},
 	onLoad(option) {
 		const Verify = require('@/wxcomponents/verify_mpsdk/main.js');
 		Verify.init();
@@ -272,8 +290,36 @@ export default {
 			this.current = 3;
 		}
 	},
+	
 	methods: {
-
+		addStudyRecord(study_duration){
+			console.log(study_duration,66)
+			let data = {
+				courseId:this.id,
+				sectionId:this.infoData.sectionId ,
+				studyDuration:study_duration
+			}
+			this.$api.studyRecord(data).then(result => {
+				
+			});
+		},
+		onStateChange(newstate,oldstate){
+			if(newstate.detail.newstate=='playing'){
+				if(this.firstPlay){
+					var polyvPlayerContext = this.selectComponent('#playerVideo');
+					if(polyvPlayerContext!=null){
+						//获取播放记录
+						let key = this.vid
+						let PlayDuration = uni.getStorageSync(key);
+						if(PlayDuration){
+							polyvPlayerContext.seek(parseInt(PlayDuration));
+							this.firstPlay = false
+						}	
+					}	
+				}
+				console.log(23)
+			}	
+		},
 		swipStatus() {
 			this.activeStatus = !this.activeStatus;
 			let self = this;
@@ -295,7 +341,6 @@ export default {
 				.select('#modules2')
 				.boundingClientRect(data => {
 					that.h2 = data.height;
-					console.log(data.height, 66);
 					that.countHeight(that);
 				})
 				.exec();
@@ -391,6 +436,7 @@ export default {
 			this.vid = this.infoData.vid;
 			this.activeStatusCata = item.chapterId;
 			this.showBox = false;
+			this.firstPlay = true
 		},
 		getChapter(v) {
 			var self = this;

+ 14 - 1
pages2/course/keynote.vue

@@ -186,7 +186,20 @@
 				if(!this.$method.isLogin()){
 					this.$navTo.togo('/pages/login/login');
 				}else{
-					this.$navTo.togo('/pages2/payment/payment', {})
+					let url = this.$method.splitImgHost(this.detail.fileUrls)
+					console.log(url)
+					uni.downloadFile({
+					        url:url,
+					        success(res){
+					          console.log(res)
+					          let data = res.tempFilePath;
+					          uni.openDocument({
+					            filePath:data,
+					            fileType:'pdf'
+					          })
+					        }
+					      })
+				//	this.$navTo.togo('/pages2/payment/payment', {})
 				//	this.$navTo.togo('/pages2/course/read', {})
 				}
 				

+ 447 - 0
pages2/plan/create.vue

@@ -0,0 +1,447 @@
+<template>
+	<view style="padding: 30rpx;" >
+		<view class="list_box">
+			<view class="item" v-for="(item,index) in list" :key="index" >
+				<image :src="item.coverUrl" ></image>
+				<text >{{item.courseName}}</text>
+				<view class="del_icon">
+					<u-icon name="minus-circle-fill" color="#EB4D3D" size="40" @click="delItem(index)"></u-icon>
+				</view>
+			</view>
+			<view class="item" style="vertical-align: top;">
+				<view class="item_add" @click="openSel">
+					<u-icon name="plus-circle-fill" color="#32467B" size="32"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="list_box form">
+			<u-form :model="form" ref="uForm">
+				<u-form-item label="课程类型" :label-width="auto"><u-input v-model="form.category" :disabled="true"/></u-form-item>
+				<u-form-item  label="考试日期" prop="birth" :label-width="auto">
+					<picker mode="date" :value="form.date"   @change="bindDateChange">
+						<view class="picker">
+						  {{form.date}}
+						</view>
+					  </picker>
+				</u-form-item>
+				<u-form-item  label="学习提醒" prop="birth" :label-width="auto">
+					<picker mode="time" :value="form.time"   @change="bindTimeChange">
+						<view class="picker">
+						  {{form.time}}
+						</view>
+					  </picker>
+				</u-form-item>
+				<u-form-item label="学习频率" :label-width="auto">
+					<view class="picker" @click="openWeek" >
+					  {{form.week}}
+					</view>
+				</u-form-item>
+				<u-form-item label="复习天数" :label-width="auto">
+					<picker @change="bindPickerChangeReview" :value="index_review" :range="array_review">
+					              <view class="picker">
+					                {{array_review[index_review]}}
+					              </view>
+					    </picker>
+				</u-form-item>
+				<u-form-item label="起止日期" :label-width="auto">
+					<view class="picker" @click="openCalendar">
+							{{form.startDate}}~{{form.endDate}}
+					</view>
+					
+				</u-form-item>
+			</u-form>
+		</view>
+		<u-calendar v-model="calendar_show" :mode="calendar" @change="change" :max-date="maxDate">
+		    </u-calendar>
+		<!-- 弹框-->
+		<u-popup v-model="week_show" mode="bottom">
+			<view style="height: 400rpx;text-align: center">
+					<view style="padding-top: 100rpx;padding-left: 40rpx;text-align: center;">
+						<u-checkbox-group @change="checkboxGroupChange">
+							<u-checkbox 	
+								v-model="item.checked" 
+								v-for="(item, index) in list3" :key="index" 
+								:name="item.name"
+							>{{item.name}}</u-checkbox>
+						</u-checkbox-group>
+						<view class="title_l" @click="week_submit" style="margin: 50rpx auto;">确认</view>
+					</view>
+				</view>
+		</u-popup>
+		<u-popup v-model="show" mode="bottom">
+			<view class="popup_box" >
+				<view class="popup_title">
+					<u-row >
+						<u-col span="6">
+							<view class="title_r">我的课程</view>
+						</u-col>
+						<u-col span="3" offset="3">
+							<view class="title_l" @click="submit">确认</view>
+						</u-col>
+					</u-row>
+				</view>
+				<view class="popup_list">
+					<view class="popup_item" v-for="(item,index) in list2" :key="index">
+						<view style="line-height:182rpx ;">
+							<u-checkbox :disabled="item.disabled"
+								@change="checkboxChange"  shape="circle" active-color="#32467B"
+								v-model="item.checked"  :key="index" :name="item.courseId"></u-checkbox>
+						</view>
+						<view >
+							<image :src="item.coverUrl" style="width: 278rpx;height: 134rpx;"></image>
+						</view>
+						<view style="margin: 30rpx;">
+							{{item.courseName}}
+						</view>
+					</view>
+					
+				</view>
+			</view>
+		</u-popup>
+		<button  @click="resultForm" class="submit_btn">提交</button>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				week_show:false,
+				form:{
+					category:'二级建造师',
+					date:'2021-01-01',
+					time:'20:30',
+					startDate:'2021-05-07',
+					endDate:'2021-05-31',
+					week:'一'
+				},
+				calendar: 'range',
+				list:[
+					],
+				list2:[
+					{url:'/static/banner.png',id:33,disabled:false,
+					checked:false},
+					{url:'/static/banner.png',id:34,disabled:false,checked:false},
+					{url:'/static/banner.png',id:35,disabled:false,checked:false}],
+				show:false,
+				calendar_show:false,
+				maxDate:'2023-01-01',
+				list3:[{
+					name: '一',
+					checked: false,
+					disabled: false,
+					id:1
+				},{
+					name: '二',
+					checked: false,
+					disabled: false,
+					id:2
+				},{
+					name: '三',
+					checked: false,
+					disabled: false,
+					id:3
+				},{
+					name: '四',
+					checked: false,
+					disabled: false,
+					id:4
+				},{
+					name: '五',
+					checked: false,
+					disabled: false,
+					id:5
+				},
+				{
+					name: '六',
+					checked: false,
+					disabled: false,
+					id:6
+				},
+				{
+					name: '日',
+					checked: false,
+					disabled: false,
+					id:0
+				}],
+				selWeek:'',
+				index_review: 4,
+				array_review: [1, 2, 3, 4, 5, 6, 7],	
+			}
+		},
+		onLoad(option) {
+			this.form.startDate = this.$method.timestampToTime((new Date()).getTime()/1000)
+			this.form.endDate = this.$method.timestampToTime((new Date()).getTime()/1000 + 24*3600*10)
+			this.getMyCourse()
+		},
+		onShow(){
+			
+		},
+		methods: {
+			resultForm(){
+				if(this.list.length==0){
+					uni.showModal({
+						title: '提示',
+						content: '请选择课程',
+						showCancel: false
+					});
+					return 
+				}
+				let courseId = [];
+				for(let i=0;i<this.list.length;i++){
+					courseId.push(this.list[i].courseId)
+				}
+				let ss = this.form.week.split("、");
+				let weekArray = []
+				for(let i=0;i<ss.length;i++){
+					if(ss[i]=='日'){
+						weekArray.push(0)
+					}
+					if(ss[i]=='一'){
+						weekArray.push(1)
+					}
+					if(ss[i]=='二'){
+						weekArray.push(2)
+					}
+					if(ss[i]=='三'){
+						weekArray.push(3)
+					}
+					if(ss[i]=='四'){
+						weekArray.push(4)
+					}
+					if(ss[i]=='五'){
+						weekArray.push(5)
+					}
+					if(ss[i]=='六'){
+						weekArray.push(6)
+					}
+				}
+				let data = {
+					courseId:courseId.join(","),
+					reminderTime:this.form.time,
+					examDate:this.$method.TimeTotimestamp(this.form.date),
+					startTime:this.$method.TimeTotimestamp(this.form.startDate),
+					endTime:this.$method.TimeTotimestamp(this.form.endDate),
+					endTime:this.$method.TimeTotimestamp(this.form.endDate),
+					studyCount:weekArray.join(","),
+					studyDay:this.array_review[this.index_review],
+					status:1
+				}
+				console.log(data)
+				this.$api.planGenerate(data).then(result => {
+					if(result.data.code==200){
+						uni.showModal({
+						    title: '提示',
+						    content: '提交成功',
+						});
+					}
+					console.log(result)
+				});
+				
+			},
+			selItem(item){
+				console.log(34)
+				item.checked = !item.checked
+			},
+			getMyCourse(){
+			    let data = {
+			     typeId:0
+			    }
+			    let self = this
+			    this.$api.getUserBuy(data).then(result => {
+			     if(result.data.data.courseVoList.length>0){
+			      for(let i=0;i<result.data.data.courseVoList.length;i++){
+			       let item = result.data.data.courseVoList[i]
+			       item.checked = false
+			       item.disabled = false
+				   item.coverUrl = self.$method.splitImgHost(item.coverUrl)
+			      }
+			     }
+			     self.list2 = result.data.data.courseVoList
+			     console.log(self.list2)
+			    });
+			   },
+			bindPickerChangeReview(e){
+				this.index_review= e.detail.value
+			},
+			week_submit(){
+				if(this.selWeek==''){
+					uni.showModal({
+					    title: '提示',
+					    content: '至少选择一个',
+					});
+					return
+				}
+				this.form.week = this.selWeek
+				this.week_show = false
+			},
+			openWeek(){
+				this.week_show = true
+				this.selWeek = this.form.week
+				let that = this
+				this.list3.map(val => {
+					val.checked = false
+					if(that.form.week.indexOf(val.name) != -1){
+						val.checked = true
+					}
+				})
+			},
+			checkboxGroupChange(e){
+				this.selWeek = e.join("、")
+			},
+			openCalendar(){
+				this.calendar_show = true
+			},
+			change(e) {
+				console.log(e);
+				this.form.startDate = e.startDate
+				this.form.endDate = e.endDate
+			},
+			bindTimeChange(e){
+				this.form.time=e.detail.value
+			},
+			bindDateChange(e){
+				this.form.date=e.detail.value
+				
+			},
+			submit(){
+				let that = this
+				this.list2.map(val => {
+					if(val.checked){
+						that.list.push(val);
+					}
+				})
+				this.checkSameItem()
+				this.show = false
+			},
+			checkboxChange(e){
+			},
+			checkSameItem(){
+				this.list2.map(val => {
+					val.disabled = false
+					this.list.map(val1 => {
+						if(val.courseId == val1.courseId){
+							val.disabled = true
+						}
+						val.checked= false
+					})
+				})
+			},
+			delItem(index){
+				this.list.splice(index,1)
+			},
+			openSel(){
+				this.show = true
+				this.checkSameItem()
+			}
+		},
+		
+	}
+</script>
+<style>
+	::-webkit-scrollbar{
+		width: 0;
+		height: 0;
+		color: transparent;
+	}
+	.u-drawer-content-visible{
+		border-radius: 32rpx 32rpx 0rpx 0rpx;
+		overflow: hidden;
+	}
+</style>
+<style scope>
+	.submit_btn{
+		background-color: #32467B !important;
+		border-color: #32467B !important;
+		color: #FFFFFF;
+		font-size: 30rpx;
+		padding: 5rpx;
+		margin-top: 50rpx;
+	}
+	.picker{
+		text-align: right;
+	}
+	.form{
+		padding:0 16rpx !important;
+		margin-top: 30rpx;
+	}
+	input{
+		text-align: right;
+	}
+	.popup_item{
+		width: 100%;
+		height: 182rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+		border-radius: 32rpx;
+		margin: 20rpx 0;
+		padding: 10rpx;
+		display: flex;
+	}
+	.popup_list{
+		height: 500rpx;
+		padding: 0 20rpx;
+	}
+	.title_l{
+		width: 88rpx;
+		height: 48rpx;
+		background: #32467B;
+		border-radius: 16rpx;
+		font-size: 28rpx;
+		color: #FFFFFF;
+		text-align: center;
+		line-height: 48rpx;
+	}
+	.title_r{
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #2F4379;
+	}
+	.popup_title{
+		width: 100%;
+		margin: 40rpx;	
+	}
+	.popup_box{
+		height: 600rpx;
+	}
+	.del_icon{
+		position: absolute;
+		right: -15rpx;
+		top: -15rpx;
+	}
+	.item_add{
+		background: #F9F9F9;
+		border-radius: 32rpx;
+		width: 100%;
+		height:150rpx ;
+		text-align: center;
+		line-height: 150rpx;
+	}
+	.item text{
+		font-size: 24rpx;
+		color: #0C141F;
+	}
+	.item image{
+		border-radius: 32rpx;
+		width: 100%;
+		height:150rpx ;
+	}
+	.item{
+		width: 46%;
+		display: inline-block;
+		margin: 1% 2%;
+		position: relative;
+	}
+	.list_box{
+		width: 100%;
+		background: #FFFFFF;
+		box-shadow: 0rpx 0rpx 1rpx 4rpx rgba(145, 156, 178, 0.1);
+		border-radius: 32rpx;
+		padding: 20rpx 0;
+	}
+	
+page {
+		background: #FFFFFF;
+	}
+</style>

+ 94 - 20
pages2/plan/detail.vue

@@ -2,7 +2,7 @@
 	<view style="padding: 30rpx;" >
 		<view class="card">
 			<view class="date_t1">
-				2021年 5
+				2021年 6
 			</view>
 			<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>
@@ -51,14 +51,14 @@
 			<view style="width: 100%;display: flex;justify-content: center;" v-else>
 				<image class="date_line_close" @click="close_calendar" src="/static/close_card.png"></image>
 			</view>
-			<view style="margin-left: 30rpx;">
-				<text class="date_t2">二级建造师市政公用工程</text>
-				<view class="circle_num" style="margin-left: 20rpx;">2</view>
-			</view>
-			<view style="margin-left: 30rpx;margin-top: 10rpx;">
-				<text class="date_t2">二级建造师市政公用工程</text>
-				<view class="circle_num" style="margin-left: 20rpx;">1</view>
+			<view v-for="(item,index) in workList">
+				<view style="margin-left: 30rpx;margin-top: 10rpx;" @click="jumpDetail(item)">
+					<text class="date_t2">{{item.courseName}}</text>
+					<view class="circle_num" style="margin-left: 20rpx;">{{item.chapterNum}}</view>
+				</view>
 			</view>
+
+
 		</view>
 		<!-- 列表-->
 		<view  >
@@ -67,22 +67,22 @@
 			        <view class="list_item" :class="index%2==0?'list_item_bac1':'list_item_bac2'">
 						<u-row>
 							<u-col span="11">
-								 <text class="item_t1">二级建造师:2021-08-23截止</text>
+								 <text class="item_t1">{{item.coursePlanVo[0].categoryName}}:{{$method.timestampToTime(item.endTime)}}截止</text>
 							</u-col>
 							<u-col span="1">
 								<image src="/static/more.png" class="img_more" @click.stop="openShow(item)"></image>
 							</u-col>
 						</u-row>
 						<view style="margin-top: 30rpx;">
-							<image src="/static/banner.png" class="r_image"></image>
+							<image :src="$method.splitImgHost(item.coursePlanVo[0].coverUrl)" class="r_image"></image>
 							<view class="r_t2">
-								二级建造师市政公用工程
+								{{item.coursePlanVo[0].courseName}}
 							</view>
 						</view>
 						<view style="display: flex;margin-top: 30rpx;">
 							<text class="item_t2">学习频率:</text>
 							<view style="display: flex;justify-content:center;">
-								<view v-for="(item,index) in date" :key="index" class="item_date">{{item}}</view>
+								<view v-for="(item1,index) in item.studyCount" :key="index" class="item_date">{{replay(item1)}}</view>
 							</view>
 						</view>
 						<view style="display: flex;margin-top: 20rpx;">
@@ -101,6 +101,9 @@
 
 			</uni-swipe-action>
 		</view>
+		<view class="newPlan" @click="newPlan()">
+			新建计划
+		</view>
 	</view>
 </template>
 
@@ -108,11 +111,15 @@
 	export default {
 		data() {
 			return {
+				workList:[],
+				dayLisy:[],
+				index:0,
 				date:['日','一','二','三','四','五','六'],
 				list:[
 					{
 						show:'right',
-						id:1
+						id:1,
+						coursePlanVo:{}
 					},
 					{
 						show:'none',
@@ -134,37 +141,37 @@
 				isOpen:false,
 				date_num:[
 					{
-						num:23,
+						num:20,
 						color:0,
 						note:0,
 						dot:false,
 					},{
-						num:24,
+						num:21,
 						color:1,
 						note:0,
 						dot:false,
 					},{
-						num:25,
+						num:22,
 						color:0,
 						note:0,
 						dot:true,
 					},{
-						num:26,
+						num:23,
 						color:2,
 						note:0,
 						dot:false,
 					},{
-						num:27,
+						num:24,
 						color:1,
 						note:0,
 						dot:false,
 					},{
-						num:28,
+						num:25,
 						color:3,
 						note:2,
 						dot:false,
 					},{
-						num:29,
+						num:26,
 						color:0,
 						note:1,
 						dot:true,
@@ -186,10 +193,61 @@
 		},
 		onLoad(option) {
 			this.date_use = this.date_num
+			let date = new Date()
+			let num = date.getDate()
+			for(let i=0;i<this.date_num.length;i++){
+				let item = this.date_num[i]
+				if(item.num ==num ){
+					item.color = 3
+				}
+			}
+			this.getList()
 		},
 		onShow(){
 		},
 		methods: {
+			jumpDetail(item) {
+				this.$navTo.togo('/pages2/course/detail', {
+					id: item.courseId
+				});
+				return;
+			},
+			replay(index){
+				if(index==0){
+					return '日'
+				}
+				if(index==1){
+					return '一'
+				}
+				if(index==2){
+					return '二'
+				}
+				if(index==3){
+					return '三'
+				}
+				if(index==4){
+					return '四'
+				}
+				if(index==5){
+					return '五'
+				}
+				if(index==6){
+					return '六'
+				}
+			},
+			getList(){
+				let self = this
+				this.$api.planUserPlan().then(result => {
+					self.list = result.data.data
+					self.dayLisy = result.data.data[0].calendarStudyVo[0].dayStudyList
+					let start = self.dayLisy[0].studyDay
+					self.workList = result.data.data[0].coursePlanVo
+					console.log(self.workList)
+				});
+			},
+			newPlan(){
+				this.$navTo.togo('/pages2/plan/create')
+			},
 			edit(item){
 				this.$navTo.togo('/pages2/plan/edit', {
 					id:item.id
@@ -238,6 +296,22 @@
 </script>
 
 <style scope>
+	.newPlan{
+		width: 200rpx;
+		height: 64rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.15);
+		border-radius: 32rpx;
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #32467B;
+		text-align: center;
+		line-height: 64rpx;
+		position: fixed;
+		bottom: 60rpx;
+		left: 40%;
+	}
 	.operate_img3{
 		background: #3478F6;
 	}

+ 1 - 0
pages2/plan/edit.vue

@@ -162,6 +162,7 @@
 			}
 		},
 		onLoad(option) {
+	
 			
 		},
 		onShow(){

+ 104 - 13
pages2/study/index.vue

@@ -5,25 +5,20 @@
 		</view>
 		<view >
 		    <view v-show="current === 0">
-		        <view class="content" v-for="(item,index) in list" :key="index">
-					<view class="c_t1">
-						2021年5月1日
-					</view>
+		        <view class="content" v-for="(item,index) in list1" :key="index" @click="jumpDetail(item)">
 					<view>
 						<u-row >
 							<u-col span="5" >
 								<view style="padding: 5rpx;">
-									<image src="/static/banner.png" class="c_img"></image>
+									<image :src="$method.splitImgHost(item.coverUrl)" class="c_img"></image>
 								</view>
 							</u-col>
 							<u-col span="7" >
 								<view style="position: relative;height: 134rpx;padding-left: 10rpx;">
 									<view class="c_title">
-										二级建造师市政公用工程
-									</view>
-									<view class="c_log">
-										上次看到 2.1 二级建造师章节标题
+										{{item.categoryName}}
 									</view>
+									
 								</view>
 							</u-col>
 						</u-row>
@@ -32,10 +27,48 @@
 				</view>
 		    </view>
 		    <view v-show="current === 1">
-		        选项卡2的内容
+		       <view class="content" v-for="(item,index) in list2" :key="index" @click="jumpDetail(item)">
+		       	<view>
+		       		<u-row >
+		       			<u-col span="5" >
+		       				<view style="padding: 5rpx;">
+		       					<image :src="$method.splitImgHost(item.coverUrl)" class="c_img"></image>
+		       				</view>
+		       			</u-col>
+		       			<u-col span="7" >
+		       				<view style="position: relative;height: 134rpx;padding-left: 10rpx;">
+		       					<view class="c_title">
+		       						{{item.bankName}}
+		       					</view>
+		       					
+		       				</view>
+		       			</u-col>
+		       		</u-row>
+		       	</view>
+		       	
+		       </view>
 		    </view>
 		    <view v-show="current === 2">
-		        选项卡3的内容
+		       <view class="content" v-for="(item,index) in list3" :key="index" @click="jumpDetail(item)">
+		       	<view>
+		       		<u-row >
+		       			<u-col span="5" >
+		       				<view style="padding: 5rpx;">
+		       					<image :src="$method.splitImgHost(item.coverUrl)" class="c_img"></image>
+		       				</view>
+		       			</u-col>
+		       			<u-col span="7" >
+		       				<view style="position: relative;height: 134rpx;padding-left: 10rpx;">
+		       					<view class="c_title">
+		       						{{item.name}}
+		       					</view>
+		       					
+		       				</view>
+		       			</u-col>
+		       		</u-row>
+		       	</view>
+		       	
+		       </view>
 		    </view>
 		</view>
 	</view>
@@ -52,17 +85,75 @@
 					'重点考点'
 				],
 				list:[1,1,1,1,1,1,1,1,1,1,1],
+				list1: [],
+				list2: [],
+				list3: [],
+				paramList: [
+					{
+						typeId:0
+					},
+					{
+						typeId:1
+					},
+					{
+						typeId:2
+					}
+				],
 			}
 		},
 		onLoad(option) {
-			
+			this.getMyCourse()
+			this.getMyBank()
+			this.getMyNote()
 		},
 		onShow(){
 		},
 		methods: {
+			jumpDetail(item) {
+				if (this.current == 0) {
+					this.$navTo.togo('/pages2/course/detail', {
+						id: item.courseId
+					});
+					return;
+				}
+				if (this.current == 1) {
+						this.$navTo.togo('/pages2/bank/detail', {
+							id: item.bankId
+						});
+					return;
+				}
+				if (this.current == 2) {
+					this.$navTo.togo('/pages2/course/keynote', {
+						id: item.fileId
+					});
+					return;
+				}
+			},
 			onClickItem(e){
 				this.current = e.currentIndex
-			}
+			},
+			getMyCourse(){
+			   var self = this;
+			   var param = this.paramList[0];
+			    this.$api.getUserBuy(param).then(result => {
+					console.log(result.data.data.courseVoList,33)
+			     self.list1.push.apply(self.list1, result.data.data.courseVoList);
+			    });
+			},
+			getMyBank(){
+			   var self = this;
+			   var param = this.paramList[1];
+			    this.$api.getUserBuy(param).then(result => {
+			     self.list2.push.apply(self.list2, result.data.data.questionBankList);
+			    });
+			},
+			getMyNote(){
+			   var self = this;
+			   var param = this.paramList[2];
+			    this.$api.getUserBuy(param).then(result => {
+			     self.list3.push.apply(self.list3, result.data.data.examNoteList);
+			    });
+			},
 		
 		},
 		

+ 5 - 4
pages2/wd/coupon.vue

@@ -129,7 +129,7 @@
 						</view>
 					</view>
 				</view>
-				<view class="content" v-for="(item,index) in list1" :key="index" v-show="current === 1">
+				<view class="content" v-for="(item,index) in list2" :key="index" v-show="current === 1">
 					<view style="position: relative;">
 						<u-row >
 							<u-col span="4" >
@@ -176,12 +176,13 @@
 		data() {
 			return {
 				items: [
-					'现金券(3)', 
-					'折扣券(2)'
+					'现金券(0)', 
+					'折扣券(0)'
 				],
-				list:[1,1,1,1,1,1,1,1,1,1,1],
+				list:[],
 				current:0,
 				show:false,
+				list2:[],
 				list1:['/static/coupon/overdue.png',
 				'/static/coupon/used.png','/static/coupon/used.png',
 				'/static/coupon/overdue.png','/static/coupon/overdue.png'],

+ 1 - 4
pages2/wd/help.vue

@@ -36,7 +36,7 @@
 	export default {
 		data() {
 			return {
-				list:[1,1,1,1,1,1,1,1,1,1],
+				list:[],
 				imgHeight:0
 			}
 		},
@@ -46,12 +46,9 @@
 		onShow(){
 			let w = uni.getSystemInfoSync().windowWidth
 			this.imgHeight = w/(750/375)-68 
-			console.log(w,33)
-			console.log(this.imgHeight,33)
 		},
 		methods: {
 			
-		
 		},
 		
 	}

+ 6 - 5
pages2/wd/level.vue

@@ -4,8 +4,8 @@
 			<u-row gutter="16" justify="center">
 				<u-col span="9">
 					<view style="vertical-align: middle;display: flex;">
-						<image src="/static/avatar.png" style="width: 80rpx;height: 80rpx;"></image>
-						<view class="r_t2">李宏杰</view>
+						<image :src="userInfo!=null?$method.splitImgHost(userInfo.avatar):''" style="width: 80rpx;height: 80rpx;border-radius: 50%;"></image>
+						<view class="r_t2">{{userInfo.nickname}}</view>
 					</view>
 				</u-col>
 				<u-col span="3" text-align="right">
@@ -32,8 +32,8 @@
 						</view>
 					</view>
 					<view class="progress_box">
-						<view class="progress_text">349/1000</view>
-						<u-line-progress height="8" inactive-color="rgba(47, 67, 121, 0.1)" :active-color="item.title_color" :percent="70" :show-percent="false"></u-line-progress>
+						<view class="progress_text">0/1000</view>
+						<u-line-progress height="8" inactive-color="rgba(47, 67, 121, 0.1)" :active-color="item.title_color" :percent="0" :show-percent="false"></u-line-progress>
 						<view class="tip">{{item.tip}}</view>
 					</view>
 				</view>
@@ -176,6 +176,7 @@
 </template>
 
 <script>
+	import {mapGetters} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -234,7 +235,7 @@
 			
 		
 		},
-		
+		computed: {...mapGetters(['userInfo'])},
 	}
 </script>
 <style>