index-legacy-968dc31a.js 21 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={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(E){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),c=new L(n||[]);return i(a,"_invoke",{value:j(t,r,c)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(E){return{type:"throw",arg:E}}}r.wrap=f;var v={};function p(){}function h(){}function m(){}var g={};s(g,c,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(I([])));_&&_!==n&&o.call(_,c)&&(g=_);var b=m.prototype=p.prototype=Object.create(g);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function n(i,a,c,u){var l=d(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var a;i(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return a=a?a.then(o,o):o()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=d(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.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,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(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,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=m,i(b,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:h,configurable:!0}),h.displayName=s(m,l,"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,m):(t.__proto__=m,s(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),s(b,l,"Generator"),s(b,c,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=I,L.prototype={constructor:L,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(O),!t)for(var e in this)"t"===e.charAt(0)&&o.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,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){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(!u)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 n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;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,v):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),v},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),O(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},r}function r(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function i(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(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 n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(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 c(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 c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy-e510f409.js","./student-register-store-legacy-053ca0b1.js","./index-legacy-4a133122.js","./index-legacy-4354eb31.js","./index-legacy-3ff1ee27.js","./index-legacy-2040334d.js"],(function(t,n){"use strict";var i,c,u,l,s,f,d,v,p,h,m,g,y,_,b,w,x,j,k,S,O,L,I,C,E,P,D,F,G,z,N,T,A,B,M,J,q,R,Y,X,V;return{setters:[function(t){i=t.q,c=t.V,u=t.v,l=t.t,s=t.d,f=t.l,d=t.i,v=t.x,p=t.X,h=t.h,m=t.z,g=t.w,y=t.al,_=t.am,b=t.aK,w=t.o,x=t.ao,j=t.ap,k=t.af,S=t.ag,O=t.D,L=t.f,I=t.ak,C=t.n,E=t.az,P=t.G,D=t.H,F=t.K,G=t._,z=t.aL,N=t.g,T=t.m,A=t.B,B=t.M},function(t){M=t.u,J=t.S},function(t){q=t.R,R=t.a},function(t){Y=t.C},function(t){X=t.I},function(t){V=t.T}],execute:function(){var U=document.createElement("style");U.textContent="._addGoodsCart_1x0mj_1{padding-top:.32rem;--k-font-primary: #FFCB75;--van-primary: var(--k-font-primary);--van-stepper-button-round-theme-color: var(--van-primary)}._addGoodsCart_1x0mj_1 .van-stepper__input{background:#f7f8f9!important;border-radius:.16rem;margin:0 .21333rem}._addGoodsCart_1x0mj_1 .van-stepper__minus--disabled{opacity:.6!important;color:#333!important;background:#f7f8f9!important;border-color:#f7f8f9!important}._addGoodsCart_1x0mj_1 ._addCartBtn_1x0mj_18{background:linear-gradient(121deg,#FFD892 0%,#FFCB75 100%);border-radius:.32rem;font-size:.42667rem;font-weight:600;color:#5b2c03;border:0}._goodsSection_1x0mj_26{position:relative;width:2.66667rem;height:2.66667rem;border-radius:.21333rem;overflow:hidden}._goodsSection_1x0mj_26 ._sellOut_1x0mj_33{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.2);padding:.53333rem}._goodsImg_1x0mj_45{width:2.66667rem;height:2.66667rem;background:linear-gradient(180deg,#f0f0f0 0%,#d7d7d7 100%);overflow:hidden}._goodsPrice_1x0mj_51{padding-top:.21333rem;font-size:.48rem;color:#ff4e19;line-height:.58667rem}._goodsPrice_1x0mj_51 span{font-size:.42667rem}._goodsStore_1x0mj_60{font-size:.37333rem;color:#999;line-height:.53333rem}._title_1x0mj_65{font-size:.42667rem;color:#333;line-height:.58667rem}._radio-group_1x0mj_70{display:flex;flex-wrap:wrap;margin-top:.37333rem}._radio_1x0mj_70{margin-right:.26667rem;margin-bottom:.21333rem;min-width:1.6rem}._radio_1x0mj_70 .van-radio__icon{display:none}._radio_1x0mj_70 .van-tag--large{height:.85333rem;font-size:.42667rem;text-align:center;display:flex;align-items:center;justify-content:center}._radio_1x0mj_70 .van-tag{box-sizing:border-box}._radio_1x0mj_70 .van-tag--default{color:#999;background-color:#f7f8f9}._radio_1x0mj_70 .van-tag--primary{background-color:#fffaf4;background:#FFFAF4;border-radius:.16rem;border:.02667rem solid #FFCF7C;color:#f39f11}._radio_1x0mj_70 .van-radio__label{margin-left:0;width:100%}\n",document.head.appendChild(U);var $=a(i("swipe"),2),H=$[0],K=$[1],W={loop:c,width:u,height:u,vertical:Boolean,autoplay:l(0),duration:l(500),touchable:c,lazyRender:Boolean,initialSwipe:l(0),indicatorColor:String,showIndicators:c,stopPropagation:c},Q=Symbol(H),Z=s({name:H,props:W,emits:["change","dragStart","dragEnd"],setup:function(t,e){var r,n,o=e.emit,i=e.slots,a=f(),c=f(),u=d({rect:null,width:0,height:0,offset:0,active:0,swiping:!1}),l=!1,s=v(),F=p(Q),G=F.children,z=F.linkChildren,N=h((function(){return G.length})),T=h((function(){return u[t.vertical?"height":"width"]})),A=h((function(){return t.vertical?s.deltaY.value:s.deltaX.value})),B=h((function(){return u.rect?(t.vertical?u.rect.height:u.rect.width)-T.value*N.value:0})),M=h((function(){return T.value?Math.ceil(Math.abs(B.value)/T.value):N.value})),J=h((function(){return N.value*T.value})),q=h((function(){return(u.active+N.value)%N.value})),R=h((function(){var e=t.vertical?"vertical":"horizontal";return s.direction.value===e})),Y=h((function(){var e={transitionDuration:"".concat(u.swiping?0:t.duration,"ms"),transform:"translate".concat(t.vertical?"Y":"X","(").concat(u.offset,"px)")};if(T.value){var r=t.vertical?"height":"width",n=t.vertical?"width":"height";e[r]="".concat(J.value,"px"),e[n]=t[n]?"".concat(t[n],"px"):""}return e})),X=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e*T.value;t.loop||(n=Math.min(n,-B.value));var o=r-n;return t.loop||(o=D(o,B.value,0)),o},V=function(e){var r=e.pace,n=void 0===r?0:r,i=e.offset,a=void 0===i?0:i,c=e.emitChange;if(!(N.value<=1)){var l=u.active,s=function(e){var r=u.active;return e?t.loop?D(r+e,-1,N.value):D(r+e,0,M.value):r}(n),f=X(s,a);if(t.loop){if(G[0]&&f!==B.value){var d=f<B.value;G[0].setOffset(d?J.value:0)}if(G[N.value-1]&&0!==f){var v=f>0;G[N.value-1].setOffset(v?-J.value:0)}}u.active=s,u.offset=f,c&&s!==l&&o("change",q.value)}},U=function(){u.swiping=!0,u.active<=-1?V({pace:N.value}):u.active>=N.value&&V({pace:-N.value})},$=function(){U(),s.reset(),E((function(){u.swiping=!1,V({pace:1,emitChange:!0})}))},H=function(){return clearTimeout(r)},W=function e(){H(),+t.autoplay>0&&N.value>1&&(r=setTimeout((function(){$(),e()}),+t.autoplay))},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:+t.initialSwipe;if(a.value){var r=function(){var r,n;if(!I(a)){var o={width:a.value.offsetWidth,height:a.value.offsetHeight};u.rect=o,u.width=+(null!=(r=t.width)?r:o.width),u.height=+(null!=(n=t.height)?n:o.height)}N.value&&-1===(e=Math.min(N.value-1,e))&&(e=N.value-1),u.active=e,u.swiping=!0,u.offset=X(e),G.forEach((function(t){t.setOffset(0)})),W()};I(a)?C().then(r):r()}},tt=function(){return Z(u.active)},et=function(e){!t.touchable||e.touches.length>1||(s.start(e),l=!1,n=Date.now(),H(),U())},rt=function(){if(t.touchable&&u.swiping){var e=Date.now()-n,r=A.value/e;if((Math.abs(r)>.25||Math.abs(A.value)>T.value/2)&&R.value){var i=t.vertical?s.offsetY.value:s.offsetX.value,a=0;a=t.loop?i>0?A.value>0?-1:1:0:-Math[A.value>0?"ceil":"floor"](A.value/T.value),V({pace:a,emitChange:!0})}else A.value&&V({pace:0});l=!1,u.swiping=!1,o("dragEnd",{index:q.value}),W()}},nt=function(e,r){var n=r===q.value,o=n?{backgroundColor:t.indicatorColor}:void 0;return L("i",{style:o,class:K("indicator",{active:n})},null)};return m({prev:function(){U(),s.reset(),E((function(){u.swiping=!1,V({pace:-1,emitChange:!0})}))},next:$,state:u,resize:tt,swipeTo:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};U(),s.reset(),E((function(){var n;n=t.loop&&e===N.value?0===u.active?0:e:e%N.value,r.immediate?E((function(){u.swiping=!1})):u.swiping=!1,V({pace:n-u.active,emitChange:!0})}))}}),z({size:T,props:t,count:N,activeIndicator:q}),g((function(){return t.initialSwipe}),(function(t){return Z(+t)})),g(N,(function(){return Z(u.active)})),g((function(){return t.autoplay}),W),g([y,_,function(){return t.width},function(){return t.height}],tt),g(b(),(function(t){"visible"===t?W():H()})),w(Z),x((function(){return Z(u.active)})),j((function(){return Z(u.active)})),k(H),S(H),O("touchmove",(function(e){t.touchable&&u.swiping&&(s.move(e),R.value&&(!t.loop&&(0===u.active&&A.value>0||u.active===N.value-1&&A.value<0)||(P(e,t.stopPropagation),V({offset:A.value}),l||(o("dragStart",{index:q.value}),l=!0))))}),{target:c}),function(){var e;return L("div",{ref:a,class:K()},[L("div",{ref:c,style:Y.value,class:K("track",{vertical:t.vertical}),onTouchstartPassive:et,onTouchend:rt,onTouchcancel:rt},[null==(e=i.default)?void 0:e.call(i)]),i.indicator?i.indicator({active:q.value,total:N.value}):t.showIndicators&&N.value>1?L("div",{class:K("indicators",{vertical:t.vertical})},[Array(N.value).fill("").map(nt)]):void 0])}}}),tt=(t("S",F(Z)),a(i("swipe-item"),2)),et=tt[0],rt=tt[1],nt=s({name:et,setup:function(t,e){var r,n=e.slots,o=d({offset:0,inited:!1,mounted:!1}),i=G(Q),a=i.parent,c=i.index;if(a){var u=h((function(){var t={},e=a.props.vertical;return a.size.value&&(t[e?"height":"width"]="".concat(a.size.value,"px")),o.offset&&(t.transform="translate".concat(e?"Y":"X","(").concat(o.offset,"px)")),t})),l=h((function(){var t=a.props,e=t.loop;if(!t.lazyRender||r)return!0;if(!o.mounted)return!1;var n=a.activeIndicator.value,i=a.count.value-1,u=0===n&&e?i:n-1,l=n===i&&e?0:n+1;return r=c.value===n||c.value===u||c.value===l}));return w((function(){C((function(){o.mounted=!0}))})),m({setOffset:function(t){o.offset=t}}),function(){var t;return L("div",{class:rt(),style:u.value},[l.value?null==(t=n.default)?void 0:t.call(n):null])}}}}),ot=(t("a",F(nt)),t("i",""+new URL("icon-sell-out-437e8d6c.png",n.meta.url).href)),it={addGoodsCart:"_addGoodsCart_1x0mj_1",addCartBtn:"_addCartBtn_1x0mj_18",goodsSection:"_goodsSection_1x0mj_26",sellOut:"_sellOut_1x0mj_33",goodsImg:"_goodsImg_1x0mj_45",goodsPrice:"_goodsPrice_1x0mj_51",goodsStore:"_goodsStore_1x0mj_60",title:"_title_1x0mj_65","radio-group":"_radio-group_1x0mj_70",radio:"_radio_1x0mj_70"};var at=M();t("A",s({name:"add-goods-cart",props:{show:{type:Boolean,default:!1},item:{type:Object,default:{}},defaultRadio:{type:Number,default:0},showType:{type:String,default:"cart"},onClose:{type:Function,default:function(){}}},watch:{show:function(t){t&&(this.totalData={},this.total=1,this.radio="",this.setList())}},data:function(){return{radio:"",total:1,totalData:{},skuStockList:[]}},computed:{selectItem:function(){var t=this.radio,e=this.skuStockList.find((function(e){return e.id==t}));if(e){var r=e.stock-e.lockStock;return o(o({},e),{},{stock:r})}return{stock:0}}},mounted:function(){this.setList()},methods:{setList:function(){var t=this,e=[],r=JSON.parse(JSON.stringify(this.item));if(Array.isArray(r.skuStockList)&&(e=r.skuStockList.map((function(t){if(t.pic=t.pic||r.pic,t.cartNum=0,t.spData){var e=JSON.parse(t.spData),n="";e.forEach((function(t){n+="".concat(t.value)})),t.spDataJson=n}else t.spDataJson="默认";return t.lockStock=t.lockStock>0?t.lockStock:0,o({},t)}))),!e.length)return e;var n=0;if(this.defaultRadio){var i=e.findIndex((function(e){return e.id==t.defaultRadio}));n=i>-1?i:0}this.radio=e[n].id,this.skuStockList=e},onAddCart:function(){var t,n=this;return(t=e().mark((function t(){var r,o,i,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.selectItem,o=n.item,i={pic:o.pic,name:o.name,brandName:o.brandName,productSn:o.productSn,price:r.price,originalPrice:o.originalPrice,productSkuId:r.id,stock:r.stock,quantity:n.total,productId:o.id,spDataJson:r.spDataJson,hidden:"cart"===n.showType?0:1,promoterId:n.$route.query.promoterId?n.$route.query.promoterId:void 0};try{a=!1,at.getGoods.forEach((function(t){t.id===i.productId&&t.productSkuId===i.productSkuId&&(a=!0,t.quantity+=i.quantity)})),a||at.setGoods(i),z("添加成功"),n.onClose()}catch(e){}case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))})()},setProductStock:function(t){for(var e=0;e<this.skuStockList.length;e++)this.skuStockList[e].id===this.radio&&(this.skuStockList[e].cartNum=t)}},render:function(){var t=this;return L("div",{class:it.addGoodsCart},[L(Y,{titleStyle:{paddingLeft:"12px"}},{icon:function(){return L("div",{class:it.goodsSection},[L(X,{src:t.selectItem.pic,class:it.goodsImg,fit:"cover"},null),t.selectItem.stock<=0&&L("div",{class:it.sellOut},[L(X,{src:ot,fit:"cover",class:it.sellOutImg},null)])])},title:function(){return L("div",{class:it.goodsInfo},[L("p",{class:it.goodsPrice},[L("span",null,[N("¥")]),T(t.selectItem.price)]),L("p",{class:it.goodsStore},[N("库存:"),t.selectItem.stock])])}}),L(Y,null,{title:function(){return L("div",{class:it.title},[N("规格")])},label:function(){var e,r;return L(q,{class:it["radio-group"],modelValue:t.radio},"function"==typeof(r=e=t.skuStockList.map((function(e){var r=e.id===t.radio,n=r?"primary":"default";return L(R,{class:it.radio,name:e.id,onClick:function(){t.radio!=e.id&&(t.radio=e.id)}},{default:function(){return[L(V,{size:"large",plain:r,type:n},{default:function(){return[e.spDataJson]}})]}})})))||"[object Object]"===Object.prototype.toString.call(r)&&!B(r)?e:{default:function(){return[e]}})}}),L(Y,{title:"购买数量",style:{margin:"12px 0"},border:!1,titleClass:it.title,center:!0},{default:function(){return[L(J,{modelValue:t.total,"onUpdate:modelValue":function(e){return t.total=e},inputWidth:"50px",theme:"round",buttonSize:"24px",max:t.selectItem.stock>200?200:t.selectItem.stock,min:1,disabled:t.selectItem.stock<=0,integer:!0},null)]}}),L("div",{class:["btnGroup"],style:{marginBottom:"8px"}},[L(A,{block:!0,type:"primary",text:"确定",class:it.addCartBtn,disabled:this.selectItem.stock<=0,onClick:function(){return t.onAddCart()}},null)])])}}))}}}))}();