1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-bd640486"],{2430:function(t,e,n){"use strict";n.r(e);var r=n("a34a"),a=n.n(r),o=n("b562"),c=n("2f62");function i(t,e,n,r,a,o,c){try{var i=t[o](c),u=i.value}catch(t){return void n(t)}i.done?e(u):Promise.resolve(u).then(r,a)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function c(t){i(o,r,a,c,u,"next",t)}function u(t){i(o,r,a,c,u,"throw",t)}c(void 0)}))}}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l={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:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(n,!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(c.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(o.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(o.d)(this.formValidate).then(function(){var e=u(a.a.mark((function e(n){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tabList=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.formValidate.page=t,this.getList()},onchangeIsShow:function(t){var e=this,n={id:t.id,status:t.status};Object(o.e)(n).then(function(){var t=u(a.a.mark((function t(n){return a.a.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)}))},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,n){var r=this,a={title:e,num:n,url:"app/wechat/keyword/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){r.$Message.success(t.msg),r.tabList.splice(n,1),r.tabList.length||(r.formValidate.page=1==r.formValidate.page?1:r.formValidate.page-1),r.getList()})).catch((function(t){r.$Message.error(t.msg)}))}}},p=(n("5927"),n("2877")),f=Object(p.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Card",{attrs:{bordered:!1,padding:30,"dis-hover":""}},[n("Form",{ref:"levelFrom",attrs:{inline:"",model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:"回复类型:",prop:"type","label-for":"type"}},[n("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"}},[n("Option",{attrs:{value:"text"}},[t._v("文字消息")]),n("Option",{attrs:{value:"image"}},[t._v("图片消息")]),n("Option",{attrs:{value:"news"}},[t._v("图文消息")]),n("Option",{attrs:{value:"voice"}},[t._v("声音消息")])],1)],1),n("FormItem",{attrs:{label:"关键字:",prop:"key","label-for":"key"}},[n("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"}}),n("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1),n("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加关键字")]),n("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(e){var r=e.row;return e.index,[n("i-switch",{attrs:{value:r.status,"true-value":1,"false-value":0,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.download(r)}}},[t._v("下载二维码")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(r,"关键字回复",a)}}},[t._v("删除")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("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),n("Modal",{attrs:{title:"二维码","footer-hide":""},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("div",{staticClass:"acea-row row-around"},[n("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"QRpic"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.qrcode,expression:"qrcode"}]})])])])])],1)}),[],!1,null,"171d5294",null);e.default=f.exports},5927:function(t,e,n){"use strict";var r=n("cfda");n.n(r).a},b562:function(t,e,n){"use strict";n.d(e,"l",(function(){return a})),n.d(e,"n",(function(){return o})),n.d(e,"D",(function(){return c})),n.d(e,"h",(function(){return i})),n.d(e,"j",(function(){return u})),n.d(e,"m",(function(){return s})),n.d(e,"y",(function(){return d})),n.d(e,"a",(function(){return l})),n.d(e,"x",(function(){return p})),n.d(e,"s",(function(){return f})),n.d(e,"t",(function(){return h})),n.d(e,"C",(function(){return m})),n.d(e,"g",(function(){return b})),n.d(e,"i",(function(){return w})),n.d(e,"k",(function(){return g})),n.d(e,"d",(function(){return v})),n.d(e,"e",(function(){return O})),n.d(e,"f",(function(){return y})),n.d(e,"z",(function(){return j})),n.d(e,"B",(function(){return k})),n.d(e,"A",(function(){return E})),n.d(e,"H",(function(){return T})),n.d(e,"o",(function(){return _})),n.d(e,"c",(function(){return x})),n.d(e,"G",(function(){return P})),n.d(e,"E",(function(){return G})),n.d(e,"F",(function(){return S})),n.d(e,"w",(function(){return V})),n.d(e,"u",(function(){return $})),n.d(e,"v",(function(){return C})),n.d(e,"p",(function(){return L})),n.d(e,"b",(function(){return D})),n.d(e,"r",(function(){return M})),n.d(e,"q",(function(){return F}));var r=n("b6bd");function a(t){return Object(r.a)({url:"app/routine",method:"get",params:t})}function o(){return Object(r.a)({url:"app/routine/syncSubscribe",method:"GET"})}function c(){return Object(r.a)({url:"app/wechat/syncSubscribe",method:"GET"})}function i(){return Object(r.a)({url:"app/routine/create",method:"get"})}function u(t){return Object(r.a)({url:"app/routine/".concat(t,"/edit"),method:"get"})}function s(t){return Object(r.a)({url:"app/routine/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function d(t){return Object(r.a)({url:"app/wechat/menu",method:"get"})}function l(t){return Object(r.a)({url:"app/wechat/menu",method:"post",data:t})}function p(t){return Object(r.a)({url:"app/wechat/template",method:"get",params:t})}function f(){return Object(r.a)({url:"app/wechat/template/create",method:"get"})}function h(t){return Object(r.a)({url:"app/wechat/template/".concat(t,"/edit"),method:"get"})}function m(t){return Object(r.a)({url:"app/wechat/template/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function b(t){return Object(r.a)({url:t.url,method:"post",data:t.key})}function w(t){return Object(r.a)({url:"app/routine/download",method:"post",data:t})}function g(){return Object(r.a)({url:"app/routine/info",method:"get"})}function v(t){return Object(r.a)({url:"app/wechat/keyword",method:"get",params:t})}function O(t){return Object(r.a)({url:"app/wechat/keyword/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function y(t,e){return Object(r.a)({url:t,method:"get",params:e.key})}function j(t){return Object(r.a)({url:"/app/wechat/news",method:"POST",data:t})}function k(t){return Object(r.a)({url:"app/wechat/news",method:"GET",params:t})}function E(t){return Object(r.a)({url:"app/wechat/news/".concat(t),method:"GET"})}function T(t){return Object(r.a)({url:"app/wechat/user",method:"GET",params:t})}function _(){return Object(r.a)({url:"app/wechat/user/tag_group",method:"GET"})}function x(t){return Object(r.a)({url:t,method:"GET"})}function P(){return Object(r.a)({url:"app/wechat/tag",method:"GET"})}function G(){return Object(r.a)({url:"app/wechat/tag/create",method:"GET"})}function S(t){return Object(r.a)({url:"app/wechat/tag/".concat(t,"/edit"),method:"GET"})}function V(){return Object(r.a)({url:"app/wechat/group",method:"GET"})}function $(){return Object(r.a)({url:"app/wechat/group/create",method:"GET"})}function C(t){return Object(r.a)({url:"app/wechat/group/".concat(t,"/edit"),method:"GET"})}function L(t){return Object(r.a)({url:"app/wechat/action",method:"GET",params:t})}function D(t){return Object(r.a)({url:"app/wechat/code_reply/".concat(t),method:"GET"})}function M(){return Object(r.a)({url:"/app/wechat/card",method:"GET"})}function F(t){return Object(r.a)({url:"/app/wechat/card",method:"post",data:t})}},cfda:function(t,e,n){}}]);
|