|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-list-index"],{"0233":function(t,a,n){var e=n("24fb");a=e(!1),a.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */uni-page-body[data-v-6a38f66a]{background:#f8f8f8}.header[data-v-6a38f66a]{position:-webkit-sticky;position:sticky;top:var(--window-top);z-index:99}.search--input[data-v-6a38f66a]{display:block;margin-left:%?20?%;height:%?70?%;border:none;box-sizing:border-box;background:#f8f8f8}.search--input__placeholder[data-v-6a38f66a]{font-size:%?26?%;color:#666}.goods-group[data-v-6a38f66a]{padding-top:%?30?%}.title[data-v-6a38f66a]{font-size:%?32?%;text-align:center;margin:%?51?% auto %?30?% auto;display:flex;align-items:center;justify-content:space-between;width:%?500?%}.title[data-v-6a38f66a]::after, .title[data-v-6a38f66a]::before{display:inline-block;content:"";width:%?160?%;height:%?2?%;background:linear-gradient(90deg,#ccc,hsla(0,0%,80%,0))}.title[data-v-6a38f66a]::before{background:linear-gradient(270deg,#ccc,hsla(0,0%,80%,0))}body.?%PAGE?%[data-v-6a38f66a]{background:#f8f8f8}',""]),t.exports=a},"264a":function(t,a,n){"use strict";var e=n("6be4"),o=n.n(e);o.a},2702:function(t,a,n){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var e={props:{type:{type:String,default:"line"},size:{type:String,default:"normal"},disable:{type:Boolean,default:!1}},methods:{click:function(){!this.disable&&this.$emit("click")}}};a.default=e},"2fac":function(t,a,n){"use strict";n.r(a);var e=n("d5b2"),o=n.n(e);for(var i in e)"default"!==i&&function(t){n.d(a,t,(function(){return e[t]}))}(i);a["default"]=o.a},"359f":function(t,a,n){"use strict";n.r(a);var e=n("7f16"),o=n("a5d5");for(var i in o)"default"!==i&&function(t){n.d(a,t,(function(){return o[t]}))}(i);n("9f0b");var r,s=n("f0c5"),c=Object(s["a"])(o["default"],e["b"],e["c"],!1,null,"4c357d64",null,!1,e["a"],r);a["default"]=c.exports},"464f":function(t,a,n){"use strict";var e=n("4ea4");n("99af"),n("4e82"),n("ac1f"),n("841c"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,n("96cf");var o=e(n("1da1")),i=n("145b"),r=e(n("91cc")),s=e(n("ba2d")),c=e(n("1014")),u=e(n("0c0b")),d=e(n("8832")),l=e(n("359f")),f={components:{BsChoiceGoods:r.default,Sort:s.default,UiPageHeader:c.default,UiGoodsGroup:u.default,BsEmpty:d.default,UiButton:l.default},data:function(){return{sortType:"all",sortPrice:!1,loadingStatus:"loading",listData:[],params:{length:15,pageIndex:1,name:this.$Route.query.search,categoryId:this.$Route.query.categoryId,order:""}}},computed:{showEmpty:function(){return!this.listData.length&&1==this.params.pageIndex&&"loading"!=this.loadingStatus}},onLoad:function(){this.getGoodsList()},onReachBottom:function(){this.showEmpty?this.$refs.choiceGoods.next():this.next()},methods:{sortChange:function(t){this.params.order=t.sort?"".concat(t.value,":").concat(t.sort):t.value,this.params.pageIndex=1,this.listData=[],this.getGoodsList()},getGoodsList:function(){var t=this;return(0,o.default)(regeneratorRuntime.mark((function a(){var n,e,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return t.loadingStatus="loading",a.next=3,(0,i.ApiGetGoodsList)(t.params);case 3:if(n=a.sent,e=n.error,o=n.result,!e){a.next=9;break}return uni.$u.toast(e.message),a.abrupt("return",!1);case 9:t.listData=t.listData.concat(o.records),o.records.length<t.params.length&&(t.loadingStatus="nomore");case 11:case"end":return a.stop()}}),a)})))()},next:function(){if("nomore"===this.loadingStatus)return!1;this.params.pageIndex++,this.getGoodsList()}}};a.default=f},"5a44":function(t,a,n){var e=n("24fb");a=e(!1),a.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.ui-btn[data-v-4c357d64]{display:inline-block;padding:0 %?50?%;border-radius:%?50?%}.ui-btn[data-v-4c357d64]::after{display:none}.ui-btn__normal[data-v-4c357d64]{height:%?70?%;line-height:%?70?%;font-size:%?28?%}.ui-btn__min[data-v-4c357d64]{height:%?60?%;line-height:%?60?%;font-size:%?28?%}.ui-btn__small[data-v-4c357d64]{height:%?50?%;line-height:%?50?%;font-size:%?28?%}.ui-btn__max[data-v-4c357d64]{height:%?80?%;line-height:%?80?%;font-size:%?32?%}.ui-btn__gradual[data-v-4c357d64]{background:linear-gradient(270deg,#ff7f39,#ffa35b);color:#fff}.ui-btn__solid[data-v-4c357d64]{background:#ff875b;color:#fff}.ui-btn__line[data-v-4c357d64]{background:none;color:#333;border:1px solid #999}.ui-btn__primaryLine[data-v-4c357d64]{background:none;color:#ff875b;border:1px solid #ff875b}.ui-btn__disabed[data-v-4c357d64]{opacity:.5}',""]),t.exports=a},"6be4":function(t,a,n){var e=n("0233");"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var o=n("4f06").default;o("03337524",e,!0,{sourceMap:!1,shadowMode:!1})},"7f16":function(t,a,n){"use strict";var e;n.d(a,"b",(function(){return o})),n.d(a,"c",(function(){return i})),n.d(a,"a",(function(){return e}));var o=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("v-uni-button",{class:"ui-btn ui-btn__"+t.type+" ui-btn__"+t.size+" "+(t.disable?" x ui-btn__disabed":" xx"),on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.click.apply(void 0,arguments)}}},[t._t("default")],2)},i=[]},"8ff4":function(t,a,n){"use strict";n.r(a);var e=n("464f"),o=n.n(e);for(var i in e)"default"!==i&&function(t){n.d(a,t,(function(){return e[t]}))}(i);a["default"]=o.a},"92fd":function(t,a,n){var e=n("5a44");"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var o=n("4f06").default;o("4898df4d",e,!0,{sourceMap:!1,shadowMode:!1})},"9f0b":function(t,a,n){"use strict";var e=n("92fd"),o=n.n(e);o.a},a5d5:function(t,a,n){"use strict";n.r(a);var e=n("2702"),o=n.n(e);for(var i in e)"default"!==i&&function(t){n.d(a,t,(function(){return e[t]}))}(i);a["default"]=o.a},a85b:function(t,a,n){"use strict";var e;n.d(a,"b",(function(){return o})),n.d(a,"c",(function(){return i})),n.d(a,"a",(function(){return e}));var o=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("v-uni-view",{staticClass:"sort"},t._l(t.sortData,(function(a){return n("v-uni-view",{key:a.value,staticClass:"sort--item",class:a.value==t.active.value&&"sort--item__active",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.change(a)}}},[n("v-uni-text",{staticClass:"sort--label"},[t._v(t._s(a.label))]),a.sort?n("v-uni-view",[n("v-uni-view",{staticClass:"sort--icon sort--icon__up",class:{"sort--icon__active":"ASC"===a.sort&&a.value===t.active.value}}),n("v-uni-view",{staticClass:"sort--icon sort--icon__down",class:{"sort--icon__active":"DESC"===a.sort&&a.value===t.active.value}})],1):t._e()],1)})),1)},i=[]},ba2d:function(t,a,n){"use strict";n.r(a);var e=n("a85b"),o=n("2fac");for(var i in o)"default"!==i&&function(t){n.d(a,t,(function(){return o[t]}))}(i);n("f3ad");var r,s=n("f0c5"),c=Object(s["a"])(o["default"],e["b"],e["c"],!1,null,"4792316a",null,!1,e["a"],r);a["default"]=c.exports},bcff:function(t,a,n){"use strict";n.r(a);var e=n("f403"),o=n("8ff4");for(var i in o)"default"!==i&&function(t){n.d(a,t,(function(){return o[t]}))}(i);n("264a");var r,s=n("f0c5"),c=Object(s["a"])(o["default"],e["b"],e["c"],!1,null,"6a38f66a",null,!1,e["a"],r);a["default"]=c.exports},d5b2:function(t,a,n){"use strict";var e=n("4ea4");n("4e82"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var o=e(n("5530")),i={data:function(){return{sortData:[{value:"",label:"综合"},{value:"starting_price",label:"价格",sort:"ASC"},{value:"sales",label:"销量"},{value:"create_time",label:"上新"}],active:{value:"",label:"综合"}}},methods:{change:function(t){if(t.sort&&("ASC"===t.sort?t.sort="DESC":t.sort="ASC"),console.log(t.value+t.sort,this.active.value+this.active.sort),t.value+t.sort===this.active.value+this.active.sort)return!1;this.active=(0,o.default)({},t),this.$emit("change",this.active)}}};a.default=i},f3ad:function(t,a,n){"use strict";var e=n("ff04"),o=n.n(e);o.a},f403:function(t,a,n){"use strict";n.d(a,"b",(function(){return o})),n.d(a,"c",(function(){return i})),n.d(a,"a",(function(){return e}));var e={"u-Input":n("eb73").default,uLoadmore:n("c153").default},o=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("v-uni-view",[n("v-uni-view",{staticClass:"header"},[n("UiPageHeader",[n("u--input",{staticClass:"search--input",attrs:{slot:"custom",prefixIconStyle:"font-size:48rpx;color:#ccc",prefixIcon:"search",placeholderClass:"search--input__placeholder",clearable:!0,placeholder:"请输入您想要搜索的商品名称",value:t.$Route.query.search},on:{focus:function(a){arguments[0]=a=t.$handleEvent(a),t.$Router.push("/search")}},slot:"custom"})],1),n("Sort",{on:{change:function(a){arguments[0]=a=t.$handleEvent(a),t.sortChange.apply(void 0,arguments)}}})],1),t.listData.length?n("UiGoodsGroup",{staticClass:"goods-group",attrs:{listData:t.listData}}):t._e(),t.showEmpty?t._e():n("u-loadmore",{attrs:{status:t.loadingStatus}}),t.showEmpty?[n("BsEmpty",{attrs:{tips:"没搜到您想要的相关商品"}},[n("UiButton",{attrs:{slot:"btn"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.$Router.replace("/")}},slot:"btn"},[t._v("去逛逛")])],1),n("v-uni-view",{staticClass:"title"},[t._v("为您精选")]),n("BsChoiceGoods",{ref:"choiceGoods",staticClass:"goods-group"})]:t._e()],2)},i=[]},fd41:function(t,a,n){var e=n("24fb");a=e(!1),a.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.sort[data-v-4792316a]{height:%?88?%;padding:0 %?40?%;display:flex;justify-content:space-between;align-items:center;background:#fff}.sort--item[data-v-4792316a]{display:flex;align-items:center;color:#666}.sort--item__active[data-v-4792316a]{color:#333}.sort--label[data-v-4792316a]{font-size:%?28?%;margin-right:%?16?%}.sort--icon[data-v-4792316a]{border:%?8?% solid #999;border-left-color:transparent;border-right-color:transparent}.sort--icon__up[data-v-4792316a]{border-top-color:transparent;margin-bottom:%?6?%}.sort--icon__up.sort--icon__active[data-v-4792316a]{border-bottom-color:#ff7f39}.sort--icon__down[data-v-4792316a]{border-bottom-color:transparent}.sort--icon__down.sort--icon__active[data-v-4792316a]{border-top-color:#ff7f39}',""]),t.exports=a},ff04:function(t,a,n){var e=n("fd41");"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var o=n("4f06").default;o("519175b0",e,!0,{sourceMap:!1,shadowMode:!1})}}]); |