2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
"use strict";require("./sub-vendors.js");require("./sub-common/db6cc8fba2c34d36042a60bcf5f10485.js");require("./sub-common/510d0e7078f44d770a0720344fb06369.js");require("./sub-common/0762d0d2445fe1200cae192cedb39f4b.js");require("./sub-common/cf216475951e5960bcea5b5b9d46933b.js");/*! For license information please see index.js.LICENSE.txt */
|
|
(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/inviteCode/index"],{"./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/inviteCode/index.tsx":function(e,t,n){var i=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),o=n("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),s=n("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),a=n("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),l=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),d=n("./node_modules/@tarojs/taro/index.js"),r=n.n(d),_=n("./node_modules/react/cjs/react.production.min.js"),u=n("./src/pages/inviteCode/index.module.scss"),c=n("./src/use/useLogin.ts"),m=n("./src/components/layoutBlock/index.tsx"),x=n("./src/common/constant.ts"),f=n("./src/components/normalButton/index.tsx"),p=n("./src/components/table/index.tsx"),h=n("./src/components/inviteCodePopup/index.tsx"),v=n("./src/api/share.ts"),j=n("./src/common/format.ts"),g=n("./src/common/report/event.ts"),b=n("./src/reducers/hooks.ts"),w=n("./src/use/useCommon.ts"),T=n("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),C=[{key:"invitee",title:"被邀请人",dataIndex:"invitee",width:"35%"},{key:"invitationWay",title:"邀请方式",dataIndex:"invitationWay",width:"30%"},{key:"inviteTime",title:"邀请时间",dataIndex:"inviteTime",width:"35%"}];t.default=function BindSalesman(){(0,c.default)(),(0,w.useBuriedDataPoint)("pages/inviteCode/index");var e=(0,_.useRef)(24),t=(0,v.GetInvitationRecordList)().fetchData,n=function(){var e=(0,a.default)((0,o.default)().mark((function _callee(){var e;return(0,o.default)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t();case 2:(e=n.sent).success&&(V((function(t){return(0,s.default)((0,s.default)({},t),{},{dataSource:{list:e.data.list.map((function(e,t){return{key:t,invitationWay:e.invitation_way_name||"--",invitee:e.passive_invited_user_name||"--",inviteTime:(0,j.formatDateTime)(e.invitation_time,"YYYY-MM-DD")||"--"}})),total:e.data.list.length}})})),r().stopPullDownRefresh());case 4:case"end":return n.stop()}}),_callee)})));return function getInviteeRecord(){return e.apply(this,arguments)}}();(0,d.useReady)((function(){n()})),(0,d.usePullDownRefresh)((0,a.default)((0,o.default)().mark((function _callee2(){return(0,o.default)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:n();case 1:case"end":return e.stop()}}),_callee2)}))));var y=(0,_.useRef)(null),N=(0,b.useSelector)((function(e){return e.userInfo})),M=function(){var e=(0,a.default)((0,o.default)().mark((function _callee3(){var e;return(0,o.default)().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:null===(e=y.current)||void 0===e||e.startDrawPoster(),(0,g.YqhyyClickGeneratePoster)({trigger_time:(0,j.formatDateTime)(new Date),purchaser_name:N.adminUserInfo.user_name||"未知用户",purchaser_id:N.adminUserInfo.user_id||0});case 2:case"end":return t.stop()}}),_callee3)})));return function handleQRcodeShare(){return e.apply(this,arguments)}}(),k=(0,_.useState)({columns:C,dataSource:{list:[],total:0}}),B=(0,i.default)(k,2),S=B[0],V=B[1];return(0,T.jsxs)(l.View,{className:u.default.main,children:[(0,T.jsxs)(l.View,{className:u.default.content,children:[(0,T.jsxs)(l.View,{className:u.default.background,children:[(0,T.jsxs)(l.View,{className:u.default.left,children:[(0,T.jsxs)(l.View,{className:u.default.title,children:[(0,T.jsx)(l.Text,{className:u.default.title_text,children:"面料优选A"}),(0,T.jsx)(l.Text,{className:u.default.title_plus,children:"+"})]}),(0,T.jsx)(l.View,{className:u.default.description,children:"查看成功邀请人信息"})]}),(0,T.jsx)(l.View,{className:u.default.right,children:(0,T.jsx)(l.View,{className:u.default.iconContainer,children:(0,T.jsx)(l.Image,{className:u.default.icon,src:(0,x.getCDNSource)("/user/inviteCode.png"),mode:"widthFix"})})})]}),(0,T.jsx)(l.View,{className:u.default.inviteCodeContent,children:(0,T.jsxs)(m.default,{circle:!0,customStyle:{paddingTop:"10px",paddingBottom:"10px"},children:[(0,T.jsxs)(l.View,{className:u.default.inviteListTitle,children:[(0,T.jsx)(l.View,{className:u.default.titleIconLeft}),(0,T.jsx)(l.Text,{className:u.default.listTitle,children:"成功邀请"}),(0,T.jsx)(l.View,{className:u.default.titleIconRight})]}),(0,T.jsx)(l.View,{className:u.default.inviteList,children:(0,T.jsx)(p.default,{columns:S.columns,emptyText:"暂无邀请信息",safeAreaInsetBottom:!1,dataSource:S.dataSource,onLoadMore:function handleLoadMore(){e.current+=24}})})]})})]}),(0,T.jsx)(l.View,{className:u.default.bottomBar,children:(0,T.jsx)(f.default,{type:"primary",round:!0,customTextClassName:u.default.bottomBar__text,customStyles:{width:"100%"},onClick:M,children:"生成邀请海报"})}),(0,T.jsx)(h.default,{ref:y})]})}},"./src/components/LoadMore/index.tsx":function(e,t,n){var i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),o=n("./src/components/iconfont/iconfont.tsx"),s=n("./src/components/loadingCard/index.tsx"),a=n("./src/components/LoadMore/index.module.scss"),l=n("./node_modules/react/cjs/react-jsx-runtime.production.min.js");t.default=function LoadMore(e){var t=e.status,n=e.moreText,d=void 0===n?"查看更多":n,r=e.loadingText,_=void 0===r?"加载中":r,u=e.noMoreText,c=void 0===u?"没有更多":u,m=e.emptyText,x=void 0===m?"暂无数据":m,f=e.onClick,p=null;return p="loading"===t?(0,l.jsx)(s.default,{title:_}):"more"===t?(0,l.jsxs)(i.View,{className:"flex-row",onClick:function handleShowMore(){f&&f()},children:[(0,l.jsx)(i.Text,{style:{marginRight:"5px"},children:d}),(0,l.jsx)(o.default,{name:"icon-zhankai",size:32})]}):"empty"===t?(0,l.jsx)(i.View,{className:a.default.empty,children:(0,l.jsx)(i.Text,{children:x})}):(0,l.jsx)(i.Text,{children:c}),(0,l.jsx)(i.View,{className:a.default.loadMore,children:p})}},"./src/components/table/index.tsx":function(e,t,n){var i=n("./node_modules/@babel/runtime/helpers/esm/typeof.js"),o=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),s=n("./node_modules/classnames/index.js"),a=n.n(s),l=n("./node_modules/react/cjs/react.production.min.js"),d=n("./src/components/infiniteScroll/index.tsx"),r=n("./src/components/LoadMore/index.tsx"),_=n("./src/components/table/index.module.scss"),u=n("./node_modules/react/cjs/react-jsx-runtime.production.min.js");t.default=function Table(e){var t=e.columns,n=e.dataSource,s=e.onLoadMore,c=(e.height,e.moreText),m=void 0===c?"查看更多":c,x=e.loadingText,f=void 0===x?"加载中":x,p=e.noMoreText,h=void 0===p?"没有更多了":p,v=e.emptyText,j=void 0===v?"暂无数据":v,g=e.safeAreaInsetBottom,b=void 0===g||g,w=function handleShowMore(){s&&s()},T=(0,l.useCallback)((function(e){var t={};("boolean"==typeof e.ellipsis&&e.ellipsis&&(t[_.default.ellipsis_1]=!0),"object"===(0,i.default)(e.ellipsis)&&e.ellipsis.isEllipsis)&&(2===e.ellipsis.rows?t[_.default.ellipsis_2]=!0:t[_.default.ellipsis_1]=!0);return t}),[]),C=(0,l.useMemo)((function(){return n?0===n.list.length&&n.list.length===n.total?(0,u.jsx)(r.default,{emptyText:j,status:"empty"}):n.list.length<n.total?(0,u.jsx)(r.default,{moreText:m,status:"more",onClick:w}):n.list.length>=n.total?(0,u.jsx)(r.default,{noMoreText:h,status:"noMore"}):void 0:(0,u.jsx)(r.default,{moreText:m,loadingText:f,noMoreText:h,status:"loading"})}),[n]);return(0,u.jsxs)(o.View,{className:_.default.table,children:[(0,u.jsx)(o.View,{className:a()(_.default.tr,_.default["bg-header"]),children:t.map((function(e){return(0,u.jsx)(o.View,{className:_.default.th,style:{width:e.width},children:e.title},e.key)}))}),(0,u.jsx)(d.default,{enableLoadMoreStatus:!1,safeAreaInsetBottom:b,children:function sourceContainer(){var e;return(0,u.jsxs)(u.Fragment,{children:[!(null==n||null===(e=n.list)||void 0===e||!e.length)&&n.list.map((function(e){return(0,u.jsx)(o.View,{className:a()(_.default.tr,_.default["bg-line"]),children:t.map((function(t,n){return t.render?(0,u.jsx)(o.View,{className:_.default.td,style:{width:t.width},children:t.render(e[t.dataIndex])},n):(0,u.jsx)(o.View,{className:a()(_.default.td,T(t)),style:{width:t.width},children:e[t.dataIndex]},n)}))},e.key)})),C]})}()})]})}},"./src/pages/inviteCode/index.tsx":function(e,t,n){var i=n("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),o=n("./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/inviteCode/index.tsx");o.default.enableShareAppMessage=!0;Page((0,i.createPageConfig)(o.default,"pages/inviteCode/index",{root:{cn:[]}},{navigationBarTitleText:"邀请朋友",navigationBarTextStyle:"black",navigationBarBackgroundColor:"#E4EEFD",backgroundColor:"#E4EEFD",enablePullDownRefresh:!0,enableShareAppMessage:!0,backgroundColorTop:"#E4EEFD"}||{})),o.default},"./src/components/LoadMore/index.module.scss":function(e,t){t.default={common_safe_area_y:"index-module__common_safe_area_y___OZdf3",hoverClass:"index-module__hoverClass___uZo_T","full-100":"index-module__full-100___BvFoK",loadMore:"index-module__loadMore___JUxfJ",empty:"index-module__empty___LOb5Q"}},"./src/components/table/index.module.scss":function(e,t){t.default={common_safe_area_y:"index-module__common_safe_area_y___etfKd",hoverClass:"index-module__hoverClass___r6X6V","full-100":"index-module__full-100___dXw4g",table:"index-module__table___WxTkF",tr:"index-module__tr___JG1hE",td:"index-module__td___VIj4a",th:"index-module__th___LZBrN","bg-line":"index-module__bg-line___DrW3I","bg-header":"index-module__bg-header___s_HqH",ellipsis_1:"index-module__ellipsis_1___YYHiG",ellipsis_2:"index-module__ellipsis_2___k8lCV"}},"./src/pages/inviteCode/index.module.scss":function(e,t){t.default={common_safe_area_y:"index-module__common_safe_area_y___sl5GO",hoverClass:"index-module__hoverClass___Zk50P","full-100":"index-module__full-100___YScAN",main:"index-module__main___wZfpa",content:"index-module__content___twyWc",background:"index-module__background___Y3any",left:"index-module__left___Sxptt",title:"index-module__title___iLZoU",title_text:"index-module__title_text___NqT2n",title_plus:"index-module__title_plus___lmx2t",description:"index-module__description___zMEBS",right:"index-module__right___Imomb",iconContainer:"index-module__iconContainer___B2oFp",icon:"index-module__icon___LRgzx",inviteCodeContent:"index-module__inviteCodeContent___CBJAM",codeBar:"index-module__codeBar___Wf8_v",inviteCodeBar:"index-module__inviteCodeBar___E0XVF",invite:"index-module__invite___aSRHM",codeTitle:"index-module__codeTitle___Wvrhu",inviteCord:"index-module__inviteCord___9U0UC",noop:"index-module__noop___TsSrp",inviteCordTitle:"index-module__inviteCordTitle___TYgTo",titleText:"index-module__titleText___FTZoK",inviteCordMore:"index-module__inviteCordMore___wsnyS",tips:"index-module__tips___Ms22B",inviteListTitle:"index-module__inviteListTitle___HHN1q",listTitle:"index-module__listTitle___WzPIg",titleIconLeft:"index-module__titleIconLeft___cZFdu",titleIconRight:"index-module__titleIconRight___JMTXc",bottomBar:"index-module__bottomBar___B7QVy",bottomBar__text:"index-module__bottomBar__text___gpIYU",codePreview:"index-module__codePreview___yqzNd",imageContainer:"index-module__imageContainer___BNg7I",image:"index-module__image___y5oen",previewTips:"index-module__previewTips___KvTOj"}}},function(e){e.O(0,["pages/inviteCode/sub-vendors","sub-common/f7c2016e1fc8045300ee51e652beb947","sub-common/db6cc8fba2c34d36042a60bcf5f10485","sub-common/510d0e7078f44d770a0720344fb06369","sub-common/0762d0d2445fe1200cae192cedb39f4b","sub-common/31c2143408a2e4f5735ccb6e07aa07fc","sub-common/cf216475951e5960bcea5b5b9d46933b","taro","vendors","common"],(function(){return t="./src/pages/inviteCode/index.tsx",e(e.s=t);var t}));e.O()}]); |