TestEShopDist/dist/pages/classList/sub-common/071f0d2864ed3f21580488256af4d8b8.js
2023-05-12 11:43:37 +08:00

2 lines
2.8 KiB
JavaScript

/*! For license information please see 071f0d2864ed3f21580488256af4d8b8.js.LICENSE.txt */
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["sub-common/071f0d2864ed3f21580488256af4d8b8"],{"./src/components/product/index.tsx":function(e,s,c){var a=c("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),t=c("./node_modules/react/cjs/react.production.min.js"),i=c("./src/components/LabAndImg/index.tsx"),n=c("./src/components/iconfont/iconfont.tsx"),r=c("./src/components/tag/index.tsx"),o=c("./src/components/product/index.module.scss"),l=c("./src/common/common.ts"),d=c("./src/common/format.ts"),m=c("./src/reducers/hooks.ts"),u=c("./src/common/report/event.ts"),f=c("./node_modules/react/cjs/react-jsx-runtime.production.min.js");s.default=function Product(e){var s=e.productList,c=void 0===s?[]:s,p=e.pageName,x=void 0===p?"":p,_=(0,m.useSelector)((function(e){return e.userInfo})),h=(0,t.useCallback)((function(e){return{lab:e.lab,rgb:e.rgb,texture_url:e.texture_url}}),[c]);return(0,f.jsx)(a.View,{className:o.default.products_list,children:null==c?void 0:c.map((function(e){return(0,f.jsxs)(a.View,{className:o.default.products_item,onClick:function onClick(){return function handleClickGoods(e){(0,u.ClickGoods)({page_name:x||"未知页面",fabric_code:e.code,fabric_name:e.name,trigger_time:(0,d.formatDateTime)(new Date),purchaser_name:_.adminUserInfo.user_name||"未知用户",purchaser_id:_.adminUserInfo.user_id||0}),(0,l.goLink)("/pages/details/index?id=".concat(e.id))}(e)},children:[(0,f.jsxs)(a.View,{className:o.default.item_img,children:[(0,f.jsx)(i.default,{value:h(e)}),(0,f.jsxs)(a.View,{className:o.default.num,children:[e.product_color_count,"色"]}),e.is_favorite&&(0,f.jsx)(n.default,{customClassName:o.default.collection_icon,name:"icon-shoucang1",size:40})]}),(0,f.jsxs)(a.View,{className:o.default.item_con,children:[(0,f.jsxs)(a.View,{className:o.default.title,children:[(0,f.jsxs)(a.Text,{children:[(0,d.formatHashTag)(e.code,"")," "]}),e.name]}),(0,f.jsxs)(a.View,{className:o.default.tag_list,children:[(0,f.jsx)(r.default,{customClassName:o.default.tag,type:"primary",size:"small",circle:!0,children:e.width}),(0,f.jsx)(r.default,{customClassName:o.default.tag_g,type:"primary",size:"small",circle:!0,children:e.weight_density})]}),(0,f.jsx)(a.View,{className:o.default.des,children:e.component}),(0,f.jsxs)(a.View,{className:o.default.bottom,children:[(0,f.jsx)(a.View,{className:o.default.header_con,children:(0,f.jsx)(a.View,{children:!!e.product_screw_id&&(0,f.jsx)(r.default,{customClassName:o.default.header_label,circle:!0,type:"primary",size:"small",children:"配套螺纹"})})}),(0,f.jsxs)(a.View,{className:o.default.price,children:[(0,f.jsx)(a.View,{className:o.default.price_unit,children:"¥"}),(0,f.jsxs)(a.View,{className:o.default.price_num,children:[(0,d.formatPriceDiv)(e.lowest_price,100,!0),"起"]})]})]})]})]},e.id)}))})}}}]);