bztang-admin/addons/yun_shop/static/app/js/chunk-b5cceeba.28bdbd92.js

1 line
17 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b5cceeba"],{"3e0a":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"tabInitBox",class:t.className},[i("div",{domProps:{innerHTML:t._s(t.css)}}),i("div",{ref:"u_moretabcontrol",staticClass:"u_moretabcontrol",staticStyle:{display:"flex"}},[t.datas.show_first_tab?i("div",{staticClass:"leftConten leftIsfix",on:{touchmove:function(t){t.stopPropagation()}}},t._l(t.datas.list,(function(e,n){return i("div",{key:n,staticClass:"intoView",class:[t.minR==n?"intoShowView":""],on:{click:function(e){return t.leftTapBtn(n)}}},[e.image?i("img",{attrs:{src:e.image}}):i("div",{domProps:{innerHTML:t._s(t.sliceTxt(e.text))}})])})),0):t._e(),i("div",{ref:"searchBar",staticClass:"rightConten",class:[t.isFixed&&t.datas.show_first_tab?"isrigheOverY":""],style:{width:t.datas.show_first_tab?"":"100%"},on:{scroll:t.scrollEvent}},t._l(t.datas.list,(function(e,n){return i("div",{key:n,ref:"rightContenChild",refInFor:!0,staticClass:"rightContenChild"},[t.datas.is_show_first_tab_title?i("div",{staticClass:"featured nonefix"},[i("div",{staticClass:"beforeLine"}),t._v(" "+t._s(e.text)+" ")]):t._e(),t.datas.show_second_tab?i("div",{ref:"twoClass",refInFor:!0,class:[t.minR==n&&t.isFixed&&t.childPos?t.datas.show_first_tab?"twoIsfix classDivBox":"twoIsfixNoneOne classDivBox":t.datas.show_first_tab?"twoNonefix":"twoNonefixOne",t.minR==n&&3==t.fun.getPhoneEnv()&&t.childPos?"pcStyle":""]},[t._l(t.sliceMethod(t.allDatas[n],n,t.childPos,t.datas.show_first_tab,t.minR),(function(e,o){return i("div",{key:o,class:[e.tabSelectShow==e.id?"selectDivClass":"",t.datas.show_first_tab?"classDiv":"classDivNoneOne"],on:{click:function(e){return t.tapClassDiv(n,o)}}},[t._v(" "+t._s(e.title)+" ")])})),e.second_list.length>7&&t.datas.show_first_tab&&!t.childPos?i("div",{staticClass:"ChangeDiv",on:{click:function(e){return t.tapChange(n)}}},[t._v(" 换一换 "),i("i",{staticClass:"iconfont icon-fontclass-tequanzhekou"})]):t._e()],2):t._e(),t.datas.show_second_tab&&t.minR==n&&t.isFixed&&t.childPos?i("div",{ref:"twoClass",refInFor:!0,class:[(t.minR==n&&t.isFixed,t.datas.show_first_tab?"twoNonefix":"twoNonefixOne"),t.minR==n&&3==t.fun.getPhoneEnv()?"pcStyle":""],staticStyle:{opacity:"0"}},[t._l(t.allDatas[n],(function(e,o){return i("div",{key:o,class:[e.tabSelectShow==e.id?"selectDivClass":"",t.datas.show_first_tab?"classDiv":"classDivNoneOne"],on:{click:function(e){return t.tapClassDiv(n,o)}}},[t._v(" "+t._s(e.title)+" ")])})),e.second_list.length>7&&t.datas.show_first_tab?i("div",{staticClass:"ChangeDiv",on:{click:function(e){return t.tapChange(n)}}},[t._v(" 换一换 "),i("i",{staticClass:"iconfont icon-fontclass-tequanzhekou"})]):t._e()],2):t._e(),i("div",{staticClass:"lisView"},[t._l(t.infoDatas[n],(function(o,a){return[i(o.uikey,{key:a,tag:"component",attrs:{childComponent:"tab",leftShow:t.datas.show_first_tab,childStyle:t.datas,id:o.id+"-"+n+"-"+a,page_id:t.page_id,component_key:o.uikey,datas:o.remote_data,index:a},on:{imgLoad:t.imgLoad,formSubmit:function(i){return t.translateChild(e,o,n,a)}}})]}))],2)])})),0)])])},o=[],a=i("c7eb"),s=i("53ca"),c=i("1da1"),r=(i("99af"),i("d3b7"),i("159b"),i("fb6a"),i("e9c4"),i("ed76")),l=i("b4fd"),d=document.documentElement,f=document.body,h=function(){if(this.datas.preview_color){var t=this.datas,e=t.preview_color,i=t.first_tab_color,n=t.first_tab_bg_color,o=t.first_tab_active_color,a=t.first_tab_active_bg_color,s=t.first_tab_title_color,c=t.second_tab_color,r=t.second_tab_bg_color,l=t.second_tab_active_color,d=t.second_tab_active_bg_color,f=t.show_second_border,h=t.second_border_color;return"\n .component-".concat(this.id," .u_moretabcontrol{\n background-color: ").concat(e,";\n }\n .component-").concat(this.id," .classDivBox{\n background-color: ").concat(e,";\n }\n .component-").concat(this.id," .leftConten{\n color: ").concat(i,";\n background-color: ").concat(n,";\n }\n .component-").concat(this.id," .intoShowView{\n background-color:").concat(a,";\n color:").concat(o,";\n }\n .component-").concat(this.id," .featured{\n color:").concat(s,";\n }\n .component-").concat(this.id," .beforeLine{\n background-color:").concat(s,";\n }\n .component-").concat(this.id," .classDiv{\n color:").concat(c,";\n background-color:").concat(r,";\n border: ").concat(f?"solid 0.03rem"+h:"none",";\n }\n .component-").concat(this.id," .classDivNoneOne{\n color:").concat(c,";\n background-color:").concat(r,";\n border: ").concat(f?"solid 0.03rem"+h:"none",";\n }\n .component-").concat(this.id," .ChangeDiv{\n color:").concat(c,";\n background-color:").concat(r,";\n border: ").concat(f?"solid 0.03rem"+h:"none",";\n }\n .component-").concat(this.id," .selectDivClass{\n color:").concat(l,";\n background-color:").concat(d,";\n border: ").concat(f?"solid 0.03rem"+h:"none",";\n }\n ")}},p={props:["isBottom","lastIndex","index","page_id","id","datas","component_key","tabcontrol","isLast","plugin_active"],data:function(){return{noticeWidth:"375",minR:0,isFixed:!1,show_first_tab:!0,is_show_first_tab_title:!0,twosTabShow:!0,childPos:!1,infoDatas:[],allDatas:[],listHeight:[],recordTop:"",orallDatas:[]}},activated:function(){var t=this;this.$nextTick((function(){window.addEventListener("scroll",t.handleScroll),setTimeout((function(){t.getBoxHeight()}),300)}))},mounted:function(){var t=this,e=this.datas.list,i=[];e.forEach((function(e){e.second_list[0]?t.infoDatas.push(e.second_list[0].components):t.infoDatas.push([]),i.push(e.second_list)})),i.forEach((function(e,i){e.forEach((function(t,e){0==e&&(t.tabSelectShow=t.id)})),t.allDatas.push(e)})),this.show_first_tab=this.datas.show_first_tab,3==this.fun.getPhoneEnv()?this.noticeWidth="375":this.noticeWidth=document.body.clientWidth,this.$nextTick((function(){window.addEventListener("scroll",t.handleScroll),setTimeout((function(){t.getBoxHeight()}),300)}))},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},computed:{css:function(){return"<style>"+h.call(this)+"</style>"},className:function(){var t=["component-wrapper","component-".concat(this.id)];return t}},watch:{},methods:{sliceMethod:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(o==e){if(n&&i)return t.length<this.datas.list[this.minR].second_list.length?(this.$set(this.allDatas,e,this.datas.list[this.minR].second_list),this.allDatas):(this.allDatas[e]=t,t);if(t.length<=7)return t;var a=t.slice(0,7);return this.allDatas[e]=a,a}return t},sliceTxt:function(t){if(t.length>2){var e=t.slice(0,2),i=t.slice(2,t.length);return e+"</br>"+i}return t},touchmoveTap:function(t){},tapChange:function(t){var e=this;return Object(c["a"])(Object(a["a"])().mark((function i(){var n,o,c,r,l,d;return Object(a["a"])().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n=e.datas.list[t].second_list,o=e.allDatas[t],c=o.length-1,r=o[o.length-1].id,i.next=6,e.tapchangeOne(c,n,r);case 6:l=i.sent,d="object"==Object(s["a"])(l)?n.slice(l.ind,l.listinid):n.slice(c+1,l),e.allDatas[t]=d,e.$set(e.allDatas,t,d);case 10:case"end":return i.stop()}}),i)})))()},tapchangeOne:function(t,e,i){return new Promise((function(t,n){var o=e.length-1;e.forEach((function(e,n){if(e.id==i){if(n==o){var a={ind:0,listinid:7};t(a)}if(o-n>=8)t(o);else{var s={ind:n,listinid:o+1};t(s)}}}))}))},getKeyInd:function(t,e,i){return new Promise((function(e,n){var o=t[i];o.forEach((function(t,i){t.tabSelectShow==t.id&&e(t)}))}))},getAllKey:function(t,e){return new Promise((function(i,n){var o=e.second_list;o.forEach((function(e,n){e.id==t.id&&i(n)}))}))},translateChild:function(t,e,i,n){var o=this;return Object(c["a"])(Object(a["a"])().mark((function s(){var c,r,l;return Object(a["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return c={page:e.remote_data.list.current_page+1,decorate_id:o.page_id,component_id:o.id,component_key:o.component_key},a.next=3,o.getKeyInd(o.allDatas,e,i);case 3:return r=a.sent,a.next=6,o.getAllKey(r,t);case 6:l=a.sent,c.component_info={list_key:i,second_list_key:l,components_key:n},c.component_info=JSON.stringify(c.component_info),o.$route.query.store_id&&(c.store_id=o.$route.query.store_id),$http.get("home-page.get-decorate-page",c,"loading").then((function(t){if(1===t.result){var e=[];e=o.infoDatas[i][n].remote_data.list.data.concat(t.data.data),o.infoDatas[i][n].remote_data.list.data=e,o.infoDatas[i][n].remote_data.list.current_page=t.data.current_page,o.infoDatas[i][n].remote_data.list.last_page=t.data.last_page}}),(function(t){}));case 11:case"end":return a.stop()}}),s)})))()},tapClassGet:function(t,e,i,n){var o=this;return new Promise((function(i,a){$http.post("home-page.get-decorate-page",t,"").then((function(t){if(1===t.result){var a=t.data;o.infoDatas[e][n].remote_data.list=a,o.getBoxHeight(),o.leftTapBtn(e),i(!0)}})).catch((function(t){}))}))},tapClassDiv:function(t,e){var i=this;return Object(c["a"])(Object(a["a"])().mark((function n(){var o,s,c,r,l,d,f;return Object(a["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=i.allDatas[t][e].id,s=i.datas.list[t].second_list,n.next=4,i.tapClassDivGetind(s,o);case 4:c=n.sent,s.forEach((function(t){t.tabSelectShow="",t.id==o&&(t.tabSelectShow=t.id)})),i.$set(i.allDatas,t,i.allDatas[t]),r=c.info.components,l=c.key,i.$set(i.infoDatas,t,i.datas.list[t].second_list[l].components),d=0;case 11:if(!(d<r.length)){n.next=21;break}if("U_goods"!=r[d].uikey){n.next=18;break}return f={page:1,decorate_id:i.page_id,component_id:i.id,component_key:i.component_key},f.component_info={list_key:t,second_list_key:l,components_key:d},f.component_info=JSON.stringify(f.component_info),n.next=18,i.tapClassGet(f,t,e,d);case 18:d++,n.next=11;break;case 21:case"end":return n.stop()}}),n)})))()},tapClassDivGetind:function(t,e){return new Promise((function(i,n){t.forEach((function(t,n){if(t.id==e){var o={key:n,info:t};i(o)}}))}))},leftTapBtn:function(t){var e=this.$refs.u_moretabcontrol;this.isFixed?(this.minR=t,window.scrollTo(0,e.offsetTop+(this.listHeight[t]+5))):window.scrollTo(0,e.offsetTop+(this.listHeight[t]+5))},scrollEvent:function(t){var e=this;e.handleScroll()},getScrollTop:function(){var t=0;return d&&d.scrollTop?t=d.scrollTop:f&&(t=f.scrollTop),t},imgLoad:function(t){this.getBoxHeight()},getBoxHeight:function(){this.listHeight=[];var t=this.$refs.rightContenChild,e=0;this.listHeight.push(e);for(var i=0;i<t.length;i++){var n=t[i];e+=n.clientHeight,this.listHeight.push(e)}},handleScroll:function(){var t=this.$refs.u_moretabcontrol;t.offsetTop<=this.getScrollTop()?this.isFixed=!0:this.isFixed=!1,this.getBoxHeight(),this.minR=this.checkarr(this.getScrollTop(),this.listHeight)?this.checkarr(this.getScrollTop(),this.listHeight):0,this.changLeft(this.minR)},changLeft:function(t){if(this.recordTop!=t)this.recordTop=t;else if(this.recordTop==t)return;if(this.isFixed){var e=document.getElementsByClassName("intoView");if(this.minR<=4)return void document.getElementsByClassName("leftConten")[0].scrollTo({top:0,behavior:"smooth"});var i=e[this.minR-4].offsetTop;document.getElementsByClassName("leftConten")[0].scrollTo({top:i,behavior:"smooth"})}},showPos:function(t,e){var i=Math.abs(t[e].getBoundingClientRect().top),n=t[e].offsetHeight;return!(i<99)&&(i>=99&&i<=n-150||!(i>n-150)&&void 0)},checkarr:function(t,e){for(var i,n=this.$refs.u_moretabcontrol,o=0;o<e.length;o++)t>=e[o]+n.offsetTop&&t<e[o+1]+n.offsetTop&&(i=o);return t>=e[i]+n.offsetTop+50&&t<e[i+1]+n.offsetTop-100?this.childPos=!0:this.childPos=!1,i}},components:{U_goods:r["default"],U_simplegraph:l["default"]}},b=p,g=(i("be4d"),i("2877")),u=Object(g["a"])(b,n,o,!1,null,"4b4c30c2",null);e["default"]=u.exports},"62c9":function(t,e,i){var n=i("fdaa");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=i("499e").default;o("82679160",n,!0,{sourceMap:!1,shadowMode:!1})},be4d:function(t,e,i){"use strict";i("62c9")},fdaa:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,".intoShowView[data-v-4b4c30c2]{-webkit-animation:ident-data-v-4b4c30c2 .3s;animation:ident-data-v-4b4c30c2 .3s}@-webkit-keyframes ident-data-v-4b4c30c2{0%{opacity:0}50%{opacity:.8}to{opacity:1}}@keyframes ident-data-v-4b4c30c2{0%{opacity:0}50%{opacity:.8}to{opacity:1}}.pcStyle[data-v-4b4c30c2]{width:325px;margin:0 auto}.leftConten[data-v-4b4c30c2]{height:calc(100vh - 50px);padding-bottom:15vh;overflow-x:hidden}.leftConten[data-v-4b4c30c2] ::-webkit-scrollbar{display:none}.leftConten .intoViewActive[data-v-4b4c30c2]{position:absolute}.leftConten .intoView[data-v-4b4c30c2],.leftConten .intoViewActive[data-v-4b4c30c2]{z-index:999;width:57px;height:4.06rem;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;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-size:.75rem;margin-left:-1px}.leftConten .intoView[data-v-4b4c30c2]{position:relative}.leftConten .intoView img[data-v-4b4c30c2]{width:100%;display:block;font-size:0}.isrigheOverY[data-v-4b4c30c2]{width:85%!important}.leftIsfix[data-v-4b4c30c2]{overflow-y:auto;position:-webkit-sticky;position:sticky;top:0;left:0}.isfix[data-v-4b4c30c2]{position:fixed;top:0;z-index:9}.isfix[data-v-4b4c30c2],.nonefix[data-v-4b4c30c2],.twoIsfix[data-v-4b4c30c2]{-webkit-transition:.3s;transition:.3s}.twoIsfix[data-v-4b4c30c2]{position:-webkit-sticky;position:sticky;top:0;left:57px;right:0;z-index:9;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow-x:auto;padding-top:.3rem;padding-left:.3rem;z-index:1000}.twoIsfix .classDiv[data-v-4b4c30c2]{margin-right:.35rem}.twoIsfixNoneOne[data-v-4b4c30c2]{position:-webkit-sticky;position:sticky;top:0;left:0;right:0;z-index:9;overflow-x:auto;padding-top:.3rem;padding-left:.3rem}.twoIsfixNoneOne[data-v-4b4c30c2],.twoNonefix[data-v-4b4c30c2]{-webkit-transition:.3s;transition:.3s;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.twoNonefix[data-v-4b4c30c2]{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-right:.4rem}.twoNonefix .ChangeDiv[data-v-4b4c30c2],.twoNonefix .classDiv[data-v-4b4c30c2]{margin-left:.35rem}.twoNonefixOne[data-v-4b4c30c2]{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow-x:auto;padding:.35rem .35rem 0 .35rem}.isfixPadding[data-v-4b4c30c2]{padding-top:5rem}.isfixPaddingShowNo[data-v-4b4c30c2]{padding-top:2rem}.rightConten[data-v-4b4c30c2]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.rightConten .rightContenChild .featured[data-v-4b4c30c2]{width:100%;text-align:left;padding:.6rem 0;font-size:.88rem;padding-left:.35rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center}.rightConten .rightContenChild .beforeLine[data-v-4b4c30c2]{width:.13rem;height:1rem;margin-right:.3rem}.rightConten .rightContenChild .selectDivClass[data-v-4b4c30c2]{width:4.53rem;text-align:center;padding:.35rem 0;font-size:.75rem}.rightConten .rightContenChild .classDiv[data-v-4b4c30c2]{width:23%;height:2rem;margin-bottom:5px}.rightConten .rightContenChild .classDiv[data-v-4b4c30c2],.rightConten .rightContenChild .classDivNoneOne[data-v-4b4c30c2]{text-align:center;padding:.35rem 0;font-size:.75rem;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}.rightConten .rightContenChild .classDivNoneOne[data-v-4b4c30c2]{width:4.53rem;margin-bottom:.5rem;margin-right:1rem}.rightConten .rightContenChild .ChangeDiv[data-v-4b4c30c2]{width:4.53rem;height:2rem;text-align:center;padding:.35rem 0;font-size:.75rem;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.rightConten .rightContenChild .ChangeDiv .iconfont[data-v-4b4c30c2]{font-size:14px}.rightConten .lisView[data-v-4b4c30c2]{padding:.35rem;padding-top:0}.rightConten .lisView .lis[data-v-4b4c30c2]{height:3rem}.rightConten .lisView .lisGetMore[data-v-4b4c30c2]{width:16.88rem;height:2.2rem;border-radius:.25rem;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;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-size:.81rem;color:#fff;margin:0 auto}.rightConten .maxBox[data-v-4b4c30c2]{height:5.3rem;opacity:0}",""]),t.exports=e}}]);