From c29a4c8f6022e6cd5ff92d499c8db829c8c471aa Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 11 二月 2026 09:51:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 mini-program/pages/search/search.vue |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/mini-program/pages/search/search.vue b/mini-program/pages/search/search.vue
index d7b2310..2700b46 100644
--- a/mini-program/pages/search/search.vue
+++ b/mini-program/pages/search/search.vue
@@ -4,10 +4,10 @@
 			<u-search placeholder="璇疯緭鍏ュ晢鍝佸悕绉版悳绱�" height="36" searchIconColor="#999999" borderColor="#EEEEEE"
 				bgColor="#F9F9FB" :showAction="false" v-model="goodsName" @search="search" />
 		</view>
-		<view class="history">
+		<view class="history" v-if="historyList && historyList.length > 0">
 			<view class="history-title">鍘嗗彶鎼滅储</view>
 			<view class="history-list">
-				<view class="history-list-item">鏀噸杞�</view>
+				<view class="history-list-item" v-for="(item, index) in historyList" :key="index">{{item.content}}</view>
 			</view>
 		</view>
 		<template v-if="isSearch">
@@ -42,20 +42,39 @@
 </template>
 
 <script>
+	import { mapState } from 'vuex'
 	export default {
+		computed: {
+			...mapState(['userInfo'])
+		},
 		data() {
 			return {
 				goodsName: '',
 				goodsList: [],
 				page: 1,
 				next: true,
-				isSearch: false
+				isSearch: false,
+				historyList: []
 			};
+		},
+		onLoad() {
+			this.gethistary()
 		},
 		onReachBottom() {
 			this.getGoodsList()
 		},
 		methods: {
+			gethistary() {
+				if (!this.userInfo) return
+				this.$u.api.searchHistoryList({
+					memberId: this.userInfo.id
+				}).then(res => {
+					if (res.code === 200) {
+						console.log(res)
+						this.historyList = res.data
+					}
+				})
+			},
 			search() {
 				if (!this.isSearch) {
 					this.isSearch = true

--
Gitblit v1.9.3