1 |
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(L){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,a=Object.create(o.prototype),u=new k(n||[]);return i(a,"_invoke",{value:j(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=f;var p={};function d(){}function v(){}function y(){}var g={};l(g,u,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(P([])));b&&b!==r&&n.call(b,u)&&(g=b);var w=y.prototype=d.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,r){function o(i,a,u,c){var s=h(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):r.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return o("throw",t,u,c)}))}c(s.arg)}var a;i(this,"_invoke",{value:function(t,e){function n(){return new r((function(r,n){o(t,e,r,n)}))}return a=a?a.then(n,n):n()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=O(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return v.prototype=y,i(w,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:v,configurable:!0}),v.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},x(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),l(w,s,"Generator"),l(w,u,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)}))}}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(l){s=!0,o=l}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(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 c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy-fff8b745.js","./index.module-legacy-ef462f1a.js","./index-legacy-49aff192.js","./index-legacy-92beecd4.js","./index-legacy-f6b7c75c.js","./index-legacy-32789c37.js","./use-tab-status-legacy-45817f45.js"],(function(t,e){"use strict";var n,i,c,s,l,f,h,p,d,v,y,g,m,b,w,x,S,j,O,E,A,k,P,C,L,T,G,J,N,R,Y,F,D;return{setters:[function(t){n=t.c,i=t.b,c=t.n,s=t.d,l=t.r,f=t.x,h=t.u,p=t.e,d=t.W,v=t.X,y=t.f,g=t.Y,m=t.a,b=t.Z,w=t.p,x=t._,S=t.$,j=t.k,O=t.q,E=t.y,A=t.A,k=t.I,P=t.C,C=t.a0,L=t.a1,T=t.Q,G=t.D,J=t.E},function(t){N=t.s},function(t){R=t.M},function(t){Y=t.L},function(t){F=t.C},function(t){D=t.T},null],execute:function(){var e=u(n("swipe-cell"),2),U=e[0],I=e[1],Q={name:i(""),disabled:Boolean,leftWidth:c,rightWidth:c,beforeClose:Function,stopPropagation:Boolean},V=s({name:U,props:Q,emits:["open","close","click"],setup:function(t,e){var r,n,o,i=e.emit,a=e.slots,u=l(),c=l(),s=l(),j=f({offset:0,dragging:!1}),O=h(),E=function(t){return t.value?b(t).width:0},A=p((function(){return d(t.leftWidth)?+t.leftWidth:E(c)})),k=p((function(){return d(t.rightWidth)?+t.rightWidth:E(s)})),P=function(e){j.offset="left"===e?A.value:-k.value,r||(r=!0,i("open",{name:t.name,position:e}))},C=function(e){j.offset=0,r&&(r=!1,i("close",{name:t.name,position:e}))},L=function(e){t.disabled||(o=j.offset,O.start(e))},T=function(){var t,e,o,i;j.dragging&&(j.dragging=!1,t=j.offset>0?"left":"right",e=Math.abs(j.offset),o=r?.85:.15,(i="left"===t?A.value:k.value)&&e>i*o?P(t):C(t),setTimeout((function(){n=!1}),0))},G=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"outside";i("click",e),r&&!n&&S(t.beforeClose,{args:[{name:t.name,position:e}],done:function(){return C(e)}})},J=function(t,e){return function(r){e&&r.stopPropagation(),G(t)}},N=function(t,e){var r=a[t];if(r)return m("div",{ref:e,class:I(t),onClick:J(t,!0)},[r()])};return v({open:P,close:C}),y(u,(function(){return G("outside")}),{eventName:"touchstart"}),g("touchmove",(function(e){if(!t.disabled){var i=O.deltaX;if(O.move(e),O.isHorizontal())n=!0,j.dragging=!0,(!r||i.value*o<0)&&w(e,t.stopPropagation),j.offset=x(i.value+o,-k.value,A.value)}}),{target:u}),function(){var t,e={transform:"translate3d(".concat(j.offset,"px, 0, 0)"),transitionDuration:j.dragging?"0s":".6s"};return m("div",{ref:u,class:I(),onClick:J("cell",n),onTouchstartPassive:L,onTouchend:T,onTouchcancel:T},[m("div",{class:I("wrapper"),style:e},[N("left",c),null==(t=a.default)?void 0:t.call(a),N("right",s)])])}}}),W=j(V);t("default",s({name:"shop-address",setup:function(){var t=O(),e=f({isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:20},selectItem:{}}),n=function(){var t=a(o().mark((function t(){var n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!e.isClick){t.next=3;break}return t.abrupt("return");case 3:return e.isClick=!0,t.next=6,G.post("/edu-app/userReceiveAddress/page",{data:r({},e.params)});case 6:if(n=t.sent,e.listState.loading=!1,i=n.data||{},!(e.list.length>0&&1===i.current)){t.next=11;break}return t.abrupt("return");case 11:e.list=e.list.concat(i.rows||[]),e.listState.finished=i.current>=i.pages,e.params.page=i.current+1,e.listState.dataShow=e.list.length>0,e.isClick=!1,t.next=23;break;case 18:t.prev=18,t.t0=t.catch(0),e.listState.dataShow=!1,e.listState.finished=!0,e.isClick=!1;case 23:case"end":return t.stop()}}),t,null,[[0,18]])})));return function(){return t.apply(this,arguments)}}();return E((function(){n()})),function(){var r,i;return m("div",{class:[N.shopAddress]},[e.listState.dataShow?m(Y,{finished:e.listState.finished,finishedText:" ",class:[N.liveList],onLoad:n,immediateCheck:!1},(i=r=e.list.map((function(r){return m(W,{class:N.swipeCell,beforeClose:function(t){return function(t,r){if("right"!==t.position)return!0;T({title:"确定删除吗?",confirmButtonColor:"#FF8021"}).then(a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,G.post("/edu-app/userReceiveAddress/remove",{requestType:"form",data:{id:r.id}});case 2:return setTimeout((function(){J("删除成功")}),100),setTimeout((function(){e.params.page=1,e.list=[],e.listState.dataShow=!0,e.listState.loading=!1,e.listState.finished=!1,n()}),1100),t.abrupt("return",!0);case 5:case"end":return t.stop()}}),t)}))))}(t,r)}},{default:function(){return m(F,{center:!0,onClick:function(){return function(e){sessionStorage.setItem("addressDetails",JSON.stringify(e)),t.back()}(r)}},{title:function(){return m("div",{class:N.title},[m("span",{class:N.name},[r.name]),m("span",{class:N.phone},[r.phoneNumber]),r.defaultStatus&&m(D,{plain:!0,color:"#FF8057"},{default:function(){return[A("默认")]}})])},label:function(){return m("div",{class:N.content},[r.provinceName,r.cityName,r.regionName,r.detailAddress])},"right-icon":function(){return m(k,{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(e){e.stopPropagation(),function(e){t.push({path:"/addressOperation",query:{id:e.id}})}(r)}},null)}})},right:function(){return m(P,{type:"danger"},{default:function(){return[A("删除")]}})}})})),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?r:{default:function(){return[r]}})):m("div",{style:{"min-height":"calc(100vh - var(--header-height))",display:"flex","align-items":"center"}},[m(C,{description:"暂无收货地址"},null)]),m(R,{position:"bottom"},{default:function(){return[m("div",{class:"btnGroup"},[m(P,{type:"primary",round:!0,block:!0,class:N.createBtn,onClick:function(){t.push("addressOperation")}},{default:function(){return[A("新建收货地址")]}})])]}})])}}}))}}}))}();
|