(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-common-search-search"],{"3ee0":function(e,t,n){"use strict";n.r(t);var a=n("68e5"),i=n("f063");for(var r in i)"default"!==r&&function(e){n.d(t,e,(function(){return i[e]}))}(r);var s,c=n("f0c5"),u=Object(c["a"])(i["default"],a["b"],a["c"],!1,null,"5e0f09bc",null,!1,a["a"],s);t["default"]=u.exports},"68e5":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return a}));var a={freeNavBar:n("3e12").default,freeListItem:n("7474").default},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"page"},[n("free-nav-bar",{attrs:{showBack:!0,showRight:!1,backEvent:!1},on:{back:function(t){arguments[0]=t=e.$handleEvent(t),e.back.apply(void 0,arguments)}}},[n("v-uni-input",{staticClass:"font-md",staticStyle:{width:"650rpx"},attrs:{type:"text",placeholder:e.placeholder},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.confirm.apply(void 0,arguments)}},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}})],1),""==e.searchType&&0===e.list.length?n("v-uni-view",[n("v-uni-view",{staticClass:"py-5 flex align-center justify-center"},[n("v-uni-text",{staticClass:"font text-light-muted"},[e._v("搜索指定内容")])],1),n("v-uni-view",{staticClass:"px-4 flex flex-wrap"},e._l(e.typeList,(function(t,a){return n("v-uni-view",{key:a,staticClass:"flex align-center justify-center mb-3 border-left border-right",staticStyle:{width:"200rpx"},on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.changeSearchType(t)}}},[n("v-uni-text",{staticClass:"font text-hover-primary"},[e._v(e._s(t.name))])],1)})),1)],1):e._e(),e._l(e.list,(function(t,a){return n("free-list-item",{key:a,attrs:{title:t.nickname?t.nickname:t.username?t.username:t.phone,cover:t.avatar?t.avatar:"/static/images/userpic.png"},on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.openUserBase(t.id)}}})}))],2)},r=[]},"851f":function(e,t,n){"use strict";(function(e){n("7db0"),n("a9e3"),n("8ba4"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("e2b3"),i={data:function(){return{typeList:[{name:"聊天记录",key:"history"},{name:"用户",key:"user"},{name:"群聊",key:"group"}],searchType:"",keyword:"",list:[]}},computed:{placeholder:function(){var e=this,t=this.typeList.find((function(t){return t.key===e.searchType}));return t?"搜索"+t.name:"请输入关键字"}},methods:{back:function(){if(""==this.searchType)return uni.navigateBack({delta:1});this.searchType=""},confirm:function(){var e=this;(0,a.list)({filter:{keyword:this.keyword}}).then((function(t){e.list=[],t&&(e.list=t.data.data.list)}))},openUserBase:function(e){try{if(e===this.$store.state.user.user.id)return uni.showToast({title:"您查看的是自己",icon:"none",duration:2e3})}catch(t){}Number.isInteger(e)?uni.navigateTo({url:"../../mail/user-base/user-base?user_id="+e}):uni.showToast({title:"参数错误",icon:"none",duration:2e3})},changeSearchType:function(t){e.log(t),this.searchType=t.key}}};t.default=i}).call(this,n("5a52")["default"])},f063:function(e,t,n){"use strict";n.r(t);var a=n("851f"),i=n.n(a);for(var r in a)"default"!==r&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t["default"]=i.a}}]);