index-legacy-59d99d88.js 26 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 o};var o={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,o){t[e]=o.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,o){return t[e]=o}}function d(t,e,o,r){var n=e&&e.prototype instanceof m?e:m,i=Object.create(n.prototype),c=new C(r||[]);return a(i,"_invoke",{value:k(t,o,c)}),i}function h(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(I){return{type:"throw",arg:I}}}o.wrap=d;var f={};function m(){}function p(){}function g(){}var v={};u(v,c,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(j([])));b&&b!==r&&n.call(b,c)&&(v=b);var y=g.prototype=m.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,o){function r(a,i,c,s){var l=h(e[a],e,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==t(d)&&n.call(d,"__await")?o.resolve(d.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):o.resolve(d).then((function(t){u.value=t,c(u)}),(function(t){return r("throw",t,c,s)}))}s(l.arg)}var i;a(this,"_invoke",{value:function(t,e){function n(){return new o((function(o,n){r(t,e,o,n)}))}return i=i?i.then(n,n):n()}})}function k(t,e,o){var r="suspendedStart";return function(n,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw a;return z()}for(o.method=n,o.arg=a;;){var i=o.delegate;if(i){var c=S(i,o);if(c){if(c===f)continue;return c}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===r)throw r="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r="executing";var s=h(t,e,o);if("normal"===s.type){if(r=o.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:o.done}}"throw"===s.type&&(r="completed",o.method="throw",o.arg=s.arg)}}}function S(t,e){var o=e.method,r=t.iterator[o];if(void 0===r)return e.delegate=null,"throw"===o&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==o&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+o+"' method")),f;var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;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,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(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 o=-1,r=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:z}}function z(){return{value:void 0,done:!0}}return p.prototype=g,a(y,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:p,configurable:!0}),p.displayName=u(g,l,"GeneratorFunction"),o.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},w(x.prototype),u(x.prototype,s,(function(){return this})),o.AsyncIterator=x,o.async=function(t,e,r,n,a){void 0===a&&(a=Promise);var i=new x(d(t,e,r,n),a);return o.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(y),u(y,l,"Generator"),u(y,c,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),o.keys=function(t){var e=Object(t),o=[];for(var r in e)o.push(r);return o.reverse(),function t(){for(;o.length;){var r=o.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},o.values=j,C.prototype={constructor:C,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(P),!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 o(o,r){return i.type="throw",i.arg=t,e.next=o,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;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,f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),P(o),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var r=o.completion;if("throw"===r.type){var n=r.arg;P(o)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,o){return this.delegate={iterator:j(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=void 0),f}},o}function o(t,e,o,r,n,a,i){try{var c=t[a](i),s=c.value}catch(l){return void o(l)}c.done?e(s):Promise.resolve(s).then(r,n)}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var r,n,a,i,c=[],s=!0,l=!1;try{if(a=(o=o.call(t)).next,0===e){if(Object(o)!==o)return;s=!1}else for(;!(s=(r=a.call(o)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(u){l=!0,n=u}finally{try{if(!s&&null!=o.return&&(i=o.return(),Object(i)!==i))return}finally{if(l)throw n}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))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 o=0,r=new Array(e);o<e;o++)r[o]=t[o];return r}System.register(["./index-legacy-ed52ea6c.js","./index-legacy-1d9515a2.js","./index-legacy-5f8e6c06.js","./index-legacy-d860c2d7.js","./index-legacy-6afcca2f.js","./index-legacy-f7a2262a.js","./student-register-store-legacy-5e1fc475.js","./index-legacy-279ff8bb.js","./index-legacy-f33089f7.js","./Checker-legacy-241526eb.js"],(function(t,n){"use strict";var a,i,c,s,l,u,d,h,f,m,p,g,v,_,b,y,w,x,k,S,L,P,C,j,z,I,T,O,E,G,W,A,N,Z,B,D,H,F,Y,X,R,M,J,$,U,q,V,K,Q,tt,et,ot,rt,nt,at,it,ct,st=document.createElement("style");return st.textContent='._swipeItemImg_1ayhb_1,._swipe_1ayhb_1{width:100%;height:10rem;vertical-align:middle}._custom-indicator_1ayhb_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_1ayhb_17{padding:.21333rem 0}._goodsHead_1ayhb_17 .van-cell{padding-top:.13333rem;padding-bottom:.13333rem}._priceGroup_1ayhb_24{display:flex;align-items:center}._priceGroup_1ayhb_24 ._price_1ayhb_24{color:#ff4e19;font-size:.64rem;font-weight:700}._priceGroup_1ayhb_24 ._price_1ayhb_24 i{font-size:.42667rem;font-style:normal}._priceGroup_1ayhb_24 ._delPrice_1ayhb_37{font-size:.37333rem;color:#999;margin-left:.32rem;line-height:.53333rem}._priceGroup_1ayhb_24 ._stock_1ayhb_43{font-size:.37333rem;color:#999}._goodsName_1ayhb_47{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._row_1ayhb_53{background-color:#fff;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding)}._row_1ayhb_53 ._col_1ayhb_57{font-size:.42667rem;color:#333}._radio-group_1ayhb_61{display:flex;flex-wrap:wrap}._radio_1ayhb_61{margin-right:.21333rem;margin-bottom:.21333rem;min-width:1.6rem}._radio_1ayhb_61 .van-radio__label--disabled{opacity:.5}._radio_1ayhb_61 .van-radio__icon{display:none}._radio_1ayhb_61 .van-tag--large{height:.72rem;font-size:.34667rem;text-align:center;display:flex;align-items:center;justify-content:center}._radio_1ayhb_61 .van-tag{box-sizing:border-box}._radio_1ayhb_61 .van-tag--default{color:#999;background-color:#f7f8f9}._radio_1ayhb_61 .van-tag--primary{background-color:#fffaf4;background:#FFFAF4;border-radius:.16rem;border:.02667rem solid #FFCF7C;color:#f39f11}._radio_1ayhb_61 .van-radio__label{margin-left:0;width:100%}._badge_1ayhb_102 .van-badge{border-radius:.16rem 0;font-size:.32rem}._section_1ayhb_106{background:#fff;padding:.32rem 0 0}._detail_1ayhb_110{display:flex;align-items:center;justify-content:center;font-size:.37333rem;color:#999;line-height:.53333rem;margin-bottom:.32rem}._detail_1ayhb_110 span{padding:0 .26667rem}._detail_1ayhb_110:before,._detail_1ayhb_110:after{display:inline-block;content:" ";width:1.06667rem;height:.08rem}._detail_1ayhb_110:before{background:linear-gradient(90deg,rgba(238,238,238,0) 0%,#d8d8d8 100%)}._detail_1ayhb_110:after{background:linear-gradient(270deg,rgba(238,238,238,0) 0%,#d8d8d8 100%)}._photoDetail_1ayhb_135 img{width:100%;vertical-align:middle}._goodsDetail_1ayhb_139{margin-bottom:var(--van-action-bar-height)}._actionBar_1ayhb_142{padding-left:.42667rem;padding-right:.42667rem;justify-content:space-between;box-shadow:0 -.26667rem .26667rem var(--box-shadow-color);box-sizing:border-box}._actionBar_1ayhb_142 .van-submit-bar__bar{justify-content:center;padding:0;height:1.81333rem}._actionBar_1ayhb_142 .van-action-bar-icon{align-items:center}._actionBar_1ayhb_142 .van-action-bar-icon__icon{margin-bottom:0;line-height:0}._actionBar_1ayhb_142 .van-badge{background:#ff4e19}._actionBar_1ayhb_142 ._text_1ayhb_164{font-size:.32rem;color:#333;text-align:center}._addCertBtn_1ayhb_169{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;border:0}._buyGroup_1ayhb_179{display:flex;justify-content:center;overflow:hidden;box-sizing:border-box}._selectWrap_1ayhb_185{padding-top:.04rem;font-size:.37333rem;color:#666;padding-bottom:.32rem}._shareBtn_1ayhb_191{display:flex;align-items:center;font-size:.37333rem;color:#666}._shareWrap_1ayhb_197{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_1ayhb_197 ._sharePic_1ayhb_207{width:2.66667rem;height:2.66667rem;border-radius:.21333rem}._shareWrap_1ayhb_197 ._shareLeft_1ayhb_212{margin-right:.26667rem}._shareWrap_1ayhb_197 ._shareRight_1ayhb_215{flex:1;overflow:hidden}._shareWrap_1ayhb_197 ._shareShopTitle_1ayhb_219{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_1ayhb_197 ._shareShopDes_1ayhb_229{font-size:.37333rem;font-weight:400;color:#999;margin:.26667rem 0 .53333rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._shareWrap_1ayhb_197 ._shareShopValue_1ayhb_238{font-size:.42667rem;color:#ff4e19}._shareWrap_1ayhb_197 ._shareShopOldPrice_1ayhb_242{color:#e5e5e5;margin-left:.13333rem}._shareWrap_1ayhb_197 .van-card{background:transparent}._imagesOverlayWrap_1ayhb_249 .van-badge__wrapper,._imagesOverlayWrap_1ayhb_249 .van-image-preview__index{top:1.06667rem}\n',document.head.appendChild(st),{setters:[function(t){a=t.c,i=t.d,c=t.aX,s=t.n,l=t.q,u=t.u,d=t.r,h=t.e,f=t.w,m=t.Y,p=t.a,g=t.p,v=t._,_=t.L,b=t.aY,y=t.t,w=t.ai,x=t.b,k=t.a3,S=t.m,L=t.X,P=t.x,C=t.aZ,j=t.a_,z=t.y,I=t.h,T=t.ae,O=t.U,E=t.Z,G=t.H,W=t.I,A=t.$,N=t.ax,Z=t.a9,B=t.a$,D=t.b0,H=t.k,F=t.b1,Y=t.A,X=t.C,R=t.z,M=t.P,J=t.au,$=t.F,U=t.b2,q=t.a1},function(t){V=t.A},function(t){K=t.a,Q=t.S},function(t){tt=t.I},function(t){et=t.C},function(t){ot=t.C},function(t){rt=t.R,nt=t.C},function(t){at=t.R,it=t.a},function(t){ct=t.T},null],execute:function(){var n,st=function(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))},lt=a("image-preview")[1],ut=i({props:{src:String,show:Boolean,active:Number,minZoom:c(s),maxZoom:c(s),rootWidth:c(Number),rootHeight:c(Number),disableZoom:Boolean},emits:["scale","close","longPress"],setup:function(t,e){var o,r,n,a,i,c,s,y=e.emit,w=e.slots,x=l({scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,imageRatio:0,displayWidth:0,displayHeight:0}),k=u(),S=d(),L=h((function(){var e=t.rootWidth,o=t.rootHeight/e;return x.imageRatio>o})),P=h((function(){var t=x.scale,e=x.moveX,o=x.moveY,r=x.moving,n={transitionDuration:x.zooming||r?"0s":".3s"};if(1!==t){var a=e/t,i=o/t;n.transform="scale(".concat(t,", ").concat(t,") translate(").concat(a,"px, ").concat(i,"px)")}return n})),C=h((function(){if(x.imageRatio){var e=t.rootWidth,o=t.rootHeight,r=L.value?o/x.imageRatio:e;return Math.max(0,(x.scale*r-e)/2)}return 0})),j=h((function(){if(x.imageRatio){var e=t.rootWidth,o=t.rootHeight,r=L.value?o:e*x.imageRatio;return Math.max(0,(x.scale*r-o)/2)}return 0})),z=function(e){(e=v(e,+t.minZoom,+t.maxZoom+1))!==x.scale&&(x.scale=e,y("scale",{scale:e,index:t.active}))},I=function(){z(1),x.moveX=0,x.moveY=0},T=!1,O=function(e){var c=e.touches;if(2!==(o=c.length)||!t.disableZoom){var l=k.offsetX;k.start(e),r=x.moveX,n=x.moveY,s=Date.now(),T=!1,x.moving=1===o&&1!==x.scale,x.zooming=2===o&&!l.value,x.zooming&&(a=x.scale,i=st(e.touches))}},E=function(){if(!(o>1)){var t,e=k.offsetX,r=k.offsetY,n=Date.now()-s;e.value<5&&r.value<5&&(n<250?c?(clearTimeout(c),c=null,t=x.scale>1?1:2,z(t),x.moveX=0,x.moveY=0):c=setTimeout((function(){y("close"),c=null}),250):n>b&&y("longPress"))}},G=function(e){var o=!1;if((x.moving||x.zooming)&&(o=!0,x.moving&&r===x.moveX&&n===x.moveY&&(o=!1),!e.touches.length)){x.zooming&&(x.moveX=v(x.moveX,-C.value,C.value),x.moveY=v(x.moveY,-j.value,j.value),x.zooming=!1),x.moving=!1,r=0,n=0,a=1,x.scale<1&&I();var i=+t.maxZoom;x.scale>i&&(x.scale=i)}g(e,o),E(),k.reset()},W=function(t){var e=t.target,o=e.naturalWidth,r=e.naturalHeight;x.imageRatio=r/o};return f((function(){return t.active}),I),f((function(){return t.show}),(function(t){t||I()})),m("touchmove",(function(t){var e=t.touches;if(k.move(t),x.moving){var o=k.deltaX,c=k.deltaY,s=o.value+r,l=c.value+n;if((s>C.value||s<-C.value)&&!T&&k.isHorizontal())return void(x.moving=!1);T=!0,g(t,!0),x.moveX=v(s,-C.value,C.value),x.moveY=v(l,-j.value,j.value)}if(x.zooming&&(g(t,!0),2===e.length)){var u=st(e);z(a*u/i)}}),{target:h((function(){var t;return null==(t=S.value)?void 0:t.$el}))}),function(){var e={loading:function(){return p(_,{type:"spinner"},null)}};return p(K,{ref:S,class:lt("swipe-item"),onTouchstartPassive:O,onTouchend:G,onTouchcancel:G},{default:function(){return[w.image?p("div",{class:lt("image-wrap")},[w.image({src:t.src})]):p(tt,{src:t.src,fit:"contain",class:lt("image",{vertical:L.value}),style:P.value,onLoad:W},e)]}})}}}),dt=r(a("image-preview"),2),ht=dt[0],ft=dt[1],mt=["show","teleport","transition","overlayStyle","closeOnPopstate"],pt={show:Boolean,loop:y,images:w(),minZoom:x(1/3),maxZoom:x(3),overlay:y,closeable:Boolean,showIndex:y,className:k,closeIcon:S("clear"),transition:String,beforeClose:Function,overlayClass:k,overlayStyle:Object,swipeDuration:x(300),startPosition:x(0),showIndicators:Boolean,closeOnPopstate:y,closeIconPosition:S("top-right"),teleport:[String,Object]},gt=i({name:ht,props:pt,emits:["scale","close","closed","change","longPress","update:show"],setup:function(t,e){var o=e.emit,r=e.slots,n=d(),a=l({active:0,rootWidth:0,rootHeight:0,disableZoom:!1}),i=function(){if(n.value){var t=E(n.value.$el);a.rootWidth=t.width,a.rootHeight=t.height,n.value.resize()}},c=function(t){return o("scale",t)},s=function(t){return o("update:show",t)},u=function(){A(t.beforeClose,{args:[a.active],done:function(){return s(!1)}})},h=function(t){t!==a.active&&(a.active=t,o("change",t))},m=function(){if(t.showIndex)return p("div",{class:ft("index")},[r.index?r.index({index:a.active}):"".concat(a.active+1," / ").concat(t.images.length)])},g=function(){if(r.cover)return p("div",{class:ft("cover")},[r.cover()])},v=function(){a.disableZoom=!0},_=function(){a.disableZoom=!1},b=function(){if(t.closeable)return p(W,{role:"button",name:t.closeIcon,class:[ft("close-icon",t.closeIconPosition),G],onClick:u},null)},y=function(){return o("closed")},w=function(t,e){var o;return null==(o=n.value)?void 0:o.swipeTo(t,e)};return L({swipeTo:w}),P(i),f([C,j],i),f((function(){return t.startPosition}),(function(t){return h(+t)})),f((function(){return t.show}),(function(e){var r=t.images,n=t.startPosition;e?(h(+n),z((function(){i(),w(+n,{immediate:!0})}))):o("close",{index:a.active,url:r[a.active]})})),function(){return p(O,I({class:[ft(),t.className],overlayClass:[ft("overlay"),t.overlayClass],onClosed:y,"onUpdate:show":s},T(t,mt)),{default:function(){return[b(),p(Q,{ref:n,lazyRender:!0,loop:t.loop,class:ft("swipe"),duration:t.swipeDuration,initialSwipe:t.startPosition,showIndicators:t.showIndicators,indicatorColor:"white",onChange:h,onDragEnd:_,onDragStart:v},{default:function(){return[t.images.map((function(e,n){return p(ut,{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 o("longPress",{index:n})}},{image:r.image})}))]}}),m(),g()]}})}}}),vt={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 _t=function(t){var e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(N)return n||(e=B({setup:function(){var t=D(),e=t.state,o=t.toggle,r=function(){e.images=[]};return function(){return p(gt,I(e,{onClosed:r,"onUpdate:show":o}),null)}}}),n=e.instance),t=Array.isArray(t)?{images:t,startPosition:o}:t,n.open(Z({},vt,t)),n};H(gt);var bt=r(a("submit-bar"),3),yt=bt[0],wt=bt[1],xt=bt[2],kt={tip:String,label:String,price:Number,tipIcon:String,loading:Boolean,currency:S("¥"),disabled:Boolean,textAlign:String,buttonText:String,buttonType:S("danger"),buttonColor:String,suffixLabel:String,placeholder:Boolean,decimalLength:x(2),safeAreaInsetBottom:y},St=i({name:yt,props:kt,emits:["submit"],setup:function(t,e){var o=e.emit,r=e.slots,n=d(),a=F(n,wt),i=function(){var e=t.price,o=t.label,r=t.currency,n=t.textAlign,a=t.suffixLabel,i=t.decimalLength;if("number"==typeof e){var c=(e/100).toFixed(+i).split("."),s=i?".".concat(c[1]):"";return p("div",{class:wt("text"),style:{textAlign:n}},[p("span",null,[o||xt("label")]),p("span",{class:wt("price")},[r,p("span",{class:wt("price-integer")},[c[0]]),s]),a&&p("span",{class:wt("suffix-label")},[a])])}},c=function(){var e,o=t.tip,n=t.tipIcon;if(r.tip||o)return p("div",{class:wt("tip")},[n&&p(W,{class:wt("tip-icon"),name:n},null),o&&p("span",{class:wt("tip-text")},[o]),null==(e=r.tip)?void 0:e.call(r)])},s=function(){return o("submit")},l=function(){var e,o;return p("div",{ref:n,class:[wt(),{"van-safe-area-bottom":t.safeAreaInsetBottom}]},[null==(e=r.top)?void 0:e.call(r),c(),p("div",{class:wt("bar")},[null==(o=r.default)?void 0:o.call(r),i(),r.button?r.button():p(Y,{round:!0,type:t.buttonType,text:t.buttonText,class:wt("button",t.buttonType),color:t.buttonColor,loading:t.loading,disabled:t.disabled,onClick:s},null)])])};return function(){return t.placeholder?a(l):l()}}}),Lt=H(St),Pt="_swipeItemImg_1ayhb_1",Ct="_swipe_1ayhb_1",jt="_custom-indicator_1ayhb_7",zt="_goodsHead_1ayhb_17",It="_priceGroup_1ayhb_24",Tt="_price_1ayhb_24",Ot="_goodsName_1ayhb_47",Et="_row_1ayhb_53",Gt="_col_1ayhb_57",Wt="_radio-group_1ayhb_61",At="_radio_1ayhb_61",Nt="_badge_1ayhb_102",Zt="_section_1ayhb_106",Bt="_detail_1ayhb_110",Dt="_photoDetail_1ayhb_135",Ht="_goodsDetail_1ayhb_139",Ft="_actionBar_1ayhb_142",Yt="_addCertBtn_1ayhb_169",Xt="_buyGroup_1ayhb_179",Rt="_selectWrap_1ayhb_185",Mt="_imagesOverlayWrap_1ayhb_249";t("default",i({name:"goods-detail",data:function(){return{id:this.$route.query.id,albumPics:[],product:{},radio:0,skuStockListTemp:[],detailMobileHtml:"",loading:!1,addGoodsShow:!1,selectGoodsItem:{},cartCount:0}},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,r=this;return(t=e().mark((function t(){var o,n,a,i,c;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r.loading=!0,t.next=4,X.get("/edu-app/open/mall/product/detail/".concat(r.id),{noAuthorization:!0});case 4:if(o=t.sent,r.loading=!1,n=o.data||{},r.albumPics=[n.product.pic].concat(n.product.albumPics.split(",")).filter((function(t){return t})),r.product=n.product,r.skuStockListTemp=n.skuStockList||[],!r.skuStockListTemp.length){t.next=21;break}a=r.skuStockListTemp.length,i=0;case 13:if(!(i<a)){t.next=21;break}if(!((c=r.skuStockListTemp[i]).stock>=0)){t.next=18;break}return r.radio=c.id,t.abrupt("break",21);case 18:i++,t.next=13;break;case 21:r.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,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function c(t){o(i,n,a,c,s,"next",t)}function s(t){o(i,n,a,c,s,"throw",t)}c(void 0)}))})()},methods:{onPreview:function(t){_t({images:this.albumPics,startPosition:t,closeable:!0,className:Mt})},onShowImg:function(t){if("img"===t.srcElement.localName){var e=0,o=document.querySelectorAll(".msgWrap img"),r=Array.from(o).map((function(o,r){return t.srcElement==o&&(e=r),o.src}));_t({images:r,startPosition:e,closeable:!0,className:Mt})}},onShowCart:function(){this.selectGoodsItem={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,id:this.product.id},this.addGoodsShow=!0}},render:function(){var t,e=this,o=this.product,r=this.skuStockList.find((function(t){return t.id===e.radio}));return p("div",{class:Ht},[p(Q,{class:Ct,lazyRender:!0},{default:function(){return[e.albumPics.map((function(t,o){return p(K,null,{default:function(){return[p(tt,{class:Pt,src:t,onClick:function(){return e.onPreview(o)},fit:"cover"},null)]}})}))]},indicator:function(t){return t.total>1&&p("div",{class:jt},[(t.active||0)+1,R(" / "),t.total])}}),p(et,{border:!1,class:[zt,"mb12"]},{default:function(){return[p(ot,{center:!0,border:!1},{title:function(){return p("div",{class:It},[p("span",{class:Tt},[p("i",null,[R("¥")]),M(e.getPrice)])])}}),p(ot,{center:!0,border:!1,title:o.name,titleClass:[Ot,"van-ellipsis"]},null)]}}),p(rt,{class:[Et,"mb12"]},{default:function(){return[p(nt,{span:4,class:Gt},{default:function(){return[R("规格")]}}),p(nt,{span:20},{default:function(){return[r?p("div",{class:Rt},[r.stock<=0?"当前款式暂时缺货":"已选择 ".concat(r.spDataJson)]):p("div",null,[R("请选择 规格")]),p(at,{class:Wt,modelValue:e.radio,"onUpdate:modelValue":function(t){return e.radio=t}},(o=t=e.skuStockList.map((function(t){var o=t.id===e.radio,r=o?"primary":"default";return p(J,{position:"top-right",content:t.stock<=0?"缺货":"",color:"#999999",class:Nt,offset:[-20,0]},{default:function(){return[p(it,{class:At,name:t.id,disabled:t.stock<=0,onClick:function(){t.stock<=0||(e.radio=t.id)}},{default:function(){return[p(ct,{size:"large",plain:o,type:r},{default:function(){return[t.spDataJson]}})]}})]}})})),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!q(o)?t:{default:function(){return[t]}}))];var o}})]}}),this.detailMobileHtml&&p("div",{class:[Zt]},[p("div",{class:Bt},[p("span",null,[R("图文详情")])]),p("div",{class:[Dt,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detailMobileHtml},null)]),!this.loading&&p($,null,[p(Lt,{class:Ft,"safe-area-inset-bottom":!0},{button:function(){return p("div",{class:Xt},[p(U,{type:"primary",class:Yt,text:"添加购买",onClick:function(){return e.onShowCart()}},null)])}})]),p(O,{show:this.addGoodsShow,closeable:!0,position:"bottom",round:!0,onClose:function(){e.addGoodsShow=!1}},{default:function(){return[p(V,{show:e.addGoodsShow,item:e.selectGoodsItem,onClose:function(){e.addGoodsShow=!1},defaultRadio:e.radio,showType:"cart"},null)]}})])}}))}}}))}();