2 Achegas fe77f4cba6 ... 1ef73c35ea

Autor SHA1 Mensaxe Data
  0225263 1ef73c35ea Merge branch 'master' of http://git.fmode.cn:3000/0225273/APPmy hai 4 meses
  0225263 e2e03ea8c9 tab4 hai 4 meses

+ 4 - 4
src/app/creator/creator.page.html

@@ -17,18 +17,18 @@
 
 
 <ion-content>
-  <div class="creator-info">
+  <div class="creator-info" style="background-image: url('../assets/img/paint.png');">
     <div class="profile">
       <ion-avatar>
-        <img src="avatar.jpg"> <!-- 头像图片 -->
+        <img src="https://ionicframework.com/docs/img/demos/avatar.svg"> <!-- 头像图片 -->
       </ion-avatar>
-      <ion-label class="nickname">0105</ion-label> <!-- 昵称 -->
+      <ion-label class="nickname">{{user?.get("username")}}</ion-label> <!-- 昵称 -->
     </div>
     <div class="stats">
       <ion-label class="label-icon"><ion-icon name="thumbs-up-outline"></ion-icon> 点赞数:300</ion-label>
       <ion-label class="label-icon"><ion-icon name="eye-outline"></ion-icon> 浏览量:6000</ion-label>
       <ion-label class="label-icon"><ion-icon name="star-outline"></ion-icon> 最佳作品点赞数:150</ion-label>
-      <ion-label class="label-icon"><ion-icon name="cash-outline"></ion-icon> 收入:2000元</ion-label>
+      <ion-label class="label-icon"><ion-icon name="cash-outline"></ion-icon> 上月收入:2000元</ion-label>
     </div>
 </div>
 

+ 1 - 0
src/app/creator/creator.page.scss

@@ -4,6 +4,7 @@
   background-position: center;
   padding: 20px;
   border-radius: 10px;
+  
 }
 
 .profile {

+ 13 - 2
src/app/creator/creator.page.ts

@@ -1,4 +1,5 @@
 import { Component, OnInit } from '@angular/core';
+import Parse from "parse";
 
 @Component({
   selector: 'app-creator',
@@ -9,10 +10,20 @@ export class CreatorPage implements OnInit {
 
   goToCommunity(){
     
+  }
+  // 由于Parse.User.current()是随着localStorage变化的属性
+  // 为了避免首次复制后用户状态变化,页面不同步,通过get方法实现实时获取
+  user:Parse.User|undefined
+  async ngOnInit() {
+    // this.showContent(this.selectedContent);
+    this.user = await Parse.User.current()
+      setInterval(async ()=>{
+      this.user = await Parse.User.current()
+    },1000)
   }
   constructor() { }
 
-  ngOnInit() {
-  }
+  // ngOnInit() {
+  // }
 
 }

BIN=BIN
src/assets/img/paint.png