search.js 3.3 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/composition/search/search"],{3376:function(t,e,n){},5445:function(t,e,n){"use strict";var o=n("3376"),i=n.n(o);i.a},"99dd":function(t,e,n){"use strict";n.r(e);var o=n("b096"),i=n("9edf");for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("5445");var r,c=n("f0c5"),s=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"5a8f889a",null,!1,o["a"],r);e["default"]=s.exports},"9da3":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("2f62");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=function(){n.e("components/basic-component/app-composition/app-composition").then(function(){return resolve(n("a664"))}.bind(null,n)).catch(n.oe)},s={data:function(){return{list:[],keyword:"",choose_list:[],detail:{},animationData:{},height:0,searchResult:!1,searchMode:!0,getFocus:!0,showGoods:!1}},components:{"app-composition":c},computed:a({},(0,o.mapGetters)("mallConfig",{getTheme:"getTheme"})),methods:{show:function(e){this.detail=e,this.showGoods=!0;var n=t.createAnimation({duration:1e3,timingFunction:"ease"});this.animation=n,n.translateY(this.height).step(),this.animationData=n.export()},close:function(){this.detail={},this.showGoods=!1},toDetail:function(e){this.close(),t.navigateTo({url:"/plugins/composition/detail/detail?composition_id="+e.id})},toGoods:function(e){t.navigateTo({url:"/pages/goods/goods?id="+e})},clearSearch:function(){this.keyword="",this.list=[],this.searchResult=!1},toSearch:function(){var e=this;t.showLoading({mask:!0,title:"搜索中..."}),e.$request({url:e.$api.composition.index,data:{keyword:e.keyword}}).then((function(n){t.hideLoading(),e.searchResult=!0,0==n.code?e.list=n.data.list:(t.hideLoading(),t.showToast({title:n.msg,icon:"none",duration:1e3}))})).catch((function(t){e.$hideLoading()}))}},onLoad:function(){this.$commonLoad.onload();var e=this;t.getSystemInfo({success:function(t){e.height=-t.screenHeight}})}};e.default=s}).call(this,n("543d")["default"])},"9edf":function(t,e,n){"use strict";n.r(e);var o=n("9da3"),i=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},b096:function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var i=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.getFocus=!0})},a=[]},c2f2:function(t,e,n){"use strict";(function(t){n("2d0a");o(n("66fd"));var e=o(n("99dd"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])}},[["c2f2","common/runtime","common/vendor"]]]);