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.
 
 
 
 
 
 
shipin/public/static/js/pages-goods-goods_list-inde...

1 lines
13 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-goods_list-index"],{"034c":function(t,i,e){"use strict";e.r(i);var s=e("04d7"),o=e("effc");for(var c in o)["default"].indexOf(c)<0&&function(t){e.d(i,t,(function(){return o[t]}))}(c);e("3761");var a=e("f0c5"),n=Object(a["a"])(o["default"],s["b"],s["c"],!1,null,"381c5264",null,!1,s["a"],void 0);i["default"]=n.exports},"04d7":function(t,i,e){"use strict";e.d(i,"b",(function(){return s})),e.d(i,"c",(function(){return o})),e.d(i,"a",(function(){}));var s=function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("v-uni-view",{staticClass:"wrapper",style:t.colorStyle},[s("v-uni-view",{staticClass:"productList"},[s("v-uni-view",{staticClass:"search bg-color acea-row row-between-wrapper"},[s("v-uni-view",{staticClass:"input acea-row row-between-wrapper"},[s("v-uni-text",{staticClass:"iconfont icon-sousuo"}),s("v-uni-input",{attrs:{placeholder:t.$t("搜索商品名称"),"placeholder-class":"placeholder","confirm-type":"search",name:"search",value:t.where.keyword},on:{confirm:function(i){arguments[0]=i=t.$handleEvent(i),t.searchSubmit.apply(void 0,arguments)}}})],1),s("v-uni-view",{staticClass:"iconfont",class:1==t.is_switch?"icon-pailie":"icon-tupianpailie",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.Changswitch.apply(void 0,arguments)}}})],1),s("v-uni-view",{staticClass:"nav acea-row row-middle"},[s("v-uni-view",{staticClass:"item line1",class:t.title?"font-num":"",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.set_where(1)}}},[t._v(t._s(t.title?t.$t(t.title):t.$t("默认")))]),s("v-uni-view",{staticClass:"item",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.set_where(2)}}},[t._v(t._s(t.$t("价格"))),1==t.price?s("v-uni-image",{attrs:{src:e("9d31")}}):2==t.price?s("v-uni-image",{attrs:{src:e("f851")}}):s("v-uni-image",{attrs:{src:e("f460")}})],1),s("v-uni-view",{staticClass:"item",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.set_where(3)}}},[t._v(t._s(t.$t("销量"))),1==t.stock?s("v-uni-image",{attrs:{src:e("9d31")}}):2==t.stock?s("v-uni-image",{attrs:{src:e("f851")}}):s("v-uni-image",{attrs:{src:e("f460")}})],1),s("v-uni-view",{staticClass:"item",class:t.nows?"font-color":"",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.set_where(4)}}},[t._v(t._s(t.$t("新品")))])],1),s("v-uni-scroll-view",{staticClass:"scroll-Y",attrs:{"scroll-top":t.scrollTop,"scroll-y":"true"},on:{scroll:function(i){arguments[0]=i=t.$handleEvent(i),t.scroll.apply(void 0,arguments)},scrolltolower:function(i){arguments[0]=i=t.$handleEvent(i),t.scrolltolower.apply(void 0,arguments)}}},[s("v-uni-view",{staticClass:"list acea-row row-between-wrapper",class:1==t.is_switch?"":"on"},[t._l(t.productList,(function(i,o){return s("v-uni-view",{key:o,staticClass:"item",class:1==t.is_switch?"":"on",attrs:{"hover-class":"none"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.godDetail(i)}}},[s("v-uni-view",{staticClass:"pictrue",class:1==t.is_switch?"":"on"},[s("v-uni-image",{class:1==t.is_switch?"":"on",attrs:{src:i.image}}),i.activity&&"1"===i.activity.type?s("span",{staticClass:"pictrue_log_class",class:!0===t.is_switch?"pictrue_log_big":"pictrue_log"},[t._v(t._s(t.$t("秒杀")))]):t._e(),i.activity&&"2"===i.activity.type?s("span",{staticClass:"pictrue_log_class",class:!0===t.is_switch?"pictrue_log_big":"pictrue_log"},[t._v(t._s(t.$t("砍价")))]):t._e(),i.activity&&"3"===i.activity.type?s("span",{staticClass:"pictrue_log_class",class:!0===t.is_switch?"pictrue_log_big":"pictrue_log"},[t._v(t._s(t.$t("拼团")))]):t._e()],1),s("v-uni-view",{staticClass:"text",class:1==t.is_switch?"":"on"},[s("v-uni-view",{staticClass:"name line2"},[t._v(t._s(i.store_name))]),s("v-uni-view",{staticClass:"money font-color",class:1==t.is_switch?"":"on"},[t._v(t._s(t.$t("¥"))),s("v-uni-text",{staticClass:"num"},[t._v(t._s(i.price))])],1),s("v-uni-view",{staticClass:"vip acea-row row-between-wrapper",class:1==t.is_switch?"":"on"},[i.vip_price&&i.vip_price>0?s("v-uni-view",{staticClass:"vip-money"},[t._v(t._s(t.$t("¥"))+t._s(i.vip_price)),s("v-uni-image",{attrs:{src:e("2c95")}})],1):t._e(),s("v-uni-view",[t._v(t._s(t.$t("已售"))+" "+t._s(i.sales)+t._s(t.$t(i.unit_name)||t.$t("件")))])],1)],1)],1)})),t.productList.length>0?s("v-uni-view",{staticClass:"loadingicon acea-row row-center-wrapper"},[s("v-uni-text",{staticClass:"loading iconfont icon-jiazai",attrs:{hidden:0==t.loading}}),t._v(t._s(t.loadTitle))],1):t._e()],2)],1)],1),0==t.productList.length&&t.where.page>1?s("v-uni-view",{staticClass:"noCommodity"},[s("v-uni-view",{staticClass:"emptyBox"},[s("v-uni-image",{attrs:{src:t.imgHost+"/statics/images/no-thing.png"}}),s("v-uni-view",{staticClass:"tips"},[t._v(t._s(t.$t("暂无商品,去看点别的吧")))])],1),s("recommend",{attrs:{hostProduct:t.hostProduct}})],1):t._e(),s("home"),t.scrollTopShow?s("v-uni-view",{staticClass:"back-top",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.goTop.apply(void 0,arguments)}}},[s("v-uni-text",{staticClass:"iconfont icon-xiangshang"})],1):t._e()],1)},o=[]},"18e6":function(t,i,e){var s=e("d5bc");s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=e("4f06").default;o("ced9d7ca",s,!0,{sourceMap:!1,shadowMode:!1})},3761:function(t,i,e){"use strict";var s=e("18e6"),o=e.n(s);o.a},"436d":function(t,i,e){"use strict";(function(t){e("7a82");var s=e("4ea4").default;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("99af");var o=s(e("03ff")),c=e("1579"),a=s(e("f1f8")),n=e("26cb"),r=e("2c78"),l=e("989b"),d=s(e("66ca")),h={computed:(0,n.mapGetters)(["uid"]),components:{recommend:a.default,home:o.default},mixins:[d.default],data:function(){return{imgHost:l.HTTP_REQUEST_URL,productList:[],is_switch:!0,where:{sid:0,keyword:"",priceOrder:"",salesOrder:"",news:0,page:1,limit:20,cid:0},price:0,stock:0,nows:!1,loadend:!1,loading:!1,loadTitle:this.$t("加载更多"),title:"",hostProduct:[],hotPage:1,hotLimit:10,hotScroll:!1,scrollTop:0,old:{scrollTop:0},scrollTopShow:!1}},onLoad:function(t){this.where.cid=t.cid||0,this.where.coupon_category_id=t.coupon_category_id||"",this.$set(this.where,"sid",t.sid||0),this.title=t.title||"",this.$set(this.where,"keyword",t.searchValue||""),this.$set(this.where,"productId",t.productId||""),this.get_product_list()},methods:{scroll:function(t){this.scrollTopShow=t.detail.scrollTop>150,this.old.scrollTop=t.detail.scrollTop},goTop:function(t){var i=this;this.scrollTop=this.old.scrollTop,this.$nextTick((function(){i.scrollTop=0}))},godDetail:function(t){(0,r.goShopDetail)(t,this.uid).then((function(i){uni.navigateTo({url:"/pages/goods_details/index?id=".concat(t.id)})}))},Changswitch:function(){this.is_switch=!this.is_switch},searchSubmit:function(t){this.$set(this.where,"keyword",t.detail.value),this.loadend=!1,this.$set(this.where,"page",1),this.get_product_list(!0)},get_host_product:function(){var t=this;t.hotScroll||(0,c.getProductHot)(t.hotPage,t.hotLimit).then((function(i){t.hotPage++,t.hotScroll=i.data.length<t.hotLimit,t.hostProduct=t.hostProduct.concat(i.data)}))},set_where:function(t){switch(t){case 1:return history.back();case 2:0==this.price?this.price=1:1==this.price?this.price=2:2==this.price&&(this.price=0),this.stock=0;break;case 3:0==this.stock?this.stock=1:1==this.stock?this.stock=2:2==this.stock&&(this.stock=0),this.price=0;break;case 4:this.nows=!this.nows;break}this.loadend=!1,this.$set(this.where,"page",1),this.get_product_list(!0)},setWhere:function(){0==this.price?this.where.priceOrder="":1==this.price?this.where.priceOrder="asc":2==this.price&&(this.where.priceOrder="desc"),0==this.stock?this.where.salesOrder="":1==this.stock?this.where.salesOrder="asc":2==this.stock&&(this.where.salesOrder="desc"),this.where.news=this.nows?1:0},get_product_list:function(t){var i=this,e=this;e.setWhere(),e.loadend||e.loading||(!0===t&&e.$set(e,"productList",[]),e.loading=!0,e.loadTitle="",(0,c.getProductslist)(e.where).then((function(t){var s=t.data,o=e.$util.SplitArray(s,e.productList),c=s.length<e.where.limit;e.loadend=c,e.loading=!1,e.loadTitle=c?e.$t("没有更多内容啦~"):e.$t("加载更多"),e.$set(e,"productList",o),e.$set(e.where,"page",e.where.page+1),e.productList.length||i.get_host_product()})).catch((function(t){e.loading=!1,e.loadTitle=e.$t("加载更多")})))},scrolltolower:function(){this.productList.length>0?(this.get_product_list(),uni.$emit("scroll")):(this.get_host_product(),uni.$emit("scroll"))}},onPullDownRefresh:function(){},onReachBottom:function(){},onPageScroll:function(t){uni.$emit("scroll")}};i.default=h}).call(this,e("5a52")["default"])},d5bc:function(t,i,e){var s=e("24fb");i=s(!1),i.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/* crmeb颜色变量 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.scroll-Y[data-v-381c5264]{margin-top:%?86?%;height:calc(100vh - %?43?%)}.wrapper[data-v-381c5264]{position:relative;max-height:100vh;overflow:hidden}.wrapper .back-top[data-v-381c5264]{position:absolute;right:%?40?%;bottom:%?60?%;width:%?60?%;height:%?60?%;border-radius:50%;display:flex;justify-content:center;align-items:center;border:%?1?% solid #ccc;background-color:#fff}.wrapper .back-top .icon-xiangshang[data-v-381c5264]{color:#ccc;font-weight:700}.productList .search[data-v-381c5264]{width:100%;height:%?86?%;padding-left:%?23?%;box-sizing:border-box;position:fixed;left:0;top:0;z-index:9}.productList .search .input[data-v-381c5264]{width:%?640?%;height:%?60?%;background-color:#fff;border-radius:%?50?%;padding:0 %?20?%;box-sizing:border-box}.productList .search .input uni-input[data-v-381c5264]{width:%?548?%;height:100%;font-size:%?26?%}.productList .search .input .placeholder[data-v-381c5264]{color:#999}.productList .search .input .iconfont[data-v-381c5264]{font-size:%?35?%;color:#555}.productList .search .icon-pailie[data-v-381c5264],\n.productList .search .icon-tupianpailie[data-v-381c5264]{color:#fff;width:%?62?%;font-size:%?40?%;height:%?86?%;line-height:%?86?%}.productList .nav[data-v-381c5264]{height:%?86?%;color:#454545;position:fixed;left:0;width:100%;font-size:%?28?%;background-color:#fff;margin-top:%?86?%;top:0;z-index:9}.productList .nav .item[data-v-381c5264]{width:25%;text-align:center}.productList .nav .item.font-color[data-v-381c5264]{font-weight:700}.productList .nav .item uni-image[data-v-381c5264]{width:%?15?%;height:%?19?%;margin-left:%?10?%}.productList .list[data-v-381c5264]{padding:0 %?20?% %?30?% %?20?%;margin-top:%?86?%}.productList .list.on[data-v-381c5264]{background-color:#fff;border-top:1px solid #f6f6f6}.productList .list .item[data-v-381c5264]{width:%?345?%;margin-top:%?20?%;background-color:#fff;border-radius:%?20?%}.productList .list .item.on[data-v-381c5264]{width:100%;display:flex;border-bottom:%?1?% solid #f6f6f6;padding:%?30?% 0;margin:0}.productList .list .item .pictrue[data-v-381c5264]{position:relative;width:100%;height:%?345?%}.productList .list .item .name[data-v-381c5264]{line-height:%?42?%;height:%?84?%}.productList .list .item .pictrue.on[data-v-381c5264]{width:%?180?%;height:%?180?%}.productList .list .item .pictrue uni-image[data-v-381c5264]{width:100%;height:100%;border-radius:%?20?% %?20?% 0 0}.productList .list .item .pictrue uni-image.on[data-v-381c5264]{border-radius:%?6?%}.productList .list .item .text[data-v-381c5264]{padding:%?20?% %?17?% %?26?% %?17?%;font-size:%?30?%;color:#222}.productList .list .item .text.on[data-v-381c5264]{width:%?508?%;padding:0 0 0 %?22?%}.productList .list .item .text .money[data-v-381c5264]{font-size:%?26?%;font-weight:700;margin-top:%?8?%}.productList .list .item .text .money.on[data-v-381c5264]{margin-top:%?50?%}.productList .list .item .text .money .num[data-v-381c5264]{font-size:%?34?%}.productList .list .item .text .vip[data-v-381c5264]{font-size:%?22?%;color:#aaa;margin-top:%?7?%}.productList .list .item .text .vip.on[data-v-381c5264]{margin-top:%?12?%}.productList .list .item .text .vip .vip-money[data-v-381c5264]{font-size:%?24?%;color:#282828;font-weight:700;display:flex;align-items:center}.productList .list .item .text .vip .vip-money uni-image[data-v-381c5264]{width:%?64?%;height:%?26?%;margin-left:%?4?%}.noCommodity[data-v-381c5264]{background-color:#fff;padding-bottom:%?30?%}.noCommodity .emptyBox[data-v-381c5264]{text-align:center;padding-top:%?20?%}.noCommodity .emptyBox .tips[data-v-381c5264]{color:#aaa;font-size:%?26?%}.noCommodity .emptyBox uni-image[data-v-381c5264]{width:%?414?%;height:%?304?%}',""]),t.exports=i},effc:function(t,i,e){"use strict";e.r(i);var s=e("436d"),o=e.n(s);for(var c in s)["default"].indexOf(c)<0&&function(t){e.d(i,t,(function(){return s[t]}))}(c);i["default"]=o.a}}]);