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 line
2.4 KiB
1 line
2.4 KiB
3 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0b6e79"],{"1ec2":function(t,a,e){"use strict";e.r(a);var n=e("b7be"),s={data:function(){return{columns:[{title:"类型",slot:"type"},{title:"天数",key:"days"},{title:"奖励积分",key:"point"},{title:"奖励经验",key:"exp"},{title:"操作",slot:"action"}],rewards:[],total:0,tableParams:{type:"0",page:1,limit:15}}},created:function(){this.signRewards()},methods:{signRewards:function(){var t=this;Object(n.Hb)(this.tableParams).then((function(a){t.rewards=a.data.list,t.total=a.data.count}))},tabsChange:function(){this.tableParams.page=1,this.signRewards()},pageChange:function(t){this.tableParams.page=t,this.signRewards()},add:function(){var t=this;this.$modalForm(Object(n.i)({type:this.tableParams.type})).then((function(){return t.signRewards()}))},edit:function(t){var a=this;this.$modalForm(Object(n.G)(t.id)).then((function(){return a.signRewards()}))},remove:function(t,a,e){var n=this,s={title:a,num:e,url:"/setting/sign/del_rewards/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(s).then((function(t){n.$Message.success(t.msg),n.signRewards()})).catch((function(t){n.$Message.error(t.msg)}))}}},r=e("2877"),i=Object(r.a)(s,(function(){var t=this,a=t._self._c;return a("Card",{attrs:{bordered:!1,"dis-hover":""}},[a("Tabs",{on:{"on-click":t.tabsChange},model:{value:t.tableParams.type,callback:function(a){t.$set(t.tableParams,"type",a)},expression:"tableParams.type"}},[a("TabPane",{attrs:{label:"连续签到奖励",name:"0"}}),a("TabPane",{attrs:{label:"累积签到奖励",name:"1"}})],1),a("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加"+t._s("0"===t.tableParams.type?"连续":"累积")+"签到奖励")]),a("Table",{staticClass:"mt20",attrs:{columns:t.columns,data:t.rewards},scopedSlots:t._u([{key:"type",fn:function(a){var e=a.row;return[t._v("\n "+t._s("0"===t.tableParams.type?"连续":"累积")+"签到"+t._s(e.days)+"天奖励\n ")]}},{key:"action",fn:function(e){var n=e.row,s=e.index;return[a("a",{on:{click:function(a){return t.edit(n)}}},[t._v("编辑")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(a){return t.remove(n,"删除".concat("0"==n.type?"连续":"累积","签到奖励"),s)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.tableParams.limit},on:{"on-change":t.pageChange}})],1)],1)}),[],!1,null,null,null);a.default=i.exports}}]);
|