Pārlūkot izejas kodu

修改登录提示问题;添加修改密码功能

yin_yu820 1 mēnesi atpakaļ
vecāks
revīzija
5b0d201336

+ 1 - 1
jp-console/jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/aop/logging/utils/LogUtils.java

@@ -72,7 +72,7 @@ public class LogUtils {
 
         //2025-2-14,添加登录时token为null,然后从post请求的结果中拿取token
         //这边防止之前使用其他账号登录后留下的缓存token
-        if((functionName!=null&&functionName.equals("通过临时id登录"))||(token==null&&functionName.equals("用户登录"))){
+        if(result!=null&&((functionName!=null&&functionName.equals("通过临时id登录"))||(token==null&&functionName.equals("用户登录")))){
             int startindex = result.indexOf("token=");
             String a=result.substring(startindex+6);
             int endindex = a.indexOf("}");

+ 12 - 1
jp-mobile/pages/index/Dzfindex.vue

@@ -72,7 +72,11 @@
 						<image  class="center-img" src="/static/img/cd6.png"></image>
 						<p>进度统计</p>
 					</view>		
-											
+								
+					<view class="btn-Imbox" @click="totongxunlu7">
+						<image  class="center-img" src="/static/img/setting.png"></image>
+						<p>个人信息</p>
+					</view>							
 				</view>
 				
 						
@@ -318,6 +322,13 @@
 				})
 			},
 			
+			totongxunlu7(){
+											
+				uni.navigateTo({
+					url: '/pages/user/person/person'
+				})
+			},
+			
 			totongxunlu511(){											
 				uni.navigateTo({
 					url: '/pages/policy/policyList'

+ 10 - 4
jp-mobile/pages/index/index.vue

@@ -115,6 +115,11 @@
 						<image  class="center-img" src="/static/img/icon8.png"></image>
 						<p>产品供需</p>
 					</view> -->
+					
+					<view class="btn-Imbox" v-if="isLogin!=null" @click="tosetting">
+						<image  class="center-img" src="/static/img/setting_s.png"></image>
+						<p>个人信息</p>
+					</view>
 				
 					<view class="btn-Imbox" v-if="isLogin!=null" @click="outlogin">
 						<image  class="center-img" src="/static/img/icon7.png"></image>
@@ -125,10 +130,6 @@
 						<image  class="center-img" src="/static/img/icon6.png"></image>
 						<p>立即登录</p>
 					</view>
-					
-					<view class="btn-Imbox" >
-						
-					</view>
 													
 				</view>
 			</view>
@@ -609,6 +610,11 @@
 					}
 				});
 			},
+			tosetting() {
+				uni.navigateTo({
+					url: '/pages/user/person/person'
+				})
+			},
 			tces() {
 				uni.navigateTo({
 					url: '/pages/index/AudioToWord'

+ 16 - 3
jp-mobile/pages/user/person/person.vue

@@ -1,6 +1,12 @@
 <template>
   <view>
+	  <view class="backbb"> 
+		  <view @click="back" style="color: aliceblue;padding-top: 20rpx;padding-left: 20rpx;padding-bottom: 10rpx;">
+			  返回
+		  </view>
+	  </view>
     <view class="person-head">
+	  
 	  <view class="cu-avatar xl round margin-left-sm" @tap="ChooseImage" :style="`background-image:url('${avatar}')`" ></view>
 
       <view class="person-head-box">
@@ -15,7 +21,7 @@
 				<text class="text-grey">公司</text>
 			</view>
 			<view class="action">
-				<text class="text-grey">{{userInfo.companyDTO && userInfo.companyDTO.name || ''}}</text>
+				<text class="text-grey">{{userInfo.remarks || '无'}}</text>
 			</view>
 		</view>
 		<view class="cu-item">
@@ -71,7 +77,7 @@
 				<text class="text-grey">修改密码</text>
 			</view>
 			<view class="action">
-				<text class="text-grey">{{userInfo.officeDTO.name || ''}}</text>
+				<text class="text-grey"></text>
 			</view>
 		</view>
 	</view>
@@ -137,17 +143,24 @@
 	  		  			url: '/pages/login/login'
 	  		  		})
 	  		})
+	  },
+	  back(){
+		  // 返回逻辑,比如跳转至上一页
+		  this.$router.go(-1);
 	  }
     }
   }
 </script>
 
 <style>
+ .backbb{
+	 background: linear-gradient(to right, #365fff, #36bbff);
+ }
   .person-head {
     display: flex;
     flex-direction: row;
     align-items: center;
-    height: 150px;
+    height: 140px;
     padding-left: 20px;
     background: linear-gradient(to right, #365fff, #36bbff);
   }

+ 17 - 5
jp-mobile/pages/user/setting/password/password.vue

@@ -27,6 +27,7 @@
 
 <script>
   import userService from "@/api/sys/userService"	
+  import * as $auth from "@/common/auth"
   var  graceChecker = require("@/common/graceChecker.js");
   export default {
 	onShow() {
@@ -57,25 +58,36 @@
 		    var checkRes = graceChecker.check(formData, rule);
 			
 		    if(checkRes){
+				console.log(this.inputForm.newPassword)
 				uni.showLoading()
-				if (this.newPassword && (this.newPassword.length < 6 || this.newPassword.length > 16)) {
+				if (this.inputForm.newPassword && (this.inputForm.newPassword.length < 6 || this.inputForm.newPassword.length > 16)) {
 				  uni.showToast({
 					icon: 'none',
 					title: '密码长度为6-16位'
 				  });
 				  return;
-				} else if (!(/\d/.test(this.newPassword) && /[a-zA-Z]/.test(this.newPassword))) {
+				} else if (!(/\d/.test(this.inputForm.newPassword) && /[a-zA-Z]/.test(this.inputForm.newPassword))) {
 				  uni.showToast({
 					icon: 'none',
 					title: '密码必须包含字母+数字'
 				  });
 				  return;
 				}
+				let which=$auth.whichLogin();
 				userService.savePwd(this.inputForm).then(({data}) => {
 					uni.showToast({title:data, icon:"success"});
-					uni.navigateTo({
-					  url: '/pages/user/person/person'
-					})
+					
+					if(which=='dzf'){
+						uni.reLaunch({
+							url: '/pages/login/dzflogin'
+						});
+					}else{
+						uni.reLaunch({
+							url: '/pages/login/login'
+						});
+					}
+					
+					
 				}).catch((e)=>{
 					
 				})

BIN
jp-mobile/static/img/setting.png


BIN
jp-mobile/static/img/setting_s.png