bztang-admin/addons/yun_shop/static/app/js/chunk-330fb0d6.6cbd8814.js

1 line
6.0 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-330fb0d6","chunk-2d0d83d6"],{"3481a":function(t,e,o){var i=o("7a1f");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=o("499e").default;a("75b0843f",i,!0,{sourceMap:!1,shadowMode:!1})},"6e9f":function(t,e,o){var i=o("24fb");e=i(!1),e.push([t.i,"#newRetail-child-goodlist[data-v-69abc125]{padding-bottom:.875rem}#newRetail-child-goodlist .ul[data-v-69abc125]{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}#newRetail-child-goodlist .ul .li[data-v-69abc125]{width:10.5rem;background-color:#fff;border-radius:.625rem;overflow:hidden;margin:.75rem 0 0 .75rem}#newRetail-child-goodlist .ul .li .good-img[data-v-69abc125]{width:100%;height:0;padding-bottom:100%;position:relative}#newRetail-child-goodlist .ul .li .good-img img[data-v-69abc125]{width:100%;right:0;height:100%;position:absolute}#newRetail-child-goodlist .ul .li .goods-main[data-v-69abc125]{padding:.625rem;text-align:left}#newRetail-child-goodlist .ul .li .goods-main .goods-title[data-v-69abc125]{height:2rem;line-height:1rem;font-size:.875rem;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}#newRetail-child-goodlist .ul .li .goods-main .goods-price[data-v-69abc125]{margin-top:1rem;font-size:.938rem;color:#f14e4e}",""]),t.exports=e},"79db":function(t,e,o){t.exports=o.p+"static/app/img/empty-image-search.ef236a93.png"},"7a1f":function(t,e,o){var i=o("24fb");e=i(!1),e.push([t.i,"",""]),t.exports=e},"8dbd":function(t,e,o){"use strict";o("fe9b")},a594:function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"newRetail-search"}},[o("c-title",{attrs:{hide:!1,text:t.titleName}}),o("van-search",{attrs:{"show-action":"",shape:"round",placeholder:"请输入商品名称"},on:{search:t.getGood},scopedSlots:t._u([{key:"action",fn:function(){return[o("div",{on:{click:t.getGood}},[t._v("搜索")])]},proxy:!0}]),model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}}),o("good-list",{staticClass:"goods-list",attrs:{goodsList:t.goodsList,mode:this.$route.params.type}})],1)},a=[],s=(o("e7e5"),o("d399")),n=(o("99af"),o("ec70")),l=o("ac0d"),d={mixins:[l["a"]],data:function(){return{pageType:null,titleName:"",searchValue:"",goodsList:[],page:1,isLoadMore:!0,total_page:0}},activated:function(){this.pageType=this.$route.params.type,this.titleName=2==this.$route.params.type?"代理套餐":"进货",this.fun.setWXTitle(this.titleName),this.getGood()},components:{goodList:n["a"]},computed:{},methods:{getGood:function(){var t=this,e="",o={};2==this.pageType?(e="plugin.new-retail.frontend.index.AgentPackage",o.goods_name=this.searchValue):(e="plugin.new-retail.frontend.index.purchaseIndependently",o={"search[goods_name]":this.searchValue}),$http.get(e,o,"").then((function(e){1===e.result?(t.goodsList=e.data.data,t.isLoadMore=!0,t.total_page=e.data.last_page,t.total_page||(t.total_page=0)):(Object(s["a"])(e.msg),"请登录"!=e.msg&&that.$router.go(-1))})).catch((function(t){}))},getMoreData:function(){this.isLoadMore=!1;var t=this;if(!(t.page>=t.total_page)){t.page+=1;var e="",o={};2==this.pageType?(e="plugin.new-retail.frontend.index.AgentPackage",o.goods_name=this.searchValue):(e="plugin.new-retail.frontend.index.purchaseIndependently",o={"search[goods_name]":this.searchValue}),o.page=t.page,$http.get(e,o,"加载中").then((function(e){if(t.isLoadMore=!0,1!=e.result)return t.page=t.page-1,void(t.isLoadMore=!1);var o=e.data.data;t.goodsList=t.goodsList.concat(o)})).catch((function(t){}))}}}},r=d,c=(o("c01d"),o("2877")),u=Object(c["a"])(r,i,a,!1,null,"68b2cb0d",null);e["default"]=u.exports},ac0d:function(t,e,o){"use strict";o.d(e,"a",(function(){return s}));var i=document.documentElement,a=document.body,s={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return i&&i.scrollTop?t=i.scrollTop:a&&(t=a.scrollTop),t},getClientHeight:function(){var t=0;return t=a.clientHeight&&i.clientHeight?Math.min(a.clientHeight,i.clientHeight):Math.max(a.clientHeight,i.clientHeight),t},getScrollHeight:function(){return Math.max(a.scrollHeight,i.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},c01d:function(t,e,o){"use strict";o("3481a")},ec70:function(t,e,o){"use strict";var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"newRetail-child-goodlist"}},[o("div",{staticClass:"ul"},t._l(t.goodsList,(function(e){return o("div",{key:e.goods_id,staticClass:"li",on:{click:function(o){return o.stopPropagation(),t.gotoGoodDetail(e.good_id)}}},[o("div",{staticClass:"good-img"},[o("img",{attrs:{src:e.thumb,alt:""}})]),o("div",{staticClass:"goods-main"},[o("div",{staticClass:"goods-title"},[t._v(t._s(e.title))]),o("div",{staticClass:"goods-price"},[t._v(t._s(t.$i18n.t("money"))+" "+t._s(e.price))])])])})),0),o("yz-blank",{attrs:{datas:t.goodsList,text:"暂无商品信息"}})],1)},a=[],s=(o("a9e3"),o("eb17")),n={props:{goodsList:{type:Object,default:function(){return{}}},mode:{type:[String,Number],default:"1"}},data:function(){return{}},components:{yzBlank:s["default"]},computed:{},methods:{gotoGoodDetail:function(t){this.$router.push(this.fun.getUrl("newRetailSalesGood",{id:t,mode:this.mode}))}}},l=n,d=(o("8dbd"),o("2877")),r=Object(d["a"])(l,i,a,!1,null,"69abc125",null);e["a"]=r.exports},fe9b:function(t,e,o){var i=o("6e9f");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=o("499e").default;a("40fac1c2",i,!0,{sourceMap:!1,shadowMode:!1})}}]);