pages-search-index.fbd59fa5.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-search-index"],{"026e":function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(a("cbc9")),o={components:{navbar:n.default},data:function(){return{value:"",keywords:[],isSubmit:!1}},onLoad:function(){var t=this;this.$http.getSearchKeywords().then((function(e){e.status&&(t.keywords=e.data)}))},methods:{onSubmit:function(t){var e=t.detail.value;uni.navigateTo({url:"/pages/search/list?keywords=".concat(e.key)})},onSearch:function(t){"string"==typeof t&&(this.value=t),uni.navigateTo({url:"/pages/search/list?keywords=".concat(t)})}}};e.default=o},"07d2":function(t,e,a){"use strict";a.r(e);var i=a("1f34"),n=a("d7dc");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("76da");var s,r=a("f0c5"),l=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"72fe149b",null,!1,i["a"],s);e["default"]=l.exports},1246:function(t,e,a){var i=a("24fb");e=i(!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/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.search-wrap[data-v-72fe149b]{width:100%;height:%?90?%;border-top:1px solid #ddd;background:#fff}.search-wrap .field-box[data-v-72fe149b]{position:relative;z-index:1}.search-wrap .field-box uni-input[data-v-72fe149b]{width:%?610?%;float:left;height:%?64?%;line-height:%?64?%;border:1px solid #bfbfbf;border-radius:%?15?%;background-color:#fff;position:relative;top:%?12?%;left:%?20?%;text-indent:%?70?%;font-size:%?26?%;color:#333}.search-wrap .field-box[data-v-72fe149b]::before{z-index:10;position:absolute;content:"\\e629";left:%?40?%;top:%?25?%;font-size:%?38?%;color:#aaa}.search-wrap .field-btn uni-button[data-v-72fe149b]{float:right;background-color:#fff;border:none;font-size:%?28?%;width:%?110?%;height:%?64?%;line-height:%?64?%;position:relative;top:%?12?%}.search-host-list[data-v-72fe149b]{width:100%;margin-top:10px;height:auto!important;height:100px;min-height:100px;padding:10px 0;background-color:#fff}.search-host-list .host-list .title[data-v-72fe149b]{float:left;color:#666;font-size:16px;width:100%;height:45px;line-height:45px;text-indent:10px}.search-host-list .host-list .list uni-text[data-v-72fe149b]{font-size:14px;padding:5px 10px;background-color:#f1f1f1;color:#333;margin:5px 10px;border-radius:10px;float:left}',""]),t.exports=e},"1f34":function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return i}));var i={navbar:a("cbc9").default},n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",[a("navbar",{attrs:{iSimmersive:!1,placeholder:!0,title:"搜索"}}),a("v-uni-view",{staticClass:"search-wrap"},[a("v-uni-form",{on:{submit:function(e){arguments[0]=e=t.$handleEvent(e),t.onSubmit.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"field-box iconfont"},[a("v-uni-input",{staticClass:"uni-input",attrs:{type:"text",name:"key",value:t.value,placeholder:"请输入关键字"}})],1),a("v-uni-view",{staticClass:"field-btn"},[a("v-uni-button",{attrs:{disabled:t.isSubmit,plain:!0,"form-type":"submit"}},[t._v("搜索")])],1)],1)],1),a("v-uni-view",{staticClass:"search-host-list clear"},[a("v-uni-view",{staticClass:"host-list clear"},[a("v-uni-view",{staticClass:"title"},[t._v("热门搜索")]),a("v-uni-view",{staticClass:"list"},t._l(t.keywords,(function(e,i){return a("v-uni-text",{key:i,on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.onSearch(e)}}},[t._v(t._s(e))])})),1)],1)],1)],1)},o=[]},2322:function(t,e,a){var i=a("1246");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("34b0e322",i,!0,{sourceMap:!1,shadowMode:!1})},"4ba4":function(t,e,a){"use strict";var i;a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return i}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",[t.isNavbar||t.isPrev?a("v-uni-view",{staticClass:"navbar-box",style:{height:t.menuClientRect.height+t.statusBar+t.menuClientRect.searchHeight+"px",background:t.bg}},[a("v-uni-view",{staticClass:"status-bar",style:{height:t.statusBar+"px"}}),t.isNavTitle?a("v-uni-view",{staticClass:"navbar",style:{color:t.fontColor,height:t.menuClientRect.height+"px","line-height":t.menuClientRect.height+"px"}},[t.isPrev?a("v-uni-view",{staticClass:"iconfont prevPage",class:{backPage:t.iSimmersive&&!t.isTitle,statusLine:t.iSimmersive&&t.scroll<10},style:{color:t.fontColor,"line-height":t.menuClientRect.height+"px"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.prev.apply(void 0,arguments)}}},[a("v-uni-text",{style:{color:t.fontColor}},[t._v("")])],1):t._e(),t.isTitle?a("v-uni-view",{staticClass:"title",style:{color:t.fontColor,height:t.menuClientRect.height+"px","line-height":t.menuClientRect.height+"px"}},[t._v(t._s(t.title))]):t._e()],1):t._e(),t.isSearch&&t.isTitle?a("v-uni-view",{staticClass:"search-box",style:{background:t.bg}},[a("v-uni-view",{staticClass:"iconfont search-input",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onJumpSearch.apply(void 0,arguments)}}},[a("v-uni-text",[t._v("请输入关键字")])],1)],1):t._e()],1):t._e(),t.placeholder?a("v-uni-view",{staticClass:"placeholder-box",staticStyle:{width:"100%"},style:{height:t.menuClientRect.height-1+t.menuClientRect.searchHeight+t.statusBar+"px"}}):t._e()],1)},o=[]},"71fd":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={set:function(t,e){sessionStorage.setItem(t,vlaue)},setJson:function(t,e){sessionStorage.setItem(t,JSON.stringify(e))},get:function(t){return sessionStorage.getItem(t)},getJson:function(t){var e=sessionStorage.getItem(t);return e?JSON.parse(e):null},remove:function(t){sessionStorage.removeItem(t)},clear:function(){sessionStorage.clear()}};e.default=i},"76da":function(t,e,a){"use strict";var i=a("2322"),n=a.n(i);n.a},8896:function(t,e,a){var i=a("aad9");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("449ba651",i,!0,{sourceMap:!1,shadowMode:!1})},"9ca1":function(t,e,a){"use strict";var i=a("4ea4");a("99af"),a("fb6a"),a("a9e3"),a("e25e"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;i(a("71fd"));var n={props:{value:{type:[String,Number],default:0},scroll:{type:[String,Number],default:0},placeholder:{type:Boolean,default:!1},isShow:{type:Boolean,default:!0},isPrev:{type:Boolean,default:!0},isSearch:{type:Boolean,default:!1},isNavTitle:{type:Boolean,default:!0},title:{type:String,default:""},titleColor:{type:String,default:"#000000"},background:{type:String,default:"transparent"},iSimmersive:{type:Boolean,default:!1},onBack:{type:Function,default:null}},data:function(){return{statusBar:10,menuClientRect:{height:35,searchHeight:0},bg:"",fontColor:"",isTitle:!0,isNavbar:!0}},mounted:function(){var t=uni.getSystemInfoSync();this.isNavbar=this.isShow,this.bg=this.background,this.fontColor=this.titleColor,this.iSimmersive?(this.isTitle=!1,this.isNavbar=!1,this.setNavigationBarColor("#ffffff")):(this.bg="transparent"!=this.background?this.background:"#ffffff",this.setNavigationBarColor(this.titleColor)),this.isNavTitle||(this.menuClientRect.height=0),this.statusBar=0,this.isSearch&&(this.menuClientRect.searchHeight=45);var e=this.menuClientRect.height+this.statusBar;this.$emit("input",t.screenHeight-e-t.windowBottom)},methods:{onJumpSearch:function(){this.$utils.navigateTo("search/index")},prev:function(){if(this.onBack)this.onBack();else{var t=getCurrentPages();t&&t.length>1?uni.navigateBack():t.length<=1&&this.$utils.switchTab("index/index")}},setNavigationBarColor:function(t){this.fontColor=t},color2Rgb:function(t){var e=t.toLowerCase();if(/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(e)){if(4===e.length){for(var a="#",i=1;i<4;i+=1)a+=e.slice(i,i+1).concat(e.slice(i,i+1));e=a}for(var n=[],o=1;o<7;o+=2)n.push(parseInt("0x"+e.slice(o,o+2)));return n.join(",")}return t}},watch:{scroll:{handler:function(t,e){if(!this.iSimmersive)return!1;var a="#ffffff",i="#000000";"transparent"!=this.background&&(a=this.background,i="#ffffff");var n=this.color2Rgb(a);t>=10&&t<=50?(this.bg="rgba("+n+",.3)",this.setNavigationBarColor(i),this.isTitle=!0,this.isNavbar=!0):t>=51&&t<=99?(this.bg="rgba("+n+",.7)",this.setNavigationBarColor(i),this.isTitle=!0,this.isNavbar=!0):t>=100?(this.bg="rgba("+n+",1)",this.setNavigationBarColor(i),this.isTitle=!0,this.isNavbar=!0):t<10&&(this.bg="rgba("+n+",0)",this.setNavigationBarColor("#ffffff"),this.isTitle=!1,this.isNavbar=!1)},deep:!0}}};e.default=n},aad9:function(t,e,a){var i=a("24fb");e=i(!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/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.placeholder-box[data-v-58a7c612]{height:35px}.navbar-box[data-v-58a7c612]{position:fixed;z-index:100000;topL:0;left:0;width:100%;height:35px}.navbar-box .status-bar[data-v-58a7c612]{width:100%;float:left}.navbar-box .search-box[data-v-58a7c612]{width:100%;height:45px;float:left}.navbar-box .search-box .search-input[data-v-58a7c612]{position:relative;color:#fff;height:35px;line-height:35px;border-radius:%?50?%;margin:%?10?% %?20?%;background-color:#fff;color:#666}.navbar-box .search-box .search-input[data-v-58a7c612]::before{position:absolute;content:"\\e629";left:%?30?%;top:%?0?%;font-size:%?38?%;color:#aaa}.navbar-box .search-box .search-input uni-text[data-v-58a7c612]{padding-left:%?90?%;font-size:%?30?%}.navbar-box .navbar[data-v-58a7c612]{float:left;width:100%;position:relative}.navbar-box .navbar .title[data-v-58a7c612]{width:100%;text-align:center;font-size:%?33?%;font-size:%?29?%}.navbar-box .navbar .prevPage[data-v-58a7c612]{position:absolute;left:%?20?%;top:2%;width:%?60?%;height:%?60?%}.navbar-box .navbar .prevPage uni-text[data-v-58a7c612]{color:#666;font-size:%?65?%;font-weight:700}.navbar-box .navbar .backPage[data-v-58a7c612]{background-color:rgba(0,0,0,.5);border-radius:50%}.navbar-box .navbar .backPage uni-text[data-v-58a7c612]{color:#fff;position:absolute;left:30%;top:50%;-webkit-transform:translate(-30%,-50%);transform:translate(-30%,-50%)}.navbar-box .navbar .statusLine[data-v-58a7c612]{top:%?20?%}',""]),t.exports=e},c3ba:function(t,e,a){"use strict";a.r(e);var i=a("9ca1"),n=a.n(i);for(var o in i)"default"!==o&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},cbc9:function(t,e,a){"use strict";a.r(e);var i=a("4ba4"),n=a("c3ba");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("f3ab");var s,r=a("f0c5"),l=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"58a7c612",null,!1,i["a"],s);e["default"]=l.exports},d7dc:function(t,e,a){"use strict";a.r(e);var i=a("026e"),n=a.n(i);for(var o in i)"default"!==o&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},f3ab:function(t,e,a){"use strict";var i=a("8896"),n=a.n(i);n.a}}]);