空白格 2 سال پیش
والد
کامیت
1f1d599f5e

+ 44 - 12
h5_web/components/judge-auth/judge-auth.vue

@@ -11,23 +11,53 @@
 <script>
 export default {
   name: 'judgeAuth',
-  props: {
-    content: {
-      type: String,
-      default: '你还没有认证,该功能需要认证后才能使用?'
-    }
-  },
   data() {
     return {
-      show: false
+      show: false,
+			content: '你还没有认证,该功能需要认证后才能使用!',
+			auditStatus: null
     };
   },
   methods: {
     /**
      * @param {Object} bool
      */
-    modalShow(bool) {
-      this.show = bool;
+    modalShow(url) {
+			console.log(url);
+			this.$u.api.getmemberinfo().then(res => {
+				console.log('用户基本信息:', res.data)
+				if (res.code === 200){
+					this.$u.vuex('vuex_memberInfo', res.data);
+					this.auditStatus = Number(res.data.auditStatus)
+					switch (Number(res.data.auditStatus)){
+						case 0:
+							this.content = '您的认证正在审核中,该功能需要认证后才能使用!'
+							this.show = true
+							break;
+						case 1:
+							this.content = '您的认证未通过,无法使用该功能!'
+							this.show = true
+							break;
+						case 2:
+							this.$emit('adoptAuth', url)
+							break;
+						case 3:
+							this.content = '您的认证已被撤销,该功能需要认证后才能使用!'
+							this.show = true
+							break;
+					}
+				} else {
+					this.$refs.uToast.show({
+						title: res.msg,
+						type: 'error'
+					})
+				}
+			}).catch(err => {
+				this.$refs.uToast.show({
+					title: err.msg,
+					type: 'error'
+				})
+			})
     },
     /**
      * 取消
@@ -38,9 +68,11 @@ export default {
      */
     confirm() {
       this.show = false;
-      uni.navigateTo({
-        url: '/pages/applyEducationCode/applyEducationCode'
-      });
+			if (this.auditStatus === 1 || this.auditStatus === 3 ) {
+				uni.navigateTo({
+				  url: '/pages/applyEducationCode/applyEducationCode'
+				});
+			}
     }
   }
 };

+ 5 - 6
h5_web/pages/basicTraining/basicTraining.vue

@@ -67,7 +67,7 @@
 		<view class="study-status" v-if="tabIndex === 0">学习状态:{{ online.status === 0 ? '未完成' : '已完成' }}</view>
 		<view class="study-status" v-if="tabIndex === 1">学习状态:{{ offlineStatus === 0 ? '未完成' : '已完成'}}</view>
 		<u-toast ref="uToast" />
-		<judge-auth ref="judgeAuth" />
+		<judge-auth ref="judgeAuth" @adoptAuth="adoptAuth"/>
 	</view>
 </template>
 
@@ -156,6 +156,9 @@
 					params: params
 				})
 			},
+			adoptAuth() {
+				this.jumpPage('/pages/basicTraining/onlineTrainingDetails/onlineTrainingDetails', { id: item.id })
+			},
 			/**
 			 * 适应性培训关注度统计
 			 * @param {Object} item
@@ -175,11 +178,7 @@
 					if (type === 1) {
 						this.jumpPage('pages/basicTraining/offlineTrainingDetails/offlineTrainingDetails', { id: item.id })
 					} else {
-						if (Number(this.vuex_memberInfo.auditStatus) === 2) {
-							this.jumpPage('/pages/basicTraining/onlineTrainingDetails/onlineTrainingDetails', { id: item.id })
-						} else {
-							this.$refs['judgeAuth'].modalShow(true)
-						}
+						this.$refs['judgeAuth'].modalShow()
 					}
 				})
 			}

+ 5 - 6
h5_web/pages/entrepreneurshipGuidelines/entrepreneurshipGuidelines.vue

@@ -37,7 +37,7 @@
       >提交创业计划</view>
     </view>
     <u-toast ref="uToast" />
-    <judge-auth ref="judgeAuth" />
+    <judge-auth ref="judgeAuth" @adoptAuth="adoptAuth"/>
   </view>
 </template>
 
@@ -92,11 +92,10 @@ export default {
       });
     },
     jumpPageAuth(url) {
-      if (Number(this.vuex_memberInfo.auditStatus) === 2) {
-        this.jumpPage(url);
-      } else {
-        this.$refs['judgeAuth'].modalShow(true);
-      }
+      this.$refs['judgeAuth'].modalShow(url);
+    },
+    adoptAuth(url) {
+      this.jumpPage(url);
     },
     imageTap(e) {
       e.ignore();

+ 27 - 26
h5_web/pages/jobDetails/jobDetails.vue

@@ -99,7 +99,8 @@
 			</u-card>
 		</view>
 
-		<view class="jobdetailsbtn" v-if="!isSubmit && recruitmentData.postStatus == 1">
+		<!-- <view class="jobdetailsbtn" v-if="!isSubmit && recruitmentData.postStatus == 1"> -->
+		<view class="jobdetailsbtn" v-if="!isSubmit">
 			<view class="jobdetailsbtn-container">
 				<view class="jobdetailsbtn-content">
 					<view>
@@ -109,7 +110,7 @@
 			</view>
 		</view>
 		<u-toast ref="uToast" />
-		<judge-auth ref="judgeAuth" />
+		<judge-auth ref="judgeAuth" @adoptAuth="adoptAuth" />
 	</view>
 </template>
 
@@ -227,6 +228,7 @@
 					id
 				}).then(res => {
 					if (res.code === 200) {
+						console.log(res.data);
 						this.recruitmentData = res.data;
 						this.getCompanyDetails(res.data.companyId);
 					} else {
@@ -306,35 +308,34 @@
 
 			},
 			/**
-			 * 提交简历按钮事件
+			 * 通过认证后
 			 */
-			handleResumeClick() {
-				if (Number(this.vuex_memberInfo.auditStatus) === 2) {
-					this.$u.api.company.deliveryResume({
-						postId: this.recruitmentData.id
-					}).then(res => {
-						if (res.code === 200) {
-							this.$u.route({
-								url: 'pages/resumeDeliveryResults/resumeDeliveryResults',
-								params: {
-									// item: JSON.stringify(param)
-								}
-							});
-						} else {
-							this.$refs.uToast.show({
-								title: res.msg,
-								type: 'error'
-							})
-						}
-					}).catch(() => {
+			adoptAuth() {
+				this.$u.api.company.deliveryResume({
+					postId: this.recruitmentData.id
+				}).then(res => {
+					if (res.code === 200) {
+						this.$u.route({
+							url: 'pages/resumeDeliveryResults/resumeDeliveryResults'
+						});
+					} else {
 						this.$refs.uToast.show({
-							title: '系统异常!',
+							title: res.msg,
 							type: 'error'
 						})
+					}
+				}).catch(() => {
+					this.$refs.uToast.show({
+						title: '系统异常!',
+						type: 'error'
 					})
-				} else {
-					this.$refs['judgeAuth'].modalShow(true)
-				}
+				})
+			},
+			/**
+			 * 提交简历按钮事件
+			 */
+			handleResumeClick() {
+				this.$refs['judgeAuth'].modalShow()
 			}
 		}
 	}

+ 0 - 17
h5_web/pages/phoneLogin/phoneLogin.vue

@@ -132,23 +132,6 @@
 						if (res.code == '200') {
 							console.log('登录信息:', res);
 							this.$u.vuex('vuex_user', res.data);
-							this.$u.api.getmemberinfo().then(res1 => {
-								console.log('用户基本信息:', res1.data)
-								if (res.code === 200){
-									this.$u.vuex('vuex_memberInfo', res1.data);
-									this.veteEducCheck();
-								} else {
-									this.$refs.uToast.show({
-										title: res.msg,
-										type: 'error'
-									})
-								}
-							}).catch(err => {
-								this.$refs.uToast.show({
-									title: err.msg,
-									type: 'error'
-								})
-							})
 							this.$u.vuex('vuex_hasLogin', true);
 							// this.wechatLogin()
 						} else {

+ 5 - 6
h5_web/pages/skillsTraining/registrationNotice/registrationNotice.vue

@@ -21,7 +21,7 @@
 			</view>
 		</z-paging>
 		<u-toast ref="uToast" />
-		<judge-auth ref="judgeAuth" />
+		<judge-auth ref="judgeAuth" @adoptAuth="adoptAuth"/>
 	</view>
 </template>
 
@@ -67,8 +67,10 @@
 			 * @param {Object} item
 			 */
 			signUp(item) {
-				if (Number(this.vuex_memberInfo.auditStatus) === 2) {
-					this.$u.api.skillTraining.signUpClassApi({
+				this.$refs['judgeAuth'].modalShow(item)
+			},
+			adoptAuth(item) {
+				this.$u.api.skillTraining.signUpClassApi({
 						packageId: item.id
 					}).then(res => {
 						if (res.code === 200) {
@@ -80,9 +82,6 @@
 							})
 						}
 					})
-				} else {
-					this.$refs['judgeAuth'].modalShow(true)
-				}
 			}
 		}
 	}

+ 11 - 12
h5_web/pages/skillsTraining/skillsPackage/skillsPackage.vue

@@ -90,7 +90,7 @@
 		</view>
 		<view class="package-btn" v-if="isApply == 0" @click="signUp">报名</view>
 		<u-toast ref="uToast" />
-		<judge-auth ref="judgeAuth"/>
+		<judge-auth ref="judgeAuth"  @adoptAuth="adoptAuth"/>
 	</view>
 </template>
 
@@ -153,7 +153,16 @@
 				})
 			},
 			jumpPageDetails(id) {
-				if (Number(this.vuex_memberInfo.auditStatus) === 2) {
+				this.$refs['judgeAuth'].modalShow(id)
+			},
+			/**
+			 * 报名
+			 */
+			signUp() {
+				this.$refs['judgeAuth'].modalShow(false)
+			},
+			adoptAuth(item) {
+				if (item) {
 					this.$u.route({
 						url: 'pages/skillsTraining/courseDetailed/courseDetailed',
 						params: {
@@ -161,14 +170,6 @@
 						}
 					})
 				} else {
-					this.$refs['judgeAuth'].modalShow(true)
-				}
-			},
-			/**
-			 * 报名
-			 */
-			signUp() {
-				if (Number(this.vuex_memberInfo.auditStatus) === 2) {
 					this.$u.api.skillTraining.signUpClassApi({
 						packageId: this.packageId
 					}).then(res => {
@@ -181,8 +182,6 @@
 							})
 						}
 					})
-				} else {
-					this.$refs['judgeAuth'].modalShow(true)
 				}
 			},
 			/**

+ 5 - 6
h5_web/pages/skillsTraining/skillsTraining.vue

@@ -89,7 +89,7 @@
 		<!-- 问题咨询 -->
 		<view class="training-bottom" @click="questionAsk">问题咨询</view>
 		<u-toast ref="uToast" />
-		<judge-auth ref="judgeAuth"/>
+		<judge-auth ref="judgeAuth" @adoptAuth="adoptAuth" />
 	</view>
 </template>
 
@@ -205,8 +205,10 @@
 			 * @param {Object} item
 			 */
 			signUp(item) {
-				if (Number(this.vuex_memberInfo.auditStatus) === 2) {
-					this.$u.api.skillTraining.signUpClassApi({
+				this.$refs['judgeAuth'].modalShow(item)
+			},
+			adoptAuth(item) {
+				this.$u.api.skillTraining.signUpClassApi({
 						packageId: item.id
 					}).then(res => {
 						if (res.code === 200) {
@@ -218,9 +220,6 @@
 							})
 						}
 					})
-				} else {
-					this.$refs['judgeAuth'].modalShow(true)
-				}
 			},
 			/**
 			 * 问题咨询