|
@@ -1,11 +1,55 @@
|
|
|
-import { Component } from '@angular/core';
|
|
|
+import { Component, OnInit } from '@angular/core';
|
|
|
|
|
|
@Component({
|
|
|
selector: 'app-tab1',
|
|
|
templateUrl: 'tab1.page.html',
|
|
|
styleUrls: ['tab1.page.scss']
|
|
|
})
|
|
|
-export class Tab1Page {
|
|
|
+// export class Tab1Page {
|
|
|
+
|
|
|
+// constructor() {}
|
|
|
+
|
|
|
+// backupAlbum() {
|
|
|
+// // 备份相册的逻辑
|
|
|
+// }
|
|
|
+
|
|
|
+// backupContacts() {
|
|
|
+// // 备份通讯录的逻辑
|
|
|
+// }
|
|
|
+
|
|
|
+// restoreFiles() {
|
|
|
+// // 恢复文件的逻辑
|
|
|
+// }
|
|
|
+
|
|
|
+// cleanFiles() {
|
|
|
+// // 清理文件的逻辑
|
|
|
+// }
|
|
|
+
|
|
|
+// scanDocuments() {
|
|
|
+// // 扫描文档的逻辑
|
|
|
+// }
|
|
|
+
|
|
|
+// recognizeText() {
|
|
|
+// // 文字识别的逻辑
|
|
|
+// }
|
|
|
+
|
|
|
+// uploadFiles() {
|
|
|
+// // 上传文件的逻辑
|
|
|
+// }
|
|
|
+// }
|
|
|
+export class Tab1Page implements OnInit {
|
|
|
+ images: string[] = ['assets/img/slide1.png', 'assets/img/slide1.png', 'assets/img/slide1.png']; // 图片路径数组
|
|
|
+ currentSlide = 0; // 当前轮播图索引
|
|
|
+
|
|
|
+ ngOnInit() {
|
|
|
+ this.showSlide(); // 初始化显示第一张轮播图
|
|
|
+ setInterval(() => this.showSlide(), 3000); // 每5秒切换一次图片
|
|
|
+ }
|
|
|
+
|
|
|
+ // 切换轮播图
|
|
|
+ showSlide() {
|
|
|
+ this.currentSlide = (this.currentSlide + 1) % this.images.length; // 循环切换图片
|
|
|
+ }
|
|
|
|
|
|
constructor() {}
|
|
|
|