You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/h5/static/js/pages-goods-search.68742121.js

1 line
5.9 KiB

3 years ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-search"],{"0e44":function(t,e,a){"use strict";var n=a("2d64"),s=a.n(n);s.a},"11a5":function(t,e,a){"use strict";a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return n}));var n={"u-Input":a("eb73").default},s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"container"},[n("UiPageHeader",[n("v-uni-view",{staticClass:"search",attrs:{slot:"custom"},slot:"custom"},[n("u--input",{ref:"search",staticClass:"search--input",attrs:{focus:!0,placeholder:"请输入您想搜索的商品名称",prefixIcon:"search",clearable:!0,prefixIconStyle:"font-size:48rpx;color:#ccc",placeholderClass:"search--input__placeholder"},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}}),n("v-uni-text",{staticClass:"search--btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onSearch.apply(void 0,arguments)}}},[t._v("搜索")])],1)],1),t.historyList.length?n("v-uni-view",{staticClass:"history"},[n("v-uni-view",{staticClass:"history--head"},[n("v-uni-text",[t._v("最近搜索")]),n("v-uni-image",{staticClass:"history--del",attrs:{src:a("1829")},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clearHistory.apply(void 0,arguments)}}})],1),n("v-uni-view",{staticClass:"history--list"},t._l(t.historyList,(function(e,a){return n("v-uni-view",{key:a,staticClass:"history--item",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.handleQuick(e)}}},[t._v(t._s(e))])})),1)],1):t._e()],1)},i=[]},1829:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAcCAMAAACnDzTfAAAAAXNSR0IArs4c6QAAAJBQTFRFAAAAv7+/v7+/v7+/zMzMysrKyMjIzs7Ox8fHxsbGyMjIzs7Oy8vLy8vLysrKzc3Ny8vLysrKzMzMzc3Nzs7Ozc3NzMzMzMzMzc3NzMzMzMzMzc3NzMzMzMzMy8vLzc3NzMzMy8vLzMzMzMzMzMzMzMzMzMzMzMzMzc3NzMzMzMzMzMzMzMzMy8vLzMzMzMzMD4D0ugAAAC90Uk5TAAQIDBQYHB8gJDg/QERIV1hcX2BjZ293f4OHj5efo6ezt7/Dx9PX39/j5+/z9/vLHcEbAAAA8ElEQVQoz42RzUrEMBRGT5s0GUaoBZeDuJXx/d/FpSK4UBlmptDRNk1c5KcmFfQuko+cHC65qQh118V0fA5Bhr3p3OiT6l6nnAnGR5/utYhMy3CnvvInNVoAYKqHaK7KyHfNdnM2+bFsPwe+5Bvcbj76nLXt8AI14FC+UVobXIiGCtjtFaD2O6DGED0JaKEAJTQgCu9nLd5M+Q7B/A/P/uLZxNaeTf2agsnUb1p5FVMcg1UFUzaNqBS9Fjx0xjSLZ1aeScwhiue5vzxJ/MCjvQCX0xmU92TyDgeA+WnVTxZjWbyRm+ucjYn1wzYXhx7gG7GuTKI2APzsAAAAAElFTkSuQmCC"},"2d64":function(t,e,a){var n=a("f628");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var s=a("4f06").default;s("e4229c54",n,!0,{sourceMap:!1,shadowMode:!1})},"567a":function(t,e,a){"use strict";a.r(e);var n=a("11a5"),s=a("fe81");for(var i in s)"default"!==i&&function(t){a.d(e,t,(function(){return s[t]}))}(i);a("0e44");var o,r=a("f0c5"),c=Object(r["a"])(s["default"],n["b"],n["c"],!1,null,"66d8266a",null,!1,n["a"],o);e["default"]=c.exports},6306:function(t,e,a){"use strict";var n=a("4ea4");a("c975"),a("a434"),a("ac1f"),a("841c"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=n(a("1014")),i="historySearch",o={components:{UiPageHeader:s.default},data:function(){return{historyList:[],searchValue:""}},onShow:function(){this.searchValue="",this.historyList=uni.getStorageSync(i)||[]},onHide:function(){},mounted:function(){console.log(this.$refs.search)},methods:{onSearch:function(){var t=this.searchValue;t&&(this.setHistory(t),this.$Router.push({path:"/goodsList",query:{search:t}}))},clearHistory:function(){this.updateHistoryStorage([])},setHistory:function(t){var e=this.historyList,a=e.indexOf(t);a>-1&&e.splice(a,1),e.unshift(t),11===e.length&&e.pop(),this.updateHistoryStorage(e)},updateHistoryStorage:function(t){this.historyList=t,uni.setStorageSync(i,t)},handleQuick:function(t){this.setHistory(t),this.$Router.push({path:"/goodsList",query:{search:t}})}}};e.default=o},f628:function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scs