You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
15 KiB
1 lines
15 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5a885d26"],{2430:function(t,e,r){"use strict";r.r(e);var n=r("b562"),o=r("2f62");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var a=e&&e.prototype instanceof w?e:w,i=Object.create(a.prototype),c=new V(n||[]);return o(i,"_invoke",{value:E(t,r,c)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",v="suspendedYield",y="executing",m="completed",g={};function w(){}function b(){}function k(){}var x={};f(x,s,(function(){return this}));var O=Object.getPrototypeOf,L=O&&O(O($([])));L&&L!==r&&n.call(L,s)&&(x=L);var _=k.prototype=w.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,c,s){var l=d(t[o],t,i);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==a(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return r("throw",t,c,s)}))}s(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var s=P(c,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=d(e,r,n);if("normal"===l.type){if(o=n.done?m:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=d(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function V(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function $(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return b.prototype=k,o(_,"constructor",{value:k,configurable:!0}),o(k,"constructor",{value:b,configurable:!0}),b.displayName=f(k,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,f(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(j.prototype),f(j.prototype,l,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),f(_,u,"Generator"),f(_,s,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=$,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},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),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:$(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function c(t,e,r,n,o,a,i){try{var c=t[a](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){c(a,n,o,i,s,"next",t)}function s(t){c(a,n,o,i,s,"throw",t)}i(void 0)}))}}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var h={name:"keyword",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,formValidate:{key:"",type:"",page:1,limit:20},tabList:[],total:0,columns1:[{title:"ID",key:"id",width:80},{title:"关键字",key:"key",minWidth:120},{title:"回复类型",key:"typeName",minWidth:150},{title:"是否显示",slot:"status",minWidth:120},{title:"操作",slot:"action",fixed:"right",width:200}],modal:!1,qrcode:""}},created:function(){this.getList()},computed:u(u({},Object(o.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{download:function(t){var e=this;this.$Spin.show(),Object(n.b)(t.id).then((function(t){e.$Spin.hide(),e.modal=!0,e.qrcode=t.data.url})).catch((function(t){e.$Spin.hide(),e.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,Object(n.d)(this.formValidate).then(function(){var e=s(i().mark((function e(r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.tabList=n.list,t.total=r.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.formValidate.page=t,this.getList()},onchangeIsShow:function(t){var e=this,r={id:t.id,status:t.status};Object(n.e)(r).then(function(){var t=s(i().mark((function t(r){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.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)}))},userSearchs:function(){this.formValidate.page=1,this.getList()},add:function(){this.$emit("keyword-action","0")},edit:function(t){this.$emit("keyword-action","".concat(t.id))},del:function(t,e,r){var n=this,o={title:e,num:r,url:"app/wechat/keyword/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(o).then((function(t){n.$Message.success(t.msg),n.tabList.splice(r,1),n.tabList.length||(n.formValidate.page=1==n.formValidate.page?1:n.formValidate.page-1),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))}}},d=(r("57ec"),r("2877")),p=Object(d.a)(h,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{attrs:{bordered:!1,padding:30,"dis-hover":""}},[e("Form",{ref:"levelFrom",attrs:{inline:"",model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"回复类型:",prop:"type","label-for":"type"}},[e("Select",{staticClass:"input-add",attrs:{placeholder:"请选择","element-id":"type",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},[e("Option",{attrs:{value:"text"}},[t._v("文字消息")]),e("Option",{attrs:{value:"image"}},[t._v("图片消息")]),e("Option",{attrs:{value:"news"}},[t._v("图文消息")]),e("Option",{attrs:{value:"voice"}},[t._v("声音消息")])],1)],1),e("FormItem",{attrs:{label:"关键字:",prop:"key","label-for":"key"}},[e("Input",{staticClass:"input-add",attrs:{placeholder:"请输入关键字"},on:{"on-search":t.userSearchs},model:{value:t.formValidate.key,callback:function(e){t.$set(t.formValidate,"key",e)},expression:"formValidate.key"}}),e("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1),e("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加关键字")]),e("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.tabList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"status",fn:function(r){var n=r.row;return r.index,[e("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(r){var n=r.row,o=r.index;return[e("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.download(n)}}},[t._v("下载二维码")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.del(n,"关键字回复",o)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1),e("Modal",{attrs:{title:"二维码","footer-hide":""},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[e("div",{staticClass:"acea-row row-around"},[e("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"QRpic"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.qrcode,expression:"qrcode"}]})])])])])],1)}),[],!1,null,"171d5294",null);e.default=p.exports},"57ec":function(t,e,r){"use strict";r("a11a")},a076:function(t,e,r){},a11a:function(t,e,r){},ac7a:function(t,e,r){"use strict";r.r(e);var n=r("3137"),o=r("2430"),a={name:"index",components:{ReplyFollow:n.default,ReplyKeyword:o.default},data:function(){return{activeName:"1",keywordSave:""}},methods:{menuSelect:function(t){this.activeName=t,this.followAction()},keywordAction:function(t){this.keywordSave=t},followAction:function(){this.keywordSave=""}}},i=(r("f2b5b"),r("2877")),c=Object(i.a)(a,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,padding:0,"dis-hover":""}},[e("Row",{attrs:{type:"flex",wrap:!1}},[e("Col",{staticClass:"reply"},[e("Menu",{attrs:{"active-name":t.activeName,width:"auto"},on:{"on-select":t.menuSelect}},[e("MenuItem",{attrs:{name:"1"}},[t._v("微信关注回复")]),e("MenuItem",{attrs:{name:"2"}},[t._v("关键字回复")]),e("MenuItem",{attrs:{name:"3"}},[t._v("无效关键字回复")])],1)],1),e("Col",{staticClass:"auto"},["2"!==t.activeName||t.keywordSave?t._e():e("ReplyKeyword",{attrs:{"active-name":t.activeName},on:{"keyword-action":t.keywordAction}}),"2"!==t.activeName||t.keywordSave?e("ReplyFollow",{attrs:{"active-name":t.activeName,"keyword-save":t.keywordSave},on:{"follow-action":t.followAction}}):t._e()],1)],1)],1)],1)}),[],!1,null,"02ab88bf",null);e.default=c.exports},f2b5b:function(t,e,r){"use strict";r("a076")}}]); |