<<<<<<<< HEAD:dist/assets/index-legacy-53d34cf2.js !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:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=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(M){s=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),l=new L(n||[]);return i(a,"_invoke",{value:C(t,r,l)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(M){return{type:"throw",arg:M}}}r.wrap=d;var g={};function p(){}function h(){}function y(){}var m={};s(m,l,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(S([])));_&&_!==n&&o.call(_,l)&&(m=_);var b=y.prototype=p.prototype=Object.create(m);function A(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(e,r){function n(i,a,l,c){var u=f(e[i],e,a);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==t(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){n("next",t,l,c)}),(function(t){n("throw",t,l,c)})):r.resolve(d).then((function(t){s.value=t,l(s)}),(function(t){return n("throw",t,l,c)}))}c(u.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 C(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 k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=z(a,r);if(l){if(l===g)continue;return l}}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 c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function z(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,z(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,g;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,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function x(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[l];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=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},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;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),g}},r}function r(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 n(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&t.onBuyClick(e)}},null)])])])}}),V="_tabList_1we34_1",Y="_goodsList_1we34_6",W=c({name:"tab-list",props:{showAdd:{type:Boolean,default:!0},typeId:{type:Number,default:0},productAttributeCategoryId:{type:[Number,String],default:0},brandId:{type:[Number,String],default:0},sort:{type:Number,defalut:0},keyword:{type:String,defalut:""},isTab:{type:Boolean,default:!1},onOpenWebView:{type:Function,default:function(t){}}},data:function(){return{list:[],loading:!1,finished:!1,params:{productCategoryId:void 0,productAttributeCategoryId:void 0,brandId:null,sort:null,keyword:"",pageNum:1,pageSize:20},addGoodsShow:!1,selectGoodsItem:{}}},mounted:function(){this.getList()},methods:{onSearch:function(){this.finished=!1,this.list=[],this.params.pageNum=1,this.getList()},getList:function(){var t=this;return i(e().mark((function r(){var o,i,a;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.prev=1,(o=t.params).productCategoryId=t.typeId?t.typeId:void 0,o.productAttributeCategoryId=t.productAttributeCategoryId?t.productAttributeCategoryId:void 0,o.brandId=t.brandId?t.brandId:void 0,o.sort=t.sort?t.sort:void 0,o.keyword=t.keyword?t.keyword:void 0,e.next=10,y.post("/edu-app/open/mall/productSearch",{noAuthorization:!0,data:n({},o)});case 10:if(i=e.sent,a=i.data||{},!(t.list.length>0&&1===a.pageNum)){e.next=14;break}return e.abrupt("return");case 14:t.list=t.list.concat(a.list||[]),t.finished=a.pageNum>=a.totalPage,t.params.pageNum=a.pageNum+1,e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),t.finished=!0;case 22:t.loading=!1;case 23:case"end":return e.stop()}}),r,null,[[1,19]])})))()},onDetailClick:function(t){if(this.isTab){var e=this.$router.resolve({path:"/goodsDetail",query:{id:t.id}}).fullPath;this.onOpenWebView(e)}else this.$router.push({path:"/goodsDetail",query:{id:t.id}})},onBuyClick:function(t){this.selectGoodsItem=t,this.addGoodsShow=!0}},render:function(){var t=this;return u("div",{class:V},[u(x,{loading:this.loading,"onUpdate:loading":function(e){return t.loading=e},finished:this.finished,finishedText:"",immediateCheck:!1,class:[Y,"mb12"],style:{height:this.list.length?"auto":"100%"},onLoad:this.getList},{default:function(){return[t.list.length&&t.list.map((function(e){return u(B,{item:e,onItemClick:t.onDetailClick,onBuyClick:t.onBuyClick,showAdd:t.showAdd},null)}))||null,!t.loading&&!t.list.length&&u(m,{description:"暂无商品"},null)||null]}}),u(v,{show:this.addGoodsShow,closeable:!0,position:"bottom",round:!0,onClose:function(){t.addGoodsShow=!1}},{default:function(){return[u(C,{show:t.addGoodsShow,onClose:function(){t.addGoodsShow=!1},item:t.selectGoodsItem},null)]}})])}}),H="_arrowLeft_alev1_7",X="_filter-top_alev1_11",J="_active_alev1_23",R="_filterBtn_alev1_27",K="_filterTagWrap_alev1_30",Z="_filterTag_alev1_30",$="_filter-productCategory_alev1_46",tt="_filter-tag_alev1_62",et="_filter-tag-checked_alev1_72",rt="_filterSort_alev1_76",nt="_icon-active_alev1_83",ot="_iconSort_alev1_86",it={loading:"_loading_8b9qx_1",titlePopup:"_titlePopup_8b9qx_7",title:"_title_8b9qx_7","radio-group":"_radio-group_8b9qx_21",radio:"_radio_8b9qx_21",filterAction:"_filterAction_8b9qx_59"};function at(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}var lt=c({name:"goods-filter-list",props:{setFilter:{type:Function,default:function(t){}},cateGoryId:{type:Number,default:0}},data:function(){return{dataShow:!0,loading:!1,brandList:[],productAttributeCategoryList:[],productCategorySmallVoList:[],params:{productAttributeCategoryList:null,brandList:null}}},mounted:function(){this.getFilterList()},methods:{getFilterList:function(){var t=this;return i(e().mark((function r(){var n,o,i,a,l,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.prev=1,e.next=4,y.get("/edu-app/open/mall/search/condition",{noAuthorization:!0});case 4:n=e.sent,t.dataShow=200===n.code,o=n.data||{},i=o.brandList,a=void 0===i?[]:i,l=o.productAttributeCategoryList,c=void 0===l?[]:l,t.brandList=a,t.productAttributeCategoryList=c,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.dataShow=!1;case 14:t.loading=!1;case 15:case"end":return e.stop()}}),r,null,[[1,11]])})))()},onFilterClick:function(){this.setFilter({productCategory:this.productCategorySmallVoList[this.params.productCategorySmallVoList],productAttributeCategory:this.productAttributeCategoryList[this.params.productAttributeCategoryList],brand:this.brandList[this.params.brandList]})},setParams:function(t){this.params[t]=null}},render:function(){var t=this;return u("div",null,[this.loading&&u("div",{class:it.loading},[u(_,{color:"var(--van-primary)"},null)]),u("div",{class:it.filterWrap},[u("div",{class:it.titlePopup},[g("筛选")]),u(j,{border:!1,title:"商品类型"},{label:function(){var e;return u(L,{class:it["radio-group"],modelValue:t.params.productAttributeCategoryList,"onUpdate:modelValue":function(e){return t.params.productAttributeCategoryList=e}},at(e=t.productAttributeCategoryList.map((function(e,r){return u(S,{key:e.id,class:it.radio,name:r,onClick:function(){}},{default:function(){return[u(k,{size:"large",plain:!0,type:r===t.params.productAttributeCategoryList?"primary":"default"},{default:function(){return[e.name]}})]}})})))?e:{default:function(){return[e]}})}}),u(j,{border:!1,title:"品牌"},{label:function(){var e;return u(L,{class:it["radio-group"],modelValue:t.params.brandList,"onUpdate:modelValue":function(e){return t.params.brandList=e}},at(e=t.brandList.map((function(e,r){return u(S,{key:e.id,class:it.radio,name:r,onClick:function(){}},{default:function(){return[u(k,{size:"large",plain:!0,type:r===t.params.brandList?"primary":"default"},{default:function(){return[e.name]}})]}})})))?e:{default:function(){return[e]}})}}),u(U,{style:{margin:"0"}},null),u("div",{class:it.filterAction},[u(b,{round:!0,style:{marginRight:"8px"},onClick:function(){return t.params={productAttributeCategoryList:null,brandList:null}}},{default:function(){return[g("重置")]}}),u(b,{round:!0,type:"primary",color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",style:{marginLeft:"8px"},onClick:function(){return t.onFilterClick()}},{default:function(){return[g("确认")]}})])])])}});t("default",c({name:"goods-list",data:function(){var t=this.$route.query;return{tabListShow:!t.id,typeId:0,filterActive:0,filterListShow:!1,productCategory:{active:0,name:t.tag||"",id:Number(t.id)||0,children:[]},productAttributeCategory:{children:[],name:"",id:0},brand:{name:"",id:0},keyword:"",autofocus:!1}},computed:{getProductAttributeCategory:function(){if(this.productCategory.id){if(this.productCategory.children)return(this.productCategory.children[this.productCategory.active]||{}).id||"";this.productCategory.id}return 0}},mounted:function(){var t=this;return i(e().mark((function r(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$nextTick((function(){"focus"===t.$route.query.input&&document.querySelector(".van-field__control").focus()})),t.tabListShow=!0;case 2:case"end":return e.stop()}}),r)})))()},methods:{onFilter:function(t){var e=this;3===this.filterActive&&3===t&&(t=4),4===this.filterActive&&3===t&&(t=3),this.filterActive!==t&&(this.filterActive=t,this.$nextTick((function(){e.onSearch()})))},setFilter:function(t){var e=this,r=t.productCategory,n=t.productAttributeCategory,o=t.brand;r&&void 0===r.active&&(r.active=0),this.productCategory=r||{id:0,name:""},this.productAttributeCategory=n||{id:0,name:""},this.brand=o||{id:0,name:""},this.$nextTick((function(){e.onSearch(),e.filterListShow=!1}))},onToggleTag:function(){var t=this;this.$refs.tabList.loading||this.$nextTick((function(){t.onSearch()}))},onClearTag:function(t){var e=this;"productCategory"===t?this.productCategory={id:0,name:""}:"productAttributeCategory"===t?this.productAttributeCategory={id:0,name:""}:this.brand={id:0,name:""};var r=this.$refs.goodsFilter;r&&("productAttributeCategory"===t?r.setParams("productAttributeCategoryList"):r.setParams("brandList")),this.$nextTick((function(){e.onSearch()}))},onSearch:function(){this.$refs.tabList.onSearch()},searchBtn:function(t){var e=this;this.keyword=t,this.$nextTick((function(){e.onSearch()}))}},render:function(){var t=this;return u("div",null,[u(I,null,{default:function(){return[u(M,{modelValue:t.keyword,searchIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAgCAYAAAAFQMh/AAAAAXNSR0IArs4c6QAABG1JREFUWEe9l2lsVFUUx3/nTQsFRBuMSiIGoxGsUSORYIQoFe28oZWgDWlnWoU0aFyiRQ3ilkgjCUSMitaFithIpDMlsqRN6LyhFrAijUuIaFw+uASjn8AEiFpmOnPMW2YrpU5x8H0879z/755zz733XKGAT7dWXYVh1CJ6KyoVwMUI41FOAr8AhxDZw6TSLlnU/VcBkshoTtpRNR/xPQ96G4zu6+mcQIyNjIuvl9qPjo2mPSJYt/gnUSpvI9yDFgQczjgK+pCEYh+eCX4aWD9YOA1fqguYlRmkpBA+xWAXQj/4jkAyTqKkHGOoApFqYDGql2ZBqoi0SNB6YSR4HtiFJgdAcgQkhugqCVpfjbosLZUlzBx/H2gLyCU5vm9KyHpk+NgMWNsryygb1w8y23MaQnWFNMTeKqRY0j66zZxCku1AZWacyIMSjLbl6mTBYfMd4H7vZwIxFkuwp2cs0Ay87cZSzr+oA3SJZ4uT0rnSGPsy7eOAdZs5hyQHAcP5IUazBHtazwaahS+ayAXxAyg3uJo6IMHYzfngiNmNcqdrlJiEouZ/gWbgkTsqwHcYpcSxpSQgjVHLnUfYfxmIfQjY0aYoNWbLkp5DxQA72QwH3gVd7urpTgnFaj1woBn0NdfOx9JgzS8W1JHsCFyPaHpHDOI7MUXqDv4tGjbtCnRmgcFKqbdeLibYjdr8GbjcTTcLpNHaK9phfo8w0zPeJI3WZ+cAvAW41y0hHpWg9YZoxDyBMtkx+hLTpK7vt6KDI4F1qD7t6a6VkPWcneohG+kYB09NkKZ9g0UHh/0rQV7yIt4gQevx/IjjiWmy7BxEHA6sBX3Gq+x1Eoo9a0f8AzDDnY3MkWD086JH3GG+j7DU3TnaLA2xVnsf7wC524XJExKKvlp0cNj/I8gVHvh2aYj12VX9GEIatk9Cln3pF+3TiP9aVL72BE+R0AtlaexP0a3V0zGSP2VOLpVZ0hA9XCyyRgIbUX3A0+uSkLXY3VV22iPmbpSF3jrvlmC0phhgjVTPQJPfAKWOnsECqbf2ZsFh/1yQTzJ91Qj351gnMsL9nreM2fs4Yr6H0uQB4hjUSL3VO1agk0G3G7FPq1BGj9Q8Ce35Iq2XBbcNuz8hDvKwhKKbxwLX9spyJpR1ourPjDNkhdRHX8/Vye+53EIbAKZmnES6YegpCfZ+N9oEtAWDq81lqK7J79k4hi95pdT1Hj8j2EnT9urpJFLdqF6XhTOEsh9hF9BPsuQIyUScsnHlaKKClN1lqn0WuDfQ8E/kAPGUaW+j01Kd66ub501m4nmbgPqxpDnH9yjQhdCU7culj8HBmvRd8C8vCX8VhrEa1XkFTuA4QjsGa6TO+kM7zVWkeDFnbA++X++Sum/jo4LTA5zTJyW1GNyCco3zdnJbJXvdfrcbOVT2k9Aduel0li4caAFdnYXrTqbG6woCjxStXUzSQqqQTGiHfz0iT+b4bjprcCHAvLqJmK0o7otCOPn/ge3HX6f5CshyRDf8A+1CqQq9qjYSAAAAAElFTkSuQmCC",onSearch:t.searchBtn,placeholder:"请输入商品名称"},{left:function(){return u(h,{class:H,name:"arrow-left",onClick:function(){return t.$router.back()}},null)}}),u(O,{class:X,align:"center"},{default:function(){return[u(P,{span:6,class:0===t.filterActive?J:"",onClick:function(){return t.onFilter(0)}},{default:function(){return[g("综合排序")]}}),u(P,{span:6,class:3===t.filterActive||4===t.filterActive?J:"",onClick:function(){return t.onFilter(3)}},{default:function(){return[g("价格"),u("div",{class:rt},[u(h,{class:3===t.filterActive?nt:"",style:{transform:"rotate(-90deg)"},name:"play",size:12},null),u(h,{class:[ot,4===t.filterActive?[nt]:""],style:{transform:"rotate(90deg)"},name:"play",size:12},null)])]}}),u(P,{style:{marginLeft:"auto"},span:6,class:R,onClick:function(){return t.filterListShow=!0}},{default:function(){return[g("筛选"),u(h,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAkCAMAAADfNcjQAAAAAXNSR0IArs4c6QAAAMlQTFRFAAAAAAAAAAAAMzMzKysrLi4uKysrMzMzMDAwLS0tNjY2MTExNzc3MDAwMzMzMDAwMTExNDQ0MjIyNTU1NDQ0MjIyMjIyMjIyMjIyNDQ0MzMzMzMzMjIyNDQ0MzMzMzMzMzMzMjIyMzMzMjIyMjIyNDQ0MjIyNDQ0NDQ0MzMzMjIyMzMzMzMzNDQ0MzMzNDQ0MzMzMjIyNDQ0MzMzMzMzMzMzMzMzMjIyMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMjIyMzMzMzMzfELI5AAAAEJ0Uk5TAAECBQYLDA8QERMVHCAjJSoxMzo7R0xRUlNVWlxeZGlvcH6Ej4+eo62ut7m6vL/BxMXGyMnNz9DY3O3w8fb3/P3+hqpolgAAALVJREFUOMvtk8cOwjAQRB1CDZ3Qe+gdQu/B8/8fxSFSso4SS9xA4t3W87SSPTJjfz5CbU83psNymPXksR1EnjVRGMPLI01zzQLvFXWH8hnoU0EHDsLGBjChcw64JunBABjRWbkAJ82dDQ5UhJUlixoGB2aKeI0mMQwOrCPel3KNrm/uGinLP7eNY5wlbgG5bWyjLFMNBzXWegGLkKzTDgfy0tb3gC4VzC8QVkBBKtTvc/UHv9wbexcnAljN7tMAAAAASUVORK5CYII=",size:18},null)]}})]}}),t.productCategory.id&&t.productCategory.children&&t.productCategory.children.length?u(N,{class:$,shrink:!0,ellipsis:!1,active:t.productCategory.active,"onUpdate:active":function(e){return t.productCategory.active=e},onChange:function(){return t.onToggleTag()}},{default:function(){return[t.productCategory&&t.productCategory.children.map((function(e,r){return u(F,{name:r,title:e.name},{title:function(){return u("div",{class:[tt,t.productCategory.active===r?et:""]},[e.name])}})}))]}}):null]}}),u("div",{class:K},[this.productAttributeCategory.id?u(k,{class:Z,closeable:!0,onClose:function(){return t.onClearTag("productAttributeCategory")}},{default:function(){return[t.productAttributeCategory.name]}}):"",this.brand.id?u(k,{class:Z,closeable:!0,onClose:function(){return t.onClearTag("brand")}},{default:function(){return[t.brand.name]}}):""]),this.tabListShow?u(W,{ref:"tabList",style:{height:"calc(100vh - var(--header-height))"},showAdd:!0,productAttributeCategoryId:this.productAttributeCategory.id,brandId:this.brand.id,sort:this.filterActive,keyword:this.keyword},null):null,u(v,{show:this.filterListShow,closeable:!0,position:"bottom",round:!0,onClose:function(){t.filterListShow=!1}},{default:function(){return[u(lt,{cateGoryId:t.productCategory.id,ref:"goodsFilter",setFilter:t.setFilter},null)]}})])}}))}}}))}(); ======== !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:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=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(M){s=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),l=new L(n||[]);return i(a,"_invoke",{value:C(t,r,l)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(M){return{type:"throw",arg:M}}}r.wrap=d;var g={};function p(){}function h(){}function y(){}var m={};s(m,l,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(S([])));_&&_!==n&&o.call(_,l)&&(m=_);var b=y.prototype=p.prototype=Object.create(m);function A(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(e,r){function n(i,a,l,c){var u=f(e[i],e,a);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==t(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(t){n("next",t,l,c)}),(function(t){n("throw",t,l,c)})):r.resolve(d).then((function(t){s.value=t,l(s)}),(function(t){return n("throw",t,l,c)}))}c(u.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 C(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 k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=z(a,r);if(l){if(l===g)continue;return l}}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 c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function z(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,z(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,g;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,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function x(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[l];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=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},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;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),g}},r}function r(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 n(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&t.onBuyClick(e)}},null)])])])}}),V="_tabList_1we34_1",Y="_goodsList_1we34_6",W=c({name:"tab-list",props:{showAdd:{type:Boolean,default:!0},typeId:{type:Number,default:0},productAttributeCategoryId:{type:[Number,String],default:0},brandId:{type:[Number,String],default:0},sort:{type:Number,defalut:0},keyword:{type:String,defalut:""},isTab:{type:Boolean,default:!1},onOpenWebView:{type:Function,default:function(t){}}},data:function(){return{list:[],loading:!1,finished:!1,params:{productCategoryId:void 0,productAttributeCategoryId:void 0,brandId:null,sort:null,keyword:"",pageNum:1,pageSize:20},addGoodsShow:!1,selectGoodsItem:{}}},mounted:function(){this.getList()},methods:{onSearch:function(){this.finished=!1,this.list=[],this.params.pageNum=1,this.getList()},getList:function(){var t=this;return i(e().mark((function r(){var o,i,a;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.prev=1,(o=t.params).productCategoryId=t.typeId?t.typeId:void 0,o.productAttributeCategoryId=t.productAttributeCategoryId?t.productAttributeCategoryId:void 0,o.brandId=t.brandId?t.brandId:void 0,o.sort=t.sort?t.sort:void 0,o.keyword=t.keyword?t.keyword:void 0,e.next=10,y.post("/edu-app/open/mall/productSearch",{noAuthorization:!0,data:n({},o)});case 10:if(i=e.sent,a=i.data||{},!(t.list.length>0&&1===a.pageNum)){e.next=14;break}return e.abrupt("return");case 14:t.list=t.list.concat(a.list||[]),t.finished=a.pageNum>=a.totalPage,t.params.pageNum=a.pageNum+1,e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),t.finished=!0;case 22:t.loading=!1;case 23:case"end":return e.stop()}}),r,null,[[1,19]])})))()},onDetailClick:function(t){if(this.isTab){var e=this.$router.resolve({path:"/goodsDetail",query:{id:t.id}}).fullPath;this.onOpenWebView(e)}else this.$router.push({path:"/goodsDetail",query:{id:t.id}})},onBuyClick:function(t){this.selectGoodsItem=t,this.addGoodsShow=!0}},render:function(){var t=this;return u("div",{class:V},[u(x,{loading:this.loading,"onUpdate:loading":function(e){return t.loading=e},finished:this.finished,finishedText:"",immediateCheck:!1,class:[Y,"mb12"],style:{height:this.list.length?"auto":"100%"},onLoad:this.getList},{default:function(){return[t.list.length&&t.list.map((function(e){return u(B,{item:e,onItemClick:t.onDetailClick,onBuyClick:t.onBuyClick,showAdd:t.showAdd},null)}))||null,!t.loading&&!t.list.length&&u(m,{description:"暂无商品"},null)||null]}}),u(v,{show:this.addGoodsShow,closeable:!0,position:"bottom",round:!0,onClose:function(){t.addGoodsShow=!1}},{default:function(){return[u(C,{show:t.addGoodsShow,onClose:function(){t.addGoodsShow=!1},item:t.selectGoodsItem},null)]}})])}}),H="_arrowLeft_alev1_7",X="_filter-top_alev1_11",J="_active_alev1_23",R="_filterBtn_alev1_27",K="_filterTagWrap_alev1_30",Z="_filterTag_alev1_30",$="_filter-productCategory_alev1_46",tt="_filter-tag_alev1_62",et="_filter-tag-checked_alev1_72",rt="_filterSort_alev1_76",nt="_icon-active_alev1_83",ot="_iconSort_alev1_86",it={loading:"_loading_8b9qx_1",titlePopup:"_titlePopup_8b9qx_7",title:"_title_8b9qx_7","radio-group":"_radio-group_8b9qx_21",radio:"_radio_8b9qx_21",filterAction:"_filterAction_8b9qx_59"};function at(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}var lt=c({name:"goods-filter-list",props:{setFilter:{type:Function,default:function(t){}},cateGoryId:{type:Number,default:0}},data:function(){return{dataShow:!0,loading:!1,brandList:[],productAttributeCategoryList:[],productCategorySmallVoList:[],params:{productAttributeCategoryList:null,brandList:null}}},mounted:function(){this.getFilterList()},methods:{getFilterList:function(){var t=this;return i(e().mark((function r(){var n,o,i,a,l,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.prev=1,e.next=4,y.get("/edu-app/open/mall/search/condition",{noAuthorization:!0});case 4:n=e.sent,t.dataShow=200===n.code,o=n.data||{},i=o.brandList,a=void 0===i?[]:i,l=o.productAttributeCategoryList,c=void 0===l?[]:l,t.brandList=a,t.productAttributeCategoryList=c,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.dataShow=!1;case 14:t.loading=!1;case 15:case"end":return e.stop()}}),r,null,[[1,11]])})))()},onFilterClick:function(){this.setFilter({productCategory:this.productCategorySmallVoList[this.params.productCategorySmallVoList],productAttributeCategory:this.productAttributeCategoryList[this.params.productAttributeCategoryList],brand:this.brandList[this.params.brandList]})},setParams:function(t){this.params[t]=null}},render:function(){var t=this;return u("div",null,[this.loading&&u("div",{class:it.loading},[u(_,{color:"var(--van-primary)"},null)]),u("div",{class:it.filterWrap},[u("div",{class:it.titlePopup},[g("筛选")]),u(j,{border:!1,title:"商品类型"},{label:function(){var e;return u(L,{class:it["radio-group"],modelValue:t.params.productAttributeCategoryList,"onUpdate:modelValue":function(e){return t.params.productAttributeCategoryList=e}},at(e=t.productAttributeCategoryList.map((function(e,r){return u(S,{key:e.id,class:it.radio,name:r,onClick:function(){}},{default:function(){return[u(k,{size:"large",plain:!0,type:r===t.params.productAttributeCategoryList?"primary":"default"},{default:function(){return[e.name]}})]}})})))?e:{default:function(){return[e]}})}}),u(j,{border:!1,title:"品牌"},{label:function(){var e;return u(L,{class:it["radio-group"],modelValue:t.params.brandList,"onUpdate:modelValue":function(e){return t.params.brandList=e}},at(e=t.brandList.map((function(e,r){return u(S,{key:e.id,class:it.radio,name:r,onClick:function(){}},{default:function(){return[u(k,{size:"large",plain:!0,type:r===t.params.brandList?"primary":"default"},{default:function(){return[e.name]}})]}})})))?e:{default:function(){return[e]}})}}),u(U,{style:{margin:"0"}},null),u("div",{class:it.filterAction},[u(b,{round:!0,style:{marginRight:"8px"},onClick:function(){return t.params={productAttributeCategoryList:null,brandList:null}}},{default:function(){return[g("重置")]}}),u(b,{round:!0,type:"primary",color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",style:{marginLeft:"8px"},onClick:function(){return t.onFilterClick()}},{default:function(){return[g("确认")]}})])])])}});t("default",c({name:"goods-list",data:function(){var t=this.$route.query;return{tabListShow:!t.id,typeId:0,filterActive:0,filterListShow:!1,productCategory:{active:0,name:t.tag||"",id:Number(t.id)||0,children:[]},productAttributeCategory:{children:[],name:"",id:0},brand:{name:"",id:0},keyword:"",autofocus:!1}},computed:{getProductAttributeCategory:function(){if(this.productCategory.id){if(this.productCategory.children)return(this.productCategory.children[this.productCategory.active]||{}).id||"";this.productCategory.id}return 0}},mounted:function(){var t=this;return i(e().mark((function r(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$nextTick((function(){"focus"===t.$route.query.input&&document.querySelector(".van-field__control").focus()})),t.tabListShow=!0;case 2:case"end":return e.stop()}}),r)})))()},methods:{onFilter:function(t){var e=this;3===this.filterActive&&3===t&&(t=4),4===this.filterActive&&3===t&&(t=3),this.filterActive!==t&&(this.filterActive=t,this.$nextTick((function(){e.onSearch()})))},setFilter:function(t){var e=this,r=t.productCategory,n=t.productAttributeCategory,o=t.brand;r&&void 0===r.active&&(r.active=0),this.productCategory=r||{id:0,name:""},this.productAttributeCategory=n||{id:0,name:""},this.brand=o||{id:0,name:""},this.$nextTick((function(){e.onSearch(),e.filterListShow=!1}))},onToggleTag:function(){var t=this;this.$refs.tabList.loading||this.$nextTick((function(){t.onSearch()}))},onClearTag:function(t){var e=this;"productCategory"===t?this.productCategory={id:0,name:""}:"productAttributeCategory"===t?this.productAttributeCategory={id:0,name:""}:this.brand={id:0,name:""};var r=this.$refs.goodsFilter;r&&("productAttributeCategory"===t?r.setParams("productAttributeCategoryList"):r.setParams("brandList")),this.$nextTick((function(){e.onSearch()}))},onSearch:function(){this.$refs.tabList.onSearch()},searchBtn:function(t){var e=this;this.keyword=t,this.$nextTick((function(){e.onSearch()}))}},render:function(){var t=this;return u("div",null,[u(I,null,{default:function(){return[u(M,{modelValue:t.keyword,searchIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAgCAYAAAAFQMh/AAAAAXNSR0IArs4c6QAABG1JREFUWEe9l2lsVFUUx3/nTQsFRBuMSiIGoxGsUSORYIQoFe28oZWgDWlnWoU0aFyiRQ3ilkgjCUSMitaFithIpDMlsqRN6LyhFrAijUuIaFw+uASjn8AEiFpmOnPMW2YrpU5x8H0879z/755zz733XKGAT7dWXYVh1CJ6KyoVwMUI41FOAr8AhxDZw6TSLlnU/VcBkshoTtpRNR/xPQ96G4zu6+mcQIyNjIuvl9qPjo2mPSJYt/gnUSpvI9yDFgQczjgK+pCEYh+eCX4aWD9YOA1fqguYlRmkpBA+xWAXQj/4jkAyTqKkHGOoApFqYDGql2ZBqoi0SNB6YSR4HtiFJgdAcgQkhugqCVpfjbosLZUlzBx/H2gLyCU5vm9KyHpk+NgMWNsryygb1w8y23MaQnWFNMTeKqRY0j66zZxCku1AZWacyIMSjLbl6mTBYfMd4H7vZwIxFkuwp2cs0Ay87cZSzr+oA3SJZ4uT0rnSGPsy7eOAdZs5hyQHAcP5IUazBHtazwaahS+ayAXxAyg3uJo6IMHYzfngiNmNcqdrlJiEouZ/gWbgkTsqwHcYpcSxpSQgjVHLnUfYfxmIfQjY0aYoNWbLkp5DxQA72QwH3gVd7urpTgnFaj1woBn0NdfOx9JgzS8W1JHsCFyPaHpHDOI7MUXqDv4tGjbtCnRmgcFKqbdeLibYjdr8GbjcTTcLpNHaK9phfo8w0zPeJI3WZ+cAvAW41y0hHpWg9YZoxDyBMtkx+hLTpK7vt6KDI4F1qD7t6a6VkPWcneohG+kYB09NkKZ9g0UHh/0rQV7yIt4gQevx/IjjiWmy7BxEHA6sBX3Gq+x1Eoo9a0f8AzDDnY3MkWD086JH3GG+j7DU3TnaLA2xVnsf7wC524XJExKKvlp0cNj/I8gVHvh2aYj12VX9GEIatk9Cln3pF+3TiP9aVL72BE+R0AtlaexP0a3V0zGSP2VOLpVZ0hA9XCyyRgIbUX3A0+uSkLXY3VV22iPmbpSF3jrvlmC0phhgjVTPQJPfAKWOnsECqbf2ZsFh/1yQTzJ91Qj351gnMsL9nreM2fs4Yr6H0uQB4hjUSL3VO1agk0G3G7FPq1BGj9Q8Ce35Iq2XBbcNuz8hDvKwhKKbxwLX9spyJpR1ourPjDNkhdRHX8/Vye+53EIbAKZmnES6YegpCfZ+N9oEtAWDq81lqK7J79k4hi95pdT1Hj8j2EnT9urpJFLdqF6XhTOEsh9hF9BPsuQIyUScsnHlaKKClN1lqn0WuDfQ8E/kAPGUaW+j01Kd66ub501m4nmbgPqxpDnH9yjQhdCU7culj8HBmvRd8C8vCX8VhrEa1XkFTuA4QjsGa6TO+kM7zVWkeDFnbA++X++Sum/jo4LTA5zTJyW1GNyCco3zdnJbJXvdfrcbOVT2k9Aduel0li4caAFdnYXrTqbG6woCjxStXUzSQqqQTGiHfz0iT+b4bjprcCHAvLqJmK0o7otCOPn/ge3HX6f5CshyRDf8A+1CqQq9qjYSAAAAAElFTkSuQmCC",onSearch:t.searchBtn,placeholder:"请输入商品名称"},{left:function(){return u(h,{class:H,name:"arrow-left",onClick:function(){return t.$router.back()}},null)}}),u(O,{class:X,align:"center"},{default:function(){return[u(P,{span:6,class:0===t.filterActive?J:"",onClick:function(){return t.onFilter(0)}},{default:function(){return[g("综合排序")]}}),u(P,{span:6,class:3===t.filterActive||4===t.filterActive?J:"",onClick:function(){return t.onFilter(3)}},{default:function(){return[g("价格"),u("div",{class:rt},[u(h,{class:3===t.filterActive?nt:"",style:{transform:"rotate(-90deg)"},name:"play",size:12},null),u(h,{class:[ot,4===t.filterActive?[nt]:""],style:{transform:"rotate(90deg)"},name:"play",size:12},null)])]}}),u(P,{style:{marginLeft:"auto"},span:6,class:R,onClick:function(){return t.filterListShow=!0}},{default:function(){return[g("筛选"),u(h,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAkCAMAAADfNcjQAAAAAXNSR0IArs4c6QAAAMlQTFRFAAAAAAAAAAAAMzMzKysrLi4uKysrMzMzMDAwLS0tNjY2MTExNzc3MDAwMzMzMDAwMTExNDQ0MjIyNTU1NDQ0MjIyMjIyMjIyMjIyNDQ0MzMzMzMzMjIyNDQ0MzMzMzMzMzMzMjIyMzMzMjIyMjIyNDQ0MjIyNDQ0NDQ0MzMzMjIyMzMzMzMzNDQ0MzMzNDQ0MzMzMjIyNDQ0MzMzMzMzMzMzMzMzMjIyMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMjIyMzMzMzMzfELI5AAAAEJ0Uk5TAAECBQYLDA8QERMVHCAjJSoxMzo7R0xRUlNVWlxeZGlvcH6Ej4+eo62ut7m6vL/BxMXGyMnNz9DY3O3w8fb3/P3+hqpolgAAALVJREFUOMvtk8cOwjAQRB1CDZ3Qe+gdQu/B8/8fxSFSso4SS9xA4t3W87SSPTJjfz5CbU83psNymPXksR1EnjVRGMPLI01zzQLvFXWH8hnoU0EHDsLGBjChcw64JunBABjRWbkAJ82dDQ5UhJUlixoGB2aKeI0mMQwOrCPel3KNrm/uGinLP7eNY5wlbgG5bWyjLFMNBzXWegGLkKzTDgfy0tb3gC4VzC8QVkBBKtTvc/UHv9wbexcnAljN7tMAAAAASUVORK5CYII=",size:18},null)]}})]}}),t.productCategory.id&&t.productCategory.children&&t.productCategory.children.length?u(N,{class:$,shrink:!0,ellipsis:!1,active:t.productCategory.active,"onUpdate:active":function(e){return t.productCategory.active=e},onChange:function(){return t.onToggleTag()}},{default:function(){return[t.productCategory&&t.productCategory.children.map((function(e,r){return u(F,{name:r,title:e.name},{title:function(){return u("div",{class:[tt,t.productCategory.active===r?et:""]},[e.name])}})}))]}}):null]}}),u("div",{class:K},[this.productAttributeCategory.id?u(k,{class:Z,closeable:!0,onClose:function(){return t.onClearTag("productAttributeCategory")}},{default:function(){return[t.productAttributeCategory.name]}}):"",this.brand.id?u(k,{class:Z,closeable:!0,onClose:function(){return t.onClearTag("brand")}},{default:function(){return[t.brand.name]}}):""]),this.tabListShow?u(W,{ref:"tabList",style:{height:"calc(100vh - var(--header-height))"},showAdd:!0,productAttributeCategoryId:this.productAttributeCategory.id,brandId:this.brand.id,sort:this.filterActive,keyword:this.keyword},null):null,u(v,{show:this.filterListShow,closeable:!0,position:"bottom",round:!0,onClose:function(){t.filterListShow=!1}},{default:function(){return[u(lt,{cateGoryId:t.productCategory.id,ref:"goodsFilter",setFilter:t.setFilter},null)]}})])}}))}}}))}(); >>>>>>>> master:dist/assets/index-legacy-cbc5d834.js