From 95b16968596dd601257abdb0fc02d8711382d42f Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 28 十二月 2022 16:05:08 +0800
Subject: [PATCH] #

---
 pages/login/login.vue                 |    2 -
 pages/user/user_detail/userDetail.vue |   96 ++++++++++++++++++++++++++++++++++++++++++++++++
 pages/user/user.vue                   |    4 +
 pages.json                            |    6 +++
 main.js                               |    1 
 5 files changed, 106 insertions(+), 3 deletions(-)

diff --git a/main.js b/main.js
index afc6b08..9770a12 100644
--- a/main.js
+++ b/main.js
@@ -3,6 +3,7 @@
 // #ifndef VUE3
 import Vue from 'vue'
 Vue.config.productionTip = false
+Vue.prototype.baseUrl = 'http://192.168.4.188:9528'
 App.mpType = 'app'
 const app = new Vue({
     ...App
diff --git a/pages.json b/pages.json
index 86f141b..774679c 100644
--- a/pages.json
+++ b/pages.json
@@ -31,6 +31,12 @@
 			}
 		},
 		{
+			"path": "pages/user/user_detail/userDetail",
+			"style": {
+				"navigationBarTitleText": "涓汉淇℃伅"
+			}
+		},
+		{
 			"path": "pages/business/cstmr/csmtr",
 			"style": {
 				// "navigationStyle": "custom"
diff --git a/pages/login/login.vue b/pages/login/login.vue
index d1ff7e9..4b29fea 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -45,7 +45,6 @@
 					loading: false,
 					btnText: '鐧诲綍'
 				},
-				baseUrl: 'http://192.168.4.188:9528'
 			}
 		},
 		onLoad:function(){
@@ -88,7 +87,6 @@
 							that.load.btnText = '鐧诲綍涓�';
 							uni.setStorageSync('token', res.data.token);
 							uni.setStorageSync('userName', that.user.userName);
-							uni.setStorageSync('baseUrl',that.baseUrl)
 							setTimeout(()=> {
 								uni.showToast({title: '鐧诲綍鎴愬姛'})
 								setTimeout(()=> {
diff --git a/pages/user/user.vue b/pages/user/user.vue
index 98e5997..a896db2 100644
--- a/pages/user/user.vue
+++ b/pages/user/user.vue
@@ -28,7 +28,9 @@
 		},
 		methods: {
 			userDetail() {
-				
+				uni.navigateTo({
+					url:'/pages/user/user_detail/userDetail'
+				})
 			}
 		}
 	}
diff --git a/pages/user/user_detail/userDetail.vue b/pages/user/user_detail/userDetail.vue
index 02409e3..888c2f0 100644
--- a/pages/user/user_detail/userDetail.vue
+++ b/pages/user/user_detail/userDetail.vue
@@ -1,8 +1,104 @@
 <template>
+	<view>
+		<view style="background-color: #fff;">
+			<view class="item">
+				<view>瑙掕壊</view><view class="item-right">{{detail.roleName}}</view>
+				<view class="user-icons">
+					<uni-icons type="right" color="#c1c1c1"></uni-icons>
+				</view>
+			</view>
+			<view class="item">
+				<view>鎵�灞為儴闂�</view><view class="item-right">{{detail.deptName}}</view>
+				<view class="user-icons">
+					<uni-icons type="right" color="#c1c1c1"></uni-icons>
+				</view>
+			</view>
+			<view class="item">
+				<view>璐﹀彿</view><view class="item-right">{{detail.username}}</view>
+				<view class="user-icons">
+					<uni-icons type="right" color="#c1c1c1"></uni-icons>
+				</view>
+			</view>
+			<view class="item">
+				<view>鍚嶇О</view><view class="item-right">{{detail.nickname}}</view>
+				<view class="user-icons">
+					<uni-icons type="right" color="#c1c1c1"></uni-icons>
+				</view>
+			</view>
+			<view class="item">
+				<view>鑱旂郴鏂瑰紡</view><view class="item-right">{{detail.mobile}}</view>
+				<view class="user-icons">
+					<uni-icons type="right" color="#c1c1c1"></uni-icons>
+				</view>
+			</view>
+			<view class="item">
+				<view>閭鍦板潃</view><view class="item-right">{{detail.email}}</view>
+				<view class="user-icons">
+					<uni-icons type="right" color="#c1c1c1"></uni-icons>
+				</view>
+			</view>
+			<view class="item">
+				<view>瀵嗙爜</view><view class="item-right">{{detail.roleName}}</view>
+				<view class="user-icons">
+					<uni-icons type="right" color="#c1c1c1"></uni-icons>
+				</view>
+			</view>
+			<view class="item">
+				<view>娉ㄥ唽鏃堕棿</view><view class="item-right">{{detail.createTime$}}</view>
+				<view class="user-icons">
+					<uni-icons type="right" color="#c1c1c1"></uni-icons>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
+	export default {
+		data() {
+			return {
+				detail: ''
+			}
+		},
+		onShow() {
+			this.getDetail()
+		},
+		methods: {
+			getDetail() {
+				let that = this
+				uni.request({
+					url: that.baseUrl + '/user/detail/auth',
+					header: {'token' : uni.getStorageSync('token')},
+					method: 'POST',
+					success(res) {
+						res = res.data
+						that.detail = res.data
+						console.log(res.data);
+					}
+				})
+			}
+		}
+	}
 </script>
 
 <style>
+	.item {
+		background-color: #FFF;
+		min-height: 90rpx;
+		border-bottom: 1px solid #f1f1f1;
+		margin-left: 30rpx;
+		display: grid;
+		grid-template-columns: 5fr 5fr 1fr;
+		align-items: center;
+	}
+	.item:last-child {
+		border: none;
+	}
+	.item-right {
+		text-align: end;
+		color: #afafaf;
+	}
+	.user-icons {
+		text-align: center;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1