Kaynağa Gözat

2022-09-23

1. 调整考试培训系统app端 外围用户注册时, 修改完善资料的控制逻辑
moccus 2 yıl önce
ebeveyn
işleme
e63948a8ce

+ 5 - 0
exam-06173-uni - reg/pages/index/index.vue

@@ -101,6 +101,11 @@
 		},
 
 		onShow() {
+			if(!uni.getStorageSync('idCard')){
+				uni.redirectTo({
+					url:'/pages/login/login'
+				})
+			}
 			if(uni.getStorageSync('token')){
 				this.fetchNoticePaging();
 			}else{

+ 1 - 0
exam-06173-uni - reg/pages/login/login.vue

@@ -271,6 +271,7 @@
 						url: '/pages/user/info/info'
 					});
 				}else{
+					uni.setStorageSync('idCard', data.idCard);
 					//打印请求返回的数据
 					uni.switchTab({
 						url: '/pages/index/index'

+ 2 - 0
exam-06173-uni - reg/pages/login/reg.vue

@@ -86,6 +86,7 @@
 				
 				},
 				postForm: {
+					userName: '',
 					realName: '',
 					deptCode: '',
 					password: ''
@@ -135,6 +136,7 @@
 								url: '/pages/user/info/info'
 							});
 						}else{
+							uni.setStorageSync('idCard', data.idCard);
 							//打印请求返回的数据
 							uni.switchTab({
 								url: '/pages/index/index'

+ 2 - 2
exam-06173-uni - reg/pages/user/index.vue

@@ -31,8 +31,8 @@
 		<!-- 左侧显示略缩图、图标 -->
 		<uni-list>
 
-<!-- 			<uni-list-item thumb-size="sm" title="修改资料" link="navigateTo" to="/pages/user/info/info">
-			</uni-list-item> -->
+			<uni-list-item thumb-size="sm" title="修改资料" link="navigateTo" to="/pages/user/info/info">
+			</uni-list-item>
 
 			<uni-list-item thumb-size="sm" title="学习记录" link="navigateTo" to="/pages/course/my">
 			</uni-list-item>

+ 1 - 1
exam-06173-uni - reg/pages/user/info/info.vue

@@ -123,7 +123,7 @@
 						uni.showToast({
 							title: '资料更新成功!'
 						})
-						
+						uni.setStorageSync('idCard', this.postForm.idCard);
 						
 						uni.hideLoading()