| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-ab3ecd10"],{"3d23":function(t,e,n){"use strict";var r=n("7733");n.n(r).a},7733:function(t,e,n){},d99c:function(t,e,n){"use strict";n.r(e),n("a4d3"),n("e01a"),n("d28b"),n("3ca3"),n("ddb0"),n("b636"),n("944a"),n("0c47"),n("23dc"),n("3410"),n("d9e2"),n("b0c0"),n("131a"),n("fb6a");var r=n("0122"),a=n("c964"),i=n("fc11"),o=n("f3f3"),s=(n("d81d"),n("d3b7"),n("159b"),n("a434"),n("2f62")),c=n("90e7");function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */l=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(e){u=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var i,o,s,c;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),r=new k(r||[]);return a(e,"_invoke",{value:(i=t,o=n,s=r,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return O()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n&&(n=function t(e,n){var r=n.method,a=e.iterator[r];return void 0===a?(n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f):(r=h(a,e.iterator,n.arg),"throw"===r.type?(n.method="throw",n.arg=r.arg,n.delegate=null,f):(a=r.arg,a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)))}(n,s),n)){if(n===f)continue;return n}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===c)throw c="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(c="executing",n=h(i,o,s),"normal"===n.type){if(c=s.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:s.done}}"throw"===n.type&&(c="completed",s.method="throw",s.arg=n.arg)}})}),e}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var f={};function p(){}function m(){}function v(){}i={};var g=(u(i,o,(function(){return this})),Object.getPrototypeOf),b=(g=g&&g(g(L([]))),g&&g!==e&&n.call(g,o)&&(i=g),v.prototype=p.prototype=Object.create(i));function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){var i;a(this,"_invoke",{value:function(a,o){function s(){return new e((function(i,s){!function a(i,o,s,c){var l;i=h(t[i],t,o);if("throw"!==i.type)return(o=(l=i.arg).value)&&"object"==Object(r.a)(o)&&n.call(o,"__await")?e.resolve(o.__await).then((function(t){a("next",t,s,c)}),(function(t){a("throw",t,s,c)})):e.resolve(o).then((function(t){l.value=t,s(l)}),(function(t){return a("throw",t,s,c)}));c(i.arg)}(a,o,i,s)}))}return i=i?i.then(s,s):s()}})}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(t){if(t){var e,r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(r=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r}).next=r}return{next:O}}function O(){return{value:void 0,done:!0}}return a(b,"constructor",{value:m.prototype=v,configurable:!0}),a(v,"constructor",{value:m,configurable:!0}),m.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(y.prototype),u(y.prototype,s,(function(){return this})),t.AsyncIterator=y,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new y(d(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(b),u(b,c,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=L,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return o.type="throw",o.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var a=this.tryEntries.length-1;0<=a;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,a=this.tryEntries[e];if(a.tryLoc===t)return"throw"===(n=a.completion).type&&(r=n.arg,x(a)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}n("c276"),o={name:"marketing_channel_code",filters:{typeFilter:function(t){return{wechat:"微信用户",routine:"小程序用户"}[t]}},computed:Object(o.a)(Object(o.a)({},Object(s.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"left"}}),data:function(){var t={isChat:!0,formValidate3:{page:1,limit:15},total3:0,loading3:!1,modals3:!1,tabList:[],formValidate5:{page:1,limit:15,uid:0,to_uid:0,id:0},total2:0,loading2:!1,tableList5:[],FromData:null,formValidate:{page:1,limit:15,data:"",type:"",nickname:""},tableList2:[],modals:!1,total:0,tableFrom:{page:1,limit:15,cate_id:0,name:""},userData:{id:0,page:1,limit:15},timeVal:[],loading:!1,tableList:[],columns4:[{title:"UID",key:"uid",minWidth:120},{title:"用户头像",slot:"avatar",minWidth:120},{title:"用户昵称",key:"nickname",minWidth:120}],columns1:[{title:"二维码",slot:"image",width:80,align:"center"},{title:"二维码名称",key:"name",minWidth:80,align:"center"},{title:"总关注数",key:"follow",minWidth:80,align:"center"},{title:"昨日新增关注",key:"y_follow",minWidth:80,align:"center"},{title:"用户标签",slot:"label_name",minWidth:80},{title:"时间",slot:"add_time",width:140,align:"center"},{title:"关联推广员",slot:"avatar",minWidth:60},{title:"状态",slot:"status",minWidth:60,align:"center"},{title:"操作",slot:"action",fixed:"right",minWidth:150}]};return Object(i.a)(t,"loading2",!1),Object(i.a)(t,"total2",0),Object(i.a)(t,"addFrom",{uids:[]}),Object(i.a)(t,"selections",[]),Object(i.a)(t,"rows",{}),Object(i.a)(t,"rowRecord",{}),Object(i.a)(t,"theme3","light"),Object(i.a)(t,"labelSort",[]),Object(i.a)(t,"sortName",""),Object(i.a)(t,"current",0),Object(i.a)(t,"uid",0),t},activated:function(){this.getUserLabelAll(),this.$nextTick((function(){document.querySelector(".content-wrapper").scrollTo({top:0,behavior:"smooth"})}))},mounted:function(){},methods:{changeMenu:function(t,e){switch(this.orderId=t.id,e){case"1":this.downLoadCode(t.image);break;case"2":this.$router.push({path:this.$routeProStr+"/marketing/channel_code/code_statistic?id="+t.id});break;case"3":this.modals=!0,this.userData.id=t.id,this.getUserList(),this.break}},downLoadCode:function(t){if(!t)return this.$Message.warning("暂无二维码");var e=new Image;e.src=t,e.setAttribute("crossOrigin","anonymous"),e.onload=function(){var t=document.createElement("canvas");t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,e.width,e.height);t=t.toDataURL();var n=document.createElement("a"),r=new MouseEvent("click");n.download=name||"photo",n.href=t,n.dispatchEvent(r)}},pageChangeUser:function(t){this.userData.page=t,this.getUserList()},getUserList:function(){var t=this;Object(c.u)(this.userData).then(function(){var e=Object(a.a)(l().mark((function e(n){var r,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,a=[],r.list.map((function(t){a.push(t.user)})),t.tabList=a,t.total2=r.count,t.loading2=!1;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.tabList=[],t.$Message.error(e.msg)}))},getUserLabelAll:function(t){var e=this;Object(c.Zb)().then((function(n){n=n.data.data,n.unshift({cate_name:"全部",id:""}),n.forEach((function(t){t.status=!1})),t||(e.sortName=n[0].id,e.tableFrom.cate_id=n[0].id,e.getList()),e.labelSort=n}))},addSort:function(){var t=this;this.$modalForm(Object(c.Ub)(0)).then((function(){return t.getUserLabelAll()}))},labelEdit:function(t){var e=this;this.$modalForm(Object(c.Ub)(t.id)).then((function(){return e.getUserLabelAll(1)}))},deleteSort:function(t,e,n){var r=this;e={title:e,num:n,url:"app/wechat_qrcode/cate/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){r.$Message.success(t.msg),r.labelSort.splice(n,1),r.labelSort=[],r.getUserLabelAll()})).catch((function(t){r.$Message.error(t.msg)}))},showMenu:function(t){this.labelSort.forEach((function(e){e.id==t.id?e.status=!t.status:e.status=!1}))},bindMenuItem:function(t,e){this.tableFrom.page=1,this.current=e,this.labelSort.forEach((function(t){t.status=!1})),this.tableFrom.cate_id=t.id,this.getList()},cancel:function(){this.formValidate={page:1,limit:10,data:"",type:"",nickname:""}},edit:function(t){this.$router.push({path:this.$routeProStr+"/marketing/channel_code/create?id="+t.id})},add:function(){this.$router.push({path:this.$routeProStr+"/marketing/channel_code/create"})},getListService:function(){var t=this;this.loading2=!0,kefucreateApi(this.formValidate).then(function(){var e=Object(a.a)(l().mark((function e(n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tableList2=r.list,t.total2=r.count,t.tableList2.map((function(t){t._isChecked=!1})),t.loading2=!1;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading2=!1,t.$Message.error(e.msg)}))},userSearchs:function(){this.formValidate.page=1,this.getList()},del:function(t,e,n){var r=this;e={title:e,num:n,url:"/app/wechat_qrcode/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){r.$Message.success(t.msg),r.tableList.splice(n,1)})).catch((function(t){r.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,Object(c.Wb)(this.tableFrom).then(function(){var e=Object(a.a)(l().mark((function e(n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tableList=r.list,t.total=n.data.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},onchangeIsShow:function(t){var e=this;t={id:t.id,status:t.status};Object(c.Yb)(t).then(function(){var t=Object(a.a)(l().mark((function t(n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(n.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))}}},n("3d23"),s=n("2877"),n=Object(s.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Row",{ref:"warpper",staticClass:"ivu-mt box-wrapper"},[n("Col",{staticClass:"left-wrapper",attrs:{span:"3"}},[n("Menu",{attrs:{theme:t.theme3,"active-name":t.sortName,width:"auto"}},[n("MenuGroup",t._l(t.labelSort,(function(e,r){return n("MenuItem",{key:r,staticClass:"menu-item",class:r===t.current?"showOn":"",attrs:{name:e.id},nativeOn:{click:function(n){return t.bindMenuItem(e,r)}}},[t._v("\n "+t._s(e.cate_name)+"\n "),0!=r?n("div",{staticClass:"icon-box"},[n("Icon",{attrs:{type:"ios-more",size:"24"},on:{click:function(n){return n.stopPropagation(),t.showMenu(e)}}})],1):t._e(),0!=r?n("div",{directives:[{name:"show",rawName:"v-show",value:e.status,expression:"item.status"}],staticClass:"right-menu ivu-poptip-inner"},[n("div",{staticClass:"ivu-poptip-body",on:{click:function(n){return t.labelEdit(e)}}},[n("div",{staticClass:"ivu-poptip-body-content"},[n("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("编辑分类")])])]),n("div",{staticClass:"ivu-poptip-body",on:{click:function(n){return t.deleteSort(e,"删除分类",r)}}},[n("div",{staticClass:"ivu-poptip-body-content"},[n("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("删除分类")])])])]):t._e()])})),1)],1)],1),n("Col",{ref:"rightBox",attrs:{span:"21"}},[n("Card",{attrs:{bordered:!1,"dis-hover":""}},[n("Row",{staticClass:"mb20",attrs:{type:"flex"}},[n("Col",{attrs:{span:"20"}},[n("Button",{directives:[{name:"auth",rawName:"v-auth",value:["marketing-channel_code-create"],expression:"['marketing-channel_code-create']"}],staticClass:"mr10",attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("新建二维码")]),n("Button",{directives:[{name:"auth",rawName:"v-auth",value:["marketing-channel_code-create"],expression:"['marketing-channel_code-create']"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success",icon:"md-add"},on:{click:t.addSort}},[t._v("添加分组")])],1),n("Col",{attrs:{span:"4"}},[n("Input",{attrs:{search:"","enter-button":"搜索",placeholder:"请输入二维码名称"},on:{"on-search":t.userSearchs},model:{value:t.tableFrom.name,callback:function(e){t.$set(t.tableFrom,"name",e)},expression:"tableFrom.name"}})],1)],1),n("Table",{attrs:{columns:t.columns1,data:t.tableList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"image",fn:function(t){var e=t.row;return t.index,[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"row.image"}]})])]}},{key:"avatar",fn:function(t){var e=t.row;return t.index,[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])]}},{key:"label_name",fn:function(e){var r=e.row;return e.index,[r.label_name.length?n("div",t._l(r.label_name,(function(e,r){return n("Tag",{key:r,attrs:{checkable:!1,color:"primary"}},[t._v(t._s(e))])})),1):n("div",[t._v("--")])]}},{key:"add_time",fn:function(e){var r=e.row;return e.index,[0===r.stop?n("span",[t._v(" 永久 ")]):t._e(),1===r.stop?n("span",[n("div",[t._v(t._s(r.add_time))]),n("div",[t._v("-")]),n("div",[t._v(t._s(r.end_time))])]):t._e(),-1===r.stop?n("span",[t._v("已过期")]):t._e()]}},{key:"status",fn:function(e){var r=e.row;return e.index,[n("i-switch",{attrs:{value:r.status,"true-value":1,"false-value":0,disabled:2==r.lottery_status,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(r)}},model:{value:r.status,callback:function(e){t.$set(r,"status",e)},expression:"row.status"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"action",fn:function(e){var r=e.row,a=e.index;return[n("a",{on:{click:function(e){return t.edit(r)}}},[t._v("编辑")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(r,"删除二维码",a)}}},[t._v("删除")]),n("Divider",{attrs:{type:"vertical"}}),n("Dropdown",{attrs:{transfer:!0},on:{"on-click":function(e){return t.changeMenu(r,e)}}},[n("a",{attrs:{href:"javascript:void(0)"}},[t._v("更多\n "),n("Icon",{attrs:{type:"ios-arrow-down"}})],1),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{attrs:{name:"1"}},[t._v("下载")]),n("DropdownItem",{attrs:{name:"2"}},[t._v("统计")]),n("DropdownItem",{attrs:{name:"3"}},[t._v("用户列表")])],1)],1)]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.tableFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)],1),n("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"渠道码用户列表","mask-closable":!1,width:"900"},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[n("Table",{ref:"selection",attrs:{columns:t.columns4,data:t.tabList,"no-data-text":"暂无数据","highlight-row":"","max-height":"400","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatar",fn:function(t){var e=t.row;return t.index,[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total2,"show-elevator":"","show-total":"",loading:t.loading2,"page-size":t.userData.limit},on:{"on-change":t.pageChangeUser}})],1)],1)],1)}),[],!1,null,"26313647",null),e.default=n.exports}}]);
|