微信公众号管理后台

32.8de4ef914bd27effa1fd.js 5.6KB

1
  1. webpackJsonp([32],{"+J3x":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={data:function(){return{checkList:[],configList:[],keyword:"",time:"",editTime:!1,obj:{},loadingTime:!1,total:1,page:1,page_size:20}},created:function(){this.init()},methods:{init:function(t){var e=this;this.page=t,this.loadingTime=!0,this.$axios.get(this.URL.BASEURL+this.URL.configList,{params:{keyword:this.keyword,page:this.page,page_size:this.page_size,team_id:JSON.parse(this.$cookieStore.getCookie("teamObj")).id}}).then(function(t){e.loadingTime=!1,(t=t.data)&&0==t.errno?(e.configList=t.rst.data,e.total=t.rst.pageInfo.total,e.page_size=Number(t.rst.pageInfo.size)):e.$message({message:t.err,type:"warning"})}).catch(function(t){console.log(t),e.loadingTime=!1})},toEdit:function(){var t=this;this.$axios.post(this.URL.BASEURL+this.URL.setConfig,{app_id:this.checkList.join(","),name:"定时时间",value:this.time,key:"MASS_MSG_SEND_TIME"}).then(function(e){t.loadingTime=!1,(e=e.data)&&0==e.errno?(t.$message({message:"成功设置定时时间",type:"success"}),t.init()):t.$message({message:e.err,type:"warning"})}).catch(function(e){console.log(e),t.loadingTime=!1}),this.editTime=!1,this.$cookieStore.setCookie("delayTime",this.time)},toCheck:function(){0==this.checkList.length?this.$message({message:"请选择公众号",type:"warning"}):this.editTime=!0},handleSelectionChange:function(t){var e=this;this.checkList=[],t.forEach(function(t){e.checkList.push(t.app_id)})},handleCurrentChange:function(t){this.init(t)}},watch:{time:function(){}}},a={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loadingTime,expression:"loadingTime"}],staticClass:"setTime",staticStyle:{"overflow-y":"scroll",height:"100%"},attrs:{"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading"}},[n("div",{staticClass:"mainBox"},[n("wx-item"),t._v(" "),n("div",{staticClass:"searchCon",staticStyle:{"text-align":"right"}},[n("el-input",{staticClass:"input",staticStyle:{width:"300px"},attrs:{"prefix-icon":"el-icon-search",type:"text",placeholder:"请输入公众号名称"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.init(1)}},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}}),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.init(1)}}},[t._v("搜索")])],1),t._v(" "),n("div",{staticClass:"mainBorder"},[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.configList,border:""},on:{"selection-change":t.handleSelectionChange}},[n("template",{slot:"empty"},[n("img",{staticClass:"pic",attrs:{src:i("z3Om"),alt:""}}),t._v(" "),n("span",[t._v("暂无数据")])]),t._v(" "),n("el-table-column",{attrs:{type:"selection",align:"center",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{prop:"nickname",align:"center",label:"公众号名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"info"},[n("img",{staticClass:"icon",attrs:{src:e.row.head_img,alt:""}}),t._v(" "),n("span",{staticClass:"name"},[t._v(t._s(e.row.nickname?e.row.nickname:"-"))])])]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"nickname",align:"center",label:"公众号类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(2==e.row.service_type?"服务号":"订阅号"))])]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"nickname",align:"center",label:"公众号认证类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(0==e.row.verify_type||1==e.row.verify_type?"已认证":"未认证"))])]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"nickname",align:"center",label:"定时时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.mass_msg_send_time?e.row.mass_msg_send_time:"-"))])]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"nickname",align:"center",label:"分组"}}),t._v(" "),n("el-table-column",{attrs:{prop:"nickname",align:"center",width:"150",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(i){t.checkList=[].concat(e.row.app_id),t.editTime=!0,t.obj=e.$index}}},[t._v("\n 更改时间\n ")])]}}])})],2),t._v(" "),t.configList.length>0?n("div",{staticClass:"bottom",staticStyle:{position:"relative"}},[n("div",{staticClass:"leftBtn"},[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.toCheck}},[t._v("批量更改")])],1),t._v(" "),n("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._e()],1)],1),t._v(" "),n("my-dialog",{attrs:{visible:t.editTime,width:"30%",minWidth:"500px"},on:{"update:visible":function(e){t.editTime=e},close:function(e){t.editTime=!1}}},[n("div",{staticClass:"toast"},[n("h3",[t._v("更改定时时间")]),t._v(" "),n("div",{staticClass:"toastMain"},[n("label",{attrs:{for:"article"}},[t._v("定时时间:")]),t._v(" "),n("el-time-select",{attrs:{size:"mini","picker-options":{start:"00:00",step:"00:30",end:"24:00"},placeholder:"任意时间点"},model:{value:t.time,callback:function(e){t.time=e},expression:"time"}})],1),t._v(" "),n("div",{staticClass:"toastBtn"},[n("el-button",{attrs:{size:"mini"},on:{click:function(e){t.editTime=!1}}},[t._v("取消")]),t._v(" "),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.toEdit}},[t._v("确定")])],1)])])],1)},staticRenderFns:[]};var s=i("VU/8")(n,a,!1,function(t){i("xncr")},"data-v-7f1a9ac6",null);e.default=s.exports},xncr:function(t,e){}});