XSLu08042 10 小時之前
父節點
當前提交
1b3ef79a05
共有 3 個文件被更改,包括 173 次插入96 次删除
  1. 58 29
      pages_course/activity.vue
  2. 15 6
      pages_course/appDownload.vue
  3. 100 61
      pages_course/register.vue

+ 58 - 29
pages_course/activity.vue

@@ -2,7 +2,7 @@
 	<view class="container_box">
 		<view class="header-nav" :style="{height: `calc(88rpx + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}">
 		</view>
-		<view class="conbox" :style="{paddingTop: `calc(88rpx + ${statusBarHeight}px)`}">
+		<view class="conbox">
 			<image class="activity_yh_right" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_yh_right.png" mode="widthFix"></image>
 			<image class="activity_yh_left" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_yh_left.png" mode="widthFix"></image>
 			<image class="activity_title" v-show="status==0" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_title.png" mode="widthFix"></image>
@@ -26,8 +26,9 @@
 			<view class="activity_btn animation" v-if="status==0" @click="handleReceive">
 				<view class="btn">领取福袋</view>
 				<image src="https://cdn.his.cdwjyyh.com/minapp/course/activity_btn.png" mode="heightFix"></image>
+				<view class="exsct"></view>
 			</view>
-			<view class="activity_btn_down x-c" @click="navTo">
+			<view class="activity_btn_down x-c" v-if="status!=0" @click="navTo">
 				<text>如何下载芳华未来APP</text>
 				<image src="https://cdn.his.cdwjyyh.com/minapp/course/activity_more.png" mode="aspectFill"></image>
 			</view>
@@ -56,7 +57,7 @@
 			return {
 				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
 				show: false,
-				status:2, 
+				status: 0, 
 			}
 		},
 		methods: {
@@ -67,28 +68,41 @@
 				this.show = true
 			},
 			navTo() {
-				// this.show = false
-				// uni.navigateTo({
-				// 	url: '/pages_course/appDownload'
-				// })
-				uni.showModal({
-					title: '领取失败',
-					content: '福袋余额不足,请联系客服',
-					showCancel: false,
-					success: function (res) {
-						if (res.confirm) {
-							console.log('用户点击确定');
-						} else if (res.cancel) {
-							console.log('用户点击取消');
-						}
-					}
-				});
+				this.show = false
+				uni.navigateTo({
+					url: '/pages_course/appDownload'
+				})
+				// uni.showModal({
+				// 	title: '领取失败',
+				// 	content: '福袋余额不足,请联系客服',
+				// 	showCancel: false,
+				// 	success: function (res) {
+				// 		if (res.confirm) {
+				// 			console.log('用户点击确定');
+				// 		} else if (res.cancel) {
+				// 			console.log('用户点击取消');
+				// 		}
+				// 	}
+				// });
 			}
 		}
 	}
 </script>
 
 <style scoped lang="scss">
+	.exsct {
+		height: 92rpx;
+		width: 437rpx;
+		background-color: transparent;
+		border-radius: 69rpx;
+		position: absolute;
+		top: 27rpx;
+		left: 28rpx;
+		box-shadow: inset -57rpx 0px 40rpx -26rpx rgba(255, 255, 255, 0.7);
+		will-change: left, opacity;
+		animation: leftFade 2s linear infinite;
+		opacity: 0;
+	}
 	.color_FB2205 {
 		color: #FB2205;
 	}
@@ -147,14 +161,6 @@
 		overflow: hidden;
 		box-sizing: border-box;
 		width: 100%;
-		position: fixed;
-		top: 0;
-		left: 0;
-		background-image: url('https://cdn.his.cdwjyyh.com/minapp/course/activity_title.png');
-		background-size: 100%;
-		background-repeat: no-repeat;
-		z-index: 9999;
-		overflow: hidden;
 	}
 	.conbox {
 		position: relative;
@@ -225,6 +231,8 @@
 			justify-content: center;
 			position: relative;
 			z-index: 2;
+			overflow: hidden;
+			border-radius: 137rpx;
 			image {
 				height: 137rpx;
 				position: absolute;
@@ -309,13 +317,34 @@
 	}
 	.animation {
 		will-change: transform;
-		animation: scaleAnimation 1s ease infinite;
+		animation: scaleAnimation 2s ease infinite;
+	}
+	@keyframes leftFade {
+		0% {
+			left: -464rpx;
+			opacity: 0;
+		}
+		25% {
+		  opacity: 1;
+		  left: -249rpx;
+		}
+		50% {
+			opacity: 0;
+			left: 16rpx;
+		}
+		100% {
+			opacity: 0;
+			left: 490rpx;
+		}
 	}
-	
 	@keyframes scaleAnimation {
 	  0% {
 	    transform: scale(1);
 	  }
+	  // 30% {
+	  //   transform: scale(1.05);
+	  // }
+	  
 	  50% {
 	    transform: scale(1.05);
 	  }

+ 15 - 6
pages_course/appDownload.vue

@@ -1,6 +1,7 @@
 <template>
 	<view>
-		<u-parse :content="content" :tagStyle="style" :showImgMenu="true"></u-parse>
+		<image v-if="os!='ios'" class="img" src="https://cdn.his.cdwjyyh.com/minapp/course/android_app.jpg" mode="widthFix"></image>
+		<image v-if="os!='android'" class="img" src="https://cdn.his.cdwjyyh.com/minapp/course/ios_app.jpg" mode="widthFix"></image>
 	</view>
 </template>
 
@@ -8,14 +9,22 @@
 	export default {
 		data() {
 			return {
-				content: '',
-				style: {
-					'img':'display: block;'
-				}
+				os: ''
 			}
+		},
+		onLoad() {
+			uni.getSystemInfo({
+				success: (res)=>{
+					this.os = res.osName
+				}
+			});
 		}
 	}
 </script>
 
-<style>
+<style scoped>
+	.img {
+		width: 100%;
+		display: block;
+	}
 </style>

+ 100 - 61
pages_course/register.vue

@@ -14,7 +14,7 @@
 		<u-popup :show="userlogo" mode="bottom" round='12'>
 			<view class="userlogo column">
 				<view class="mtb30 justify-start align-center ml20">
-					<u-avatar :src="imgPath+'/app/image/logo.png'" size="50"></u-avatar>
+					<u-avatar src="/static/logo.png'" size="50"></u-avatar>
 					<view class="bold mlr20">丝路佳选</view>
 					<view>申请</view>
 				</view>
@@ -118,6 +118,7 @@
 		onLoad(option) {
 			this.urlOption = option.link ? JSON.parse(decodeURIComponent(option.link)) : {},
 			this.sortLink = this.urlOption.link || ''
+			this.chatId = this.urlOption.chatId
 			console.log(this.sortLink)
 			uni.$on('usercode',(data)=>{
 				if(data) {
@@ -217,66 +218,96 @@
 					return
 				}
 				let that = this;
-				uni.showLoading({
-					title: '报名中'
-				})
-				getRealLink({sortLink:this.sortLink}).then(res=>{
-					uni.hideLoading()
-					if(res.code == 200) {
-						let linkurl=JSON.parse(res.realLink.split('?link=')[1]) 
-						this.chatId=linkurl.chatId
-						console.log(this.chatId)
-						if(res.config&&res.config.userCourseAuthDomain) {
-							uni.setStorageSync('weixinOauth',res.config.userCourseAuthDomain)
-							if(this.isLoginH5==0) {
-								this.utils.isLoginCourse().then(
-									isLogin => {
-										this.isLogin = isLogin
-										if(this.isLogin) {
-											// this.editUserA()
-											if(this.chatId!=''||this.chatId){
-												this.userlogo=true
-											}else{
-												this.getAddCompanyUser()
-											}
-										} else {
-											this.goLogin()
-										}
-									},
-									rej => {}
-								);
-							}else {
-								this.utils.isLoginResCourse().then(
-									isLogin => {
-										this.isLogin = isLogin
-										if(this.isLogin) {
-											this.getAddCompanyUser()
-										} else {
-											this.goLogin()
-										}
-									},
-									rej => {}
-								);
+				if(this.isLoginH5==0) {
+					this.utils.isLoginCourse().then(
+						isLogin => {
+							this.isLogin = isLogin
+							if(this.isLogin) {
+								// this.editUserA()
+								if(this.chatId!=''||this.chatId){
+									this.userlogo=true
+								}else{
+									this.getAddCompanyUser(1)
+								}
+							} else {
+								this.goLogin()
 							}
-						}else {
-							uni.showToast({
-								title: '授权地址错误',
-								icon: 'none'
-							});
-						}
-					} else {
-						uni.showToast({
-							title: res.msg,
-							icon: 'none'
-						});
-					}
-				}).catch(err=>{
-					uni.hideLoading()
-					uni.showToast({
-						title: '发生错误,请稍后再试',
-						icon: 'none'
-					});
-				})
+						},
+						rej => {}
+					);
+				}else {
+					this.utils.isLoginResCourse().then(
+						isLogin => {
+							this.isLogin = isLogin
+							if(this.isLogin) {
+								this.getAddCompanyUser(1)
+							} else {
+								this.goLogin()
+							}
+						},
+						rej => {}
+					);
+				}
+				// uni.showLoading({
+				// 	title: '报名中'
+				// })
+				// getRealLink({sortLink:this.sortLink}).then(res=>{
+				// 	uni.hideLoading()
+				// 	if(res.code == 200) {
+				// 		let linkurl=JSON.parse(res.realLink.split('?link=')[1]) 
+				// 		this.chatId=linkurl.chatId
+				// 		console.log(this.chatId)
+				// 		if(res.config&&res.config.userCourseAuthDomain) {
+				// 			uni.setStorageSync('weixinOauth',res.config.userCourseAuthDomain)
+				// 			if(this.isLoginH5==0) {
+				// 				this.utils.isLoginCourse().then(
+				// 					isLogin => {
+				// 						this.isLogin = isLogin
+				// 						if(this.isLogin) {
+				// 							// this.editUserA()
+				// 							if(this.chatId!=''||this.chatId){
+				// 								this.userlogo=true
+				// 							}else{
+				// 								this.getAddCompanyUser()
+				// 							}
+				// 						} else {
+				// 							this.goLogin()
+				// 						}
+				// 					},
+				// 					rej => {}
+				// 				);
+				// 			}else {
+				// 				this.utils.isLoginResCourse().then(
+				// 					isLogin => {
+				// 						this.isLogin = isLogin
+				// 						if(this.isLogin) {
+				// 							this.getAddCompanyUser()
+				// 						} else {
+				// 							this.goLogin()
+				// 						}
+				// 					},
+				// 					rej => {}
+				// 				);
+				// 			}
+				// 		}else {
+				// 			uni.showToast({
+				// 				title: '授权地址错误',
+				// 				icon: 'none'
+				// 			});
+				// 		}
+				// 	} else {
+				// 		uni.showToast({
+				// 			title: res.msg,
+				// 			icon: 'none'
+				// 		});
+				// 	}
+				// }).catch(err=>{
+				// 	uni.hideLoading()
+				// 	uni.showToast({
+				// 		title: '发生错误,请稍后再试',
+				// 		icon: 'none'
+				// 	});
+				// })
 			},
 			goLogin(data) {
 				if(this.isLoginH5==0) {
@@ -334,8 +365,14 @@
 					})
 				}
 			},
-			getAddCompanyUser() {
+			getAddCompanyUser(type) {
+				if(type==1) {
+					uni.showLoading({
+						title: '报名中'
+					})
+				}
 				isAddCompanyUser(this.urlOption).then(res=>{
+					uni.hideLoading()
 					if(res.code==200) {
 						this.isRegister = 1
 					} else {
@@ -344,6 +381,8 @@
 							icon: 'none'
 						});
 					}
+				}).catch(()=>{
+					uni.hideLoading()
 				})
 			},
 			goWXLogin() {