hid_msrpuwgj56ccf29 1 rok pred
rodič
commit
72cdf8b78f

+ 4 - 4
app-angular/src/modules/lesson/lesson-routing.module.ts

@@ -1,9 +1,9 @@
 import { NgModule } from '@angular/core';
 import { RouterModule, Routes } from '@angular/router';
 import { MeComponent } from './me/me.component';
-import { TheyComponent } from './they/they.component';
 
-import { TheyDetailComponent } from './they-detail/they-detail.component';
+
+
 import { CommunityComponent } from './community/community.component';
 import { ScienceDetailComponent } from './science-detail/science-detail.component';
 import { ShareComponent } from './share/share.component';
@@ -21,13 +21,13 @@ import { PageTestComponent } from './page-test/page-test.component';
 
 const routes: Routes = [
   { path: 'me', component: MeComponent },
-  { path: 'they', component: TheyComponent },
+
   { path: 'community', component: CommunityComponent },
   { path: 'lesson', component: PageLessonComponent },
   { path: 'lesson/detail', component: PageLessonDetailComponent },
   { path: 'page-chat', component: PageChatComponent },
   { path: 'page-test', component: PageTestComponent }, 
-  { path: 'they/detail', component: TheyDetailComponent },
+
   { path: 'community/scienceDetail', component: ScienceDetailComponent },
   { path: 'community/share', component: ShareComponent },
   { path: 'community/attentionDetail', component: AttentionDetailComponent },

+ 3 - 4
app-angular/src/modules/lesson/lesson.module.ts

@@ -4,10 +4,9 @@ import { FormsModule } from '@angular/forms';
 import { IonicModule } from '@ionic/angular';
 
 import { LessonRoutingModule } from './lesson-routing.module';
-import { TheyComponent } from './they/they.component';
 import { MeComponent } from './me/me.component';
 
-import { TheyDetailComponent } from './they-detail/they-detail.component';
+
 import { CommunityComponent } from './community/community.component';
 import { ScienceDetailComponent } from './science-detail/science-detail.component';
 import { ShareComponent } from './share/share.component';
@@ -23,10 +22,10 @@ import { PageTestComponent } from './page-test/page-test.component';
 
 @NgModule({
   declarations: [
   TheyComponent,
     MeComponent,
    
-    TheyDetailComponent,
+
     CommunityComponent,
     ScienceDetailComponent,
     ShareComponent,

+ 0 - 75
app-angular/src/modules/lesson/they-detail/they-detail.component.html

@@ -1,75 +0,0 @@
-<ion-header>
-    <ion-toolbar>
-        <ion-buttons slot="start">
-            <ion-button routerLink="/lesson/they" fill="clear" color="dark">
-                <ion-icon name="chevron-back-outline" size="small"></ion-icon>
-                返回
-            </ion-button>
-        </ion-buttons>
-        <ion-buttons slot="end">
-            <ion-button>
-                <ion-icon name="arrow-redo-outline"></ion-icon>
-                分享
-            </ion-button>
-        </ion-buttons>
-    </ion-toolbar>
-</ion-header>
-
-<ion-content color="light">
-    <!-- 用户信息 -->
-    <ion-card>
-        <ion-card-header>
-            <ion-item lines="full">
-                <ion-avatar slot="start">
-                    <img alt="头像" [src]="they?.get('avatar')" />
-                </ion-avatar>
-                <ion-label>{{they?.get("name")}}</ion-label>
-                <ion-button slot="end">
-                    <ion-icon name="heart-outline" size="small"></ion-icon>
-                    <ion-label>关注</ion-label>
-                </ion-button>
-            </ion-item>
-            <ion-card-title>
-                <ion-list *ngIf="they?.get('tag')?.length">
-                    <ion-note lines="none" *ngFor="let t of they?.get('tag')" class="tags">{{t}}</ion-note>
-                </ion-list>
-            </ion-card-title>
-            <ion-card-subtitle>注册时间:{{they?.get("createdAt") |date: 'YYYY/MM/dd'||"注册时间"}}</ion-card-subtitle>
-            <ion-card-subtitle>{{they?.get("gender"||"性别")}}|{{they?.get("age")||"年龄"}}|星座|地址|身份|邮箱|...</ion-card-subtitle>
-        </ion-card-header>
-        <ion-card-content>
-            简单的自我介绍...
-        </ion-card-content>
-    </ion-card>
-
-    <!-- 列表 -->
-    <ion-card class="theyLists">
-        <ion-button fill="clear">
-            <ion-icon name="restaurant-outline" color="medium"></ion-icon>
-            <ion-note>关注</ion-note>
-        </ion-button>
-        <ion-button fill="clear">
-            <ion-icon name="medal-outline" color="medium"></ion-icon>
-            <ion-note>会员</ion-note>
-        </ion-button>
-        <ion-button fill="clear">
-            <ion-icon name="extension-puzzle-outline" color="medium"></ion-icon>
-            <ion-note>收藏</ion-note>
-        </ion-button>
-    </ion-card>
-    
-    <ion-card>
-        <ion-segment value="推荐">
-            <ion-segment-button value="推荐">
-                <ion-label>我的宠物档案</ion-label>
-            </ion-segment-button>
-        </ion-segment>
-    </ion-card>
-
-    <ion-item button detail="false" lines="none" class="tip">
-        <ion-label color="medium">
-            还未有档案记录呢
-        </ion-label>
-    </ion-item>
-
-</ion-content>

+ 0 - 25
app-angular/src/modules/lesson/they-detail/they-detail.component.scss

@@ -1,25 +0,0 @@
-ion-content {
-    height: calc(100vh - 121px) !important;
-}
-
-.tags {
-    margin-right: 5px;
-}
-
-.theyLists {
-    padding: 0%;
-    text-align: center;
-    justify-content: center;
-
-    ion-button {
-        ion-icon {
-            margin-right: 9px;
-        }
-    }
-}
-
-.tip {
-    ion-label {
-        text-align: center;
-    }
-}

+ 0 - 21
app-angular/src/modules/lesson/they-detail/they-detail.component.spec.ts

@@ -1,21 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TheyDetailComponent } from './they-detail.component';
-
-describe('TheyDetailComponent', () => {
-  let component: TheyDetailComponent;
-  let fixture: ComponentFixture<TheyDetailComponent>;
-
-  beforeEach(() => {
-    TestBed.configureTestingModule({
-      declarations: [TheyDetailComponent]
-    });
-    fixture = TestBed.createComponent(TheyDetailComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 29
app-angular/src/modules/lesson/they-detail/they-detail.component.ts

@@ -1,29 +0,0 @@
-import { Component } from '@angular/core';
-// 引入服务
-import { ActivatedRoute } from '@angular/router';
-
-// 引入Parse第三方库
-import * as Parse from "parse"
-(Parse as any).serverURL = "http://metapunk.cn:9999/parse"
-Parse.initialize("dev")
-
-@Component({
-  selector: 'app-they-detail',
-  templateUrl: './they-detail.component.html',
-  styleUrls: ['./they-detail.component.scss']
-})
-export class TheyDetailComponent {
-  //预设值变量
-  they: Parse.Object | undefined;
-  // 依赖注入
-  constructor(private route: ActivatedRoute) {
-    // 查询参数获取并赋值给this.htey
-    this.route.queryParams.subscribe(params => {
-      this.getTheyById(params["id"])
-    })
-  }
-  async getTheyById(id: string) {
-    let query = new Parse.Query("SqzPerson")
-    this.they = await query.get(id)
-  }
-}

+ 0 - 57
app-angular/src/modules/lesson/they/they.component.html

@@ -1,57 +0,0 @@
-<ion-header>
-    <ion-toolbar>
-        <ion-title>
-            消息
-        </ion-title>
-        <ion-buttons slot="end">
-            <!-- 添加按钮 -->
-            <ion-button id="person-add">
-                <ion-icon name="add-outline"></ion-icon>
-            </ion-button>
-            <ion-popover trigger="person-add" triggerAction="click">
-                <ng-template>
-                    <ion-list>
-                        <ion-item button detail="false">
-                            <ion-icon name="person-add-outline" size="small"></ion-icon>
-                            <ion-text>添加</ion-text>
-                        </ion-item>
-                        <ion-item button detail="false">
-                            <ion-icon name="scan-outline" size="small"></ion-icon>
-                            <ion-text>扫一扫</ion-text>
-                        </ion-item>
-                    </ion-list>
-                </ng-template>
-            </ion-popover>
-            <!-- 搜索按钮 -->
-            <ion-button>
-                <ion-icon name="search-outline"></ion-icon>
-            </ion-button>
-        </ion-buttons>
-    </ion-toolbar>
-</ion-header>
-
-<ion-content color="light">
-    <!-- 消息列表 -->
-    <ion-list [inset]="true">
-        <ng-container *ngFor="let they of theyList">
-            <ion-item-sliding>
-                <ion-item button detail="false">
-                    <ion-avatar slot="start">
-                        <img alt="头像" [src]="they?.get('avatar')" (click)="goTheyDetail(they)" />
-                    </ion-avatar>
-                    <ion-label>
-                        <p>{{they?.get("name")}}</p>
-                        <ion-text>聊天内容</ion-text><br />
-                    </ion-label>
-                    <div class="metadata-end-wrapper" slot="end">
-                        <ion-text color="medium">最近聊天时间</ion-text>
-                        <ion-icon color="medium" name="chevron-forward"></ion-icon>
-                    </div>
-                </ion-item>
-                <ion-item-options side="end">
-                    <ion-item-option color="danger">删除</ion-item-option>
-                </ion-item-options>
-            </ion-item-sliding>
-        </ng-container>
-    </ion-list>
-</ion-content>

+ 0 - 46
app-angular/src/modules/lesson/they/they.component.scss

@@ -1,46 +0,0 @@
-ion-content {
-    height: calc(100vh - 121px) !important;
-}
-
-ion-item {
-    ion-icon {
-        margin-right: 9px;
-    }
-
-    font-size: 0.9rem;
-}
-
-
-/* 消息列表 */
-.metadata-end-wrapper {
-    position: absolute;
-
-    top: 10px;
-    inset-inline-end: 10px;
-
-    font-size: 0.8rem;
-
-    display: flex;
-    align-items: center;
-
-    ion-text {
-        font-size: 0.6rem
-    }
-}
-
-ion-label p {
-    font-size: 0.7rem;
-    display: block;
-    max-width: calc(100% - 60px);
-    overflow: hidden;
-    text-overflow: ellipsis;
-}
-
-ion-label {
-    ion-text {
-        font-size: 0.9rem;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-    }
-}

+ 0 - 21
app-angular/src/modules/lesson/they/they.component.spec.ts

@@ -1,21 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TheyComponent } from './they.component';
-
-describe('TheyComponent', () => {
-  let component: TheyComponent;
-  let fixture: ComponentFixture<TheyComponent>;
-
-  beforeEach(() => {
-    TestBed.configureTestingModule({
-      declarations: [TheyComponent]
-    });
-    fixture = TestBed.createComponent(TheyComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 49
app-angular/src/modules/lesson/they/they.component.ts

@@ -1,49 +0,0 @@
-import { Component } from '@angular/core';
-// 引用服务
-import { Router } from '@angular/router';
-
-// 引入Parse第三方库
-import * as Parse from "parse"
-(Parse as any).serverURL = "http://metapunk.cn:9999/parse"
-Parse.initialize("dev")
-
-
-@Component({
-  selector: 'app-they',
-  templateUrl: './they.component.html',
-  styleUrls: ['./they.component.scss']
-})
-export class TheyComponent {
-
-  theyList: Array<Parse.Object> = []
-
-  // 依赖注入
-  constructor(private router: Router) {
-    this.initPage();
-  }
-  // 首次进入页面,默认加载首批数据
-  async initPage() {
-    this.theyList = await this.getTheyData()
-  }
-
-  // 数据加载相关函数
-  async getTheyData() {
-    let query = new Parse.Query("SqzPerson");
-    query.addAscending("createdAt")
-    let list = await query.find();
-    return list
-  }
-  // 跳转函数
-  goTheyDetail(they: Parse.Object) {
-    this.router.navigate(["/lesson/they/detail"], {
-      queryParams: they
-    })
-  }
-}
-
-
-
-
-
-
-