lx 5 gadi atpakaļ
vecāks
revīzija
af4eda88f5
7 mainītis faili ar 11 papildinājumiem un 6 dzēšanām
  1. 1 1
      app.json
  2. 1 1
      app.wxss
  3. BIN
      images/index.jpg
  4. BIN
      images/timg.jpg
  5. 1 0
      pages/index/index.js
  6. 1 0
      pages/index/index.wxml
  7. 7 4
      pages/index/index.wxss

+ 1 - 1
app.json

@@ -8,7 +8,7 @@
   ],
   "window": {
     "backgroundTextStyle": "light",
-    "navigationBarBackgroundColor": "#000",
+    "navigationBarBackgroundColor": "#fff",
     "navigationBarTitleText": "首页",
     "navigationBarTextStyle": "black"
   },

+ 1 - 1
app.wxss

@@ -5,7 +5,7 @@
   flex-direction: column;
   align-items: center;
   justify-content: space-between;
-  padding: 200rpx 0;
+  /* padding: 200rpx 0; */
   box-sizing: border-box;
   /* background-color: #000000; */
 } 

BIN
images/index.jpg


BIN
images/timg.jpg


+ 1 - 0
pages/index/index.js

@@ -4,6 +4,7 @@ const app = getApp()
 
 Page({
   data: {
+    url:'../../images/timg.jpg',
     motto: '',
     userInfo: {},
     hasUserInfo: false,

+ 1 - 0
pages/index/index.wxml

@@ -6,6 +6,7 @@
       <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
       <text class="userinfo-nickname">{{userInfo.nickName}}</text>
     </block> -->
+    <image class="imageSize" src="{{url}}" mode="widthFix"></image>
   </view>
   <view class="usermotto">
     <text class="user-motto">{{motto}}</text>

+ 7 - 4
pages/index/index.wxss

@@ -1,10 +1,13 @@
 /**index.wxss**/
 .userinfo {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
+  width:100%;
+  /* display: flex; */
+  /* flex-direction: column; */
+  /* align-items: center; */
+}
+.imageSize{
+  width: 100%;
 }
-
 .userinfo-avatar {
   width: 128rpx;
   height: 128rpx;