index-legacy.6d511ce0.js 9.3 KB

1
  1. !function(){function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e,n,r,i,a,o){try{var s=t[a](o),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,a){var o=t.apply(e,n);function s(t){r(o,i,a,s,u,"next",t)}function u(t){r(o,i,a,s,u,"throw",t)}s(void 0)}))}}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);o=!0);}catch(u){s=!0,i=u}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var s=document.createElement("style");s.innerHTML=".van-swipe-cell{position:relative;overflow:hidden;cursor:grab}.van-swipe-cell__wrapper{transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-property:transform}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;transform:translate(-100%)}.van-swipe-cell__right{right:0;transform:translate(100%)}\n",document.head.appendChild(s),System.register(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.c8c5bc4e.js","./index-legacy.9d25098b.js","./index-legacy.43e69380.js","./index.module-legacy.67620c49.js","./index-legacy.5d9f864a.js","./index-legacy.6ac2a941.js","./use-tab-status-legacy.d7434e0b.js","./index-legacy.4bad5b90.js"],(function(t){"use strict";var n,r,o,s,u,c,l,f,p,d,g,h,m,v,b,y,A,w,C,S,j,O,k,x,P,E,T,R,J,U,Y,D,G;return{setters:[function(t){n=t.E,r=t.ab,o=t.G,s=t.d,u=t.U,c=t.S,l=t.ai,f=t.W,p=t.M,d=t.ak,g=t.bx,h=t.j,m=t.Y,v=t.aq,b=t.as,y=t.aC,A=t.O,w=t.Q,C=t.V,S=t.A,j=t.N,O=t.B,k=t.C,x=t.$,P=t.D,E=t.y,T=t.T},function(t){R=t.C},function(t){J=t.T},function(t){U=t.L},function(t){Y=t.s},function(t){D=t.C},function(t){G=t.C},function(){},function(){}],execute:function(){var V=a(n("swipe-cell"),2),M=V[0],W=V[1],q={name:r(""),disabled:Boolean,leftWidth:o,rightWidth:o,beforeClose:Function,stopPropagation:Boolean},z=s({name:M,props:q,emits:["open","close","click"],setup:function(t,e){var n,r,i,a=e.emit,o=e.slots,s=u(),A=u(),w=u(),C=c({offset:0,dragging:!1}),S=l(),j=function(t){return t.value?m(t).width:0},O=f((function(){return p(t.leftWidth)?+t.leftWidth:j(A)})),k=f((function(){return p(t.rightWidth)?+t.rightWidth:j(w)})),x=function(e){C.offset="left"===e?O.value:-k.value,n||(n=!0,a("open",{name:t.name,position:e}))},P=function(e){C.offset=0,n&&(n=!1,a("close",{name:t.name,position:e}))},E=function(e){t.disabled||(i=C.offset,S.start(e))},T=function(e){if(!t.disabled){var a=S.deltaX;if(S.move(e),S.isHorizontal())r=!0,C.dragging=!0,(!n||a.value*i<0)&&v(e,t.stopPropagation),C.offset=b(a.value+i,-k.value,O.value)}},R=function(){var t,e,i,a;C.dragging&&(C.dragging=!1,t=C.offset>0?"left":"right",e=Math.abs(C.offset),i=n?.85:.15,(a="left"===t?O.value:k.value)&&e>a*i?x(t):P(t),setTimeout((function(){r=!1}),0))},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"outside";a("click",e),n&&!r&&y(t.beforeClose,{args:[{name:t.name,position:e}],done:function(){return P(e)}})},U=function(t,e){return function(n){e&&n.stopPropagation(),J(t)}},Y=function(t,e){var n=o[t];if(n)return h("div",{ref:e,class:W(t),onClick:U(t,!0)},[n()])};return d({open:x,close:P}),g(s,(function(){return J("outside")}),{eventName:"touchstart"}),function(){var t,e={transform:"translate3d(".concat(C.offset,"px, 0, 0)"),transitionDuration:C.dragging?"0s":".6s"};return h("div",{ref:s,class:W(),onClick:U("cell",r),onTouchstart:E,onTouchmove:T,onTouchend:R,onTouchcancel:R},[h("div",{class:W("wrapper"),style:e},[Y("left",A),null==(t=o.default)?void 0:t.call(o),Y("right",w)])])}}}),B=A(z);t("default",s({name:"shop-address",setup:function(){var t=w(),n=c({isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:20},selectItem:{}}),r=function(){var t=i(regeneratorRuntime.mark((function t(){var r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!n.isClick){t.next=3;break}return t.abrupt("return");case 3:return n.isClick=!0,t.next=6,E.get("/api-mall-portal/member/address/list",{params:e({},n.params)});case 6:if(r=t.sent,n.listState.loading=!1,i=r.data||{},!(n.list.length>0&&1===i.current)){t.next=11;break}return t.abrupt("return");case 11:n.list=n.list.concat(i||[]),n.listState.finished=!0,n.params.page=i.current+1,n.listState.dataShow=n.list.length>0,n.isClick=!1,t.next=23;break;case 18:t.prev=18,t.t0=t.catch(0),n.listState.dataShow=!1,n.listState.finished=!0,n.isClick=!1;case 23:case"end":return t.stop()}}),t,null,[[0,18]])})));return function(){return t.apply(this,arguments)}}();return C((function(){r()})),function(){var e,a;return h("div",{class:[Y.shopAddress]},[h(G,null,null),n.listState.dataShow?h(U,{finished:n.listState.finished,finishedText:" ",class:[Y.liveList],onLoad:r,immediateCheck:!1},(a=e=n.list.map((function(e){return h(B,{class:Y.swipeCell,beforeClose:function(t){return function(t,e){if("right"!==t.position)return!0;P.confirm({title:"提示",message:"确定删除吗?",confirmButtonColor:"#FF8021"}).then(i(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,E.post("/api-mall-portal/member/address/delete/"+e.id,{requestType:"form",data:{}});case 2:return setTimeout((function(){T("删除成功")}),100),setTimeout((function(){n.params.page=1,n.list=[],n.listState.dataShow=!0,n.listState.loading=!1,n.listState.finished=!1,r()}),1100),t.abrupt("return",!0);case 5:case"end":return t.stop()}}),t)}))))}(t,e)}},{default:function(){return h(R,{center:!0,onClick:function(){return function(e){sessionStorage.setItem("addressDetails",JSON.stringify(e)),t.back()}(e)}},{title:function(){return h("div",{class:Y.title},[h("span",{class:Y.name},[e.name]),h("span",{class:Y.phone},[e.phoneNumber]),e.defaultStatus&&h(J,{plain:!0,color:"#FF8057"},{default:function(){return[S("默认")]}})])},label:function(){return h("div",{class:Y.content},[e.province,e.city,e.region,e.detailAddress])},"right-icon":function(){return h(j,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA15JREFUWEft2E+ME2UYx/HvMxJhu0ZMWJAbwUTihRgucjDKn13+XEhQsp0uRuPJRDkAwS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EOvsf2eN7gbiHuWgAAAAASUVORK5CYII=",size:"18",onClick:function(n){n.stopPropagation(),function(e){t.push({path:"/addressOperation",query:{id:e.id}})}(e)}},null)}})},right:function(){return h(O,{type:"danger"},{default:function(){return[S("删除")]}})}})})),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!x(a)?e:{default:function(){return[e]}})):h("div",{style:{"min-height":"calc(100vh - var(--header-height))",display:"flex","align-items":"center"}},[h(k,{type:"empty",tips:"暂无收货地址",btnStatus:!1},null)]),h(D,{position:"bottom"},{default:function(){return[h("div",{class:"btnGroup"},[h(O,{type:"primary",round:!0,block:!0,class:Y.createBtn,onClick:function(){t.push("/addressOperation")}},{default:function(){return[S("新建收货地址")]}})])]}})])}}}))}}}))}();