XSLu08042 21 uur geleden
bovenliggende
commit
0f00d8ffca
3 gewijzigde bestanden met toevoegingen van 85 en 0 verwijderingen
  1. 12 0
      pages.json
  2. 70 0
      pages_course/courseExpiration.vue
  3. 3 0
      pages_course/videoDetail.vue

+ 12 - 0
pages.json

@@ -824,6 +824,18 @@
 							"bounce": "none"
 						}
 					}
+				},
+				{
+					"path" : "courseExpiration",
+					"style" :                                                                                    
+					{
+						"navigationBarTitleText": "访问",
+						"scrollIndicator": "none",
+						"navigationBarBackgroundColor" : "#f5f5f5",
+						"app-plus": {
+							"bounce": "none"
+						}
+					}
 				}
             ]
         }

+ 70 - 0
pages_course/courseExpiration.vue

@@ -0,0 +1,70 @@
+<template>
+	<view class="container-body">
+		<text class="user" v-if="userId">#{{userId}}</text>
+		<image src="https://cdn.his.cdwjyyh.com/minapp/course/course_expiration_img.png" mode="aspectFill"></image>
+			<view class="title">{{msg}}</view>
+		<view style="margin-bottom: 10vh;" v-show="code">状态码:{{code}}</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				pageUrl:"",
+				msg: '加载中...',
+				userInfo: {},
+				code: '',
+				userId: ''
+			}
+		},
+		onLoad(option) {
+			this.code = option.code ||''
+			this.msg = option.msg ? decodeURIComponent(option.msg) : '';
+			if(uni.getStorageSync('auto_userInfo') && JSON.stringify(uni.getStorageSync('auto_userInfo'))!='{}') {
+				let user = JSON.parse(uni.getStorageSync('auto_userInfo'))
+				this.userId = user.userId
+			} else {
+				this.user = {}
+				this.userId = ''
+			}
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.container-body {
+		background-color: #fff;
+		position: relative;
+		justify-content: center;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 32rpx;
+		color: #757575;
+		line-height: 48rpx;
+		text-align: center;
+		height: 100vh;
+		width: 100vw;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		.title {
+			font-weight: bold;
+			font-size: 40rpx;
+			color: #1E2F67;
+			margin-bottom: 24rpx;
+			padding: 0 60rpx;
+		}
+		image {
+			width: 428rpx;
+			height: 360rpx;
+			margin-bottom: 30rpx;
+		}
+		.user {
+			position: absolute;
+			right: 24rpx;
+			top: 24rpx;
+		}
+	}
+</style>

+ 3 - 0
pages_course/videoDetail.vue

@@ -1122,6 +1122,9 @@
 								title: res.msg,
 								icon: 'none'
 							});
+							uni.redirectTo({
+								url: '/pages_course/courseExpiration?code='+res.code+'&msg='+res.msg
+							})
 						}
 					},
 					err => {}