1
0

2 Коммиты 2f39017abb ... 8da4369a79

Автор SHA1 Сообщение Дата
  姜皓天 8da4369a79 数据库 5 месяцев назад
  姜皓天 78b57b20fb 数据库 5 месяцев назад

+ 1 - 0
src/app/app.component.ts

@@ -1,5 +1,6 @@
 import { Component } from '@angular/core';
 
+
 @Component({
   selector: 'app-root',
   templateUrl: './app.component.html',

+ 6 - 4
src/app/app.module.ts

@@ -27,11 +27,13 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { TestComponent } from './test/test.component';
 
 // 引入Parse第三方库
-import * as Parse from "parse"
-(Parse as any).serverURL = "https://web2023.fmode.cn/parse"
-Parse.initialize("dev")
-
+// import * as Parse from "parse"
+// (Parse as any).serverURL = "https://web2023.fmode.cn/parse"
+// Parse.initialize("dev")
 
+import * as Parse from "parse";
+Parse.initialize("dev");
+(Parse as any).serverURL = 'http://web2023.fmode.cn:9999/parse'
 
 
 

+ 1 - 1
src/app/articlefive/articlefive.component.scss

@@ -5,7 +5,7 @@
     background-color: #d6f1e0;
     border: 1px solid #1e0000;
     border-radius: 5px;
-    height: 640px; /* 设置一个固定的高度 */
+    height: 85vh; /* 设置一个固定的高度 */
     overflow-y: scroll; /* 当内容溢出时显示滚动条 */
   }
   

+ 3 - 1
src/app/articlefive/articlefive.component.ts

@@ -1,5 +1,7 @@
 import { Component, OnInit } from '@angular/core';
-import Parse from 'parse';
+// import Parse from 'parse';
+// Parse.initialize("dev")
+// Parse.serverURL = 'http://web2023.fmode.cn:9999/parse'
 
 @Component({
   selector: 'app-articlefive',

+ 1 - 1
src/app/articlefour/articlefour.component.scss

@@ -5,7 +5,7 @@
     background-color: #d6f1e0;
     border: 1px solid #1e0000;
     border-radius: 5px;
-    height: 640px; /* 设置一个固定的高度 */
+    height: 85vh; /* 设置一个固定的高度 */
     overflow-y: scroll; /* 当内容溢出时显示滚动条 */
   }
   

+ 1 - 1
src/app/articleone/articleone.component.scss

@@ -5,7 +5,7 @@
   background-color: #d6f1e0;
   border: 1px solid #1e0000;
   border-radius: 5px;
-  height: 640px; /* 设置一个固定的高度 */
+  height: 85vh; /* 设置一个固定的高度 */
   overflow-y: scroll; /* 当内容溢出时显示滚动条 */
 }
 

+ 1 - 1
src/app/articleseven/articleseven.component.scss

@@ -5,7 +5,7 @@
     background-color: #d6f1e0;
     border: 1px solid #1e0000;
     border-radius: 5px;
-    height: 640px; /* 设置一个固定的高度 */
+    height:85vh; /* 设置一个固定的高度 */
     overflow-y: scroll; /* 当内容溢出时显示滚动条 */
   }
   

+ 1 - 1
src/app/articlesix/articlesix.component.scss

@@ -5,7 +5,7 @@
     background-color: #d6f1e0;
     border: 1px solid #1e0000;
     border-radius: 5px;
-    height: 640px; /* 设置一个固定的高度 */
+    height: 85vh; /* 设置一个固定的高度 */
     overflow-y: scroll; /* 当内容溢出时显示滚动条 */
   }
   

+ 1 - 1
src/app/articlesix/articlesix.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import Parse from 'parse';
+import * as Parse from "parse"
 
 @Component({
   selector: 'app-articlesix',

+ 1 - 1
src/app/articlethree/articlethree.component.scss

@@ -5,7 +5,7 @@
     background-color: #d6f1e0;
     border: 1px solid #1e0000;
     border-radius: 5px;
-    height: 640px; /* 设置一个固定的高度 */
+    height: 85vh; /* 设置一个固定的高度 */
     overflow-y: scroll; /* 当内容溢出时显示滚动条 */
   }
   

+ 37 - 3
src/app/articlethree/articlethree.component.ts

@@ -1,12 +1,46 @@
-import { Component } from '@angular/core';
-
+import { Component, OnInit } from '@angular/core';
+import * as Parse from "parse"
 
 @Component({
   selector: 'app-articlethree',
   templateUrl: './articlethree.component.html',
   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 = [

+ 1 - 1
src/app/articletwo/articletwo.component.scss

@@ -5,7 +5,7 @@
     background-color: #d6f1e0;
     border: 1px solid #1e0000;
     border-radius: 5px;
-    height: 640px; /* 设置一个固定的高度 */
+    height:85vh; /* 设置一个固定的高度 */
     overflow-y: scroll; /* 当内容溢出时显示滚动条 */
   }