index-legacy-c702d424.js 16 KB

1
  1. !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(G){d=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),u=new k(n||[]);return i(a,"_invoke",{value:T(e,r,u)}),a}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(G){return{type:"throw",arg:G}}}r.wrap=f;var _={};function p(){}function h(){}function m(){}var g={};d(g,u,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(N([])));v&&v!==n&&o.call(v,u)&&(g=v);var b=m.prototype=p.prototype=Object.create(g);function w(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function x(t,r){function n(i,a,u,c){var l=s(t[i],t,a);if("throw"!==l.type){var d=l.arg,f=d.value;return f&&"object"==e(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):r.resolve(f).then((function(e){d.value=e,u(d)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var a;i(this,"_invoke",{value:function(e,t){function o(){return new r((function(r,o){n(e,t,r,o)}))}return a=a?a.then(o,o):o()}})}function T(e,t,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 P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===_)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=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===_)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),_;var o=s(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,_;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,_):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,_)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function N(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(o.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=m,i(b,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:h,configurable:!0}),h.displayName=d(m,l,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,d(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},r.awrap=function(e){return{__await:e}},w(x.prototype),d(x.prototype,c,(function(){return this})),r.AsyncIterator=x,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new x(f(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),d(b,l,"Generator"),d(b,u,(function(){return this})),d(b,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=N,k.prototype={constructor:k,reset:function(e){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(L),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.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(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,_):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),_},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:N(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),_}},r}function r(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(l){return void r(l)}u.done?t(c):Promise.resolve(c).then(n,o)}function n(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,c,"next",e)}function c(e){r(a,o,i,u,c,"throw",e)}u(void 0)}))}}System.register(["./index-legacy-fff8b745.js","./index-legacy-3f7db9dd.js","./api-legacy-a2568793.js","./index-legacy-c55612ee.js","./index-legacy-c8da8776.js","./index-legacy-f6b7c75c.js","./index-legacy-32789c37.js"],(function(e,r){"use strict";var o,i,a,u,c,l,d,f,s,_,p,h,m,g,y,v,b,w,x,T,E;return{setters:[function(e){o=e.d,i=e.U,a=e.q,u=e.x,c=e.y,l=e.a,d=e.S,f=e.F,s=e.A,_=e.P,p=e.C,h=e.E},function(e){m=e.u,g=e.a},function(e){y=e.g,v=e.a,b=e.h},function(e){w=e.I},function(e){x=e.C},function(e){T=e.C},function(e){E=e.T}],execute:function(){var I=document.createElement("style");I.textContent="._paymentTitle_1eftd_1{min-height:4.72rem;background:linear-gradient(180deg,#5becff 0%,#259cfe 100%);border-radius:0 0 .21333rem .21333rem}._paymentTitle_1eftd_1 .van-nav-bar .van-icon,._paymentTitle_1eftd_1 .van-nav-bar__title{color:#fff}._paymentTitle_1eftd_1 ._orderType_1eftd_10{padding-top:.93333rem;padding-bottom:2.4rem;display:flex;align-items:center;justify-content:center;color:#fff}._paymentTitle_1eftd_1 ._orderType_1eftd_10 ._img_1eftd_18{width:1.38667rem;height:1.38667rem;margin-right:.37333rem}._paymentTitle_1eftd_1 ._orderType_1eftd_10 span{font-size:.58667rem;font-weight:500;line-height:.8rem}._paymentTitle_1eftd_1 ._orderPrice_1eftd_28{padding-top:.05333rem;font-size:.58667rem;text-align:center;font-size:.37333rem}._mTop_1eftd_34{margin-top:-1.38667rem!important}._cellGroup_1eftd_37{margin:.26667rem .34667rem}._cellGroup_1eftd_37 ._brandName_1eftd_40{line-height:.48rem;font-size:.32rem;padding:0 .16rem;background:linear-gradient(180deg,#FFF5E6 0%,#FFF6E7 100%);border-radius:.10667rem;border:.02667rem solid #FFE9D9;color:#be7332}._cellGroup_1eftd_37 .van-cell{padding:.42667rem .45333rem;font-size:.42667rem;color:#333}._cellGroup_1eftd_37 .van-cell__value{flex:0 auto}._cellGroup_1eftd_37 ._buyDetail_1eftd_57{display:flex;align-items:center;justify-content:space-between;padding:.48rem .48rem 0;font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._cellGroup_1eftd_37 ._buyDetail_1eftd_57 i{display:inline-block;margin-right:.16rem;width:.10667rem;height:.37333rem;background:linear-gradient(180deg,#FFB790 0%,#FF8057 100%);border-radius:.05333rem}._cellGroup_1eftd_37 ._buyDetail_1eftd_57 ._buyDetailTitle_1eftd_75{display:flex;align-items:center}._cellGroup_1eftd_37 ._buyDetail_1eftd_57 ._refundBtn_1eftd_79{font-size:.42667rem;color:#777;line-height:.58667rem}._cellGroup_1eftd_37 ._buyImg_1eftd_84{width:1.54667rem;height:1.54667rem;overflow:hidden;border-radius:.13333rem;margin-right:.24rem}._container_1eftd_91 .van-button{font-size:.48rem;font-weight:500}._dialogTitle_1eftd_95{text-align:left;font-size:.48rem;font-weight:500;color:#333;line-height:.66667rem;padding:.53333rem 0 .4rem .66667rem}._dialogTitle_1eftd_95 i{display:inline-block;width:.10667rem;height:.37333rem;background:#ff8057;border-radius:.05333rem;margin-right:.16rem}._refundContent_1eftd_111{padding:0 .53333rem .66667rem}._refundContent_1eftd_111 ._tips_1eftd_114{font-size:.4rem;color:#333;line-height:.56rem}._refundTitle_1eftd_119{padding-top:.66667rem;font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._refundTitle_1eftd_119 span{color:#f44541}._phoneName_1eftd_129{background:#f2f2f2;border-radius:.16rem}._cancelBtn_1eftd_133{height:1.17333rem;border:none;background:linear-gradient(73deg,#5BECFF 0%,#259CFE 100%);font-size:.42667rem;font-weight:500;margin:.53333rem auto;width:88%}._cancelBtn_1eftd_133._orderNo_1eftd_142{background:#fff;color:#777;border:1Px solid #777}\n",document.head.appendChild(I);var L={paymentTitle:"_paymentTitle_1eftd_1",orderType:"_orderType_1eftd_10",img:"_img_1eftd_18",orderPrice:"_orderPrice_1eftd_28",mTop:"_mTop_1eftd_34",cellGroup:"_cellGroup_1eftd_37",brandName:"_brandName_1eftd_40",buyDetail:"_buyDetail_1eftd_57",buyDetailTitle:"_buyDetailTitle_1eftd_75",refundBtn:"_refundBtn_1eftd_79",buyImg:"_buyImg_1eftd_84",container:"_container_1eftd_91",dialogTitle:"_dialogTitle_1eftd_95",refundContent:"_refundContent_1eftd_111",tips:"_tips_1eftd_114",refundTitle:"_refundTitle_1eftd_119",phoneName:"_phoneName_1eftd_129",cancelBtn:"_cancelBtn_1eftd_133",orderNo:"_orderNo_1eftd_142"},k=""+new URL("icon_refunding-47b787dd.svg",r.meta.url).href,N=""+new URL("icon_success-418d3aaa.svg",r.meta.url).href,P=""+new URL("icon_close-c5194700.svg",r.meta.url).href,G=""+new URL("icon_tradeing-f6dadddb.svg",r.meta.url).href;e("default",o({name:"collection-record-detail",setup:function(){var e=i();a();var r=!!e.query.userRefundOrderId,o=u({refundAudit:"",refundOrderId:"",orders:{},goodsInfos:[],background:"transparent",color:"#fff",backIconColor:"white",timer:null,timerCount:0}),I=function(){var i=n(t().mark((function n(){var i,a,u;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=null,t.prev=1,!r){t.next=8;break}return t.next=5,y(e.query.userRefundOrderId);case 5:a=t.sent,t.next=11;break;case 8:return t.next=10,v(e.query.orderNo);case 10:a=t.sent;case 11:t.next=15;break;case 13:t.prev=13,t.t0=t.catch(1);case 15:if(200===(null===(i=a)||void 0===i?void 0:i.code)){t.next=17;break}return t.abrupt("return");case 17:o.orders=a.data||{},(u=(r?a.data.studentRefundOrderDetails:a.data.goodsInfos)||[]).forEach((function(e){var t=e.goodsUrl?e.goodsUrl.split(",")[0]:"";e.goodsUrl=t,e.brandName=e.brandName?e.brandName:A[e.goodsType]})),o.goodsInfos=u,r&&(o.refundAudit=a.data.refundAudit||"",o.refundOrderId=a.data.userRefundOrderId||"",o.orders.status=o.refundAudit);case 22:case"end":return t.stop()}}),n,null,[[1,13]])})));return function(){return i.apply(this,arguments)}}(),O=function(){var e=n(t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:["WAIT_PAY","PAYING"].includes(o.orders.status)&&o.timerCount<=10?o.timer=setTimeout(n(t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.timerCount+=1,e.next=3,I();case 3:O();case 4:case"end":return e.stop()}}),e)}))),3e3):clearTimeout(o.timer);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A={VIP:"数字化乐器学练工具",INSTRUMENTS:"乐器购买",TEXTBOOK:"教材"};c(n(t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I();case 2:return e.next=4,O();case 4:m(document,"scroll",(function(){g().y.value>52?(o.background="#fff",o.color="#323333",o.backIconColor="black"):(o.background="transparent",o.color="#fff",o.backIconColor="white")}));case 5:case"end":return e.stop()}}),e)}))));var C=function(){var e=n(t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b(o.refundOrderId);case 2:return h("撤销退回成功"),e.next=5,I();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return function(){return l("div",{class:L.paymentResult},[l("div",{class:[L.paymentTitle]},[l(d,{title:r?"申请退回":"领取详情",background:"transparent"},null),o.orders.id&&l(f,null,[l("div",{class:L.orderType},[l(w,{class:L.img,src:(t=o.orders.status,{WAIT_PAY:G,PAYING:G,PAID:N,TIMEOUT:P,FAIL:P,CLOSED:P,ING:k,PASS:N,REJECT:P}[t]||N)},null),l("div",{class:L.orderInfo},[l("span",null,[(e=o.orders.status,{WAIT_PAY:"领取中",PAYING:"领取中",PAID:"领取成功",TIMEOUT:"订单超时",FAIL:"领取失败",CLOSED:"已关闭",ING:"退回申请中",PASS:"已退回",REJECT:"退回失败"}[e])]),"PAID"===o.orders.status?l("div",{class:L.orderPrice},[s("实付金额:¥ "),_(o.orders.paymentCashAmount)]):null,["ING","PASS","REJECT","CLOSED"].includes(o.orders.status)&&l("div",{class:L.orderPrice},[s("退回金额:¥ "),_(o.orders.paymentCashAmount)])])])])]),l(x,{inset:!0,class:[L.cellGroup,L.mTop]},{default:function(){return[l(T,null,{title:function(){return"付款时间"},value:function(){return l("span",null,[o.orders.payTime||o.orders.refundTime||"--"])}}),l(T,null,{title:function(){return"订单编号"},value:function(){return l("span",null,[o.orders.orderNo])}})]}}),l(x,{inset:!0,class:L.cellGroup},{default:function(){return[l("div",{class:L.buyDetail},[l("div",{class:L.buyDetailTitle},[l("i",null,null),s(" 购买详情")])]),o.goodsInfos.map((function(e){return l(T,null,{icon:function(){return l(w,{class:L.buyImg,src:e.goodsUrl},null)},title:function(){return l("div",{class:L.buyContent},[l("p",{class:L.goodsTitle},[e.goodsName]),l(E,{class:L.brandName},{default:function(){return["VIP"===o.orders.orderType?"12个月":e.brandName]}})])},value:function(){return l("span",null,[s("x "),e.goodsNum])}})}))]}}),"ING"===o.refundAudit&&l(p,{class:L.cancelBtn,block:!0,round:!0,type:"primary",onClick:function(){return C()}},{default:function(){return[s("撤销退回")]}})]);var e,t}}}))}}}))}();