tanxue 2 月之前
父节点
当前提交
85427565f9
共有 6 个文件被更改,包括 132 次插入1 次删除
  1. 25 0
      api/my.js
  2. 23 1
      common/styles/global/pages.scss
  3. 7 0
      pages.json
  4. 8 0
      pages/admin/my/index.vue
  5. 69 0
      pages/client/my/index.vue
  6. 二进制
      static/images/my/client-my-bj.png

+ 25 - 0
api/my.js

@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+export function getMineUser(data = {}) {
+  return request({
+    url: '/app/mine/user',
+    headers: {
+      isToken: false
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getMineInfo(data = {}) {
+  return request({
+    url: '/app/mine/info',
+    headers: {
+      isToken: false
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}

+ 23 - 1
common/styles/global/pages.scss

@@ -323,4 +323,26 @@
 	
 	
 	
 	
 	.uni-icons{display: flex;align-items:center;}
 	.uni-icons{display: flex;align-items:center;}
-}	
+}	
+
+
+/*** 我的页面***/
+.client-my-page{
+	background-color:#f8f9fd;
+	.my-head-box{
+		width: 100%;height:372rpx;display: flex;align-items: center;box-sizing: border-box;padding: 52rpx 52rpx 0 52rpx;
+		background-image: url("@/static/images/my/client-my-bj.png");@include ezy-no-repeat-cover();
+	}
+	.head-img-box{
+		max-height: 200rpx;max-width: 160rpx;
+		border: 1rpx solid #fff;margin-right: 32rpx;
+	}
+	.head-content-box{
+		font-size: 46rpx;color: #fff;
+		.idcard-row-box{display: flex;align-items: center;margin-top: 24rpx;}
+		.idcard-icon{width: 56rpx;height:56rpx;
+		background-image: url("@/static/images/my/my-card-icon.png");@include ezy-no-repeat-cover();
+	}
+		.idcard-text{font-size: 36rpx;margin-left: 10rpx;}
+	}
+}

+ 7 - 0
pages.json

@@ -129,6 +129,13 @@
 			}
 			}
 		},
 		},
 		{
 		{
+			"path" : "pages/client/my/index",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
+		},
+		{
 			"path" : "pages/admin/Chengji/list",
 			"path" : "pages/admin/Chengji/list",
 			"style" : 
 			"style" : 
 			{
 			{

+ 8 - 0
pages/admin/my/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 69 - 0
pages/client/my/index.vue

@@ -0,0 +1,69 @@
+<template>
+	<view class="client-my-page">
+		<view class="my-head-box">
+			<img class="head-img-box" :src="myInfoData.userImg">
+			<view class="head-content-box">
+				<text>{{myInfoData.userName}}</text>
+				<view class="idcard-row-box">
+					<icon class="idcard-icon"></icon>
+					<text class="idcard-text" >{{myInfoData.idcard}}</text>
+				</view>
+			</view>
+		</view>
+		
+		<view class="my-num-box">
+			<view class="num-item-box">
+				<uni-badge class="uni-badge-left-margin" text="1" />
+				<icon></icon>
+				<text></text>
+			</view>
+			<view class="num-item-box">
+				<icon></icon>
+				<text></text>
+			</view>
+			<view class="num-item-box">
+				<icon></icon>
+				<text></text>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script setup>
+	import {onLoad} from '@dcloudio/uni-app';
+	import {getMineUser,getMineInfo} from '@/api/my.js'
+	import {reactive,ref} from "vue";
+	let myInfoData = reactive({
+		userImg: '',
+		userName: '',
+		idcard: '',
+		kaoshiCount: '',
+		kechengCount: '',
+		lianxiCount: '',
+	});
+	function getMyInit() {
+		getUserInfo();
+		getNumInfo();
+	}
+	function getUserInfo(){
+		getMineUser({}).then(res => {
+			myInfoData.userImg= res.data.icon;
+			myInfoData.userName = res.data.userName;
+			myInfoData.idcard = res.data.idcard;
+		})
+	}
+	function getNumInfo(){
+		getMineInfo({}).then(res => {
+			myInfoData.kaoshiCount = res.data.kaoshiCount;
+			myInfoData.kechengCount = res.data.kechengCount;
+			myInfoData.lianxiCount = res.data.lianxiCount;
+		})
+	}
+	onLoad(() => {
+		getMyInit()
+	})
+</script>
+
+<style>
+</style>

二进制
static/images/my/client-my-bj.png