bztang-admin/addons/yun_shop/static/app/js/chunk-2e16c6d1.075f4d48.js

1 line
11 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2e16c6d1"],{"0e675":function(t,o,e){"use strict";e("116b")},"116b":function(t,o,e){var s=e("a442");s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var i=e("499e").default;i("751b54be",s,!0,{sourceMap:!1,shadowMode:!1})},"4e80":function(t,o,e){"use strict";e.r(o);var s=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{attrs:{id:"card_goods"}},[e("div",{staticClass:"search_box"},[e("i",{staticClass:"fa fa-angle-left",on:{click:t.goBack}}),e("div",{staticClass:"text_box"},[e("i",{staticClass:"iconfont icon-sousuo1"}),e("form",{attrs:{action:"#"},on:{submit:function(t){t.preventDefault()}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.inputs,expression:"inputs"}],attrs:{type:"search",placeholder:"请输入当前分类商品"},domProps:{value:t.inputs},on:{keypress:t.enterSearch,input:function(o){o.target.composing||(t.inputs=o.target.value)}}})])]),e("span",{on:{click:t.getData}},[t._v("搜索")])]),t._m(0),e("div",{staticClass:"goods_list"},t._l(t.goodList,(function(o,s){return e("div",{key:s,staticClass:"goods_box",on:{click:function(e){return t.toGood(o.goods_id)}}},[e("div",{staticClass:"goods_img"},[e("img",{attrs:{src:o.thumb}})]),e("ul",{staticClass:"goods_text"},[e("li",{staticClass:"name",staticStyle:{"-webkit-box-orient":"vertical"}},[t._v(" "+t._s(t._f("escapeTitle")(o.title))+" ")]),e("li",{staticClass:"sum"},[e("span",[e("font",[t._v(t._s(t.$i18n.t("money")))]),t._v(t._s(o.price))],1),t.chooseGood.includes(o.goods_id)?e("i",{staticClass:"iconfont icon-record_go",on:{click:function(e){return e.stopPropagation(),t.chooseGoods(o)}}}):t._e(),t.chooseGood.includes(o.goods_id)?t._e():e("i",{staticClass:"iconfont no_current",on:{click:function(e){return e.stopPropagation(),t.chooseGoods(o)}}})])])])})),0),e("van-popup",{staticStyle:{width:"80%"},attrs:{position:"center",round:""},model:{value:t.show1,callback:function(o){t.show1=o},expression:"show1"}},[e("div",{staticClass:"tips_box"},[e("p",{staticClass:"text"},[t._v(" 您选择的商品数量超过8件请先删除后再重新选择 ")]),e("button",{attrs:{type:"button"},on:{click:function(o){t.show1=!1}}},[t._v("确定")])])]),e("div",{staticClass:"card_goods_btm"},[e("p",[t._v(" 已选"),e("span",[t._v(t._s(t.chooseGood.length))]),t._v("件商品 ")]),e("button",{attrs:{type:"button"},on:{click:t.sureChoose}},[t._v("确定选择")])])],1)},i=[function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"title"},[e("div",{staticClass:"line_left"}),e("h1",[t._v("搜索结果")]),e("div",{staticClass:"line-right"})])}],a=(e("e7e5"),e("d399")),d=(e("b64b"),e("14d9"),e("caad"),e("2532"),e("a434"),e("e9c4"),e("4d63"),e("c607"),e("ac1f"),e("2c3e"),e("25f0"),e("5319"),e("99af"),e("6968")),c=e("ac0d"),n={mixins:[c["a"]],data:function(){return{show1:!1,inputs:"",goodList:[],chooseGood:[],chooseItem:[],isLoadMore:!0,page:1,total_page:0}},activated:function(){this.initData(),this.setGoodsData(),this.getData()},methods:{initData:function(){this.inputs="",this.show1=!1,this.goodList=[],this.page=1,this.total_page=0,this.isLoadMore=!0},setGoodsData:function(){window.localStorage.getItem("chooseItem")?this.chooseItem=JSON.parse(window.localStorage.getItem("chooseItem")):this.chooseItem=[],this.chooseGood=[];for(var t=0;t<this.chooseItem.length;t++)this.chooseGood.push(this.chooseItem[t].id)},chooseGoods:function(t){if(this.chooseGood.includes(t.goods_id)){this.chooseGood.splice(this.chooseGood.indexOf(t.goods_id),1);for(var o=0;o<this.chooseItem.length;o++)this.chooseItem[o].id==t.goods_id&&this.chooseItem.splice(o,1);this.show1=!1}else this.chooseGood.length>=8?this.show1=!0:(this.show1=!1,this.chooseItem.push({title:t.title,price:t.price,thumb:t.thumb,id:t.goods_id}),this.chooseGood.push(t.goods_id))},toGood:function(t){this.$router.push(this.fun.getUrl("goods",{id:t}))},sureChoose:function(t){if(0!==this.chooseGood.length){window.localStorage.setItem("chooseItem",JSON.stringify(this.chooseItem));var o=new RegExp("business_card/card_goods/"+this.$route.params.id),e=window.location.href.replace(o,"business_card/edit_card/"+this.fun.getKey("formCard"));t.preventDefault(),location.replace(e)}else Object(a["a"])("请选择商品")},enterSearch:function(t){13===t.keyCode&&(t.preventDefault(),this.getData())},getData:function(){var t=this;t.isLoadMore=!1,t.page=1,$http.get("goods.goods.search-goods",{"search[keyword]":this.inputs,page:this.page,"search[category]":this.$route.params.id}," ").then((function(o){1===o.result?(t.isLoadMore=!0,t.total_page=o.data.last_page,t.total_page||(t.total_page=0),t.goodList=o.data.data):Object(a["a"])(o.msg)}),(function(t){}))},getMoreData:function(){var t=this;t.isLoadMore=!1,this.page>=this.total_page||(this.page=this.page+1,$http.get("goods.goods.search-goods",{"search[keyword]":this.inputs,page:this.page,"search[category]":this.$route.params.id}," ").then((function(o){if(t.isLoadMore=!0,1===o.result){var e=o.data.data;t.goodList=t.goodList.concat(e)}else t.page=t.page-1,t.isLoadMore=!1}),(function(t){})))},goBack:function(){this.$router.go(-1)}},components:{cTitle:d["a"]}},r=n,l=r,g=(e("0e675"),e("2877")),h=Object(g["a"])(l,s,i,!1,null,"06cfe62b",null);o["default"]=h.exports},a442:function(t,o,e){var s=e("24fb");o=s(!1),o.push([t.i,"#card_goods[data-v-06cfe62b]{padding-top:40px;padding-bottom:60px}#card_goods .tips_box[data-v-06cfe62b]{background:#fff;border-radius:.375rem;height:10.5rem}#card_goods .tips_box .text[data-v-06cfe62b]{padding:2.25rem .875rem;font-size:16px}#card_goods .tips_box button[data-v-06cfe62b]{border:none;color:#50a6f9;font-size:16px;width:100%;height:2.875rem;line-height:2.875rem;border-top:.0625rem solid #ebebeb}#card_goods .search_box[data-v-06cfe62b]{position:fixed;top:0;z-index:100;width:100%;background:#fff;height:2.75rem;line-height:2.75rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#card_goods .search_box .fa[data-v-06cfe62b]{font-size:1.5rem;color:#333;width:2.5rem}#card_goods .search_box .text_box[data-v-06cfe62b]{width:17.5rem;border-radius:1rem;height:1.75rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background:#f2f2f2;padding:0 .625rem}#card_goods .search_box .text_box .iconfont[data-v-06cfe62b]{font-size:1rem;color:#999;margin-right:.625rem}#card_goods .search_box .text_box form[data-v-06cfe62b]{width:100%}#card_goods .search_box .text_box input[data-v-06cfe62b]{border:none;width:90%}#card_goods .search_box span[data-v-06cfe62b]{width:3.75rem;font-size:16px}#card_goods .title[data-v-06cfe62b]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:2.5rem}#card_goods .title .line-right[data-v-06cfe62b],#card_goods .title .line_left[data-v-06cfe62b]{width:6.25rem;height:.0625rem;background:#ebebeb}#card_goods .title h1[data-v-06cfe62b]{font-size:15px;color:#999;margin:0 .875rem}#card_goods .goods_list[data-v-06cfe62b]{padding:.625rem .9375rem;background:#fff}#card_goods .goods_list .goods_box[data-v-06cfe62b]{background:#fafafa;padding:.625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:.625rem}#card_goods .goods_list .goods_box .goods_img[data-v-06cfe62b]{width:5.25rem;height:5.25rem;overflow:hidden;margin-right:.625rem;background:#f2f2f2}#card_goods .goods_list .goods_box .goods_img img[data-v-06cfe62b]{width:100%}#card_goods .goods_list .goods_box .goods_text[data-v-06cfe62b]{width:14.4375rem;position:relative}#card_goods .goods_list .goods_box .goods_text .name[data-v-06cfe62b]{text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:15px;text-align:left}#card_goods .goods_list .goods_box .goods_text .sum[data-v-06cfe62b]{position:absolute;bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;line-height:1.5rem;width:100%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#card_goods .goods_list .goods_box .goods_text .sum span[data-v-06cfe62b]{color:#f15353;font-size:16px}#card_goods .goods_list .goods_box .goods_text .sum span font[data-v-06cfe62b]{font-size:12px}#card_goods .goods_list .goods_box .goods_text .sum .icon-record_go[data-v-06cfe62b]{font-size:.875rem;color:#fff;width:1.5rem;height:1.5rem;line-height:1.5rem;border:.0625rem solid #50a6f9;border-radius:2rem;background:#50a6f9}#card_goods .goods_list .goods_box .goods_text .sum .no_current[data-v-06cfe62b]{font-size:.875rem;color:#ccc;width:1.5rem;height:1.5rem;line-height:1.5rem;border:.0625rem solid #ccc;border-radius:2rem;background:#fff}#card_goods .card_goods_btm[data-v-06cfe62b]{position:fixed;bottom:0;width:100%;height:3.0625rem;border-top:.0625rem solid #ebebeb;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background:#fff}#card_goods .card_goods_btm p[data-v-06cfe62b]{padding:0 .625rem;font-size:16px}#card_goods .card_goods_btm p span[data-v-06cfe62b]{color:#f15353;margin:0 .25rem}#card_goods .card_goods_btm button[data-v-06cfe62b]{border:none;background:#50a6f9;color:#fff;border-radius:0;width:6.875rem;height:100%;font-size:16px}",""]),t.exports=o},ac0d:function(t,o,e){"use strict";e.d(o,"a",(function(){return a}));var s=document.documentElement,i=document.body,a={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return s&&s.scrollTop?t=s.scrollTop:i&&(t=i.scrollTop),t},getClientHeight:function(){var t=0;return t=i.clientHeight&&s.clientHeight?Math.min(i.clientHeight,s.clientHeight):Math.max(i.clientHeight,s.clientHeight),t},getScrollHeight:function(){return Math.max(i.scrollHeight,s.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(){}}}}}]);