1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6782e076"],{"0319":function(t,e,a){},"03ecd":function(t,e,a){t.exports=a.p+"view_admin/img/mobilehead.1c931282.png"},"58b1":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAAyCAIAAACib5WDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE1NEJCMUE0NzZGNDExRTVBOTBBQTZFOEFEMjc4NTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE1NEJCMUE1NzZGNDExRTVBOTBBQTZFOEFEMjc4NTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTU0QkIxQTI3NkY0MTFFNUE5MEFBNkU4QUQyNzg1OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTU0QkIxQTM3NkY0MTFFNUE5MEFBNkU4QUQyNzg1OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4yWLBJAAABuklEQVR42uzcu0ocURzA4XWxMIWiQhJwtVhxMW0wEkWj+AwWgm9gJfgggpVPoElEUwUCKRNFJaQWsygWXvAKXlBZGw8KIiIJmWFnGPg+pjiryMIffpxzRLemUqnkUlUul0ulUg74f3kjAAEDAgYEDAIGBAwIGBAwCBgQMCBgEHAMlZub8BglJK825s/vHxzOfl4Ii9GR4devXhooZGYHPjo+mfk0f3l5FZ6wCC8NFDKzA+fz+aHB/scvDRQyE3BzU2N4DBEyeYQGBAxU5wi9sbm1+ut3W2shznucnp296Sx1tBeNGxINeG39z+jIcPy3+Tj3RcCQ9BG6ob7+fjE5NR2eaOugtdBi1pD0Dvzg6vo68hpIOeAXdXWR10CV1Pz9c6F/LC4P9PfGf5ufSysf+nqe/ZbPhYZq3YGfiHD7BdI/Qrv9QuYDdvsFd2B3YEjjDgxk+Aidu/sd1T9vueEUPTE+ZrhgBwai7sA7u3tPvhJtaz0/vzBrSDrg7ndvv377/vAX0dFs7+y+7+4ya0g64I72ov8iAndgQMCAgEHAgIABAYOAAQEDAgYEDAIGBAwIGBAwCBhIy60AAwBiy5esmSYLKgAAAABJRU5ErkJggg=="},"94a4":function(t,e,a){"use strict";var n=a("0319");a.n(n).a},b562:function(t,e,a){"use strict";a.d(e,"l",(function(){return r})),a.d(e,"n",(function(){return i})),a.d(e,"D",(function(){return s})),a.d(e,"h",(function(){return u})),a.d(e,"j",(function(){return c})),a.d(e,"m",(function(){return o})),a.d(e,"y",(function(){return l})),a.d(e,"a",(function(){return d})),a.d(e,"x",(function(){return p})),a.d(e,"s",(function(){return h})),a.d(e,"t",(function(){return m})),a.d(e,"C",(function(){return f})),a.d(e,"g",(function(){return g})),a.d(e,"i",(function(){return b})),a.d(e,"k",(function(){return v})),a.d(e,"d",(function(){return w})),a.d(e,"e",(function(){return k})),a.d(e,"f",(function(){return I})),a.d(e,"z",(function(){return A})),a.d(e,"B",(function(){return y})),a.d(e,"A",(function(){return M})),a.d(e,"H",(function(){return V})),a.d(e,"o",(function(){return j})),a.d(e,"c",(function(){return C})),a.d(e,"G",(function(){return E})),a.d(e,"E",(function(){return O})),a.d(e,"F",(function(){return G})),a.d(e,"w",(function(){return T})),a.d(e,"u",(function(){return B})),a.d(e,"v",(function(){return x})),a.d(e,"p",(function(){return z})),a.d(e,"b",(function(){return N})),a.d(e,"r",(function(){return Z})),a.d(e,"q",(function(){return U}));var n=a("b6bd");function r(t){return Object(n.a)({url:"app/routine",method:"get",params:t})}function i(){return Object(n.a)({url:"app/routine/syncSubscribe",method:"GET"})}function s(){return Object(n.a)({url:"app/wechat/syncSubscribe",method:"GET"})}function u(){return Object(n.a)({url:"app/routine/create",method:"get"})}function c(t){return Object(n.a)({url:"app/routine/".concat(t,"/edit"),method:"get"})}function o(t){return Object(n.a)({url:"app/routine/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function l(t){return Object(n.a)({url:"app/wechat/menu",method:"get"})}function d(t){return Object(n.a)({url:"app/wechat/menu",method:"post",data:t})}function p(t){return Object(n.a)({url:"app/wechat/template",method:"get",params:t})}function h(){return Object(n.a)({url:"app/wechat/template/create",method:"get"})}function m(t){return Object(n.a)({url:"app/wechat/template/".concat(t,"/edit"),method:"get"})}function f(t){return Object(n.a)({url:"app/wechat/template/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function g(t){return Object(n.a)({url:t.url,method:"post",data:t.key})}function b(t){return Object(n.a)({url:"app/routine/download",method:"post",data:t})}function v(){return Object(n.a)({url:"app/routine/info",method:"get"})}function w(t){return Object(n.a)({url:"app/wechat/keyword",method:"get",params:t})}function k(t){return Object(n.a)({url:"app/wechat/keyword/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function I(t,e){return Object(n.a)({url:t,method:"get",params:e.key})}function A(t){return Object(n.a)({url:"/app/wechat/news",method:"POST",data:t})}function y(t){return Object(n.a)({url:"app/wechat/news",method:"GET",params:t})}function M(t){return Object(n.a)({url:"app/wechat/news/".concat(t),method:"GET"})}function V(t){return Object(n.a)({url:"app/wechat/user",method:"GET",params:t})}function j(){return Object(n.a)({url:"app/wechat/user/tag_group",method:"GET"})}function C(t){return Object(n.a)({url:t,method:"GET"})}function E(){return Object(n.a)({url:"app/wechat/tag",method:"GET"})}function O(){return Object(n.a)({url:"app/wechat/tag/create",method:"GET"})}function G(t){return Object(n.a)({url:"app/wechat/tag/".concat(t,"/edit"),method:"GET"})}function T(){return Object(n.a)({url:"app/wechat/group",method:"GET"})}function B(){return Object(n.a)({url:"app/wechat/group/create",method:"GET"})}function x(t){return Object(n.a)({url:"app/wechat/group/".concat(t,"/edit"),method:"GET"})}function z(t){return Object(n.a)({url:"app/wechat/action",method:"GET",params:t})}function N(t){return Object(n.a)({url:"app/wechat/code_reply/".concat(t),method:"GET"})}function Z(){return Object(n.a)({url:"/app/wechat/card",method:"GET"})}function U(t){return Object(n.a)({url:"/app/wechat/card",method:"post",data:t})}},c861:function(t,e,a){"use strict";a.r(e);var n=a("a34a"),r=a.n(n),i=a("b562");function s(t,e,a,n,r,i,s){try{var u=t[i](s),c=u.value}catch(t){return void a(t)}u.done?e(c):Promise.resolve(c).then(n,r)}function u(t){return function(){var e=this,a=arguments;return new Promise((function(n,r){var i=t.apply(e,a);function u(t){s(i,n,r,u,c,"next",t)}function c(t){s(i,n,r,u,c,"throw",t)}u(void 0)}))}}var c={name:"wechatMenus",data:function(){return{modal2:!1,formValidate:{name:"",type:"click",appid:"",url:"",key:"",pagepath:"",id:0},ruleValidate:{name:[{required:!0,message:"请填写菜单名称",trigger:"blur"},{min:1,max:8,message:"长度在 1 到 8 个字符",trigger:"blur"}],key:[{required:!0,message:"请填写关键字",trigger:"blur"}],appid:[{required:!0,message:"请填写appid",trigger:"blur"}],pagepath:[{required:!0,message:"请填写小程序跳转路径",trigger:"blur"}],url:[{required:!0,message:"请填写跳转地址",trigger:"blur"}],type:[{required:!0,message:"请选择规则状态",trigger:"change"}]},parentMenuId:null,list:[],checkedMenuId:null,isTrue:!1}},mounted:function(){if(this.getMenus(),!this.list.length)return this.formValidate;this.formValidate=this.list[this.activeClass]},methods:{defaultMenusData:function(){return{type:"click",name:"",sub_button:[]}},defaultChildData:function(){return{type:"click",name:""}},getMenus:function(){var t=this;Object(i.y)().then(function(){var e=u(r.a.mark((function e(a){var n;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.data,t.list=n.menus;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},submenus:function(t){var e=this;this.isTrue&&!this.checkedMenuId&&0!==this.checkedMenuId?this.putData():this.$refs[t].validate((function(t){if(t)e.putData();else if(!e.check())return!1}))},putData:function(){var t=this,e={button:this.list};Object(i.a)(e).then(function(){var e=u(r.a.mark((function e(a){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$Message.success(a.msg),t.checkedMenuId=null,t.formValidate={},t.isTrue=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},gettem:function(t,e,a){this.checkedMenuId=e,this.formValidate=t,this.parentMenuId=a,this.isTrue=!0},add:function(t,e){if(!this.check())return!1;if(t.sub_button.length<5){var a=this.defaultChildData(),n=t.sub_button.length;t.sub_button.push(a),this.formValidate=a,this.checkedMenuId=n,this.parentMenuId=e,this.isTrue=!0}},addtext:function(){if(!this.check())return!1;var t=this.defaultMenusData(),e=this.list.length;this.list.push(t),this.formValidate=t,this.checkedMenuId=e,this.parentMenuId=null,this.isTrue=!0},check:function(){return null===this.checkedMenuId||!this.isTrue||(this.formValidate.name?"click"!==this.formValidate.type||this.formValidate.key?"view"!==this.formValidate.type||/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/.test(this.formValidate.url)?!!("miniprogram"!==this.formValidate.type||this.formValidate.appid&&this.formValidate.pagepath&&this.formValidate.url)||(this.$Message.warning("请填写完整小程序配置!"),!1):(this.$Message.warning("请输入正确的跳转地址!"),!1):(this.$Message.warning("请输入关键字!"),!1):(this.$Message.warning("请输入按钮名称!"),!1))},deltMenus:function(){this.isTrue?this.modal2=!0:this.$Message.warning("请选择菜单!")},del:function(){null===this.parentMenuId?this.list.splice(this.checkedMenuId,1):this.list[this.parentMenuId].sub_button.splice(this.checkedMenuId,1),this.parentMenuId=null,this.formValidate={name:"",type:"click",appid:"",url:"",key:"",pagepath:"",id:0},this.isTrue=!0,this.modal2=!1,this.checkedMenuId=null,this.$refs.formValidate.resetFields()}}},o=(a("94a4"),a("2877")),l=Object(o.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"article-manager"},[n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",{staticClass:"ml40",attrs:{span:"24"}},[n("Row",[n("Col",{attrs:{span:24}},[n("Row",[n("Col",{staticClass:"left mb15",attrs:{xl:7,lg:7,md:22,sm:22,xs:22}},[n("img",{staticClass:"top",attrs:{src:a("03ecd")}}),n("img",{staticClass:"bottom",attrs:{src:a("58b1")}}),n("div",{staticClass:"style-add"}),n("div",{staticClass:"textbot"},[t._l(t.list,(function(e,a){return n("div",{key:a,staticClass:"li",class:{active:e===t.formValidate}},[n("div",[n("div",{staticClass:"add",on:{click:function(n){return t.add(e,a)}}},[n("Icon",{attrs:{type:"ios-add"}}),n("div",{staticClass:"arrow"})],1),n("div",{staticClass:"tianjia"},t._l(e.sub_button,(function(e,r){return n("div",{key:r,staticClass:"addadd",class:{active:e===t.formValidate},on:{click:function(n){return t.gettem(e,r,a)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.name||"二级菜单")+"\n\t\t\t\t\t\t\t\t\t\t")])})),0)]),n("div",{staticClass:"text",on:{click:function(n){return t.gettem(e,a,null)}}},[t._v(t._s(e.name||"一级菜单"))])])})),n("div",{directives:[{name:"show",rawName:"v-show",value:t.list.length<3,expression:"list.length < 3"}],staticClass:"li"},[n("div",{staticClass:"text",on:{click:t.addtext}},[n("Icon",{attrs:{type:"ios-add"}})],1)])],2)]),n("Col",{attrs:{xl:11,lg:12,md:22,sm:22,xs:22}},[null!==t.checkedMenuId?n("Tabs",{attrs:{value:"name1"}},[n("TabPane",{attrs:{label:"菜单信息",name:"name1"}},[n("Row",[n("Col",{staticClass:"userAlert",attrs:{span:"24"}},[n("div",{staticClass:"box-card right"},[n("Alert",{staticClass:"spwidth",attrs:{"show-icon":"",closable:""}},[t._v(" 已添加子菜单,仅可设置菜单名称")]),n("Form",{ref:"formValidate",staticClass:"mt20",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":100}},[n("FormItem",{attrs:{label:"菜单名称",prop:"name"}},[n("Input",{staticClass:"spwidth",attrs:{placeholder:"请填写菜单名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1),n("FormItem",{attrs:{label:"规则状态",prop:"type"}},[n("Select",{staticClass:"spwidth",attrs:{placeholder:"请选择规则状态"},model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},[n("Option",{attrs:{value:"click"}},[t._v("关键字")]),n("Option",{attrs:{value:"view"}},[t._v("跳转网页")]),n("Option",{attrs:{value:"miniprogram"}},[t._v("小程序")])],1)],1),"click"===t.formValidate.type?n("div",[n("FormItem",{attrs:{label:"关键字",prop:"key"}},[n("Input",{staticClass:"spwidth",attrs:{placeholder:"请填写关键字"},model:{value:t.formValidate.key,callback:function(e){t.$set(t.formValidate,"key",e)},expression:"formValidate.key"}})],1)],1):t._e(),"miniprogram"===t.formValidate.type?n("div",[n("FormItem",{attrs:{label:"appid",prop:"appid"}},[n("Input",{staticClass:"spwidth",attrs:{placeholder:"请填写appid"},model:{value:t.formValidate.appid,callback:function(e){t.$set(t.formValidate,"appid",e)},expression:"formValidate.appid"}})],1),n("FormItem",{attrs:{label:"小程序路径",prop:"pagepath"}},[n("Input",{staticClass:"spwidth",attrs:{placeholder:"请填写小程序路径"},model:{value:t.formValidate.pagepath,callback:function(e){t.$set(t.formValidate,"pagepath",e)},expression:"formValidate.pagepath"}})],1),n("FormItem",{attrs:{label:"备用网页",prop:"url"}},[n("Input",{staticClass:"spwidth",attrs:{placeholder:"请填写备用网页"},model:{value:t.formValidate.url,callback:function(e){t.$set(t.formValidate,"url",e)},expression:"formValidate.url"}})],1)],1):t._e(),"view"===t.formValidate.type?n("div",[n("FormItem",{attrs:{label:"跳转地址",prop:"url"}},[n("Input",{staticClass:"spwidth",attrs:{placeholder:"请填写跳转地址"},model:{value:t.formValidate.url,callback:function(e){t.$set(t.formValidate,"url",e)},expression:"formValidate.url"}})],1)],1):t._e()],1)],1)])],1)],1),n("Button",{attrs:{slot:"extra",size:"small",type:"error"},on:{click:t.deltMenus},slot:"extra"},[t._v("删除")])],1):t._e(),t.isTrue?n("Col",{attrs:{span:24}},[n("Button",{staticClass:"btn-add",attrs:{type:"primary"},on:{click:function(e){return t.submenus("formValidate")}}},[t._v("保存并发布")])],1):t._e()],1)],1)],1)],1)],1)],1)],1),n("Modal",{attrs:{width:"360"},model:{value:t.modal2,callback:function(e){t.modal2=e},expression:"modal2"}},[n("p",{staticClass:"color-add",attrs:{slot:"header"},slot:"header"},[n("Icon",{attrs:{type:"ios-information-circle"}}),n("span",[t._v("删除")])],1),n("div",{staticStyle:{"text-align":"center"}},[n("p",[t._v("确定删除吗?")])]),n("div",{attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"error",size:"large",long:""},on:{click:t.del}},[t._v("确定")])],1)])],1)}),[],!1,null,"d8edfc72",null);e.default=l.exports}}]);
|