问星数据dist打包,线上使用; 源码在bigData仓库

43.1e3f52624f3c01a2ce9a.js 10KB

1
  1. webpackJsonp([43],{cOdM:function(t,e){},mpC6:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o={data:function(){return{isLogin:!1,au_nums:0,loading:!1,noneDone:!1,hasAuno:!1,infoList:[],page:1,total:0,page_size:20,search_key_word:"",timeRange:[{id:1,name:"昨日",start_time:this.getDay(-1,!1),end_time:this.getDay(-1,!1)},{id:7,name:"近7天",start_time:this.getDay(-7,!1),end_time:this.getDay(-1,!1)},{id:30,name:"近30天",start_time:this.getDay(-30,!1),end_time:this.getDay(-1,!1)},{id:90,name:"近90天",start_time:this.getDay(-90,!1),end_time:this.getDay(-1,!1)}],day:7,sort_type:1,dataType:"",typeList:[]}},created:function(){this.isLogin=this.$cookie.getCookie("isLogin"),this.getType(),this.init(1)},methods:{toDetail:function(t){if(t){var e=this.$router.resolve({path:"goodsDetail/"+t});window.open(e.href,"_blank")}else this.$message({message:"该商品暂无详情,敬请期待!",type:"warning"})},sortEvent:function(t){this.sort_type==t||(this.sort_type=t,this.init(1))},init:function(t,e){var s=this;if(this.$message.closeAll(),this.hasAuno||this.noneDone)return this.$cookie.getCookie("isLogin")?(this.$message.closeAll(),void this.$message({message:"当前等级暂不支持使用该功能,请升级会员后操作",type:"warning"})):void this.$Login({visible:!0});var o=this.page_size;if("dataExport"==e){var n=this.$loading({lock:!0,text:"加载中...",spinner:"el-icon-loading",background:"rgba(255, 2550, 255, 0.7)"});o=100}else this.infoList=[],this.loading=!0,this.page=t;this.$axios.get(this.URL.BASEURL+this.URL.dou_videoGoodsCounts,{params:{title:this.search_key_word,top_cid:this.dataType,page:t,pagesize:o,day:this.day,order:this.sort_type,is_export:"dataExport"==e?1:""}}).then(function(t){t=t.data;if(s.loading=!1,"dataExport"==e&&n.close(),4403==t.auno?(s.au_nums=t.au_nums,s.hasAuno=!0):s.hasAuno=!1,s.noneDone=4003==t.errno||4001==t.errno,t&&0==t.errno){var o=t.rst.data;"dataExport"==e?s.exportToExcel(o):(s.infoList=o,s.total=Number(t.rst.pageInfo.total))}else 4003!=t.errno&&4001!=t.errno&&s.$message({message:t.err,type:"warning"})}).catch(function(t){"dataExport"==e&&n.close(),s.loading=!1})},handleCurrentChange:function(t){this.init(t)},getType:function(){var t=this;this.$axios({url:this.URL.BASEURL+this.URL.topCategory,method:"get"}).then(function(e){(e=e.data)&&0==e.errno?t.typeList=e.rst:t.$message({message:e.err,type:"warning"})})},getMoreList:function(){var t=this;this.$exportNumber({type_id:2,cb:function(){t.init(1,"dataExport")}})},exportToExcel:function(t){var e=t,s=[];for(var o in e)s.push({title:e[o].title,cate_name:e[o].cate_name,user_count:e[o].user_count,video_count:e[o].video_count,share_count:e[o].share_count,like_count:e[o].like_count,comment_count:e[o].comment_count,goods_img_url:e[o].goods_img_url});for(var n="商品名称,分类,推广达人数,关联视频数,视频转发量,视频点赞量,视频评论量,商品图片\n",i=0;i<s.length;i++){for(var a in s[i])n+=s[i][a]+",";n+="\n"}var c="data:text/csv;charset=utf-8,\ufeff"+encodeURIComponent(n),l=document.createElement("a");l.href=c,l.download="抖音商品广告.csv",document.body.appendChild(l),l.click(),document.body.removeChild(l)},followWhEvent:function(t,e){var s=this;this.$exportNumber({type_id:8,cb:function(){s.$axios.get(s.URL.BASEURL+s.URL.dou_followProduct,{params:{product_id:t.goods_id,channel:t.platform_label}}).then(function(t){(t=t.data)&&0==t.errno?1==t.rst.isFollowed?s.infoList[e].if_focus=!0:s.infoList[e].if_focus=!1:s.$message({message:t.err,type:"warning"})}).catch(function(t){})}})}},watch:{}},n={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading"}},[o("div",{staticClass:"search_condition"},[o("div",{staticClass:"common_search_box clear"},[o("img",{staticClass:"icon",attrs:{src:s("AJUD"),alt:""}}),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.search_key_word,expression:"search_key_word"}],staticClass:"search_input",attrs:{placeholder:"请输入商品名称进行查询"},domProps:{value:t.search_key_word},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.init(1)},input:function(e){e.target.composing||(t.search_key_word=e.target.value)}}}),t._v(" "),t.search_key_word?o("i",{staticClass:"clearText el-icon-circle-close",on:{click:function(e){t.search_key_word="",t.init(1)}}}):t._e(),t._v(" "),o("img",{staticClass:"search_icon",attrs:{src:s("JWdz"),alt:""},on:{click:function(e){return t.init(1)}}})]),t._v(" "),o("div",{staticClass:"common_screen clear"},[o("div",{staticClass:"common_screen_title"},[t._v("分类")]),t._v(" "),o("ul",{staticClass:"common_screen_info"},[o("li",{class:""===t.dataType?"common_screen_active":"",on:{click:function(e){t.dataType="",t.init(1)}}},[t._v("不限")]),t._v(" "),t._l(t.typeList,function(e,s){return o("li",{key:"goodsType"+s,class:t.dataType===e.id?"common_screen_active":"",on:{click:function(s){t.dataType=e.id,t.init(1)}}},[t._v(t._s(e.cate_name))])})],2)]),t._v(" "),o("div",{staticClass:"common_screen clear"},[o("div",{staticClass:"common_screen_title"},[t._v("时间")]),t._v(" "),o("ul",{staticClass:"common_select_time clear",staticStyle:{float:"left"}},t._l(t.timeRange,function(e,s){return o("li",{key:s,class:["common_select_time_item",t.day==e.id?"common_select_time_item_active":""],on:{click:function(s){t.day=e.id,t.init(1)}}},[t._v(t._s(e.name))])}),0),t._v(" "),o("ul",{staticClass:"common_select_time clear"},[t.total>0&&!t.noneDone?o("li",{staticClass:"common_select_info common_data_export",on:{click:t.getMoreList}},[t._v("导出")]):t._e()])])]),t._v(" "),t.noneDone?t._e():o("div",[o("div",{staticClass:"table_div"},[o("table",[o("tr",[o("td",{staticStyle:{"text-align":"left","padding-left":"92px"}},[t._v("应用名称")]),t._v(" "),o("td",[t._v("分类")]),t._v(" "),o("td",[o("div",{staticClass:"th_title",class:["common_select_td",5==t.sort_type?"common_selected_down":""],on:{click:function(e){return t.sortEvent(5)}}},[t._v("\n 关联达人\n "),t._m(0)])]),t._v(" "),o("td",[o("div",{staticClass:"th_title",class:["common_select_td",1==t.sort_type?"common_selected_down":""],on:{click:function(e){return t.sortEvent(1)}}},[t._v("\n 关联视频\n "),t._m(1)])]),t._v(" "),o("td",[o("div",{staticClass:"th_title",class:["common_select_td",2==t.sort_type?"common_selected_down":""],on:{click:function(e){return t.sortEvent(2)}}},[t._v("\n 视频分享量\n "),t._m(2)])]),t._v(" "),o("td",[o("div",{staticClass:"th_title",class:["common_select_td",4==t.sort_type?"common_selected_down":""],on:{click:function(e){return t.sortEvent(4)}}},[t._v("\n 视频点赞量\n "),t._m(3)])]),t._v(" "),o("td",[o("div",{staticClass:"th_title",class:["common_select_td",3==t.sort_type?"common_selected_down":""],on:{click:function(e){return t.sortEvent(3)}}},[t._v("\n 视频评论量\n "),t._m(4)])]),t._v(" "),o("td",[t._v("收藏")])]),t._v(" "),t._l(t.infoList,function(e,n){return o("tr",{key:n,staticStyle:{cursor:"pointer"},on:{click:function(s){return t.toDetail(e.goods_id)}}},[o("td",{staticStyle:{width:"280px"}},[o("div",{staticClass:"videoBox"},[o("div",{staticClass:"videoImg"},[o("img",{attrs:{src:e.goods_img_url,alt:""}})]),t._v(" "),o("div",{staticClass:"videoInfo"},[o("p",{staticClass:"videoTitle"},[t._v(t._s(e.title?e.title:"-"))])])])]),t._v(" "),o("td",{staticStyle:{"font-size":"14px"}},[t._v(t._s(e.cate_name?e.cate_name:"-"))]),t._v(" "),o("td",{class:5==t.sort_type?"common_selected":""},[t._v(t._s(e.user_count||0==e.user_count?t.$NumberHandle(e.user_count):"-"))]),t._v(" "),o("td",{class:1==t.sort_type?"common_selected":""},[t._v(t._s(e.video_count||0==e.video_count?t.$NumberHandle(e.video_count):"-"))]),t._v(" "),o("td",{class:2==t.sort_type?"common_selected":""},[t._v(t._s(e.share_count||0==e.share_count?t.$NumberHandle(e.share_count):"-"))]),t._v(" "),o("td",{class:4==t.sort_type?"common_selected":""},[t._v(t._s(e.like_count||0==e.like_count?t.$NumberHandle(e.like_count):"-"))]),t._v(" "),o("td",{class:3==t.sort_type?"common_selected":""},[t._v(t._s(e.comment_count||0==e.comment_count?t.$NumberHandle(e.comment_count):"-"))]),t._v(" "),o("td",[o("div",{on:{click:function(s){return s.stopPropagation(),t.followWhEvent(e,n)}}},[o("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.if_focus?"取消关注":"关注商品",placement:"top-start"}},[e.if_focus?o("img",{staticClass:"followIcon",attrs:{src:s("fXRA"),alt:""}}):o("img",{staticClass:"followIcon",attrs:{src:s("OSUF"),alt:""}})])],1)])])})],2)]),t._v(" "),t.loading||0!=t.infoList.length?t._e():o("div",{staticClass:"noHaveDate"},[t._v("暂无数据")])]),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:!t.hasAuno&&0!=t.total||t.hasAuno&&t.au_nums<=t.total&&t.page>1,expression:"(!hasAuno&&total!=0)||(hasAuno&&au_nums<=total&&page>1)"}],staticClass:"bottom"},[o("span",{staticClass:"total"},[t._v("共"+t._s(t.total)+"条结果")]),t._v(" "),o("el-pagination",{attrs:{background:"","current-page":t.page,"page-size":t.page_size,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),t._v(" "),t.infoList.length>0&&!t.noneDone&&t.hasAuno&&!t.loading?o("list-permission",{attrs:{au_nums:t.au_nums}}):t._e(),t._v(" "),!t.hasAuno&&t.noneDone?o("nopermission"):t._e()],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"table_sortable table_sortable_single"},[e("i",{staticClass:"el-icon-caret-bottom"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"table_sortable table_sortable_single"},[e("i",{staticClass:"el-icon-caret-bottom"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"table_sortable table_sortable_single"},[e("i",{staticClass:"el-icon-caret-bottom"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"table_sortable table_sortable_single"},[e("i",{staticClass:"el-icon-caret-bottom"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"table_sortable table_sortable_single"},[e("i",{staticClass:"el-icon-caret-bottom"})])}]};var i=s("C7Lr")(o,n,!1,function(t){s("cOdM")},"data-v-64f8da08",null);e.default=i.exports}});