| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2be10634"],{5204:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticStyle:{color:"red"}},[t._v(" 0. 当前网站的回调地址:"+t._s(this.bot.webhook_url)+" 1:先设置下机器人账号和token,然后保存。 2:把机器人添加到组或频道后,要设置为管理员后,回调地址正确的话,刷新此页面,房间列表就能看到。 ")]),n("TopTitle",[t._v(" 机器人管理 ")]),n("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.bot}},[n("el-form-item",{attrs:{label:"机器人账号"}},[n("el-input",{attrs:{placeholder:"机器人账号(不是昵称)"},model:{value:t.bot.username,callback:function(e){t.$set(t.bot,"username",e)},expression:"bot.username"}})],1),n("el-form-item",{staticStyle:{width:"500px"},attrs:{label:"机器人Token"}},[n("el-input",{staticStyle:{width:"80%"},attrs:{placeholder:"机器人Token"},model:{value:t.bot.token,callback:function(e){t.$set(t.bot,"token",e)},expression:"bot.token"}})],1),n("el-form-item",[n("el-button",{staticClass:"buttonColor",attrs:{type:"primary"},on:{click:function(e){return t.update()}}},[t._v("更新")])],1)],1),n("DetailBlock",{attrs:{title:"房间列表"}},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.rooms}},[n("el-table-column",{attrs:{prop:"name",label:"房间名称"}}),n("el-table-column",{attrs:{prop:"type",label:"房间类型"}})],1)],1),n("div",[n("el-button",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"primary"},on:{click:t.showDataCreateForm}},[t._v("新增模版")]),n("DetailBlock",{attrs:{title:"模版列表"}},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData}},[n("el-table-column",{attrs:{prop:"name",label:"房间"}}),n("el-table-column",{attrs:{prop:"caption",label:"标题"}}),n("el-table-column",{attrs:{prop:"photo",label:"图片",width:"150px"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("el-image",{staticClass:"work-img",attrs:{src:t.row.photo,"preview-src-list":[t.row.photo]}})]}}])}),n("el-table-column",{attrs:{prop:"button",label:"按钮",width:"350px"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-input",{attrs:{type:"textarea",autosize:"",disabled:""},model:{value:e.row.button,callback:function(n){t.$set(e.row,"button",n)},expression:"item.row.button"}})]}}])}),n("el-table-column",{attrs:{prop:"frequency",label:"频率(分)"}}),n("el-table-column",{attrs:{prop:"is_auto",label:"新用户是否自动发送"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"title"},[t._v(t._s(e.row.is_auto?"是":"否"))])]}}])}),n("el-table-column",{attrs:{prop:"created_at",label:"创建时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"title"},[t._v(t._s(t.timestampToDatetime(e.row.created_at)))])]}}])}),n("el-table-column",{attrs:{prop:"created_at",label:"修改时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"title"},[t._v(t._s(t.timestampToDatetime(e.row.updated_at)))])]}}])}),n("el-table-column",{attrs:{prop:"opt",label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"table-operation"},[n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(n){return t.showDataEditForm(e.row)}}},[t._v(" 编辑 ")]),n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){return t.deleteListData(e.row)}}},[t._v(" 删除 ")]),n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){return t.send(e.row)}}},[t._v(" 发送 ")])],1)]}}])})],1)],1)],1),n("div",[n("Paginate",{attrs:{page:t.params.page,total:t.total},on:{currentChange:t.handleCurrentChange,sizeChange:t.handleSizeChange}})],1),n("el-dialog",{staticClass:"info-dialog",attrs:{visible:t.isShowCouponDialog,width:"1200px",title:"图片"},on:{"update:visible":function(e){t.isShowCouponDialog=e}}},[n("div",[n("el-form",{ref:"editForm",staticClass:"demo-ruleForm",attrs:{model:t.editForm,rules:t.rules,"label-width":"140px"}},[n("el-form-item",{attrs:{label:"房间",prop:"chat_id"}},[n("el-select",{attrs:{placeholder:"请选择"},on:{change:t.handleRoomChange},model:{value:t.editForm.chat_id,callback:function(e){t.$set(t.editForm,"chat_id",e)},expression:"editForm.chat_id"}},t._l(t.rooms,(function(t){return n("el-option",{key:t.chat_id,attrs:{label:t.name,value:t.chat_id}})})),1)],1),n("el-form-item",{attrs:{label:"标题",prop:"caption"}},[n("el-input",{attrs:{placeholder:"请输入标题"},model:{value:t.editForm.caption,callback:function(e){t.$set(t.editForm,"caption",e)},expression:"editForm.caption"}})],1),n("el-form-item",{attrs:{label:"图片",prop:"photo"}},[n("div",{staticClass:"upload-box"},[n("Upload",{on:{uploadSuccess:t.onUpload}},[t.editForm.photo?n("div",{staticClass:"have-img"},[n("el-image",{staticStyle:{width:"286px",height:"160px"},attrs:{src:t.editForm.photo,fit:"fill"}}),n("div",{staticClass:"shade"},[t._v(" 更换图片 ")])],1):n("div",{staticClass:"default"},[n("span",{staticClass:"iconfont icon-shangchuan",staticStyle:{"font-size":"28px"}}),n("p",[t._v("上传图片")])])])],1)]),"channel"!==t.editForm.type?n("el-form-item",{attrs:{label:"是否自动发送",prop:"is_auto"}},[n("el-switch",{attrs:{"active-text":"开启","inactive-text":"关闭"},model:{value:t.editForm.is_auto,callback:function(e){t.$set(t.editForm,"is_auto",e)},expression:"editForm.is_auto"}})],1):t._e(),"channel"===t.editForm.type?n("el-form-item",{attrs:{label:"频率(分)",prop:"frequency"}},[n("el-input",{attrs:{placeholder:"定时发送频率(分)"},model:{value:t.editForm.frequency,callback:function(e){t.$set(t.editForm,"frequency",e)},expression:"editForm.frequency"}})],1):t._e(),n("el-form-item",{attrs:{label:"按钮",prop:"button"}},[n("el-input",{attrs:{type:"textarea",autosize:"",placeholder:"按钮放在第几行 按钮文字 链接地址\n\n1 Xspace http://xspace.ws\n\n1 Xspace http://xspace.ws\n\n2 http://xspace.ws\n\n2 http://xspace.ws\n\n2 http://xspace.ws"},model:{value:t.editForm.button,callback:function(e){t.$set(t.editForm,"button",e)},expression:"editForm.button"}})],1)],1)],1),n("template",{slot:"footer"},[n("span",{staticClass:"dialog-footer"},[n("el-button",{staticClass:"dialog-cancel-btn",on:{click:function(e){t.isShowCouponDialog=!1}}},[t._v("取 消")]),n("el-button",{staticClass:"dialog-confirm-btn",attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")])],1)])],2)],1)},o=[],a=(n("c740"),n("0238")),u=n("365c"),i=n("c466"),c=n("b8d9"),l=n("8510"),s=n("9ea4"),d=n("40b2"),m=n("9dac"),b=(n("8256"),n("a897")),p=n("f201"),f={components:{Paginate:a["a"],DetailBlock:c["a"],TableSet:l["a"],TopTitle:s["a"],Filters:d["a"],Editor:b["a"],Upload:m["a"]},data:function(){return{tag:"telegram_bot",bot:{webhook_url:"",token:"",username:""},params:{page:1,page_size:this.$store.state.attr.pageSize},total:0,loading:!1,submitLoading:!1,tableData:[],rooms:[],enumerateData:{},workId:"",isShowCouponDialog:!1,editForm:{chat_id:"",frequency:"",is_auto:"",photo:"",caption:"",button:"",type:""},rules:{photo:[{required:!0,message:"请上传图片"}]},submitIndex:1,id:""}},computed:{},mounted:function(){this.getData(this.params)},methods:{handleRoomChange:function(t){var e=this.rooms.findIndex((function(e){return e.chat_id===t}));this.editForm.type=this.rooms[e].type},update:function(){var t={tag:this.tag,telegram_bot_token:this.bot.token,telegram_bot_username:this.bot.username};Object(p["U"])(t).then((function(t){}))},getData:function(t){var e=this;this.loading=!0,Object(u["Ab"])(t).then((function(t){200===t.code?(e.tableData=t.data.list,e.rooms=t.data.rooms,e.bot={webhook_url:t.data.telegram_bot.webhook_url,token:t.data.telegram_bot.telegram_bot_token,username:t.data.telegram_bot.telegram_bot_username},e.total=parseInt(t.data.listTotalCount)):e.$message.error(t.message),e.loading=!1}))},handleCurrentChange:function(t){this.params.page=t,this.getData(this.params)},handleSizeChange:function(t,e){this.params.page_size=t,this.getData(this.params)},timestampToDatetime:function(t){return Object(i["a"])(t,!0)},showDataCreateForm:function(){var t=this;this.editForm={chat_id:"",photo:"",caption:"",button:"",type:""},this.submitIndex=1,this.isShowCouponDialog=!0,this.$nextTick((function(){t.$refs.editForm.clearValidate()}))},showDataEditForm:function(t){this.editForm=t,this.id=t.id,this.submitIndex=2,this.isShowCouponDialog=!0},submit:function(){var t=this;this.$refs["editForm"].validate((function(e){if(!e)return console.log("error submit!!"),!1;if(1==t.submitIndex){var n=JSON.parse(JSON.stringify(t.editForm));Object(u["yb"])(n).then((function(e){200===e.code?(t.$message.success("新增成功"),t.getData(t.params),t.isShowCouponDialog=!1):t.$message.error(e.message)}))}else 2==t.submitIndex&&Object(u["Cb"])({id:t.id},t.editForm).then((function(e){200===e.code?(t.$message.success("编辑成功"),t.getData(t.params),t.isShowCouponDialog=!1):t.$message.error(e.message)}))}))},onUpload:function(t){this.editForm.photo=t},editContent:function(t){this.editForm.button=t},deleteListData:function(t){var e=this;this.$confirm("确认删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(u["zb"])({id:t.id}).then((function(t){200===t.code?(e.$message.success("删除成功"),e.getData(e.params)):e.$message.error(t.message)}))})).catch((function(){}))},send:function(t){var e=this;this.$confirm("确认发送吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(u["Bb"])({id:t.id}).then((function(t){200===t.code?e.$message.success("发送成功"):e.$message.error(t.message)}))})).catch((function(){}))}}},h=f,g=(n("7306"),n("2877")),O=Object(g["a"])(h,r,o,!1,null,"70918ac6",null);e["default"]=O.exports},7306:function(t,e,n){"use strict";var r=n("c164"),o=n.n(r);o.a},c164:function(t,e,n){},f201:function(t,e,n){"use strict";n.d(e,"U",(function(){return o})),n.d(e,"j",(function(){return a})),n.d(e,"zb",(function(){return u})),n.d(e,"B",(function(){return i})),n.d(e,"k",(function(){return c})),n.d(e,"vb",(function(){return l})),n.d(e,"c",(function(){return s})),n.d(e,"i",(function(){return d})),n.d(e,"f",(function(){return m})),n.d(e,"g",(function(){return b})),n.d(e,"e",(function(){return p})),n.d(e,"h",(function(){return f})),n.d(e,"b",(function(){return h})),n.d(e,"v",(function(){return g})),n.d(e,"u",(function(){return O})),n.d(e,"x",(function(){return j})),n.d(e,"w",(function(){return w})),n.d(e,"y",(function(){return v})),n.d(e,"sb",(function(){return x})),n.d(e,"fb",(function(){return _})),n.d(e,"ob",(function(){return y})),n.d(e,"o",(function(){return k})),n.d(e,"xb",(function(){return S})),n.d(e,"wb",(function(){return C})),n.d(e,"yb",(function(){return F})),n.d(e,"rb",(function(){return T})),n.d(e,"qb",(function(){return D})),n.d(e,"pb",(function(){return $})),n.d(e,"T",(function(){return P})),n.d(e,"tb",(function(){return z})),n.d(e,"R",(function(){return q})),n.d(e,"Q",(function(){return B})),n.d(e,"S",(function(){return I})),n.d(e,"A",(function(){return E})),n.d(e,"z",(function(){return U})),n.d(e,"t",(function(){return J})),n.d(e,"N",(function(){return L})),n.d(e,"P",(function(){return N})),n.d(e,"eb",(function(){return A})),n.d(e,"n",(function(){return R})),n.d(e,"a",(function(){return X})),n.d(e,"l",(function(){return H})),n.d(e,"d",(function(){return V})),n.d(e,"m",(function(){return G})),n.d(e,"O",(function(){return K})),n.d(e,"ib",(function(){return M})),n.d(e,"nb",(function(){return Q})),n.d(e,"jb",(function(){return W})),n.d(e,"lb",(function(){return Y})),n.d(e,"kb",(function(){return Z})),n.d(e,"gb",(function(){return tt})),n.d(e,"mb",(function(){return et})),n.d(e,"hb",(function(){return nt})),n.d(e,"db",(function(){return rt})),n.d(e,"cb",(function(){return ot})),n.d(e,"Z",(function(){return at})),n.d(e,"ab",(function(){return ut})),n.d(e,"bb",(function(){return it})),n.d(e,"H",(function(){return ct})),n.d(e,"D",(function(){return lt})),n.d(e,"C",(function(){return st})),n.d(e,"G",(function(){return dt})),n.d(e,"F",(function(){return mt})),n.d(e,"E",(function(){return bt})),n.d(e,"I",(function(){return pt})),n.d(e,"L",(function(){return ft})),n.d(e,"K",(function(){return ht})),n.d(e,"J",(function(){return gt})),n.d(e,"M",(function(){return Ot})),n.d(e,"r",(function(){return jt})),n.d(e,"p",(function(){return wt})),n.d(e,"s",(function(){return vt})),n.d(e,"q",(function(){return xt})),n.d(e,"V",(function(){return _t})),n.d(e,"Y",(function(){return yt})),n.d(e,"X",(function(){return kt})),n.d(e,"W",(function(){return St})),n.d(e,"ub",(function(){return Ct}));var r=n("b775");function o(t){return Object(r["b"])({url:"/common-dic/update2",method:"POST",data:t})}function a(t){return Object(r["b"])({url:"/withdrawal-net/index",method:"get",params:t})}function u(t){return Object(r["b"])({url:"/withdrawal-net/create",method:"POST",data:t})}function i(t,e){return Object(r["b"])({url:"/withdrawal-net/update",method:"put",params:t,data:e})}function c(t){return Object(r["b"])({url:"/common-dic/index2",method:"get",params:t})}function l(t){return Object(r["b"])({url:"/withdrawal-net/delete",method:"delete",params:t})}function s(t){return Object(r["b"])({url:"/coin/index",method:"get",params:t})}function d(t,e){return Object(r["b"])({url:"/coin/update",method:"put",params:t,data:e})}function m(t){return Object(r["b"])({url:"/coin-recharge-net",method:"get",params:t})}function b(t){return Object(r["b"])({url:"/coin-recharge-net/delete",method:"delete",params:t})}function p(t){return Object(r["b"])({url:"/coin/net",method:"get",params:t})}function f(t){return Object(r["b"])({url:"/coin-recharge-net/create",method:"POST",data:t})}function h(t){return Object(r["b"])({url:"/invite-level/index",method:"get",params:t})}function g(t,e){return Object(r["b"])({url:"/invite-level/update",method:"put",params:t,data:e})}function O(t){return Object(r["b"])({url:"/invite-level/create",method:"POST",data:t})}function j(t){return Object(r["b"])({url:"/invite-profit-static/index",method:"get",params:t})}function w(t){return Object(r["b"])({url:"/invite-profit-static/detail",method:"get",params:t})}function v(t){return Object(r["b"])({url:"/invite-profit-static/profit",method:"get",params:t})}function x(t){return Object(r["b"])({url:"/wallet/transfer-log",method:"get",params:t})}function _(t){return Object(r["b"])({url:"/wallet/transfer-export",method:"get",responseType:"blob",params:t})}function y(t){return Object(r["b"])({url:"/wallet/flash-exchange-log",method:"get",params:t})}function k(t){return Object(r["b"])({url:"/wallet/flash-exchange-export",method:"get",responseType:"blob",params:t})}function S(t){return Object(r["b"])({url:"/withdraw/index",method:"get",params:t})}function C(t){return Object(r["b"])({url:"/withdraw/export",method:"get",responseType:"blob",params:t})}function F(t,e){return Object(r["b"])({url:"/withdraw/update",method:"put",params:t,data:e})}function T(t){return Object(r["b"])({url:"/wallet/operate-log",method:"get",params:t})}function D(t){return Object(r["b"])({url:"/wallet/operate",method:"POST",data:t})}function $(t){return Object(r["b"])({url:"/wallet/modify-wallet-operate-remark",method:"PATCH",data:t})}function P(t){return Object(r["b"])({url:"/wallet/operate-export",method:"get",responseType:"blob",params:t})}function z(t){return Object(r["b"])({url:"/withdraw/abandon",method:"POST",data:t})}function q(t){return Object(r["b"])({url:"/recharge/confirm",method:"POST",data:t})}function B(t){return Object(r["b"])({url:"/recharge/abandon",method:"POST",data:t})}function I(t){return Object(r["b"])({url:"/recharge/export",method:"get",responseType:"blob",params:t})}function E(t){return Object(r["b"])({url:"/invite-profit-static/log",method:"get",params:t})}function U(t){return Object(r["b"])({url:"/invite-profit-static/change-type",method:"get",params:t})}function J(t){return Object(r["b"])({url:"/futures-order/index",method:"get",params:t})}function L(t){return Object(r["b"])({url:"/futures-order/close",method:"POST",data:t})}function N(t){return Object(r["b"])({url:"/futures-order/cancel-close",method:"POST",data:t})}function A(t){return Object(r["b"])({url:"/coin-control/index",method:"get",params:t})}function R(t,e){return Object(r["b"])({url:"/coin-control/update",method:"put",params:t,data:e})}function X(t){return Object(r["b"])({url:"/coin-control/create",method:"post",data:t})}function H(t,e){return Object(r["b"])({url:"/coin-control/delete",method:"DELETE",params:t,data:e})}function V(t){return Object(r["b"])({url:"/coin-control/coin",method:"get",params:t})}function G(t){return Object(r["b"])({url:"/futures-order/close-fee",method:"get",params:t})}function K(t){return Object(r["b"])({url:"/futures-order/close-all",method:"POST",params:t})}function M(t){return Object(r["b"])({url:"/tutorial/index",method:"get",params:t})}function Q(t){return Object(r["b"])({url:"/tutorial-type/index",method:"get",params:t})}function W(t){return Object(r["b"])({url:"/tutorial-type/create",method:"POST",data:t})}function Y(t,e){return Object(r["b"])({url:"/tutorial-type/update",method:"put",params:t,data:e})}function Z(t){return Object(r["b"])({url:"/tutorial-type/delete",method:"delete",params:t})}function tt(t){return Object(r["b"])({url:"/tutorial/create",method:"POST",data:t})}function et(t,e){return Object(r["b"])({url:"/tutorial/update",method:"put",params:t,data:e})}function nt(t){return Object(r["b"])({url:"/tutorial/delete",method:"delete",params:t})}function rt(t){return Object(r["b"])({url:"/task/index",method:"get",params:t})}function ot(t,e){return Object(r["b"])({url:"/task/update",method:"put",params:t,data:e})}function at(t){return Object(r["b"])({url:"/task/create",method:"POST",data:t})}function ut(t){return Object(r["b"])({url:"/task/delete",method:"delete",params:t})}function it(t){return Object(r["b"])({url:"/task-member/index",method:"get",params:t})}function ct(t){return Object(r["b"])({url:"/option-order/index",method:"get",params:t})}function lt(t){return Object(r["b"])({url:"/option-coin/index",method:"get",params:t})}function st(t){return Object(r["b"])({url:"/option-coin/coin",method:"get",params:t})}function dt(t,e){return Object(r["b"])({url:"/option-coin/update",method:"put",params:t,data:e})}function mt(t){return Object(r["b"])({url:"/option-coin/delete",method:"delete",params:t})}function bt(t){return Object(r["b"])({url:"/option-coin/create",method:"post",data:t})}function pt(t){return Object(r["b"])({url:"/option-rule/index",method:"get",params:t})}function ft(t,e){return Object(r["b"])({url:"/option-rule/update",method:"put",params:t,data:e})}function ht(t){return Object(r["b"])({url:"/option-rule/delete",method:"delete",params:t})}function gt(t){return Object(r["b"])({url:"/option-rule/create",method:"post",data:t})}function Ot(t){return Object(r["b"])({url:"/option-order/statistics",method:"get"})}function jt(t){return Object(r["b"])({url:"/footer/index",method:"get",params:t})}function wt(t){return Object(r["b"])({url:"/footer/create",method:"post",data:t})}function vt(t,e){return Object(r["b"])({url:"/footer/update",method:"put",params:t,data:e})}function xt(t){return Object(r["b"])({url:"/footer/delete",method:"delete",params:t})}function _t(t){return Object(r["b"])({url:"/spread-level/index",method:"get",params:t})}function yt(t,e){return Object(r["b"])({url:"/spread-level/update",method:"put",params:t,data:e})}function kt(t){return Object(r["b"])({url:"/spread-level/delete",method:"delete",params:t})}function St(t){return Object(r["b"])({url:"/spread-level/create",method:"post",data:t})}function Ct(t){return Object(r["b"])({url:"/withdraw-account/index",method:"get",params:t})}}}]);
|