wangxy 2 mesi fa
parent
commit
fea5793667
1 ha cambiato i file con 12 aggiunte e 8 eliminazioni
  1. 12 8
      pages/client/my/index.vue

+ 12 - 8
pages/client/my/index.vue

@@ -55,7 +55,7 @@
 
 <script setup>
 	import {toast} from "@/utils/common";
-	import {onLoad} from '@dcloudio/uni-app';
+	import {onLoad,onShow} from '@dcloudio/uni-app';
 	import cacheManager from '@/utils/cacheManager.js';
 	import {getMineUser,getMineInfo,getMineLogout} from '@/api/my.js'
 	import {reactive,ref} from "vue";
@@ -68,6 +68,7 @@
 		kaoshiCount: '',
 		kechengCount: '',
 		lianxiCount: '',
+    from:''
 	});
 	const commonDialogRef = ref(null);
 	const exitContent = '你确定要执行这个操作吗?';
@@ -80,27 +81,27 @@
 	function goToPage(data){
 		switch (data) {
 		    case 'ks':
-		        uni.redirectTo({
+		        uni.navigateTo({
 		        	url:'/pages/client/Kaoshi/list?from=my'
 		        })
 		        break;
 		    case 'lx':
-		        uni.redirectTo({
+		        uni.navigateTo({
 		        	url:'/pages/client/Lianxi/list?from=my'
 		        })
 		        break;
 		    case 'kc':
-		        uni.redirectTo({
+		        uni.navigateTo({
 		        	url:'/pages/client/Kecheng/list?from=my'
 		        })
 		        break;
 			case 'cj':
-			    uni.redirectTo({
+			    uni.navigateTo({
 			    	url:'/pages/client/Chengji/list?from=my'
 			    })
 			    break;
 			case 'grcj':
-			    uni.redirectTo({
+			    uni.navigateTo({
 			    	url:'/pages/client/my/myInfo?from=my'
 			    })
 			    break;
@@ -126,7 +127,6 @@
 	}
 	function exitBtn(){
 		getMineLogout().then(res => {
-			console.log(res,'res');
 			toast('退出登录成功')
 			cacheManager.clearAll();
 			uni.reLaunch({
@@ -137,8 +137,12 @@
 		})
 	}
 	onLoad(() => {
-		getMyInit()
+    getMyInit()
 	})
+
+  onShow(() => {
+
+  })
 </script>
 
 <style>