Pārlūkot izejas kodu

Merge branch 'master' of http://git.fmode.cn:3000/0235697/food-picture

lizi 3 dienas atpakaļ
vecāks
revīzija
606db0a60a

+ 1 - 2
picture-web/src/modules/first-home/image-detail/image-detail.html

@@ -1,6 +1,6 @@
 <!-- 头部导航 -->
 <div class="header">
-  <div class="back-btn" (click)="goBack()">
+  <div class="back-btn"  routerLink="/mobile/home">
     <i class="fas fa-arrow-left"></i>
   </div>
   <div class="header-title">精品美食图片</div>
@@ -12,7 +12,6 @@
     <i class="fas fa-download" (click)="handleAction('download')"></i>
   </div>
 </div>
-
 <!-- 图片展示区域 -->
 <div class="image-showcase">
   <swiper-container [init]="false" [config]="swiperConfig">

+ 3 - 7
picture-web/src/modules/first-home/image-detail/image-detail.ts

@@ -1,7 +1,7 @@
 import { Component, OnInit } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { FormsModule } from '@angular/forms';
-
+import { RouterModule } from '@angular/router';
 // 导入 Swiper 11 相关模块
 import { register } from 'swiper/element/bundle';
 import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@@ -9,7 +9,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
 @Component({
   selector: 'app-image-detail',
   standalone: true,
-  imports: [CommonModule, FormsModule],
+  imports: [CommonModule, FormsModule,RouterModule],
   templateUrl: './image-detail.html',
   styleUrls: ['./image-detail.scss'],
   schemas: [CUSTOM_ELEMENTS_SCHEMA] // 允许使用自定义元素
@@ -149,9 +149,5 @@ export class ImageDetailComponent implements OnInit {
     }
   }
 
-  // 返回功能
-  goBack(): void {
-    alert('返回首页');
-    // 实际项目中这里应该是路由跳转
-  }
+  
 }

+ 1 - 2
picture-web/src/modules/first-home/image-search/image-search.html

@@ -3,13 +3,12 @@
   <!-- 顶部搜索栏 -->
   <header class="search-header">
     <div class="header-top">
-      <div class="back-btn" (click)="backAction()">
+      <div class="back-btn" routerLink="/mobile/home">
         <fa-icon [icon]="faArrowLeft"></fa-icon>
       </div>
       <div class="app-name">播菜汪</div>
       <div style="width: 36px;"></div> <!-- 占位保持对称 -->
     </div>
-    
     <div class="search-bar">
       <fa-icon [icon]="faSearch"></fa-icon>
       <input 

+ 2 - 5
picture-web/src/modules/first-home/image-search/image-search.ts

@@ -3,6 +3,7 @@ import { Component, OnInit } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { FormsModule } from '@angular/forms';
 import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
+import { RouterModule } from '@angular/router';
 import { 
   faArrowLeft, 
   faSearch, 
@@ -17,7 +18,7 @@ import {
 @Component({
   selector: 'app-image-search',
   standalone: true,
-  imports: [CommonModule, FormsModule, FontAwesomeModule],
+  imports: [CommonModule, FormsModule, FontAwesomeModule,RouterModule],
   templateUrl: './image-search.html',
   styleUrls: ['./image-search.scss']
 })
@@ -71,10 +72,6 @@ export class ImageSearchComponent implements OnInit {
     this.searchHistory = history ? JSON.parse(history) : [];
   }
 
-  backAction() {
-    // 实际应用中这里应该是 router.navigate 或其他导航逻辑
-    alert('返回上一页面');
-  }
 
   clearHistory() {
     if (this.searchHistory.length === 0) return;

+ 6 - 10
picture-web/src/modules/picture/home-tab/home-tab.html

@@ -2,9 +2,6 @@
 <header class="header">
   <div class="logo">播菜汪</div>
   <div class="nav-icons">
-    <i class="bi bi-heart"></i>
-    <i class="bi bi-bell"></i>
-    <i class="bi bi-person"></i>
   </div>
 </header>
 
@@ -12,7 +9,6 @@
   <!-- 搜索区域 -->
   <section class="search-section">
     <div class="search-bar">
-      <i class="bi bi-search search-icon"></i>
       <input type="text" class="search-input" placeholder="请输入关键词" routerLink="/mobile/image-search" >
     </div>
     
@@ -28,7 +24,7 @@
   <section class="recommend-section">
     <div class="section-title">
       <h2>智能推荐</h2>
-      <a href="#">更多推荐</a>
+      
     </div>
     
     <div class="swiper-container">
@@ -142,14 +138,14 @@
         (click)="changeCategory('hui')">
         徽菜
       </div>
-      <div 
-        class="category-tab" 
-        [class.active]="currentCategory === 'more'"
-        (click)="changeCategory('more')">
+      <div class="category-tab" 
+         routerLink="/mobile/filter-screen">
         更多
       </div>
     </div>
-    
+    <!-- class="category-tab" 
+        [class.active]="currentCategory === 'more'"
+        (click)="changeCategory('more')" -->
     <div 
       class="refresh-container"
       (touchstart)="onTouchStart($event)"

+ 2 - 2
picture-web/src/modules/picture/home-tab/home-tab.scss

@@ -3,7 +3,7 @@
   --secondary-color: #F7C59F;
   --accent-color: #EFEFD0;
   --text-dark: #333;
-  --text-light: #fff;
+  --text-light: #ea6513e1;
   --bg-gradient: linear-gradient(135deg, #FF6B35 0%, #FFBE0B 100%);
 }
 
@@ -32,7 +32,7 @@ body {
   top: 0;
   left: 0;
   right: 0;
-  background: rgba(255, 255, 255, 0.9);
+  background: rgb(247, 215, 183);
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   z-index: 1000;

+ 4 - 0
picture-web/src/modules/picture/mobile.routes.ts

@@ -44,6 +44,10 @@ export const MOBILE_ROUTES: Routes = [
   {
     path: 'image-detail',
     loadComponent: () => import('../first-home/image-detail/image-detail').then(m => m.ImageDetailComponent)}
+      ,{
+    path: 'filter-screen',
+    loadComponent: () => import('../first-home/filter-screen/filter-screen').then(m => m.FilterScreen)
+  },
 ];
 
 

+ 11 - 7
picture-web/src/modules/thired-ser/ser-mobile.rountes.ts

@@ -1,7 +1,11 @@
-import { Routes } from '@angular/router';
-export const MOBILE_ROUTES: Routes = [
-    {
-        path: 'ser-tab',
-        loadComponent: () => import('../picture/ser-tab/ser-tab').then(m=>m.SerTab)
-    }
-]
+// import { Routes } from '@angular/router';
+// export const MOBILE_ROUTES: Routes = [
+//     {
+//         path: 'ser-tab',
+//         loadComponent: () => import('../picture/ser-tab/ser-tab').then(m=>m.SerTab)
+//     },
+//      {
+//         path: 'ser-tab',
+//         loadComponent: () => import('../picture/home-tab/home-tab').then(m=>m.HomeTab)
+//     }
+// ]