|  | @@ -1,6 +1,5 @@
 | 
	
		
			
				|  |  |  import { Component , AfterViewInit } from '@angular/core';
 | 
	
		
			
				|  |  |  import { HttpClient, HttpHeaders } from '@angular/common/http';
 | 
	
		
			
				|  |  | -import Swiper from 'swiper';
 | 
	
		
			
				|  |  |  import { Network, DataSet, Node, Edge } from 'vis-network/standalone';
 | 
	
		
			
				|  |  |  // 扩展 Node 和 Edge 类型以支持自定义属性
 | 
	
		
			
				|  |  |  interface CustomNode extends Node {
 | 
	
	
		
			
				|  | @@ -13,39 +12,27 @@ interface CustomNode extends Node {
 | 
	
		
			
				|  |  |  })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export class Tab1Page implements AfterViewInit{
 | 
	
		
			
				|  |  | -  // 定义 slides 属性,数组中的每个对象代表一个轮播图项目
 | 
	
		
			
				|  |  | -  slides = [
 | 
	
		
			
				|  |  | -    { image: '/assets/images/slide1.jpg', title: 'Slide 1' },
 | 
	
		
			
				|  |  | -    { image: '/assets/images/slide2.jpg', title: 'Slide 2' },
 | 
	
		
			
				|  |  | -    { image: '/assets/images/slide3.jpg', title: 'Slide 3' },
 | 
	
		
			
				|  |  | -    { image: '/assets/images/slide4.jpg', title: 'Slide 4' }
 | 
	
		
			
				|  |  | -  ];
 | 
	
		
			
				|  |  |    selectedNodeDetails: string | null = null;
 | 
	
		
			
				|  |  |    position = { top: '100px', left: '100px' }; // 消息框初始位置
 | 
	
		
			
				|  |  |    isDragging = false;
 | 
	
		
			
				|  |  |    dragOffset = { x: 0, y: 0 };
 | 
	
		
			
				|  |  |    searchQuery: string = '';  // 搜索框的绑定变量
 | 
	
		
			
				|  |  |    searchResults: any[] = []; // 存放搜索结果的数组
 | 
	
		
			
				|  |  | +  //轮播图图片
 | 
	
		
			
				|  |  | +  imageList:Array<any> = [
 | 
	
		
			
				|  |  | +        {img:"/assets/images/slide1.jpg"},
 | 
	
		
			
				|  |  | +        {img:"/assets/images/slide2.jpg"},
 | 
	
		
			
				|  |  | +        {img:"/assets/images/slide3.jpg"},
 | 
	
		
			
				|  |  | +        {img:"/assets/images/slide4.jpg"},
 | 
	
		
			
				|  |  | +      ]
 | 
	
		
			
				|  |  |    constructor(private http: HttpClient) {}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    navigateToLink() {
 | 
	
		
			
				|  |  |      // 替换为吉州窑小程序的实际链接
 | 
	
		
			
				|  |  |      console.log("吉州窑小程序")
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |    
 | 
	
		
			
				|  |  |    ngAfterViewInit() {
 | 
	
		
			
				|  |  | -    // 初始化 Swiper
 | 
	
		
			
				|  |  | -    const swiper = new Swiper('.swiper-container', {
 | 
	
		
			
				|  |  | -      autoplay: {
 | 
	
		
			
				|  |  | -        delay: 3000,
 | 
	
		
			
				|  |  | -        disableOnInteraction: false,
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      loop: true,
 | 
	
		
			
				|  |  | -      pagination: {
 | 
	
		
			
				|  |  | -        el: '.swiper-pagination',
 | 
	
		
			
				|  |  | -        clickable: true,
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -    });
 | 
	
		
			
				|  |  | -    console.log('Swiper initialized');
 | 
	
		
			
				|  |  |      // 初始化知识图谱
 | 
	
		
			
				|  |  |      this.createGraph();
 | 
	
		
			
				|  |  |    }
 |