bztang-admin/addons/yun_shop/static/app/js/chunk-132975b0.b343034f.js

1 line
10 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-132975b0","chunk-2d0d83d6"],{"0b1b":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:"o2o_grouplist"}},[o("c-title",{attrs:{hide:!1,text:"拼团列表"}}),o("van-notify",{attrs:{type:"success"},model:{value:t.showLocation,callback:function(e){t.showLocation=e},expression:"showLocation"}},[o("span",[t._v("定位中,请稍等...")])]),o("van-tabs",{attrs:{sticky:"",ellipsis:!1,swipeable:""},on:{change:t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.titleArr,(function(e,i){return o("van-tab",{key:i,attrs:{title:e}},[o("van-pull-refresh",{on:{refresh:t.refreshDatas},model:{value:t.isLoading,callback:function(e){t.isLoading=e},expression:"isLoading"}},[t.dataList[i]?o("div",{staticClass:"content"},t._l(t.dataList[i].list,(function(e,i){return o("div",{key:i,staticClass:"list"},[o("div",{staticClass:"list-top",on:{click:function(o){return o.stopPropagation(),t.gotoO2oHome(e.store_id)}}},[o("img",{staticClass:"o2o-img",attrs:{src:e.thumb,alt:""}}),o("div",{staticClass:"o2o-name"},[t._v(t._s(e.store_name||"---"))]),o("div",{staticClass:"distance"},[t._v(t._s(e.distance)+t._s(e.unit))])]),e.has_one_goods?o("div",{staticClass:"goods-info"},[o("img",{staticClass:"goods-img",attrs:{src:e.has_one_goods.thumb,alt:""}}),o("div",{staticClass:"goods-right"},[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.has_many_option_levels[0].group_price)+" "),o("div",{staticClass:"small-price"},[t._v(t._s(t.$i18n.t("money"))+" "+t._s(e.has_one_goods.price))])]),o("div",{staticClass:"goods-other"},[o("div",{staticClass:"goods-num"},[o("i",{staticClass:"iconfont icon-fontclass-renshu1"}),t._v(t._s(e.has_many_option_levels[0].member_num)+"人")]),o("div",{staticClass:"goods-btn",on:{click:function(o){return t.goGroup(e.id,e.store_id)}}},[t._v("去开团")])])])]):t._e()])})),0):t._e(),!t.showLocation&&t.dataList[i]?o("yz-blank",{attrs:{datas:t.dataList[i].list,text:"该分类暂无活动信息",isBtn:!1}}):t._e()],1)],1)})),1)],1)},a=[],s=(o("e7e5"),o("d399")),n=(o("ac1f"),o("1276"),o("d3b7"),o("25f0"),o("e9c4"),o("159b"),o("99af"),o("ac0d")),l=o("eb17"),c={mixins:[n["a"]],data:function(){return{showLocation:!1,activeName:0,isLoading:!1,dataList:[],isLoadMore:!0,titleArr:["离我最近","好评优先"],lat:0,lng:0}},activated:function(){var t=this;this.setNewArr(),this.fun.getLocation().then((function(e){t.showLocation=!1,t.lat=e.point.lat,t.lng=e.point.lng,t.handleClick()})).catch((function(t){}))},components:{yzBlank:l["default"]},computed:{},methods:{getLocation:function(){var t=this,e=new AMap.Map("iCenter");function o(e){var o=e.position.toString().split(",");t.point={lat:o[1],lng:o[0]},t.city=t.fun.isTextEmpty(e.addressComponent.city)?e.addressComponent.province:e.addressComponent.city;var i={address:e.formattedAddress,city:t.city,title:e.formattedAddress,point:t.point};t.lat=i.point.lat,t.lng=i.point.lng,t.showLocation=!1,0==t.activeName&&(t.dataList[t.activeName].list=[],t.handleClick()),t.$store.commit("updateLocation",i),t.$store.commit("setLocation",i),window.localStorage.setItem("myLocation",JSON.stringify(i))}function i(t){}e.plugin("AMap.Geolocation",(function(){var t=new AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4,maximumAge:0,convert:!0,showButton:!0,buttonPosition:"LB",buttonOffset:new AMap.Pixel(10,20),showMarker:!0,showCircle:!0,panToLocation:!0,zoomToAccuracy:!0});e.addControl(t),t.getCurrentPosition(),AMap.event.addListener(t,"complete",o),AMap.event.addListener(t,"error",i)}))},setNewArr:function(){var t=this;this.titleArr.forEach((function(e,o){t.dataList.push({isLoadMore:!0,page:1,total_page:0,list:[]})}))},refreshDatas:function(){this.dataList[this.activeName].list=[],this.handleClick()},handleClick:function(){var t=this,e=this;!this.showLocation&&this.lng?this.fun.isTextEmpty(this.dataList[e.activeName].list)?$http.post("plugin.fight-groups.frontend.store.store-fight-arrondi.get-fight-groups",{page:1,type_id:this.activeName+1,lng:this.lng,lat:this.lat},"",!0).then((function(o){1===o.result?(e.isLoading=!1,e.isLoadMore=!0,e.$set(t.dataList[e.activeName],"isLoadMore",!0),e.$set(t.dataList[e.activeName],"total_page",o.data.last_page),t.dataList[e.activeName].total_page||(e.$set(t.dataList[e.activeName],"total_page",0),t.dataList[e.activeName].total_page=0),e.$set(t.dataList[e.activeName],"list",o.data.data)):(e.isLoading=!1,e.$dialog.alert({message:o.msg}))})).catch((function(t){e.isLoading=!1})):e.isLoadMore=this.dataList[e.activeName].isLoadMore:Object(s["a"])("正在定位中")},getMoreData:function(){var t=this;if(t.dataList[t.activeName].isLoadMore=!1,t.isLoadMore=!1,!(t.dataList[t.activeName].page>=t.dataList[t.activeName].total_page)){var e={type_id:this.activeName+1,lng:this.lng,lat:this.lat};t.dataList[t.activeName].page=t.dataList[t.activeName].page+1,e.page=t.dataList[t.activeName].page,$http.get("plugin.fight-groups.frontend.store.store-fight-arrondi.get-fight-groups",e,"加载中").then((function(e){if(t.isLoading=!1,t.isLoadMore=!0,t.dataList[t.activeName].isLoadMore=!0,1===e.result){var o=e.data.data;t.dataList[t.activeName].list=t.dataList[t.activeName].list.concat(o)}else t.dataList[t.activeName].page=t.dataList[t.activeName].page-1,t.dataList[t.activeName].isLoadMore=!1,t.isLoadMore=!1}),(function(e){t.isLoading=!1}))}},goGroup:function(t,e){this.$router.push(this.fun.getUrl("GroupGoods",{id:t,store_id:e}))},gotoO2oHome:function(t){this.$router.push(this.fun.getUrl("HomeSeller",{store_id:t}))}}},r=c,d=(o("64c7"),o("2877")),g=Object(d["a"])(r,i,a,!1,null,"76cd52ae",null);e["default"]=g.exports},"621ab":function(t,e,o){var i=o("93bd");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=o("499e").default;a("13b15390",i,!0,{sourceMap:!1,shadowMode:!1})},"64c7":function(t,e,o){"use strict";o("621ab")},"79db":function(t,e,o){t.exports=o.p+"static/app/img/empty-image-search.ef236a93.png"},"93bd":function(t,e,o){var i=o("24fb");e=i(!1),e.push([t.i,"#o2o_grouplist[data-v-76cd52ae]{text-align:left}#o2o_grouplist .content[data-v-76cd52ae]{padding:.5rem .875rem}#o2o_grouplist .content .list[data-v-76cd52ae]{background:#fff;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:.75rem;border-radius:.625rem;margin-bottom:.75rem}#o2o_grouplist .content .list[data-v-76cd52ae],#o2o_grouplist .content .list .list-top[data-v-76cd52ae]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#o2o_grouplist .content .list .list-top[data-v-76cd52ae]{widows:100%;-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}#o2o_grouplist .content .list .list-top .o2o-img[data-v-76cd52ae]{width:1.875rem;height:1.875rem;background-color:#fe5e56;border-radius:50%}#o2o_grouplist .content .list .list-top .o2o-name[data-v-76cd52ae]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;padding:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#o2o_grouplist .content .list .list-top .distance[data-v-76cd52ae]{color:#666;font-size:10px}#o2o_grouplist .content .list .goods-info[data-v-76cd52ae]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-top:.75rem}#o2o_grouplist .content .list .goods-info .goods-img[data-v-76cd52ae]{width:4.75rem;height:4.75rem;background-color:#fac337;border-radius:.375rem;margin:0 .5rem 0 0;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}#o2o_grouplist .content .list .goods-info .goods-right[data-v-76cd52ae]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#o2o_grouplist .content .list .goods-info .goods-right .goods-title[data-v-76cd52ae]{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#o2o_grouplist .content .list .goods-info .goods-right .goods-price[data-v-76cd52ae]{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;color:#f14e4e}#o2o_grouplist .content .list .goods-info .goods-right .goods-price .small-price[data-v-76cd52ae]{margin-left:.75rem;color:#999;font-size:10px}#o2o_grouplist .content .list .goods-info .goods-right .goods-other[data-v-76cd52ae]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:12px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#o2o_grouplist .content .list .goods-info .goods-right .goods-other .goods-num[data-v-76cd52ae]{color:#fb8615}#o2o_grouplist .content .list .goods-info .goods-right .goods-other .goods-num i[data-v-76cd52ae]{font-size:10px}#o2o_grouplist .content .list .goods-info .goods-right .goods-other .goods-btn[data-v-76cd52ae]{width:3.75rem;height:1.5rem;line-height:1.5rem;text-align:center;color:#fff;background-color:#fe5e56;border-radius:.125rem}",""]),t.exports=e},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(){}}}}}]);