瀏覽代碼

去掉无相关的代码

xuqiaoying 3 年之前
父節點
當前提交
a9eeb4d10e

+ 0 - 122
pages/index/index.vue

@@ -176,7 +176,6 @@
 
 <script>
 import { mapGetters, mapActions } from 'vuex';
-// import { websocket } from '@/common/socket.js';
 import { socket_url, version} from '@/common/request.js';
 export default {
 	components: {},
@@ -321,10 +320,6 @@ export default {
 				  },
 				  fail(err) {
 					  console.log(err)
-					 //  uni.showToast({
-					 //  	title:'无效的appId,'+err.errMsg,
-						// icon:'none'
-					 //  })
 				  }
 				})
 			}
@@ -459,95 +454,6 @@ export default {
 			uni.navigateTo({
 				url:'/pages2/wd/class'
 			})
-			// let currentTime = this.$method.getZeroTime();
-			
-			// if(currentTime < item.studyStartTime || currentTime > item.studyEndTime) {
-			// 	uni.showToast({
-			// 		title:'不在学习有效期,不可以学习了哦',
-			// 		icon:'none'
-			// 	})
-			// 	return;
-			// }
-			
-			// if( (item.classStartTime && currentTime <= item.classStartTime) || (item.classEndTime && currentTime >= item.classEndTime) ) {
-			// 	uni.showToast({
-			// 		title:'不在班级有效期,不能进入学习',
-			// 		icon:'none'
-			// 	})
-			// 	return;
-			// }
-			
-			// if(item.learningStatus == 2) {
-			// 	uni.showToast({
-			// 		title:'开放学习时间待定,不能进入学习',
-			// 		icon:'none'
-			// 	})
-			// 	return;
-			// }
-			
-			// if(item.classStatus == 0 ) {
-			// 	uni.showToast({
-			// 		title:'尚未开班,不能进入学习',
-			// 		icon:'none'
-			// 	})
-			// 	return;
-			// }
-			
-			// if(item.learningStatus == 3 && (currentTime < item.learningTimeStart) ) {
-			// 	uni.showToast({
-			// 		title:'不在开放学习时间,不能进入学习',
-			// 		icon:'none'
-			// 	})
-			// 	return;
-			// }
-			
-			// if(item.gradeStatus == 1 && item.status == 1 && (item.studyEndTime > currentTime) &&  (item.classEndTime && (item.classEndTime < currentTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0) {
-				
-			// 	uni.showModal({
-			// 		title:'提示',
-			// 		content:'班级已过期,需要重新选班',
-			// 		showCancel:false,
-			// 		success:() => {
-			// 			uni.navigateTo({
-			// 				url:"/pages2/wd/class"
-			// 			})
-			// 		}
-			// 	})
-			// 	return;
-			// }
-			
-			// let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId,item.gradeId);
-			
-			// if(rebuildStatus == 0) {
-			// 	this.$navTo.togo('/pages2/learn/details', {
-			// 		gradeId:item.gradeId,
-			// 		goodsId: item.goodsId
-			// 	})
-			// 	return;
-			// }
-			
-			// if(item.courseNum == 1 ) {
-				
-			// 	this.$api.courseCourseList({
-			// 		pageNum:1,
-			// 		pageSize:1,
-			// 		goodsId:item.goodsId,
-			// 		gradeId:item.gradeId
-			// 	}).then(res => {
-			// 		if(res.data.code == 200) {
-			// 			uni.navigateTo({
-			// 				url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
-			// 			})
-			// 		}
-			// 	});
-			// 	return;
-			// }
-			
-			
-			// this.$navTo.togo('/pages2/wd/course', {
-			// 	id: item.goodsId,
-			// 	gid:item.gradeId
-			// });
 		},
 		/**
 		 * @param {Object} goodsId 商品id
@@ -670,34 +576,6 @@ export default {
 							self.goodsItem = self.planGoodsList[0];
 						}
 						self.dealRL(result.data.data[0].calendarStudyVo)
-						/* let date = new Date();
-						let num = date.getDate();
-						let month = date.getMonth() + 1;
-						let list = [];
-						for (let i = 0; i < result.data.data[0].calendarStudyVo.length; i++) {
-							let item = result.data.data[0].calendarStudyVo[i];
-							if (item.month == month) {
-								list = item.dayStudyList;
-							}
-						}
-						for (let i = 0; i < list.length; i++) {
-							let item = list[i];
-							item.color = 0;
-							if (item.date == num) {
-								item.color = 3;
-							}
-							if (item.perform == 1) {
-								item.color = 1;
-							}
-							if (item.perform == 2) {
-								item.color = 2;
-							}
-							item.note = item.studyCourseKnob;
-							if (item.note > 0) {
-								item.dot = true;
-							}
-							self.date_num.push(item);
-						} */
 					} else {
 						self.initDay();
 					}

+ 4 - 58
pages/learn/index.vue

@@ -216,17 +216,10 @@ export default {
 			if (item.interfaceAccountId > 0) { //学习账号已开通
 
 				if (item.learnStatus == 1) { //跳转第三方h5
-					// this.showMark = true;
-					console.log('dshfisdgfo')
 					uni.navigateTo({
-						
 						url: `/pages3/polyv/detail?goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&isOther=1`
 					})
 					return;
-					// uni.navigateTo({
-					// 	url:'/pages/webview/index?url='+item.officialLearningUrl
-					// })
-					// return;
 				} else {
 					uni.showModal({
 						showCancel: false,
@@ -278,36 +271,6 @@ export default {
 				})
 				return;
 			}
-			
-			// 这里的一建先不用
-			// var confirmDetail = true
-			// if (item.educationName == '继续教育') { 
-			// 	if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') { 
-			// 		confirmDetail = await this.userConfirmInfoDetail()
-			// 	}
-			// }
-			
-			// if(!confirmDetail) {
-			// 	return;
-			// }
-			
-			// //内部系统
-			// if (item.interfacePushId > 0 && item.officialStatus != 1) {
-			// 	uni.showModal({
-			// 		showCancel: false,
-			// 		content: '机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!'
-			// 	});
-			// 	return;
-			// }
-
-			// 这里的一建先不用
-			// this.itemIndex = index;
-			// if (item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > this.sysTime) && (item
-			// 		.classEndTime && (item.classEndTime < this.sysTime)) && (item.periodStatus == 0 || item
-			// 		.periodStatus == -1) && item.studyCount > 0) {
-			// 	this.selectClass(item, index);
-			// 	return;
-			// }
 
 			// /course/goodsRebuildStatus查询用户商品重修状态
 			let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId, item.gradeId)
@@ -321,7 +284,6 @@ export default {
 				return;
 			}
 
-			// if (item.educationName == '继续教育') {
 				// /lock/lockStatus
 				this.$api.lockLockStatus({
 					action: 'jxjy',
@@ -346,32 +308,16 @@ export default {
 								orderGoodsId: item.orderGoodsId,
 							}).then(res => {
 								if (res.data.code == 200) {
-									// if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
-									// 	this.userConfirmInfoDetail().then(() => {
-									// 			uni.navigateTo({
-									// 					url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-									// 				})
-									// 	})
-									// } else {
-										uni.navigateTo({
-												url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-											})
-									// }
-								
+									uni.navigateTo({
+											url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
+										})
 							
 								}
 							});
 							return;
 						}
 						
-						// if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
-						// 	// this.userConfirmInfoDetail().then(() => {
-						// 			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-						// 	// })
-						// } else {
-							this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-						// }
-						
+						this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);						
 					}
 				})
 

+ 0 - 24
pages/shopping/shoppingCart.vue

@@ -222,22 +222,6 @@ export default {
 				});
 				return false;
 			}
-			// if (this.provinceList.length == 0) {
-			// 	uni.showModal({
-			// 		title: '提示',
-			// 		content: '请选择报考地区',
-			// 		showCancel: false
-			// 	});
-			// 	return false;
-			// }
-			// if (this.cityList.length == 0) {
-			// 	uni.showModal({
-			// 		title: '提示',
-			// 		content: '请选择报考地区',
-			// 		showCancel: false
-			// 	});
-			// 	return false;
-			// }
 			return true;
 		},
 		checkData() {
@@ -251,14 +235,6 @@ export default {
 					return false;
 				}
 			} else if (this.detail.templateType == 'apply') {
-				// if (!this.applyObj.applyAreasJson) {
-				// 	uni.showModal({
-				// 		title: '提示',
-				// 		content: '请选择报考地区',
-				// 		showCancel: false
-				// 	});
-				// 	return false;
-				// }
 				if (!this.applyObj.examDateJson) {
 					uni.showModal({
 						title: '提示',

+ 0 - 88
pages2/register/bind.vue

@@ -99,99 +99,11 @@ export default {
 			);
 			
 		},
-		radioGroupChange(e) {
-			 console.log(e);
-		},
-		codeChange(text) {
-			this.codeTips = text;
-			
-		},
-		// 获取验证码
-		getCode() {
-			if(this.$refs.uCode.canGetCode) {
-				// 模拟向后端请求验证码
-				uni.showLoading({
-					title: '正在获取验证码',
-					mask: true
-				})
-				setTimeout(() => {
-					uni.hideLoading();
-					// 这里此提示会被this.start()方法中的提示覆盖
-					this.$u.toast('验证码已发送');
-					// 通知验证码组件内部开始倒计时
-					this.$refs.uCode.start();
-				}, 2000);
-			} else {
-				this.$u.toast('倒计时结束后再发送');
-			}
-		},
-		sectionChange(index) {
-			this.current = index;
-		},
-		getPhoneNumber(e) {
-			let that = this;
-			uni.checkSession({
-			  success () {
-			    //session_key 未过期,并且在本生命周期一直有效
-				that.putInfo(e)
-			  },
-			  fail () {
-			    // session_key 已经失效,需要重新执行登录流程
-			    uni.login({
-			    	provider: 'weixin',
-			    	success: function(loginRes) {
-			    		that.code = loginRes.code;
-						that.putInfo(e)
-			    	}
-			    });
-			  }
-			})
-		},
-		putInfo(e){
-			let that = this;
-			if (e.detail.encryptedData) {
-				let inviteCode =  uni.getStorageSync("inviteCode") 
-				//用户同意授权
-				var  datas = {
-					iv: e.detail.iv,
-					encryptedData: e.detail.encryptedData,
-					code: that.code
-				};
-				if(inviteCode){
-					datas.inviteCode = inviteCode
-				}
-				that.$api.login(datas).then(
-					res => {
-						if (res.data.code == 200) {
-							uni.setStorageSync('union_id', res.data.data.union_id);
-							uni.setStorageSync('token', res.data.data.token);
-							that.$api.getInfo().then(resdata => {
-								if(resdata.data.code == 200){
-									uni.navigateBack();
-									that.$store.state.userInfo = resdata.data.data;
-								}
-								
-							});
-						} else {
-							uni.showModal({
-								title: '提示',
-								content: res.data.msg,
-								showCancel: false
-							});
-						}
-					},
-					err => {
-						console.log(err);
-					}
-				);
-			}
-		}
 	},
 	onLoad(option) {
 		console.log('注册:', option.scanCode)
 		let that = this;
 		option.scanCode && (this.scanCode = option.scanCode)
-		// this.from = option.from; // this.from 看了页面没有用到,注释了
 		uni.removeStorageSync('user_account') //移除临时账号
 		uni.removeStorageSync('token')
 		uni.login({

+ 0 - 65
pages2/register/forget.vue

@@ -84,7 +84,6 @@ export default {
 			isUse:false
 		};
 	},
-	mounted() {},
 	methods: {
 		canSubmit() {
 			if(this.form.tel && this.form.code && this.form.pwd && this.form.pwdAgain) {
@@ -142,9 +141,6 @@ export default {
 				}
 			);
 		},
-		radioGroupChange(e) {
-			 console.log(e);
-		},
 		codeChange(text) {
 			this.codeTips = text;
 		},
@@ -173,67 +169,6 @@ export default {
 			}
 				
 		},
-		sectionChange(index) {
-			this.current = index;
-		},
-		getPhoneNumber(e) {
-			let that = this;
-			uni.checkSession({
-			  success () {
-			    //session_key 未过期,并且在本生命周期一直有效
-				that.putInfo(e)
-			  },
-			  fail () {
-			    // session_key 已经失效,需要重新执行登录流程
-			    uni.login({
-			    	provider: 'weixin',
-			    	success: function(loginRes) {
-			    		that.code = loginRes.code;
-						that.putInfo(e)
-			    	}
-			    });
-			  }
-			})
-		},
-		putInfo(e){
-			let that = this;
-			if (e.detail.encryptedData) {
-				let inviteCode =  uni.getStorageSync("inviteCode") 
-				//用户同意授权
-				var  datas = {
-					iv: e.detail.iv,
-					encryptedData: e.detail.encryptedData,
-					code: that.code
-				};
-				if(inviteCode){
-					datas.inviteCode = inviteCode
-				}
-				that.$api.login(datas).then(
-					res => {
-						if (res.data.code == 200) {
-							uni.setStorageSync('union_id', res.data.data.union_id);
-							uni.setStorageSync('token', res.data.data.token);
-							that.$api.getInfo().then(resdata => {
-								if(resdata.data.code == 200){
-									uni.navigateBack();
-									that.$store.state.userInfo = resdata.data.data;
-								}
-								
-							});
-						} else {
-							uni.showModal({
-								title: '提示',
-								content: res.data.msg,
-								showCancel: false
-							});
-						}
-					},
-					err => {
-						console.log(err);
-					}
-				);
-			}
-		}
 	},
 	onLoad(option) {
 		this.$refs.uForm.setRules(this.rules)

+ 0 - 81
pages2/register/register.vue

@@ -379,22 +379,6 @@ export default {
 		},
 		submit(){
 			let that = this
-			// if(!this.form.tel){
-			// 	this.$u.toast('请输入手机号码');
-			// 	return 
-			// }
-			// if(!this.form.code){
-			// 	this.$u.toast('请输入验证码');
-			// 	return 
-			// }
-			// if(!this.form.pwd){
-			// 	this.$u.toast('请输入注册密码');
-			// 	return 
-			// }
-			// if(!this.read){
-			// 	this.$u.toast('请勾选服务协议');
-			// 	return 
-			// }
 			this.$refs.uForm.validate(valid => {
 				if(valid) {
 					if(!this.read){
@@ -484,9 +468,6 @@ export default {
 				}
 			})
 		},
-		radioGroupChange(e) {
-			 console.log(e);
-		},
 		codeChange(text) {
 			this.codeTips = text;
 		},
@@ -516,67 +497,6 @@ export default {
 			}
 
 		},
-		sectionChange(index) {
-			this.current = index;
-		},
-		getPhoneNumber(e) {
-			let that = this;
-			uni.checkSession({
-			  success () {
-			    //session_key 未过期,并且在本生命周期一直有效
-				that.putInfo(e)
-			  },
-			  fail () {
-			    // session_key 已经失效,需要重新执行登录流程
-			    uni.login({
-			    	provider: 'weixin',
-			    	success: function(loginRes) {
-			    		that.code = loginRes.code;
-						that.putInfo(e)
-			    	}
-			    });
-			  }
-			})
-		},
-		putInfo(e){
-			let that = this;
-			if (e.detail.encryptedData) {
-				let inviteCode =  uni.getStorageSync("inviteCode") 
-				//用户同意授权
-				var  datas = {
-					iv: e.detail.iv,
-					encryptedData: e.detail.encryptedData,
-					code: that.code
-				};
-				if(inviteCode){
-					datas.inviteCode = inviteCode
-				}
-				that.$api.login(datas).then(
-					res => {
-						if (res.data.code == 200) {
-							uni.setStorageSync('union_id', res.data.data.union_id);
-							uni.setStorageSync('token', res.data.data.token);
-							that.$api.getInfo().then(resdata => {
-								if(resdata.data.code == 200){
-									uni.navigateBack();
-									that.$store.state.userInfo = resdata.data.data;
-								}
-								
-							});
-						} else {
-							uni.showModal({
-								title: '提示',
-								content: res.data.msg,
-								showCancel: false
-							});
-						}
-					},
-					err => {
-						console.log(err);
-					}
-				);
-			}
-		}
 	},
 	onLoad(option) {
 		console.log(option)
@@ -584,7 +504,6 @@ export default {
 		this.$refs.uForm.setRules(this.rules)
 		option.scanCode && (this.scanCode = option.scanCode)
 		console.log('跳转注册时的scanCode', this.scanCode)
-		// this.from = option.from; // 看了页面没有用到,注释了
 		uni.login({
 			provider: 'weixin',
 			success: function(loginRes) {

+ 1 - 124
pages4/login/login.vue

@@ -149,56 +149,6 @@ export default {
 				iv:  e.detail.iv
 			}).then(res => {
 				this.loginCallback(res, 'wxlogin')
-				// if(res.data.data.full_info){
-				// 	//信息完善,直接进入页面
-				// 	uni.setStorageSync('user_account', res.data.data.user_account);
-				// 	uni.setStorageSync('token', res.data.data.token);
-				// 	// /app/user/getInfo 登录用户信息
-				// 	this.$api.getInfo().then(resdata => {
-				// 		if(resdata.data.code == 200){
-				// 			this.$store.state.userInfo = resdata.data.data;
-							
-				// 			if (this.scanCode) { // pc扫码进来登录成功
-				// 				this.submitCode()
-				// 			} else if(!this.isBack){
-				// 				let goPath = uni.getStorageSync('goPath')
-								
-				// 				if(goPath == 'course') {
-				// 					uni.redirectTo({
-				// 						url:'/pages2/wd/class'
-				// 					})
-				// 					this.$method.setUuid(new Date().valueOf() + "")
-				// 				} else if(goPath == 'bank') {
-				// 					uni.redirectTo({
-				// 						url:'/pages2/wd/question_bank'
-				// 					})
-				// 					this.$method.setUuid(new Date().valueOf() + "")
-				// 				} else {
-				// 					uni.reLaunch({
-				// 						url:'/pages/index/index'
-				// 					})
-									
-				// 					this.$method.setUuid(new Date().valueOf() + "")
-				// 				}
-				// 			}else{
-				// 				uni.navigateBack();
-				// 			}
-				// 		}
-						
-				// 	});
-					
-				// }else{
-				// 	//未完善信息,存为临时信息
-				// 	uni.setStorageSync('user_account_temp', res.data.data.user_account);
-				// 	uni.setStorageSync('token_temp', res.data.data.token);
-				// 	if (this.scanCode) {
-				// 		this.$navTo.togo('/pages2/register/bind', this.scanCode)
-				// 	} else {
-				// 		this.$navTo.togo('/pages2/register/bind');
-				// 	}
-					
-				// }	
-				
 			})
 		},
 		canLogin() {
@@ -236,49 +186,6 @@ export default {
 							that.isUse = false
 							if (res.data.code == 200) {
 								this.loginCallback(res, 'smslogin')
-								// if(res.data.data.full_info){
-								// 	//信息完善,直接进入页面
-								// 	uni.setStorageSync('user_account', res.data.data.user_account);
-								// 	uni.setStorageSync('token', res.data.data.token);
-								// 	that.$api.getInfo().then(resdata => {
-								// 		if(resdata.data.code == 200){
-								// 			that.$store.state.userInfo = resdata.data.data;
-											
-								// 			if (this.scanCode) { // pc扫码进来登录成功
-								// 				this.submitCode()
-								// 			} else if(!that.isBack){
-								// 				let goPath = uni.getStorageSync('goPath')
-												
-								// 				if(goPath == 'course') {
-								// 					uni.redirectTo({
-								// 						url:'/pages2/wd/class'
-								// 					})
-								// 				} else if(goPath == 'bank') {
-								// 					uni.redirectTo({
-								// 						url:'/pages2/wd/question_bank'
-								// 					})
-								// 				} else {
-								// 					uni.reLaunch({
-								// 						url:'/pages/index/index'
-								// 					})
-								// 				}
-								// 			}else{
-								// 				uni.navigateBack();
-								// 			}
-								// 		}
-										
-								// 	});
-									
-								// }else{
-								// 	//未完善信息,存为临时信息
-								// 	uni.setStorageSync('user_account_temp', res.data.data.user_account);
-								// 	uni.setStorageSync('token_temp', res.data.data.token);
-								// 	if (this.scanCode) {
-								// 		this.$navTo.togo('/pages2/register/bind', this.scanCode)
-								// 	} else {
-								// 		this.$navTo.togo('/pages2/register/bind');
-								// 	}
-								// }	
 							} else {
 								that.$u.toast(res.data.msg);
 							}
@@ -331,37 +238,7 @@ export default {
 				res => {
 					that.isUse = false
 					if (res.data.code == 200) {
-						this.loginCallback(res, 'pwlogin')
-						// if(res.data.data.full_info){
-						// 	//信息完善,直接进入页面
-						// 	uni.setStorageSync('user_account', res.data.data.user_account);
-						// 	uni.setStorageSync('token', res.data.data.token);
-						// 	that.$api.getInfo().then(resdata => {
-						// 		if(resdata.data.code == 200){
-						// 			that.$store.state.userInfo = resdata.data.data;
-						// 			if (this.scanCode) { // pc扫码进来登录成功
-						// 				this.submitCode()
-						// 			} else if(!that.isBack){
-						// 				uni.reLaunch({
-						// 					url:'/pages/index/index'
-						// 				})
-						// 			}else{
-						// 				uni.navigateBack();
-						// 			}
-						// 		}
-								
-						// 	});
-						// }else{
-						// 	//未完善信息,存为临时信息
-						// 	uni.setStorageSync('user_account_temp', res.data.data.user_account);
-						// 	uni.setStorageSync('token_temp', res.data.data.token);
-						// 	// that.$navTo.togo('/pages2/register/bind');
-						// 	if (this.scanCode) {
-						// 		this.$navTo.togo('/pages2/register/bind', this.scanCode)
-						// 	} else {
-						// 		this.$navTo.togo('/pages2/register/bind');
-						// 	}
-						// }	
+						this.loginCallback(res, 'pwlogin')	
 					} else {
 						that.$u.toast(res.data.msg);
 					}

+ 1 - 1
pages4/login/pcLoginSuccess.vue

@@ -13,7 +13,7 @@
                 <view class="pc_learn">你可以在电脑端学习了</view>
             </view>
             <view class="bg_pic">
-                <image class="poster" src="/static/me/poster.png"></image>
+                <!-- <image class="poster" src="/static/me/poster.png"></image> -->
             </view>
         </view>
         <view v-if="!hidden" class="toLearn" @click="toHome()"></view>

二進制
static/me/poster.png