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,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.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,a=Object.create(n.prototype),c=new P(o||[]);return i(a,"_invoke",{value:j(t,r,c)}),a}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(i,a,c,l){var s=f(e[i],e,a);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 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 o="suspendedStart";return function(n,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw i;return C()}for(r.method=n,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,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 i=n.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,m):i:(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,i(b,"constructor",{value:v,configurable:!0}),i(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,i){void 0===i&&(i=Promise);var a=new w(d(t,e,o,n),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.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 a.type="throw",a.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 i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)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,m):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),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,i,a){try{var c=t[i](a),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,i,a,c=[],l=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(o=i.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&&(a=r.return(),Object(a)!==a))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-0e645915.js","./student-register-store-legacy-d275c1e2.js","./index-legacy-34544d1d.js","./index-legacy-bbbee51a.js","./index-legacy-1c1163d2.js","./index-legacy-57eb3cb0.js","./index-legacy-b2ef5af0.js","./index-legacy-9fbe60c1.js","./index-legacy-972aa2a3.js","./Checker-legacy-46baf011.js"],(function(t,n){"use strict";var i,a,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,H,Y,A,Z,G,X,R,M,F,J,$,q,U,V,K,Q,tt,et,rt,ot,nt,it,at,ct,lt,st,ut;return{setters:[function(t){i=t.t,a=t.d,c=t.aa,l=t.x,s=t.j,u=t.y,d=t.n,f=t.i,m=t.w,p=t.D,h=t.g,v=t.G,g=t.H,_=t.ah,y=t.R,b=t.E,k=t.aJ,w=t.a0,j=t.T,x=t.ab,S=t.v,L=t.Q,P=t.a2,z=t.A,C=t.o,I=t.as,T=t.at,E=t.p,O=t.X,W=t.a8,B=t.P,N=t.Y,D=t.I,H=t.J,Y=t.al,A=t.a6,Z=t.aK,G=t.aL,X=t.K,R=t.aM,M=t.B,F=t.a,J=t.f,$=t.h,q=t.m,U=t.aB,V=t.F,K=t.aN,Q=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){it=t.C},function(t){at=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=i("image-preview")[1],pt=a({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,i,a,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,i=L.initializing,a={transitionDuration:n||o||i?"0s":".3s"};return(1!==t||T.value)&&(a.transform="matrix(".concat(t,", 0, 0, ").concat(t,", ").concat(e,", ").concat(r,")")),a})),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 i=b(null==(o=z.value)?void 0:o.$el),a={x:.5*i.width,y:.5*i.height},c=L.moveX-(r.x-i.left-a.x)*(n-1),l=L.moveY-(r.y-i.top-a.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)},H=!1,Y=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(),H=!1,L.moving=1===r&&(1!==L.scale||T.value),L.zooming=2===r&&!l.value,L.zooming&&(i=L.scale,a=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"))}},Z=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,i=1,L.scale<1&&D();var a=+t.maxZoom;L.scale>a&&N(a,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)&&!H&&P.isHorizontal())return void(L.moving=!1);H=!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=i*d/a;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:Y,onTouchend:Z,onTouchcancel:Z},{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(i("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=a({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(),i=s({active:0,rootWidth:0,rootHeight:0,disableZoom:!1}),a=function(){if(n.value){var t=b(n.value.$el);i.rootWidth=t.width,i.rootHeight=t.height,n.value.resize()}},c=function(t){return r("scale",t)},l=function(t){return r("update:show",t)},u=function(){H(t.beforeClose,{args:[i.active],done:function(){return l(!1)}})},f=function(t){t!==i.active&&(i.active=t,r("change",t))},p=function(){if(t.showIndex)return h("div",{class:gt("index")},[o.index?o.index({index:i.active}):"".concat(i.active+1," / ").concat(t.images.length)])},v=function(){if(o.cover)return h("div",{class:gt("cover")},[o.cover()])},g=function(){i.disableZoom=!0},_=function(){i.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(a),m([I,T],a),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(){a(),w(+n,{immediate:!0})}))):r("close",{index:i.active,url:o[i.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:i.active,maxZoom:t.maxZoom,minZoom:t.minZoom,rootWidth:i.rootWidth,rootHeight:i.rootHeight,disableZoom:i.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(Y)return dt||(e=Z({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(i("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=a({name:xt,props:Pt,emits:["submit"],setup:function(t,e){var r=e.emit,o=e.slots,n=d(),i=R(n,St),a=function(){var e=t.price,r=t.label,o=t.currency,n=t.textAlign,i=t.suffixLabel,a=t.decimalLength;if("number"==typeof e){var c=(e/100).toFixed(+a).split("."),l=a?".".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]),i&&h("span",{class:St("suffix-label")},[i])])}},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),a(),o.button?o.button():h(M,{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?i(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",Ht="_col_tka2j_57",Yt="_radio-group_tka2j_61",At="_radio_tka2j_61",Zt="_badge_tka2j_96",Gt="_section_tka2j_100",Xt="_detail_tka2j_104",Rt="_photoDetail_tka2j_129",Mt="_goodsDetail_tka2j_133",Ft="_actionBar_tka2j_136",Jt="_addCertBtn_tka2j_163",$t="_buyGroup_tka2j_172",qt="_selectWrap_tka2j_178",Ut="_imagesOverlayWrap_tka2j_242";var Vt=tt();t("default",a({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,i,a,c;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o.loading=!0,t.next=4,F.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}i=o.skuStockListTemp.length,a=0;case 13:if(!(a<i)){t.next=21;break}if(!((c=o.skuStockListTemp[a]).stock>=0)){t.next=18;break}return o.radio=c.id,t.abrupt("break",21);case 18:a++,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,i){var a=t.apply(e,o);function c(t){r(a,n,i,c,l,"next",t)}function l(t){r(a,n,i,c,l,"throw",t)}c(void 0)}))})()},methods:{onPreview:function(t){wt({images:this.albumPics,startPosition:t,closeable:!0,className:Ut})},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:Ut})}},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),J("添加成功")}},render:function(){var t,e=this,r=this.product,o=this.skuStockList.find((function(t){return t.id===e.radio}));return h("div",{class:Mt},[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,$(" / "),t.total])}}),h(nt,{border:!1,class:[Ot,"mb12"]},{default:function(){return[h(it,{center:!0,border:!1},{title:function(){return h("div",{class:Wt},[h("span",{class:Bt},[h("i",null,[$("¥")]),q(e.getPrice)])])}}),h(it,{center:!0,border:!1,title:r.name,titleClass:[Nt,"van-ellipsis"]},null)]}}),h(at,{class:[Dt,"mb12"]},{default:function(){return[h(ct,{span:4,class:Ht},{default:function(){return[$("规格")]}}),h(ct,{span:20},{default:function(){return[o?h("div",{class:qt},[o.stock<=0?"当前款式暂时缺货":"已选择 ".concat(o.spDataJson)]):h("div",null,[$("请选择 规格")]),h(lt,{class:Yt,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(U,{position:"top-right",content:t.stock<=0?"缺货":"",color:"#999999",class:Zt,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)&&!Q(r)?t:{default:function(){return[t]}}))];var r}})]}}),this.detailMobileHtml&&h("div",{class:[Gt]},[h("div",{class:Xt},[h("span",null,[$("图文详情")])]),h("div",{class:[Rt,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detailMobileHtml},null)]),!this.loading&&h(V,null,[h(Ct,{class:Ft,"safe-area-inset-bottom":!0},{button:function(){return h("div",{class:$t},[h(K,{type:"primary",class:Jt,text:"添加购买",onClick:function(){return e.onShowCart()}},null)])}})])])}}))}}}))}();
|