🎈 perf(按钮): 优化normalButton组件

This commit is contained in:
xuan 2022-09-28 15:23:32 +08:00
parent 4f09a902ac
commit d00604b3f0
50 changed files with 610 additions and 150 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"pages":["pages/index/index","pages/order/index","pages/shopping/index","pages/user/index","pages/login/index"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black","backgroundColor":"#ffffff"},"tabBar":{"custom":true,"list":[{"pagePath":"pages/index/index","text":"首页"},{"pagePath":"pages/shopping/index","text":"购物"},{"pagePath":"pages/order/index","text":"订单"},{"pagePath":"pages/user/index","text":"我的"}],"color":"#707070","selectedColor":"#2680EB","backgroundColor":"#fff","borderStyle":"white"},"usingComponents":{"custom-wrapper":"/custom-wrapper"},"subPackages":[{"root":"pages/delivery","pages":["index"]},{"root":"pages/deliveryDetail","pages":["index"]},{"root":"pages/colorRelated","pages":["sampleComparison/index","takeColor/index","findColor/index"]},{"root":"pages/addAddress","pages":["index"]},{"root":"pages/addressManager","pages":["index"]},{"root":"pages/customerPage","pages":["index"]},{"root":"pages/orderDetails","pages":["index"]},{"root":"pages/saleuserPage","pages":["index"]},{"root":"pages/searchPage","pages":["index"]},{"root":"pages/submitOrder","pages":["index"]},{"root":"pages/refundPage","pages":["index"]},{"root":"pages/refundDetail","pages":["index"]},{"root":"pages/refundMoneyDetail","pages":["index"]}]} {"pages":["pages/index/index","pages/order/index","pages/shopping/index","pages/user/index","pages/login/index"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black","backgroundColor":"#ffffff"},"tabBar":{"custom":true,"list":[{"pagePath":"pages/index/index","text":"首页"},{"pagePath":"pages/shopping/index","text":"购物"},{"pagePath":"pages/order/index","text":"订单"},{"pagePath":"pages/user/index","text":"我的"}],"color":"#707070","selectedColor":"#2680EB","backgroundColor":"#fff","borderStyle":"white"},"usingComponents":{"custom-wrapper":"/custom-wrapper"},"subPackages":[{"root":"pages/takeDelivery","pages":["index"]},{"root":"pages/takeDeliveryDetail","pages":["index"]},{"root":"pages/delivery","pages":["index"]},{"root":"pages/deliveryDetail","pages":["index"]},{"root":"pages/colorRelated","pages":["sampleComparison/index","takeColor/index","findColor/index"]},{"root":"pages/addAddress","pages":["index"]},{"root":"pages/addressManager","pages":["index"]},{"root":"pages/customerPage","pages":["index"]},{"root":"pages/orderDetails","pages":["index"]},{"root":"pages/saleuserPage","pages":["index"]},{"root":"pages/searchPage","pages":["index"]},{"root":"pages/submitOrder","pages":["index"]},{"root":"pages/refundPage","pages":["index"]},{"root":"pages/refundDetail","pages":["index"]},{"root":"pages/refundMoneyDetail","pages":["index"]},{"root":"pages/applyGoods","pages":["index"]},{"root":"pages/applyMoney","pages":["index"]},{"root":"pages/newCollection","pages":["index"]},{"root":"pages/addCollection","pages":["index"]},{"root":"pages/accountPage","pages":["index"]},{"root":"pages/collectionDetail","pages":["index"]}]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";require("./sub-common/dde3895fab754ea605d2697ad6817a2a.js");(wx.webpackJsonp=wx.webpackJsonp||[]).push([[5052],{4555:function(e,s,a){var r=a(9975),n=a(885),t=a(4165),d=a(5861),i=a(1515),c=a(9792),l=a(2185),o=a(2535),u=a.n(o),h=a(1251),p=a(5513),f=(0,c.memo)((function(e){var s,a,r,f,m=e.addButtonEnabled,v=void 0===m||m,x=e.focusBorderEnabled,g=void 0!==x&&x,_=(0,l.hE)(),j=_.fetchData,b=_.state,N=function(){var s=(0,d.Z)((0,t.Z)().mark((function _callee(){var s,a;return(0,t.Z)().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,j({purchaser_id:e.purchaser_id});case 2:s=r.sent,e.id?R(e.id):null===(a=s.data.list)||void 0===a||a.every((function(e){return!e.is_default||(R(e.id),!1)}));case 4:case"end":return r.stop()}}),_callee)})));return function getData(){return s.apply(this,arguments)}}();(0,o.useDidShow)((function(){return N(),u().eventCenter.on("addressList:refresh",N),function(){u().eventCenter.off("addressList:refresh",N)}}));var w=(0,c.useState)(!1),k=(0,n.Z)(w,2),Z=k[0],C=k[1],G=function(){var e=(0,d.Z)((0,t.Z)().mark((function _callee2(){return(0,t.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),e.next=3,N();case 3:C(!1);case 4:case"end":return e.stop()}}),_callee2)})));return function handleRefresh(){return e.apply(this,arguments)}}(),S=(Array.from({length:15}),(0,c.useState)()),y=(0,n.Z)(S,2),E=y[0],R=y[1],A=(0,o.useRouter)(),L=(0,c.useState)({}),T=(0,n.Z)(L,2),B=(T[0],T[1],(0,h.ER)().fetchData),D=function(){var s=(0,d.Z)((0,t.Z)().mark((function _callee3(s,a){var r;return(0,t.Z)().wrap((function _callee3$(n){for(;;)switch(n.prev=n.next){case 0:if(!A.params.orderId){n.next=6;break}return u().showLoading({title:"请稍等...",mask:!0}),n.next=4,B({address_id:s.id,id:Number(A.params.orderId),shipment_mode:2});case 4:"success"===(r=n.sent).msg?(u().hideLoading(),u().showToast({title:"成功",icon:"success"}),u().navigateBack({delta:1})):(u().hideLoading(),u().showToast({title:r.msg,icon:"error"}));case 6:e.onSelect&&e.onSelect(s,a),g&&R(null==s?void 0:s.id);case 8:case"end":return n.stop()}}),_callee3)})));return function handleSelect(e,a){return s.apply(this,arguments)}}();return(0,p.jsxs)(i.G7,{className:"address-scroll-view",children:[(0,p.jsx)(i.pf,{scrollY:!0,refresherEnabled:e.refresherEnabled,enhanced:!0,refresherTriggered:Z,onRefresherRefresh:G,children:(0,p.jsx)(i.G7,{className:"address-scroll-view-content",children:(null==b||null===(s=b.data)||void 0===s||null===(a=s.list)||void 0===a?void 0:a.length)>0?null==b||null===(r=b.data)||void 0===r||null===(f=r.list)||void 0===f?void 0:f.map((function(e,s){return(0,p.jsxs)(i.G7,{onClick:function onClick(){return D(e,s)},className:"address-list ".concat(E==e.id&&"address-active"),children:[(0,p.jsxs)(i.G7,{className:"address-user",children:[e.name,e.is_default?(0,p.jsx)(i.xv,{className:"address-list-default",children:"默认"}):(0,p.jsx)(i.xv,{className:"address-list-phone",children:e.phone.replace(e.phone.substring(3,7),"****")})]}),(0,p.jsxs)(i.G7,{className:"address-list-bottom",children:[(0,p.jsxs)(i.G7,{className:"address-list-info",children:[(0,p.jsx)(i.G7,{children:e.province_name+e.city_name+e.district_name}),e.is_default&&(0,p.jsx)(i.xv,{className:"address-list-phone",children:e.phone.replace(e.phone.substring(3,7),"****")})]}),(0,p.jsx)(i.C3,{onClick:function onClick(e){return e.stopPropagation()},url:"/pages/addAddress/index?type=edit&id=".concat(e.id,"&&purchaser_id=").concat(Number(A.params.purchaser_id)),hoverClass:"none",className:"address-edit",children:(0,p.jsx)(i.xv,{className:"iconfont icon-bianji"})})]})]})})):(0,p.jsx)(i.G7,{className:"address-no-data",children:"暂未添加地址"})})}),v&&(0,p.jsx)(i.C3,{url:"/pages/addAddress/index?type=add&purchaser_id=".concat(Number(A.params.purchaser_id)),hoverClass:"none",className:"add-address",children:"添加收货地址"})]})})),m=f,addressManager=function(){var e=(0,o.useRouter)();return(0,p.jsx)(i.G7,{className:"address-manager",children:(0,p.jsx)(m,{refresherEnabled:!0,purchaser_id:e.params.purchaser_id})})};addressManager.enableShareAppMessage=!0;Page((0,r.createPageConfig)(addressManager,"pages/addressManager/index",{root:{cn:[]}},{navigationBarTitleText:"地址管理",enableShareAppMessage:!0}||{}))}},function(e){e.O(0,[7097,2107,1216,8592],(function(){return s=4555,e(e.s=s);var s}));e.O()}]); "use strict";require("./sub-common/dde3895fab754ea605d2697ad6817a2a.js");(wx.webpackJsonp=wx.webpackJsonp||[]).push([[5052],{4555:function(e,s,a){var r=a(9975),n=a(885),t=a(4165),d=a(5861),i=a(1515),c=a(9792),l=a(2185),o=a(2535),u=a.n(o),h=a(6028),p=a(1251),f=a(5513),m=(0,c.memo)((function(e){var s,a,r,m,v=e.addButtonEnabled,x=void 0===v||v,g=e.focusBorderEnabled,_=void 0!==g&&g,b=(0,l.hE)(),j=b.fetchData,w=b.state,N=function(){var s=(0,d.Z)((0,t.Z)().mark((function _callee(){var s,a;return(0,t.Z)().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,j({purchaser_id:e.purchaser_id});case 2:s=r.sent,e.id?A(e.id):null===(a=s.data.list)||void 0===a||a.every((function(e){return!e.is_default||(A(e.id),!1)}));case 4:case"end":return r.stop()}}),_callee)})));return function getData(){return s.apply(this,arguments)}}();(0,o.useDidShow)((function(){return N(),u().eventCenter.on("addressList:refresh",N),function(){u().eventCenter.off("addressList:refresh",N)}}));var k=(0,c.useState)(!1),Z=(0,n.Z)(k,2),C=Z[0],G=Z[1],S=function(){var e=(0,d.Z)((0,t.Z)().mark((function _callee2(){return(0,t.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return G(!0),e.next=3,N();case 3:G(!1);case 4:case"end":return e.stop()}}),_callee2)})));return function handleRefresh(){return e.apply(this,arguments)}}(),y=(Array.from({length:15}),(0,c.useState)()),E=(0,n.Z)(y,2),R=E[0],A=E[1],B=(0,o.useRouter)(),D=(0,c.useState)({}),L=(0,n.Z)(D,2),T=(L[0],L[1],(0,p.ER)().fetchData),P=function(){var s=(0,d.Z)((0,t.Z)().mark((function _callee3(s,a){var r,n;return(0,t.Z)().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:if(!B.params.orderId||"-100"==B.params.orderId){t.next=9;break}return u().showLoading({title:"请稍等...",mask:!0}),t.next=5,T({address_id:s.id,id:Number(B.params.orderId),shipment_mode:2});case 5:"success"===(r=t.sent).msg?(u().hideLoading(),u().showToast({title:"成功",icon:"success"}),u().navigateBack({delta:1})):(u().hideLoading(),u().showToast({title:r.msg,icon:"error"})),t.next=13;break;case 9:n=u().getCurrentPages(),n[n.length-2].setData({addressObj:s}),u().navigateBack({delta:1});case 13:e.onSelect&&e.onSelect(s,a),_&&A(null==s?void 0:s.id);case 15:case"end":return t.stop()}}),_callee3)})));return function handleSelect(e,a){return s.apply(this,arguments)}}();return(0,f.jsxs)(i.G7,{className:"address-scroll-view",children:[(0,f.jsx)(i.pf,{scrollY:!0,refresherEnabled:e.refresherEnabled,enhanced:!0,refresherTriggered:C,onRefresherRefresh:S,children:(0,f.jsx)(i.G7,{className:"address-scroll-view-content",children:(null==w||null===(s=w.data)||void 0===s||null===(a=s.list)||void 0===a?void 0:a.length)>0?null==w||null===(r=w.data)||void 0===r||null===(m=r.list)||void 0===m?void 0:m.map((function(e,s){return(0,f.jsxs)(i.G7,{onClick:function onClick(){return P(e,s)},className:"address-list ".concat(R==e.id&&"address-active"),children:[(0,f.jsxs)(i.G7,{className:"address-user",children:[e.name,e.is_default?(0,f.jsx)(i.xv,{className:"address-list-default",children:"默认"}):(0,f.jsx)(i.xv,{className:"address-list-phone",children:e.phone.replace(e.phone.substring(3,7),"****")})]}),(0,f.jsxs)(i.G7,{className:"address-list-bottom",children:[(0,f.jsxs)(i.G7,{className:"address-list-info",children:[(0,f.jsx)(i.G7,{children:e.province_name+e.city_name+e.district_name}),e.is_default&&(0,f.jsx)(i.xv,{className:"address-list-phone",children:e.phone.replace(e.phone.substring(3,7),"****")})]}),(0,f.jsx)(i.C3,{onClick:function onClick(e){return e.stopPropagation()},url:"/pages/addAddress/index?type=edit&id=".concat(e.id,"&&purchaser_id=").concat(Number(B.params.purchaser_id)),hoverClass:"none",className:"address-edit",children:(0,f.jsx)(h.Z,{name:"icon-bianji",size:40})})]})]})})):(0,f.jsx)(i.G7,{className:"address-no-data",children:"暂未添加地址"})})}),x&&(0,f.jsx)(i.C3,{url:"/pages/addAddress/index?type=add&purchaser_id=".concat(Number(B.params.purchaser_id)),hoverClass:"none",className:"add-address",children:"添加收货地址"})]})})),v=m,addressManager=function(){var e=(0,o.useRouter)();return(0,f.jsx)(i.G7,{className:"address-manager",children:(0,f.jsx)(v,{refresherEnabled:!0,purchaser_id:e.params.purchaser_id})})};addressManager.enableShareAppMessage=!0;Page((0,r.createPageConfig)(addressManager,"pages/addressManager/index",{root:{cn:[]}},{navigationBarTitleText:"地址管理",enableShareAppMessage:!0}||{}))}},function(e){e.O(0,[7097,2107,1216,8592],(function(){return s=4555,e(e.s=s);var s}));e.O()}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[443],{7229:function(e,n,t){var a=t(9975),l=t(4165),r=t(5861),i=t(1413),s=t(885),c=t(1515),u=t(9792),o="index-module__cussBox___b9Eo6",d="index-module__searchBox___TRa3p",_="index-module__two___FcFcX",f="index-module__listBox___cZkpQ",m="index-module__itemBox___edZPr",h="index-module__cussName___zFlmD",p="index-module__phone___mmFz9",x="index-module__woker___TkWiR",g="index-module__acticveitemBox___Cxh_P",Z=t(6408),v=t.n(Z),k=t(5032),w=t(1251),z=t(2535),N=t.n(z),j=t(4909),C=t(7227),B=t(5513);Page((0,a.createPageConfig)((function(){var e=(0,u.useState)({name:null,page:1,size:10}),n=(0,s.Z)(e,2),t=n[0],a=n[1],Z=(0,u.useState)({list:[],total:0}),G=(0,s.Z)(Z,2),R=G[0],b=G[1],P=(0,w.dl)(),T=P.fetchData,I=P.state,S=(0,u.useMemo)((function(){return(0,C.rA)({list:R.list,total:R.total,status:I.loading})}),[R,I]),D=(0,u.useState)({clientId:null,clientName:""}),E=(0,s.Z)(D,2),F=E[0],O=E[1],y=(0,u.useCallback)((function(e){M.current.page=1,b((function(){return{list:[],total:0}})),a((function(n){return(0,i.Z)((0,i.Z)({},n),{},{name:e,size:10})}))}),[]),J=(0,z.useRouter)();(0,u.useEffect)((function(){""===t.name&&a((function(e){return(0,i.Z)((0,i.Z)({},e),{},{name:null})})),""!==t.name&&q()}),[t]);var M=(0,u.useRef)({size:t.size,page:t.page}),$=(0,u.useCallback)((function(){if(R.list.length<R.total){M.current.page++;var e=M.current.size*M.current.page;a((function(n){return(0,i.Z)((0,i.Z)({},n),{},{size:e})}))}}),[R]),A=(0,u.useState)(!1),L=(0,s.Z)(A,2),Q=L[0],W=L[1],X=function(){var e=(0,r.Z)((0,l.Z)().mark((function _callee(){return(0,l.Z)().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:M.current.size=1,W(!0),a((function(e){return(0,i.Z)((0,i.Z)({},e),{},{size:10})}));case 3:case"end":return e.stop()}}),_callee)})));return function getRefresherRefresh(){return e.apply(this,arguments)}}(),q=function(){var e=(0,r.Z)((0,l.Z)().mark((function _callee2(){var e;return(0,l.Z)().wrap((function _callee2$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,T({name:null===t.name?"":t.name,page:t.page,size:t.size});case 2:e=n.sent,null!=J&&J.params.clientId&&e.data.list.map((function(e){return e.id==(null==J?void 0:J.params.clientId)?e.checked=!0:e.checked=!1,e})),b((function(n){var t,a;return(0,i.Z)((0,i.Z)({},n),{},{list:null===(t=e.data)||void 0===t?void 0:t.list,total:null===(a=e.data)||void 0===a?void 0:a.total})})),W((function(){return!1}));case 6:case"end":return n.stop()}}),_callee2)})));return function getCuss(){return e.apply(this,arguments)}}();return(0,u.useEffect)((function(){if(null!==(null==F?void 0:F.clientId))O(F);else{var e=N().getCurrentPages();e[e.length-2].setData({clientId:"",clientName:""})}}),[F]),(0,B.jsxs)(c.G7,{className:o,children:[(0,B.jsx)(c.G7,{className:d,children:(0,B.jsx)(c.G7,{className:_,children:(0,B.jsx)(k.Z,{placeholder:"请输入客户名称或手机号码",showBtn:!1,changeOnSearch:y,debounceTime:300})})}),(0,B.jsx)(c.G7,{className:f,children:(0,B.jsx)(j.Z,{statusMore:S,selfonScrollToLower:$,refresherEnabled:!0,refresherTriggered:Q,selfOnRefresherRefresh:X,children:R.list.map((function(e,n){return(0,B.jsxs)(c.G7,{className:v()(e.checked?g:m),onClick:function onClick(){!function selectClient(e){R.list.map((function(n){return e.id===n.id?n.checked=!0:n.checked=!1,n})),O(e);var n=N().getCurrentPages();n[n.length-2].setData({clientId:e.id,clientName:e.name}),b((function(e){return(0,i.Z)((0,i.Z)({},e),{},{list:null==R?void 0:R.list,total:null==R?void 0:R.total})})),N().navigateBack({delta:1})}(e)},children:[(0,B.jsx)(c.G7,{className:h,children:e.name}),(0,B.jsx)(c.G7,{className:p,children:e.phone}),(0,B.jsx)(c.G7,{className:x,children:e.sale_user_name})]},n)}))})})]})}),"pages/customerPage/index",{root:{cn:[]}},{navigationBarTitleText:"选择客户"}||{}))}},function(e){e.O(0,[2107,1216,8592],(function(){return n=7229,e(e.s=n);var n}));e.O()}]); "use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[443],{7229:function(e,n,t){var a=t(9975),r=t(4165),l=t(5861),c=t(1413),i=t(885),s=t(1515),u=t(9792),o="index-module__cussBox___b9Eo6",d="index-module__searchBox___TRa3p",_="index-module__two___FcFcX",f="index-module__listBox___cZkpQ",m="index-module__itemBox___edZPr",h="index-module__cussName___zFlmD",p="index-module__phone___mmFz9",x="index-module__woker___TkWiR",Z="index-module__acticveitemBox___Cxh_P",g=t(6408),v=t.n(g),k=t(5032),w=t(1251),z=t(2535),N=t.n(z),j=t(4909),C=t(7227),B=t(5513);Page((0,a.createPageConfig)((function(){var e=(0,u.useState)({name:null,page:1,size:10}),n=(0,i.Z)(e,2),t=n[0],a=n[1],g=(0,u.useState)({list:[],total:0}),G=(0,i.Z)(g,2),R=G[0],b=G[1],T=(0,w.dl)(),P=T.fetchData,S=T.state,I=(0,u.useMemo)((function(){return(0,C.rA)({list:R.list,total:R.total,status:S.loading})}),[R,S]),E=(0,u.useState)({clientId:null,clientName:""}),F=(0,i.Z)(E,2),O=F[0],D=F[1],y=(0,u.useCallback)((function(e){M.current.page=1,b((function(){return{list:[],total:0}})),a((function(n){return(0,c.Z)((0,c.Z)({},n),{},{name:e,size:10})}))}),[]),J=(0,z.useRouter)();(0,u.useEffect)((function(){""===t.name&&a((function(e){return(0,c.Z)((0,c.Z)({},e),{},{name:null})})),""!==t.name&&q()}),[t]);var M=(0,u.useRef)({size:t.size,page:t.page}),$=(0,u.useCallback)((function(){if(R.list.length<R.total){M.current.page++;var e=M.current.size*M.current.page;a((function(n){return(0,c.Z)((0,c.Z)({},n),{},{size:e})}))}}),[R]),A=(0,u.useState)(!1),L=(0,i.Z)(A,2),Q=L[0],W=L[1],X=function(){var e=(0,l.Z)((0,r.Z)().mark((function _callee(){return(0,r.Z)().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:M.current.size=1,W(!0),a((function(e){return(0,c.Z)((0,c.Z)({},e),{},{size:10})}));case 3:case"end":return e.stop()}}),_callee)})));return function getRefresherRefresh(){return e.apply(this,arguments)}}(),q=function(){var e=(0,l.Z)((0,r.Z)().mark((function _callee2(){var e;return(0,r.Z)().wrap((function _callee2$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,P({name:null===t.name?"":t.name,page:t.page,size:t.size});case 2:e=n.sent,null!=J&&J.params.clientId&&e.data.list.map((function(e){return e.id==(null==J?void 0:J.params.clientId)?e.checked=!0:e.checked=!1,e})),b((function(n){var t,a;return(0,c.Z)((0,c.Z)({},n),{},{list:null===(t=e.data)||void 0===t?void 0:t.list,total:null===(a=e.data)||void 0===a?void 0:a.total})})),W((function(){return!1}));case 6:case"end":return n.stop()}}),_callee2)})));return function getCuss(){return e.apply(this,arguments)}}();return(0,u.useEffect)((function(){null!==(null==O?void 0:O.clientId)&&D(O)}),[O]),(0,B.jsxs)(s.G7,{className:o,children:[(0,B.jsx)(s.G7,{className:d,children:(0,B.jsx)(s.G7,{className:_,children:(0,B.jsx)(k.Z,{placeholder:"请输入客户名称或手机号码",showBtn:!1,changeOnSearch:y,debounceTime:300})})}),(0,B.jsx)(s.G7,{className:f,children:(0,B.jsx)(j.Z,{statusMore:I,selfonScrollToLower:$,refresherEnabled:!0,refresherTriggered:Q,selfOnRefresherRefresh:X,children:R.list.map((function(e,n){return(0,B.jsxs)(s.G7,{className:v()(e.checked?Z:m),onClick:function onClick(){!function selectClient(e){R.list.map((function(n){return e.id===n.id?n.checked=!0:n.checked=!1,n})),D(e);var n=N().getCurrentPages();n[n.length-2].setData({clientId:e.id,clientName:e.name}),b((function(e){return(0,c.Z)((0,c.Z)({},e),{},{list:null==R?void 0:R.list,total:null==R?void 0:R.total})})),N().navigateBack({delta:1})}(e)},children:[(0,B.jsx)(s.G7,{className:h,children:e.name}),(0,B.jsx)(s.G7,{className:p,children:e.phone}),(0,B.jsx)(s.G7,{className:x,children:e.sale_user_name})]},n)}))})})]})}),"pages/customerPage/index",{root:{cn:[]}},{navigationBarTitleText:"选择客户"}||{}))}},function(e){e.O(0,[2107,1216,8592],(function(){return n=7229,e(e.s=n);var n}));e.O()}]);

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[2003],{5195:function(e,n,i){var s=i(9975),a=i(4165),c=i(1413),l=i(5861),o=i(885),t=i(2407),r=i(6028),u=i(1515),d=i(9792),_="index-module__login___EqvJi",x="index-module__login-panel___EQuDb",m="index-module__login-title___dkk8O",p="index-module__input-bar___VMnKd",h="index-module__input-bar--account___X4zuk",j="index-module__input-bar--password___Gb5Q_",g="index-module__login-options___QEaXx",f="index-module__login-option___RbES2",Z="index-module__login-button___xuvF4",v="index-module__isForgetPwd___Mb3Qd",N="index-module__quick-login___TPdk0",k="index-module__quick-login--options___KSNBY",b="index-module__quick-login--divider___uC_UV",w="index-module__quick-login--iconCard___LFNc2",G=i(6574),C=i(7594),I=i(8560),z=i(8072),S=i(2535),y=i.n(S),P=i(1115),q=i(3929),E=i(5513),T=(0,d.memo)((function(){return(0,E.jsxs)(u.G7,{className:N,children:[(0,E.jsx)(t.Z,{direction:"horizontal",customClassName:b,children:"或通过以下方式登录"}),(0,E.jsx)(u.G7,{className:k,children:(0,E.jsx)(I.Z,{iconName:"icon-weixindenglu",title:"微信登录",customClass:w})})]})})),B=function Login(){var e=(0,d.useState)(!1),n=(0,o.Z)(e,2),i=n[0],s=n[1],N=(0,d.useState)(!0),k=(0,o.Z)(N,2),b=k[0],w=k[1],I=(0,d.useState)(""),S=(0,o.Z)(I,2),B=S[0],F=S[1],Q=(0,d.useState)(""),J=(0,o.Z)(Q,2),L=J[0],O=J[1],V=function formatInput(e){return e.trim()},D=(0,q.Z)(),K=D.setToken,M=D.setUserInfo,U=(0,z.Ig)().fetchData,X=function(){var e=(0,l.Z)((0,a.Z)().mark((function _callee(){var e;return(0,a.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:if(""!==B&&""!==L){n.next=2;break}return n.abrupt("return",P.Z9.error("账号密码不能为空!"));case 2:return n.next=5,U({account:B,password:L});case 5:(e=n.sent).success?(P.Z9.success("登陆成功"),K(e.data.token),M((0,c.Z)({},e.data)),y().switchTab({url:"/pages/index/index"})):P.Z9.error("登陆失败");case 8:case"end":return n.stop()}}),_callee)})));return function handleLogin(){return e.apply(this,arguments)}}();return(0,E.jsxs)(u.G7,{className:_,children:[(0,E.jsx)(u.Ee,{className:"full-100",mode:"widthFix",src:"https://cdn.zzfzyc.com/service_center/login_head.png"}),(0,E.jsxs)(u.G7,{className:x,children:[(0,E.jsxs)(u.G7,{className:m,children:[(0,E.jsx)(u.xv,{children:"您好,"}),(0,E.jsx)(u.xv,{children:"欢迎来到蜘蛛管家"})]}),(0,E.jsxs)(u.G7,{className:p,children:[(0,E.jsx)(r.Z,{name:"icon-yonghuming",size:48,color:"#999999"}),(0,E.jsx)(t.Z,{direction:"vertical"}),(0,E.jsx)(u.II,{onInput:function handleInputAccount(e){var n=V(e.detail.value);F(n)},className:h,placeholder:"请输入用户名"})]}),(0,E.jsxs)(u.G7,{className:p,children:[(0,E.jsx)(r.Z,{name:"icon-mima",size:48,color:"#999999"}),(0,E.jsx)(t.Z,{direction:"vertical"}),(0,E.jsx)(u.II,{onInput:function handleInputPassword(e){var n=V(e.detail.value);O(n)},password:b,className:j,type:"text",placeholder:"请输入密码"}),(0,E.jsx)(u.G7,{onClick:function handlePwdVisible(){w((function(e){return!e}))},children:b?(0,E.jsx)(r.Z,{name:"icon-biyan",size:48,color:"#999999"}):(0,E.jsx)(r.Z,{name:"icon-yanjing",size:48,color:"#999999"})})]}),(0,E.jsxs)(u.G7,{className:g,children:[(0,E.jsx)(u.G7,{className:f,children:(0,E.jsx)(G.Z,{status:i,size:"small",circle:!0,onSelect:function selectCallBack(){s(!0)},onClose:function closeCallBack(){s(!1)},children:"记住密码"})}),(0,E.jsx)(u.G7,{className:f,children:(0,E.jsx)(u.xv,{className:v,children:"忘记密码?"})})]}),(0,E.jsx)(C.Z,{circle:!0,plain:!0,onClick:X,customClassName:Z,children:"登录"}),(0,E.jsx)(T,{})]})]})};Page((0,s.createPageConfig)(B,"pages/login/index",{root:{cn:[]}},{navigationBarTitleText:"登录"}||{}))}},function(e){e.O(0,[2107,1216,8592],(function(){return n=5195,e(e.s=n);var n}));e.O()}]); "use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[2003],{5195:function(e,n,i){var s=i(9975),c=i(4165),a=i(1413),o=i(5861),l=i(885),t=i(2407),r=i(6028),d=i(1515),u=i(9792),_="index-module__login___EqvJi",x="index-module__login-panel___EQuDb",m="index-module__login-title___dkk8O",h="index-module__input-bar___VMnKd",p="index-module__input-bar--account___X4zuk",j="index-module__input-bar--password___Gb5Q_",g="index-module__login-options___QEaXx",f="index-module__login-option___RbES2",Z="index-module__login-button___xuvF4",v="index-module__isForgetPwd___Mb3Qd",k="index-module__quick-login___TPdk0",N="index-module__quick-login--options___KSNBY",w="index-module__quick-login--divider___uC_UV",b="index-module__quick-login--iconCard___LFNc2",C=i(6574),G=i(7594),I=i(8560),z=i(7835),P=i(2535),S=i.n(P),y=i(1115),T=i(3929),q=i(5513),E=(0,u.memo)((function(){return(0,q.jsxs)(d.G7,{className:k,children:[(0,q.jsx)(t.Z,{direction:"horizontal",customClassName:w,children:"或通过以下方式登录"}),(0,q.jsx)(d.G7,{className:N,children:(0,q.jsx)(I.Z,{iconName:"icon-weixindenglu",title:"微信登录",customClass:b})})]})})),F=function Login(){var e=(0,u.useState)(!1),n=(0,l.Z)(e,2),i=n[0],s=n[1],k=(0,u.useState)(!0),N=(0,l.Z)(k,2),w=N[0],b=N[1],I=(0,u.useState)(""),P=(0,l.Z)(I,2),F=P[0],B=P[1],Q=(0,u.useState)(""),J=(0,l.Z)(Q,2),L=J[0],O=J[1],V=function formatInput(e){return e.trim()},D=(0,T.Z)(),K=D.setToken,M=D.setUserInfo,U=(0,z.Ig)().fetchData,X=function(){var e=(0,o.Z)((0,c.Z)().mark((function _callee(){var e;return(0,c.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:if(""!==F&&""!==L){n.next=2;break}return n.abrupt("return",y.Z9.error("账号密码不能为空!"));case 2:return n.next=5,U({account:F,password:L});case 5:(e=n.sent).success?(y.Z9.success("登陆成功"),K(e.data.token),M((0,a.Z)({},e.data)),S().switchTab({url:"/pages/index/index"})):y.Z9.error("登陆失败");case 8:case"end":return n.stop()}}),_callee)})));return function handleLogin(){return e.apply(this,arguments)}}();return(0,q.jsxs)(d.G7,{className:_,children:[(0,q.jsx)(d.Ee,{className:"full-100",mode:"widthFix",src:"https://cdn.zzfzyc.com/service_center/login_head.png"}),(0,q.jsxs)(d.G7,{className:x,children:[(0,q.jsxs)(d.G7,{className:m,children:[(0,q.jsx)(d.xv,{children:"您好,"}),(0,q.jsx)(d.xv,{children:"欢迎来到蜘蛛管家"})]}),(0,q.jsxs)(d.G7,{className:h,children:[(0,q.jsx)(r.Z,{name:"icon-yonghuming",size:48,color:"#999999"}),(0,q.jsx)(t.Z,{direction:"vertical"}),(0,q.jsx)(d.II,{onInput:function handleInputAccount(e){var n=V(e.detail.value);B(n)},className:p,placeholder:"请输入用户名"})]}),(0,q.jsxs)(d.G7,{className:h,children:[(0,q.jsx)(r.Z,{name:"icon-mima",size:48,color:"#999999"}),(0,q.jsx)(t.Z,{direction:"vertical"}),(0,q.jsx)(d.II,{onInput:function handleInputPassword(e){var n=V(e.detail.value);O(n)},password:w,className:j,type:"text",placeholder:"请输入密码"}),(0,q.jsx)(d.G7,{onClick:function handlePwdVisible(){b((function(e){return!e}))},children:w?(0,q.jsx)(r.Z,{name:"icon-biyan",size:48,color:"#999999"}):(0,q.jsx)(r.Z,{name:"icon-yanjing",size:48,color:"#999999"})})]}),(0,q.jsxs)(d.G7,{className:g,children:[(0,q.jsx)(d.G7,{className:f,children:(0,q.jsx)(C.Z,{status:i,size:"small",circle:!0,onSelect:function selectCallBack(){s(!0)},onClose:function closeCallBack(){s(!1)},children:"记住密码"})}),(0,q.jsx)(d.G7,{className:f,onClick:function handleForgetPwd(){S().showToast({title:"联系客服:0757-86834274",icon:"none"})},children:(0,q.jsx)(d.xv,{className:v,children:"忘记密码?"})})]}),(0,q.jsx)(G.Z,{circle:!0,plain:!0,onClick:X,customClassName:Z,children:"登录"}),(0,q.jsx)(E,{})]})]})};Page((0,s.createPageConfig)(F,"pages/login/index",{root:{cn:[]}},{navigationBarTitleText:"登录"}||{}))}},function(e){e.O(0,[2107,1216,8592],(function(){return n=5195,e(e.s=n);var n}));e.O()}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";var taro_app_library;(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[68],{42:function(n,r,t){var e={"./react":function(){return t.e(970).then((function(){return function(){return t(970)}}))},"./react-redux":function(){return Promise.all([t.e(31),t.e(903),t.e(154),t.e(289)]).then((function(){return function(){return t(289)}}))},"./@tarojs/taro":function(){return Promise.all([t.e(31),t.e(903),t.e(99)]).then((function(){return function(){return t(99)}}))},"./classnames":function(){return Promise.all([t.e(31),t.e(903),t.e(297)]).then((function(){return function(){return t(297)}}))},"./redux":function(){return t.e(1).then((function(){return function(){return t(1)}}))},"./redux-thunk":function(){return t.e(141).then((function(){return function(){return t(141)}}))},"./qs":function(){return t.e(61).then((function(){return function(){return t(61)}}))},"./redux-logger":function(){return Promise.all([t.e(31),t.e(903),t.e(547)]).then((function(){return function(){return t(547)}}))},"./dayjs":function(){return t.e(350).then((function(){return function(){return t(350)}}))},"./react/jsx-runtime":function(){return t.e(517).then((function(){return function(){return t(517)}}))},"./@tarojs/runtime":function(){return Promise.all([t.e(31),t.e(903),t.e(977)]).then((function(){return function(){return t(977)}}))},"./@tarojs/plugin-framework-react/dist/runtime":function(){return Promise.all([t.e(31),t.e(903),t.e(573)]).then((function(){return function(){return t(573)}}))},"./@tarojs/plugin-platform-weapp/dist/runtime":function(){return Promise.all([t.e(31),t.e(638)]).then((function(){return function(){return t(638)}}))},"./react-dom":function(){return Promise.all([t.e(31),t.e(903),t.e(154),t.e(212)]).then((function(){return function(){return t(212)}}))}},u=function(n,r){return t.R=r,r=t.o(e,n)?e[n]():Promise.resolve().then((function(){throw new Error('Module "'+n+'" does not exist in container.')})),t.R=void 0,r},i=function(n,r){if(t.S){var e="default",u=t.S[e];if(u&&u!==n)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[e]=n,t.I(e,r)}};t.d(r,{get:function(){return u},init:function(){return i}});var o={"./react":function(){return function(){return t(970)}},"./react-redux":function(){return function(){return t(289)}},"./@tarojs/taro":function(){return function(){return t(99)}},"./classnames":function(){return function(){return t(297)}},"./redux":function(){return function(){return t(1)}},"./redux-thunk":function(){return function(){return t(141)}},"./qs":function(){return function(){return t(61)}},"./redux-logger":function(){return function(){return t(547)}},"./dayjs":function(){return function(){return t(350)}},"./react/jsx-runtime":function(){return function(){return t(517)}},"./@tarojs/runtime":function(){return function(){return t(977)}},"./@tarojs/plugin-framework-react/dist/runtime":function(){return function(){return t(573)}},"./@tarojs/plugin-platform-weapp/dist/runtime":function(){return function(){return t(638)}},"./react-dom":function(){return function(){return t(212)}}},c=function(n){return o[n]()};t.taro(c)}},function(n){var r=function(r){return n(n.s=r)},t=r(42);taro_app_library=t}]); "use strict";var taro_app_library;(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[68],{242:function(n,r,t){var e={"./react":function(){return t.e(970).then((function(){return function(){return t(970)}}))},"./react-redux":function(){return Promise.all([t.e(31),t.e(903),t.e(154),t.e(289)]).then((function(){return function(){return t(289)}}))},"./@tarojs/taro":function(){return Promise.all([t.e(31),t.e(903),t.e(99)]).then((function(){return function(){return t(99)}}))},"./classnames":function(){return Promise.all([t.e(31),t.e(903),t.e(297)]).then((function(){return function(){return t(297)}}))},"./redux":function(){return t.e(1).then((function(){return function(){return t(1)}}))},"./qs":function(){return t.e(61).then((function(){return function(){return t(61)}}))},"./redux-thunk":function(){return t.e(141).then((function(){return function(){return t(141)}}))},"./redux-logger":function(){return Promise.all([t.e(31),t.e(903),t.e(547)]).then((function(){return function(){return t(547)}}))},"./dayjs":function(){return t.e(350).then((function(){return function(){return t(350)}}))},"./react/jsx-runtime":function(){return t.e(517).then((function(){return function(){return t(517)}}))},"./@tarojs/runtime":function(){return Promise.all([t.e(31),t.e(903),t.e(977)]).then((function(){return function(){return t(977)}}))},"./@tarojs/plugin-platform-weapp/dist/runtime":function(){return Promise.all([t.e(31),t.e(638)]).then((function(){return function(){return t(638)}}))},"./@tarojs/plugin-framework-react/dist/runtime":function(){return Promise.all([t.e(31),t.e(903),t.e(573)]).then((function(){return function(){return t(573)}}))},"./react-dom":function(){return Promise.all([t.e(31),t.e(903),t.e(154),t.e(212)]).then((function(){return function(){return t(212)}}))}},u=function(n,r){return t.R=r,r=t.o(e,n)?e[n]():Promise.resolve().then((function(){throw new Error('Module "'+n+'" does not exist in container.')})),t.R=void 0,r},i=function(n,r){if(t.S){var e="default",u=t.S[e];if(u&&u!==n)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[e]=n,t.I(e,r)}};t.d(r,{get:function(){return u},init:function(){return i}});var o={"./react":function(){return function(){return t(970)}},"./react-redux":function(){return function(){return t(289)}},"./@tarojs/taro":function(){return function(){return t(99)}},"./classnames":function(){return function(){return t(297)}},"./redux":function(){return function(){return t(1)}},"./qs":function(){return function(){return t(61)}},"./redux-thunk":function(){return function(){return t(141)}},"./redux-logger":function(){return function(){return t(547)}},"./dayjs":function(){return function(){return t(350)}},"./react/jsx-runtime":function(){return function(){return t(517)}},"./@tarojs/runtime":function(){return function(){return t(977)}},"./@tarojs/plugin-platform-weapp/dist/runtime":function(){return function(){return t(638)}},"./@tarojs/plugin-framework-react/dist/runtime":function(){return function(){return t(573)}},"./react-dom":function(){return function(){return t(212)}}},c=function(n){return o[n]()};t.taro(c)}},function(n){var r=function(r){return n(n.s=r)},t=r(242);taro_app_library=t}]);

View File

@ -1,5 +1,5 @@
{ {
"miniprogramRoot": "./", "miniprogramRoot": "",
"projectname": "Mall-lymarket", "projectname": "Mall-lymarket",
"description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"appid": "wx64fe67f111d52457", "appid": "wx64fe67f111d52457",

View File

@ -1 +1 @@
!function(){"use strict";var e,r,_,t,n={},u={};function __webpack_require__(e){var r=u[e];if(void 0!==r)return r.exports;var _=u[e]={id:e,loaded:!1,exports:{}};return n[e](_,_.exports,__webpack_require__),_.loaded=!0,_.exports}__webpack_require__.m=n,e=[],__webpack_require__.O=function(r,_,t,n){if(!_){var u=1/0;for(c=0;c<e.length;c++){_=e[c][0],t=e[c][1],n=e[c][2];for(var i=!0,a=0;a<_.length;a++)(!1&n||u>=n)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](_[a])}))?_.splice(a--,1):(i=!1,n<u&&(u=n));if(i){e.splice(c--,1);var o=t();void 0!==o&&(r=o)}}return r}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[_,t,n]},__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=function(e,r){for(var _ in r)__webpack_require__.o(r,_)&&!__webpack_require__.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:r[_]})},__webpack_require__.f={},__webpack_require__.e=function(e){return Promise.all(Object.keys(__webpack_require__.f).reduce((function(r,_){return __webpack_require__.f[_](e,r),r}),[]))},__webpack_require__.u=function(e){},__webpack_require__.miniCssF=function(e){},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r={},_="EShop:",__webpack_require__.l=function(e,t,n,u){if(r[e])r[e].push(t);else{var i,a;if(void 0!==n)for(var o=document.getElementsByTagName("script"),c=0;c<o.length;c++){var l=o[c];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==_+n){i=l;break}}i||(a=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,__webpack_require__.nc&&i.setAttribute("nonce",__webpack_require__.nc),i.setAttribute("data-webpack",_+n),i.src=e),r[e]=[t];var onScriptComplete=function(_,t){i.onerror=i.onload=null,clearTimeout(p);var n=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach((function(e){return e(t)})),_)return _(t)},p=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=onScriptComplete.bind(null,i.onerror),i.onload=onScriptComplete.bind(null,i.onload),a&&document.head.appendChild(i)}},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},t={2020:["default","./@tarojs/plugin-framework-react/dist/runtime",null],2535:["default","./@tarojs/taro",null],2934:["default","./react-redux",null],3831:["default","./dayjs",null],5513:["default","./react/jsx-runtime",null],5571:["default","./redux",null],6408:["default","./classnames",null],7461:["default","./react-dom",null],8475:["default","./redux-thunk",null],8748:["default","./qs",null],9792:["default","./react",null],9798:["default","./@tarojs/plugin-platform-weapp/dist/runtime",null],9975:["default","./@tarojs/runtime",null]},__webpack_require__.taro=function(e){for(var r in t){var _=e(t[r][1]);n[r]=function(e){return function(r){r.exports=e()}}(_)}},__webpack_require__.p="/",function(){var e={3666:0,7591:0,8215:0,7241:0,3215:0,541:0};__webpack_require__.f.j=function(r,_){var t=__webpack_require__.o(e,r)?e[r]:void 0;if(0!==t)if(t)_.push(t[2]);else if(/^([38]215|(54|724|759)1|3666)$/.test(r))e[r]=0;else{var n=new Promise((function(_,n){t=e[r]=[_,n]}));_.push(t[2]=n);var u=__webpack_require__.p+__webpack_require__.u(r),i=new Error;__webpack_require__.l(u,(function(_){if(__webpack_require__.o(e,r)&&(0!==(t=e[r])&&(e[r]=void 0),t)){var n=_&&("load"===_.type?"missing":_.type),u=_&&_.target&&_.target.src;i.message="Loading chunk "+r+" failed.\n("+n+": "+u+")",i.name="ChunkLoadError",i.type=n,i.request=u,t[1](i)}}),"chunk-"+r,r)}},__webpack_require__.O.j=function(r){return 0===e[r]};var webpackJsonpCallback=function(r,_){var t,n,u=_[0],i=_[1],a=_[2],o=0;if(u.some((function(r){return 0!==e[r]}))){for(t in i)__webpack_require__.o(i,t)&&(__webpack_require__.m[t]=i[t]);if(a)var c=a(__webpack_require__)}for(r&&r(_);o<u.length;o++)n=u[o],__webpack_require__.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return __webpack_require__.O(c)},r=wx.webpackJsonp=wx.webpackJsonp||[];r.forEach(webpackJsonpCallback.bind(null,0)),r.push=webpackJsonpCallback.bind(null,r.push.bind(r))}()}(); !function(){"use strict";var e,r,_,t,n={},u={};function __webpack_require__(e){var r=u[e];if(void 0!==r)return r.exports;var _=u[e]={id:e,loaded:!1,exports:{}};return n[e](_,_.exports,__webpack_require__),_.loaded=!0,_.exports}__webpack_require__.m=n,e=[],__webpack_require__.O=function(r,_,t,n){if(!_){var u=1/0;for(c=0;c<e.length;c++){_=e[c][0],t=e[c][1],n=e[c][2];for(var i=!0,a=0;a<_.length;a++)(!1&n||u>=n)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](_[a])}))?_.splice(a--,1):(i=!1,n<u&&(u=n));if(i){e.splice(c--,1);var o=t();void 0!==o&&(r=o)}}return r}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[_,t,n]},__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=function(e,r){for(var _ in r)__webpack_require__.o(r,_)&&!__webpack_require__.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:r[_]})},__webpack_require__.f={},__webpack_require__.e=function(e){return Promise.all(Object.keys(__webpack_require__.f).reduce((function(r,_){return __webpack_require__.f[_](e,r),r}),[]))},__webpack_require__.u=function(e){},__webpack_require__.miniCssF=function(e){},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r={},_="EShop:",__webpack_require__.l=function(e,t,n,u){if(r[e])r[e].push(t);else{var i,a;if(void 0!==n)for(var o=document.getElementsByTagName("script"),c=0;c<o.length;c++){var l=o[c];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==_+n){i=l;break}}i||(a=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,__webpack_require__.nc&&i.setAttribute("nonce",__webpack_require__.nc),i.setAttribute("data-webpack",_+n),i.src=e),r[e]=[t];var onScriptComplete=function(_,t){i.onerror=i.onload=null,clearTimeout(p);var n=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach((function(e){return e(t)})),_)return _(t)},p=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=onScriptComplete.bind(null,i.onerror),i.onload=onScriptComplete.bind(null,i.onload),a&&document.head.appendChild(i)}},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},t={2020:["default","./@tarojs/plugin-framework-react/dist/runtime",null],2535:["default","./@tarojs/taro",null],2934:["default","./react-redux",null],3831:["default","./dayjs",null],5513:["default","./react/jsx-runtime",null],5571:["default","./redux",null],6408:["default","./classnames",null],7461:["default","./react-dom",null],8475:["default","./redux-thunk",null],8748:["default","./qs",null],9792:["default","./react",null],9798:["default","./@tarojs/plugin-platform-weapp/dist/runtime",null],9975:["default","./@tarojs/runtime",null]},__webpack_require__.taro=function(e){for(var r in t){var _=e(t[r][1]);n[r]=function(e){return function(r){r.exports=e()}}(_)}},__webpack_require__.p="/",function(){var e={3666:0,7591:0,8215:0,4536:0,541:0,5637:0,7241:0,3215:0};__webpack_require__.f.j=function(r,_){var t=__webpack_require__.o(e,r)?e[r]:void 0;if(0!==t)if(t)_.push(t[2]);else if(/^([38]215|(54|724|759)1|3666|4536|5637)$/.test(r))e[r]=0;else{var n=new Promise((function(_,n){t=e[r]=[_,n]}));_.push(t[2]=n);var u=__webpack_require__.p+__webpack_require__.u(r),i=new Error;__webpack_require__.l(u,(function(_){if(__webpack_require__.o(e,r)&&(0!==(t=e[r])&&(e[r]=void 0),t)){var n=_&&("load"===_.type?"missing":_.type),u=_&&_.target&&_.target.src;i.message="Loading chunk "+r+" failed.\n("+n+": "+u+")",i.name="ChunkLoadError",i.type=n,i.request=u,t[1](i)}}),"chunk-"+r,r)}},__webpack_require__.O.j=function(r){return 0===e[r]};var webpackJsonpCallback=function(r,_){var t,n,u=_[0],i=_[1],a=_[2],o=0;if(u.some((function(r){return 0!==e[r]}))){for(t in i)__webpack_require__.o(i,t)&&(__webpack_require__.m[t]=i[t]);if(a)var c=a(__webpack_require__)}for(r&&r(_);o<u.length;o++)n=u[o],__webpack_require__.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return __webpack_require__.O(c)},r=wx.webpackJsonp=wx.webpackJsonp||[];r.forEach(webpackJsonpCallback.bind(null,0)),r.push=webpackJsonpCallback.bind(null,r.push.bind(r))}()}();

Binary file not shown.

View File

@ -9,6 +9,13 @@
"condition": { "condition": {
"miniprogram": { "miniprogram": {
"list": [ "list": [
{
"name": "销售统计",
"pathName": "pages/saleStatistic/index",
"query": "",
"launchMode": "default",
"scene": null
},
{ {
"name": "提货详情", "name": "提货详情",
"pathName": "pages/takeDeliveryDetail/index", "pathName": "pages/takeDeliveryDetail/index",

View File

@ -36,6 +36,10 @@ export default defineAppConfig({
'custom-wrapper': '/custom-wrapper', 'custom-wrapper': '/custom-wrapper',
}, },
subPackages: [ subPackages: [
{
root: 'pages/saleStatistic',
pages: ['index'],
},
{ {
root: 'pages/takeDelivery', root: 'pages/takeDelivery',
pages: ['index'], pages: ['index'],
@ -101,34 +105,24 @@ export default defineAppConfig({
pages: ['index'], pages: ['index'],
}, },
{ {
root: "pages/applyMoney", root: 'pages/applyMoney',
pages: [ pages: ['index'],
"index"
]
}, },
{ {
root: "pages/newCollection", root: 'pages/newCollection',
pages: [ pages: ['index'],
"index"
]
}, },
{ {
root: "pages/addCollection", root: 'pages/addCollection',
pages: [ pages: ['index'],
"index"
]
}, },
{ {
root: "pages/accountPage", root: 'pages/accountPage',
pages: [ pages: ['index'],
"index"
]
}, },
{ {
root: "pages/collectionDetail", root: 'pages/collectionDetail',
pages: [ pages: ['index'],
"index"
]
}, },
], ],
}) })

View File

@ -0,0 +1,3 @@
.dropDownItem{
}

View File

@ -0,0 +1,53 @@
import { View, Text } from '@tarojs/components'
import { useCallback, useEffect, useMemo, useRef, useState, memo } from 'react'
import styles from './index.module.scss'
import classnames from 'classnames'
import Iconfont from '../iconfont/iconfont'
// 弹窗选择向上弹窗还是向下弹窗
type Direction = 'up' | 'down'
// 配置 菜单可选项
type Options = {
text: string
value: number
}
interface DropDownEvent {
change: (value: Options['value']) => void // value 变化时触发
}
interface PropsType extends DropDownEvent{
direction?: Direction
title: string // 已选中的菜单标题
options?: Options[]
value?: number | string // 当前选中的值
children?: React.ReactNode
activeColor?: string
}
export default (props: PropsType) => {
const { children, direction = 'down', title, value, options, change, activeColor } = props
const defaultOptions = () => {
return options?.map(({text, value})=>{
return (
<View>
<Text>{text}</Text>
<Iconfont name='icon-bianji' size={40} color={value !== options[0].value ? activeColor : '#333'}></Iconfont>
</View>
)
})
}
return (
<View className={styles.dropDownItem}>
<View >
<Text className='' style={{ color: activeColor }}>
{title}
</Text>
<Iconfont name='icon-bianji' size={40} color={value !== options![0].value ? activeColor : '#333'}></Iconfont>
</View>
{children ? children : defaultOptions()}
</View>
)
}

View File

@ -0,0 +1,31 @@
.filterButton {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
padding: 0 20px;
box-sizing: border-box;
border: 0 solid transparent;
background-color: #f6f6f6;
border-radius: 8px;
font-size: 28px;
height: 72px;
&--text {
color: #909090;
display: flex;
flex-flow: row nowrap;
justify-content: center;
align-items: center;
}
&:hover {
opacity: 0.7;
}
&--active {
border: 1px solid $color_main;
background-color: #eaf2ff;
.filterButton--text {
color: $color_main;
}
}
}

View File

@ -0,0 +1,27 @@
import classnames from "classnames"
import { FC } from "react"
import NormalButton from "../normalButton"
import styles from './index.module.scss'
interface ButtonPropsType {
isActive: boolean
onClick?: Function
children?: React.ReactNode
customClassName?: string
}
const FilterButton: FC<ButtonPropsType> = props => {
const { onClick, children, isActive = false, customClassName } = props
const handleClick = () => {
onClick?.()
}
return (
<NormalButton
customTextClassName={styles['filterButton--text']}
customClassName={classnames(styles.filterButton, isActive && styles['filterButton--active'], customClassName)}
onClick={handleClick}>
{children}
</NormalButton>
)
}
export default FilterButton

View File

@ -1,5 +1,4 @@
.button { .button {
$current_color: #fff;
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
justify-content: center; justify-content: center;
@ -10,6 +9,7 @@
background-color: #fff; background-color: #fff;
text-align: center; text-align: center;
color: #fff; color: #fff;
box-sizing: border-box;
&--normal { &--normal {
height: 72px; height: 72px;
font-size: $font_size_medium; font-size: $font_size_medium;
@ -24,24 +24,23 @@
// 按钮类型 // 按钮类型
&--primary { &--primary {
border: 1px solid $color_main; border: 1px solid $color_main;
color: $color_main; background-color: $color_main;
$current_color: $color_main; color: white;
} }
&--danger { &--danger {
border: 1px solid $color_danger; border: 1px solid $color_danger;
color: $color_danger; background-color: $color_danger;
$current_color: $color_danger; color: white;
} }
&--warning { &--warning {
border: 1px solid $color_warning; border: 1px solid $color_warning;
color: $color_warning; background-color: $color_warning;
$current_color: $color_warning; color: white;
} }
&--info { &--info {
border: 1px solid $color_info; border: 1px solid $color_info;
color: $color_info; background-color: $color_info;
$current_color: $color_info; color: white;
} }
&--round { &--round {
border-radius: 50px; border-radius: 50px;
@ -49,11 +48,24 @@
&--circle { &--circle {
border-radius: 16px; border-radius: 16px;
} }
// 朴素按钮
&--plain { &--plain {
background-color: currentColor; background-color: white;
border-color: currentColor; &.button--primary {
.button--text { border: 1px solid $color_main;
color: #fff; color: $color_main;
}
&.button--danger {
border: 1px solid $color_danger;
color: $color_danger;
}
&.button--warning {
border: 1px solid $color_warning;
color: $color_warning;
}
&.button--info {
border: 1px solid $color_info;
color: $color_info;
} }
} }
&--text { &--text {

View File

@ -11,7 +11,7 @@ interface PropsType {
type?: ButtonType type?: ButtonType
round?: boolean // 大圆角 round?: boolean // 大圆角
disabled?: boolean disabled?: boolean
plain?: boolean // 填满背景颜色 plain?: boolean // plain
circle?: boolean // 小圆角 circle?: boolean // 小圆角
children?: ReactNode children?: ReactNode
onClick?: Function onClick?: Function

View File

@ -73,3 +73,6 @@
padding-left: 20px !important; padding-left: 20px !important;
} }
} }
.customRightSlot{
margin-right: 20px;
}

View File

@ -101,22 +101,21 @@ export default memo(
disabled={disabled} disabled={disabled}
value={inputCon} value={inputCon}
placeholder={placeholder} placeholder={placeholder}
onInput={(e) => onInputEven(e)} onInput={e => onInputEven(e)}
/> />
<View className={styles.search_closeBtn}> <View className={styles.search_closeBtn}>
{!!inputCon && <CloseBtn onClose={() => clearInput()} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />} {!!inputCon && <CloseBtn onClose={() => clearInput()} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />}
</View> </View>
{ {showScan && (
showScan && <View onClick={() => { <View
handScan?.() onClick={() => {
}}> handScan?.()
<IconFont }}>
name={'icon-saomiao'} size={40} color={'#337FFF'} <IconFont name={'icon-saomiao'} size={40} color={'#337FFF'}></IconFont>
></IconFont>
</View> </View>
} )}
<View>{customRightSlot}</View> <View className={styles.customRightSlot}>{customRightSlot}</View>
</View> </View>
</View> </View>
{showBtn && ( {showBtn && (

View File

@ -145,7 +145,7 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
</FilterButton> </FilterButton>
{!!typeList?.length && {!!typeList?.length &&
typeList?.map((item) => { typeList?.map(item => {
return ( return (
<FilterButton isActive={searchFilter.type === item?.id} onClick={() => handleSelectedType(item?.id)}> <FilterButton isActive={searchFilter.type === item?.id} onClick={() => handleSelectedType(item?.id)}>
{item.name} {item.name}
@ -171,10 +171,10 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
</View> </View>
</View> </View>
<View className={styles.filterController}> <View className={styles.filterController}>
<NormalButton type='primary' round customClassName={classnames(styles.btn, styles.rest_btn)} onClick={handleReset}> <NormalButton plain type='primary' round customClassName={classnames(styles.btn, styles.rest_btn)} onClick={handleReset}>
</NormalButton> </NormalButton>
<NormalButton type='primary' plain round customClassName={classnames(styles.btn, styles.verify_btn)} onClick={handleConfirm}> <NormalButton type='primary' round customClassName={classnames(styles.btn, styles.verify_btn)} onClick={handleConfirm}>
</NormalButton> </NormalButton>
</View> </View>

View File

@ -81,6 +81,7 @@ const ItemList:FC<PropsType> = (props) => {
<View className={styles.bottomBar}> <View className={styles.bottomBar}>
<NormalButton <NormalButton
customClassName={styles.bottomBar__button} customClassName={styles.bottomBar__button}
plain
type='info' type='info'
customStyles={{ color: '#8e8e8e', borderColor: '#8e8e8e' }} customStyles={{ color: '#8e8e8e', borderColor: '#8e8e8e' }}
round round
@ -88,7 +89,7 @@ const ItemList:FC<PropsType> = (props) => {
</NormalButton> </NormalButton>
{itemData?.status === 0 && ( {itemData?.status === 0 && (
<NormalButton customClassName={styles.bottomBar__button} type='primary' round onClick={() => handleAudit(itemData?.id)}> <NormalButton customClassName={styles.bottomBar__button} type='primary' plain round onClick={() => handleAudit(itemData?.id)}>
</NormalButton> </NormalButton>
)} )}

View File

@ -120,10 +120,10 @@ const DeliveryDetail: FC = () => {
const BottomBar = useMemo(() => { const BottomBar = useMemo(() => {
return ( return (
<View className={styles.bottomBar}> <View className={styles.bottomBar}>
<NormalButton type='primary' round onClick={handleUploadPic}> <NormalButton plain type='primary' round onClick={handleUploadPic}>
</NormalButton> </NormalButton>
<NormalButton type='primary' plain round onClick={handleAudit}> <NormalButton type='primary' round onClick={handleAudit}>
</NormalButton> </NormalButton>
</View> </View>

View File

@ -115,7 +115,7 @@ const Login: FC = () => {
<Text className={styles.isForgetPwd}></Text> <Text className={styles.isForgetPwd}></Text>
</View> </View>
</View> </View>
<NormalButton circle plain onClick={handleLogin} customClassName={styles['login-button']}> <NormalButton circle onClick={handleLogin} customClassName={styles['login-button']}>
</NormalButton> </NormalButton>
<QuickLogin /> <QuickLogin />

View File

@ -0,0 +1,4 @@
export default {
navigationBarTitleText: '销售统计',
enablePullDownRefresh: true,
}

View File

@ -0,0 +1,370 @@
page {
background: #f7f7f7;
}
.mainBox {
.pussBox {
margin-top: 24px;
display: flex;
align-items: center;
.pussName {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.pussPhone {
margin-left: 88px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
}
.total {
margin-top: 44px;
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
margin-left: 32px;
margin-bottom: 8px;
}
.productBox {
width: 702px;
background: #FFFFFF;
border-radius: 16px;
margin-left: 24px;
padding-bottom: 36px;
overflow: hidden;
.flexMoney {
display: flex;
margin-top: 32px;
align-items: center;
justify-content: space-between;
.flexTotalBox {
display: flex;
align-items: center;
.totalFont {
margin-left: 32px;
margin-right: 8px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.tishi {
font-size: 28px;
}
}
.shoudPay {
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #F64861;
margin-right: 32px;
}
}
}
}
.defaltBox {
margin: 24px;
padding: 24px 32px 24px 24px;
background: #FFFFFF;
border-radius: 16px;
.titleBox {
width: 638px;
display: flex;
justify-content: space-between;
align-items: center;
.title {
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
}
.modeName {
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #337FFF;
}
}
.modeLine {
margin-top: 24px;
width: 638px;
height: 1px;
background: #000000;
opacity: 0.1;
}
}
.goodsBox {
margin-top: 24px;
overflow: hidden;
border-bottom: 8px solid #F7F7F7;
.goodsProduct {
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
margin-left: 32px;
}
.goodsLine {
width: 638px;
height: 1px;
background: #000000;
opacity: 0.1;
margin-left: 32px;
margin-top: 24px;
}
.itemGoods {
margin-top: 24px;
display: flex;
.itemPic {
margin-left: 32px;
margin-right: 42px;
width: 108px;
height: 108px;
background: #322F2F;
border-radius: 8px;
}
.itemRight {
padding-bottom: 24px;
width: 495px;
border-bottom: 1px solid #f7f7f7;
.item_right_top {
margin-bottom: 41px;
display: flex;
align-items: center;
justify-content: space-between;
.itemName {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.itemNums {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
}
.item_right_Bottom {
display: flex;
align-items: center;
justify-content: space-between;
.itemMoney {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.itemMoneyOne {
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
}
}
}
}
.itemGoods:last-child {
margin-top: 24px;
display: flex;
.itemPic {
margin-left: 32px;
margin-right: 42px;
width: 108px;
height: 108px;
background: #322F2F;
border-radius: 8px;
}
.itemRight {
padding-bottom: 24px;
width: 495px;
border-bottom: none;
.item_right_top {
margin-bottom: 41px;
display: flex;
align-items: center;
justify-content: space-between;
.itemName {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.itemNums {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
}
.item_right_Bottom {
display: flex;
align-items: center;
justify-content: space-between;
.itemMoney {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.itemMoneyOne {
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
}
}
}
}
}
.goodsBox:last-child {
border-bottom: none;
}
.detailBox {
display: flex;
margin-top: 24px;
align-items: center;
justify-content: space-between;
.detailRightFlex {
display: flex;
align-items: center;
.detailRight {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.detailBtn {
margin-left: 16px;
width: 65px;
height: 32px;
border-radius: 8px;
border: 1PX solid #337FFF;
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #337FFF;
text-align: center;
line-height: 32px;
}
}
.detailFont {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
}
.remarkFont {
margin-top: 24px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
.safeBottom {
height: 300px;
}
.bottomBox {
display: flex;
justify-content: space-between;
align-items: center;
width: 750px;
height: 160px;
background: #FFFFFF;
position: fixed;
bottom: 0;
padding-bottom: 24px;
// position: relative;
.moreFont {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.8);
margin-left: 48px;
}
.posssBox {
position: absolute;
left: 32px;
z-index: 99;
bottom: 170px;
// width: 120px;
padding: 24px;
background: #fff;
border: 1px solid #ccc;
box-shadow: 2px 2px 2px #ccc;
}
.posssBox:after {
display: inline-block;
position: absolute;
bottom: -20px;
z-index: 88;
// left: 5px;
width: 0;
height: 0px;
content: '';
border-style: solid;
border-width: 20px;
border-color: #fff #fff transparent transparent;
transform: rotate(135deg);
box-shadow: 2px -2px 2px #ccc;
}
}

View File

@ -0,0 +1,7 @@
import { View } from "@tarojs/components"
const saleStatistic = () => {
return <View></View>
}
export default saleStatistic

View File

@ -43,7 +43,7 @@ export default memo<PropsType>((props) => {
</MCheckbox> </MCheckbox>
</View> </View>
<View className={styles.bottomRight}> <View className={styles.bottomRight}>
<NormalButton plain round type='danger' size='normal' onClick={handleSettle} customStyles={{ backgroundColor: '#F44761' }}> <NormalButton round type='danger' size='normal' onClick={handleSettle} customStyles={{ backgroundColor: '#F44761' }}>
<Text style={{ fontSize: '32rpx' }}></Text> <Text style={{ fontSize: '32rpx' }}></Text>
</NormalButton> </NormalButton>
</View> </View>

View File

@ -26,7 +26,7 @@ export default memo<PropsType>((props) => {
</Text> </Text>
</View> </View>
<View className={styles.bottomRight}> <View className={styles.bottomRight}>
<NormalButton plain type='primary' round size='normal' onClick={handleSettle}> <NormalButton type='primary' round size='normal' onClick={handleSettle}>
<Text style={{fontSize: '32rpx'}}></Text> <Text style={{fontSize: '32rpx'}}></Text>
</NormalButton> </NormalButton>
</View> </View>

View File

@ -21,13 +21,7 @@
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
} }
} }
.filterTypeButton {
padding: 0 24px;
font-size: 28px;
}
.filterTypeText {
color: #6e6e6e !important;
}
.filterTimeButton { .filterTimeButton {
grid-column-start: span 2; grid-column-start: span 2;
} }
@ -35,36 +29,6 @@
background-color: #eaf2ff; background-color: #eaf2ff;
} }
.filterButton {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
padding: 0 20px;
box-sizing: border-box;
border: 0 solid transparent;
background-color: #f6f6f6;
border-radius: 8px;
font-size: 28px;
height: 72px;
&--text {
color: #909090;
display: flex;
flex-flow: row nowrap;
justify-content: center;
align-items: center;
}
&:hover {
opacity: 0.7;
}
&--active {
border: 1px solid $color_main;
background-color: #eaf2ff;
.filterButton--text {
color: $color_main;
}
}
}
.filterController { .filterController {
margin-top: 60px; margin-top: 60px;
width: 100%; width: 100%;

View File

@ -1,5 +1,4 @@
import NormalButton from '@/components/normalButton' import NormalButton from '@/components/normalButton'
import Popup from '@/components/popup'
import { View } from '@tarojs/components' import { View } from '@tarojs/components'
import classnames from 'classnames' import classnames from 'classnames'
import styles from './index.module.scss' import styles from './index.module.scss'
@ -9,7 +8,7 @@ import IconFont from '@/components/iconfont/iconfont'
import { EnumTakeGoodsOrderTypeList } from '@/api/index' import { EnumTakeGoodsOrderTypeList } from '@/api/index'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { getFilterData } from '@/common/util' import { getFilterData } from '@/common/util'
import Taro from '@tarojs/taro' import FilterButton from '@/components/filterButton'
interface SearchFilter { interface SearchFilter {
take_goods_order_type?: number take_goods_order_type?: number
@ -28,13 +27,6 @@ interface DeliveryPropsType {
onReset?: () => void onReset?: () => void
} }
interface ButtonPropsType {
isActive: boolean
onClick?: Function
children?: React.ReactNode
customClassName?: string
}
export const filterTimeOptions = { export const filterTimeOptions = {
0: { 0: {
name: '不限', name: '不限',
@ -147,11 +139,14 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
</FilterButton> </FilterButton>
{!!typeList?.length && {!!typeList?.length &&
typeList?.map((item) => { typeList?.map(item => {
return ( return (
<FilterButton isActive={searchFilter.take_goods_order_type === item?.id} onClick={() => handleSelectedType(item?.id)}> <FilterButton isActive={searchFilter.take_goods_order_type === item?.id} onClick={() => handleSelectedType(item?.id)}>
{item.name} {item.name}
</FilterButton> </FilterButton>
// <NormalButton type='info' circle onClick={() => handleSelectedType(item?.id)}>
// {item.name}
// </NormalButton>
) )
})} })}
</View> </View>
@ -173,10 +168,10 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
</View> </View>
</View> </View>
<View className={styles.filterController}> <View className={styles.filterController}>
<NormalButton type='primary' round customClassName={classnames(styles.btn, styles.rest_btn)} onClick={handleReset}> <NormalButton type='primary' plain round customClassName={classnames(styles.btn, styles.rest_btn)} onClick={handleReset}>
</NormalButton> </NormalButton>
<NormalButton type='primary' plain round customClassName={classnames(styles.btn, styles.verify_btn)} onClick={handleConfirm}> <NormalButton type='primary' round customClassName={classnames(styles.btn, styles.verify_btn)} onClick={handleConfirm}>
</NormalButton> </NormalButton>
</View> </View>
@ -184,16 +179,5 @@ const DeliveryFilter = memo<DeliveryPropsType>((props) => {
) )
}) })
const FilterButton: FC<ButtonPropsType> = (props) => {
const { onClick, children, isActive = false, customClassName } = props
const handleClick = () => {
onClick?.()
}
return (
<View className={classnames(styles.filterButton, isActive && styles['filterButton--active'], customClassName)} onClick={handleClick}>
<View className={classnames(styles['filterButton--text'])}>{children}</View>
</View>
)
}
export default DeliveryFilter export default DeliveryFilter

View File

@ -84,13 +84,14 @@ const ItemList:FC<PropsType> = (props) => {
<NormalButton <NormalButton
customClassName={styles.bottomBar__button} customClassName={styles.bottomBar__button}
type='info' type='info'
plain
customStyles={{ color: '#8e8e8e', borderColor: '#8e8e8e' }} customStyles={{ color: '#8e8e8e', borderColor: '#8e8e8e' }}
round round
onClick={() => handleDetail(itemData)}> onClick={() => handleDetail(itemData)}>
</NormalButton> </NormalButton>
{itemData?.status === 0 && ( {itemData?.status === 0 && (
<NormalButton customClassName={styles.bottomBar__button} type='primary' round onClick={() => handleAudit(itemData?.id)}> <NormalButton plain customClassName={styles.bottomBar__button} type='primary' round onClick={() => handleAudit(itemData?.id)}>
</NormalButton> </NormalButton>
)} )}

View File

@ -138,7 +138,7 @@ const TakeDeliveryDetail: FC = () => {
// 采购提货 // 采购提货
return ( return (
<View className={styles.bottomBar}> <View className={styles.bottomBar}>
<NormalButton type='primary' plain round onClick={handleAudit} customStyles={{ width: '100%' }}> <NormalButton type='primary' round onClick={handleAudit} customStyles={{ width: '100%' }}>
</NormalButton> </NormalButton>
</View> </View>
@ -147,10 +147,10 @@ const TakeDeliveryDetail: FC = () => {
// 退货提货 // 退货提货
return ( return (
<View className={styles.bottomBar} style={{ justifyContent: 'space-between' }}> <View className={styles.bottomBar} style={{ justifyContent: 'space-between' }}>
<NormalButton type='primary' round onClick={handleRefuse} customStyles={{ width: '25%' }}> <NormalButton type='primary' plain round onClick={handleRefuse} customStyles={{ width: '25%' }}>
</NormalButton> </NormalButton>
<NormalButton type='primary' plain round onClick={handleAudit} customStyles={{ width: '25%' }}> <NormalButton type='primary' round onClick={handleAudit} customStyles={{ width: '25%' }}>
</NormalButton> </NormalButton>
</View> </View>

View File

@ -82,7 +82,7 @@ const statisticAnalysis: IconCardType[] = [
{ {
iconName: 'icon-xiaoshou', iconName: 'icon-xiaoshou',
name: '销售', name: '销售',
path: '', path: '/pages/saleStatistic/index',
}, },
{ {
iconName: 'icon-duizhang', iconName: 'icon-duizhang',
@ -135,7 +135,7 @@ const UserInfo: FC = () => {
<Text className={styles.userno}>{userInfo.userInfo.user_code}</Text> <Text className={styles.userno}>{userInfo.userInfo.user_code}</Text>
</View> </View>
<View className={styles.right}> <View className={styles.right}>
<NormalButton type='primary' round size='normal' onClick={handleLogout}> <NormalButton plain type='primary' round size='normal' onClick={handleLogout}>
退 退
</NormalButton> </NormalButton>
</View> </View>
@ -151,7 +151,7 @@ const UserInfo: FC = () => {
<LayoutBlock circle> <LayoutBlock circle>
<View className={styles.layoutTitle}></View> <View className={styles.layoutTitle}></View>
<View className={styles['grid-container']}> <View className={styles['grid-container']}>
{feature.map((item) => { {feature.map(item => {
return <IconCard iconName={item.iconName} title={item.name} onClick={() => handleClickIconCard(item)}></IconCard> return <IconCard iconName={item.iconName} title={item.name} onClick={() => handleClickIconCard(item)}></IconCard>
})} })}
</View> </View>
@ -159,7 +159,7 @@ const UserInfo: FC = () => {
<LayoutBlock circle> <LayoutBlock circle>
<View className={styles.layoutTitle}></View> <View className={styles.layoutTitle}></View>
<View className={styles['grid-container']}> <View className={styles['grid-container']}>
{fabric.map((item) => { {fabric.map(item => {
return <IconCard iconName={item.iconName} title={item.name} onClick={() => handleClickIconCard(item)}></IconCard> return <IconCard iconName={item.iconName} title={item.name} onClick={() => handleClickIconCard(item)}></IconCard>
})} })}
</View> </View>
@ -167,7 +167,7 @@ const UserInfo: FC = () => {
<LayoutBlock circle> <LayoutBlock circle>
<View className={styles.layoutTitle}></View> <View className={styles.layoutTitle}></View>
<View className={styles['grid-container']}> <View className={styles['grid-container']}>
{statisticAnalysis.map((item) => { {statisticAnalysis.map(item => {
return <IconCard iconName={item.iconName} title={item.name} onClick={() => handleClickIconCard(item)}></IconCard> return <IconCard iconName={item.iconName} title={item.name} onClick={() => handleClickIconCard(item)}></IconCard>
})} })}
</View> </View>

View File

@ -2,12 +2,12 @@ $color_bg_one: #f8f8f8;
$color_font_one: rgba($color: #000000, $alpha: 0.8); $color_font_one: rgba($color: #000000, $alpha: 0.8);
$color_font_two: #ababab; $color_font_two: #ababab;
$color_font_three: #707070; $color_font_three: #707070;
$color_main: #4581ff;
$color_main: #4581ff;
$color_danger: #e64340; $color_danger: #e64340;
$color_warning: #e6a23c; $color_warning: #e6a23c;
$color_money: #F64861; $color_money: #F64861;
$color_info: rgba($color: #B3B3B3, $alpha: 0.2); $color_info: #909090;
$opacity-disabled: 0.3; $opacity-disabled: 0.3;
$borderStyle: solid; $borderStyle: solid;

View File

@ -3,7 +3,7 @@
/* Project id 3619513 */ /* Project id 3619513 */
// url('/src/styles/iconfont.ttf') format('truetype'); // url('/src/styles/iconfont.ttf') format('truetype');
src: src:
url('iconfont.ttf?t=1663556335905') format('truetype'); url('/src/styles/iconfont.ttf?t=1663556335905') format('truetype');
} }
.iconfont { .iconfont {
@ -296,4 +296,4 @@
.icon-gouwu:before { .icon-gouwu:before {
content: "\e607"; content: "\e607";
} }