index-legacy-266e5858.js 27 KB

1
  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(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},o=Object.prototype,n=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,r){return t[e]=r}}function d(t,e,r,o){var n=e&&e.prototype instanceof p?e:p,i=Object.create(n.prototype),c=new P(o||[]);return a(i,"_invoke",{value:j(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}r.wrap=d;var m={};function p(){}function h(){}function v(){}var g={};u(g,c,(function(){return this}));var _=Object.getPrototypeOf,y=_&&_(_(z([])));y&&y!==o&&n.call(y,c)&&(g=y);var b=v.prototype=p.prototype=Object.create(g);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(e,r){function o(a,i,c,l){var s=f(e[a],e,i);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==t(d)&&n.call(d,"__await")?r.resolve(d.__await).then((function(t){o("next",t,c,l)}),(function(t){o("throw",t,c,l)})):r.resolve(d).then((function(t){u.value=t,c(u)}),(function(t){return o("throw",t,c,l)}))}l(s.arg)}var i;a(this,"_invoke",{value:function(t,e){function n(){return new r((function(r,n){o(t,e,r,n)}))}return i=i?i.then(n,n):n()}})}function j(t,e,r){var o="suspendedStart";return function(n,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw a;return C()}for(r.method=n,r.arg=a;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var l=f(t,e,r);if("normal"===l.type){if(o=r.done?"completed":"suspendedYield",l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o="completed",r.method="throw",r.arg=l.arg)}}}function x(t,e){var r=e.method,o=t.iterator[r];if(void 0===o)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var n=f(o,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,m;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function S(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function z(t){if(t){var e=t[c];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 h.prototype=v,a(b,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:h,configurable:!0}),h.displayName=u(v,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},k(w.prototype),u(w.prototype,l,(function(){return this})),r.AsyncIterator=w,r.async=function(t,e,o,n,a){void 0===a&&(a=Promise);var i=new w(d(t,e,o,n),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(b),u(b,s,"Generator"),u(b,c,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var o in e)r.push(o);return r.reverse(),function t(){for(;r.length;){var o=r.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=z,P.prototype={constructor:P,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(L),!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,o){return i.type="throw",i.arg=t,e.next=r,o&&(e.method="next",e.arg=void 0),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},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),m},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),L(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;L(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:z(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),m}},r}function r(t,e,r,o,n,a,i){try{var c=t[a](i),l=c.value}catch(s){return void r(s)}c.done?e(l):Promise.resolve(l).then(o,n)}function o(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 o,n,a,i,c=[],l=!0,s=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(o=a.call(r)).done)&&(c.push(o.value),c.length!==e);l=!0);}catch(u){s=!0,n=u}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw n}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(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 n(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 n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}System.register(["./index-legacy-33e7c04a.js","./student-register-store-legacy-9f49825f.js","./index-legacy-5db156ac.js","./index-legacy-6532db63.js","./index-legacy-1763ec1e.js","./index-legacy-0a2470d3.js","./index-legacy-c77491e4.js","./index-legacy-9a7a944e.js","./index-legacy-12d329ec.js","./Checker-legacy-12e3c5f1.js"],(function(t,n){"use strict";var a,i,c,l,s,u,d,f,m,p,h,v,g,_,y,b,k,w,j,x,S,L,P,z,C,I,T,E,O,W,B,N,D,Y,Z,A,H,G,X,R,F,M,$,J,U,q,V,Q,K,tt,et,rt,ot,nt,at,it,ct,lt,st,ut;return{setters:[function(t){a=t.i,i=t.d,c=t.aG,l=t.n,s=t.$,u=t.aW,d=t.q,f=t.D,m=t.x,p=t.a7,h=t.g,v=t.al,g=t.aX,_=t.ac,y=t.at,b=t.aa,k=t.aY,w=t.ao,j=t.t,x=t.aZ,S=t.l,L=t.aQ,P=t.m,z=t.a8,C=t.E,I=t.aE,T=t.aF,E=t.L,O=t.o,W=t.aU,B=t.a3,N=t.ai,D=t.I,Y=t.am,Z=t.ax,A=t.aB,H=t.a_,G=t.a$,X=t.w,R=t.b0,F=t.B,M=t.a,$=t.f,J=t.h,U=t.ap,q=t.aO,V=t.F,Q=t.b1,K=t.M},function(t){tt=t.u},function(t){et=t.a,rt=t.S},function(t){ot=t.I},function(t){nt=t.C},function(t){at=t.C},function(t){it=t.R,ct=t.C},function(t){lt=t.R,st=t.a},function(t){ut=t.T},null],execute:function(){var n=document.createElement("style");n.textContent='._swipeItemImg_tka2j_1,._swipe_tka2j_1{width:100%;height:10rem;vertical-align:middle}._custom-indicator_tka2j_7{position:absolute;right:.13333rem;bottom:.13333rem;padding:.10667rem .21333rem;font-size:.37333rem;color:#fff;background:rgba(0,0,0,.5);border-radius:.32rem}._goodsHead_tka2j_17{padding:.21333rem 0}._goodsHead_tka2j_17 .van-cell{padding-top:.13333rem;padding-bottom:.13333rem}._priceGroup_tka2j_24{display:flex;align-items:center}._priceGroup_tka2j_24 ._price_tka2j_24{color:#ff4e19;font-size:.64rem;font-weight:700}._priceGroup_tka2j_24 ._price_tka2j_24 i{font-size:.42667rem;font-style:normal}._priceGroup_tka2j_24 ._delPrice_tka2j_37{font-size:.37333rem;color:#999;margin-left:.32rem;line-height:.53333rem}._priceGroup_tka2j_24 ._stock_tka2j_43{font-size:.37333rem;color:#999}._goodsName_tka2j_47{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._row_tka2j_53{background-color:#fff;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding)}._row_tka2j_53 ._col_tka2j_57{font-size:.42667rem;color:#333}._radio-group_tka2j_61{display:flex;flex-wrap:wrap}._radio_tka2j_61{margin-right:.21333rem;margin-bottom:.21333rem;min-width:1.6rem}._radio_tka2j_61 .van-radio__label--disabled{opacity:.5}._radio_tka2j_61 .van-radio__icon{display:none}._radio_tka2j_61 .van-tag--large{height:.72rem;font-size:.34667rem;text-align:center;display:flex;align-items:center;justify-content:center}._radio_tka2j_61 .van-tag{box-sizing:border-box}._radio_tka2j_61 .van-tag--default{color:#999}._radio_tka2j_61 .van-tag--primary{background-color:#f7f8f9}._radio_tka2j_61 .van-radio__label{margin-left:0}._badge_tka2j_96 .van-badge{border-radius:.16rem 0;font-size:.32rem}._section_tka2j_100{background:#fff;padding:.32rem 0 0}._detail_tka2j_104{display:flex;align-items:center;justify-content:center;font-size:.37333rem;color:#999;line-height:.53333rem;margin-bottom:.32rem}._detail_tka2j_104 span{padding:0 .26667rem}._detail_tka2j_104:before,._detail_tka2j_104:after{display:inline-block;content:" ";width:1.06667rem;height:.08rem}._detail_tka2j_104:before{background:linear-gradient(90deg,rgba(238,238,238,0) 0%,#d8d8d8 100%)}._detail_tka2j_104:after{background:linear-gradient(270deg,rgba(238,238,238,0) 0%,#d8d8d8 100%)}._photoDetail_tka2j_129 img{width:100%;vertical-align:middle}._goodsDetail_tka2j_133{margin-bottom:var(--van-action-bar-height)}._actionBar_tka2j_136{padding-left:.42667rem;padding-right:.42667rem;justify-content:space-between;box-shadow:0 -.26667rem .26667rem var(--box-shadow-color);box-sizing:border-box}._actionBar_tka2j_136 .van-submit-bar__bar{justify-content:center;padding:0;height:1.81333rem}._actionBar_tka2j_136 .van-action-bar-icon{align-items:center}._actionBar_tka2j_136 .van-action-bar-icon__icon{margin-bottom:0;line-height:0}._actionBar_tka2j_136 .van-badge{background:#ff4e19}._actionBar_tka2j_136 ._text_tka2j_158{font-size:.32rem;color:#333;text-align:center}._addCertBtn_tka2j_163{background:linear-gradient(121deg,#FFD892 0%,#FFCB75 100%);border-radius:.32rem;font-size:.42667rem;font-weight:600;color:#5b2c03;width:3.94667rem;height:1.06667rem}._buyGroup_tka2j_172{display:flex;justify-content:center;overflow:hidden;box-sizing:border-box}._selectWrap_tka2j_178{padding-top:.04rem;font-size:.37333rem;color:#666;padding-bottom:.32rem}._shareBtn_tka2j_184{display:flex;align-items:center;font-size:.37333rem;color:#666}._shareWrap_tka2j_190{display:flex;border-radius:.26667rem;border:.02667rem solid var(--van-primary);overflow:hidden;padding:.37333rem;align-items:center;background-color:#fff;margin-top:.42667rem}._shareWrap_tka2j_190 ._sharePic_tka2j_200{width:2.66667rem;height:2.66667rem;border-radius:.21333rem}._shareWrap_tka2j_190 ._shareLeft_tka2j_205{margin-right:.26667rem}._shareWrap_tka2j_190 ._shareRight_tka2j_208{flex:1;overflow:hidden}._shareWrap_tka2j_190 ._shareShopTitle_tka2j_212{font-size:.42667rem;font-weight:400;color:#333;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}._shareWrap_tka2j_190 ._shareShopDes_tka2j_222{font-size:.37333rem;font-weight:400;color:#999;margin:.26667rem 0 .53333rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._shareWrap_tka2j_190 ._shareShopValue_tka2j_231{font-size:.42667rem;color:#ff4e19}._shareWrap_tka2j_190 ._shareShopOldPrice_tka2j_235{color:#e5e5e5;margin-left:.13333rem}._shareWrap_tka2j_190 .van-card{background:transparent}._imagesOverlayWrap_tka2j_242 .van-badge__wrapper,._imagesOverlayWrap_tka2j_242 .van-image-preview__index{top:1.06667rem}\n',document.head.appendChild(n);var dt,ft=function(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))},mt=a("image-preview")[1],pt=i({props:{src:String,show:Boolean,active:Number,minZoom:c(l),maxZoom:c(l),rootWidth:c(Number),rootHeight:c(Number),disableZoom:Boolean},emits:["scale","close","longPress"],setup:function(t,e){var r,o,n,a,i,c,l,j,x=e.emit,S=e.slots,L=s({scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,initializing:!1,imageRatio:0}),P=u(),z=d(),C=d(),I=d(!1),T=d(!1),E=0,O=f((function(){var t=L.scale,e=L.moveX,r=L.moveY,o=L.moving,n=L.zooming,a=L.initializing,i={transitionDuration:n||o||a?"0s":".3s"};return(1!==t||T.value)&&(i.transform="matrix(".concat(t,", 0, 0, ").concat(t,", ").concat(e,", ").concat(r,")")),i})),W=f((function(){if(L.imageRatio){var e=t.rootWidth,r=t.rootHeight,o=I.value?r/L.imageRatio:e;return Math.max(0,(L.scale*o-e)/2)}return 0})),B=f((function(){if(L.imageRatio){var e=t.rootWidth,r=t.rootHeight,o=I.value?r:e*L.imageRatio;return Math.max(0,(L.scale*o-r)/2)}return 0})),N=function(e,r){var o;if((e=g(e,+t.minZoom,+t.maxZoom+1))!==L.scale){var n=e/L.scale;if(L.scale=e,r){var a=b(null==(o=z.value)?void 0:o.$el),i={x:.5*a.width,y:.5*a.height},c=L.moveX-(r.x-a.left-i.x)*(n-1),l=L.moveY-(r.y-a.top-i.y)*(n-1);L.moveX=g(c,-W.value,W.value),L.moveY=g(l,-B.value,B.value)}else L.moveX=0,L.moveY=T.value?E:0;x("scale",{scale:e,index:t.active})}},D=function(){N(1)},Y=!1,Z=function(e){var c=e.touches;if(2!==(r=c.length)||!t.disableZoom){var l=P.offsetX;P.start(e),o=L.moveX,n=L.moveY,j=Date.now(),Y=!1,L.moving=1===r&&(1!==L.scale||T.value),L.zooming=2===r&&!l.value,L.zooming&&(a=L.scale,i=ft(c))}},A=function(){if(!(r>1)){var t,e=P.offsetX,o=P.offsetY,n=Date.now()-j;e.value<k&&o.value<k&&(n<250?l?(clearTimeout(l),l=null,t=L.scale>1?1:2,N(t,2===t||T.value?{x:P.startX.value,y:P.startY.value}:void 0)):l=setTimeout((function(){x("close"),l=null}),250):n>w&&x("longPress"))}},H=function(e){var r=!1;if((L.moving||L.zooming)&&(r=!0,L.moving&&o===L.moveX&&n===L.moveY&&(r=!1),!e.touches.length)){L.zooming&&(L.moveX=g(L.moveX,-W.value,W.value),L.moveY=g(L.moveY,-B.value,B.value),L.zooming=!1),L.moving=!1,o=0,n=0,a=1,L.scale<1&&D();var i=+t.maxZoom;L.scale>i&&N(i,c)}v(e,r),A(),P.reset()},G=function(){var e=t.rootWidth,r=t.rootHeight,o=r/e,n=L.imageRatio;I.value=L.imageRatio>o&&n<2.6,T.value=L.imageRatio>o&&n>=2.6,T.value&&(E=(n*e-r)/2,L.moveY=E,L.initializing=!0,_((function(){L.initializing=!1}))),D()},X=function(t){var e=t.target,r=e.naturalWidth,o=e.naturalHeight;L.imageRatio=o/r,G()};return m((function(){return t.active}),D),m((function(){return t.show}),(function(t){t||D()})),m((function(){return[t.rootWidth,t.rootHeight]}),G),p("touchmove",(function(t){var e=t.touches;if(P.move(t),L.moving){var r=P.deltaX,l=P.deltaY,s=r.value+o,u=l.value+n;if((s>W.value||s<-W.value)&&!Y&&P.isHorizontal())return void(L.moving=!1);Y=!0,v(t,!0),L.moveX=g(s,-W.value,W.value),L.moveY=g(u,-B.value,B.value)}if(L.zooming&&(v(t,!0),2===e.length)){var d=ft(e),f=a*d/i;c=function(t){return{x:(t[0].clientX+t[1].clientX)/2,y:(t[0].clientY+t[1].clientY)/2}}(e),N(f,c)}}),{target:f((function(){var t;return null==(t=C.value)?void 0:t.$el}))}),function(){var e={loading:function(){return h(y,{type:"spinner"},null)}};return h(et,{ref:C,class:mt("swipe-item"),onTouchstartPassive:Z,onTouchend:H,onTouchcancel:H},{default:function(){return[S.image?h("div",{class:mt("image-wrap")},[S.image({src:t.src})]):h(ot,{ref:z,src:t.src,fit:"contain",class:mt("image",{vertical:I.value}),style:O.value,onLoad:X},e)]}})}}}),ht=o(a("image-preview"),2),vt=ht[0],gt=ht[1],_t=["show","teleport","transition","overlayStyle","closeOnPopstate"],yt={show:Boolean,loop:j,images:x(),minZoom:S(1/3),maxZoom:S(3),overlay:j,closeable:Boolean,showIndex:j,className:L,closeIcon:P("clear"),transition:String,beforeClose:Function,overlayClass:L,overlayStyle:Object,swipeDuration:S(300),startPosition:S(0),showIndicators:Boolean,closeOnPopstate:j,closeIconPosition:P("top-right"),teleport:[String,Object]},bt=i({name:vt,props:yt,emits:["scale","close","closed","change","longPress","update:show"],setup:function(t,e){var r=e.emit,o=e.slots,n=d(),a=s({active:0,rootWidth:0,rootHeight:0,disableZoom:!1}),i=function(){if(n.value){var t=b(n.value.$el);a.rootWidth=t.width,a.rootHeight=t.height,n.value.resize()}},c=function(t){return r("scale",t)},l=function(t){return r("update:show",t)},u=function(){Y(t.beforeClose,{args:[a.active],done:function(){return l(!1)}})},f=function(t){t!==a.active&&(a.active=t,r("change",t))},p=function(){if(t.showIndex)return h("div",{class:gt("index")},[o.index?o.index({index:a.active}):"".concat(a.active+1," / ").concat(t.images.length)])},v=function(){if(o.cover)return h("div",{class:gt("cover")},[o.cover()])},g=function(){a.disableZoom=!0},_=function(){a.disableZoom=!1},y=function(){if(t.closeable)return h(D,{role:"button",name:t.closeIcon,class:[gt("close-icon",t.closeIconPosition),N],onClick:u},null)},k=function(){return r("closed")},w=function(t,e){var r;return null==(r=n.value)?void 0:r.swipeTo(t,e)};return z({swipeTo:w}),C(i),m([I,T],i),m((function(){return t.startPosition}),(function(t){return f(+t)})),m((function(){return t.show}),(function(e){var o=t.images,n=t.startPosition;e?(f(+n),E((function(){i(),w(+n,{immediate:!0})}))):r("close",{index:a.active,url:o[a.active]})})),function(){return h(B,O({class:[gt(),t.className],overlayClass:[gt("overlay"),t.overlayClass],onClosed:k,"onUpdate:show":l},W(t,_t)),{default:function(){return[y(),h(rt,{ref:n,lazyRender:!0,loop:t.loop,class:gt("swipe"),duration:t.swipeDuration,initialSwipe:t.startPosition,showIndicators:t.showIndicators,indicatorColor:"white",onChange:f,onDragEnd:_,onDragStart:g},{default:function(){return[t.images.map((function(e,n){return h(pt,{src:e,show:t.show,active:a.active,maxZoom:t.maxZoom,minZoom:t.minZoom,rootWidth:a.rootWidth,rootHeight:a.rootHeight,disableZoom:a.disableZoom,onScale:c,onClose:u,onLongPress:function(){return r("longPress",{index:n})}},{image:o.image})}))]}}),p(),v()]}})}}}),kt={loop:!0,images:[],maxZoom:3,minZoom:1/3,onScale:void 0,onClose:void 0,onChange:void 0,teleport:"body",className:"",showIndex:!0,closeable:!1,closeIcon:"clear",transition:void 0,beforeClose:void 0,overlayStyle:void 0,overlayClass:void 0,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeIconPosition:"top-right"};var wt=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(Z)return dt||(e=H({setup:function(){var t=G(),e=t.state,r=t.toggle,o=function(){e.images=[]};return function(){return h(bt,O(e,{onClosed:o,"onUpdate:show":r}),null)}}}),dt=e.instance),t=Array.isArray(t)?{images:t,startPosition:r}:t,dt.open(A({},kt,t)),dt};X(bt);var jt=o(a("submit-bar"),3),xt=jt[0],St=jt[1],Lt=jt[2],Pt={tip:String,label:String,price:Number,tipIcon:String,loading:Boolean,currency:P("¥"),disabled:Boolean,textAlign:String,buttonText:String,buttonType:P("danger"),buttonColor:String,suffixLabel:String,placeholder:Boolean,decimalLength:S(2),safeAreaInsetBottom:j},zt=i({name:xt,props:Pt,emits:["submit"],setup:function(t,e){var r=e.emit,o=e.slots,n=d(),a=R(n,St),i=function(){var e=t.price,r=t.label,o=t.currency,n=t.textAlign,a=t.suffixLabel,i=t.decimalLength;if("number"==typeof e){var c=(e/100).toFixed(+i).split("."),l=i?".".concat(c[1]):"";return h("div",{class:St("text"),style:{textAlign:n}},[h("span",null,[r||Lt("label")]),h("span",{class:St("price")},[o,h("span",{class:St("price-integer")},[c[0]]),l]),a&&h("span",{class:St("suffix-label")},[a])])}},c=function(){var e,r=t.tip,n=t.tipIcon;if(o.tip||r)return h("div",{class:St("tip")},[n&&h(D,{class:St("tip-icon"),name:n},null),r&&h("span",{class:St("tip-text")},[r]),null==(e=o.tip)?void 0:e.call(o)])},l=function(){return r("submit")},s=function(){var e,r;return h("div",{ref:n,class:[St(),{"van-safe-area-bottom":t.safeAreaInsetBottom}]},[null==(e=o.top)?void 0:e.call(o),c(),h("div",{class:St("bar")},[null==(r=o.default)?void 0:r.call(o),i(),o.button?o.button():h(F,{round:!0,type:t.buttonType,text:t.buttonText,class:St("button",t.buttonType),color:t.buttonColor,loading:t.loading,disabled:t.disabled,onClick:l},null)])])};return function(){return t.placeholder?a(s):s()}}}),Ct=X(zt),It="_swipeItemImg_tka2j_1",Tt="_swipe_tka2j_1",Et="_custom-indicator_tka2j_7",Ot="_goodsHead_tka2j_17",Wt="_priceGroup_tka2j_24",Bt="_price_tka2j_24",Nt="_goodsName_tka2j_47",Dt="_row_tka2j_53",Yt="_col_tka2j_57",Zt="_radio-group_tka2j_61",At="_radio_tka2j_61",Ht="_badge_tka2j_96",Gt="_section_tka2j_100",Xt="_detail_tka2j_104",Rt="_photoDetail_tka2j_129",Ft="_goodsDetail_tka2j_133",Mt="_actionBar_tka2j_136",$t="_addCertBtn_tka2j_163",Jt="_buyGroup_tka2j_172",Ut="_selectWrap_tka2j_178",qt="_imagesOverlayWrap_tka2j_242";var Vt=tt();t("default",i({name:"goods-detail",data:function(){return{id:this.$route.query.id,albumPics:[],product:{},radio:0,skuStockListTemp:[],detailMobileHtml:"",loading:!1}},computed:{skuStockList:function(){var t=this.product,e=this.skuStockListTemp.length>0?this.skuStockListTemp:[{id:-1,price:t.price,pic:t.pic,stock:t.stock,spData:null}];return e.forEach((function(t){if(t.spData){var e=JSON.parse(t.spData);t.spDataJson=e.reduce((function(t,e){return t+=e.value}),""),t.sku=e.reduce((function(t,e){return t.push("".concat(e.key,": ").concat(e.value)),t}),[]).join(",")}else t.spDataJson="默认"})),e},getPrice:function(){var t=this,e=this.skuStockList.filter((function(e){return e.id==t.radio}));return e&&Array.isArray(e)&&e.length?e[0].price:0}},mounted:function(){var t,o=this;return(t=e().mark((function t(){var r,n,a,i,c;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o.loading=!0,t.next=4,M.get("/edu-app/open/mall/product/detail/".concat(o.id));case 4:if(r=t.sent,o.loading=!1,n=r.data||{},o.albumPics=[n.product.pic].concat(n.product.albumPics.split(",")).filter((function(t){return t})),o.product=n.product,o.skuStockListTemp=n.skuStockList||[],!o.skuStockListTemp.length){t.next=21;break}a=o.skuStockListTemp.length,i=0;case 13:if(!(i<a)){t.next=21;break}if(!((c=o.skuStockListTemp[i]).stock>=0)){t.next=18;break}return o.radio=c.id,t.abrupt("break",21);case 18:i++,t.next=13;break;case 21:o.detailMobileHtml=n.product.detailMobileHtml,t.next=26;break;case 24:t.prev=24,t.t0=t.catch(0);case 26:case"end":return t.stop()}}),t,null,[[0,24]])})),function(){var e=this,o=arguments;return new Promise((function(n,a){var i=t.apply(e,o);function c(t){r(i,n,a,c,l,"next",t)}function l(t){r(i,n,a,c,l,"throw",t)}c(void 0)}))})()},methods:{onPreview:function(t){wt({images:this.albumPics,startPosition:t,closeable:!0,className:qt})},onShowImg:function(t){if("img"===t.srcElement.localName){var e=0,r=document.querySelectorAll(".msgWrap img"),o=Array.from(r).map((function(r,o){return t.srcElement==r&&(e=o),r.src}));wt({images:o,startPosition:e,closeable:!0,className:qt})}},onShowCart:function(){var t=this,e={price:this.product.price,originalPrice:this.product.originalPrice,pic:this.product.pic,stock:this.product.stock,skuStockList:this.skuStockListTemp.length?this.skuStockListTemp:void 0,brandName:this.product.brandName,productCategoryId:this.product.productCategoryId,name:this.product.name,productSn:this.product.productSn,productSubTitle:this.product.subTitle,count:1,id:this.product.id},r=!1;Vt.getGoods.forEach((function(e){e.id===t.product.id&&(r=!0,e.count+=1)})),r||Vt.setGoods(e),$("添加成功")}},render:function(){var t,e=this,r=this.product,o=this.skuStockList.find((function(t){return t.id===e.radio}));return h("div",{class:Ft},[h(rt,{class:Tt,lazyRender:!0},{default:function(){return[e.albumPics.map((function(t,r){return h(et,null,{default:function(){return[h(ot,{class:It,src:t,onClick:function(){return e.onPreview(r)},fit:"cover"},null)]}})}))]},indicator:function(t){return t.total>1&&h("div",{class:Et},[(t.active||0)+1,J(" / "),t.total])}}),h(nt,{border:!1,class:[Ot,"mb12"]},{default:function(){return[h(at,{center:!0,border:!1},{title:function(){return h("div",{class:Wt},[h("span",{class:Bt},[h("i",null,[J("¥")]),U(e.getPrice)])])}}),h(at,{center:!0,border:!1,title:r.name,titleClass:[Nt,"van-ellipsis"]},null)]}}),h(it,{class:[Dt,"mb12"]},{default:function(){return[h(ct,{span:4,class:Yt},{default:function(){return[J("规格")]}}),h(ct,{span:20},{default:function(){return[o?h("div",{class:Ut},[o.stock<=0?"当前款式暂时缺货":"已选择 ".concat(o.spDataJson)]):h("div",null,[J("请选择 规格")]),h(lt,{class:Zt,modelValue:e.radio,"onUpdate:modelValue":function(t){return e.radio=t}},(r=t=e.skuStockList.map((function(t){var r=t.id===e.radio,o=r?"primary":"default";return h(q,{position:"top-right",content:t.stock<=0?"缺货":"",color:"#999999",class:Ht,offset:[-20,0]},{default:function(){return[h(st,{class:At,name:t.id,disabled:t.stock<=0,onClick:function(){t.stock<=0||(e.radio=t.id)}},{default:function(){return[h(ut,{size:"large",plain:r,type:o},{default:function(){return[t.spDataJson]}})]}})]}})})),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!K(r)?t:{default:function(){return[t]}}))];var r}})]}}),this.detailMobileHtml&&h("div",{class:[Gt]},[h("div",{class:Xt},[h("span",null,[J("图文详情")])]),h("div",{class:[Rt,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detailMobileHtml},null)]),!this.loading&&h(V,null,[h(Ct,{class:Mt,"safe-area-inset-bottom":!0},{button:function(){return h("div",{class:Jt},[h(Q,{type:"primary",class:$t,text:"添加购买",onClick:function(){return e.onShowCart()}},null)])}})])])}}))}}}))}();