2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
/*! For license information please see index.js.LICENSE.txt */
|
|
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/user/index"],{"./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/user/index.tsx":function(e,s,n){var i=n("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),l=n("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),a=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),t=n("./node_modules/@tarojs/taro/index.js"),o=n.n(t),d=n("./node_modules/classnames/index.js"),r=n.n(d),c=n("./node_modules/react/cjs/react.production.min.js"),u=n("./src/pages/user/index.module.scss"),m=n("./src/pages/user/components/customer/index.tsx"),x=n("./src/reducers/hooks.ts"),f=n("./src/common/common.ts"),h=n("./src/common/format.ts"),p=n("./src/api/mine.ts"),g=n("./src/use/useLogin.ts"),j=n("./src/components/iconfont/iconfont.tsx"),v=n("./src/components/svgIconfont/index.tsx"),w=n("./src/common/constant.ts"),N=n("./src/api/user.ts"),b=n("./src/components/loginAuthenticationMask/index.tsx"),V=n("./src/use/useCommon.ts"),k=n("./node_modules/react/cjs/react-jsx-runtime.production.min.js");s.default=function(){var e,s,n,d,C,y,T,I=(0,x.useSelector)((function(e){return e.userInfo})),z=(0,p.userassets)(),L=z.fetchData,D=z.state,P=(0,p.userorderStatistics)(),S=P.fetchData,F=P.state,U=(0,g.default)(),B=U.getAdminUserInfo,A=(U.getPhoneNumber,(0,N.GetCashBackInfo)()),R=A.fetchData,Z=A.state;(0,V.useBuriedDataPoint)("pages/user/index"),(0,t.useDidShow)((function(){S(),R(),B(),L()}));var M=(0,c.useState)(!1),E=(0,a.default)(M,2),J=E[0],K=E[1],Q=(0,c.useMemo)((function(){var e;return console.log("priceState::",D.data),[{label:"货款余额(元)",value:(0,h.formatPriceDiv)((null==D||null===(e=D.data)||void 0===e?void 0:e.wallet_money)||0,100,!0),url:"/pages/depositBeforehand/index"},{label:"账期授信(元)",value:(0,h.formatPriceDiv)((null==D?void 0:D.data.credit_line)||0,100,!0),url:"/pages/creditLine/index"}]}),[D]),W=(0,c.useMemo)((function(){var e,s,n,i,l,a,_,t,o,d;return[{label:"待配布",icon:"icon-daipeibu2",url:"/pages/order/orderList/index?status=0",number:(null==F||null===(e=F.data)||void 0===e?void 0:e.wait_match)>99?"99+":null==F||null===(s=F.data)||void 0===s?void 0:s.wait_match},{label:"待付款",icon:"icon-daifukuan2",url:"/pages/order/orderList/index?status=1",number:(null==F||null===(n=F.data)||void 0===n?void 0:n.wait_pay)>99?"99+":null==F||null===(i=F.data)||void 0===i?void 0:i.wait_pay},{label:"待发货",icon:"icon-daifahuo2",url:"/pages/order/orderList/index?status=2",number:(null==F||null===(l=F.data)||void 0===l?void 0:l.wait_shipped)>99?"99+":null==F||null===(a=F.data)||void 0===a?void 0:a.wait_shipped},{label:"待收货",icon:"icon-daishouhuo2",url:"/pages/order/orderList/index?status=3",number:(null==F||null===(_=F.data)||void 0===_?void 0:_.already_shipped)>99?"99+":null==F||null===(t=F.data)||void 0===t?void 0:t.already_shipped},{label:"退款/售后",icon:"icon-tuikuan-shouhou",url:"/pages/salesAfter/salesAfterList/index",number:(null==F||null===(o=F.data)||void 0===o?void 0:o.after_return)>99?"99+":null==F||null===(d=F.data)||void 0===d?void 0:d.after_return}]}),[F]),X=[{label:"地址管理",icon:"icon-dizhiguanli",callback:function callback(){return(0,f.goLink)("/pages/addressManager/index")}},{label:"色卡剪样",icon:"icon-sekajianyanglingqu",callback:function callback(){return(0,f.goLink)("/pages/colorCardClipping/index")}},{label:"我的客服",icon:"icon-wodekefu",text:"7x24小时服务",callback:function callback(){return K(!0)}}];(0,t.usePullDownRefresh)((0,l.default)((0,i.default)().mark((function _callee2(){return(0,i.default)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S();case 2:return e.next=4,B();case 4:return e.next=6,L();case 6:o().stopPullDownRefresh();case 7:case"end":return e.stop()}}),_callee2)}))));var q=(0,c.useState)("development"),G=(0,a.default)(q,2),H=G[0],Y=(G[1],(0,c.useState)("Version: dev 455d0b9\n 2023/5/11 15:05:26")),O=(0,a.default)(Y,2),$=O[0];O[1];return(0,k.jsxs)(_.View,{className:u.default.user_main,children:[(0,k.jsx)(b.default,{}),(0,k.jsxs)(_.View,{className:u.default.user_main__header,children:[(0,k.jsxs)(_.View,{className:u.default.user_main__header_con,children:[(0,k.jsxs)(_.View,{className:u.default.header_img_name,children:[(0,k.jsx)(_.View,{className:u.default.header_img,children:(0,k.jsx)(_.Image,{className:u.default.header_img_src,mode:"aspectFill",src:"".concat(null==I||null===(e=I.adminUserInfo)||void 0===e?void 0:e.avatar_url)})}),(0,k.jsxs)(_.View,{className:u.default.header_name,children:[(0,k.jsxs)(_.View,{className:u.default.header_user,children:[(0,k.jsx)(_.Text,{className:u.default.header_user_name,children:null!=I&&null!==(s=I.adminUserInfo)&&void 0!==s&&s.phone?null==I||null===(n=I.adminUserInfo)||void 0===n?void 0:n.company_name:"点击登录"}),(null==I||null===(d=I.adminUserInfo)||void 0===d?void 0:d.is_bd)&&(0,k.jsx)(_.View,{className:u.default.header_user_label,children:(0,k.jsx)(_.Image,{className:u.default.BD_label,mode:"aspectFill",src:(0,w.getCDNSource)("/mall/BD_label.png")})})]}),(0,k.jsx)(_.View,{className:u.default["arcd-info-left-phone"],children:(0,k.jsxs)(_.View,{className:u.default.header_title,children:[" ",(null==I||null===(C=I.adminUserInfo)||void 0===C?void 0:C.phone)||"Hi,欢迎来到商城"]})})]}),(0,k.jsx)(_.View,{className:u.default.header_setting,onClick:function onClick(){return(0,f.goLink)("/pages/userEdit/index")},children:(0,k.jsx)(j.default,{name:"icon-shezhi",size:50})})]}),(0,k.jsxs)(_.View,{className:u.default.header_count,children:[(0,k.jsxs)(_.View,{className:u.default.header_count__item,onClick:function onClick(){return(0,f.goLink)("/pages/collection/index")},children:[(0,k.jsx)(j.default,{name:"icon-shoucangshangpin",size:50}),(0,k.jsx)(_.Text,{children:"商品收藏"})]}),(0,k.jsxs)(_.View,{className:u.default.header_count__item,onClick:function integral(){(0,f.goLink)("/pages/sampleComparison/index")},children:[(0,k.jsx)(j.default,{name:"icon-yanseduibi1",size:50}),(0,k.jsx)(_.Text,{children:"颜色对比"})]}),(0,k.jsxs)(_.View,{className:u.default.header_count__item,onClick:function handleClickInviteFriends(){var e;null!=I&&null!==(e=I.adminUserInfo)&&void 0!==e&&e.is_bd?(0,f.goLink)("/pages/inviteCode/inviteFriends/index"):(0,f.goLink)("/pages/inviteCode/index")},children:[(0,k.jsx)(j.default,{name:"icon-erweima",size:50}),(0,k.jsx)(_.Text,{children:"邀请好友"})]})]}),(0,k.jsx)(_.Image,{className:u.default.header_bg,src:(0,h.formatImgUrl)("/mall/user_header_bg.png",""),mode:"aspectFit"})]}),3==(null==I||null===(y=I.adminUserInfo)||void 0===y?void 0:y.order_access_status)&&(0,k.jsx)(_.View,{className:u.default.price_count,children:(0,k.jsxs)(_.View,{className:u.default.price_count_list,children:[null==Q?void 0:Q.map((function(e,s){return(0,k.jsxs)(_.View,{className:u.default.list_item,onClick:function onClick(){return(0,f.goLink)(e.url)},children:[(0,k.jsx)(_.Text,{className:u.default.list_item_title,children:e.label}),(0,k.jsxs)(_.View,{className:u.default.list_item_number,children:[(0,k.jsx)(_.Text,{children:"¥"})," ",e.value]})]},s)})),(0,k.jsx)(_.Image,{className:u.default.price_bg,src:(0,h.formatImgUrl)("/mall/price_bg.png",""),mode:"aspectFit"})]})})]}),(0,k.jsxs)(_.View,{className:u.default.order_count,children:[(0,k.jsxs)(_.View,{className:u.default.order_count__title,children:[(0,k.jsx)(_.Text,{className:u.default.title_text,children:"我的订单"}),(0,k.jsxs)(_.View,{className:u.default.title__more,onClick:function onClick(){return(0,f.goLink)("/pages/order/orderList/index")},children:[(0,k.jsx)(_.Text,{children:"全部订单"}),(0,k.jsx)(_.View,{className:u.default.title_more_icon,children:(0,k.jsx)(j.default,{name:"icon-xiala",size:35})})]})]}),(0,k.jsx)(_.View,{className:u.default.order_count__list,children:null==W?void 0:W.map((function(e,s){return(0,k.jsxs)(_.View,{className:u.default.order_count__item,onClick:function onClick(){return(0,f.goLink)(e.url)},children:[(0,k.jsx)(j.default,{name:e.icon,size:70}),(0,k.jsx)(_.Text,{className:u.default.item_img,children:e.label}),!!e.number&&(0,k.jsx)(_.Text,{className:u.default.order_number,children:e.number})]},s)}))})]}),!(null!=I&&null!==(T=I.adminUserInfo)&&void 0!==T&&T.is_bd)&&(0,k.jsxs)(_.View,{className:r()(u.default.nav_list,u.default.earnings_list),children:[(0,k.jsx)(_.View,{className:u.default.nav_list__title,children:(0,k.jsx)(_.Text,{className:u.default.title_text,children:"下单返现活动"})}),(0,k.jsxs)(_.View,{className:u.default.earnings_con,children:[(0,k.jsxs)(_.View,{className:u.default.earnings_price,children:[(0,k.jsx)(_.Text,{className:u.default.earnings_title,children:"活动返现收益(元)"}),(0,k.jsxs)(_.View,{className:u.default.earnings_total,children:[(0,k.jsx)(_.Text,{children:"¥"})," ",(0,k.jsx)(_.Text,{className:u.default.all_earnings,children:(0,h.formatPriceDiv)(Z.data.total_income,100,!0)})," ",(0,k.jsxs)(_.View,{className:u.default.today_earnings,children:["昨日收益 ",(0,h.formatPriceDiv)(Z.data.today_income,100,!0)]})]})]}),(0,k.jsxs)(_.View,{className:u.default.more,onClick:function onClick(){return(0,f.goLink)("/pages/activityIncome/index")},children:[(0,k.jsx)(_.Text,{children:"查看收益"}),(0,k.jsx)(j.default,{name:"icon-rukou",size:30})]})]})]}),(0,k.jsxs)(_.View,{className:u.default.nav_list,children:[(0,k.jsx)(_.View,{className:u.default.nav_list__title,children:(0,k.jsx)(_.Text,{className:u.default.title_text,children:"我的服务"})}),(0,k.jsx)(_.View,{className:u.default.list_con,children:X.map((function(e,s){return(0,k.jsxs)(_.View,{className:u.default.list_item,onClick:null==e?void 0:e.callback,children:["local"!=e.icon_status?(0,k.jsx)(j.default,{name:e.icon,size:70}):(0,k.jsx)(v.default,{name:e.icon,style:{fontSize:"70rpx"}}),(0,k.jsxs)(_.View,{className:u.default.list_item_con,children:[(0,k.jsx)(_.Text,{children:e.label}),(0,k.jsxs)(_.View,{className:u.default.title_more_kf,children:[(0,k.jsx)(_.Text,{children:e.text}),(0,k.jsx)(_.View,{className:u.default.title_more_icon,children:(0,k.jsx)(j.default,{name:"icon-xiala",size:40})})]})]})]},s)}))})]}),(0,k.jsxs)(_.View,{className:u.default.bottom_version,children:["production"!==H&&(0,k.jsx)(_.View,{children:$}),"production"!==H&&(0,k.jsx)(_.View,{children:w.BASE_URL})]}),(0,k.jsx)(m.default,{show:J,onClose:function customerClose(){K(!1)}})]})}},"./src/components/svgIconfont/index.tsx":function(e,s,n){var i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),l=n("./node_modules/classnames/index.js"),a=n.n(l),_=n("./src/components/svgIconfont/index.module.scss"),t=n("./node_modules/react/cjs/react-jsx-runtime.production.min.js");s.default=function SvgIcon(e){var s=e.name,n=void 0===s?"":s,l=e.style;return(0,t.jsxs)(i.View,{className:a()(_.default.svg,"".concat(n)),style:l,children:[(0,t.jsx)(i.View,{className:"path1",style:l}),(0,t.jsx)(i.View,{className:"path2",style:l}),(0,t.jsx)(i.View,{className:"path3",style:l}),(0,t.jsx)(i.View,{className:"path4",style:l}),(0,t.jsx)(i.View,{className:"path5",style:l}),(0,t.jsx)(i.View,{className:"path6",style:l}),(0,t.jsx)(i.View,{className:"path7",style:l}),(0,t.jsx)(i.View,{className:"path8",style:l}),(0,t.jsx)(i.View,{className:"path9",style:l})]})}},"./src/pages/user/components/customer/index.tsx":function(e,s,n){var i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),l=n("./node_modules/@tarojs/taro/index.js"),a=n.n(l),_=n("./src/pages/user/components/customer/index.module.scss"),t=n("./src/components/iconfont/iconfont.tsx"),o=n("./src/components/popup/index.tsx"),d=n("./src/reducers/hooks.ts"),r=n("./src/common/common.ts"),c=n("./node_modules/react/cjs/react-jsx-runtime.production.min.js");s.default=function(e){var s,n,l=(0,d.useSelector)((function(e){return e.userInfo}));return(0,c.jsx)(o.default,{show:e.show,showTitle:!1,onClose:function onClose(){var s;null===(s=e.onClose)||void 0===s||s.call(e)},children:(0,c.jsxs)(i.View,{className:_.default.customer_service_list,children:[(0,c.jsx)(i.View,{className:_.default.customer_service_title,children:(0,c.jsx)(i.Text,{children:"请选择您要的服务"})}),(0,c.jsxs)(i.View,{className:_.default.customer_service_con,children:[(0,c.jsxs)(i.View,{className:_.default.customer_service_item,children:[(0,c.jsx)(t.default,{name:"icon-guanfangweixinkefu",size:60}),(0,c.jsxs)(i.View,{className:_.default.customer_service_item_con,children:[(0,c.jsx)(i.Text,{children:"在线官方客服"}),(0,c.jsx)(i.Text,{children:"竭诚为您服务!"})]}),(0,c.jsx)(i.View,{className:_.default.customer_service_item_icon,children:(0,c.jsx)(t.default,{name:"icon-xiala",size:40})}),(0,c.jsx)(i.Button,{openType:"contact",className:_.default.customer})]}),!(null==l||null===(s=l.adminUserInfo)||void 0===s||!s.sale_user_phone)&&(0,c.jsxs)(i.View,{onClick:function makePhoneCall(){var e,s;if(null==l||null===(e=l.adminUserInfo)||void 0===e||!e.sale_user_phone)return r.alert.error("手机号不能为空");a().makePhoneCall({phoneNumber:null==l||null===(s=l.adminUserInfo)||void 0===s?void 0:s.sale_user_phone})},className:_.default.customer_service_item,children:[(0,c.jsx)(t.default,{name:"icon-bodakehujingli",size:60}),(0,c.jsxs)(i.View,{className:_.default.customer_service_item_con,children:[(0,c.jsx)(i.Text,{children:"客户经理"}),(0,c.jsxs)(i.Text,{children:["点击拨打",null==l||null===(n=l.adminUserInfo)||void 0===n?void 0:n.sale_user_phone]})]}),(0,c.jsx)(i.View,{className:_.default.customer_service_item_icon,children:(0,c.jsx)(t.default,{name:"icon-xiala",size:40})})]})]})]})})}},"./src/pages/user/index.tsx":function(e,s,n){var i=n("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),l=n("./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/user/index.tsx");l.default.enableShareAppMessage=!0;Page((0,i.createPageConfig)(l.default,"pages/user/index",{root:{cn:[]}},{navigationBarTitleText:"",navigationBarBackgroundColor:"#EFF3FF",backgroundColorTop:"#EFF3FF",enablePullDownRefresh:!0,enableShareAppMessage:!0}||{})),l.default},"./src/components/svgIconfont/index.module.scss":function(e,s){s.default={common_safe_area_y:"index-module__common_safe_area_y___krf2Z",hoverClass:"index-module__hoverClass___tF629","full-100":"index-module__full-100___eiNaZ",svg:"index-module__svg___jhTt2"}},"./src/pages/user/components/customer/index.module.scss":function(e,s){s.default={common_safe_area_y:"index-module__common_safe_area_y___mgUhw",hoverClass:"index-module__hoverClass___clZ_x","full-100":"index-module__full-100___dTqZC",customer_service_list:"index-module__customer_service_list___dIyL8",customer_service_title:"index-module__customer_service_title___mdVWv",customer_service_con:"index-module__customer_service_con___laF10",customer_service_item:"index-module__customer_service_item___YwNnP",customer_service_item_con:"index-module__customer_service_item_con___gfxG3",customer_service_item_icon:"index-module__customer_service_item_icon___z1_MZ"}},"./src/pages/user/index.module.scss":function(e,s){s.default={common_safe_area_y:"index-module__common_safe_area_y___RJ72a",hoverClass:"index-module__hoverClass___CWfHm","full-100":"index-module__full-100___bfZjV",user_main:"index-module__user_main___al0yy",getPhoneButton:"index-module__getPhoneButton___ZbJF3",user_main__header:"index-module__user_main__header___ghiXx",user_main__header_con:"index-module__user_main__header_con___HawGo",header_bg:"index-module__header_bg___t_nSX",header_img_name:"index-module__header_img_name___sTjbc",header_img:"index-module__header_img___A5o4L",header_img_src:"index-module__header_img_src___HNX3D",header_name:"index-module__header_name____KpRw",header_user:"index-module__header_user___KyNN0",header_user_label:"index-module__header_user_label___gtCUp",BD_label:"index-module__BD_label___lMwUL",header_user_name:"index-module__header_user_name___ckAXe","arcd-info-left-phone":"index-module__arcd-info-left-phone___tbrgI",header_title:"index-module__header_title___mcfyo",header_picture:"index-module__header_picture___a2IsE",icon_renzhengchenggong:"index-module__icon_renzhengchenggong___poR_Z",header_picture_name:"index-module__header_picture_name___YY4xR",header_setting:"index-module__header_setting___zlZCA",header_count:"index-module__header_count___ryS0x",header_count__item:"index-module__header_count__item___qQVJb",price_count:"index-module__price_count___K4KwK",price_bg:"index-module__price_bg___PIdz_",price_count_list:"index-module__price_count_list___fT9N_",list_item:"index-module__list_item___X5NP2",list_item_title:"index-module__list_item_title___WNzcX",list_item_number:"index-module__list_item_number___b9lh1",order_count:"index-module__order_count___kXdVz",order_count__title:"index-module__order_count__title___T77Cw",title_text:"index-module__title_text___tcPKv",title__more:"index-module__title__more___mEt7z",title_more_icon:"index-module__title_more_icon___acEQh",order_count__list:"index-module__order_count__list___sqiKD",order_count__item:"index-module__order_count__item___MNs7F",order_number:"index-module__order_number___SWRd7",nav_list:"index-module__nav_list___f5VYe",nav_list__title:"index-module__nav_list__title___PnQHT",list_con:"index-module__list_con___nq3Yp",list_item_con:"index-module__list_item_con___DQblN",customer:"index-module__customer___WHwWt",title_more_kf:"index-module__title_more_kf___SaPGq",bottom_version:"index-module__bottom_version___u567U",earnings_list:"index-module__earnings_list___u4lJQ",earnings_con:"index-module__earnings_con___J9WRZ",earnings_price:"index-module__earnings_price___N5S1k",earnings_title:"index-module__earnings_title___b60kf",earnings_total:"index-module__earnings_total___DjQFF",all_earnings:"index-module__all_earnings___TcyQg",today_earnings:"index-module__today_earnings___BGANB",more:"index-module__more___mTlZI"}}},function(e){e.O(0,["taro","vendors","common"],(function(){return s="./src/pages/user/index.tsx",e(e.s=s);var s}));e.O()}]); |