"use strict";const e=require("../../common/vendor.js"),r=require("../../sheep/index.js");if(require("../../sheep/url/index.js"),require("../../sheep/store/index.js"),require("../../sheep/store/app.js"),require("../../sheep/api/promotion/diy.js"),require("../../sheep/request/index.js"),require("../../sheep/config/index.js"),require("../../sheep/platform/index.js"),require("../../sheep/platform/provider/wechat/index.js"),require("../../sheep/platform/provider/wechat/miniProgram.js"),require("../../sheep/api/member/auth.js"),require("../../sheep/api/member/social.js"),require("../../sheep/api/member/user.js"),require("../../sheep/platform/provider/apple/index.js"),require("../../sheep/platform/share.js"),require("../../sheep/router/index.js"),require("../../sheep/hooks/useModal.js"),require("../../sheep/helper/index.js"),require("../../sheep/helper/test.js"),require("../../sheep/helper/digit.js"),require("../../sheep/api/member/signin.js"),require("../../sheep/helper/throttle.js"),require("../../sheep/platform/pay.js"),require("../../sheep/api/pay/order.js"),require("../../sheep/store/user.js"),require("../../sheep/store/cart.js"),require("../../sheep/api/trade/cart.js"),require("../../sheep/api/pay/wallet.js"),require("../../sheep/api/trade/order.js"),require("../../sheep/api/promotion/coupon.js"),require("../../sheep/store/sys.js"),require("../../sheep/store/modal.js"),require("../../sheep/config/zIndex.js"),!Array){(e.resolveComponent("uni-search-bar")+e.resolveComponent("s-layout"))()}Math||((()=>"../../uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.js")+(()=>"../../sheep/components/s-layout/s-layout.js"))();const s={__name:"search",setup(s){const i=e.reactive({historyList:[]});function o(s){s&&(!function(r){i.historyList.includes(r)&&i.historyList.splice(i.historyList.indexOf(r),1);i.historyList.unshift(r),i.historyList.length>=10&&(i.historyList.length=10);e.index.setStorageSync("searchHistory",i.historyList)}(s),r.sheep.$router.go("/pages/goods/list",{keyword:s}))}function t(){e.index.showModal({title:"提示",content:"确认清除搜索历史吗？",success:function(r){r.confirm&&(i.historyTag=[],e.index.removeStorageSync("searchHistory"))}})}return e.onLoad((()=>{i.historyList=e.index.getStorageSync("searchHistory")||[]})),(r,s)=>({a:e.o((e=>o(e.value))),b:e.p({radius:"33",placeholder:"请输入关键字",cancelButton:"none",focus:!0}),c:e.o(t),d:e.f(i.historyList,((r,s,i)=>({a:e.t(r),b:e.o((e=>o(r)),s),c:s}))),e:e.p({title:"搜索",bgStyle:{color:"#FFF"}})})}},i=e._export_sfc(s,[["__scopeId","data-v-d3779116"]]);wx.createPage(i);
