|
|
(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 * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */uni-page-body[data-v-66d8266a]{background:#fff}.search[data-v-66d8266a]{height:%?88?%;flex:1;display:flex;justify-content:space-between;align-items:center}.search--input[data-v-66d8266a]{display:block;margin-right:%?40?%;height:%?70?%;border:none;box-sizing:border-box;background:#f8f8f8}.search--input__placeholder[data-v-66d8266a]{font-size:%?26?%;color:#666}.search--btn[data-v-66d8266a]{font-size:%?26?%;color:#666}.history[data-v-66d8266a]{padding:0 %?40?%}.history--head[data-v-66d8266a]{font-size:%?26?%;color:#666;display:flex;justify-content:space-between;align-items:center;margin:%?40?% 0}.history--del[data-v-66d8266a]{width:%?27?%;height:%?28?%}.history--list[data-v-66d8266a]{display:flex;flex-wrap:wrap}.history--item[data-v-66d8266a]{max-width:%?276?%;overflow:hidden;text-overflow:ellipsis;height:%?70?%;line-height:%?70?%;padding:0 %?20?%;font-size:%?26?%;color:#666;background:#f8f8f8;margin:%?10?% %?18?% %?10?% 0}body.?%PAGE?%[data-v-66d8266a]{background:#fff}',""]),t.exports=e},fe81:function(t,e,a){"use strict";a.r(e);var n=a("6306"),s=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e["default"]=s.a}}]); |