1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2f17c462"],{"253a":function(t,e,i){t.exports=i.p+"static/app/img/img_default.a608a24a.png"},"67fa":function(t,e,i){var o=i("e586");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var s=i("499e").default;s("6442e653",o,!0,{sourceMap:!1,shadowMode:!1})},"9e7a3":function(t,e,i){"use strict";i("f321")},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var o=document.documentElement,s=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 o&&o.scrollTop?t=o.scrollTop:s&&(t=s.scrollTop),t},getClientHeight:function(){var t=0;return t=s.clientHeight&&o.clientHeight?Math.min(s.clientHeight,o.clientHeight):Math.max(s.clientHeight,o.clientHeight),t},getScrollHeight:function(){return Math.max(s.scrollHeight,o.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(){}}}},cf77:function(t,e,i){"use strict";i("67fa")},dec5:function(t,e,i){t.exports=i.p+"static/app/img/jd-sprites.fb1e8d8b.png"},e586:function(t,e,i){var o=i("24fb");e=o(!1),e.push([t.i,"ul[data-v-793233e1]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}ul[data-v-793233e1],ul li[data-v-793233e1]{padding:0}ul li[data-v-793233e1]{list-style:none;width:20%;float:left;margin:0;margin-bottom:.625rem}ul li a[data-v-793233e1]{color:#2b2f33}ul li .image[data-v-793233e1]{height:11vw;overflow:hidden}ul li img[data-v-793233e1]{width:50%;vertical-align:middle;height:90%;border-radius:50%}ul li p[data-v-793233e1]{margin:0;font-size:12px;line-height:1.125rem;max-height:2.25rem;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:0 .5rem;display:block}ul .pcStyle .image[data-v-793233e1]{height:2.625rem}.sw_list[data-v-793233e1]{padding-top:.6rem}.sw_list_6[data-v-793233e1]{height:6rem}.sw_list_12[data-v-793233e1]{height:12rem}.sw_list_0[data-v-793233e1]{height:0}@media (max-width:400px){.sw_list_12[data-v-793233e1]{height:12rem}}",""]),t.exports=e},f321:function(t,e,i){var o=i("f36d");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var s=i("499e").default;s("434b13ab",o,!0,{sourceMap:!1,shadowMode:!1})},f36d:function(t,e,i){var o=i("24fb"),s=i("1de5"),a=i("dec5");e=o(!1);var r=s(a);e.push([t.i,'#tiktok-cps .wrapper{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;height:100%}#tiktok-cps .dialog-title{text-align:center;font-size:1.5rem}#tiktok-cps .link_dy{margin-top:1.0625rem;margin-bottom:1.25rem;overflow:hidden;word-break:break-all;text-align:left;color:#999;font-size:.75rem}#tiktok-cps .close{position:absolute;right:5%;top:5%}#tiktok-cps .block{position:relative;width:17.5rem;border-radius:.25rem;background-color:#fff;padding:1.25rem .625rem}#tiktok-cps .ment{background:#fff;margin-bottom:.5rem}#tiktok-cps .current_category{color:var(--themeBaseColor)}#tiktok-cps .category{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:.75rem;overflow-x:auto}#tiktok-cps .category span{margin-right:1.5625rem;font-size:.8125rem;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}#tiktok-cps .category::-webkit-scrollbar{display:none}#tiktok-cps .list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:space-evenly;-webkit-justify-content:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly;background:#f1f1f1;padding-bottom:3.125rem}#tiktok-cps .grid-content:after{content:"";display:inline-block;width:.5rem;height:.625rem;background:url('+r+') no-repeat;background-size:12.5rem 12.5rem;background-position:-10.625rem -1.875rem;margin-left:.25rem}#tiktok-cps .grid-content.down,#tiktok-cps .grid-content.up{color:#f15353}#tiktok-cps .grid-content.up:after{background-position:-10.625rem -.9375rem}#tiktok-cps .grid-content.down:after{background-position:-10.625rem 0}#tiktok-cps .p-4{padding:.1rem .25rem}#tiktok-cps .item-center{width:100%;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;padding:0 .5rem}#tiktok-cps .img{width:100%;height:10.5938rem}#tiktok-cps .flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#tiktok-cps .fs-10{font-size:.625rem}#tiktok-cps .between{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#tiktok-cps .sort{position:relative}#tiktok-cps .sort-item{position:absolute;right:-20px;top:0;bottom:0;width:20px}#tiktok-cps .sort-item:after{content:"";left:0;top:0;position:absolute;border:5px solid #000;border-top-color:transparent;border-bottom-color:#ccc;border-left-color:transparent;border-right-color:transparent}#tiktok-cps .item-bottom{width:100%;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;padding:.25rem .5rem .9rem}#tiktok-cps .ml-4{margin-left:.25rem}#tiktok-cps .line-through{text-decoration:line-through}#tiktok-cps .ml-12{margin-left:.75rem}#tiktok-cps .c-999{color:#999}#tiktok-cps .c-FF6238{color:#ff6238}#tiktok-cps .fs-12{font-size:.75rem}#tiktok-cps .make-money{border-radius:.25rem;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;color:#ff7b05;border:1px solid #ff7b05}#tiktok-cps .make-money .line{position:relative}#tiktok-cps .make-money .line:after{content:"";position:absolute;top:0;bottom:0;right:0;width:.0313rem;height:100%;background:#ff7b05}#tiktok-cps .list-item{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-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:46%;background:#fff;border-radius:.5rem;overflow:hidden;margin:.75rem .375rem 0}#tiktok-cps .tik-tok-text{color:#fff;background:#000;padding:0 5px;border-radius:5px;margin-right:5px;font-size:.75rem}#tiktok-cps .title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;text-align:left;padding:.1875rem .5rem .375rem}#tiktok-cps .buy{color:#999;font-size:.75rem}#tiktok-cps .active{color:#ef5452}#tiktok-cps .content{background:#fff}#tiktok-cps .tab{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-evenly;-webkit-justify-content:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly;padding-top:10px;padding-bottom:12px}#tiktok-cps .van-search{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}#tiktok-cps .top-right{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin:10px 15px;padding-top:10px}#tiktok-cps .top,#tiktok-cps .top-right{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}#tiktok-cps .top{background:#fff}',""]),t.exports=e},ff22:function(t,e,i){"use strict";i.r(e);var o,s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"tiktok-cps"}},[i("c-title",{attrs:{text:"抖音精选"}}),t.show_flag?i("div",{staticClass:"top"},[i("van-search",{attrs:{shape:"round",disabled:"",placeholder:"输入关键词/口令搜索"},on:{click:t.link}})],1):t._e(),i("van-swipe",{staticClass:"my-swipe",attrs:{autoplay:3e3,"indicator-color":"white"}},t._l(t.CarouseList,(function(e){return i("van-swipe-item",{key:e.id},[i("img",{staticStyle:{width:"100%"},attrs:{src:e.pic},on:{click:function(i){return t.link(e.url)}}})])})),1),t.button_group&&0!==t.button_group.length?i("div",{staticClass:"ment"},[i("c-ment",{attrs:{datas:t.fun.chunk(t.button_group,10)},on:{open_dialog:t.open_dialog}})],1):t._e(),i("div",{staticClass:"content"},[i("div",{staticClass:"nav"},[t.category_list&&0!==t.category_list.length?i("div",{staticClass:"category"},t._l(t.category_list,(function(e,o){return i("span",{class:{current_category:t.currrent_category_index==o},on:{click:function(i){return t.category_handle(e.cate_id,o)}}},[t._v(t._s(e.name))])})),0):t._e(),t.show_flag?i("div",{staticClass:"tab"},[i("span",{class:{active:1==t.choose_index},on:{click:function(e){return t.choose(1)}}},[t._v("综合")]),i("span",{staticClass:"grid-content",class:{active:2==t.choose_index,up:1==t.sort.up&&2==t.choose_index,down:1==t.sort.down&&2==t.choose_index},on:{click:function(e){return t.choose(2)}}},[t._v("销量")]),i("span",{staticClass:"grid-content",class:{active:3==t.choose_index,up:1==t.sort.up&&3==t.choose_index,down:1==t.sort.down&&3==t.choose_index},on:{click:function(e){return t.choose(3)}}},[t._v("价格")])]):t._e()]),i("div",{staticClass:"list"},t._l(t.list,(function(e){return i("div",{key:e.id,staticClass:"list-item",on:{click:function(i){return t.link_goods(e)}}},[i("div",{staticClass:"img"},[i("van-image",{attrs:{width:"100%",height:"100%",src:e.cover}})],1),i("div",{staticClass:"title"},[i("span",[i("span",{staticClass:"tik-tok-text"},[t._v("抖音")]),i("span",[t._v(t._s(e.title))])])]),i("div",{staticClass:"item-center"},[e.share_reward?i("div",{staticClass:"make-money"},[i("span",{staticClass:"p-4 fs-10 line"},[t._v("赚")]),i("span",{staticClass:"p-4 fs-10"},[t._v(t._s(e.share_reward))])]):t._e(),i("div",{staticClass:"buy"},[t._v(t._s(e.sales))])]),i("div",{staticClass:"item-bottom"},[i("div",{staticClass:"c-FF6238",staticStyle:{"font-size":"0.75rem"}},[t._v(" 到手价 "),i("span",{staticClass:"ml-4",staticStyle:{"font-size":"0.875rem"}},[t._v(t._s(t.$i18n.t("money"))+t._s(e.coupon_price))])]),i("div",{staticClass:"fs-12 c-999 line-through ml-12"},[t._v(t._s(t.$i18n.t("money"))+t._s(e.price))])])])})),0)]),i("van-overlay",{attrs:{show:t.show_dy_popup},on:{click:function(e){t.show_dy_popup=!1}}},[i("div",{staticClass:"wrapper",on:{click:function(t){t.stopPropagation()}}},[i("div",{staticClass:"block"},[i("div",{staticClass:"dialog-title"},[t._v(t._s(t.activity_name))]),i("div",{staticClass:"close",on:{click:function(e){t.show_dy_popup=!1}}},[i("van-icon",{attrs:{name:"cross"}})],1),i("p",{staticClass:"link_dy"},[t._v(t._s(t.dy_password))]),i("div",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:t.dy_password,expression:"dy_password",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopy,expression:"onCopy",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:t.onError,expression:"onError",arg:"error"}],staticStyle:{position:"relative",bottom:"5%",left:"0",right:"0"}},[i("van-button",{staticStyle:{width:"100%",border:"none"},attrs:{color:"#EF3532"}},[t._v("一键复制,打开抖音APP下单")])],1)])])])],1)},a=[],r=i("ade3"),n=i("c7eb"),c=i("1da1"),l=(i("e7e5"),i("d399")),p=(i("4056"),i("44bf")),d=(i("b0c0"),i("e9c4"),i("14d9"),i("4e82"),i("99af"),i("a9e3"),i("ac0d")),u=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("van-swipe",{staticClass:"sw_list",class:{sw_list_6:null!=t.datas&&t.datas.length>0&&t.datas[0].length<=5,sw_list_12:null!=t.datas&&t.datas.length>0&&t.datas[0].length>5,sw_list_0:0==t.datas.length},attrs:{autoplay:0,"indicator-color":"#f15353",width:3==t.fun.getPhoneEnv()?375:t.clientWidths}},t._l(t.datas,(function(e,s){return o("van-swipe-item",{key:s},[o("ul",t._l(e,(function(e){return o("li",{key:e.id,class:[3==t.fun.getPhoneEnv()?"pcStyle":""],staticStyle:{float:"left","flex-shrink":"0"}},[o("div",{on:{click:function(i){return i.stopPropagation(),t.toUrl(e)}}},[e.icon?o("div",{staticClass:"image"},[o("img",{attrs:{src:e.icon}})]):t._e(),e.icon?t._e():o("div",{staticClass:"image"},[o("img",{attrs:{src:i("253a")}})]),o("p",{staticClass:"text"},[t._v(t._s(e.name))])])])})),0)])})),1)},f=[],k={data:function(){return{clientWidths:""}},props:["datas"],mounted:function(){this.clientWidths=document.body.clientWidth},methods:{toUrl:function(t){if(t.url&&(3==t.type||1==t.type)){var e=this.fun.deeplinkURL(t.url)+"t="+Math.random();window.location.href=e}if(2==t.type&&this.$router.push(this.fun.getUrl("TikTokSearch",{cate_id:t.cate_id})),4==t.type){var i=encodeURI(t.url);this.$router.push(this.fun.getUrl("TikTokSearch",{title:i}))}5!=t.type&&6!=t.type||this.$emit("open_dialog",t)}}},h=k,g=(i("cf77"),i("2877")),m=Object(g["a"])(h,u,f,!1,null,"793233e1",null),b=m.exports,w={mixins:[d["a"]],components:{VanImage:p["a"],cMent:b},data:function(){return{activity_name:"",dy_password:"",show_dy_popup:!1,choose_index:1,SearchValue:"",CarouseList:[],list:[],current_page:1,last_page:1,isLoadMore:!0,order_type:0,search_type:0,cate_id:"",currrent_category_index:0,sort:{up:0,down:0},category_list:[],button_group:[],show_flag:!0}},activated:function(){this.show_flag=!0,this.isLoadMore=!0,this.cate_id="",this.$route.query.album_id&&(this.show_flag=!1),this.getCarouse(),this.getCategory(),this.buttonGroup(),this.getData({page:1,search_type:this.search_type,order_type:this.order_type})},methods:(o={onCopy:function(){Object(l["a"])({message:"复制成功",position:"bottom",duration:1e3}),this.show_dy_popup=!1},onError:function(){Object(l["a"])({message:"复制失败",position:"bottom",duration:1e3})},open_dialog:function(t){var e=this;this.activity_name=t.name,$http.get("plugin.tiktok-cps.api.goods.aggregate-h5",{material_id:t.material_id}).then((function(t){if(t.result)if(e.dy_password=t.data.command,e.fun.isCPS()){var i={dy_deeplink:t.data.deeplink};"ios"===e.fun.isIosOrAndroid()?IOStoTikTok(JSON.stringify(i)):androidToTikTok(t.data.deeplink)}else e.show_dy_popup=!0;else e.$toast(t.msg)}))},buttonGroup:function(){var t=this;return Object(c["a"])(Object(n["a"])().mark((function e(){var i,o,s,a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,$http.get("plugin.tiktok-cps.api.goods.button-group");case 2:if(i=e.sent,o=i.data,s=i.msg,a=i.result,0!=a){e.next=8;break}return e.abrupt("return",t.$toast(s));case 8:t.button_group=o;case 9:case"end":return e.stop()}}),e)})))()},getCategory:function(){var t=this;return Object(c["a"])(Object(n["a"])().mark((function e(){var i,o,s,a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,$http.get("plugin.tiktok-cps.api.goods.good-recommend-cate");case 2:if(i=e.sent,o=i.data,s=i.msg,a=i.result,0!=a){e.next=8;break}return e.abrupt("return",t.$toast(s));case 8:t.category_list=o||[];case 9:case"end":return e.stop()}}),e)})))()},category_handle:function(t,e){var i=this;return Object(c["a"])(Object(n["a"])().mark((function o(){return Object(n["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:i.currrent_category_index=e,i.cate_id=t,i.getData({page:1,search_type:i.search_type,order_type:i.order_type,cate_id:t});case 3:case"end":return o.stop()}}),o)})))()},link_goods:function(t){var e=t.product_id;this.$router.push(this.fun.getUrl("TikTokDetail",{id:e},{}))},link:function(t){window.open(t,"_blank")},choose:function(t){this.choose_index=t;var e=0;1!==t?0==this.sort.up&&0==this.sort.down?this.sort.up=1:1==this.sort.up?(this.sort.down=1,this.sort.up=0):1==this.sort.down&&(this.sort.up=1,this.sort.down=0):1==this.choose_index&&(this.sort.up=0,this.sort.down=0),1==this.sort.down&&(e=1);var i=t-1;this.search_type=i,this.order_type=e,this.getData({page:1,search_type:i,order_type:e,cate_id:this.cate_id})}},Object(r["a"])(o,"link",(function(){this.$router.push(this.fun.getUrl("TikTokSearch"))})),Object(r["a"])(o,"getData",(function(t){var e=this;return Object(c["a"])(Object(n["a"])().mark((function i(){var o,s,a,r,c,l,p;return Object(n["a"])().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return o="plugin.tiktok-cps.api.goods.good-list",e.show_flag||(s=t,a=s.page,t={page:a,album_id:e.$route.query.album_id},o="plugin.tiktok-cps.api.goods.album-good-list"),i.next=4,$http.get(o,t);case 4:if(r=i.sent,c=r.result,l=r.msg,p=r.data,0!=c){i.next=10;break}return i.abrupt("return",e.$toast(l));case 10:1==t.page?e.list=p.products||[]:t.page>1&&(e.list=e.list.concat(p.products)),e.current_page=Number(p.current_page),e.last_page=p.last_page,e.isLoadMore=!0;case 14:case"end":return i.stop()}}),i)})))()})),Object(r["a"])(o,"getCarouse",(function(){var t=this;return Object(c["a"])(Object(n["a"])().mark((function e(){var i,o,s,a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,$http.get("plugin.tiktok-cps.api.rotation.rotation-list");case 2:if(i=e.sent,o=i.result,s=i.msg,a=i.data,0!=o){e.next=8;break}return e.abrupt("return",t.$toast(s));case 8:t.CarouseList=a||[];case 9:case"end":return e.stop()}}),e)})))()})),Object(r["a"])(o,"getMoreData",(function(){if(!(this.current_page>=this.last_page)){this.isLoadMore=!1;var t=this.current_page+1;this.getData({page:t,order_type:this.order_type,search_type:this.search_type,cate_id:this.cate_id})}})),o)},_=w,y=(i("9e7a3"),Object(g["a"])(_,s,a,!1,null,null,null));e["default"]=y.exports}}]); |