|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-search"],{"0d54":function(t,a,e){var n=e("24fb");a=n(!1),a.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-531a4a9c]{background:#fff}.header[data-v-531a4a9c]{background:#fff}.search[data-v-531a4a9c]{height:%?88?%;flex:1;display:flex;justify-content:space-between;align-items:center}.search--input[data-v-531a4a9c]{display:block;height:%?70?%;border:none;box-sizing:border-box;background:#f8f8f8}.search--input__placeholder[data-v-531a4a9c]{font-size:%?28?%;color:#666}.search--btn[data-v-531a4a9c]{font-size:%?26?%;color:#666}.history[data-v-531a4a9c]{padding:0 %?40?%}.history--head[data-v-531a4a9c]{display:flex;justify-content:space-between;align-items:center;margin:%?40?% 0 %?20?%}.history--head uni-text[data-v-531a4a9c]{font-size:%?26?%;color:#999}.history--del[data-v-531a4a9c]{width:%?27?%;height:%?28?%}.history--list[data-v-531a4a9c]{display:flex;flex-wrap:wrap}.history--item[data-v-531a4a9c]{max-width:%?460?%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:%?70?%;line-height:%?70?%;padding:0 %?20?%;font-size:%?26?%;color:#666;background:#f8f8f8;margin:%?10?%}body.?%PAGE?%[data-v-531a4a9c]{background:#fff}',""]),t.exports=a},1829:function(t,a){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"},"3e79":function(t,a,e){"use strict";var n=e("c5bb"),s=e.n(n);s.a},"567a":function(t,a,e){"use strict";e.r(a);var n=e("d81d8"),s=e("fe81");for(var i in s)"default"!==i&&function(t){e.d(a,t,(function(){return s[t]}))}(i);e("3e79");var c,o=e("f0c5"),r=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,"531a4a9c",null,!1,n["a"],c);a["default"]=r.exports},6306:function(t,a,e){"use strict";var n=e("4ea4");e("c975"),e("a434"),e("ac1f"),e("5319"),e("841c"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var s=n(e("1014")),i="historySearch",c={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.replace({path:"/goodsList",query:{search:t}}))},clearHistory:function(){this.updateHistoryStorage([])},setHistory:function(t){var a=this.historyList,e=a.indexOf(t);e>-1&&a.splice(e,1),a.unshift(t),11===a.length&&a.pop(),this.updateHistoryStorage(a)},updateHistoryStorage:function(t){this.historyList=t,uni.setStorageSync(i,t)},handleQuick:function(t){this.setHistory(t),this.$Router.replace({path:"/goodsList",query:{search:t}})}}};a.default=c},c5bb:function(t,a,e){var n=e("0d54");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var s=e("4f06").default;s("4c3cc434",n,!0,{sourceMap:!1,shadowMode:!1})},d81d8:function(t,a,e){"use strict";e.d(a,"b",(function(){return s})),e.d(a,"c",(function(){return i})),e.d(a,"a",(function(){return n}));var n={"u-Input":e("eb73").default,uIcon:e("a653").default},s=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("v-uni-view",{staticClass:"container"},[n("UiPageHeader",{staticClass:"header"},[n("v-uni-view",{staticClass:"search",attrs:{slot:"custom"},slot:"custom"},[n("u--input",{staticClass:"search--input",attrs:{focus:!0,placeholder:"请输入您想搜索的商品名称",clearable:!0,placeholderClass:"search--input__placeholder"},on:{confirm:function(a){arguments[0]=a=t.$handleEvent(a),t.onSearch.apply(void 0,arguments)}},model:{value:t.searchValue,callback:function(a){t.searchValue=a},expression:"searchValue"}},[n("u-icon",{attrs:{slot:"suffix",name:"search",color:"#ccc",size:"48rpx"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.onSearch.apply(void 0,arguments)}},slot:"suffix"})],1)],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:e("1829")},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.clearHistory.apply(void 0,arguments)}}})],1),n("v-uni-view",{staticClass:"history--list"},t._l(t.historyList,(function(a,e){return n("v-uni-view",{key:e,staticClass:"history--item",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleQuick(a)}}},[t._v(t._s(a))])})),1)],1):t._e()],1)},i=[]},fe81:function(t,a,e){"use strict";e.r(a);var n=e("6306"),s=e.n(n);for(var i in n)"default"!==i&&function(t){e.d(a,t,(function(){return n[t]}))}(i);a["default"]=s.a}}]); |