Tang %!s(int64=4) %!d(string=hai) anos
pai
achega
a3dcd91498

+ 39 - 0
common/api.js

@@ -0,0 +1,39 @@
+// const http = (options) => {
+// 	return new Promise((resolve, reject) => {
+// 	let realmName = options.prefix == false?'':'http://127.0.0.1:8088/';  
+// 		uni.showLoading({
+// 			title: '加载中....',
+// 			mask: true
+// 		})
+// 		uni.request({
+// 			method: options.method,
+// 			url: realmName+options.url,
+// 			data: options.data,
+// 			header: options.header,
+// 			success: (res) => {
+// 				resolve(res.data)
+// 			},
+// 			fail: (err) => {
+// 				reject(err.data)
+// 				// let code = err.data.code;
+// 				// switch (code) {
+// 				// 	case 1000:
+// 				// 		break;
+// 				// }
+// 			},
+// 			complete: () => {
+// 				uni.hideLoading();
+// 			}
+// 		})	
+// 	})
+// }
+
+// export default http
+import login from './httpList/login.js'
+import polyvVideo from './httpList/polyvVideo.js'
+import course from './httpList/course.js'
+export default {
+	...login,
+	...polyvVideo,
+	...course
+}

+ 0 - 31
common/http.js

@@ -1,31 +0,0 @@
-const http = (options) => {
-	return new Promise((resolve, reject) => {
-	let realmName = options.prefix == false?'':'http://127.0.0.1:8088/';  
-		uni.showLoading({
-			title: '加载中....',
-			mask: true
-		})
-		uni.request({
-			method: options.method,
-			url: realmName+options.url,
-			data: options.data,
-			header: options.header,
-			success: (res) => {
-				resolve(res.data)
-			},
-			fail: (err) => {
-				reject(err.data)
-				// let code = err.data.code;
-				// switch (code) {
-				// 	case 1000:
-				// 		break;
-				// }
-			},
-			complete: () => {
-				uni.hideLoading();
-			}
-		})	
-	})
-}
-
-export default http

+ 21 - 0
common/httpList/course.js

@@ -0,0 +1,21 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//查询课程列表
+	courselist(data) {
+		return myRequest({
+			url: '/course/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//获取课程详细信息
+	courseInfo(data) {
+		return myRequest({
+			url: '/course/' + data,
+			method: 'get',
+			noToken: true
+		})
+	},
+}

+ 29 - 0
common/httpList/login.js

@@ -0,0 +1,29 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//登录
+	login(data) {
+		return myRequest({
+			url: '/testLogin',
+			method: 'post',
+			data: data,
+			noToken: true
+		})
+	},
+	//登录用户信息
+	getInfo() {
+		return myRequest({
+			url: '/getInfo',
+			method: 'get',
+		})
+	},
+	//刷新令牌
+	refreshToken(data) {
+		return myRequest({
+			url: '/refreshToken/' + data,
+			method: 'get',
+			noToken: true
+		})
+	},
+}

+ 13 - 0
common/httpList/polyvVideo.js

@@ -0,0 +1,13 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//获取保利威视频小程序播放凭证
+	polyvVideoSign(data) {
+		return myRequest({
+			url: '/polyv/video/sign/' + data,
+			method: 'get',
+			// noToken: true
+		})
+	},
+}

+ 24 - 0
common/methodTool.js

@@ -0,0 +1,24 @@
+import store from '@/store/index.js'
+import api from './api.js'
+export default {
+	isLogin() {
+		return new Promise((resolve, reject) => {
+			if (store.state.token === "") {
+				uni.getStorage({
+					key: 'union_id',
+					success: function(res) {
+						api.refreshToken(res.data).then(result => {
+							store.state.token = result.data.token
+							resolve(true)
+						})
+					},
+					fail: function(err) {
+						resolve(false)
+					}
+				});
+			} else {
+				resolve(true)
+			}
+		})
+	},
+}

+ 65 - 0
common/request.js

@@ -0,0 +1,65 @@
+const BASE_URL = 'http://192.168.0.222:8088'
+import store from '@/store/index.js'
+import api from './api.js'
+var num = 1
+export const myRequest = (options) => {
+	// uni.showLoading({
+	// 	title:'拼命加载中...'
+	// })
+	return new Promise((resolve, reject) => {
+		uni.request({
+			url: BASE_URL + options.url,
+			method: options.method || 'GET',
+			data: options.data,
+			header: options.noToken ? {} : {
+				AuthorizationToken: 'WX ' + store.state.token
+			},
+			success: async (res) => {
+				if (res.data.code == 401) {
+					if (num <= 3) {
+						num++
+						res = await doRequest(options)
+					};
+				}
+				resolve(res)
+			},
+			fail: (err) => {
+				uni.showToast({
+					title: "请求接口失败"
+				})
+				reject(JSON.stringify(err))
+			}
+			// complete:()=>{
+			// 	uni.hideLoading()
+			// }
+		})
+	})
+	async function doRequest(response) {
+		var datas = {
+			url: '/refreshToken/' + uni.getStorageSync('union_id'),
+			method: 'get',
+			noToken: true
+		}
+		const res = await myRequest(datas)
+		if (res.data.code === 200) {
+			store.state.token = res.data.data.token
+			let onset = await myRequest(response)
+			console.log(onset)
+			return onset
+		} else {
+			uni.removeStorageSync('union_id')
+			uni.showToast({
+				title: '登陆过期请重新登陆!',
+				icon: 'none',
+				duration: 1500,
+				success() {
+					setTimeout(() => {
+						uni.navigateTo({
+							url: '/pages/login/login'
+						});
+					}, 1500)
+				}
+			})
+		}
+	}
+}

+ 290 - 278
components/home.vue

@@ -1,310 +1,322 @@
 <template>
 <template>
 	<view>
 	<view>
-		
 		<view style="z-index: 999;">
 		<view style="z-index: 999;">
-			<u-navbar  title="中正云学堂" :is-back="false">
-				<view class="slot-wrap">
-					<image src="/static/search.png" class="search" @click="jumpSearch"></image>
-					
-				</view>
+			<u-navbar title="中正云学堂" :is-back="false">
+				<view class="slot-wrap"><image src="/static/search.png" class="search" @click="jumpSearch"></image></view>
 			</u-navbar>
 			</u-navbar>
 		</view>
 		</view>
-		<scroll-view scroll-y="true" @scroll="scroll" :style="'height: '+windowHeight+'px;'" >
-		<view class="box">
-			<view class="my_swiper">
-				<u-swiper :list="list" height="330" border-radius="25" mode="none"></u-swiper>
-			</view>
-			<!-- 日历-->
-			<view class="calendar_card">
-				<view class="card_box">
+		<scroll-view scroll-y="true" @scroll="scroll" :style="'height: ' + windowHeight + 'px;'" @scrolltolower="scrollTolower">
+			<view class="box">
+				<view class="my_swiper"><u-swiper :list="list" height="330" border-radius="25" mode="none"></u-swiper></view>
+				<!-- 日历-->
+				<view class="calendar_card">
+					<view class="card_box">
+						<u-row gutter="16">
+							<u-col span="11">
+								<view>
+									<text class="t1">距离</text>
+									<text class="t2">二级建造师</text>
+									<text class="t1">考试</text>
+									<text class="t3">365</text>
+									<text class="t1">天,继续加油哦!</text>
+								</view>
+							</u-col>
+							<u-col span="1">
+								<view @click="jumpPlan"><image src="/static/more.png" class="img_more"></image></view>
+							</u-col>
+						</u-row>
+					</view>
+					<u-line color="#EEEEEE" />
+					<view style="width: 100%;display: flex;justify-content:center;margin-top: 20rpx;">
+						<view v-for="(item, index) in date" :key="index" class="card_date">{{ item }}</view>
+					</view>
+					<view style="width: 100%;display: flex;justify-content:center;margin-top: 40rpx;">
+						<view v-for="(item, index) in date_num" :key="index" class="date_num">{{ item }}</view>
+					</view>
+					<view style="width: 100%;margin-top: 20rpx;">
+						<u-row gutter="16">
+							<u-col span="2" text-align="center">
+								<view><image src="/static/left.png" class="arr-icon"></image></view>
+							</u-col>
+							<u-col span="8" text-align="center"><view class="course_title">二级建造师市政公用工程</view></u-col>
+							<u-col span="2" text-align="center">
+								<view><image src="/static/right.png" class="arr-icon"></image></view>
+							</u-col>
+						</u-row>
+					</view>
+				</view>
+				<!-- 筛选-->
+				<view style="margin-top: 20rpx;">
 					<u-row gutter="16">
 					<u-row gutter="16">
-						<u-col span="11">
-							<view >
-								<text class="t1">距离</text>
-								<text class="t2">二级建造师</text>	
-								<text class="t1">考试</text>
-								<text class="t3">365</text>
-								<text class="t1">天,继续加油哦!</text>
-							</view>	
-						</u-col>
 						<u-col span="1">
 						<u-col span="1">
-							<view @click="jumpPlan">
-								<image src="/static/more.png" class="img_more"></image>
-							</view>
+							<view style="padding: 5rpx;"><image src="/static/select.png" class="arr-icon" @click="show = true"></image></view>
 						</u-col>
 						</u-col>
-					</u-row>
-				</view>
-				<u-line color="#EEEEEE" />
-				<view style="width: 100%;display: flex;justify-content:center;margin-top: 20rpx;">
-					<view v-for="(item,index) in date" :key="index" class="card_date">{{item}}</view>
-				</view>
-				<view style="width: 100%;display: flex;justify-content:center;margin-top: 40rpx;">
-					<view v-for="(item,index) in date_num" :key="index" class="date_num">{{item}}</view>
-				</view>
-				<view style="width: 100%;margin-top: 20rpx;">
-					<u-row gutter="16">
-						<u-col span="2" text-align="center">
+						<u-col span="11">
 							<view>
 							<view>
-								<image src="/static/left.png" class="arr-icon"></image>
-							</view>
-						</u-col>
-						<u-col span="8" text-align="center">
-							<view class="course_title">二级建造师市政公用工程</view>
-						</u-col>
-						<u-col span="2" text-align="center">
-							<view >
-								<image src="/static/right.png" class="arr-icon"></image>
+								<u-subsection
+									@change="sectionChange"
+									height="54"
+									button-color="#2F4379"
+									bg-color="#F8F9FF"
+									active-color="#FFFFFF"
+									inactive-color="#636A75"
+									:list="tab_list"
+									:current="current"
+								></u-subsection>
 							</view>
 							</view>
 						</u-col>
 						</u-col>
 					</u-row>
 					</u-row>
 				</view>
 				</view>
-			</view>
-			<!-- 筛选-->
-			<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>
-					</u-col>
-					<u-col span="11" >
-						<view>
-							<u-subsection @change="sectionChange"  height="54" button-color="#2F4379" bg-color="#F8F9FF" active-color="#FFFFFF" inactive-color="#636A75" :list="tab_list" :current="current"></u-subsection>
-						</view>
-					</u-col>
-				</u-row>
-			</view>
-			<!-- 列表-->
-			<view>
-				<view @click="jumpDetail"  class="list_box" v-for="(item,index) in list1" :key="index">
-					<image src="/static/banner.png" class="list_img"></image>
-					<view class="list_content">
-						<view style="margin-left: 280rpx;margin-top: 10rpx;">
-							<view class="list_title">二级建造师建筑工程(全科)</view>
-							<view class="old_price">原价:¥599</view>
-							<view class="price">现价:¥0</view>
+				<!-- 列表-->
+				<view>
+					<view @click="jumpDetail" class="list_box" v-for="(item, index) in list1" :key="index">
+						<image src="http://192.168.0.222:8080/img/banner1.png" class="list_img"></image>
+						<view class="list_content">
+							<view style="margin-left: 280rpx;margin-top: 10rpx;">
+								<view class="list_title">{{item.courseName}}</view>
+								<view class="old_price">原价:¥{{item.price}}</view>
+								<view class="price">现价:¥{{item.price}}</view>
+							</view>
 						</view>
 						</view>
 					</view>
 					</view>
-					
 				</view>
 				</view>
-			</view>
-			<u-popup v-model="show">
-				<view style="width: 600rpx">
-					<view class="popup_t1">
-						选择你需要的
-					</view>
+				<view v-if="showStatus" style="text-align: center;margin-top: 24rpx;">
+					到底啦~
 				</view>
 				</view>
-			</u-popup>
-		</view>
-		</scroll-view>  
+				<u-popup v-model="show">
+					<view style="width: 600rpx"><view class="popup_t1">选择你需要的</view></view>
+				</u-popup>
+			</view>
+		</scroll-view>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
-	export default {
-		name:"home",
-		data() {
-			return {
-				show: false,
-				tab_list: [
-					{
-						name: '课程'
-					}, 
-					{
-						name: '刷题'
-					}, 
-					{
-						name: '重点考点'
-					}
-				],
-				current: 0,
-				list: [{
-						image: '/static/banner.png',
-					},
-					{
-						image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
-					},
-					{
-						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
-					}
-				],
-				date:['日','一','二','三','四','五','六'],
-				date_num:[23,24,25,26,27,28,29],
-				list1:[23,24,25,26,27,28,29,23,24,25,26,27,28,29,23,24,25,26,27,28,29],
-				windowHeight:0,
-			};
-		},
-		mounted(){
-			this.windowHeight = uni.getSystemInfoSync().windowHeight 
-			console.log(this.windowHeight)
-		},
-		methods: {
-			scroll(){
-				console.log(43)
-			},
-			sectionChange(index) {
-				this.current = index;
-			},
-			jumpDetail(){
-				if(this.current==0){
-					this.$navTo.togo('/pages/course/detail', {})
-					return 
+export default {
+	name: 'home',
+	data() {
+		return {
+			show: false,
+			tab_list: [
+				{
+					name: '课程'
+				},
+				{
+					name: '刷题'
+				},
+				{
+					name: '重点考点'
 				}
 				}
-				if(this.current==1){
-					this.$navTo.togo('/pages/bank/detail', {})
-					return 
+			],
+			current: 0,
+			list: [
+				{
+					image: 'http://192.168.0.222:8080/img/banner1.png'
+				},
+				{
+					image: 'https://cdn.uviewui.com/uview/swiper/2.jpg'
+				},
+				{
+					image: 'https://cdn.uviewui.com/uview/swiper/3.jpg'
 				}
 				}
-				if(this.current==2){
-					this.$navTo.togo('/pages/course/keynote', {})
-					return 
+			],
+			pageNum:1,
+			pageSize: 10,
+			date: ['日', '一', '二', '三', '四', '五', '六'],
+			date_num: [23, 24, 25, 26, 27, 28, 29],
+			list1: [],
+			windowHeight: 0,
+			showStatus: false,
+		};
+	},
+	onLoad(){},
+	mounted() {
+		this.windowHeight = uni.getSystemInfoSync().windowHeight;
+		this.initList()
+	},
+	methods: {
+		initList(){
+			var self = this
+			var data = {
+				status: '1',
+				pageNum : this.pageNum,
+				pageSize: this.pageSize
+			}
+			this.$api.courselist(data).then(res => {
+				if(self.list1.length === res.data.total){
+					this.showStatus = true
+				}else{
+					res.data.rows.forEach((item,index) => {
+						self.list1.push(item)
+					})
 				}
 				}
-			},
-			jumpPlan(){
-				this.$navTo.togo('/pages/plan/detail', {})
-			},
-			jumpSearch(){
-				this.$navTo.togo('/pages/index/search', {})
+			})
+		},
+		scroll(e) {},
+		scrollTolower(){
+			this.pageNum++
+			this.initList()
+		},
+		sectionChange(index) {
+			this.current = index;
+		},
+		jumpDetail() {
+			if (this.current == 0) {
+				this.$navTo.togo('/pages2/course/detail', {});
+				return;
+			}
+			if (this.current == 1) {
+				this.$navTo.togo('/pages2/bank/detail', {});
+				return;
 			}
 			}
-			
-		
+			if (this.current == 2) {
+				this.$navTo.togo('/pages2/course/keynote', {});
+				return;
+			}
+		},
+		jumpPlan() {
+			this.$navTo.togo('/pages2/plan/detail', {});
 		},
 		},
+		jumpSearch() {
+			this.$navTo.togo('/pages2/index/search', {});
+		}
 	}
 	}
+};
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
+.search {
+	width: 40rpx;
+	height: 40rpx;
+	margin-left: 30rpx;
+}
+.slot-wrap {
+	display: flex;
+	align-items: center;
+}
+.popup_t1 {
+	height: 29rpx;
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #131b31;
+	margin: 100rpx;
+}
+.price {
+	font-size: 20rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #ff0000;
+	margin-top: 8rpx;
+}
+.old_price {
+	font-size: 24rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	text-decoration: line-through;
+	color: #999999;
+	margin-top: 8rpx;
+}
+.list_title {
+	font-size: 24rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #2f4379;
+}
+.list_content {
+	width: 656rpx;
+	height: 134rpx;
+	background: #ffffff;
+	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.1);
+	border-radius: 24rpx;
+	position: absolute;
+	top: 20rpx;
+	left: 20rpx;
+}
+.list_box {
+	position: relative;
+	width: 100%;
+	margin-top: 30rpx;
+}
+.list_img {
+	width: 278rpx;
+	height: 134rpx;
+	z-index: 100;
+	position: relative;
+}
+.course_title {
+	color: #2f4379;
+	box-shadow: 0rpx 0rpx 9rpx 1rpx rgba(47, 67, 121, 0.1);
+	border-radius: 28rpx;
+	width: 100%;
+	height: 48rpx;
+	line-height: 48rpx;
+}
+.arr-icon {
+	width: 40rpx;
+	height: 40rpx;
+}
+.wrap {
+	padding: 24rpx;
+}
 
 
-.search{
-		width: 40rpx;
-		height: 40rpx;
-		margin-left: 30rpx;
-	}
-	.slot-wrap {
-			display: flex;
-			align-items: center;
-		}
-	.popup_t1{
-		height: 29rpx;
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #131B31;
-		margin: 100rpx;
-	}
-	.price{
-		font-size: 20rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #FF0000;
-		margin-top: 8rpx;
-	}
-	.old_price{
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		text-decoration: line-through;
-		color: #999999;
-		margin-top: 8rpx;
-	}
-	.list_title{
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #2F4379;
-	}
-	.list_content{
-		width: 656rpx;
-		height: 134rpx;
-		background: #FFFFFF;
-		box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.1);
-		border-radius: 24rpx;
-		position: absolute;
-		top:20rpx;
-		left:20rpx;
-	}
-	.list_box{
-		position: relative;
-		width: 100%;
-		margin-top: 30rpx;
-	}
-	.list_img{
-		width: 278rpx;
-		height: 134rpx;
-		z-index: 100;
-		position: relative;
-	}
-	.course_title{
-		color: #2F4379;
-		box-shadow: 0rpx 0rpx 9rpx 1rpx rgba(47, 67, 121, 0.1);
-		border-radius: 28rpx;
-		width: 100%;
-		height: 48rpx;
-		line-height: 48rpx;
-	}
-	.arr-icon{
-		width: 40rpx;
-		height: 40rpx;
-	}
-	.wrap {
-			padding: 24rpx;
-		}
-	
-		.u-row {
-			margin: 40rpx 0;
-		}
-	.date_num{
-		width: 14%;
-		text-align: center;
-		color: #34C759;
-	}
-	.card_date{
-		width: 14%;
-		text-align: center;
-		color: #7F8CAF;
-	}
-	page {
-		background: #ffffff;
-		font-size: 28rpx;
-	}
-	.calendar_card{
-		width: 100%;
-		height: 300rpx;
-		background: #FFFFFF;
-		box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.1);
-		border-radius: 22rpx;
-		margin-top: 25rpx;
-	}
-	.box{
-		margin: 30rpx;
-	}
-	.my_swiper{
-		box-shadow: 0rpx 20rpx 16rpx 4rpx rgba(47, 67, 121, 0.08);
-		border-radius: 25rpx;
-	}
-	.calendar_card .card_box{
-		height: 60rpx;
-		line-height: 60rpx;
-		margin-left: 40rpx;
-	}
-	.calendar_card .t1{
-		color: #7F8CAF;
-		font-size: 24rpx;	
-	}
-	.calendar_card .t2{
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #32467B;
-		margin: 0 10rpx;
-	}
-	.calendar_card .t3{
-		font-size: 30rpx;
-		font-weight: bold;
-		color: #32467B;
-		text-shadow: 0rpx 3rpx 3rpx rgba(0, 0, 0, 0.2);
-		margin: 0 10rpx;
-	}
-	.img_more{
-		width: 26rpx;
-		height: 26rpx;
-	}
+.u-row {
+	margin: 40rpx 0;
+}
+.date_num {
+	width: 14%;
+	text-align: center;
+	color: #34c759;
+}
+.card_date {
+	width: 14%;
+	text-align: center;
+	color: #7f8caf;
+}
+page {
+	background: #ffffff;
+	font-size: 28rpx;
+}
+.calendar_card {
+	width: 100%;
+	height: 300rpx;
+	background: #ffffff;
+	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.1);
+	border-radius: 22rpx;
+	margin-top: 25rpx;
+}
+.box {
+	margin: 30rpx;
+}
+.my_swiper {
+	box-shadow: 0rpx 20rpx 16rpx 4rpx rgba(47, 67, 121, 0.08);
+	border-radius: 25rpx;
+}
+.calendar_card .card_box {
+	height: 60rpx;
+	line-height: 60rpx;
+	margin-left: 40rpx;
+}
+.calendar_card .t1 {
+	color: #7f8caf;
+	font-size: 24rpx;
+}
+.calendar_card .t2 {
+	font-size: 24rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #32467b;
+	margin: 0 10rpx;
+}
+.calendar_card .t3 {
+	font-size: 30rpx;
+	font-weight: bold;
+	color: #32467b;
+	text-shadow: 0rpx 3rpx 3rpx rgba(0, 0, 0, 0.2);
+	margin: 0 10rpx;
+}
+.img_more {
+	width: 26rpx;
+	height: 26rpx;
+}
 </style>
 </style>

+ 12 - 12
components/my.vue

@@ -5,20 +5,20 @@
 		<view class="head">
 		<view class="head">
 			<u-row >
 			<u-row >
 				<u-col span="3" offset="1">
 				<u-col span="3" offset="1">
-					<navigator url="/pages/wd/avatar" hover-class="none">
+					<navigator url="/pages2/wd/avatar" hover-class="none">
 						<image src="/static/avatar.png" class="avatar"></image>
 						<image src="/static/avatar.png" class="avatar"></image>
 					</navigator>
 					</navigator>
 				</u-col>
 				</u-col>
 				<u-col span="6">
 				<u-col span="6">
 					<view style="display: flex;">
 					<view style="display: flex;">
-						<navigator class="name" url="/pages/wd/avatar" hover-class="none">
+						<navigator class="name" url="/pages2/wd/avatar" hover-class="none">
 							李宏杰
 							李宏杰
 						</navigator>
 						</navigator>
-						<navigator class="tag" url="/pages/wd/level" hover-class="none">
+						<navigator class="tag" url="/pages2/wd/level" hover-class="none">
 							天资过人
 							天资过人
 						</navigator>
 						</navigator>
 					</view>
 					</view>
-					<navigator url="/pages/wd/level" hover-class="none" style="position: relative;margin-top: 20rpx;">
+					<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">349/1000</view>
 						<u-line-progress height="8" active-color="#2F4379" :percent="70" :show-percent="false"></u-line-progress>
 						<u-line-progress height="8" active-color="#2F4379" :percent="70" :show-percent="false"></u-line-progress>
 					</navigator>
 					</navigator>
@@ -30,7 +30,7 @@
 			<view style="margin-top: 20rpx;">
 			<view style="margin-top: 20rpx;">
 				<u-row >
 				<u-row >
 					<u-col span="4"  text-align="center">
 					<u-col span="4"  text-align="center">
-						<navigator url="/pages/wd/collect" hover-class="none">
+						<navigator url="/pages2/wd/collect" hover-class="none">
 							<view class="head_t1">
 							<view class="head_t1">
 								收藏
 								收藏
 							</view>
 							</view>
@@ -40,7 +40,7 @@
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
 					<u-col span="4" offset="4" text-align="center">
 					<u-col span="4" offset="4" text-align="center">
-						<navigator url="/pages/wd/ranking" hover-class="none">
+						<navigator url="/pages2/wd/ranking" hover-class="none">
 						<view class="head_t1">
 						<view class="head_t1">
 							学习排名
 							学习排名
 						</view>
 						</view>
@@ -61,7 +61,7 @@
 				</view>
 				</view>
 				<scroll-view class="r_sliper" scroll-x="true" >
 				<scroll-view class="r_sliper" scroll-x="true" >
 					<view v-for="(item,index) in list" :key="index" style="margin-right: 20rpx;display:inline-block">
 					<view v-for="(item,index) in list" :key="index" style="margin-right: 20rpx;display:inline-block">
-						<image src="/static/banner.png" class="r_image"></image>
+						<image src="http://192.168.0.222:8080/img/banner1.png" class="r_image"></image>
 						<view class="r_t2">
 						<view class="r_t2">
 							二级建造师市政公用工程
 							二级建造师市政公用工程
 						</view>
 						</view>
@@ -72,22 +72,22 @@
 			<view class="module">
 			<view class="module">
 				<u-row >
 				<u-row >
 					<u-col span="3" text-align="center">
 					<u-col span="3" text-align="center">
-						<navigator url="/pages/study/index" hover-class="none">
+						<navigator url="/pages2/study/index" hover-class="none">
 							<image src="/static/tool_1.png" class="tool_img"></image><view class="tool_t">我的学习</view>
 							<image src="/static/tool_1.png" class="tool_img"></image><view class="tool_t">我的学习</view>
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
 					<u-col span="3" text-align="center">
 					<u-col span="3" text-align="center">
-						<navigator url="/pages/wd/menu" hover-class="none">
+						<navigator url="/pages2/wd/menu" hover-class="none">
 							<image src="/static/tool_2.png" class="tool_img"></image><view class="tool_t">基本资料</view>
 							<image src="/static/tool_2.png" class="tool_img"></image><view class="tool_t">基本资料</view>
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
 					<u-col span="3" text-align="center">
 					<u-col span="3" text-align="center">
-						<navigator url="/pages/wd/help" hover-class="none">
+						<navigator url="/pages2/wd/help" hover-class="none">
 							<image src="/static/tool_3.png" class="tool_img"></image><view class="tool_t">助学活动</view>
 							<image src="/static/tool_3.png" class="tool_img"></image><view class="tool_t">助学活动</view>
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
 					<u-col span="3" text-align="center">
 					<u-col span="3" text-align="center">
-						<navigator url="/pages/wd/coupon" hover-class="none">
+						<navigator url="/pages2/wd/coupon" hover-class="none">
 							<image src="/static/tool_7.png" class="tool_img"></image><view class="tool_t">优惠券</view>
 							<image src="/static/tool_7.png" class="tool_img"></image><view class="tool_t">优惠券</view>
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
@@ -95,7 +95,7 @@
 				<view style="margin-top: 30rpx;">
 				<view style="margin-top: 30rpx;">
 					<u-row >
 					<u-row >
 						<u-col span="3" text-align="center">
 						<u-col span="3" text-align="center">
-							<navigator url="/pages/wd/enroll" hover-class="none">
+							<navigator url="/pages2/wd/enroll" hover-class="none">
 								<image src="/static/tool_5.png" class="tool_img"></image><view class="tool_t">考试报名</view>
 								<image src="/static/tool_5.png" class="tool_img"></image><view class="tool_t">考试报名</view>
 							</navigator>
 							</navigator>
 						</u-col>
 						</u-col>

+ 8 - 5
main.js

@@ -1,16 +1,19 @@
 import Vue from 'vue'
 import Vue from 'vue'
 import App from './App'
 import App from './App'
 //异步请求
 //异步请求
-import http from '@/common/http';
-Vue.prototype.$http = http
-import store from './store'  
-Vue.prototype.$store = store  
+import api from '@/common/api'
+Vue.prototype.$api = api
+import store from './store'
+Vue.prototype.$store = store
 //提示框
 //提示框
 import layer from '@/common/layer'
 import layer from '@/common/layer'
 Vue.prototype.$layer = layer
 Vue.prototype.$layer = layer
 // 页面跳转
 // 页面跳转
 import * as navTo from '@/common/navTo'
 import * as navTo from '@/common/navTo'
 Vue.prototype.$navTo = navTo
 Vue.prototype.$navTo = navTo
+// 验证登入有效等...
+import method from '@/common/methodTool'
+Vue.prototype.$method = method
 
 
 import uView from "uview-ui";
 import uView from "uview-ui";
 Vue.use(uView);
 Vue.use(uView);
@@ -20,6 +23,6 @@ Vue.config.productionTip = false
 App.mpType = 'app'
 App.mpType = 'app'
 
 
 const app = new Vue({
 const app = new Vue({
-    ...App
+	...App
 })
 })
 app.$mount()
 app.$mount()

+ 4 - 1
manifest.json

@@ -86,7 +86,10 @@
             "scope.userLocation" : {
             "scope.userLocation" : {
                 "desc" : "你的位置信息将用于小程序位置接口的效果展示"
                 "desc" : "你的位置信息将用于小程序位置接口的效果展示"
             }
             }
-        }
+        },
+		"optimization":{
+			"subPackages": true
+		}
     },
     },
     "mp-alipay" : {
     "mp-alipay" : {
         "usingComponents" : true
         "usingComponents" : true

+ 2 - 30
package-lock.json

@@ -1,36 +1,8 @@
 {
 {
-  "name": "zscxqj-applet",
+  "name": "zz-applet",
   "version": "1.0.0",
   "version": "1.0.0",
-  "lockfileVersion": 2,
+  "lockfileVersion": 1,
   "requires": true,
   "requires": true,
-  "packages": {
-    "": {
-      "name": "zscxqj-applet",
-      "version": "1.0.0",
-      "license": "ISC",
-      "dependencies": {
-        "jweixin-module": "^1.6.0",
-        "tki-qrcode": "^0.1.6",
-        "uview-ui": "^1.8.3"
-      },
-      "devDependencies": {}
-    },
-    "node_modules/jweixin-module": {
-      "version": "1.6.0",
-      "resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
-      "integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
-    },
-    "node_modules/tki-qrcode": {
-      "version": "0.1.6",
-      "resolved": "https://registry.npmjs.org/tki-qrcode/-/tki-qrcode-0.1.6.tgz",
-      "integrity": "sha512-EnnlS8psowC7PsW3MDYcxvJYkuklX3WAZ/BYanR4TdBHTu74GfjTBX8Y16REP+AeDENiVtBPh4jtTRL2P736hQ=="
-    },
-    "node_modules/uview-ui": {
-      "version": "1.8.3",
-      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.3.tgz",
-      "integrity": "sha512-DqKc+qRrOZLPcyfWv4b0HspSS9n1Cd6BbgKiYEv9rjTAnWoqJV7rXsvWqZdr5iKGP5EMNbNS741GLNw4sIHbpw=="
-    }
-  },
   "dependencies": {
   "dependencies": {
     "jweixin-module": {
     "jweixin-module": {
       "version": "1.6.0",
       "version": "1.6.0",

+ 160 - 157
pages.json

@@ -5,222 +5,224 @@
 			"style": {
 			"style": {
 				"navigationBarTitleText": "中正云学堂",
 				"navigationBarTitleText": "中正云学堂",
 				"enablePullDownRefresh": true,
 				"enablePullDownRefresh": true,
-				"onReachBottomDistance":50,
+				"onReachBottomDistance": 50,
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false //禁用原生导航栏  
-				    }  ,
-				"navigationStyle": "custom" ,// 隐藏系统导航栏
-				"navigationBarTextStyle": "white" 
-			} 
-		}
-		,{
-			"path" : "pages/plan/detail",
-			"style" : {
-				"navigationBarTitleText": "学习计划",
+					"titleNView": false //禁用原生导航栏  
+				},
+				"navigationStyle": "custom", // 隐藏系统导航栏
+				"navigationBarTextStyle": "white"
+			}
+		}, {
+			"path": "pages/wd/index",
+			"style": {
+				"navigationBarTitleText": "我的",
+				"app-plus": {
+					"titleNView": false //禁用原生导航栏  
+				}
+			}
+		}, {
+			"path": "pages/login/login",
+			"style": {
+				"navigationBarTitleText": "登录页",
+				"navigationBarBackgroundColor": "#0386FD",
+				"navigationBarTextStyle": "white",
+				"navigationStyle": "custom", // 隐藏系统导航栏
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
 		}
 		}
-		,{
-			"path" : "pages/wd/index",
-			"style" : {
-				"navigationBarTitleText": "我的",
+	],
+	"subPackages": [{
+		"root": "pages2",
+		"pages": [{
+			"path": "plan/detail",
+			"style": {
+				"navigationBarTitleText": "学习计划",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false //禁用原生导航栏  
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/index/search",
-			"style" : {
+		}, {
+			"path": "index/search",
+			"style": {
 				"navigationBarTitleText": "搜索",
 				"navigationBarTitleText": "搜索",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/course/detail",
-			"style" : {
+		}, {
+			"path": "course/detail",
+			"style": {
 				"navigationBarTitleText": "课程详情",
 				"navigationBarTitleText": "课程详情",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false //禁用原生导航栏 
-				    } ,
-				 "mp-weixin": {
-					   "usingComponents": {
-						 "polyv-player": "plugin://polyv-player/player"
-					   }
-					 }
-			}
-		},{
-			"path" : "pages/wd/info",
-			"style" : {
+					"titleNView": false //禁用原生导航栏 
+				},
+				"mp-weixin": {
+					"usingComponents": {
+						"polyv-player": "plugin://polyv-player/player"
+					}
+				}
+			}
+		}, {
+			"path": "wd/info",
+			"style": {
 				"navigationBarTitleText": "基本信息",
 				"navigationBarTitleText": "基本信息",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/wd/menu",
-			"style" : {
+		}, {
+			"path": "wd/menu",
+			"style": {
 				"navigationBarTitleText": "基本资料",
 				"navigationBarTitleText": "基本资料",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/wd/edu_info",
-			"style" : {
+		}, {
+			"path": "wd/edu_info",
+			"style": {
 				"navigationBarTitleText": "教育信息",
 				"navigationBarTitleText": "教育信息",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/study/index",
-			"style" : {
+		}, {
+			"path": "study/index",
+			"style": {
 				"navigationBarTitleText": "我的学习",
 				"navigationBarTitleText": "我的学习",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/wd/collect",
-			"style" : {
+		}, {
+			"path": "wd/collect",
+			"style": {
 				"navigationBarTitleText": "我的收藏",
 				"navigationBarTitleText": "我的收藏",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/wd/ranking",
-			"style" : {
+		}, {
+			"path": "wd/ranking",
+			"style": {
 				"navigationBarTitleText": "排行榜",
 				"navigationBarTitleText": "排行榜",
 				"navigationBarBackgroundColor": "#0386FD",
 				"navigationBarBackgroundColor": "#0386FD",
 				"navigationBarTextStyle": "white",
 				"navigationBarTextStyle": "white",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/login/login",
-			"style" : {
-				"navigationBarTitleText": "登录页",
-				"navigationBarBackgroundColor": "#0386FD",
-				"navigationBarTextStyle": "white",
-				"navigationStyle": "custom" ,// 隐藏系统导航栏
-				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
-			}
-		},{
-			"path" : "pages/wd/avatar",
-			"style" : {
+		}, {
+			"path": "wd/avatar",
+			"style": {
 				"navigationBarTitleText": "头像昵称",
 				"navigationBarTitleText": "头像昵称",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/wd/level",
-			"style" : {
+		}, {
+			"path": "wd/level",
+			"style": {
 				"navigationBarTitleText": "我的等级",
 				"navigationBarTitleText": "我的等级",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/wd/help",
-			"style" : {
+		}, {
+			"path": "wd/help",
+			"style": {
 				"navigationBarTitleText": "助学活动",
 				"navigationBarTitleText": "助学活动",
 				"navigationBarTextStyle": "white",
 				"navigationBarTextStyle": "white",
-				"navigationStyle": "custom" ,// 隐藏系统导航栏
+				"navigationStyle": "custom", // 隐藏系统导航栏
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/wd/coupon",
-			"style" : {
+		}, {
+			"path": "wd/coupon",
+			"style": {
 				"navigationBarTitleText": "优惠券",
 				"navigationBarTitleText": "优惠券",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/course/keynote",
-			"style" : {
+		}, {
+			"path": "course/keynote",
+			"style": {
 				"navigationBarTitleText": "重点考点详情",
 				"navigationBarTitleText": "重点考点详情",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/course/read",
-			"style" : {
+		}, {
+			"path": "course/read",
+			"style": {
 				"navigationBarTitleText": "阅读",
 				"navigationBarTitleText": "阅读",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/bank/detail",
-			"style" : {
+		}, {
+			"path": "bank/detail",
+			"style": {
 				"navigationBarTitleText": "题库详情",
 				"navigationBarTitleText": "题库详情",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/bank/question",
-			"style" : {
+		}, {
+			"path": "bank/question",
+			"style": {
 				"navigationBarTitleText": "错题集",
 				"navigationBarTitleText": "错题集",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/wd/enroll",
-			"style" : {
+		}, {
+			"path": "wd/enroll",
+			"style": {
 				"navigationBarTitleText": "考试报名",
 				"navigationBarTitleText": "考试报名",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
 			}
 			}
-		},{
-			"path" : "pages/plan/edit",
-			"style" : {
+		}, {
+			"path": "plan/edit",
+			"style": {
 				"navigationBarTitleText": "修改计划",
 				"navigationBarTitleText": "修改计划",
 				"app-plus": {
 				"app-plus": {
-				        "titleNView": false ,//禁用原生导航栏 
-						"bounce":"none"
-				    }  
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
+			}
+		}],
+		"plugins": {
+			"polyv-player": {
+				"version": "0.1.5",
+				"provider": "wx4a350a258a6f7876"
 			}
 			}
 		}
 		}
-    ],
-	"plugins": {
-	  "polyv-player": {
-	    "version": "0.1.7",
-	    "provider": "wx4a350a258a6f7876"
-	  }
-	},
+	}],
 	"globalStyle": {
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "WeChat",
 		"navigationBarTitleText": "WeChat",
@@ -232,8 +234,7 @@
 		"selectedColor": "#2F4379",
 		"selectedColor": "#2F4379",
 		"borderStyle": "black",
 		"borderStyle": "black",
 		"backgroundColor": "#fff",
 		"backgroundColor": "#fff",
-		"list": [
-			{
+		"list": [{
 				"pagePath": "pages/index/index",
 				"pagePath": "pages/index/index",
 				"iconPath": "static/nav1.png",
 				"iconPath": "static/nav1.png",
 				"selectedIconPath": "static/nav1_on.png",
 				"selectedIconPath": "static/nav1_on.png",
@@ -248,7 +249,9 @@
 		]
 		]
 	},
 	},
 	"navigateToMiniProgramAppIdList": [
 	"navigateToMiniProgramAppIdList": [
-	    ""
+		""
 	],
 	],
-	"easycom": {"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"}
+	"easycom": {
+		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
+	}
 }
 }

+ 0 - 428
pages/course/detail.vue

@@ -1,428 +0,0 @@
-<template>
-	<view >
-			<view style="position: fixed;width: 100%;z-index: 999;background: #FFFFFF;" id='top'>
-				<view class="video_box">
-					<image src="https://cdn.uviewui.com/uview/swiper/3.jpg" style="width: 100%;height: 460rpx;"></image>
-					<image class="video_play" src="/static/play.png" ></image>
-				</view>
-				<view>
-					<u-row >
-						<u-col span="8" offset="1">
-							<view class="video_t1">
-								2020年二级建造师教育选修
-							</view>
-						</u-col>
-						<u-col span="3">
-							<view class="video_t1">
-								共60课时
-							</view>
-						</u-col>
-					</u-row>
-				</view>
-				<view>
-					<u-tabs :list="list" font-size="24" bar-width="90" :current="current" @change="change" active-color="#32467B"></u-tabs>
-				</view>
-				<u-line color="#D6D6DB" />
-			</view>
-			<view class="box" @touchmove='touchMove'>
-				<view  id='modules1'>
-					<!-- 课程目录-->
-					<view style="padding-top: 15rpx;">
-						<u-row >
-							<u-col span="9" >
-								<view class="video_t2" style="display: flex;align-items: center;">
-									<view class="top_line"></view>
-									课程目录
-								</view>
-							</u-col>
-							<u-col span="3" text-align="right">
-								<view class="video_t2">
-									共60节课
-									<u-icon name="arrow-right"  size="28"></u-icon>
-								</view>
-							</u-col>
-						</u-row>
-						<view class="scroll_box">
-							<scroll-view class="r_sliper" scroll-x="true" >
-								<view v-for="(item,index) in list" :key="index" style="margin-right: 20rpx;display:inline-block">
-									<view class="r_t2">
-										二级建造师市政..
-									</view>
-								</view>
-							</scroll-view>
-						</view>
-					</view>
-					<u-line color="#D6D6DB" />
-				</view>
-				<view  id='modules2'>
-					<!-- 课程介绍-->
-					<view style="padding-top: 15rpx;">
-						<u-row >
-							<u-col span="8" >
-								<view class="video_t2" style="display: flex;align-items: center;">
-									<view class="top_line"></view>
-									课程介绍
-								</view>
-							</u-col>
-						</u-row>
-					</view>
-					<view class="t2">
-						这是一段课程介绍文本,课程介绍内容可在后台设置编辑,以富
-						文本形式呈现,常见的由图片和文本组成。
-					</view>
-					<u-line color="#D6D6DB" />
-				</view>
-				<!-- 出题名师-->
-				<view  id='modules3'>
-					<view style="padding: 15rpx 0;">
-						<u-row >
-							<u-col span="8" >
-								<view class="video_t2" style="display: flex;align-items: center;">
-									<view class="top_line"></view>
-									出题名师
-								</view>
-							</u-col>
-						</u-row>
-						<u-row >
-							<view style="margin: 25rpx;display: flex;">
-								<view >
-									<image src="/static/avatar1.png" class="teacher_img"></image>
-								</view>
-								<view class="teacher_t">
-									建工学院名誉院长,建造师建筑资深导师,北京工业大学教授,建造师考试大纲编委会编委。参与过国家一级注册建造师考试大纲、考试辅导书、习题集等书的编写。
-								</view>
-							</view>
-						</u-row>
-					</view>
-					<u-line color="#D6D6DB" />
-				</view>
-				<!-- 相关推荐-->
-				<view style="padding-top: 15rpx;" id='modules4' :style="'padding-bottom:'+modules4Bottom+'px'">
-					<u-row >
-						<u-col span="8" >
-							<view class="video_t2" style="display: flex;align-items: center;">
-								<view class="top_line"></view>
-								相关推荐
-							</view>
-						</u-col>
-					</u-row>
-					<view style="margin: 10rpx;">
-						<view class="tj_box" v-for="(item,index) in list" :key="index">
-							<image src="/static/banner.png"   style="width: 320rpx;height: 160rpx;"></image>
-							<view style="font-size: 24rpx;color: #666666;d">
-								2020年二级建造师继续教...
-							</view>
-							<view>
-								<u-row >
-									<u-col span="6" >
-										<view style="margin-left: 20rpx;">
-											<image src="/static/people.png"   style="width: 20rpx;height: 20rpx;"></image>
-											<text style="color: #999999;font-size: 20rpx;margin-left: 10rpx;">2023</text>
-										</view>
-									</u-col>
-									<u-col span="6" text-align="right">
-										<text style="color: #E91313;font-size: 16rpx;margin-left: 8rpx;">
-											活动价 
-										</text>
-										<text style="color: #E91313;font-size: 24rpx;font-weight: bold;">
-											¥499
-										</text>
-									</u-col>
-								</u-row>
-							</view>
-							
-						</view>
-					</view>
-				</view>
-			</view>
-		<view  class="footer_tab" id='foot'>
-			<u-line color="#D6D6DB" />
-			<view style="height: 100%;display: flex;align-items: center;position: relative;">
-				<view style="text-align: center;margin-left: 30rpx;">
-					<image src="/static/sc.png" class="sc"></image>
-					<view class="sc_t">收藏</view>
-				</view>
-				<view style="text-align: center;margin-left: 30rpx;">
-					<view class="price_t1">¥699</view>
-					<view class="price_t2">¥699</view>
-				</view>
-				<view class="buy" @click="jumpBuy">
-					立即购买
-				</view>
-			</view>
-		</view>
-
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				list: [{
-					name: '课程目录'
-				}, {
-					name: '课程介绍'
-				}, {
-					name: '出题名师',
-				}, {
-					name: '相关推荐',
-				}],
-				current: 0,
-				h1:0,
-				h2:0,
-				h3:0,
-				h4:0,
-				hh1:0,
-				hh2:0,
-				hh3:0,
-				hh4:0,
-				foot_h:0,
-				top_h:0,
-				windowHeight:0,
-				modules4Bottom:0,
-				isClick:false
-			}
-		},
-		onLoad(option) {
-			
-		},
-		onShow(){
-			let that = this
-			const query = uni.createSelectorQuery().in(this);
-			query.select('#modules1').boundingClientRect(data => {
-				that.h1 = data.height
-				that.countHeight(that)
-			}).exec();
-			query.select('#modules2').boundingClientRect(data => {
-				that.h2 = data.height
-				that.countHeight(that)
-			}).exec();
-			query.select('#modules3').boundingClientRect(data => {
-				that.h3 = data.height
-				that.countHeight(that)
-			}).exec();
-			query.select('#modules4').boundingClientRect(data => {
-				that.h4 = data.height
-				that.countHeight(that)
-			}).exec();
-			query.select('#foot').boundingClientRect(data => {
-				that.foot_h = data.height
-				that.countModelusPadding()
-			}).exec();
-			query.select('#top').boundingClientRect(data => {
-				that.top_h = data.height
-				that.countModelusPadding()
-			}).exec();
-			this.windowHeight = uni.getSystemInfoSync().windowHeight
-		
-		},
-		onPageScroll: function (e) {
-			//防止触发两次跳动
-			if(this.isClick){
-				return
-			}
-			if(e.scrollTop<=this.hh1){
-				this.current = 0
-			}
-			if(e.scrollTop<=this.hh2&&e.scrollTop>this.hh1){
-				this.current = 1
-			}
-			if(e.scrollTop<=this.hh3&&e.scrollTop>this.hh2){
-				this.current = 2
-			}
-			if(e.scrollTop>this.hh3){
-				this.current = 3
-			}
-		},
-		methods: {
-			touchMove(e){
-				this.isClick = false
-			},
-			countModelusPadding(){
-				let offsetHeight = this.windowHeight - this.foot_h - this.top_h
-				this.modules4Bottom = offsetHeight>this.h4?(offsetHeight-this.h4):7
-			},
-			countHeight(that){
-				this.hh1 = this.h1
-				this.hh2 = this.h1 + this.h2
-				this.hh3 = this.h1 + this.h2 + this.h3
-				this.hh4 = this.h1 + this.h2 + this.h3 + this.h4
-			},
-			change(index) {
-				this.current = index;
-				let that = this
-				this.isClick = true
-				if(index==0){
-					uni.pageScrollTo({
-					    scrollTop: 0,
-					})
-				}
-				if(index==1){
-					uni.pageScrollTo({
-					    scrollTop: that.h1+4,
-					})
-				}
-				if(index==2){
-					uni.pageScrollTo({
-					    scrollTop: that.h1+that.h2+4,
-					})
-				}
-				if(index==3){
-					uni.pageScrollTo({
-					    scrollTop: that.h1+that.h2+that.h3+4,
-					})
-				}
-			},
-			jumpBuy(){
-				this.$navTo.togo('/pages/login/login', {})
-			}
-		
-		},
-		
-	}
-</script>
-<style>
-	::-webkit-scrollbar{
-		width: 0;
-		height: 0;
-		color: transparent;
-	}
-</style>
-<style scope>
-	.box{
-		position: relative;
-		top: 600rpx;
-		padding-bottom: 88rpx;
-	}
-	.price_t2{
-		font-size: 18rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		text-decoration: line-through;
-		color: #999999;
-	}
-	.price_t1{
-		font-size: 33rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #E91313;
-	}
-	.sc_t{
-		font-size: 22rpx;
-		color: #000000;
-	}
-	.sc{
-		width: 29rpx ;
-		height: 29rpx;
-	}
-	.buy{
-		width: 138rpx;
-		height: 48rpx;
-		line-height: 48rpx;
-		background: #32467B;
-		border-radius: 10rpx;
-		color: #FFFFFF;
-		font-size: 28rpx;
-		text-align: center;
-		vertical-align: middle;
-		position: absolute;
-		right: 30rpx;
-	}
-	.video_body{
-		padding-bottom: 96rpx;
-	}
-	.footer_tab{
-		position:fixed;
-		bottom:0;
-		height: 96rpx;
-		width: 100%;
-		background-color: #FFFFFF;
-	}
-	.tj_box{
-		width: 50%;
-		display: inline-block;
-		text-align: center;
-		margin: 10rpx 0;
-	}
-	.teacher_t{
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		font-weight: 400;
-		color: #666666;
-		line-height: 36rpx;
-		margin-left: 15rpx;
-	}
-	.teacher_img{
-		width: 87rpx;
-		height: 129rpx;
-	}
-	.t2{
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		color: #666666;
-		line-height: 36rpx;
-		margin: 15rpx;
-	}
-	.r_t2{
-		width: 201rpx;
-		height: 49rpx;
-		background: rgba(22, 119, 255, 0.05);
-		border: 1rpx solid #32467B;
-		border-radius: 16rpx;
-		color: #666666;
-		font-size: 23rpx;
-		text-align: center;
-		display: flex;
-		align-items: center;
-		padding: 5rpx;
-		
-	}
-	.scroll_box{
-		width: 100%;
-		height: 60rpx;
-		background: #FFFFFF;
-		box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
-		white-space:nowrap;
-		overflow: hidden;
-		margin: 15rpx 0;
-	}
-	.r_sliper{
-		padding: 0 20rpx;
-	}
-	.top_line{
-		width: 6rpx;
-		height: 22rpx;
-		background: #32467B;
-		margin-right: 10rpx;
-	}
-	.video_t2{
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #666666;
-	}
-	.video_t1{
-		font-size: 28rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #333333;
-	}
-	.video_play{
-		position:absolute;
-		width: 95rpx;
-		height: 95rpx;
-		top:0;
-		left:0;
-		right:0;
-		bottom:0;
-		margin:auto;
-	}
-	.video_box{
-		position: relative;
-	}
-	
-page {
-		background: #FFFFFF;
-	}
-</style>

+ 81 - 82
pages/login/login.vue

@@ -1,99 +1,98 @@
 <template>
 <template>
 	<view style="height: 100%;">
 	<view style="height: 100%;">
 		<image mode="widthFix" src="/static/login_bg.jpg" class="full_img"></image>
 		<image mode="widthFix" src="/static/login_bg.jpg" class="full_img"></image>
-		<u-navbar  title="登录"  background="{ background: '#ffffff',opacity:0.4; }" title-color="#ffffff" back-icon-color="#ffffff">
-			
-		</u-navbar>
-		<view style="padding: 0 40rpx;margin-top: 90%;">
-			<u-button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">微信授权登录</u-button>
-		</view>
+		<u-navbar title="登录" background="{ background: '#ffffff',opacity:0.4; }" title-color="#ffffff" back-icon-color="#ffffff"></u-navbar>
+		<view style="padding: 0 40rpx;margin-top: 90%;"><u-button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">微信授权登录</u-button></view>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
-	export default {
-		data() {
-			return {
-				code:'',
-			};
-		},
-		methods: {
-			getPhoneNumber (e) {
-				let that = this
-				if(e.detail.encryptedData){
-					//用户同意授权
-					let that = this
-					that.$http({
-						methods: 'post',
-						url: 'login',
-						prefix: true,
-						data: {
-							iv: e.detail.iv,
-							encryptedData: e.detail.encryptedData,
-							code:that.code,
-						}
-					}).then((data) => {
+export default {
+	data() {
+		return {
+			code: ''
+		};
+	},
+	mounted() {},
+	methods: {
+		getPhoneNumber(e) {
+			let that = this;
+			if (e.detail.encryptedData) {
+				//用户同意授权
+				var datas = {
+					iv: e.detail.iv,
+					encryptedData: e.detail.encryptedData,
+					code: that.code
+				};
+				that.$api.login(datas).then(
+					res => {
 						uni.showModal({
 						uni.showModal({
-							title: "提示",
-							content: data.msg,
+							title: '提示',
+							content: res.data.msg,
 							showCancel: false
 							showCancel: false
-						})
-						if (data.code == 200) {
-							
+						}); 
+						if (res.code == 200) {
+							that.$store.state.token = res.data.data.token;
+							uni.setStorageSync('union_id', res.data.data.union_id);
+							uni.navigateBack();
 						}
 						}
-					}, (err) => {
-						console.log(err)
-					})
-				}
+					},
+					err => {
+						console.log(err);
+					}
+				);
+			}
+		}
+	},
+	onLoad(option) {
+		let that = this;
+		this.from = option.from;
+		uni.login({
+			provider: 'weixin',
+			success: function(loginRes) {
+				that.code = loginRes.code;
 			}
 			}
-			
-		},
-		onLoad(option) {
-			let that = this
-			this.from = option.from
-			uni.login({
-				provider: 'weixin',
-				success: function(loginRes) {
-					that.code = loginRes.code;
-				}
-			})
-		},
+		});
 	}
 	}
+};
 </script>
 </script>
 <style>
 <style>
-	.u-border-bottom:after, .u-border-left:after, .u-border-right:after, .u-border-top-bottom:after, .u-border-top:after, .u-border:after{
-		border:none !important;
-	}
-	page{	
-		background-color: #BEE0FF;
-		height: 100%;
-		 width: 100%;
-	}
-	
+.u-border-bottom:after,
+.u-border-left:after,
+.u-border-right:after,
+.u-border-top-bottom:after,
+.u-border-top:after,
+.u-border:after {
+	border: none !important;
+}
+page {
+	background-color: #bee0ff;
+	height: 100%;
+	width: 100%;
+}
 </style>
 </style>
 <style scoped>
 <style scoped>
-	.full_img{
-		position: absolute;
-		  left: 0;
-		  display: block;
-		  width: 100%;
-		  z-index: -999;
-		  top: 0;
-		  
-	}
-	
-	.head{
-		height: 96rpx;
-		width: 100%;
-		line-height: 96rpx;
-		margin-top: 40rpx;
-		text-align: center;
-		display: flex;
-		position: relative;
-		justify-content: center;
-	}
-	.icon{
-		position: absolute;
-		left: 30rpx;
-	}
+.full_img {
+	position: absolute;
+	left: 0;
+	display: block;
+	width: 100%;
+	z-index: -999;
+	top: 0;
+}
+
+.head {
+	height: 96rpx;
+	width: 100%;
+	line-height: 96rpx;
+	margin-top: 40rpx;
+	text-align: center;
+	display: flex;
+	position: relative;
+	justify-content: center;
+}
+.icon {
+	position: absolute;
+	left: 30rpx;
+}
 </style>
 </style>

+ 11 - 11
pages/wd/index.vue

@@ -3,20 +3,20 @@
 		<view class="head">
 		<view class="head">
 			<u-row >
 			<u-row >
 				<u-col span="3" offset="1">
 				<u-col span="3" offset="1">
-					<navigator url="/pages/wd/avatar" hover-class="none">
+					<navigator url="/pages2/wd/avatar" hover-class="none">
 						<image src="/static/avatar.png" class="avatar"></image>
 						<image src="/static/avatar.png" class="avatar"></image>
 					</navigator>
 					</navigator>
 				</u-col>
 				</u-col>
 				<u-col span="6">
 				<u-col span="6">
 					<view style="display: flex;">
 					<view style="display: flex;">
-						<navigator class="name" url="/pages/wd/avatar" hover-class="none">
+						<navigator class="name" url="/pages2/wd/avatar" hover-class="none">
 							李宏杰
 							李宏杰
 						</navigator>
 						</navigator>
-						<navigator class="tag" url="/pages/wd/level" hover-class="none">
+						<navigator class="tag" url="/pages2/wd/level" hover-class="none">
 							天资过人
 							天资过人
 						</navigator>
 						</navigator>
 					</view>
 					</view>
-					<navigator url="/pages/wd/level" hover-class="none" style="position: relative;margin-top: 20rpx;">
+					<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">349/1000</view>
 						<u-line-progress height="8" active-color="#2F4379" :percent="70" :show-percent="false"></u-line-progress>
 						<u-line-progress height="8" active-color="#2F4379" :percent="70" :show-percent="false"></u-line-progress>
 					</navigator>
 					</navigator>
@@ -28,7 +28,7 @@
 			<view style="margin-top: 20rpx;">
 			<view style="margin-top: 20rpx;">
 				<u-row >
 				<u-row >
 					<u-col span="4"  text-align="center">
 					<u-col span="4"  text-align="center">
-						<navigator url="/pages/wd/collect" hover-class="none">
+						<navigator url="/pages2/wd/collect" hover-class="none">
 							<view class="head_t1">
 							<view class="head_t1">
 								收藏
 								收藏
 							</view>
 							</view>
@@ -38,7 +38,7 @@
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
 					<u-col span="4" offset="4" text-align="center">
 					<u-col span="4" offset="4" text-align="center">
-						<navigator url="/pages/wd/ranking" hover-class="none">
+						<navigator url="/pages2/wd/ranking" hover-class="none">
 						<view class="head_t1">
 						<view class="head_t1">
 							学习排名
 							学习排名
 						</view>
 						</view>
@@ -70,22 +70,22 @@
 			<view class="module">
 			<view class="module">
 				<u-row >
 				<u-row >
 					<u-col span="3" text-align="center">
 					<u-col span="3" text-align="center">
-						<navigator url="/pages/study/index" hover-class="none">
+						<navigator url="/pages2/study/index" hover-class="none">
 							<image src="/static/tool_1.png" class="tool_img"></image><view class="tool_t">我的学习</view>
 							<image src="/static/tool_1.png" class="tool_img"></image><view class="tool_t">我的学习</view>
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
 					<u-col span="3" text-align="center">
 					<u-col span="3" text-align="center">
-						<navigator url="/pages/wd/menu" hover-class="none">
+						<navigator url="/pages2/wd/menu" hover-class="none">
 							<image src="/static/tool_2.png" class="tool_img"></image><view class="tool_t">基本资料</view>
 							<image src="/static/tool_2.png" class="tool_img"></image><view class="tool_t">基本资料</view>
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
 					<u-col span="3" text-align="center">
 					<u-col span="3" text-align="center">
-						<navigator url="/pages/wd/help" hover-class="none">
+						<navigator url="/pages2/wd/help" hover-class="none">
 							<image src="/static/tool_3.png" class="tool_img"></image><view class="tool_t">助学活动</view>
 							<image src="/static/tool_3.png" class="tool_img"></image><view class="tool_t">助学活动</view>
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
 					<u-col span="3" text-align="center">
 					<u-col span="3" text-align="center">
-						<navigator url="/pages/wd/coupon" hover-class="none">
+						<navigator url="/pages2/wd/coupon" hover-class="none">
 							<image src="/static/tool_7.png" class="tool_img"></image><view class="tool_t">优惠券</view>
 							<image src="/static/tool_7.png" class="tool_img"></image><view class="tool_t">优惠券</view>
 						</navigator>
 						</navigator>
 					</u-col>
 					</u-col>
@@ -93,7 +93,7 @@
 				<view style="margin-top: 30rpx;">
 				<view style="margin-top: 30rpx;">
 					<u-row >
 					<u-row >
 						<u-col span="3" text-align="center">
 						<u-col span="3" text-align="center">
-							<navigator url="/pages/wd/enroll" hover-class="none">
+							<navigator url="/pages2/wd/enroll" hover-class="none">
 								<image src="/static/tool_5.png" class="tool_img"></image><view class="tool_t">考试报名</view>
 								<image src="/static/tool_5.png" class="tool_img"></image><view class="tool_t">考试报名</view>
 							</navigator>
 							</navigator>
 						</u-col>
 						</u-col>

+ 2 - 2
pages/bank/detail.vue → pages2/bank/detail.vue

@@ -220,7 +220,7 @@
 		},
 		},
 		methods: {
 		methods: {
 			jumpQuestion(){
 			jumpQuestion(){
-				this.$navTo.togo('/pages/bank/question', {
+				this.$navTo.togo('/pages2/bank/question', {
 					type:2
 					type:2
 				})
 				})
 			},
 			},
@@ -228,7 +228,7 @@
 				this.current = index;
 				this.current = index;
 			},
 			},
 			jumpExam(){
 			jumpExam(){
-				this.$navTo.togo('/pages/bank/question', {
+				this.$navTo.togo('/pages2/bank/question', {
 					type:1
 					type:1
 				})
 				})
 			},
 			},

+ 0 - 0
pages/bank/question.vue → pages2/bank/question.vue


+ 463 - 0
pages2/course/detail.vue

@@ -0,0 +1,463 @@
+<template>
+	<view>
+		<view style="position: fixed;width: 100%;z-index: 999;background: #FFFFFF;" id="top">
+			<view class="video_box">
+				<image v-if="!startStatus" src="https://cdn.uviewui.com/uview/swiper/3.jpg" style="width: 100%;height: 460rpx;"></image>
+				<image v-if="!startStatus" class="video_play" src="/static/play.png" @click="startVideo"></image>
+				<polyv-player
+					v-else
+					id="playerVideo"
+					playerId="playerVideo"
+					height="460rpx"
+					:vid="vid"
+					:showSettingBtn="true"
+					isAllowSeek="ifViewed"
+					:showPlaybackRateBtn="false"
+					:enablePlayGesture="true"
+				></polyv-player>
+			</view>
+			<view>
+				<u-row>
+					<u-col span="8" offset="1"><view class="video_t1">2020年二级建造师教育选修</view></u-col>
+					<u-col span="3"><view class="video_t1">共60课时</view></u-col>
+				</u-row>
+			</view>
+			<view><u-tabs :list="list" font-size="24" bar-width="90" :current="current" @change="change" active-color="#32467B"></u-tabs></view>
+			<u-line color="#D6D6DB" />
+		</view>
+		<view class="box" @touchmove="touchMove">
+			<view id="modules1">
+				<!-- 课程目录-->
+				<view style="padding-top: 15rpx;">
+					<u-row>
+						<u-col span="9">
+							<view class="video_t2" style="display: flex;align-items: center;">
+								<view class="top_line"></view>
+								课程目录
+							</view>
+						</u-col>
+						<u-col span="3" text-align="right">
+							<view class="video_t2">
+								共60节课
+								<u-icon name="arrow-right" size="28"></u-icon>
+							</view>
+						</u-col>
+					</u-row>
+					<view class="scroll_box">
+						<scroll-view class="r_sliper" scroll-x="true">
+							<view v-for="(item, index) in list" :key="index" style="margin-right: 20rpx;display:inline-block"><view class="r_t2">二级建造师市政..</view></view>
+						</scroll-view>
+					</view>
+				</view>
+				<u-line color="#D6D6DB" />
+			</view>
+			<view id="modules2">
+				<!-- 课程介绍-->
+				<view style="padding-top: 15rpx;">
+					<u-row>
+						<u-col span="8">
+							<view class="video_t2" style="display: flex;align-items: center;">
+								<view class="top_line"></view>
+								课程介绍
+							</view>
+						</u-col>
+					</u-row>
+				</view>
+				<view class="t2">这是一段课程介绍文本,课程介绍内容可在后台设置编辑,以富 文本形式呈现,常见的由图片和文本组成。</view>
+				<u-line color="#D6D6DB" />
+			</view>
+			<!-- 出题名师-->
+			<view id="modules3">
+				<view style="padding: 15rpx 0;">
+					<u-row>
+						<u-col span="8">
+							<view class="video_t2" style="display: flex;align-items: center;">
+								<view class="top_line"></view>
+								出题名师
+							</view>
+						</u-col>
+					</u-row>
+					<u-row>
+						<view style="margin: 25rpx;display: flex;">
+							<view><image src="/static/avatar1.png" class="teacher_img"></image></view>
+							<view class="teacher_t">
+								建工学院名誉院长,建造师建筑资深导师,北京工业大学教授,建造师考试大纲编委会编委。参与过国家一级注册建造师考试大纲、考试辅导书、习题集等书的编写。
+							</view>
+						</view>
+					</u-row>
+				</view>
+				<u-line color="#D6D6DB" />
+			</view>
+			<!-- 相关推荐-->
+			<view style="padding-top: 15rpx;" id="modules4" :style="'padding-bottom:' + modules4Bottom + 'px'">
+				<u-row>
+					<u-col span="8">
+						<view class="video_t2" style="display: flex;align-items: center;">
+							<view class="top_line"></view>
+							相关推荐
+						</view>
+					</u-col>
+				</u-row>
+				<view style="margin: 10rpx;">
+					<view class="tj_box" v-for="(item, index) in list" :key="index">
+						<image src="http://192.168.0.222:8080/img/banner1.png" style="width: 320rpx;height: 160rpx;"></image>
+						<view style="font-size: 24rpx;color: #666666;d">2020年二级建造师继续教...</view>
+						<view>
+							<u-row>
+								<u-col span="6">
+									<view style="margin-left: 20rpx;">
+										<image src="/static/people.png" style="width: 20rpx;height: 20rpx;"></image>
+										<text style="color: #999999;font-size: 20rpx;margin-left: 10rpx;">2023</text>
+									</view>
+								</u-col>
+								<u-col span="6" text-align="right">
+									<text style="color: #E91313;font-size: 16rpx;margin-left: 8rpx;">活动价</text>
+									<text style="color: #E91313;font-size: 24rpx;font-weight: bold;">¥499</text>
+								</u-col>
+							</u-row>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="footer_tab" id="foot">
+			<u-line color="#D6D6DB" />
+			<view style="height: 100%;display: flex;align-items: center;position: relative;">
+				<view style="text-align: center;margin-left: 30rpx;">
+					<image src="/static/sc.png" class="sc"></image>
+					<view class="sc_t">收藏</view>
+				</view>
+				<view style="text-align: center;margin-left: 30rpx;">
+					<view class="price_t1">¥699</view>
+					<view class="price_t2">¥699</view>
+				</view>
+				<view class="buy" @click="jumpBuy">立即购买</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			list: [
+				{
+					name: '课程目录'
+				},
+				{
+					name: '课程介绍'
+				},
+				{
+					name: '出题名师'
+				},
+				{
+					name: '相关推荐'
+				}
+			],
+			current: 0,
+			h1: 0,
+			h2: 0,
+			h3: 0,
+			h4: 0,
+			hh1: 0,
+			hh2: 0,
+			hh3: 0,
+			hh4: 0,
+			foot_h: 0,
+			top_h: 0,
+			windowHeight: 0,
+			modules4Bottom: 0,
+			isClick: false,
+			vid: 'd5f6d309fe0b016d3844b194a8b32249_d', // 视频ID
+			sign: '',
+			ts: '',
+			startStatus: false
+		};
+	},
+	onShow() {
+		let that = this;
+		const query = uni.createSelectorQuery().in(this);
+		query
+			.select('#modules1')
+			.boundingClientRect(data => {
+				that.h1 = data.height;
+				that.countHeight(that);
+			})
+			.exec();
+		query
+			.select('#modules2')
+			.boundingClientRect(data => {
+				that.h2 = data.height;
+				that.countHeight(that);
+			})
+			.exec();
+		query
+			.select('#modules3')
+			.boundingClientRect(data => {
+				that.h3 = data.height;
+				that.countHeight(that);
+			})
+			.exec();
+		query
+			.select('#modules4')
+			.boundingClientRect(data => {
+				that.h4 = data.height;
+				that.countHeight(that);
+			})
+			.exec();
+		query
+			.select('#foot')
+			.boundingClientRect(data => {
+				that.foot_h = data.height;
+				that.countModelusPadding();
+			})
+			.exec();
+		query
+			.select('#top')
+			.boundingClientRect(data => {
+				that.top_h = data.height;
+				that.countModelusPadding();
+			})
+			.exec();
+		this.windowHeight = uni.getSystemInfoSync().windowHeight;
+	},
+	onPageScroll: function(e) {  
+		//防止触发两次跳动
+		if (this.isClick) {
+			return;
+		}
+		if (e.scrollTop <= this.hh1) {
+			this.current = 0;
+		}
+		if (e.scrollTop <= this.hh2 && e.scrollTop > this.hh1) {
+			this.current = 1;
+		}
+		if (e.scrollTop <= this.hh3 && e.scrollTop > this.hh2) {
+			this.current = 2;
+		}
+		if (e.scrollTop > this.hh3) {
+			this.current = 3;
+		}
+	},
+	methods: {
+		startVideo() {
+			uni.getStorageSync('union_id');
+			if (!uni.getStorageSync('union_id')) {
+				uni.navigateTo({
+					url: '/pages/login/login'
+				});
+			} else {
+				this.$api
+					.polyvVideoSign(this.vid)
+					.then(res => {
+						console.log(res);
+						this.startStatus = true;
+						// this.sign = res.data.data.sign;
+						// this.ts = res.data.data.ts;
+					})
+					.catch(err => {
+						console.log('报错');
+					});
+			}
+		},
+		touchMove(e) {
+			this.isClick = false;
+		},
+		countModelusPadding() {
+			let offsetHeight = this.windowHeight - this.foot_h - this.top_h;
+			this.modules4Bottom = offsetHeight > this.h4 ? offsetHeight - this.h4 : 7;
+		},
+		countHeight(that) {
+			this.hh1 = this.h1;
+			this.hh2 = this.h1 + this.h2;
+			this.hh3 = this.h1 + this.h2 + this.h3;
+			this.hh4 = this.h1 + this.h2 + this.h3 + this.h4;
+		},
+		change(index) {
+			this.current = index;
+			let that = this;
+			this.isClick = true;
+			if (index == 0) {
+				uni.pageScrollTo({
+					scrollTop: 0
+				});
+			}
+			if (index == 1) {
+				uni.pageScrollTo({
+					scrollTop: that.h1 + 4
+				});
+			}
+			if (index == 2) {
+				uni.pageScrollTo({
+					scrollTop: that.h1 + that.h2 + 4
+				});
+			}
+			if (index == 3) {
+				uni.pageScrollTo({
+					scrollTop: that.h1 + that.h2 + that.h3 + 4
+				});
+			}
+		},
+		jumpBuy() {
+			var self = this;
+			uni.getStorage({
+				key: 'union_id',
+				success: function(res) {
+			// 继续操作
+			self.$api.getInfo().then(result => {
+				console.log(result);
+			});
+			},
+			fail: function(err) {
+				//重新登入
+				self.$navTo.togo('/pages/login/login', {});
+			}
+			});
+		}
+	}
+};
+</script>
+<style>
+::-webkit-scrollbar {
+	width: 0;
+	height: 0;
+	color: transparent;
+}
+</style>
+<style scope>
+.box {
+	position: relative;
+	top: 600rpx;
+	padding-bottom: 88rpx;
+}
+.price_t2 {
+	font-size: 18rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	text-decoration: line-through;
+	color: #999999;
+}
+.price_t1 {
+	font-size: 33rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #e91313;
+}
+.sc_t {
+	font-size: 22rpx;
+	color: #000000;
+}
+.sc {
+	width: 29rpx;
+	height: 29rpx;
+}
+.buy {
+	width: 138rpx;
+	height: 48rpx;
+	line-height: 48rpx;
+	background: #32467b;
+	border-radius: 10rpx;
+	color: #ffffff;
+	font-size: 28rpx;
+	text-align: center;
+	vertical-align: middle;
+	position: absolute;
+	right: 30rpx;
+}
+.video_body {
+	padding-bottom: 96rpx;
+}
+.footer_tab {
+	position: fixed;
+	bottom: 0;
+	height: 96rpx;
+	width: 100%;
+	background-color: #ffffff;
+}
+.tj_box {
+	width: 50%;
+	display: inline-block;
+	text-align: center;
+	margin: 10rpx 0;
+}
+.teacher_t {
+	font-size: 24rpx;
+	font-family: PingFang SC;
+	font-weight: 400;
+	color: #666666;
+	line-height: 36rpx;
+	margin-left: 15rpx;
+}
+.teacher_img {
+	width: 87rpx;
+	height: 129rpx;
+}
+.t2 {
+	font-size: 24rpx;
+	font-family: PingFang SC;
+	color: #666666;
+	line-height: 36rpx;
+	margin: 15rpx;
+}
+.r_t2 {
+	width: 201rpx;
+	height: 49rpx;
+	background: rgba(22, 119, 255, 0.05);
+	border: 1rpx solid #32467b;
+	border-radius: 16rpx;
+	color: #666666;
+	font-size: 23rpx;
+	text-align: center;
+	display: flex;
+	align-items: center;
+	padding: 5rpx;
+}
+.scroll_box {
+	width: 100%;
+	height: 60rpx;
+	background: #ffffff;
+	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+	white-space: nowrap;
+	overflow: hidden;
+	margin: 15rpx 0;
+}
+.r_sliper {
+	padding: 0 20rpx;
+}
+.top_line {
+	width: 6rpx;
+	height: 22rpx;
+	background: #32467b;
+	margin-right: 10rpx;
+}
+.video_t2 {
+	font-size: 24rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #666666;
+}
+.video_t1 {
+	font-size: 28rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #333333;
+}
+.video_play {
+	position: absolute;
+	width: 95rpx;
+	height: 95rpx;
+	top: 0;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	margin: auto;
+}
+.video_box {
+	position: relative;
+}
+
+page {
+	background: #ffffff;
+}
+</style>

+ 1 - 1
pages/course/keynote.vue → pages2/course/keynote.vue

@@ -144,7 +144,7 @@
 				this.current = index;
 				this.current = index;
 			},
 			},
 			jumpRead(){
 			jumpRead(){
-				this.$navTo.togo('/pages/course/read', {})
+				this.$navTo.togo('/pages2/course/read', {})
 			}
 			}
 		
 		
 		},
 		},

+ 0 - 0
pages/course/read.vue → pages2/course/read.vue


+ 0 - 0
pages/index/search.vue → pages2/index/search.vue


+ 1 - 1
pages/plan/detail.vue → pages2/plan/detail.vue

@@ -191,7 +191,7 @@
 		},
 		},
 		methods: {
 		methods: {
 			edit(item){
 			edit(item){
-				this.$navTo.togo('/pages/plan/edit', {
+				this.$navTo.togo('/pages2/plan/edit', {
 					id:item.id
 					id:item.id
 				})
 				})
 			},
 			},

+ 0 - 0
pages/plan/edit.vue → pages2/plan/edit.vue


+ 0 - 0
pages/study/index.vue → pages2/study/index.vue


+ 0 - 0
pages/wd/avatar.vue → pages2/wd/avatar.vue


+ 0 - 0
pages/wd/collect.vue → pages2/wd/collect.vue


+ 0 - 0
pages/wd/coupon.vue → pages2/wd/coupon.vue


+ 0 - 0
pages/wd/edu_info.vue → pages2/wd/edu_info.vue


+ 0 - 0
pages/wd/enroll.vue → pages2/wd/enroll.vue


+ 0 - 0
pages/wd/help.vue → pages2/wd/help.vue


+ 0 - 0
pages/wd/info.vue → pages2/wd/info.vue


+ 0 - 0
pages/wd/level.vue → pages2/wd/level.vue


+ 2 - 2
pages/wd/menu.vue → pages2/wd/menu.vue

@@ -21,10 +21,10 @@
 		},
 		},
 		methods: {
 		methods: {
 			jumpInfo(){
 			jumpInfo(){
-				this.$navTo.togo('/pages/wd/info', {})
+				this.$navTo.togo('/pages2/wd/info', {})
 			},
 			},
 			jumpEduInfo(){
 			jumpEduInfo(){
-				this.$navTo.togo('/pages/wd/edu_info', {})
+				this.$navTo.togo('/pages2/wd/edu_info', {})
 			}
 			}
 		
 		
 		},
 		},

+ 0 - 0
pages/wd/ranking.vue → pages2/wd/ranking.vue