index-legacy.f807eeb3.js 8.6 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}System.register(["./index-legacy.90c82f08.js","./index.module-legacy.d054e180.js","./index-legacy.84457c4c.js","./index-legacy.789a0824.js","./index-legacy.f3e5e283.js","./index-legacy.92c1b9d6.js","./use-tab-status-legacy.bafe466c.js"],(function(t){"use strict";var n,r,o,s,u,c,l,f,d,p,g,h,m,v,b,y,A,S,w,C,O,j,k,P,x,E,R,T,J,U,D,Y,q;return{setters:[function(t){n=t.t,r=t.w,o=t.z,s=t.d,u=t.R,c=t.r,l=t.aq,f=t.y,d=t.a1,p=t.W,g=t.as,h=t.a0,m=t.c,v=t.an,b=t.a4,y=t.aU,A=t.aR,S=t.D,w=t.ag,C=t.$,O=t.q,j=t.a5,k=t.B,P=t.ak,x=t.al,E=t.b9,R=t.m,T=t.o},function(t){J=t.s},function(t){U=t.O},function(t){D=t.L},function(t){Y=t.C},function(t){q=t.T},function(){}],execute:function(){var G=a(n("swipe-cell"),2),V=G[0],W=G[1],z={name:r(""),disabled:Boolean,leftWidth:o,rightWidth:o,beforeClose:Function,stopPropagation:Boolean},M=s({name:V,props:z,emits:["open","close","click"],setup:function(t,e){var n,r,i,a=e.emit,o=e.slots,s=u(),S=u(),w=u(),C=c({offset:0,dragging:!1}),O=l(),j=function(t){return t.value?v(t).width:0},k=f((function(){return d(t.leftWidth)?+t.leftWidth:j(S)})),P=f((function(){return d(t.rightWidth)?+t.rightWidth:j(w)})),x=function(e){C.offset="left"===e?k.value:-P.value,n||(n=!0,a("open",{name:t.name,position:e}))},E=function(e){C.offset=0,n&&(n=!1,a("close",{name:t.name,position:e}))},R=function(e){t.disabled||(i=C.offset,O.start(e))},T=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?k.value:P.value)&&e>a*i?x(t):E(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&&A(t.beforeClose,{args:[{name:t.name,position:e}],done:function(){return E(e)}})},U=function(t,e){return function(n){e&&n.stopPropagation(),J(t)}},D=function(t,e){var n=o[t];if(n)return m("div",{ref:e,class:W(t),onClick:U(t,!0)},[n()])};return p({open:x,close:E}),g(s,(function(){return J("outside")}),{eventName:"touchstart"}),h("touchmove",(function(e){if(!t.disabled){var a=O.deltaX;if(O.move(e),O.isHorizontal())r=!0,C.dragging=!0,(!n||a.value*i<0)&&b(e,t.stopPropagation),C.offset=y(a.value+i,-P.value,k.value)}}),{target:s}),function(){var t,e={transform:"translate3d(".concat(C.offset,"px, 0, 0)"),transitionDuration:C.dragging?"0s":".6s"};return m("div",{ref:s,class:W(),onClick:U("cell",r),onTouchstartPassive:R,onTouchend:T,onTouchcancel:T},[m("div",{class:W("wrapper"),style:e},[D("left",S),null==(t=o.default)?void 0:t.call(o),D("right",w)])])}}}),N=S(M);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,R.post("/api-student/userReceiveAddress/page",{data: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.rows||[]),n.listState.finished=i.current>=i.pages,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 m("div",{class:[J.shopAddress,!n.listState.dataShow&&"emptyRootContainer"]},[n.listState.dataShow?m(D,{finished:n.listState.finished,finishedText:" ",class:[J.liveList],onLoad:r,immediateCheck:!1},(a=e=n.list.map((function(e){return m(N,{class:J.swipeCell,beforeClose:function(t){return function(t,e){if("right"!==t.position)return!0;E({title:"确定删除吗?"}).then(i(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,R.post("/api-student/userReceiveAddress/remove",{requestType:"form",data:{id:e.id}});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 m(Y,{center:!0,onClick:function(){return function(e){sessionStorage.setItem("addressDetails",JSON.stringify(e)),t.back()}(e)}},{title:function(){return m("div",{class:J.title},[m("span",{class:J.name},[e.name]),m("span",{class:J.phone},[e.phoneNumber]),e.defaultStatus&&m(q,{round:!0,color:"#FF8057"},{default:function(){return[O("默认")]}})])},label:function(){return m("div",{class:J.content},[e.provinceName,e.cityName,e.regionName,e.detailAddress])},"right-icon":function(){return m(j,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA15JREFUWEft2E+ME2UYx/HvMxJhu0ZMWJAbwUTihRgucjDKn13+XEhQsp0uRuPJRDkAwSgK275Tl4UTSmIkcPK2O2nCv10SE9iEg9EDF8GDR5EEhXQPBg7ALjuPmXa2NLXzr50mHJhT23n7vp/+5nneaSs8Y4f0yqPGfh/kS9A3gX+BCzz2RuV4pRq1Zk9A6hQMqqU2C9/iibdVxip/hqEyB6nJl0FGGwsq1xHWAgPBa3/xxNsShsoUpE6+jDYwHsJnUnLPqBkZQLyrKP7l849QVGYgNYVvQI8GC3pYfCpF9+xiUjr+3grmX5yJQ2UCUmOPAUfCMJEo9d4Vp3J7cUzXoKSYCNQvYty3MwGpyR8D+ToumdaOql++pb+i+nr9nLdBTOU3/1HHCXWKaSRVtg/jcTx4vkeMe65jkJrCOOhXaZNpYMzHy+DhNWBj7TWLt6ToXu8IpE5hHO0Cc3C4j+VyEWRbDSPcoOhuEEFTg9TYfsSHO07Gx7zywkVUFzFV5tkkY+4fqYs6E8xy6xIwFCRTRa0hMRM3m4s+UVGryZ+o3yjrLdG66bV20f+66uRwH/ebMDAL1mArJtElU6cwimq5S8wUMBjMEYqJBakzsg31fqr1QafJPLCm0GSYSJCazUvg1d+BN4JPdkiMezLu8jxt7V056JsC2ZokmdiiVpPfDXK+PlCuiJncng7TPwWaChOTkD0BFGoI9d4Rp/JzEpCaXTk0N42wJU0yCRKybwFrEO5JyV2dGCO5abQzTGhC9fpZNQfibwszYtz63hFx1JIhdxnY3EjGYkiK7o249zafb7sPqRleDdY/Qf1MiJncG4n5/MN+Xpqb7hYTnlB5eD2eVd9BhVNScg+EgdR88DIsXALd1E0ykTWkTmEQ1asB6KiU3GPtQMG4H4B1WWAiasj2u8vvMj+hL5hnmiW6EmElC7IKS14D3QGsb4LexWJn2ppp/aDta8jJ70Pl+xTFOAPykZjJv1O8p+3Q9qCivR+L72ImnwO9gqenpVzxuyuTI6TLRgbAOwWsoHZnpopKFQv/Z/AsunAH+m+K+fFRJoqmSRJ9/ch60aj5noPi0n72Egq+K/s78bI4fY/PPwL5VtTYfucs/lXS4zVjp58VdQo26n0CsjR2eE8H6GPEOvsf2eN7gbiHuWgAAAAASUVORK5CYII=",size:"18",onClick:function(n){n.stopPropagation(),function(e){t.push({path:"/addressOperation",query:{id:e.id}})}(e)}},null)}})},right:function(){return m(k,{type:"danger"},{default:function(){return[O("删除")]}})}})})),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!x(a)?e:{default:function(){return[e]}})):m(P,{btnStatus:!1,tips:"暂无收货地址"},null),m(U,{position:"bottom"},{default:function(){return[m("div",{class:"btnGroup"},[m(k,{type:"primary",round:!0,block:!0,onClick:function(){t.push("addressOperation")}},{default:function(){return[O("新建收货地址")]}})])]}})])}}}))}}}))}();