3 lines
51 KiB
JavaScript
3 lines
51 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-products-products"],{"013b":function(t,e,n){"use strict";n.r(e);var r=n("cb1a"),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},"08dd":function(t,e,n){"use strict";var r=n("9beb"),i=n.n(r);i.a},"0d65":function(t,e,n){var r=n("c86c");e=r(!1),e.push([t.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* 国家筛选条 - 白底 + 底部 1px #EEEEEE 边框\n Figma: Country Filter Bar 1511:195, y=6 起始, 行高约 31px(padding 6+6) */.country-bar[data-v-53eaaf19]{width:100%;background:#fff;border-bottom:%?1?% solid #eee;padding:%?12?% %?20?%;box-sizing:border-box}\n/* 换行布局 - 行间距 8px(未选中态 y=37-6=31px; 第二行 y=37) */.country-inner[data-v-53eaaf19]{display:flex;flex-wrap:wrap;row-gap:%?16?%;-webkit-column-gap:%?20?%;column-gap:%?20?%}\n/* 单个标签 - padding 4px 10px 圆角 60px gap 10px Figma */.country-item[data-v-53eaaf19]{display:flex;align-items:center;gap:%?20?%; /* 10px gap */padding:%?8?% %?20?%; /* 4px 10px */background:#f7f7f7;border-radius:%?60?%;line-height:1.2;border:%?1?% solid transparent;box-sizing:border-box}\n/* 选中态 - #FFF3EB 背景 + 0.5px 橙色边框 + 边框宽度 0.5px Figma */.country-item.active[data-v-53eaaf19]{background:#fff3eb;border-color:#ff6800}.country-item.active .country-name[data-v-53eaaf19]{color:#ff6800}\n/* 国家图标 - Figma 18x13 / 18x14 矩形, 圆角 2px,不是圆形 */.country-icon[data-v-53eaaf19]{width:%?36?%;height:%?26?%;border-radius:%?4?%; /* 2px */flex-shrink:0;display:block}\n/* 文字 12px Medium */.country-name[data-v-53eaaf19]{font-size:%?24?%;font-weight:500;color:#000}",""]),t.exports=e},"114e":function(t,e,n){"use strict";var r=n("85c1"),i=n("181d");i(r.JSON,"JSON",!0)},1998:function(t,e,n){"use strict";n.r(e);var r=n("d8da"),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},"1c98":function(t,e,n){"use strict";n.r(e);var r=n("b5e9"),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},"256a":function(t,e,n){"use strict";var r=n("6118"),i=n.n(r);i.a},"257f":function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("5c47");var r={name:"SearchBar",props:{keyword:{type:String,default:""}},data:function(){return{statusBarHeight:20}},created:function(){try{var t=uni.getSystemInfoSync();this.statusBarHeight=t.statusBarHeight||20}catch(e){this.statusBarHeight=20}},mounted:function(){var t=this;this.$nextTick((function(){return t.emitHeight()}))},methods:{emitHeight:function(){var t=this,e=uni.createSelectorQuery().in(this);e.select("#searchBar").boundingClientRect(),e.exec((function(e){e&&e[0]&&t.$emit("height-change",e[0].height)}))},onInput:function(t){this.$emit("input",t.detail.value)},onBlur:function(){this.$emit("blur")},onFilter:function(){this.$emit("filter")}}};e.default=r},2634:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){
|
||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
e.default=function(){return t};var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(O){l=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),c=new H(r||[]);return a(o,"_invoke",{value:_(t,n,c)}),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(O){return{type:"throw",arg:O}}}t.wrap=d;var h={};function v(){}function p(){}function g(){}var b={};l(b,c,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(F([])));m&&m!==n&&i.call(m,c)&&(b=m);var x=g.prototype=v.prototype=Object.create(b);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){var n;a(this,"_invoke",{value:function(a,o){function c(){return new e((function(n,c){(function n(a,o,c,u){var s=f(t[a],t,o);if("throw"!==s.type){var l=s.arg,d=l.value;return d&&"object"==(0,r.default)(d)&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(d).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(s.arg)})(a,o,n,c)}))}return n=n?n.then(c,c):c()}})}function _(t,e,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return $()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var c=k(o,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator["return"]&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=f(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,h;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function H(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:$}}function $(){return{value:void 0,done:!0}}return p.prototype=g,a(x,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:p,configurable:!0}),p.displayName=l(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,s,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},w(C.prototype),l(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new C(d(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(x),l(x,s,"Generator"),l(x,c,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=F,H.prototype={constructor:H,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(E),!t)for(var e in this)"t"===e.charAt(0)&&i.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 n(n,r){return o.type="throw",o.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(o)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:F(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t},n("6a54"),n("01a2"),n("e39c"),n("bf0f"),n("844d"),n("18f7"),n("de6c"),n("3872e"),n("4e9b"),n("114e"),n("c240"),n("926e"),n("7a76"),n("c9b5"),n("aa9c"),n("2797"),n("8a8d"),n("dc69"),n("f7a5");var r=function(t){return t&&t.__esModule?t:{default:t}}(n("fcf3"))},2966:function(t,e,n){var r=n("c86c");e=r(!1),e.push([t.i,"/* 货盘页 - 页面容器样式 */\n/* 各区块样式已移入 pages/products/components/ 下对应组件 */.products-page[data-v-13ac2357]{display:flex;flex-direction:column;overflow:hidden; /* 唯一滚动源 = scroll-view,整页绝不兜底滚动 */background:#f2f2f2}\n/* 主体内容 - 左右分栏 */.content-body[data-v-13ac2357]{flex:1;display:flex;overflow:hidden;min-height:0}\n/* 右侧容器 - 自动占满剩余宽度(高度自动撑开,内部由 ProductGrid 自己滚动)\n flex:1 与 height:100% 冲突,必须二选一,否则 flex 链路断裂 */.right-wrap[data-v-13ac2357]{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}",""]),t.exports=e},"2fad":function(t,e,n){var r=n("c86c");e=r(!1),e.push([t.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* 顶部筛选条 - 白底,不占高度时隐藏 */.active-filters[data-v-39cfc01f]{display:flex;align-items:center;flex-wrap:wrap;gap:%?16?%;padding:%?20?% %?20?%;background:#fff;border-bottom:%?1?% solid #eee}\n/* 单个标签 - padding 6px 10px 圆角 60px */.active-filter-tag[data-v-39cfc01f]{display:flex;align-items:center;gap:%?8?%;padding:%?12?% %?20?%;background:#fff;border:%?1?% solid #ff6800;border-radius:%?60?%;line-height:1.2}\n/* 文字 12px Medium 橙色 */.filter-text[data-v-39cfc01f]{font-size:%?24?%;font-weight:500;color:#ff6800}.filter-remove[data-v-39cfc01f]{font-size:%?24?%;color:#ff6800}.clear-all[data-v-39cfc01f]{margin-left:auto;font-size:%?24?%;color:#999}",""]),t.exports=e},"2fdc":function(t,e,n){"use strict";function r(t,e,n,r,i,a,o){try{var c=t[a](o),u=c.value}catch(s){return void n(s)}c.done?e(u):Promise.resolve(u).then(r,i)}n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,a){var o=t.apply(e,n);function c(t){r(o,i,a,c,u,"next",t)}function u(t){r(o,i,a,c,u,"throw",t)}c(void 0)}))}},n("bf0f")},3176:function(t,e,n){var r=n("c86c");e=r(!1),e.push([t.i,".filter-overlay[data-v-243ed444]{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:998;opacity:0;visibility:hidden;transition:all .3s}.filter-overlay.show[data-v-243ed444]{opacity:1;visibility:visible}.filter-drawer[data-v-243ed444]{position:fixed;top:0;right:%?-600?%;width:%?600?%;height:100%;background:#fff;z-index:999;display:flex;flex-direction:column;transition:right .3s}.filter-drawer.show[data-v-243ed444]{right:0}.filter-drawer-header[data-v-243ed444]{display:flex;align-items:center;justify-content:space-between;padding:%?32?%;border-bottom:%?2?% solid #f5f5f5}.filter-drawer-title[data-v-243ed444]{font-size:%?32?%;font-weight:600;color:#1a1a1a}.filter-drawer-close[data-v-243ed444]{font-size:%?32?%;color:#999}.filter-drawer-body[data-v-243ed444]{flex:1;padding:0 %?32?%}.filter-group[data-v-243ed444]{padding:%?32?% 0;border-bottom:%?2?% solid #f5f5f5}.filter-group-title[data-v-243ed444]{display:block;font-size:%?28?%;font-weight:600;color:#1a1a1a;margin-bottom:%?20?%}.filter-options[data-v-243ed444]{display:flex;flex-wrap:wrap;gap:%?16?%}.filter-option[data-v-243ed444]{padding:%?14?% %?28?%;font-size:%?24?%;color:#666;background:#f5f5f5;border-radius:%?30?%;border:%?2?% solid transparent}.filter-option.selected[data-v-243ed444]{background:#fff0e5;color:#ff6800;border-color:#ff6800}.filter-price-range[data-v-243ed444]{display:flex;align-items:center;gap:%?20?%}.price-input[data-v-243ed444]{flex:1;height:%?72?%;padding:0 %?20?%;background:#f5f5f5;border-radius:%?12?%;font-size:%?26?%;color:#333;text-align:center}.price-divider[data-v-243ed444]{font-size:%?28?%;color:#999}.filter-drawer-footer[data-v-243ed444]{display:flex;gap:%?24?%;padding:%?24?% %?32?%;border-top:%?2?% solid #f5f5f5}.filter-reset[data-v-243ed444]{flex:1;height:%?80?%;display:flex;align-items:center;justify-content:center;background:#f5f5f5;border-radius:%?40?%;font-size:%?28?%;color:#666}.filter-confirm[data-v-243ed444]{flex:1;height:%?80?%;display:flex;align-items:center;justify-content:center;background:#ff6800;border-radius:%?40?%;font-size:%?28?%;font-weight:600;color:#fff}",""]),t.exports=e},"31b6":function(t,e,n){var r=n("e8ea");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("967d").default;i("e558a5dc",r,!0,{sourceMap:!1,shadowMode:!1})},"379b":function(t,e,n){"use strict";n.r(e);var r=n("bb03"),i=n("1c98");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("9ed9");var o=n("828b"),c=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,"13ac2357",null,!1,r["a"],void 0);e["default"]=c.exports},"3872e":function(t,e,n){"use strict";var r=n("f259");r("asyncIterator")},"3a6c":function(t,e,n){var r=n("c86c");e=r(!1),e.push([t.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* 侧边栏 - 固定宽度 180rpx(=90px),白底 + 右侧 1px #EEEEEE 边框 */.sidebar[data-v-44522978]{width:%?180?%;height:100%;background:#fff;border-right:%?1?% solid #eee;box-sizing:border-box;flex-shrink:0}\n/* 单项 - 90x46 (180rpx x 92rpx),居中文字 */.sidebar-item[data-v-44522978]{position:relative;width:100%;height:%?92?%;display:flex;align-items:center;justify-content:center;background:#fff;box-sizing:border-box}\n/* 选中态 - #FFF8F3 背景 */.sidebar-item.active[data-v-44522978]{background:#fff8f3}\n/* 选中指示器 - 左侧 3x16 (6rpx x 32rpx) 橙色 圆角 2px */.sidebar-indicator[data-v-44522978]{position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:%?6?%;height:%?32?%;background:#ff6800;border-radius:%?4?%}\n/* 文字 - 13px Medium 选中橙色 未选中 #666666 */.sidebar-text[data-v-44522978]{font-size:%?26?%;font-weight:500;color:#666;text-align:center;line-height:%?34?%}.sidebar-item.active .sidebar-text[data-v-44522978]{color:#ff6800}",""]),t.exports=e},"4e08":function(t,e,n){"use strict";n.r(e);var r=n("8f7e"),i=n("1998");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("efac");var o=n("828b"),c=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,"243ed444",null,!1,r["a"],void 0);e["default"]=c.exports},"4e9b":function(t,e,n){"use strict";var r=n("6aa6"),i=n("f259"),a=n("181d");i("toStringTag"),a(r("Symbol"),"Symbol")},"4ee1":function(t,e,n){"use strict";n.r(e);var r=n("8a21"),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},"52a8":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"country-bar",attrs:{id:"countryBar"}},[n("v-uni-view",{staticClass:"country-inner"},t._l(t.list,(function(e,r){return n("v-uni-view",{key:r,staticClass:"country-item",class:{active:t.selectedId===e.id},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.selectItem(e)}}},[n("v-uni-image",{staticClass:"country-icon",attrs:{src:e.icon,mode:"aspectFill"}}),n("v-uni-text",{staticClass:"country-name"},[t._v(t._s(e.name))])],1)})),1)],1)},i=[]},"562d":function(t,e,n){"use strict";var r=n("8bdb"),i=n("bb80"),a=n("e34c"),o=RangeError,c=String.fromCharCode,u=String.fromCodePoint,s=i([].join),l=!!u&&1!==u.length;r({target:"String",stat:!0,arity:1,forced:l},{fromCodePoint:function(t){var e,n=[],r=arguments.length,i=0;while(r>i){if(e=+arguments[i++],a(e,1114111)!==e)throw new o(e+" is not a valid code point");n[i]=e<65536?c(e):c(55296+((e-=65536)>>10),e%1024+56320)}return s(n,"")}})},"5fa4":function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("64aa"),n("5c47");var r={name:"ProductGrid",props:{list:{type:Array,default:function(){return[]}},subCategories:{type:Array,default:function(){return[]}},activeSubId:{type:[String,Number],default:""},hasMore:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},scrollTopVal:{type:Number,default:0},scrollHeight:{type:Number,default:400}},mounted:function(){var t=this;this.$nextTick((function(){return t.emitSubHeight()}))},watch:{"subCategories.length":function(){var t=this;this.$nextTick((function(){return t.emitSubHeight()}))}},methods:{emitSubHeight:function(){var t=this;if(this.subCategories&&0!==this.subCategories.length){var e=uni.createSelectorQuery().in(this);e.select("#subCategories").boundingClientRect(),e.exec((function(e){e&&e[0]?t.$emit("sub-height-change",e[0].height):t.$emit("sub-height-change",0)}))}else this.$emit("sub-height-change",0)},selectSub:function(t){this.$emit("sub-select",t)},onTapProduct:function(t){this.$emit("product-click",t)},onScrollToLower:function(){this.$emit("scroll-to-lower")}}};e.default=r},6118:function(t,e,n){var r=n("3a6c");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("967d").default;i("7154b976",r,!0,{sourceMap:!1,shadowMode:!1})},"635a":function(t,e,n){n("0c26"),n("5c47"),n("2c10"),n("f7a5"),t.exports={truncateProductTitle:function(t){if(null==t)return"";if("string"!==typeof t)try{t=String(t)}catch(i){return""}var e=t.trim();if(!e)return"";var n=e.match(/[\s\u3000\u00a0]/);if(!n)return e;var r=n.index;return r<=0?e:e.slice(0,r)}}},"67bd":function(t,e,n){"use strict";var r=n("7b1b"),i=n.n(r);i.a},"772e":function(t,e,n){"use strict";n("6a54");var r=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.BASE_URL=void 0,e.buildUrl=c,e.default=void 0;var i=r(n("9b1b"));n("5c47"),n("0506"),n("a1c1"),n("c223"),n("bf0f");var a="https://official.inkreach.cc/api/";e.BASE_URL=a;var o={"Content-Type":"application/json"};function c(t){if(!t)return"";if(/^https?:\/\//i.test(t))return t;var e=a.replace(/\/+$/,""),n=t.replace(/^\/+/,"");return n?"".concat(e,"/").concat(n):e}function u(t){var e=Object.assign({},o,t||{}),n=uni.getStorageSync("token");return n&&(e["Authorization"]="Bearer ".concat(n)),e}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(e,n){uni.request({url:c(t.url||""),method:(t.method||"GET").toUpperCase(),data:t.data||{},header:u(t.header),timeout:3e4,dataType:"json",success:e,fail:n})}))}s.get=function(t,e,n){return s((0,i.default)({url:t,method:"GET",data:e},n))},s.post=function(t,e,n){return s((0,i.default)({url:t,method:"POST",data:e},n))},s.put=function(t,e,n){return s((0,i.default)({url:t,method:"PUT",data:e},n))},s.delete=function(t,e,n){return s((0,i.default)({url:t,method:"DELETE",data:e},n))};var l=s;e.default=l},"7b1b":function(t,e,n){var r=n("2fad");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("967d").default;i("4c37abad",r,!0,{sourceMap:!1,shadowMode:!1})},"84e8":function(t,e,n){"use strict";n.r(e);var r=n("f880"),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},8701:function(t,e,n){"use strict";n.r(e);var r=n("eb41"),i=n("013b");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("67bd");var o=n("828b"),c=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,"39cfc01f",null,!1,r["a"],void 0);e["default"]=c.exports},"8a21":function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("64aa"),n("5c47");var r={name:"CountryBar",props:{list:{type:Array,default:function(){return[]}},selectedId:{type:[String,Number],default:""}},mounted:function(){var t=this;this.$nextTick((function(){return t.emitHeight()}))},watch:{"list.length":function(){var t=this;this.$nextTick((function(){return t.emitHeight()}))}},methods:{emitHeight:function(){var t=this,e=uni.createSelectorQuery().in(this);e.select("#countryBar").boundingClientRect(),e.exec((function(e){e&&e[0]&&t.$emit("height-change",e[0].height)}))},selectItem:function(t){this.$emit("select",t.id)}}};e.default=r},"8a8d":function(t,e,n){"use strict";var r=n("8bdb"),i=n("8c4f");r({target:"Object",stat:!0},{setPrototypeOf:i})},"8f7e":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-view",{staticClass:"filter-overlay",class:{show:t.visible},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onClose.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"filter-drawer",class:{show:t.visible}},[n("v-uni-view",{staticClass:"filter-drawer-header"},[n("v-uni-text",{staticClass:"filter-drawer-title"},[t._v("筛选条件")]),n("v-uni-text",{staticClass:"filter-drawer-close",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onClose.apply(void 0,arguments)}}},[t._v("✕")])],1),n("v-uni-scroll-view",{staticClass:"filter-drawer-body",attrs:{"scroll-y":!0}},[t._l(t.groups,(function(e,r){return n("v-uni-view",{key:r,staticClass:"filter-group"},[n("v-uni-text",{staticClass:"filter-group-title"},[t._v(t._s(e.title))]),n("v-uni-view",{staticClass:"filter-options"},t._l(e.tags,(function(i,a){return n("v-uni-view",{key:a,staticClass:"filter-option",class:{selected:t.isSelected(e,i.id)},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onToggle(r,i.id)}}},[t._v(" "+t._s(i.name)+" ")])})),1)],1)})),n("v-uni-view",{staticClass:"filter-group"},[n("v-uni-text",{staticClass:"filter-group-title"},[t._v("价格区间")]),n("v-uni-view",{staticClass:"filter-price-range"},[n("v-uni-input",{staticClass:"price-input",attrs:{placeholder:"最低价",type:"number"}}),n("v-uni-text",{staticClass:"price-divider"},[t._v("-")]),n("v-uni-input",{staticClass:"price-input",attrs:{placeholder:"最高价",type:"number"}})],1)],1)],2),n("v-uni-view",{staticClass:"filter-drawer-footer"},[n("v-uni-view",{staticClass:"filter-reset",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onReset.apply(void 0,arguments)}}},[t._v("重置")]),n("v-uni-view",{staticClass:"filter-confirm",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onConfirm.apply(void 0,arguments)}}},[t._v("确定")])],1)],1)],1)},i=[]},9002:function(t,e,n){var r=n("3176");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("967d").default;i("037fb99c",r,!0,{sourceMap:!1,shadowMode:!1})},"926e":function(t,e,n){"use strict";var r=n("8bdb"),i=n("af9e"),a=n("1099"),o=n("c337"),c=n("1d57"),u=i((function(){o(1)}));r({target:"Object",stat:!0,forced:u,sham:!c},{getPrototypeOf:function(t){return o(a(t))}})},9270:function(t,e,n){"use strict";n.r(e);var r=n("9ecd"),i=n("c68c");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("aee3");var o=n("828b"),c=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,"7d2a7abb",null,!1,r["a"],void 0);e["default"]=c.exports},"9beb":function(t,e,n){var r=n("0d65");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("967d").default;i("44684b15",r,!0,{sourceMap:!1,shadowMode:!1})},"9da0":function(t,e,n){"use strict";n.r(e);var r=n("e967"),i=n("e945");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("bae3");var o=n("828b"),c=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,"686d4c7f",null,!1,r["a"],void 0);e["default"]=c.exports},"9ecd":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"right-content"},[t.subCategories.length>0?n("v-uni-view",{staticClass:"sub-categories",attrs:{id:"subCategories"}},t._l(t.subCategories,(function(e,r){return n("v-uni-view",{key:r,staticClass:"sub-cat-item",class:{active:t.activeSubId===e.id},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.selectSub(e.id)}}},[t._v(t._s(e.name))])})),1):t._e(),n("v-uni-scroll-view",{staticClass:"product-scroll",style:{height:t.scrollHeight+"px"},attrs:{"scroll-y":!0,"lower-threshold":100,"scroll-top":t.scrollTopVal,"scroll-with-animation":!1},on:{scrolltolower:function(e){arguments[0]=e=t.$handleEvent(e),t.onScrollToLower.apply(void 0,arguments)}}},[t.list.length>0?n("v-uni-view",{staticClass:"product-grid"},t._l(t.list,(function(e,r){return n("v-uni-view",{key:r,staticClass:"product-card",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.onTapProduct(e)}}},[n("v-uni-view",{staticClass:"product-img"},[e.image?n("v-uni-image",{staticClass:"product-image",attrs:{src:e.image,mode:"aspectFill"}}):t._e()],1),n("v-uni-view",{staticClass:"product-info"},[n("v-uni-text",{staticClass:"product-name"},[t._v(t._s(e.name))]),e.tags&&e.tags.length>0?n("v-uni-view",{staticClass:"product-badges"},t._l(e.tags,(function(e,r){return n("v-uni-view",{key:r,staticClass:"product-badge",style:{background:e.bg,color:e.color}},[t._v(t._s(e.text))])})),1):t._e(),n("v-uni-view",{staticClass:"price-row"},[n("v-uni-text",{staticClass:"product-price"},[t._v("¥"+t._s(e.price))]),n("v-uni-text",{staticClass:"price-unit"},[t._v("起")])],1)],1)],1)})),1):n("v-uni-view",{staticClass:"product-empty"},[n("v-uni-text",{staticClass:"empty-icon"},[t._v("📦")]),n("v-uni-text",{staticClass:"empty-text"},[t._v("没有找到相关商品")])],1),t.list.length>0?n("v-uni-view",{staticClass:"load-tip"},[t.loading?n("v-uni-text",[t._v("加载中...")]):t.hasMore?t._e():n("v-uni-text",[t._v("没有更多了")])],1):t._e()],1)],1)},i=[]},"9ed9":function(t,e,n){"use strict";var r=n("b45f"),i=n.n(r);i.a},ad9b:function(t,e,n){"use strict";n("6a54");var r=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.getCategories=o,e.getCountries=c,e.getGoods=l,e.getGoodsDetail=d,e.getHomeGoods=f,e.getTagGroups=s,e.getTags=u;var i=r(n("772e")),a="/public";function o(t){return i.default.get("".concat(a,"/categories"),t)}function c(){return i.default.get("".concat(a,"/countries"))}function u(){return i.default.get("".concat(a,"/tags"))}function s(t){return i.default.get("".concat(a,"/tag-groups"),t)}function l(t){return i.default.get("".concat(a,"/goods"),t)}function d(t){return i.default.get("".concat(a,"/goods/").concat(t))}function f(t){return i.default.get("".concat(a,"/home-goods"),t)}var h={getCategories:o,getCountries:c,getTags:u,getTagGroups:s,getGoods:l,getGoodsDetail:d,getHomeGoods:f};e.default=h},aee3:function(t,e,n){"use strict";var r=n("31b6"),i=n.n(r);i.a},b45f:function(t,e,n){var r=n("2966");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("967d").default;i("55419d85",r,!0,{sourceMap:!1,shadowMode:!1})},b5e9:function(t,e,n){"use strict";(function(t){n("6a54");var r=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("fd3c"),n("bf0f"),n("18f7"),n("de6c"),n("2797"),n("aa9c"),n("d4b5"),n("c223"),n("0c26"),n("8f71"),n("5c47"),n("2c10"),n("562d"),n("aa77"),n("5ef2"),n("dd2b"),n("a1c1");var i=r(n("b7c7")),a=r(n("5de6")),o=r(n("2634")),c=r(n("2fdc")),u=r(n("9da0")),s=r(n("c115")),l=r(n("8701")),d=r(n("cbae")),f=r(n("9270")),h=r(n("4e08")),v=n("ad9b"),p=n("772e"),g=n("635a"),b={components:{SearchBar:u.default,CountryBar:s.default,ActiveFilters:l.default,CategorySidebar:d.default,ProductGrid:f.default,FilterDrawer:h.default},watch:{"activeFilters.length":function(){this.recomputeScrollHeight()},"subCategories.length":function(){this.recomputeScrollHeight()}},data:function(){return{searchKeyword:"",selectedCountry:"",countries:[],activeCategory:"all",categories:[{id:"all",name:"全部商品"}],subCategories:[],activeSubCategory:"",activeFilters:[],showFilter:!1,filterGroups:[],pagination:{total:0,current:1,pageSize:10},hasMore:!0,loadingMore:!1,products:[],windowHeight:667,scrollTopVal:0,productScrollHeight:400,_searchBarH:0,_countryBarH:0,_activeFiltersH:0,_subCategoriesH:0}},onLoad:function(){var e=this;return(0,c.default)((0,o.default)().mark((function n(){var r,i;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:try{r=uni.getSystemInfoSync(),i=r.tabBarHeight||50,e.windowHeight=(r.screenHeight||750)-i,t.log("[onLoad] screenHeight="+r.screenHeight+", tabBarHeight="+i+" → windowHeight="+e.windowHeight)}catch(a){e.windowHeight=667}return n.next=3,e.initData();case 3:return e.loadSubCategories("all"),n.next=6,e.loadGoods(1);case 6:e.recomputeScrollHeight();case 7:case"end":return n.stop()}}),n)})))()},methods:{initData:function(){var e=this;return(0,c.default)((0,o.default)().mark((function n(){var r,i,a;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,(0,v.getCountries)();case 3:return r=n.sent,i=r.data&&r.data.data||[],a=i.map((function(t){return{id:t.id,name:t.countryName,icon:(0,p.buildUrl)(t.countryIcon||"")}})),e.countries=a,n.next=9,e.loadCategoryData("");case 9:t.log("=== [Products API Test] ==="),t.log("[1] countries:",a.length,"条"),t.log("=== [Test End] ==="),n.next=17;break;case 14:n.prev=14,n.t0=n["catch"](0),t.error("[Products initData Error]",n.t0);case 17:case"end":return n.stop()}}),n,null,[[0,14]])})))()},loadCategoryData:function(e){var n=this;return(0,c.default)((0,o.default)().mark((function r(){var i,c,u,s,l,d,f,h,p;return(0,o.default)().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,i=e?{countryId:e}:{},r.next=4,Promise.all([(0,v.getCategories)(i),(0,v.getTagGroups)(i)]);case 4:c=r.sent,u=(0,a.default)(c,2),s=u[0],l=u[1],d=s.data&&s.data.data||[],f=[{id:"all",name:"全部商品",children:[],productCount:0}],d.forEach((function(t){f.push({id:t.id,name:t.categoryName,children:t.children||[],productCount:t.productCount||0})})),h=l.data&&l.data.data||[],p=h.map((function(t){return{id:t.id,title:t.groupName,tags:(t.tags||[]).map((function(t){return{id:t.id,name:t.tagName,color:t.tagColor,fontColor:t.tagFontColor,productCount:t.productCount||0}})),selected:[]}})),n.categories=f,n.filterGroups=p,n.activeCategory="all",n.subCategories=[],n.activeSubCategory="",t.log("[loadCategoryData] countryId="+(e||"all")+", categories="+f.length+", filterGroups="+p.length),r.next=24;break;case 21:r.prev=21,r.t0=r["catch"](0),t.error("[loadCategoryData Error]",r.t0);case 24:case"end":return r.stop()}}),r,null,[[0,21]])})))()},loadGoods:function(e){var n=this;return(0,c.default)((0,o.default)().mark((function r(){var i,a,c,u,s,l,d,f;return(0,o.default)().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,i=e||n.pagination.current||1,a=n.pagination.pageSize||10,c=n.buildQueryParams(i),t.log("[loadGoods] params:",JSON.stringify(c)),r.next=7,(0,v.getGoods)(c);case 7:u=r.sent,s=u.data&&u.data.data||{items:[],total:0,page:1,pageSize:10},l=s.items||[],d=l.map((function(t){return{id:t.goodId,name:(0,g.truncateProductTitle)(t.goodName),price:t.price,image:t.image,tags:(t.tags||[]).map((function(t){return{text:t.tagName,bg:t.tagColor,color:t.tagFontColor}}))}})),f=s.total||0,1===i?(n.products=d,n.resetScrollToTop()):n.products=n.products.concat(d),n.pagination={total:f,current:i,pageSize:a},n.hasMore=n.products.length<f,n.loadingMore=!1,n.recomputeScrollHeight(),t.log("[loadGoods] total="+f+", page="+i+", items="+d.length+", loaded="+n.products.length+", hasMore="+n.hasMore),r.next=25;break;case 20:r.prev=20,r.t0=r["catch"](0),t.error("[loadGoods Error]",r.t0),n.products=[],n.loadingMore=!1;case 25:case"end":return r.stop()}}),r,null,[[0,20]])})))()},buildQueryParams:function(t){var e={page:t||1,pageSize:this.pagination.pageSize||10};this.selectedCountry&&(e.countryId=this.selectedCountry);var n=this.activeSubCategory||("all"!==this.activeCategory?this.activeCategory:"");n&&(e.categoryId=n);var r=(this.searchKeyword||"").trim();r&&(e.keyword=r);var i=(this.filterGroups||[]).filter((function(t){return t.selected&&t.selected.length>0})).map((function(t){return{tagGroupId:String(t.id),tagIds:(t.selected||[]).map((function(t){return String(t)}))}}));return i.length>0&&(e.tags=JSON.stringify(i)),e},codeToEmoji:function(t){if(!t)return"🌐";var e=t.match(/\/([^/]+)\.\w+$/);if(!e)return"🌐";var n=e[1].toUpperCase();if(2!==n.length)return"🌐";var r=127462;return String.fromCodePoint(r+n.charCodeAt(0)-65)+String.fromCodePoint(r+n.charCodeAt(1)-65)},loadSubCategories:function(t){var e=[];if("all"!==t){var n=this.categories.find((function(e){return e.id===t}));n&&n.children&&n.children.length>0&&(e=n.children.map((function(t){return{id:t.id,name:t.categoryName}})))}this.subCategories=e,this.activeSubCategory=""},onSearchInput:function(t){this.searchKeyword=t},onSearchBlur:function(){this.loadGoods(1)},onScrollToLower:function(){!this.loadingMore&&this.hasMore&&(this.loadingMore=!0,this.loadGoods(this.pagination.current+1))},resetScrollToTop:function(){var t=this;this.scrollTopVal=99999,this.$nextTick((function(){t.scrollTopVal=0}))},onSearchBarHeight:function(t){this._searchBarH=t,this.recomputeScrollHeight()},onCountryBarHeight:function(t){this._countryBarH=t,this.recomputeScrollHeight()},onActiveFiltersHeight:function(t){this._activeFiltersH=t,this.recomputeScrollHeight()},onSubCategoriesHeight:function(t){this._subCategoriesH=t,this.recomputeScrollHeight()},recomputeScrollHeight:function(){var e=this._searchBarH+this._countryBarH+this._activeFiltersH+this._subCategoriesH,n=this.windowHeight-e;n<200&&(n=200),n>this.windowHeight&&(n=this.windowHeight),this.productScrollHeight=Math.round(n),t.log("[recomputeScrollHeight] windowHeight="+this.windowHeight+", searchBar="+this._searchBarH+", countryBar="+this._countryBarH+", activeFilters="+this._activeFiltersH+", subCategories="+this._subCategoriesH+" → scrollHeight="+this.productScrollHeight)},selectCountry:function(t){var e=this;return(0,c.default)((0,o.default)().mark((function n(){var r,i;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.selectedCountry!==t){n.next=8;break}return e.selectedCountry="",e.activeFilters=e.activeFilters.filter((function(t){return"country"!==t.key})),n.next=5,e.loadCategoryData("");case 5:return n.next=7,e.loadGoods(1);case 7:return n.abrupt("return");case 8:return r=e.countries.find((function(e){return e.id===t})),i=e.activeFilters.filter((function(t){return"country"!==t.key})),r&&i.push({key:"country",label:r.name}),e.selectedCountry=t,e.activeFilters=i,n.next=15,e.loadCategoryData(t);case 15:return n.next=17,e.loadGoods(1);case 17:case"end":return n.stop()}}),n)})))()},selectCategory:function(t){var e=this;return(0,c.default)((0,o.default)().mark((function n(){return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.activeCategory=t,e.loadSubCategories(t),n.next=4,e.loadGoods(1);case 4:case"end":return n.stop()}}),n)})))()},selectSubCategory:function(t){var e=this;return(0,c.default)((0,o.default)().mark((function n(){return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.activeSubCategory=t,n.next=3,e.loadGoods(1);case 3:case"end":return n.stop()}}),n)})))()},toggleFilter:function(){this.showFilter=!this.showFilter},closeFilter:function(){this.showFilter=!1},toggleFilterTag:function(t){var e=t.groupIndex,n=t.tagId,r=(0,i.default)(this.filterGroups),a=r[e];if(a){var o=(0,i.default)(a.selected),c=o.indexOf(n);c>-1?o.splice(c,1):o.push(n),a.selected=o,this.filterGroups=r}},removeFilter:function(t){var e=this;return(0,c.default)((0,o.default)().mark((function n(){var r,i,a;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=e.activeFilters.filter((function(e){return e.key!==t})),"country"!==t){n.next=9;break}return e.selectedCountry="",e.activeFilters=r,n.next=6,e.loadCategoryData("");case 6:return n.next=8,e.loadGoods(1);case 8:return n.abrupt("return");case 9:if(0!==t.indexOf("tag_")){n.next=17;break}return i=t.replace("tag_",""),a=e.filterGroups.map((function(t){return String(t.id)===String(i)?Object.assign({},t,{selected:[]}):t})),e.activeFilters=r,e.filterGroups=a,n.next=16,e.loadGoods(1);case 16:return n.abrupt("return");case 17:e.activeFilters=r;case 18:case"end":return n.stop()}}),n)})))()},clearAllFilters:function(){var t=this;return(0,c.default)((0,o.default)().mark((function e(){var n,r;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.activeFilters.some((function(t){return"country"===t.key})),t.activeFilters=[],!n&&!t.selectedCountry){e.next=6;break}return t.selectedCountry="",e.next=6,t.loadCategoryData("");case 6:return r=t.filterGroups.map((function(t){return Object.assign({},t,{selected:[]})})),t.filterGroups=r,e.next=10,t.loadGoods(1);case 10:case"end":return e.stop()}}),e)})))()},resetFilters:function(){var t=this.filterGroups.map((function(t){return Object.assign({},t,{selected:[]})}));this.filterGroups=t},confirmFilters:function(){var t=this;return(0,c.default)((0,o.default)().mark((function e(){var n,r;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],r=t.activeFilters.find((function(t){return"country"===t.key})),r&&n.push(r),t.filterGroups.forEach((function(t){if(t.selected.length>0){var e=t.tags.filter((function(e){return t.selected.indexOf(e.id)>-1})).map((function(t){return t.name}));e.length>0&&n.push({key:"tag_"+t.id,label:e.join(",")})}})),t.activeFilters=n,t.showFilter=!1,e.next=8,t.loadGoods(1);case 8:case"end":return e.stop()}}),e)})))()},goDetail:function(t){uni.navigateTo({url:"/pages/product-detail/product-detail?id=".concat(t.id)})}}};e.default=b}).call(this,n("ba7c")["default"])},ba3f:function(t,e,n){var r=n("d97d");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("967d").default;i("2ec34e16",r,!0,{sourceMap:!1,shadowMode:!1})},bae3:function(t,e,n){"use strict";var r=n("ba3f"),i=n.n(r);i.a},bb03:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"products-page",style:{height:t.windowHeight+"px"}},[n("SearchBar",{attrs:{keyword:t.searchKeyword},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.onSearchInput.apply(void 0,arguments)},blur:function(e){arguments[0]=e=t.$handleEvent(e),t.onSearchBlur.apply(void 0,arguments)},filter:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleFilter.apply(void 0,arguments)},"height-change":function(e){arguments[0]=e=t.$handleEvent(e),t.onSearchBarHeight.apply(void 0,arguments)}}}),n("CountryBar",{attrs:{list:t.countries,"selected-id":t.selectedCountry},on:{select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectCountry.apply(void 0,arguments)},"height-change":function(e){arguments[0]=e=t.$handleEvent(e),t.onCountryBarHeight.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"content-body"},[n("CategorySidebar",{attrs:{list:t.categories,"active-id":t.activeCategory},on:{select:function(e){arguments[0]=e=t.$handleEvent(e),t.selectCategory.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"right-wrap"},[n("ActiveFilters",{attrs:{list:t.activeFilters},on:{remove:function(e){arguments[0]=e=t.$handleEvent(e),t.removeFilter.apply(void 0,arguments)},"clear-all":function(e){arguments[0]=e=t.$handleEvent(e),t.clearAllFilters.apply(void 0,arguments)},"height-change":function(e){arguments[0]=e=t.$handleEvent(e),t.onActiveFiltersHeight.apply(void 0,arguments)}}}),n("ProductGrid",{attrs:{list:t.products,"sub-categories":t.subCategories,"active-sub-id":t.activeSubCategory,"has-more":t.hasMore,loading:t.loadingMore,"scroll-top-val":t.scrollTopVal,"scroll-height":t.productScrollHeight},on:{"sub-select":function(e){arguments[0]=e=t.$handleEvent(e),t.selectSubCategory.apply(void 0,arguments)},"product-click":function(e){arguments[0]=e=t.$handleEvent(e),t.goDetail.apply(void 0,arguments)},"scroll-to-lower":function(e){arguments[0]=e=t.$handleEvent(e),t.onScrollToLower.apply(void 0,arguments)},"sub-height-change":function(e){arguments[0]=e=t.$handleEvent(e),t.onSubCategoriesHeight.apply(void 0,arguments)}}})],1)],1),n("FilterDrawer",{attrs:{visible:t.showFilter,groups:t.filterGroups},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.closeFilter.apply(void 0,arguments)},"toggle-tag":function(e){arguments[0]=e=t.$handleEvent(e),t.toggleFilterTag.apply(void 0,arguments)},reset:function(e){arguments[0]=e=t.$handleEvent(e),t.resetFilters.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmFilters.apply(void 0,arguments)}}})],1)},i=[]},c115:function(t,e,n){"use strict";n.r(e);var r=n("52a8"),i=n("4ee1");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("08dd");var o=n("828b"),c=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,"53eaaf19",null,!1,r["a"],void 0);e["default"]=c.exports},c240:function(t,e,n){"use strict";var r=n("181d");r(Math,"Math",!0)},c68c:function(t,e,n){"use strict";n.r(e);var r=n("5fa4"),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},cb1a:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("5c47");var r={name:"ActiveFilters",props:{list:{type:Array,default:function(){return[]}}},mounted:function(){var t=this;this.$nextTick((function(){return t.emitHeight()}))},watch:{"list.length":function(){var t=this;this.$nextTick((function(){return t.emitHeight()}))}},methods:{emitHeight:function(){var t=this;if(this.list&&0!==this.list.length){var e=uni.createSelectorQuery().in(this);e.select("#activeFilters").boundingClientRect(),e.exec((function(e){e&&e[0]?t.$emit("height-change",e[0].height):t.$emit("height-change",0)}))}else this.$emit("height-change",0)},onRemove:function(t){this.$emit("remove",t)},onClearAll:function(){this.$emit("clear-all")}}};e.default=r},cbae:function(t,e,n){"use strict";n.r(e);var r=n("dda1"),i=n("84e8");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("256a");var o=n("828b"),c=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,"44522978",null,!1,r["a"],void 0);e["default"]=c.exports},d8da:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("5ef2");var r={name:"FilterDrawer",props:{visible:{type:Boolean,default:!1},groups:{type:Array,default:function(){return[]}}},methods:{isSelected:function(t,e){return(t.selected||[]).indexOf(e)>-1},onToggle:function(t,e){this.$emit("toggle-tag",{groupIndex:t,tagId:e})},onReset:function(){this.$emit("reset")},onConfirm:function(){this.$emit("confirm")},onClose:function(){this.$emit("close")}}};e.default=r},d97d:function(t,e,n){var r=n("c86c");e=r(!1),e.push([t.i,".search-bar[data-v-686d4c7f]{display:flex;align-items:center;gap:%?20?%;padding:%?20?% %?32?%;background:#fff;border-bottom:%?2?% solid #f5f5f5;box-sizing:border-box}.search-input-wrap[data-v-686d4c7f]{flex:1;display:flex;align-items:center;height:%?72?%;padding:0 %?24?%;background:#f5f5f5;border-radius:%?36?%}.search-icon[data-v-686d4c7f]{font-size:%?28?%;margin-right:%?12?%}.search-input[data-v-686d4c7f]{flex:1;font-size:%?26?%;color:#333}.search-placeholder[data-v-686d4c7f]{color:#999}.filter-btn[data-v-686d4c7f]{display:flex;align-items:center;gap:%?8?%;padding:%?12?% %?20?%;font-size:%?26?%;color:#666}.filter-icon[data-v-686d4c7f]{font-size:%?28?%}.filter-text[data-v-686d4c7f]{font-size:%?26?%}",""]),t.exports=e},dda1:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-scroll-view",{staticClass:"sidebar",attrs:{"scroll-y":!0}},t._l(t.list,(function(e,r){return n("v-uni-view",{key:r,staticClass:"sidebar-item",class:{active:t.activeId===e.id},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.selectItem(e.id)}}},[t.activeId===e.id?n("v-uni-view",{staticClass:"sidebar-indicator"}):t._e(),n("v-uni-text",{staticClass:"sidebar-text"},[t._v(t._s(e.name))])],1)})),1)},i=[]},e8ea:function(t,e,n){var r=n("c86c");e=r(!1),e.push([t.i,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* 右侧内容区 - 上下分:顶部条件 + 下方滚动\n 不再依赖 flex:1 撑高度,scroll-view 用父组件传入的固定高度 */.right-content[data-v-7d2a7abb]{display:flex;flex-direction:column;background:#f2f2f2}\n/* 顶部子分类条件 - padding 6px 10px 圆角 60px */.sub-categories[data-v-7d2a7abb]{display:flex;flex-wrap:wrap;gap:%?16?%;padding:%?20?% %?20?%;background:#fff;border-bottom:%?1?% solid #eee}.sub-cat-item[data-v-7d2a7abb]{padding:%?12?% %?20?%;background:#fff;border-radius:%?60?%;font-size:%?24?%;font-weight:500;color:#000;line-height:1.2}\n/* 选中态 - 白底+橙色边框0.5px+橙色文字 */.sub-cat-item.active[data-v-7d2a7abb]{border:%?1?% solid #ff6800;color:#ff6800}\n/* 滚动商品区 - 高度由父组件通过 :style 传入(px 固定值),\n 符合 uni-app / 微信小程序官方文档「scroll-y 需给固定 height」的要求 */.product-scroll[data-v-7d2a7abb]{width:100%}\n/* 商品网格 - 固定2列 grid,不会因商品个数变化而拉伸占行 */.product-grid[data-v-7d2a7abb]{display:grid;grid-template-columns:repeat(2,1fr);gap:%?16?%;padding:%?20?%}.product-card[data-v-7d2a7abb]{min-width:0;background:#fff;border-radius:%?12?%;overflow:hidden;box-sizing:border-box}\n/* 图片 135x120 - 用 padding-bottom 撑比例 */.product-img[data-v-7d2a7abb]{position:relative;width:100%;padding-bottom:88.89%; /* 120/135 */background:#f7f7f7;overflow:hidden}.product-image[data-v-7d2a7abb]{position:absolute;top:0;left:0;width:100%;height:100%}\n/* 标签 - 位于商品名下方、价格上方,横向排列 */.product-badges[data-v-7d2a7abb]{display:flex;flex-wrap:wrap;gap:%?8?%;margin-top:%?8?%}.product-badge[data-v-7d2a7abb]{padding:%?4?% %?12?%;border-radius:%?8?%;font-size:%?18?%}\n/* 商品信息 - 内边距 10px */.product-info[data-v-7d2a7abb]{padding:%?20?%}\n/* 商品名 13px Medium #000000 */.product-name[data-v-7d2a7abb]{display:block;font-size:%?26?%;font-weight:500;color:#000;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n/* 价格行 - 价格 + "起"字横向排列 */.price-row[data-v-7d2a7abb]{display:flex;align-items:baseline;margin-top:%?16?%}\n/* 价格 15px Heavy #FF0000 红色 */.product-price[data-v-7d2a7abb]{font-size:%?30?%;font-weight:900;color:red;line-height:1.2}\n/* "起"字 - 比价格字体小,其他样式相同 */.price-unit[data-v-7d2a7abb]{font-size:%?22?%;font-weight:900;color:red;line-height:1.2;margin-left:%?4?%}\n/* 底部加载提示 */.load-tip[data-v-7d2a7abb]{padding:%?32?%;text-align:center;font-size:%?24?%;color:#999}\n/* 空状态 */.product-empty[data-v-7d2a7abb]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:%?120?% 0}.empty-icon[data-v-7d2a7abb]{font-size:%?96?%;margin-bottom:%?24?%}.empty-text[data-v-7d2a7abb]{font-size:%?26?%;color:#999}',""]),t.exports=e},e945:function(t,e,n){"use strict";n.r(e);var r=n("257f"),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},e967:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"search-bar",style:{paddingTop:t.statusBarHeight+"px"},attrs:{id:"searchBar"}},[n("v-uni-view",{staticClass:"search-input-wrap"},[n("v-uni-text",{staticClass:"search-icon"},[t._v("🔍")]),n("v-uni-input",{staticClass:"search-input",attrs:{placeholder:"搜索商品","placeholder-class":"search-placeholder",value:t.keyword},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.onInput.apply(void 0,arguments)},blur:function(e){arguments[0]=e=t.$handleEvent(e),t.onBlur.apply(void 0,arguments)}}})],1),n("v-uni-view",{staticClass:"filter-btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onFilter.apply(void 0,arguments)}}},[n("v-uni-text",{staticClass:"filter-icon"},[t._v("⚙")]),n("v-uni-text",{staticClass:"filter-text"},[t._v("筛选")])],1)],1)},i=[]},eb41:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.list.length>0?n("v-uni-view",{staticClass:"active-filters",attrs:{id:"activeFilters"}},[t._l(t.list,(function(e,r){return n("v-uni-view",{key:r,staticClass:"active-filter-tag"},[n("v-uni-text",{staticClass:"filter-text"},[t._v(t._s(e.label))]),n("v-uni-text",{staticClass:"filter-remove",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.onRemove(e.key)}}},[t._v("×")])],1)})),n("v-uni-view",{staticClass:"clear-all",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onClearAll.apply(void 0,arguments)}}},[t._v("清除全部")])],2):t._e()},i=[]},efac:function(t,e,n){"use strict";var r=n("9002"),i=n.n(r);i.a},f880:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("64aa");var r={name:"CategorySidebar",props:{list:{type:Array,default:function(){return[]}},activeId:{type:[String,Number],default:"all"}},methods:{selectItem:function(t){this.$emit("select",t)}}};e.default=r}}]); |