1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-414c4c99"],{3968:function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"i",(function(){return n})),a.d(e,"g",(function(){return l})),a.d(e,"h",(function(){return o})),a.d(e,"e",(function(){return r})),a.d(e,"j",(function(){return c})),a.d(e,"f",(function(){return u})),a.d(e,"c",(function(){return d})),a.d(e,"d",(function(){return p})),a.d(e,"b",(function(){return m})),a.d(e,"k",(function(){return f})),a("99af");var s=a("6b6c");function i(t){return Object(s.a)({url:"/setting/system_out_account/index",method:"get",params:t})}function n(t){return Object(s.a)({url:"setting/system_out_account/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function l(t){return Object(s.a)({url:"setting/system_out_account/save",method:"post",data:t})}function o(t){return Object(s.a)({url:"setting/system_out_account/update/".concat(t.id),method:"post",data:t})}function r(){return Object(s.a)({url:"setting/system_out_interface/list",method:"get"})}function c(t){return Object(s.a)({url:"setting/system_out_account/set_up/".concat(t.id),method:"put",data:t})}function u(t){return Object(s.a)({url:"setting/system_out_interface/save/".concat(t.id),method:"post",data:t})}function d(t){return Object(s.a)({url:"setting/system_out_interface/info/".concat(t),method:"get"})}function p(t){return Object(s.a)({url:"setting/system_out_interface/edit_name",method:"PUT",data:t})}function m(t){return Object(s.a)({url:"setting/system_out_interface/del/"+t,method:"delete"})}function f(t){return Object(s.a)({url:"setting/system_out_account/text_out_url",method:"post",data:t})}},"6b91":function(t,e,a){"use strict";a.r(e);var s=a("c7eb"),i=a("1da1"),n=a("5530"),l=(a("a9e3"),a("d81d"),a("14d9"),a("a434"),a("2f62")),o=a("3968");n={name:"systemOut",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},total:0,loading:!1,roleData:{status1:""},formValidate:{roles:"",status:"",name:"",page:1,limit:20},status:"",list:[],intList:[],FromData:null,modalTitleSs:"",ids:Number,modals:!1,modalsid:"",type:0,modalsdate:{appid:"",appsecret:"",title:"",rules:[]},settingModals:!1,settingData:{switch:1,name:""},ruleValidate:{appid:[{required:!0,message:"请输入正确的账号 (4到30位之间)",trigger:"blur",min:4,max:30}],appsecret:[{required:!0,message:"请输入正确的密码 (6到32位之间)",trigger:"blur",min:6,max:32}],title:[{message:"请输入正确的描述 (不能多于200位数)",trigger:"blur",max:200}]},editValidate:{appsecret:[{required:!1,message:"请输入正确的密码 (6到32位之间)",trigger:"blur",min:6,max:32}]},props:{label:"title",disabled:"disableCheckbox"},selectIds:[]}},computed:Object(n.a)(Object(n.a)({},Object(l.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"50px"},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{onchangeIsShow:function(t){var e=this;t={id:t.id,status:t.status};Object(o.i)(t).then(function(){var t=Object(i.a)(Object(s.a)().mark((function t(a){return Object(s.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(a.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)}))},submitFail:function(){this.getList()},getList:function(){var t=this;this.loading=!0,this.formValidate.roles=this.formValidate.roles||"",Object(o.a)(this.formValidate).then(function(){var e=Object(i.a)(Object(s.a)().mark((function e(a){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.total=a.data.count,t.list=a.data.list,t.loading=!1;case 3: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)}))},add:function(){this.modals=!0,this.type=0,this.modalsdate={appid:"",appsecret:"",title:"",rules:[]},this.getIntList()},selectTree:function(t,e){},getIntList:function(t,e){var a=this,s=[];Object(o.e)().then((function(i){a.intList=i.data,t?(e.map((function(t){a.intList.map((function(e){1===e.id&&(e.checked=!0,e.disableCheckbox=!0,e.children.length)&&e.children.map((function(t){t.checked=!0,t.disableCheckbox=!0})),function t(e,a){e.length&&e.map((function(e){e.id==a&&(e.checked=!0),e.children&&t(e.children)}))}(e.children||[],t)}))})),a.selectIds=e):(a.intList.map((function(t){1===t.id&&(t.checked=!0,t.disableCheckbox=!0,s.push(t.id),t.children.length)&&t.children.map((function(t){t.checked=!0,t.disableCheckbox=!0,s.push(t.id)}))})),a.$nextTick((function(t){a.selectIds=s})))}))},edit:function(t){this.modals=!0,this.modalsdate.appid=t.appid,this.modalsdate.title=t.title,this.modalsdate.rules=t.rules.map((function(t){return Number(t)})),this.modalsid=t.id,this.type=1,this.getIntList("edit",this.modalsdate.rules)},del:function(t,e,a){var s=this;e={title:e,num:a,url:"setting/system_out_account/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){s.$message.success(t.msg),s.list.splice(a,1)})).catch((function(t){s.$message.error(t.msg)}))},setUp:function(t){this.settingModals=!0,this.settingData=t},userSearchs:function(){this.formValidate.status="all"===this.status?"":this.status,this.formValidate.page=1,this.list=[],this.getList()},submit:function(t){var e=this;Object(o.j)(this.settingData).then((function(t){e.$message.success(t.msg),e.settingModals=!1,e.getList()}))},textOutUrl:function(){var t=this;Object(o.k)(this.settingData).then((function(e){t.$message.success(e.msg)})).catch((function(e){t.$message.error(e.msg)}))},ok:function(t){var e=this,a=this.modalsid?o.h:o.g;this.$refs[t].validate((function(t){t?(e.modalsdate.rules=[],e.$refs.tree.getCheckedNodes().map((function(t){e.modalsdate.rules.push(t.id)})),e.modalsid&&(e.modalsdate.id=e.modalsid),a(e.modalsdate).then((function(t){e.modalsdate={appid:"",appsecret:"",title:"",rules:[]},e.modals=!1,e.$message.success(t.msg),e.modalsid="",e.getList()})).catch((function(t){e.$message.error(t.msg)}))):e.$message.warning("请完善数据")}))},cancel:function(){this.modalsid="",this.modalsdate={appid:"",appsecret:"",title:""},this.modals=!1},reset:function(){for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",e=t.length,a="",s=0;s<16;s++)a+=t.charAt(Math.floor(Math.random()*e));this.modalsdate.appsecret=a}}},a("e65b3"),l=a("2877"),a=Object(l.a)(n,(function(){var t=this,e=t._self._c;return e("div",[e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never"}},[e("el-form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-row",[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-button",{directives:[{name:"auth",rawName:"v-auth",value:["setting-system_admin-add"],expression:"['setting-system_admin-add']"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加账号")])],1)],1)],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"mt14",attrs:{data:t.list,"no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果","highlight-current-row":""}},[e("el-table-column",{attrs:{label:"编号",width:"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.id))])]}}])}),e("el-table-column",{attrs:{label:"账号","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.appid))])]}}])}),e("el-table-column",{attrs:{label:"描述","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.title))])]}}])}),e("el-table-column",{attrs:{label:"添加时间","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.add_time))])]}}])}),e("el-table-column",{attrs:{label:"最后登录时间","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.last_time))])]}}])}),e("el-table-column",{attrs:{label:"最后登录ip","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.ip))])]}}])}),e("el-table-column",{attrs:{label:"状态","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,value:a.row.status,size:"large","active-text":"开启","inactive-text":"关闭"},on:{change:function(e){return t.onchangeIsShow(a.row)}},model:{value:a.row.status,callback:function(e){t.$set(a.row,"status",e)},expression:"scope.row.status"}})]}}])}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"140"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("a",{on:{click:function(e){return t.setUp(a.row)}}},[t._v("设置")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.edit(a.row)}}},[t._v("编辑")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.del(a.row,"删除账号",a.$index)}}},[t._v("删除")])]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.formValidate.page,limit:t.formValidate.limit},on:{"update:page":function(e){return t.$set(t.formValidate,"page",e)},"update:limit":function(e){return t.$set(t.formValidate,"limit",e)},pagination:t.getList}}):t._e()],1)],1),e("el-dialog",{attrs:{visible:t.modals,title:0==t.type?"添加账号":"编辑账号","close-on-click-modal":!1,"show-close":!0,width:"720px"},on:{"update:visible":function(e){t.modals=e}}},[e("el-form",{ref:"modalsdate",attrs:{model:t.modalsdate,rules:0==t.type?t.ruleValidate:t.editValidate,"label-width":"80px","label-position":"right"}},[e("el-form-item",{attrs:{label:"账号:",prop:"appid"}},[e("div",{staticStyle:{display:"flex"}},[e("el-input",{attrs:{type:"text",disabled:0!=t.type},model:{value:t.modalsdate.appid,callback:function(e){t.$set(t.modalsdate,"appid",e)},expression:"modalsdate.appid"}})],1)]),e("el-form-item",{attrs:{label:"密码:",prop:"appsecret"}},[e("div",{staticStyle:{display:"flex"}},[e("el-input",{staticClass:"input",attrs:{type:"text"},model:{value:t.modalsdate.appsecret,callback:function(e){t.$set(t.modalsdate,"appsecret",e)},expression:"modalsdate.appsecret"}}),e("el-button",{staticClass:"reset",attrs:{type:"primary"},on:{click:t.reset}},[t._v("随机")])],1)]),e("el-form-item",{attrs:{label:"描述:",prop:"title"}},[e("div",{staticStyle:{display:"flex"}},[e("el-input",{attrs:{type:"textarea"},model:{value:t.modalsdate.title,callback:function(e){t.$set(t.modalsdate,"title",e)},expression:"modalsdate.title"}})],1)]),e("el-form-item",{attrs:{label:"接口权限:",prop:"title"}},[e("el-tree",{ref:"tree",attrs:{data:t.intList,props:t.props,multiple:"","show-checkbox":"","node-key":"id","default-checked-keys":t.selectIds},on:{"check-change":t.selectTree}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.cancel}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.ok("modalsdate")}}},[t._v("确 定")])],1)],1),e("el-dialog",{attrs:{visible:t.settingModals,scrollable:"",title:"设置推送",width:"1000px","close-on-click-modal":!1,"show-close":!0},on:{"update:visible":function(e){t.settingModals=e}}},[e("el-form",{ref:"settingData",staticClass:"setting-style",attrs:{model:t.settingData,rules:0==t.type?t.ruleValidate:t.editValidate,"label-width":"155px","label-position":"right"}},[e("el-form-item",{attrs:{label:"推送开关:",prop:"switch"}},[e("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.settingData.push_open,callback:function(e){t.$set(t.settingData,"push_open",e)},expression:"settingData.push_open"}})],1),e("el-form-item",{attrs:{label:"推送账号:",prop:"push_account"}},[e("div",{staticClass:"form-content"},[e("el-input",{attrs:{type:"text",placeholder:"请输入推送账号"},model:{value:t.settingData.push_account,callback:function(e){t.$set(t.settingData,"push_account",e)},expression:"settingData.push_account"}}),e("span",{staticClass:"trip"},[t._v("接受推送方获取token的账号")])],1)]),e("el-form-item",{attrs:{label:"推送密码:",prop:"push_password"}},[e("div",{staticClass:"form-content"},[e("el-input",{attrs:{type:"text",placeholder:"请输入推送密码"},model:{value:t.settingData.push_password,callback:function(e){t.$set(t.settingData,"push_password",e)},expression:"settingData.push_password"}}),e("span",{staticClass:"trip"},[t._v("接受推送方获取token的密码")])],1)]),e("el-form-item",{attrs:{label:"获取TOKEN接口:",prop:"push_token_url"}},[e("div",{staticClass:"form-content"},[e("div",{staticClass:"input-button"},[e("el-input",{attrs:{type:"text",placeholder:"请输入获取TOKEN接口"},model:{value:t.settingData.push_token_url,callback:function(e){t.$set(t.settingData,"push_token_url",e)},expression:"settingData.push_token_url"}}),e("el-button",{staticClass:"ml10",attrs:{type:"primary"},on:{click:function(e){return t.textOutUrl(t.settingData.id)}}},[t._v("测试链接")])],1),e("span",{staticClass:"trip"},[t._v("接受推送方获取token的URL地址,POST方法,传入push_account和push_password,返回token和有效时间time(秒)")])])]),e("el-form-item",{attrs:{label:"用户数据修改推送接口:",prop:"user_update_push"}},[e("div",{staticClass:"form-content"},[e("el-input",{attrs:{type:"text",placeholder:"请输入用户数据修改推送接口"},model:{value:t.settingData.user_update_push,callback:function(e){t.$set(t.settingData,"user_update_push",e)},expression:"settingData.user_update_push"}}),e("span",{staticClass:"trip"},[t._v("用户修改积分,余额,经验等将用户信息推送至该地址,POST方法")])],1)]),e("el-form-item",{attrs:{label:"订单创建推送接口:",prop:"order_create_push"}},[e("div",{staticClass:"form-content"},[e("el-input",{attrs:{type:"text",placeholder:"请输入订单创建推送接口"},model:{value:t.settingData.order_create_push,callback:function(e){t.$set(t.settingData,"order_create_push",e)},expression:"settingData.order_create_push"}}),e("span",{staticClass:"trip"},[t._v("订单创建时推送订单信息至该地址,POST方法")])],1)]),e("el-form-item",{attrs:{label:"订单支付推送接口:",prop:"order_pay_push"}},[e("div",{staticClass:"form-content"},[e("el-input",{attrs:{type:"text",placeholder:"请输入订单支付推送接口"},model:{value:t.settingData.order_pay_push,callback:function(e){t.$set(t.settingData,"order_pay_push",e)},expression:"settingData.order_pay_push"}}),e("span",{staticClass:"trip"},[t._v("订单完成支付时推送订单已支付信息至该地址,POST方法")])],1)]),e("el-form-item",{attrs:{label:"售后订单创建推送接口:",prop:"refund_create_push"}},[e("div",{staticClass:"form-content"},[e("el-input",{attrs:{type:"text",placeholder:"请输入售后订单创建推送接口"},model:{value:t.settingData.refund_create_push,callback:function(e){t.$set(t.settingData,"refund_create_push",e)},expression:"settingData.refund_create_push"}}),e("span",{staticClass:"trip"},[t._v("售后订单生成时推送售后单信息至该地址,POST方法")])],1)]),e("el-form-item",{attrs:{label:"售后订单取消推送接口:",prop:"refund_cancel_push"}},[e("div",{staticClass:"form-content"},[e("el-input",{attrs:{type:"text",placeholder:"请输入售后订单取消推送接口"},model:{value:t.settingData.refund_cancel_push,callback:function(e){t.$set(t.settingData,"refund_cancel_push",e)},expression:"settingData.refund_cancel_push"}}),e("span",{staticClass:"trip"},[t._v("售后订单取消时推送售后单取消信息至该地址,POST方法")])],1)])],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit("settingData")}}},[t._v("确定")]),e("el-button",{on:{click:function(e){t.settingModals=!1}}},[t._v("取消")])],1)],1)],1)}),[],!1,null,"98de0d1e",null);e.default=a.exports},e65b3:function(t,e,a){"use strict";a("e7e1")},e7e1:function(t,e,a){}}]);
|