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,i=Object.defineProperty||function(t,e,o){t[e]=o.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.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,a=Object.create(n.prototype),c=new C(r||[]);return i(a,"_invoke",{value:k(t,o,c)}),a}function f(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(I){return{type:"throw",arg:I}}}o.wrap=d;var h={};function m(){}function p(){}function v(){}var g={};u(g,c,(function(){return this}));var b=Object.getPrototypeOf,_=b&&b(b(z([])));_&&_!==r&&n.call(_,c)&&(g=_);var y=v.prototype=m.prototype=Object.create(g);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(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")?o.resolve(d.__await).then((function(t){r("next",t,c,l)}),(function(t){r("throw",t,c,l)})):o.resolve(d).then((function(t){u.value=t,c(u)}),(function(t){return r("throw",t,c,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(t,e){function n(){return new o((function(o,n){r(t,e,o,n)}))}return a=a?a.then(n,n):n()}})}function k(t,e,o){var r="suspendedStart";return function(n,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw i;return j()}for(o.method=n,o.arg=i;;){var a=o.delegate;if(a){var c=S(a,o);if(c){if(c===h)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 l=f(t,e,o);if("normal"===l.type){if(r=o.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(r="completed",o.method="throw",o.arg=l.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")),h;var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;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,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}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 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 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:j}}function j(){return{value:void 0,done:!0}}return p.prototype=v,i(y,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:p,configurable:!0}),p.displayName=u(v,s,"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,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},w(x.prototype),u(x.prototype,l,(function(){return this})),o.AsyncIterator=x,o.async=function(t,e,r,n,i){void 0===i&&(i=Promise);var a=new x(d(t,e,r,n),i);return o.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(y),u(y,s,"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=z,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 a.type="throw",a.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 i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("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 o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 i=r;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,h):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),h},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),h}},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:z(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=void 0),h}},o}function o(t,e,o,r,n,i,a){try{var c=t[i](a),l=c.value}catch(s){return void o(s)}c.done?e(l):Promise.resolve(l).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,i,a,c=[],l=!0,s=!1;try{if(i=(o=o.call(t)).next,0===e){if(Object(o)!==o)return;l=!1}else for(;!(l=(r=i.call(o)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(u){s=!0,n=u}finally{try{if(!l&&null!=o.return&&(a=o.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 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-fff8b745.js","./index-legacy-6213e8d0.js","./index-legacy-22cc4940.js","./index-legacy-c55612ee.js","./index-legacy-c8da8776.js","./index-legacy-f6b7c75c.js","./student-register-store-legacy-68aa4861.js","./index-legacy-b004455a.js","./index-legacy-32789c37.js","./Checker-legacy-a655b8d7.js"],(function(t,n){"use strict";var i,a,c,l,s,u,d,f,h,m,p,v,g,b,_,y,w,x,k,S,L,P,C,z,j,I,T,O,E,W,G,A,N,B,D,H,Z,Y,F,X,R,M,$,J,U,V,q,K,Q,tt,et,ot,rt,nt,it,at,ct,lt,st;return{setters:[function(t){i=t.c,a=t.d,c=t.b4,l=t.n,s=t.x,u=t.u,d=t.r,f=t.e,h=t.w,m=t.Y,p=t.a,v=t.p,g=t._,b=t.ad,_=t.L,y=t.Z,w=t.bb,x=t.bc,k=t.t,S=t.ai,L=t.b,P=t.a3,C=t.m,z=t.X,j=t.y,I=t.b2,T=t.b3,O=t.z,E=t.h,W=t.ae,G=t.V,A=t.H,N=t.I,B=t.$,D=t.ay,H=t.a9,Z=t.bd,Y=t.be,F=t.k,X=t.bf,R=t.C,M=t.D,$=t.A,J=t.P,U=t.av,V=t.F,q=t.bg,K=t.a1},function(t){Q=t.A},function(t){tt=t.a,et=t.S},function(t){ot=t.I},function(t){rt=t.C},function(t){nt=t.C},function(t){it=t.R,at=t.C},function(t){ct=t.R,lt=t.a},function(t){st=t.T},null],execute:function(){var n=document.createElement("style");n.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(n);var ut,dt=function(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))},ft=i("image-preview")[1],ht=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 o,r,n,i,a,c,l,k,S=e.emit,L=e.slots,P=s({scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,initializing:!1,imageRatio:0}),C=u(),z=d(),j=d(),I=d(!1),T=d(!1),O=0,E=f((function(){var t=P.scale,e=P.moveX,o=P.moveY,r=P.moving,n=P.zooming,i=P.initializing,a={transitionDuration:n||r||i?"0s":".3s"};return(1!==t||T.value)&&(a.transform="matrix(".concat(t,", 0, 0, ").concat(t,", ").concat(e,", ").concat(o,")")),a})),W=f((function(){if(P.imageRatio){var e=t.rootWidth,o=t.rootHeight,r=I.value?o/P.imageRatio:e;return Math.max(0,(P.scale*r-e)/2)}return 0})),G=f((function(){if(P.imageRatio){var e=t.rootWidth,o=t.rootHeight,r=I.value?o:e*P.imageRatio;return Math.max(0,(P.scale*r-o)/2)}return 0})),A=function(e,o){var r;if((e=g(e,+t.minZoom,+t.maxZoom+1))!==P.scale){var n=e/P.scale;if(P.scale=e,o){var i=y(null==(r=z.value)?void 0:r.$el),a={x:.5*i.width,y:.5*i.height},c=P.moveX-(o.x-i.left-a.x)*(n-1),l=P.moveY-(o.y-i.top-a.y)*(n-1);P.moveX=g(c,-W.value,W.value),P.moveY=g(l,-G.value,G.value)}else P.moveX=0,P.moveY=T.value?O:0;S("scale",{scale:e,index:t.active})}},N=function(){A(1)},B=!1,D=function(e){var c=e.touches;if(2!==(o=c.length)||!t.disableZoom){var l=C.offsetX;C.start(e),r=P.moveX,n=P.moveY,k=Date.now(),B=!1,P.moving=1===o&&(1!==P.scale||T.value),P.zooming=2===o&&!l.value,P.zooming&&(i=P.scale,a=dt(c))}},H=function(){if(!(o>1)){var t,e=C.offsetX,r=C.offsetY,n=Date.now()-k;e.value<w&&r.value<w&&(n<250?l?(clearTimeout(l),l=null,t=P.scale>1?1:2,A(t,2===t||T.value?{x:C.startX.value,y:C.startY.value}:void 0)):l=setTimeout((function(){S("close"),l=null}),250):n>x&&S("longPress"))}},Z=function(e){var o=!1;if((P.moving||P.zooming)&&(o=!0,P.moving&&r===P.moveX&&n===P.moveY&&(o=!1),!e.touches.length)){P.zooming&&(P.moveX=g(P.moveX,-W.value,W.value),P.moveY=g(P.moveY,-G.value,G.value),P.zooming=!1),P.moving=!1,r=0,n=0,i=1,P.scale<1&&N();var a=+t.maxZoom;P.scale>a&&A(a,c)}v(e,o),H(),C.reset()},Y=function(){var e=t.rootWidth,o=t.rootHeight,r=o/e,n=P.imageRatio;I.value=P.imageRatio>r&&n<2.6,T.value=P.imageRatio>r&&n>=2.6,T.value&&(O=(n*e-o)/2,P.moveY=O,P.initializing=!0,b((function(){P.initializing=!1}))),N()},F=function(t){var e=t.target,o=e.naturalWidth,r=e.naturalHeight;P.imageRatio=r/o,Y()};return h((function(){return t.active}),N),h((function(){return t.show}),(function(t){t||N()})),h((function(){return[t.rootWidth,t.rootHeight]}),Y),m("touchmove",(function(t){var e=t.touches;if(C.move(t),P.moving){var o=C.deltaX,l=C.deltaY,s=o.value+r,u=l.value+n;if((s>W.value||s<-W.value)&&!B&&C.isHorizontal())return void(P.moving=!1);B=!0,v(t,!0),P.moveX=g(s,-W.value,W.value),P.moveY=g(u,-G.value,G.value)}if(P.zooming&&(v(t,!0),2===e.length)){var d=dt(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),A(f,c)}}),{target:f((function(){var t;return null==(t=j.value)?void 0:t.$el}))}),function(){var e={loading:function(){return p(_,{type:"spinner"},null)}};return p(tt,{ref:j,class:ft("swipe-item"),onTouchstartPassive:D,onTouchend:Z,onTouchcancel:Z},{default:function(){return[L.image?p("div",{class:ft("image-wrap")},[L.image({src:t.src})]):p(ot,{ref:z,src:t.src,fit:"contain",class:ft("image",{vertical:I.value}),style:E.value,onLoad:F},e)]}})}}}),mt=r(i("image-preview"),2),pt=mt[0],vt=mt[1],gt=["show","teleport","transition","overlayStyle","closeOnPopstate"],bt={show:Boolean,loop:k,images:S(),minZoom:L(1/3),maxZoom:L(3),overlay:k,closeable:Boolean,showIndex:k,className:P,closeIcon:C("clear"),transition:String,beforeClose:Function,overlayClass:P,overlayStyle:Object,swipeDuration:L(300),startPosition:L(0),showIndicators:Boolean,closeOnPopstate:k,closeIconPosition:C("top-right"),teleport:[String,Object]},_t=a({name:pt,props:bt,emits:["scale","close","closed","change","longPress","update:show"],setup:function(t,e){var o=e.emit,r=e.slots,n=d(),i=s({active:0,rootWidth:0,rootHeight:0,disableZoom:!1}),a=function(){if(n.value){var t=y(n.value.$el);i.rootWidth=t.width,i.rootHeight=t.height,n.value.resize()}},c=function(t){return o("scale",t)},l=function(t){return o("update:show",t)},u=function(){B(t.beforeClose,{args:[i.active],done:function(){return l(!1)}})},f=function(t){t!==i.active&&(i.active=t,o("change",t))},m=function(){if(t.showIndex)return p("div",{class:vt("index")},[r.index?r.index({index:i.active}):"".concat(i.active+1," / ").concat(t.images.length)])},v=function(){if(r.cover)return p("div",{class:vt("cover")},[r.cover()])},g=function(){i.disableZoom=!0},b=function(){i.disableZoom=!1},_=function(){if(t.closeable)return p(N,{role:"button",name:t.closeIcon,class:[vt("close-icon",t.closeIconPosition),A],onClick:u},null)},w=function(){return o("closed")},x=function(t,e){var o;return null==(o=n.value)?void 0:o.swipeTo(t,e)};return z({swipeTo:x}),j(a),h([I,T],a),h((function(){return t.startPosition}),(function(t){return f(+t)})),h((function(){return t.show}),(function(e){var r=t.images,n=t.startPosition;e?(f(+n),O((function(){a(),x(+n,{immediate:!0})}))):o("close",{index:i.active,url:r[i.active]})})),function(){return p(G,E({class:[vt(),t.className],overlayClass:[vt("overlay"),t.overlayClass],onClosed:w,"onUpdate:show":l},W(t,gt)),{default:function(){return[_(),p(et,{ref:n,lazyRender:!0,loop:t.loop,class:vt("swipe"),duration:t.swipeDuration,initialSwipe:t.startPosition,showIndicators:t.showIndicators,indicatorColor:"white",onChange:f,onDragEnd:b,onDragStart:g},{default:function(){return[t.images.map((function(e,n){return p(ht,{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 o("longPress",{index:n})}},{image:r.image})}))]}}),m(),v()]}})}}}),yt={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,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(D)return ut||(e=Z({setup:function(){var t=Y(),e=t.state,o=t.toggle,r=function(){e.images=[]};return function(){return p(_t,E(e,{onClosed:r,"onUpdate:show":o}),null)}}}),ut=e.instance),t=Array.isArray(t)?{images:t,startPosition:o}:t,ut.open(H({},yt,t)),ut};F(_t);var xt=r(i("submit-bar"),3),kt=xt[0],St=xt[1],Lt=xt[2],Pt={tip:String,label:String,price:Number,tipIcon:String,loading:Boolean,currency:C("¥"),disabled:Boolean,textAlign:String,buttonText:String,buttonType:C("danger"),buttonColor:String,suffixLabel:String,placeholder:Boolean,decimalLength:L(2),safeAreaInsetBottom:k},Ct=a({name:kt,props:Pt,emits:["submit"],setup:function(t,e){var o=e.emit,r=e.slots,n=d(),i=X(n,St),a=function(){var e=t.price,o=t.label,r=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 p("div",{class:St("text"),style:{textAlign:n}},[p("span",null,[o||Lt("label")]),p("span",{class:St("price")},[r,p("span",{class:St("price-integer")},[c[0]]),l]),i&&p("span",{class:St("suffix-label")},[i])])}},c=function(){var e,o=t.tip,n=t.tipIcon;if(r.tip||o)return p("div",{class:St("tip")},[n&&p(N,{class:St("tip-icon"),name:n},null),o&&p("span",{class:St("tip-text")},[o]),null==(e=r.tip)?void 0:e.call(r)])},l=function(){return o("submit")},s=function(){var e,o;return p("div",{ref:n,class:[St(),{"van-safe-area-bottom":t.safeAreaInsetBottom}]},[null==(e=r.top)?void 0:e.call(r),c(),p("div",{class:St("bar")},[null==(o=r.default)?void 0:o.call(r),a(),r.button?r.button():p(R,{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()}}}),zt=F(Ct),jt="_swipeItemImg_1ayhb_1",It="_swipe_1ayhb_1",Tt="_custom-indicator_1ayhb_7",Ot="_goodsHead_1ayhb_17",Et="_priceGroup_1ayhb_24",Wt="_price_1ayhb_24",Gt="_goodsName_1ayhb_47",At="_row_1ayhb_53",Nt="_col_1ayhb_57",Bt="_radio-group_1ayhb_61",Dt="_radio_1ayhb_61",Ht="_badge_1ayhb_102",Zt="_section_1ayhb_106",Yt="_detail_1ayhb_110",Ft="_photoDetail_1ayhb_135",Xt="_goodsDetail_1ayhb_139",Rt="_actionBar_1ayhb_142",Mt="_addCertBtn_1ayhb_169",$t="_buyGroup_1ayhb_179",Jt="_selectWrap_1ayhb_185",Ut="_imagesOverlayWrap_1ayhb_249";t("default",a({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,i,a,c;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r.loading=!0,t.next=4,M.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}i=r.skuStockListTemp.length,a=0;case 13:if(!(a<i)){t.next=21;break}if(!((c=r.skuStockListTemp[a]).stock>=0)){t.next=18;break}return r.radio=c.id,t.abrupt("break",21);case 18:a++,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,i){var a=t.apply(e,r);function c(t){o(a,n,i,c,l,"next",t)}function l(t){o(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,o=document.querySelectorAll(".msgWrap img"),r=Array.from(o).map((function(o,r){return t.srcElement==o&&(e=r),o.src}));wt({images:r,startPosition:e,closeable:!0,className:Ut})}},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:Xt},[p(et,{class:It,lazyRender:!0},{default:function(){return[e.albumPics.map((function(t,o){return p(tt,null,{default:function(){return[p(ot,{class:jt,src:t,onClick:function(){return e.onPreview(o)},fit:"cover"},null)]}})}))]},indicator:function(t){return t.total>1&&p("div",{class:Tt},[(t.active||0)+1,$(" / "),t.total])}}),p(rt,{border:!1,class:[Ot,"mb12"]},{default:function(){return[p(nt,{center:!0,border:!1},{title:function(){return p("div",{class:Et},[p("span",{class:Wt},[p("i",null,[$("¥")]),J(e.getPrice)])])}}),p(nt,{center:!0,border:!1,title:o.name,titleClass:[Gt,"van-ellipsis"]},null)]}}),p(it,{class:[At,"mb12"]},{default:function(){return[p(at,{span:4,class:Nt},{default:function(){return[$("规格")]}}),p(at,{span:20},{default:function(){return[r?p("div",{class:Jt},[r.stock<=0?"当前款式暂时缺货":"已选择 ".concat(r.spDataJson)]):p("div",null,[$("请选择 规格")]),p(ct,{class:Bt,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(U,{position:"top-right",content:t.stock<=0?"缺货":"",color:"#999999",class:Ht,offset:[-20,0]},{default:function(){return[p(lt,{class:Dt,name:t.id,disabled:t.stock<=0,onClick:function(){t.stock<=0||(e.radio=t.id)}},{default:function(){return[p(st,{size:"large",plain:o,type:r},{default:function(){return[t.spDataJson]}})]}})]}})})),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!K(o)?t:{default:function(){return[t]}}))];var o}})]}}),this.detailMobileHtml&&p("div",{class:[Zt]},[p("div",{class:Yt},[p("span",null,[$("图文详情")])]),p("div",{class:[Ft,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detailMobileHtml},null)]),!this.loading&&p(V,null,[p(zt,{class:Rt,"safe-area-inset-bottom":!0},{button:function(){return p("div",{class:$t},[p(q,{type:"primary",class:Mt,text:"添加购买",onClick:function(){return e.onShowCart()}},null)])}})]),p(G,{show:this.addGoodsShow,closeable:!0,position:"bottom",round:!0,onClose:function(){e.addGoodsShow=!1}},{default:function(){return[p(Q,{show:e.addGoodsShow,item:e.selectGoodsItem,onClose:function(){e.addGoodsShow=!1},defaultRadio:e.radio,showType:"cart"},null)]}})])}}))}}}))}();
|