瀏覽代碼

发票申请样式

chenxiong 3 年之前
父節點
當前提交
2d318de12e

+ 11 - 0
pages.json

@@ -219,6 +219,17 @@
 					}
 				}
 			},
+			{
+				"path": "invoice/index",
+				"style": {
+					"navigationBarTitleText": "发票申请",
+					// "enablePullDownRefresh": true,
+					"app-plus": {
+						"titleNView": false, //禁用原生导航栏 
+						"bounce": "none"
+					}
+				}
+			},
 			{
 				"path": "exam/index",
 				"style": {

+ 1 - 1
pages2/bank/questionBank.vue

@@ -441,7 +441,7 @@
 							: cgType === 6
 							? `您还有${lastCount}道题未作答, 您确定要交卷吗?`
 							: cgType == 9
-							? `您已完成所有题目,快去交卷吧!` 
+							? `您已完成所有题目,快去交卷吧!` 
 							: ''
 					}}
 				</view>

+ 1 - 1
pages2/bank/questionBankContinue.vue

@@ -383,7 +383,7 @@
 							: cgType === 6
 							? `您还有${lastCount}道题未作答, 您确定要交卷吗?`
 							: cgType == 9
-							? `您已完成所有题目,快去交卷吧!` 
+							? `您已完成所有题目,快去交卷吧!` 
 							: ''
 					}}
 				</view>

+ 90 - 4
pages2/class/detail.vue

@@ -52,8 +52,31 @@
 					<view v-if="item.type == 3"><courseSection :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection></view>
 				</view>
 			</view>
-			<!--笔记 -->
+			<!--讲义 -->
 			<view v-show="current == 1">
+				<view class="lecture-box">
+					<view class="title">
+						这是后台配置的讲义标题过长省略这是后台配置的讲义标题过长省略
+					</view>
+					<view class="btn" @click="openDocument">
+						<u-icon name="download" color="#007AFF" size="40"></u-icon>
+					</view>
+				</view>
+				<view class="lecture-content">
+					<rich-text :nodes="'讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容'"></rich-text>
+				</view>
+				
+				<view class="inputBottom">
+					<view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
+					<view style="width: 73%;height: 100%;padding: 10rpx 0;">
+						<u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
+					</view>
+					<view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
+				</view>
+				
+			</view>
+			<!--笔记 -->
+			<view v-show="current == 2">
 				<view v-if="noteList.length == 0" style="text-align: center;">暂无笔记</view>
 				<view class="inputBottom">
 					<view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
@@ -84,7 +107,7 @@
 				</view>
 			</view>
 			<!--答疑 -->
-			<view v-show="current == 2">
+			<view v-show="current == 3">
 				<view class="inputBottom">
 					<view class="flex_auto">
 						<u-input height="60" fixed="true" :placeholder="placeholder" type="textarea" :custom-style="inputStyle" v-model="ctxValue" />
@@ -113,7 +136,7 @@
 				<view v-if="answerList.length == 0" style="text-align: center;">暂无记录</view>
 			</view>
 			<!--目录 -->
-			<view v-show="current == 3" >
+			<view v-show="current == 4" >
 				<view class="menuBox" v-for="(item, index) in reMenuList" :key="index">
 					<!--模块 -->
 					<view v-if="item.type == 1"><courseModule :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
@@ -888,12 +911,16 @@ export default {
 							{
 								name: '目录'
 							},
+							{
+								name: '讲义'
+							},
 							{
 								name: '笔记'
 							},
 							{
 								name: '答疑'
-							},{name:'重修目录'}
+							},
+							{name:'重修目录'}
 						];
 						this.current = 0;
 					} else {
@@ -902,6 +929,9 @@ export default {
 							{
 								name: '目录'
 							},
+							{
+								name: '讲义'
+							},
 							{
 								name: '笔记'
 							},
@@ -941,6 +971,26 @@ export default {
 		},
 		change(index) {
 			this.current = index;
+		},
+		openDocument() {
+			console.log(111)
+			uni.downloadFile({
+			  url: 'https://gw.alipayobjects.com/os/bmw-prod/c134022a-1088-47e2-bb76-a33ec0519101.pdf?spm=a2c4g.11186623.0.0.cf863d1fUcFiPN&file=c134022a-1088-47e2-bb76-a33ec0519101.pdf',
+			  success: function (res) {
+				  console.log(999)
+			    var filePath = res.tempFilePath;
+			    uni.openDocument({
+			      filePath: filePath,
+			      showMenu: true,
+			      success: function (res) {
+			        console.log(res,'打开文档成功');
+			      },
+				  fail:function(err) {
+					  console.log(err)
+				  }
+			    });
+			  }
+			});
 		}
 	}
 };
@@ -979,6 +1029,42 @@ export default {
 	border-radius: 16rpx;
 	font-size: 24rpx;
 }
+.lecture-box {
+	display: flex;
+	align-items: center;
+	height: 80rpx;
+	background: #FFFFFF;
+	border-radius: 16rpx 16rpx 16rpx 16rpx;
+	
+	.title {
+		padding:10rpx;
+		flex:1;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		color:#333;
+		font-weight: bold;
+		font-size: 32rpx;
+	}
+	
+	.btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width:80rpx;
+		height:80rpx;
+		background: #FFFFFF;
+		box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0,0,0,0.1);
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+	}
+}
+
+.lecture-content {
+	background:#fff;
+	margin-top:10rpx;
+	padding:10rpx;
+	border-radius:16rpx;
+}
 .photoBox {
 	background-color: #FFFFFF;
 	border-radius: 32px 32px 0px 0px;

+ 1 - 1
pages2/class/questionBank.vue

@@ -432,7 +432,7 @@
 							: cgType === 6
 							? `您还有${lastCount}道题未作答, 您确定要交卷吗?`
 							: cgType == 9
-							? `您已完成所有题目,快去交卷吧!` 
+							? `您已完成所有题目,快去交卷吧!` 
 							: ''
 					}}
 				</view>

+ 376 - 0
pages2/invoice/index.vue

@@ -0,0 +1,376 @@
+<template>
+	<view class="invoice">
+		<view class="invoice__tabs">
+			<u-tabs :list="list" sticky :current="current" @change="change" active-color="#007AFF"></u-tabs>
+		</view>
+		<view class="invoice__content">
+			<view class="open" v-if="current == 0">
+				<view class="form">
+					<u-form :model="form" ref="uForm">
+						<u-form-item label="发票类型" label-width="130" required >
+							<u-radio-group v-model="form.type" prop="type">
+								<u-radio v-for="(item, index) in typeList" :key="index" :name="item.value">
+									{{ item.name }}
+								</u-radio>
+							</u-radio-group>
+						</u-form-item>
+						<u-form-item label="申请主体" label-width="130" required >
+							<u-radio-group v-model="form.main" prop="main">
+								<u-radio v-for="(item, index) in mainList" :key="index" :name="item.value">
+									{{ item.name }}
+								</u-radio>
+							</u-radio-group>
+						</u-form-item>
+						<u-form-item label="发票抬头" label-width="130" required prop="header" >
+							<u-input placeholder="请输入" v-model="form.header" />
+						</u-form-item>
+						<u-form-item label="选择订单" label-width="130" required prop="orderId" right-icon="arrow-right">
+							<view class="form-item" @click="selectOrderModal = true">
+								<u-input v-if="false" v-model="form.orderId" />
+								<view class="content">
+									{{ form.orderId || '请选择' }}
+								</view>
+							</view>
+						</u-form-item>
+						
+						<view>
+							<view class="check-order" v-for="(item,index) in orderList" :key="index" v-if="item.disabled">
+									<view class="close" @click="deleteOrder(index)">
+										<u-icon name="close-circle-fill" color="#FF2D55" size="40"></u-icon>
+									</view>
+									<view class="title">商品名称</view>
+									<view class="number">订单编号</view>
+									<view class="price">¥ 100元</view>
+							</view>
+						</view>
+						
+					</u-form>
+				</view>
+				
+				<view class="order-text">
+					<view class="order-text__label">本次申请开票金额:</view>
+					<view class="order-text__price">¥ 999.00</view>
+				</view>
+				
+				<view class="submit">
+					提交申请
+				</view>
+			</view>
+			<view class="record" v-if="current == 1">
+				record
+			</view>
+		</view>
+		
+		<u-popup class="modal" v-model="selectOrderModal" mode="bottom" border-radius="40">
+			<view class="popup_box">
+				<view class="line"></view>
+				<view class="title">选择订单</view>
+				<u-line color="#D6D6DB" />
+				<view>
+					<scroll-view scroll-y="true" style="height: 500rpx;">
+						<view>
+							<u-checkbox-group>
+								<view v-for="(item, index) in orderList" :key="index" >
+									<view class="order-item">
+										<view>
+											<u-checkbox 
+												:disabled="item.disabled"
+												shape="circle"
+												:name="item.name"
+												v-model="item.checked"
+											>	
+												<view class="order-item__bg" :class="item.checked?'active':''" >
+													<view>
+														<view class="order-title">商品名称</view>
+														<view class="order-number">订单编号</view>
+														<view class="order-price">¥ 100元</view>
+													</view>
+												</view>
+											</u-checkbox >
+										</view>
+										
+									</view>
+								</view>
+							</u-checkbox-group>
+						</view>
+					</scroll-view>
+				</view>
+				<view class="confrim-btn">
+					<view class="okBtn" @click="okPopup(1)">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+export default {
+	components: {},
+	data() {
+		return {
+			checkOrderList:[],
+			list: [
+				{
+					name: '发票申请'
+				},
+				{
+					name: '发票记录'
+				}
+			],
+			form:{
+				type:'',
+				main:'',
+				header:'',
+				orderId:'',
+			},
+			orderValue:'',
+			orderList:[{checked:false,name:'1'},{checked:false,name:'2'},{checked:false,name:'3'},{checked:false,name:'4'}],
+			selectOrderModal:false,
+			current: 0,
+			order: [],
+			typeList:[{
+				name:'普通发票',
+				value:'1'
+			},{
+				name:'增值税专用发票',
+				value:'2'
+			}],
+			mainList:[{
+				name:'个人',
+				value:'1'
+			},{
+				name:'企业',
+				value:'2'
+			}]
+		};
+	},
+	// onPullDownRefresh() {},
+	onLoad(option) {
+		
+	},
+	onShow() {
+		
+	},
+	methods: {
+		change(e) {
+			console.log(e)
+			this.current = e;
+		},
+		
+		radioGroupChange(e) {
+			console.log(e)
+		},
+		okPopup() {
+			this.selectOrderModal = false;
+			this.orderList.forEach((item,index) => {
+				if(item.checked) {
+					this.$set(this.orderList[index],'disabled',true)
+				}
+			})
+			
+			console.log(this.checkOrderList)
+		},
+		
+		deleteOrder(index) { 
+			this.$set(this.orderList[index],'disabled',false)
+			this.$set(this.orderList[index],'checked',false)
+		}
+	},
+	computed: { ...mapGetters(['userInfo']) }
+};
+</script>
+<style>
+page {
+	background: #eaeef1;
+}
+</style>
+<style scoped lang="scss">
+	
+.invoice {
+	&__tabs {
+		width: 100%;
+		text-align: center;
+		position: fixed;
+		height: 96rpx;
+		z-index: 999;
+	}
+	
+	&__content {
+		padding-top:96rpx;
+		
+		.open {
+			margin:8rpx 24rpx 0;
+			
+			.form {
+				padding:24rpx;
+				width: 702rpx;
+				background: #FFFFFF;
+				border-radius: 24rpx;
+				
+				// /deep/ .u-input__input {
+				// 	text-align: right;
+				// }
+				
+				
+				.form-item {
+					height:78rpx;
+					display: flex;
+					align-items: center;
+					
+					.text {
+						font-size: 28rpx;
+						width:120rpx;
+						// color: #999999;
+					}
+					
+					.content {
+						flex:1;
+						text-align: left;
+						color:#bbb;
+					}
+				}
+				
+				.check-order {
+					margin-top:20rpx;
+					width: 654rpx;
+					height: 168rpx;
+					background: #F5F5F5;
+					border: 2px solid #F5F5F5;
+					padding:20rpx;
+					position:relative;
+					
+					.close {
+						position:absolute;
+						right:0;
+						top:0;
+					}
+					
+					
+					.title,.number,.price {
+						color:#333333;
+						margin-top:10rpx;
+						line-height: 30rpx;
+						font-size: 30rpx;
+					}
+					
+					.number {
+						color:#999;
+					}
+				}
+				
+			}
+			
+			.order-text {
+				margin-top:16rpx;
+				padding:0 30rpx;
+				width: 702rpx;
+				height: 80rpx;
+				background: #FFFFFF;
+				border-radius: 24rpx;
+				display: flex;
+				align-items: center;
+				
+				&__label {
+					font-size: 24rpx;
+				}
+				
+				&__price {
+					font-size: 30rpx;
+					margin-left:20rpx;
+					color:#FF2D55;
+				}
+			}
+				
+			.submit {
+				text-align: center;
+				line-height: 80rpx;
+				color:#fff;
+				font-size: 30rpx;
+				width: 526rpx;
+				height: 80rpx;
+				background: #007AFF;
+				box-shadow: 0rpx 8rpx 7rpx 1rpx rgba(0, 122, 255, 0.1);
+				border-radius: 40rpx;
+				position:fixed;
+				left:50%;
+				bottom:40rpx;
+				transform: translateX(-50%);
+			}
+		}
+	}
+	
+	.modal {
+		.line {
+			width: 80rpx;
+			height: 8rpx;
+			background: #999999;
+			border-radius: 4rpx;
+			margin:8rpx auto 0;
+		}
+		
+		.title {
+			margin:20rpx 0 15rpx;
+			text-align: center;
+			font-size: 24rpx;
+			color: #999999;
+		}
+		
+		.order-item {
+			display: flex;
+			align-items: center;
+			padding: 20rpx;
+			
+			
+			&__bg {
+				width: 654rpx;
+				height: 168rpx;
+				background: #F5F5F5;
+				border: 2px solid #F5F5F5;
+				border-radius: 16rpx;
+				padding:20rpx;
+				
+				
+				&.active {
+					background: #EBF5FF;
+					border: 2px solid #007AFF;
+				}
+				
+				.order-title,.order-number,.order-price {
+					color:#333333;
+					margin-top:10rpx;
+					line-height: 30rpx;
+					font-size: 30rpx;
+				}
+				
+				.order-number {
+					color:#999;
+				}
+			}
+		}
+		
+		.confrim-btn {
+			width: 750rpx;
+			height: 98rpx;
+			background: rgba(255, 255, 255, 0.98);
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			
+			.okBtn {
+				text-align: center;
+				line-height: 64rpx;
+				color:#fff;
+				font-size: 30rpx;
+				width: 200rpx;
+				height: 64rpx;
+				background: linear-gradient(0deg, #015EEA, #00C0FA);
+				border-radius: 32rpx;
+			}
+		}
+		
+	}
+}
+
+
+</style>

+ 6 - 1
pages2/learn/details.vue

@@ -4,7 +4,7 @@
 			<view class="topTitle">
 				<u-icon name="info-circle-fill" style="color:#FF3B30;margin-right:8rpx;"></u-icon>
 				<text>如对审核结果有异议,请勿点击确认重学。</text>
-				<view style="margin-left:34rpx;">致电020-87085982咨询</view>
+				<view style="margin-left:34rpx;">致电<text @click="call">020-87085982</text>咨询</view>
 			</view>
 			<view class="detailsItem" v-for="(item, index) in listData" :key="index">
 				<view class="head">
@@ -106,6 +106,11 @@ export default {
 			if (int === 3) {
 				return '回放';
 			}
+		},
+		call() {
+			uni.makePhoneCall({
+				phoneNumber:'020-87085982'
+			})
 		}
 	},
 	onReachBottom() {},

+ 67 - 6
pages2/learn/my_learn.vue

@@ -77,17 +77,17 @@
 			</template>
 			<template v-if="current === 1">
 				<view class="noData">您暂无相关学习凭证记录哦~</view>
-				<!-- <view class="learnItem">
+				<view class="learnItem card">
 					<view class="title">2020年二建建筑工程管理与实补这是商品名称</view>
 					<view class="number">
 						<text class="label">编号:</text>
 						GZXY123456789
 					</view>
 					<view class="btnBox">
-						<view class="btn">电子照片</view>
-						<view class="btn">下载凭证</view>
+						<view class="btn" @click="showPhoto">电子照片</view>
+						<view class="btn" @click="downloadCard">下载凭证</view>
 					</view>
-				</view> -->
+				</view>
 			</template>
 		</view>
 	</view>
@@ -99,7 +99,7 @@ export default {
 	components: {},
 	data() {
 		return {
-			current: 0,
+			current: 1,
 			list: [
 				{
 					name: '学时审核'
@@ -174,6 +174,40 @@ export default {
 		},
 		change(index) {
 			this.current = index;
+		},
+		showPhoto() {
+			// 预览图片
+			uni.previewImage({
+				urls: ['https://file.xyyxt.net/oss/images/file/20220111.jpg'],
+				longPressActions: {
+					itemList: ['发送给朋友', '保存图片', '收藏'],
+					success: function(data) {
+						console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+					},
+					fail: function(err) {
+						console.log(err.errMsg);
+					}
+				}
+			});
+		},
+		downloadCard() {
+			uni.downloadFile({
+			  url: 'https://gw.alipayobjects.com/os/bmw-prod/c134022a-1088-47e2-bb76-a33ec0519101.pdf?spm=a2c4g.11186623.0.0.cf863d1fUcFiPN&file=c134022a-1088-47e2-bb76-a33ec0519101.pdf',
+			  success: function (res) {
+				  console.log(999)
+			    var filePath = res.tempFilePath;
+			    uni.openDocument({
+			      filePath: filePath,
+			      showMenu: true,
+			      success: function (res) {
+			        console.log(res,'打开文档成功');
+			      },
+				  fail:function(err) {
+					  console.log(err)
+				  }
+			    });
+			  }
+			});
 		}
 	},
 	onReachBottom() {},
@@ -205,12 +239,39 @@ page {
 	text-align: center;
 }
 .learnItem {
+	position: relative;
 	background: #ffffff;
 	border-radius: 16rpx;
 	padding: 32rpx 32rpx 0;
 	font-family: PingFang SC;
 	margin-bottom: 16rpx;
 	overflow: hidden;
+	
+	&.card {
+		
+		&::before {
+			content:'';
+			width:20rpx;
+			height:20rpx;
+			position:absolute;
+			background:#eaeef1;
+			left:-10rpx;
+			bottom:80rpx;
+			border-radius: 50%;
+		}
+		
+		&::after {
+			content:'';
+			width:20rpx;
+			height:20rpx;
+			position:absolute;
+			background:#eaeef1;
+			right:-10rpx;
+			bottom:80rpx;
+			border-radius: 50%;
+		}
+	}
+	
 	.red {
 		color: #ff3b30 !important;
 	}
@@ -224,7 +285,7 @@ page {
 		font-size: 30rpx;
 		font-weight: bold;
 		color: #333333;
-		margin-bottom: 68rpx;
+		margin-bottom:68rpx;
 	}
 	.status {
 		font-size: 24rpx;

+ 46 - 32
pages2/order/index.vue

@@ -5,44 +5,53 @@
 		</view>
 		<view style="padding-top: 96rpx;">
 			<view v-if="!order.length" class="noData">您暂无相关订单哦~</view>
-			<view v-else v-for="(item, index) in order" :key="index" style="padding: 20rpx 20rpx 0rpx 20rpx" class="lisChild">
-				<view class="item">
-					<view style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(index)">
-						<view style="color: #666666;font-size: 24rpx;">订单编号:{{ item.orderSn }}</view>
-						<view style="color: #999999;font-size: 24rpx;">{{ $method.timestampToTime(item.createTime) }}</view>
+			<template v-else>
+				<navigator url="/pages2/invoice/index">
+					<view class="btn2">
+						发票申请
 					</view>
-					<u-line color="#D6D6DB" />
-					<view
-						style="padding: 25rpx 0;border-bottom: 1rpx solid #eee;"
-						v-for="(items, indexs) in item.orderGoodsList"
-						:key="indexs" @click="goCourse(items,item.orderStatus)"
-					>
-						<view style="display: flex;justify-content: space-between;">
-							<image :src="$method.splitImgHost(items.coverUrl)" style="height: 134rpx;width: 278rpx;border-radius: 16rpx;flex-shrink: 0;"></image>
-							<view style="margin-left: 20rpx;flex:1;display: flex;flex-direction: column;">
-								<view style="color: #333333;font-size: 30rpx;font-weight: bold;flex:1">{{ items.goodsName }}</view>
-								<view class="priceTag">¥ {{ items.goodsRealPrice }}</view>
-							</view>
-						</view>
-						<view style="display: flex;flex-direction: row-reverse;padding: 10rpx 0;">
-							<view class="btn2" v-if="items.refundStatus === 0&&item.orderFrom === 2&&(item.orderStatus === 1 || item.orderStatus === 2)&&(items.goodsType == '1' || items.goodsType == '2')" @click.stop="refund(item.orderSn,items.goodsId)">退款</view>
+				</navigator>
+				
+				<view v-for="(item, index) in order" :key="index" style="padding: 20rpx 20rpx 0rpx 20rpx" class="lisChild">
+					<view class="item">
+						<view style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(index)">
+							<view style="color: #666666;font-size: 24rpx;">订单编号:{{ item.orderSn }}</view>
+							<view style="color: #999999;font-size: 24rpx;">{{ $method.timestampToTime(item.createTime) }}</view>
 						</view>
-					</view>
-					<view style="height: 80rpx;display: flex;justify-content: space-between;align-items: center;">
-						<view>
-							<text style="color:#999;font-size: 24rpx;margin-right: 8rpx;">共{{ item.orderGoodsList.length }}项</text>
-							<text style="color: #333;font-size: 30rpx;font-weight: bold;">合计</text>
-							<text style="color:#ff2d55;font-size: 30rpx;font-weight: bold;">¥{{ item.payPrice }}</text>
+						<u-line color="#D6D6DB" />
+						<view
+							style="padding: 25rpx 0;border-bottom: 1rpx solid #eee;"
+							v-for="(items, indexs) in item.orderGoodsList"
+							:key="indexs" @click="goCourse(items,item.orderStatus)"
+						>
+							<view style="display: flex;justify-content: space-between;">
+								<image :src="$method.splitImgHost(items.coverUrl)" style="height: 134rpx;width: 278rpx;border-radius: 16rpx;flex-shrink: 0;"></image>
+								<view style="margin-left: 20rpx;flex:1;display: flex;flex-direction: column;">
+									<view style="color: #333333;font-size: 30rpx;font-weight: bold;flex:1">{{ items.goodsName }}</view>
+									<view class="priceTag">¥ {{ items.goodsRealPrice }}</view>
+								</view>
+							</view>
+							<view style="display: flex;flex-direction: row-reverse;padding: 10rpx 0;">
+								<view class="btn2" v-if="items.refundStatus === 0&&item.orderFrom === 2&&(item.orderStatus === 1 || item.orderStatus === 2)&&(items.goodsType == '1' || items.goodsType == '2')" @click.stop="refund(item.orderSn,items.goodsId)">退款</view>
+							</view>
 						</view>
-						<view style="display: flex;align-items: center;">
-							<view class="btn2" v-if="item.orderStatus === 0&&item.orderFrom === 2" @click="resumeOrder(item)">继续支付</view>
-							<!-- <view class="btn2" v-if="item.orderStatus === -1 || item.orderStatus === -2" @click="againBuy(item)">重新购买</view> --> 
-							<view class="btn1" v-if="item.orderStatus === -1 || item.orderStatus === -2" @click="delOrder(item)">删除订单</view>
-							<view class="btn1" @click="closeOrder(item)" v-if="item.orderStatus === 0">取消订单</view>
+						<view style="height: 80rpx;display: flex;justify-content: space-between;align-items: center;">
+							<view>
+								<text style="color:#999;font-size: 24rpx;margin-right: 8rpx;">共{{ item.orderGoodsList.length }}项</text>
+								<text style="color: #333;font-size: 30rpx;font-weight: bold;">合计</text>
+								<text style="color:#ff2d55;font-size: 30rpx;font-weight: bold;">¥{{ item.payPrice }}</text>
+							</view>
+							<view style="display: flex;align-items: center;">
+								<view class="btn2" v-if="item.orderStatus === 0&&item.orderFrom === 2" @click="resumeOrder(item)">继续支付</view>
+								<!-- <view class="btn2" v-if="item.orderStatus === -1 || item.orderStatus === -2" @click="againBuy(item)">重新购买</view> --> 
+								<view class="btn1" v-if="item.orderStatus === -1 || item.orderStatus === -2" @click="delOrder(item)">删除订单</view>
+								<view class="btn1" @click="closeOrder(item)" v-if="item.orderStatus === 0">取消订单</view>
+							</view>
 						</view>
 					</view>
 				</view>
-			</view>
+			</template>
+			
 		</view>
 	</view>
 </template>
@@ -108,6 +117,11 @@ export default {
 						self.$method.showToast('退款成功');
 						self.getOrderList();
 					}
+				} else {
+					uni.showToast({
+						icon:'none',
+						title:'不可以退款哦'
+					})
 				}
 			});
 		},

+ 232 - 31
pages2/wd/class.vue

@@ -1,27 +1,42 @@
 <template>
 	<view style="padding: 30rpx;">
-		<navigator  hover-class="none" :url="`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}`" v-for="(item, index) in goodsList" :key="index" style="margin-bottom: 30rpx;">
-			<view class="class_item">
-				<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
-				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">{{ item.goodsName }}</view>
-				<view class=".content_box">
-					<image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
-					共
-					<text class="content">{{ item.courseNum }}</text>
-					科
-					<text class="content">{{ item.secAllNum }}</text>
-					节
-					<text class="content">{{ item.classHours }}</text>
-					学时
-				</view>
-				<view class=".content_box">
-					<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
-					学习有效期:
-					<text class="content">{{ $method.timestampToTime(item.validityStartTime) }} - {{ $method.timestampToTime(item.validityEndTime) }}</text>
+		<view class="class" v-for="(item, index) in goodsList" :key="index">
+			
+				<view class="class_item">
+					<navigator  hover-class="none" :url="`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}`">
+						<image :src="$method.splitImgHost(item.coverUrl, true)" class="class_img"></image>
+						<view class="class_text">
+							<view class="class_title">{{ item.goodsName }}</view>
+							<view class="content_box">
+								<image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
+								共
+								<text class="content">{{ item.courseNum }}</text>
+								科
+								<text class="content">{{ item.secAllNum }}</text>
+								节
+								<text class="content">{{ item.classHours }}</text>
+								学时
+							</view>
+							<view class="content_box">
+								<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
+								学习有效期:
+								<text class="content">{{ $method.timestampToTime(item.validityStartTime) }} - {{ $method.timestampToTime(item.validityEndTime) }}</text>
+							</view>
+						</view>
+					</navigator>
+					<view class="class-warm">
+						<u-icon class="class-warm__icon" size="30" color="#FF3B30" name="error-circle-fill"></u-icon>
+						<view class="class-warm__text">
+							<view class="date">班级有效期:2021/11/30 - 2021/11/30</view>
+							<view class="state">班级状态:已过期,有疑问请联系 <text @click="call">020-87085982</text></view>
+						</view>
+					</view>
+					
 				</view>
-			</view>
+			
+			
 			<view class="bottomBox">
-				<view class=".content_box">
+				<view class="content_box">
 					<image src="/static/icon/wk_icon3.png" class="wk_icon"></image>
 					学习进度:{{ item.stuAllNum }}/{{ item.secAllNum }}
 				</view>
@@ -41,12 +56,56 @@
 					</view>
 					<view><u-button type="primary" size="mini" @click="appBeforeAddress(item.goodsId)">进入刷题</u-button></view>
 				</view>
+				<view class="restart" @click="selectClass(item)">
+					选班重学
+				</view>
 			</view>
-		</navigator>
+		</view>
+			
 		<view v-if="goodsList.length==0">
-			<u-empty text="暂无网课" margin-top="500" mode="list"></u-empty></view>
+			<u-empty text="暂无网课" margin-top="500" mode="list"></u-empty>
 			
 		</view>
+		<u-popup v-model="selectClassModal" @close="gradeValue = -1" mode="bottom" border-radius="40">
+			<view class="popup_box">
+				<view style="margin-bottom: 20rpx;">
+					<view class="line1"></view>
+					<view class="grade">选择班级</view>
+				</view>
+				<u-line color="#D6D6DB" />
+				<view>
+					<scroll-view scroll-y="true" style="height: 500rpx;">
+						<view>
+							<u-radio-group v-model="gradeValue" @change="radioGroupChange">
+								<view v-for="(item, index) in gradeList" :key="index" >
+									<view style="display: flex;align-items: center;padding: 20rpx;">
+										<view>
+											<u-radio
+												shape="circle"
+												:name="index"
+											>
+												<view :class="item.checked?'white-box blue-box':'white-box'" >
+													<view>
+														<view class="blackTxt">{{item.className}}</view>
+														<view class="redTxt" v-if="item.classEndTime">有效期至:{{$method.timestampToTime(item.classEndTime)}}</view>
+														<view class="redTxt" v-if="item.classEndTime">本班还剩{{$method.GetRTime(item.classEndTime)}}天将结束学习</view>
+													</view>
+												</view>
+											</u-radio>
+										</view>
+										
+									</view>
+								</view>
+							</u-radio-group>
+						</view>
+					</scroll-view>
+				</view>
+				<view class="confrim-btn">
+					<view class="okBtn" @click="okPopup()">确定</view>
+				</view>
+			</view>
+		</u-popup>
+		
 	</view>
 </template>
 
@@ -56,6 +115,9 @@ export default {
 		return {
 			list: [1, 2, 3],
 			goodsList: [],
+			selectClassModal:false,
+			gradeList:[],
+			gradeValue:-1,
 			param:{
 				pageNum: 1,
 				pageSize: 10
@@ -74,6 +136,29 @@ export default {
 		}
 	},
 	methods: {
+		selectClass(item) {
+			console.log(item)
+			this.selectClassModal = true;
+			this.goodsGradeList(item.goodsId);
+		},
+		radioGroupChange(e){
+			console.log(e)
+		},
+		goodsGradeList(id) {
+			let self = this
+			this.$api.goodsGradeList({goodsId:id}).then(res => {
+				if(res.data.code==200){
+					self.gradeList = res.data.rows
+					if(self.gradeList.length==0){
+						let item = {
+							className:'系统分班',
+							gradeId:0
+						}
+						self.gradeList.push(item)
+					}
+				}
+			});
+		},
 		appBeforeAddress(goodsId) {
 			this.$api.appBeforeAddress({
 				goodsId
@@ -124,6 +209,17 @@ export default {
 					});
 				}
 			});
+		},
+		okPopup() {
+			this.selectClassModal = false;
+			uni.showToast({
+				title:'选班成功'
+			})
+		},
+		call() {
+			uni.makePhoneCall({
+				 phoneNumber: '020-87085982' //仅为示例
+			})
 		}
 	}
 };
@@ -133,7 +229,7 @@ page {
 	background: #eaeef1;
 }
 </style>
-<style scope>
+<style scope lang="scss">
 .box_progress {
 	display: flex;
 	justify-content: space-between;
@@ -147,8 +243,21 @@ page {
 	border-bottom-right-radius: 24rpx;
 	margin: 0 auto;
 	padding: 20rpx;
+	
+	.restart {
+		margin:0 auto;
+		text-align: center;
+		line-height: 80rpx;
+		color:#fff;
+		font-size: 30rpx;
+		width: 440rpx;
+		height: 80rpx;
+		background: #FF0000;
+		border-radius: 40rpx 40rpx 40rpx 40rpx;
+	}
 }
 .content_box {
+	font-size: 24rpx;
 	display: flex;
 	align-items: center;
 	color: #999999;
@@ -164,13 +273,105 @@ page {
 	margin-right: 8rpx;
 }
 
-.class_item {
-	width: 100%;
-	background: #ffffff;
-	box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
-	border-radius: 24rpx;
-	padding: 20rpx;
-	z-index: 999;
-	position: relative;
+.class {
+	margin-bottom: 30rpx;
+	
+	.class_item {
+		width: 100%;
+		background: #ffffff;
+		box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
+		border-radius: 24rpx;
+		padding: 20rpx;
+		z-index: 999;
+		position: relative;
+		
+		.class_img {
+			height: 316rpx;
+			width: 100%;
+			border-radius: 24rpx;
+		}
+		
+		.class_text {
+			padding:0 20rpx;
+			
+			.class_title {
+				color: #333333;
+				font-weight: bold;
+				font-size: 32rpx;
+			}
+		}
+		
+		.class-warm {
+			padding:10rpx 20rpx;
+			display: flex;
+			align-items: flex-start;
+			
+			&__icon {
+				margin-right:10rpx;
+			}
+			
+			&__text {
+				
+				.date {
+					font-size: 24rpx;
+					font-weight: bold;
+					color: #FF3B30;
+				}
+				
+				.state {
+					margin-top:15rpx;
+					font-size: 24rpx;
+					font-weight: bold;
+					color: #FF3B30;
+				}
+			}
+		}
+	}
+}
+
+
+
+
+.popup_box {
+	height: 700rpx;
+	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+	border-radius: 32rpx 32rpx 0rpx 0rpx;
+	
+	.line1{
+		width: 80rpx;
+		height: 8rpx;
+		background: #999999;
+		border-radius: 4rpx;
+		margin: 0 auto;
+		margin-top: 15rpx;
+	}
+	
+	
+	.grade{
+		height: 23rpx;
+		font-size: 24rpx;
+		color: #999999;
+		margin: 0 auto;
+		margin-top: 15rpx;
+		text-align: center;
+	}
+	
+	.confrim-btn{
+		height: 98rpx;
+		width: 100%;
+		display: flex;
+		align-items: center;
+		justify-content:center;
+		
+		.okBtn{
+			width: 200rpx;
+			height: 64rpx;
+			background: linear-gradient(0deg, #015EEA, #00C0FA);
+			border-radius: 32rpx;
+			color: #FFFFFF;
+			text-align: center;
+			line-height: 64rpx;
+		}
+	}
 }
 </style>

+ 38 - 29
pages2/wd/info.vue

@@ -9,42 +9,51 @@
 				<image @click="editAvatar"  :src="form.avatar?$method.splitImgHost(form.avatar, true):''" class="avatar"></image>
 				<view class="nick">{{form.realname}}</view>
 				<view>
-					<view class="item">
+					<view class="item" @click="editNickName">
 						<view>我的昵称</view>
-						<view @click="editNickName">{{form.nickname}}<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+						<view>{{form.nickname}}<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
 					</view>
-					<view class="item">
-						<view>性别</view>
-						<view class="rBox">
-							<picker @change="bindPickerChangeSex" :value="form.sex" :range="array_sex">
-						<view class="picker">{{ array_sex[form.sex] }}</view>
+					<view>
+						<picker @change="bindPickerChangeSex" :value="form.sex" :range="array_sex">
+							<view class="item">
+								<view>性别</view>
+								<view class="rBox">
+									<view class="picker">{{ array_sex[form.sex] }}</view>
+									<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
+								</view>
+							</view>
 						</picker>
-					<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
 					</view>
-					<view class="item">
-						<view>年龄</view>
-						<view class="rBox">
-							<picker mode="date" :end="$method.getDate()" :value="form.userBirth" @change="bindDateChange">
-								<view class="picker">{{ $method.getYears(form.userBirth) }} 岁</view>
-							</picker>
-						<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+					<view>
+						<picker mode="date" :end="$method.getDate()" :value="form.userBirth" @change="bindDateChange">
+							<view class="item">
+								<view>年龄</view>
+								<view class="rBox">
+									<view class="picker">{{ $method.getYears(form.userBirth) }} 岁</view>
+									<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
+								</view>
+							</view>
+						</picker>
 					</view>
-					<view class="item">
+					<view class="item" @click="editIdCard">
 						<view>关联学员身份</view>
-						<view style="display: flex;" @click="editIdCard">
+						<view style="display: flex;">
 							<view style="text-align: right;">
 								<view>{{ form.realname }}</view>
 								<view>{{ form.idCard }}</view>
 							</view>
 							<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
 					</view>
-					<view class="item">
-						<view>所在城市</view>
-						<view class="rBox">
-							<pick-regions :defaultRegion="defaultRegionCode" @getRegion="handleGetRegion2">
-								<view class="picker">{{ form.province || '-' }} {{ form.city || '-' }} {{ form.district || '-' }}</view>
-							</pick-regions>
-						<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+					<view>
+						<pick-regions :defaultRegion="defaultRegionCode" @getRegion="handleGetRegion2">
+							<view class="item">
+								<view>所在城市</view>
+								<view class="rBox">
+									<view class="picker">{{ form.province || '-' }} {{ form.city || '-' }} {{ form.district || '-' }}</view>
+									<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
+								</view>
+							</view>
+						</pick-regions>
 					</view>
 					<view class="item" @click="showPhone()">
 						<view>手机号码</view>
@@ -61,13 +70,13 @@
 	</view>
 	<u-modal v-model="n_show" @confirm="confirmNick" :show-cancel-button="true" title="修改昵称">
 		<view class="slot-content">
-			<u-input v-model="nickname" placeholder="请输入昵称" />
+			<u-input v-model="nickname" type="nickname" placeholder="请输入昵称" />
 		</view>
 	</u-modal>
 	<u-modal v-model="id_show" @confirm="confirmId" :show-cancel-button="true" title="修改关联信息">
 		<view class="slot-content">
-			<u-input v-model="realname" placeholder="请输入真实姓名" />
-			<u-input v-model="idCard" placeholder="请输入身份证" />
+			<u-input v-model="realname" type="nickname" placeholder="请输入真实姓名" />
+			<u-input v-model="idCard" type="idcard" placeholder="请输入身份证" />
 		</view>
 	</u-modal>
 	
@@ -109,7 +118,7 @@ export default {
 			showPhoneModal:false,
 			form:{
 				avatar:'',
-				userBirth:new Date()
+				userBirth:''
 			},
 			telForm:{
 				tel:'',
@@ -158,7 +167,7 @@ export default {
 	},
 	onShow(){
 		this.form = this.userInfo
-		console.log(this.form)
+		console.log(this.form,'0999')
 	},
 	onLoad(option) {
 	},

+ 35 - 14
pages3/polyv/polyv.vue

@@ -1,6 +1,10 @@
 <template>
 	<view class="plv-mp-demo-page">
 	  <player
+		bind:onLiveStorageProgress="onLiveStorageProgress"
+		bind:onLiveStatusChange="onLiveStatusChange"
+		bind:refreshStatus="onRefreshStatus"
+		ref="player"
 	    class="plv-mp-demo-player"
 	    :videoOption="videoOption"
 	  />
@@ -38,7 +42,17 @@ export default {
 				vodsrc: playRecordFile ? recordFileSimpleModel.mp4 || recordFileSimpleModel.m3u8 : '',
 				liveMode: playRecordFile ? 2 : 1,
 			  }
-		}
+		},
+		onLiveStorageProgress(res) {
+			console.log(1)
+			console.log(res)
+		},
+		onLiveStatusChange() {
+			console.log(2)
+		},
+		onRefreshStatus() {
+			console.log(3)
+		},
 	},
 	onLoad(options) {
 			options.mode = 'live';
@@ -49,23 +63,30 @@ export default {
 		    // avatarUrl: ''; // 用户头像
 	        options.userId = 'egsxlptzdq' // 2.0.0及以上版本的demo需要使用 userId 设置学员唯一id
 		    plv.init(options)
-		      .then(({ detail, chat }) => {
-				  
+		      .then((res) => {
+				  console.log(res)
 				  console.log(9999)
-		        this.detail = detail
-		        // 设置mode为live的videoOption
-		        // this.setLiveOption();
+		//         this.detail = detail
+		//         // 设置mode为live的videoOption
+		//         // this.setLiveOption();
 		
-		        if (detail.isPPT) {
-		          chat.on(chat.events.SLICESTART, () => {
-		            // 开始直播
-		          });
-		        } else {
-		          plv.api.getOrdinaryLiveStatus(detail.stream);
-		        }
+		//         if (detail.isPPT) {
+		//           chat.on(chat.events.SLICESTART, () => {
+		//             // 开始直播
+		//           });
+		//         } else {
+		//           plv.api.getOrdinaryLiveStatus(detail.stream);
+		//         }
 		      });
 		
-		console.log(this.$refs.plv)
+		console.log(this.$refs.player)
+		console.log(this.$refs.player)
+		console.log(this.$refs.player)
+		console.log(this.$refs.player)
+		console.log(this.$refs.player)
+		console.log(this.$refs.player)
+		console.log(this.$refs.player)
+		
 	},
 	onUnload() {
 		 plv.destroy();