This commit is contained in:
2023-05-16 11:46:25 +08:00
parent 48449bd8f3
commit 7d4779b9ff
781 changed files with 123 additions and 785 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[6370],{4384:function(e,s,r){var a=r(4165),n=r(5861),t=r(9439),d=r(2954),i=r.n(d),c=r(1515),l=r(7294),o=r(9579),u=r(2185),h=r(6028),f=r(1251),p=r(5893),m=function AddressList(e,s){var r,m,v,x,_=i().getCurrentPages(),g=_[_.length-2],j=(0,l.useState)(),w=(0,t.Z)(j,2),N=w[0],b=w[1],k=e.addButtonEnabled,Z=void 0===k||k,G=e.focusBorderEnabled,C=void 0!==G&&G,y=(0,u.gV)(),D=y.fetchData,I=y.state,L=function(){var s=(0,n.Z)((0,a.Z)().mark((function _callee(){var s,r,n,t,d;return(0,a.Z)().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,D({purchaser_id:e.purchaser_id});case 2:n=a.sent,e.id?b(e.id):null===(t=n.data.list)||void 0===t||t.every((function(e){return!e.is_default||(b(e.id),!1)})),d=[],null==n||null===(s=n.data)||void 0===s||null===(r=s.list)||void 0===r||r.forEach((function(e){d.push(null==e?void 0:e.id)})),g.setData({ids:d});case 7:case"end":return a.stop()}}),_callee)})));return function getData(){return s.apply(this,arguments)}}();(0,d.useDidShow)((function(){return L(),i().eventCenter.on("addressList:refresh",L),function(){i().eventCenter.off("addressList:refresh",L)}}));var S=(0,l.useState)(!1),E=(0,t.Z)(S,2),R=E[0],B=E[1],A=function(){var e=(0,n.Z)((0,a.Z)().mark((function _callee2(){return(0,a.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return B(!0),e.next=3,L();case 3:B(!1);case 4:case"end":return e.stop()}}),_callee2)})));return function handleRefresh(){return e.apply(this,arguments)}}(),T=(0,d.useRouter)(),$=(0,f.O8)().fetchData,z=function(){var s=(0,n.Z)((0,a.Z)().mark((function _callee3(s,r){var n;return(0,a.Z)().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:if(!T.params.orderId||"-100"==T.params.orderId){a.next=10;break}return console.log("-100"!=T.params.orderId,"ssss"),console.log(void 0!==T.params.orderId,"router.params.orderId"),i().showLoading({title:"请稍等...",mask:!0}),a.next=6,$({address_id:s.id,id:Number(T.params.orderId),shipment_mode:2});case 6:"success"===(n=a.sent).msg?(i().hideLoading(),i().showToast({title:"成功",icon:"success"}),i().navigateBack({delta:1})):(i().hideLoading(),i().showToast({title:n.msg,icon:"error"})),a.next=12;break;case 10:g.setData({addressObj:s}),i().navigateBack({delta:1});case 12:e.onSelect&&e.onSelect(s,r),C&&b(null==s?void 0:s.id);case 14:case"end":return a.stop()}}),_callee3)})));return function handleSelect(e,r){return s.apply(this,arguments)}}();return(0,l.useImperativeHandle)(s,(function(){return{getData:L}})),(0,p.jsxs)(c.G7,{className:"address-scroll-view",children:[(0,p.jsx)(c.pf,{scrollY:!0,refresherEnabled:e.refresherEnabled,enhanced:!0,refresherTriggered:R,onRefresherRefresh:A,children:(0,p.jsx)(c.G7,{className:"address-scroll-view-content",children:(null==I||null===(r=I.data)||void 0===r||null===(m=r.list)||void 0===m?void 0:m.length)>0?null==I||null===(v=I.data)||void 0===v||null===(x=v.list)||void 0===x?void 0:x.map((function(s,r){return(0,p.jsxs)(c.G7,{onClick:function onClick(){return z(s,r)},className:"address-list ".concat(N==s.id&&"address-active"),children:[(0,p.jsxs)(c.G7,{className:"address-container",children:[(0,p.jsxs)(c.G7,{children:[(0,p.jsxs)(c.G7,{className:"address-user",children:[s.name,(0,p.jsx)(c.xv,{className:"address-list-phone",children:s.phone}),s.is_default&&(0,p.jsx)(o.Z,{type:"primary",size:"small",circle:!0,plain:!0,customClassName:"address-list-default",children:"默认"})]}),(0,p.jsx)(c.G7,{className:"address-list-bottom",children:(0,p.jsx)(c.G7,{className:"address-list-info",children:(0,p.jsx)(c.G7,{children:s.province_name+s.city_name+s.district_name+s.address_detail})})})]}),(0,p.jsx)(c.G7,{children:(0,p.jsx)(c.C3,{onClick:function onClick(e){return e.stopPropagation()},url:"/pages/addAddress/index?type=edit&id=".concat(s.id,"&&purchaser_id=").concat(Number(e.purchaser_id)),hoverClass:"none",className:"address-edit",children:(0,p.jsx)(h.Z,{name:"icon-bianji",size:40,color:"#717171"})})})]}),""!==s.factory&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.G7,{className:"line"}),(0,p.jsxs)(c.G7,{className:"bottom-font",children:["加工厂:",s.factory]})]})]},r)})):(0,p.jsx)(c.G7,{className:"address-no-data",children:"暂未添加地址"})})}),Z&&(0,p.jsx)(c.C3,{url:"/pages/addAddress/index?type=add&purchaser_id=".concat(Number(e.purchaser_id)),hoverClass:"none",className:"add-address",children:"添加收货地址"})]})};s.Z=(0,l.memo)((0,l.forwardRef)(m))}}]);
@@ -1 +0,0 @@
.common_safe_area_y{background-color:transparent;height:constant(safe-area-inset-bottom);height:env(safe-area-inset-bottom);width:100%}.flex-col{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:column nowrap;-ms-flex-flow:column nowrap;flex-flow:column nowrap}.flex-row{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.justify-between{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.justify-center{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.items-center{-ms-flex-align:center;-webkit-align-items:center;align-items:center}.flex-item{-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto}.full-100{height:100%;width:100%}.color-blue{color:#3287ec}.color-yellow{color:#ff9100}.color-green{color:#00b837}.color-grey{color:#707070}.color-white{color:#fff}.s-w::after{content:"W";font-size:28rpx}.s-e::after{content:"E";font-size:28rpx}.filter{-webkit-filter:blur(1);filter:blur(1)}.address-container{-ms-flex-pack:justify;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-justify-content:space-between;justify-content:space-between}.address-scroll-view{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;position:relative}.address-scroll-view scroll-view{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%}.address-scroll-view .address-scroll-view-content{padding-bottom:300rpx}.address-scroll-view .address-list{background:#fff;border-radius:20rpx;-webkit-box-sizing:border-box;box-sizing:border-box;margin:18rpx 24rpx 0;padding:24rpx 30rpx}.address-scroll-view .address-active{border:1px solid #68b4ff}.address-scroll-view .address-list-last{margin-bottom:300rpx}.address-scroll-view .address-user{-ms-flex-align:center;-webkit-align-items:center;align-items:center;color:#000;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:32rpx;font-weight:700;text-align:left}.address-scroll-view .address-list-default{background:#fff;border-radius:6rpx;color:#007aff;font-size:20rpx;font-weight:400;padding:4rpx 10rpx;text-align:center}.address-scroll-view .address-list-phone{color:#717171;font-size:28rpx;font-weight:400;margin-left:16rpx;margin-right:16rpx}.address-scroll-view .address-edit{padding:10rpx}.address-scroll-view .address-edit .icon-bianji{font-size:40rpx}.address-scroll-view .address-list-info{color:#000;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:28rpx;font-weight:400;width:557rpx}.address-scroll-view .address-list-info view{max-width:557rpx}.address-scroll-view .address-list-bottom{-ms-flex-pack:justify;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-top:10rpx}.address-scroll-view .add-address{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:#007aff;border-radius:40rpx;bottom:100rpx;color:#fff;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:32rpx;font-weight:400;height:82rpx;-webkit-justify-content:center;justify-content:center;left:50%;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:668rpx}.address-scroll-view .address-no-data{-webkit-box-sizing:border-box;box-sizing:border-box;color:#707070;font-size:24rpx;font-weight:400;height:100%;padding-top:40%;text-align:center}.address-scroll-view .line{background:#000;height:1px;margin-top:16rpx;opacity:.1;width:100%}.address-scroll-view .bottom-font{color:#676767;font-size:28rpx;font-weight:400;margin-top:16rpx}
@@ -1 +0,0 @@
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[7097],{2185:function(r,e,t){t.d(e,{Rf:function(){return s},V7:function(){return p},Wj:function(){return o},cN:function(){return d},gV:function(){return n},qv:function(){return c}});var u=t(1948),s=function GetAddressListApi(){return(0,u.Q)({url:"/v2/mp/district/list",method:"get"})},n=function MpPurchaserAddressList(){return(0,u.Q)({url:"/v2/mp/purchaser/address/list",method:"get"})},d=function MpPurchaserAddress(){return(0,u.Q)({url:"/v2/mp/purchaser/address",method:"post"})},c=function MpPurchaserAddressGet(){return(0,u.Q)({url:"/v2/mp/purchaser/address",method:"get"})},p=function MpPurchaserAddressPut(){return(0,u.Q)({url:"/v2/mp/purchaser/address",method:"put"})},o=function MpPurchaserAddressDelete(){return(0,u.Q)({url:"/v2/mp/purchaser/address",method:"delete"})}}}]);
@@ -1 +0,0 @@
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[5992],{1687:function(r,u,t){t.d(u,{Rs:function(){return o},hf:function(){return s},lb:function(){return p},mD:function(){return a},tk:function(){return c},xF:function(){return e}});var n=t(1948),e=function MpPurchaser(){return(0,n.Q)({url:"/v2/mp/purchaser",method:"get"})},c=function MpPurchaserPost(){return(0,n.Q)({url:"/v2/mp/purchaser",method:"post"})},o=function MpPurchaserPut(){return(0,n.Q)({url:"/v2/mp/purchaser",method:"put"})},p=function MpPurchaserList(){return(0,n.Q)({url:"/v2/mp/purchaser/label/list",method:"get"})},s=function MpPurchaserLabelAdd(){return(0,n.Q)({url:"/v2/mp/purchaser/label/add",method:"post"})},a=function EnumSourcePlatform(){return(0,n.Q)({url:"/v1/mp/enum/sourcePlatform",method:"get"})}}}]);