1 line
9.3 KiB
JavaScript
1 line
9.3 KiB
JavaScript
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[2932],{6052:function(e,n,i){var a=i(2180),o=i(3433),r=i(9439),t=i(4165),c=i(5861),s=i(1515),l=i(2954),u=i.n(l),d=i(7294),_=i(5998),m=i.p+"styles/image/defaultAvatar.png",x={common_safe_area_y:"index-module__common_safe_area_y___RJ72a","flex-col":"index-module__flex-col___j0SaS","flex-row":"index-module__flex-row___G67Mr","justify-between":"index-module__justify-between___o2ZdQ","justify-center":"index-module__justify-center___Zt5wG","items-center":"index-module__items-center___DpkKW","flex-item":"index-module__flex-item___NDlL_","full-100":"index-module__full-100___bfZjV","color-blue":"index-module__color-blue___e4CVh","color-yellow":"index-module__color-yellow___XKo9l","color-green":"index-module__color-green___qhsPZ","color-grey":"index-module__color-grey___lse1m","color-white":"index-module__color-white___ZTn6m","s-w":"index-module__s-w___KV7Ja","s-e":"index-module__s-e___VYYc1",filter:"index-module__filter___Csfqr",main:"index-module__main___b7kFd",userAvatar:"index-module__userAvatar___Hg8CS","userAvatar-text":"index-module__userAvatar-text___nUiCr",topBar:"index-module__topBar___gX3V5",middle:"index-module__middle___NZx_i",bottomBar:"index-module__bottomBar___himLl",username:"index-module__username___e9MeR",userno:"index-module__userno___n1UtZ",flexBox:"index-module__flexBox___L1NK6",userTitle:"index-module__userTitle___KpPma",receiveBox:"index-module__receiveBox___gV7YU","grid-container":"index-module__grid-container___lDgpL",layoutTabBar:"index-module__layoutTabBar___UFcnO",layoutTitle:"index-module__layoutTitle___GYRTo",layoutDescription:"index-module__layoutDescription___g44Jf"},p=i(1115),g=i(8932),h=i(4119),f=i(9742),j=i(9579),v=i(2128),y=i(8260),N=i(3297),k=i(3929),Z=i(2495),b=i(5807),C=i(9498),w=i(5893),G=function UserAvatar(e){var n=e.src;return(0,w.jsxs)(s.G7,{className:x.userAvatar,children:[(0,w.jsx)(s.Ee,{className:"full-100",src:n||m}),n?null:(0,w.jsx)(s.xv,{className:x["userAvatar-text"],children:"编辑"})]})},T=[{id:1,iconName:"icon-pandiansaoma",name:"盘点扫码",path:"",jurisdiction:"counting_scanning_code_page"},{id:2,iconName:"icon-fahuoliebiao",name:"发货列表",path:"/pages/delivery/index",jurisdiction:"shipping_list_page"},{id:3,iconName:"icon-yaoqingma",name:"邀请码",path:"/pages/inviteCode/index",jurisdiction:"invitation_code_page"},{id:4,iconName:"icon-tihuoliebiao",name:"提货列表",path:"/pages/takeDelivery/index",jurisdiction:"picking_list_module_page"},{id:5,iconName:"icon-shouhouzhongxin",name:"退货退款",path:"/pages/refundPage/index",jurisdiction:"return_and_refund_page"},{id:6,iconName:"icon-shoukuanliebiao",name:"收款列表",path:"/pages/newCollection/index",jurisdiction:"collection_list_page"},{id:7,iconName:"icon-kehuxinxi",name:"客户列表",path:"/pages/customerManagement/index",jurisdiction:"customer_list_page"},{id:8,iconName:"icon-lingquseka",name:"领取色卡",path:"/pages/getColorCard/index",jurisdiction:"receive_color_card_page"},{id:9,iconName:"icon-jianyang",name:"领取剪样",path:"/pages/sampleCutting/index",jurisdiction:"receive_sample_cutting_page"}],S=[{id:10,iconName:"icon-yansequyang",name:"颜色取样",path:"/pages/colorRelated/takeColor/index",jurisdiction:"color_sampling_page"},{id:11,iconName:"icon-qusechazhao",name:"取色查找",path:"/pages/colorRelated/findColor/index",jurisdiction:"color_search_page"},{id:12,iconName:"icon-yangpinduibi",name:"样品对比",path:"/pages/colorRelated/sampleComparison/index",jurisdiction:"sample_comparison_page"}],B=[{id:13,iconName:"icon-xiaoshou",name:"销售",path:"/pages/saleStatistic/index",jurisdiction:"sales_page"},{id:14,iconName:"icon-dingdanyujing",name:"订单预警",path:"/pages/orderWarningAnalysis/index",jurisdiction:"order_warning_analysis_page"},{id:15,iconName:"icon-duizhang",name:"对账",path:"",jurisdiction:"reconciliation_page"},{id:16,iconName:"icon-yuncangkucun",name:"云仓库存",path:"",jurisdiction:"cloud_warehouse_inventory_page"},{id:17,iconName:"icon-qianzhicangkucun",name:"前置仓库存",path:"",jurisdiction:"front_warehouse_page"}],I=function UserInfo(){var e,n,i=(0,k.Z)(),a=i.removeToken,m=i.removeUserInfo,Z=i.userInfo,I=(0,_.I0)(),D=(0,C.Yw)().openSubscriptionMessage;console.log("userInfo==>",Z);var U=function(){var e=(0,c.Z)((0,t.Z)().mark((function _callee(e){return(0,t.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:if(console.log("item==>",e),6!==e.id){n.next=4;break}return n.next=4,D({scenes:3});case 4:if(2!==e.id){n.next=7;break}return n.next=7,D({scenes:6});case 7:if(14!==e.id){n.next=10;break}return n.next=10,D({scenes:4});case 10:(0,p.jD)(e.path,{},"navigateTo");case 11:case"end":return n.stop()}}),_callee)})));return function handleClickIconCard(n){return e.apply(this,arguments)}}(),A=(0,d.useState)([]),R=(0,r.Z)(A,2),F=R[0],z=R[1],q=(0,d.useState)([]),E=(0,r.Z)(q,2),L=E[0],M=E[1],V=(0,d.useState)([]),K=(0,r.Z)(V,2),P=K[0],J=K[1];(0,l.useDidShow)((function(){var e,n,i;e=T.filter((function(e){return(0,p.hn)(e.jurisdiction)&&e.path})),n=S.filter((function(e){return(0,p.hn)(e.jurisdiction)&&e.path})),i=B.filter((function(e){return(0,p.hn)(e.jurisdiction)&&e.path})),z((0,o.Z)(e)),M((0,o.Z)(n)),J((0,o.Z)(i))})),(0,C.F5)(g.R2.USER);var Y=function(){var e=(0,b.M)().fetchData,n=(0,k.Z)(),i=(n.setToken,n.setSessionKey),a=(n.setUserInfo,n.userInfo);return{UseGetCode:function UseGetCode(){u().login({success:function success(n){return(0,c.Z)((0,t.Z)().mark((function _callee(){var o,r;return(0,t.Z)().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:if(!(o=n.code)){t.next=14;break}return console.log("获取用户登录凭证:".concat(o)),t.next=5,e({js_code:o,user_id:a.userInfo.user_id});case 5:if(!(r=t.sent).data){t.next=11;break}i(r.data.session_key),p.Z9.none("链接成功,可开始接收服务信息啦!"),t.next=12;break;case 11:return t.abrupt("return",p.Z9.none("".concat(null==r?void 0:r.msg)));case 12:t.next=16;break;case 14:return console.log("获取用户登录态失败:".concat(n.errMsg)),t.abrupt("return",p.Z9.error("".concat(null==n?void 0:n.errMsg)));case 16:case"end":return t.stop()}}),_callee)})))()}})}}}(),O=Y.UseGetCode,X=function(){var e=(0,c.Z)((0,t.Z)().mark((function _callee2(){return(0,t.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,O();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log(e.t0,"err");case 8:case"end":return e.stop()}}),_callee2,null,[[0,5]])})));return function handReceive(){return e.apply(this,arguments)}}();return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(y.Z,{circle:!0,customStyle:{paddingTop:"10px",paddingBottom:"10px"},children:[(0,w.jsxs)(s.G7,{className:x.topBar,children:[(0,w.jsx)(s.G7,{className:x.left,children:(0,w.jsx)(G,{src:null===(e=Z.userInfo)||void 0===e?void 0:e.avatar_url})}),(0,w.jsxs)(s.G7,{className:x.middle,children:[(0,w.jsx)(s.xv,{className:x.username,children:null===(n=Z.userInfo)||void 0===n?void 0:n.user_name}),(0,w.jsx)(s.xv,{className:x.userno,children:Z.userInfo.user_code})]}),(0,w.jsx)(s.G7,{className:x.right,children:(0,w.jsx)(f.Z,{plain:!0,type:"primary",round:!0,size:"normal",onClick:function handleLogout(){a(),m(),I({type:h.g.SET_SELECTED,data:{selectedId:g.R2.INDEX}}),(0,p.jD)("/pages/login/index",{},"reLaunch")},children:"退出登录"})})]}),(0,w.jsxs)(s.G7,{className:x.bottomBar,children:[(0,w.jsx)(j.Z,{type:"primary",size:"small",circle:!0,customStyle:{padding:"8px 5px"},children:Z.userInfo.department_name}),(0,w.jsx)(v.Z,{direction:"vertical"}),(0,w.jsxs)(s.G7,{className:x.flexBox,children:[(0,w.jsx)(s.xv,{className:x.userTitle,children:Z.userInfo.duty_name}),(0,w.jsx)(s.G7,{className:x.receiveBox,onClick:function onClick(){return X()},children:"接收消息"})]})]})]}),!!F.length&&(0,w.jsxs)(y.Z,{circle:!0,children:[(0,w.jsx)(s.G7,{className:x.layoutTitle,children:"功能特色"}),(0,w.jsx)(s.G7,{className:x["grid-container"],children:F.map((function(e,n){return e.path?(0,w.jsx)(N.Z,{iconName:e.iconName,title:e.name,onClick:function onClick(){return U(e)}},n):null}))})]}),!!L.length&&(0,w.jsxs)(y.Z,{circle:!0,children:[(0,w.jsx)(s.G7,{className:x.layoutTitle,children:"布料取色"}),(0,w.jsx)(s.G7,{className:x["grid-container"],children:L.map((function(e,n){return e.path?(0,w.jsx)(N.Z,{iconName:e.iconName,title:e.name,onClick:function onClick(){return U(e)}},n):null}))})]}),!!P.length&&(0,w.jsxs)(y.Z,{circle:!0,children:[(0,w.jsx)(s.G7,{className:x.layoutTitle,children:"统计分析"}),(0,w.jsx)(s.G7,{className:x["grid-container"],children:P.map((function(e,n){return e.path?(0,w.jsx)(N.Z,{iconName:e.iconName,title:e.name,onClick:function onClick(){return U(e)}},n):null}))})]})]})},D=function User(){var e=(0,d.useState)("production"),n=(0,r.Z)(e,2),i=n[0],a=(n[1],(0,d.useState)("Version: dev 72e5569\n 2023/5/16 16:10:32")),o=(0,r.Z)(a,2),t=o[0];o[1];return(0,w.jsxs)(s.G7,{className:x.main,children:[(0,w.jsx)(I,{}),(0,w.jsx)(s.G7,{style:{fontSize:"26rpx",color:"#707070",textAlign:"center"},children:t}),"production"!==i&&(0,w.jsx)(s.G7,{style:{fontSize:"26rpx",color:"#707070",textAlign:"center"},children:Z._n})]})};Page((0,a.createPageConfig)(D,"pages/user/index",{root:{cn:[]}},{navigationBarTitleText:"我的",navigationBarTextStyle:"white",navigationBarBackgroundColor:"#4581FF",backgroundColor:"#4581FF",backgroundColorTop:"#4581FF",enablePullDownRefresh:!0}||{}))}},function(e){e.O(0,[2107,1216,8592],(function(){return n=6052,e(e.s=n);var n}));e.O()}]); |