瀏覽代碼

我的页面暂存

xiaohaizhao 1 月之前
父節點
當前提交
4dfa878bb7
共有 3 個文件被更改,包括 59 次插入0 次删除
  1. 3 0
      pages/index/index.vue
  2. 56 0
      pages/index/my.vue
  3. 二進制
      static/image/user.png

+ 3 - 0
pages/index/index.vue

@@ -1,5 +1,6 @@
 <template>
 	<home v-show="showPage != 'my'" />
+	<my v-show="showPage != 'home'" />
 	<up-tabbar :fixed="true" :value="showPage" @change="change1">
 		<up-tabbar-item text="首页" name="home">
 			<template #active-icon>
@@ -22,6 +23,8 @@
 
 <script setup>
 import home from './home.vue';
+import my from './my.vue';
+
 import { ref, getCurrentInstance } from 'vue'
 const { $Http } = getCurrentInstance().proxy;
 

+ 56 - 0
pages/index/my.vue

@@ -0,0 +1,56 @@
+<template>
+    <view class="user" hover-class="navigator-hover">
+        <view class="profile-photo">
+            <up-image :show-loading="true" src="/static/image/user.png" width="120rpx" height="120rpx" />
+        </view>
+        <view class="user-info">
+            <view class="user-name">用户名</view>
+            <view class="user-phone">用户ID</view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style lang="less" scoped>
+.user {
+    display: flex;
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+    box-sizing: border-box;
+    padding: 40rpx;
+
+    .profile-photo {
+        width: 120rpx;
+        height: 120rpx;
+        border-radius: 50%;
+    }
+
+    .user-info {
+        flex: 1;
+        margin-left: 40rpx;
+        padding-top: 10rpx;
+
+        .user-name {
+            line-height: 42rpx;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-size: 32rpx;
+            color: #333333;
+        }
+
+        .user-phone {
+            line-height: 38rpx;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-size: 28rpx;
+            color: #999999;
+            margin-top: 20rpx;
+        }
+
+    }
+}
+</style>

二進制
static/image/user.png