Browse Source

修复bug

yangzj 2 years ago
parent
commit
2a80146a74

+ 10 - 8
h5_web/pages/phoneLogin/phoneLogin.vue

@@ -131,7 +131,6 @@
 					.then(res => {
 						if (res.code == '200') {
 							console.log('登录信息:', res);
-							this.$u.vuex('vuex_user', res.data);
 							this.$u.vuex('vuex_hasLogin', true);
 							this.veteEducCheck()
 						} else {
@@ -144,13 +143,16 @@
 					});
 			},
 			veteEducCheck() {
-				this.$u.api.getVeteEducCheck().then(res => {
-					if (res.data != 9) {
-						this.jumpIndex()
-					} else {
-						uni.navigateTo({
-							url: '/pages/applyEducationCode/applyEducationCode'
-						})
+				this.$u.api.getmemberinfo().then(res => {
+					if (res.code === 200) {
+						this.$u.vuex('vuex_user', res.data);
+						if (res.data.auditStatus === 1 || res.data.auditStatus === 3) {
+							uni.redirectTo({
+								url: '/pages/applyEducationCode/applyEducationCode'
+							})
+						} else {
+							this.jumpIndex()
+						}
 					}
 				})
 			},

+ 24 - 13
h5_web/pages/skillsTraining/registrationNotice/registrationNotice.vue

@@ -21,7 +21,7 @@
 			</view>
 		</z-paging>
 		<u-toast ref="uToast" />
-		<judge-auth ref="judgeAuth" @adoptAuth="adoptAuth"/>
+		<judge-auth ref="judgeAuth" @adoptAuth="adoptAuth" />
 	</view>
 </template>
 
@@ -71,18 +71,29 @@
 			},
 			adoptAuth(item) {
 				this.$u.api.skillTraining.signUpClassApi({
-						packageId: item.id
-					}).then(res => {
-						if (res.code === 200) {
-							this.jumpPage('/pages/skillsTraining/submitSuccess/submitSuccess');
-						} else {
-							this.$refs.uToast.show({
-								title: res.msg,
-								type: 'error'
-							})
-						}
-					})
-			}
+					packageId: item.id
+				}).then(res => {
+					if (res.code === 200) {
+						this.jumpPage('/pages/skillsTraining/submitSuccess/submitSuccess');
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
+					}
+				})
+			},
+			/**
+			 * 跳转到指定页面
+			 * @param { String } url
+			 * @param {Object} parmas
+			 */
+			jumpPage(url, params) {
+				this.$u.route({
+					url,
+					params
+				})
+			},
 		}
 	}
 </script>

+ 3 - 3
h5_web/pages/skillsTraining/skillsTraining.vue

@@ -52,9 +52,9 @@
 								<view class="right">
 									<view class="item">{{ item.name }}</view>
 									<view class="item">{{ item.schoolName }}</view>
-									<view class="item">
+									<!-- <view class="item">
 										<u-parse :html="item.description"></u-parse>
-									</view>
+									</view> -->
 									<view class="btn" @click="signUp(item)">报名</view>
 								</view>
 							</view>
@@ -118,7 +118,7 @@
 		methods: {
 			getBannerList() {
 				this.$u.api.indexApi.indexBannerListApi({
-					type: 4
+					type: 3
 				}).then(res => {
 					if (res?.code === 200) {
 						this.bannerList = res.data;