You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/h5/static/js/pages-goods-list-index.d47c...

1 line
13 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-list-index"],{"0233":function(t,a,e){var n=e("24fb");a=n(!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},"0ab6":function(t,a,e){var n=e("24fb");a=n(!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-34e76cba]{display:inline-block;padding:0 %?50?%;border-radius:%?50?%}.ui-btn__normal[data-v-34e76cba]{height:%?70?%;line-height:%?70?%;font-size:%?28?%}.ui-btn__min[data-v-34e76cba]{height:%?50?%;line-height:%?50?%;font-size:%?28?%}.ui-btn__max[data-v-34e76cba]{width:%?690?%;height:%?80?%;line-height:%?80?%;font-size:%?32?%}.ui-btn__gradual[data-v-34e76cba]{background:linear-gradient(270deg,#ff7f39,#ffa35b);color:#fff}.ui-btn__solid[data-v-34e76cba]{background:#ff875b;color:#fff}.ui-btn__line[data-v-34e76cba]{background:none;color:#333;border:1px solid #c0b9b9}.ui-btn__primaryLine[data-v-34e76cba]{background:none;color:#ff875b;border:1px solid #ff875b}.ui-btn__disabed[data-v-34e76cba]{opacity:.5}',""]),t.exports=a},"264a":function(t,a,e){"use strict";var n=e("6be4"),o=e.n(n);o.a},2702:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n={props:{type:{type:String,default:"line"},size:{type:String,default:"normal"},disable:{type:Boolean,default:!1}},methods:{click:function(){!this.disabed&&this.$emit("click")}}};a.default=n},"2fac":function(t,a,e){"use strict";e.r(a);var n=e("d5b2"),o=e.n(n);for(var i in n)"default"!==i&&function(t){e.d(a,t,(function(){return n[t]}))}(i);a["default"]=o.a},"359f":function(t,a,e){"use strict";e.r(a);var n=e("b179"),o=e("a5d5");for(var i in o)"default"!==i&&function(t){e.d(a,t,(function(){return o[t]}))}(i);e("e7a4");var r,s=e("f0c5"),c=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,"34e76cba",null,!1,n["a"],r);a["default"]=c.exports},"464f":function(t,a,e){"use strict";var n=e("4ea4");e("99af"),e("4e82"),e("ac1f"),e("841c"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,e("96cf");var o=n(e("1da1")),i=e("145b"),r=n(e("91cc")),s=n(e("ba2d")),c=n(e("1014")),u=n(e("0c0b")),d=n(e("8832")),l=n(e("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 e,n,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(e=a.sent,n=e.error,o=e.result,!n){a.next=9;break}return uni.$u.toast(n.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},"6be4":function(t,a,e){var n=e("0233");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=e("4f06").default;o("03337524",n,!0,{sourceMap:!1,shadowMode:!1})},"8ff4":function(t,a,e){"use strict";e.r(a);var n=e("464f"),o=e.n(n);for(var i in n)"default"!==i&&function(t){e.d(a,t,(function(){return n[t]}))}(i);a["default"]=o.a},a5d5:function(t,a,e){"use strict";e.r(a);var n=e("2702"),o=e.n(n);for(var i in n)"default"!==i&&function(t){e.d(a,t,(function(){return n[t]}))}(i);a["default"]=o.a},a85b:function(t,a,e){"use strict";var n;e.d(a,"b",(function(){return o})),e.d(a,"c",(function(){return i})),e.d(a,"a",(function(){return n}));var o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",{staticClass:"sort"},t._l(t.sortData,(function(a){return e("v-uni-view",{key:a.value,staticClass:"sort--item",class:a.value==t.active.value&&"sort--item__active",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.change(a)}}},[e("v-uni-text",{staticClass:"sort--label"},[t._v(t._s(a.label))]),a.sort?e("v-uni-view",[e("v-uni-view",{staticClass:"sort--icon sort--icon__up",class:{"sort--icon__active":"ASC"===a.sort&&a.value===t.active.value}}),e("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=[]},b179:function(t,a,e){"use strict";var n;e.d(a,"b",(function(){return o})),e.d(a,"c",(function(){return i})),e.d(a,"a",(function(){return n}));var o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("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=[]},ba2d:function(t,a,e){"use strict";e.r(a);var n=e("a85b"),o=e("2fac");for(var i in o)"default"!==i&&function(t){e.d(a,t,(function(){return o[t]}))}(i);e("f3ad");var r,s=e("f0c5"),c=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,"4792316a",null,!1,n["a"],r);a["default"]=c.exports},bcff:function(t,a,e){"use strict";e.r(a);var n=e("f403"),o=e("8ff4");for(var i in o)"default"!==i&&function(t){e.d(a,t,(function(){return o[t]}))}(i);e("264a");var r,s=e("f0c5"),c=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,"6a38f66a",null,!1,n["a"],r);a["default"]=c.exports},d5b2:function(t,a,e){"use strict";var n=e("4ea4");e("4e82"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var o=n(e("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},de3b:function(t,a,e){var n=e("0ab6");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=e("4f06").default;o("62ab6330",n,!0,{sourceMap:!1,shadowMode:!1})},e7a4:function(t,a,e){"use strict";var n=e("de3b"),o=e.n(n);o.a},f3ad:function(t,a,e){"use strict";var n=e("ff04"),o=e.n(n);o.a},f403:function(t,a,e){"use strict";e.d(a,"b",(function(){return o})),e.d(a,"c",(function(){return i})),e.d(a,"a",(function(){return n}));var n={"u-Input":e("eb73").default,uLoadmore:e("c153").default},o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",[e("v-uni-view",{staticClass:"header"},[e("UiPageHeader",[e("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),e("Sort",{on:{change:function(a){arguments[0]=a=t.$handleEvent(a),t.sortChange.apply(void 0,arguments)}}})],1),t.listData.length?e("UiGoodsGroup",{staticClass:"goods-group",attrs:{listData:t.listData}}):t._e(),t.showEmpty?t._e():e("u-loadmore",{attrs:{status:t.loadingStatus}}),t.showEmpty?[e("BsEmpty",{attrs:{tips:"没搜到您想要的相关商品"}},[e("UiButton",{attrs:{slot:"btn"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.$Router.replace("/")}},slot:"btn"},[t._v("去逛逛")])],1),e("v-uni-view",{staticClass:"title"},[t._v("为您精选")]),e("BsChoiceGoods",{ref:"choiceGoods",staticClass:"goods-group"})]:t._e()],2)},i=[]},fd41:function(t,a,e){var n=e("24fb");a=n(!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,e){var n=e("fd41");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=e("4f06").default;o("519175b0",n,!0,{sourceMap:!1,shadowMode:!1})}}]);