1 line
4.2 KiB
JavaScript
1 line
4.2 KiB
JavaScript
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[996],{6565:function(e,n,a){var l=a(9975),s=a(4165),d=a(2982),_=a(5861),o=a(885),c=a(1515),i=a(9792),t=a(5032),r="index-module__main___MNLfI",u="index-module__cancelFont___oOAD6",m="index-module__line___LyScQ",x="index-module__topBox___VPAQP",h="index-module__histroyFonts___dC6RY",j="index-module__icon_delect___bl00a",p="index-module__bigBox___mCn5O",v="index-module__itemBox___ZWI_g",f=a(6408),g=a.n(f),N="index-module__mainBox___odirf",G="index-module__pic___o3oEQ",b="index-module__fonst___TGL8x",B=a(5513),w=(0,i.memo)((function(e){var n=e.picUrl,a=void 0===n?"":n,l=e.fonst,s=void 0===l?"无搜索历史":l;return(0,B.jsxs)(c.G7,{className:N,children:[(0,B.jsx)(c.Ee,{className:G,mode:"aspectFill",lazyLoad:!0,src:a}),(0,B.jsx)(c.G7,{className:b,children:s})]})})),Z=a(2535),k=a.n(Z),C="index-module__itemBox___aIZdB",P="index-module__picBox___Y4RXP",F="index-module__pic___aEmBn",T="index-module__posBox___ESI7u",O="index-module__leftBox___aPqRN",y="index-module__rightBox___LUEwe",E="index-module__productName___dxOWC",S="index-module__tips___r7PD4",L="index-module__flexTag___m5s9T",z="index-module__tagOne___C_Ubk",I="index-module__tagTwo___uuddT",Q=a(7816),D=(0,i.memo)((function(e){var n,a,l,s,d,_,o,t,r,u=(0,i.useCallback)((function(e){return{lab:e.lab,rgb:e.rgb,texture_url:e.texture_url}}),[]);return(0,B.jsxs)(c.G7,{className:C,children:[""===(null===(n=e.data)||void 0===n?void 0:n.texture_url)&&(0,B.jsx)(B.Fragment,{children:(0,B.jsxs)(c.G7,{className:P,children:[(0,B.jsx)(c.Ee,{className:F,mode:"aspectFill",src:"https://test.cdn.zzfzyc.com/mall/no_img.png"}),(0,B.jsxs)(c.G7,{className:T,children:[null===(a=e.data)||void 0===a?void 0:a.product_color_count,"色"]})]})}),""!==(null===(l=e.data)||void 0===l?void 0:l.texture_url)&&(0,B.jsx)(B.Fragment,{children:(0,B.jsxs)(c.G7,{className:O,children:[(0,B.jsx)(Q.Z,{value:u(e.data)}),(0,B.jsxs)(c.G7,{className:T,children:[null===(s=e.data)||void 0===s?void 0:s.product_color_count,"色"]})]})}),(0,B.jsxs)(c.G7,{className:y,children:[(0,B.jsxs)(c.G7,{className:E,children:[null===(d=e.data)||void 0===d?void 0:d.code,"#",null===(_=e.data)||void 0===_?void 0:_.name]}),(0,B.jsx)(c.G7,{className:S,children:null===(o=e.data)||void 0===o?void 0:o.component}),(0,B.jsxs)(c.G7,{className:L,children:[(0,B.jsx)(c.G7,{className:z,children:null===(t=e.data)||void 0===t?void 0:t.width}),(0,B.jsx)(c.G7,{className:I,children:null===(r=e.data)||void 0===r?void 0:r.weight_density})]})]})]})})),R=a(1948),U=(0,i.memo)((function(){var e=(0,i.useState)(["a","b"]),n=(0,o.Z)(e,2),a=n[0],l=(n[1],(0,i.useState)(["a"])),f=(0,o.Z)(l,2),N=f[0],G=f[1],b=(0,i.useState)(!1),Z=(0,o.Z)(b,2),C=Z[0],P=Z[1],F=(0,i.useCallback)((function(e){e?(P(!0),O(e)):(P(!1),G([]))}),[]),T=function mpproductlist(){return(0,R.Q)({url:"/v1/mp/product/list",method:"get"})}().fetchData,O=function(){var e=(0,_.Z)((0,s.Z)().mark((function _callee(e){var n;return(0,s.Z)().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,T({code_or_name:e});case 2:n=a.sent,G((0,d.Z)(n.data.list));case 4:case"end":return a.stop()}}),_callee)})));return function getProduct(n){return e.apply(this,arguments)}}();return(0,B.jsxs)(c.G7,{className:r,children:[(0,B.jsx)(t.Z,{placeholder:"请输入搜索布料",showBtn:!1,changeOnSearch:F,debounceTime:300,children:(0,B.jsx)(c.G7,{className:u,onClick:function onClick(){return function back(){k().navigateBack({delta:1})}()},children:"取消"})}),(0,B.jsx)(c.G7,{className:m}),!C&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(c.G7,{className:x,children:[(0,B.jsx)(c.G7,{className:h,children:"历史搜索"}),(0,B.jsx)(c.G7,{className:g()("iconfont","icon-shaixuan",j)})]}),!!a.length&&(0,B.jsx)(c.G7,{className:p,children:a.map((function(e,n){return(0,B.jsx)(c.G7,{className:v,children:e},n)}))}),!a.length&&(0,B.jsx)(w,{fonst:"无搜索历史"})]}),C&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(c.G7,{className:x,children:(0,B.jsx)(c.G7,{className:h,children:"搜索结果"})}),!!N.length&&N.map((function(e,n){return(0,B.jsx)(D,{data:e},n)})),!N.length&&(0,B.jsx)(w,{fonst:"暂无数据"})]})]})}));Page((0,l.createPageConfig)(U,"pages/searchPage/index",{root:{cn:[]}},{navigationBarTitleText:"搜索"}||{}))}},function(e){e.O(0,[107,216,592],(function(){return n=6565,e(e.s=n);var n}));e.O()}]); |