|
@@ -1,12 +1,46 @@
|
|
-import { Component } from '@angular/core';
|
|
|
|
-
|
|
|
|
|
|
+import { Component, OnInit } from '@angular/core';
|
|
|
|
+import * as Parse from "parse"
|
|
|
|
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-articlethree',
|
|
selector: 'app-articlethree',
|
|
templateUrl: './articlethree.component.html',
|
|
templateUrl: './articlethree.component.html',
|
|
styleUrls: ['./articlethree.component.scss']
|
|
styleUrls: ['./articlethree.component.scss']
|
|
})
|
|
})
|
|
-export class ArticlethreeComponent {
|
|
|
|
|
|
+export class ArticlethreeComponent implements OnInit{
|
|
|
|
+ storiesData: any[] = []; // 给变量一个初始值
|
|
|
|
+ titlesData: any[] = []; // 给变量一个初始值
|
|
|
|
+ authorsData: any[] = []; // 给变量一个初始值
|
|
|
|
+ datesData: any[] = []; // 给变量一个初始值
|
|
|
|
+ constructor() { }
|
|
|
|
+
|
|
|
|
+ ngOnInit(): void {
|
|
|
|
+ const Jht430 = Parse.Object.extend('Jht430');
|
|
|
|
+ const query = new Parse.Query(Jht430);
|
|
|
|
+
|
|
|
|
+ query.get('jWdWQlpHsC').then((result) => {
|
|
|
|
+ this.storiesData = result.get('stories');
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ console.error('Error retrieving stories data: ', error);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ query.get('jWdWQlpHsC').then((result) => {
|
|
|
|
+ this.titlesData = result.get('titles');
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ console.error('Error retrieving titles data: ', error);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ query.get('jWdWQlpHsC').then((result) => {
|
|
|
|
+ this.authorsData = result.get('authors');
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ console.error('Error retrieving authors data: ', error);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ query.get('jWdWQlpHsC').then((result) => {
|
|
|
|
+ this.datesData = result.get('dates');
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ console.error('Error retrieving dates data: ', error);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
comments = [
|
|
comments = [
|