diff --git a/client/components.d.ts b/client/components.d.ts
index 0ded4d5..3489d26 100644
--- a/client/components.d.ts
+++ b/client/components.d.ts
@@ -21,6 +21,8 @@ declare module '@vue/runtime-core' {
ElMain: typeof import('element-plus/es')['ElMain']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElRow: typeof import('element-plus/es')['ElRow']
+ ElTimeline: typeof import('element-plus/es')['ElTimeline']
+ ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
FilmList: typeof import('./src/components/FilmList.vue')['default']
Footer: typeof import('./src/components/Footer.vue')['default']
Header: typeof import('./src/components/Header.vue')['default']
diff --git a/client/index.html b/client/index.html
index 40d6e0a..089a2da 100644
--- a/client/index.html
+++ b/client/index.html
@@ -10,7 +10,8 @@
(╥﹏╥)
-
+
+
diff --git a/client/src/components/Header.vue b/client/src/components/Header.vue
index aa367a4..a831a00 100644
--- a/client/src/components/Header.vue
+++ b/client/src/components/Header.vue
@@ -11,18 +11,40 @@
-
首页
-
电影
-
剧集
-
动漫
-
综艺
+
首页
+
电影
+
剧集
+
动漫
+
综艺
+
+
-
+
-
+
+
@@ -33,9 +55,30 @@ import {useRouter} from "vue-router";
import {Search, CircleClose} from '@element-plus/icons-vue'
import {ElMessage} from "element-plus";
import {ApiGet} from "../utils/request";
-
-//
+import {cookieUtil,COOKIE_KEY_MAP} from "../utils/cookie";
+// 搜索关键字
const keyword = ref('')
+// 弹窗隐藏显示
+const data = reactive({
+ historyFlag: false,
+ historyList: [{}],
+})
+//
+const handleHistory = (flag:boolean)=>{
+ data.historyFlag = flag
+ if (flag) {
+ // 获取cookie中的filmHistory
+ let historyMap = cookieUtil.getCookie(COOKIE_KEY_MAP.FILM_HISTORY)?JSON.parse(cookieUtil.getCookie(COOKIE_KEY_MAP.FILM_HISTORY)):null
+ let arr = []
+ if (historyMap) {
+ for (let k in historyMap) {
+ arr.push(historyMap[k])
+ }
+ arr.sort((item1,item2)=> item2.timeStamp-item1.timeStamp)
+ }
+ data.historyList = arr
+ }
+}
// 从父组件获取当前路由对象
@@ -69,11 +112,11 @@ onMounted(() => {
}
})
})
-
-
+
+