pyxis-page/dist/js/chunk-41e8e32c.6f9b8701.js
2021-06-11 15:56:39 +08:00

2 lines
13 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41e8e32c"],{"04a9":function(t,e,n){},"333d":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[n("el-pagination",t._b({attrs:{background:t.background,"current-page":t.currentPage,"page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},r=[],i=n("d4ec"),o=n("bee2"),u=n("262e"),s=n("2caf"),c=n("9ab4"),l=n("1b40"),p=(n("4795"),function(t,e,n,a){return t/=a/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)}),d=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}(),f=function(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t},m=function(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop},h=function(t,e,n){var a=m(),r=t-a,i=20,o=0;e="undefined"===typeof e?500:e;var u=function t(){o+=i;var u=p(o,a,r,e);f(u),o<e?d(t):n&&"function"===typeof n&&n()};u()},b=function(t){Object(u["a"])(n,t);var e=Object(s["a"])(n);function n(){return Object(i["a"])(this,n),e.apply(this,arguments)}return Object(o["a"])(n,[{key:"currentPage",get:function(){return this.page},set:function(t){this.$emit("update:page",t)}},{key:"pageSize",get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}},{key:"handleSizeChange",value:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&h(0,800)}},{key:"handleCurrentChange",value:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&h(0,800)}}]),n}(l["c"]);Object(c["a"])([Object(l["b"])({required:!0})],b.prototype,"total",void 0),Object(c["a"])([Object(l["b"])({default:1})],b.prototype,"page",void 0),Object(c["a"])([Object(l["b"])({default:20})],b.prototype,"limit",void 0),Object(c["a"])([Object(l["b"])({default:function(){return[10,20,30,50]}})],b.prototype,"pageSizes",void 0),Object(c["a"])([Object(l["b"])({default:"total, sizes, prev, pager, next, jumper"})],b.prototype,"layout",void 0),Object(c["a"])([Object(l["b"])({default:!0})],b.prototype,"background",void 0),Object(c["a"])([Object(l["b"])({default:!0})],b.prototype,"autoScroll",void 0),Object(c["a"])([Object(l["b"])({default:!1})],b.prototype,"hidden",void 0),b=Object(c["a"])([Object(l["a"])({name:"Pagination"})],b);var v=b,g=v,y=(n("34cc"),n("0c7c")),_=Object(y["a"])(g,a,r,!1,null,"2f4afb68",null);e["a"]=_.exports},"34cc":function(t,e,n){"use strict";n("04a9")},"4c9b":function(t,e,n){"use strict";n.d(e,"k",(function(){return r})),n.d(e,"i",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"g",(function(){return l})),n.d(e,"j",(function(){return p})),n.d(e,"h",(function(){return d})),n.d(e,"f",(function(){return f})),n.d(e,"b",(function(){return m}));var a=n("2b0e"),r=new a["default"],i="event_shop_puzzles_update",o="event_activity_update",u="event_exam_update",s="event_game_update",c="event_coupon_update",l="event_puzzle_update",p="event_shop_update",d="event_role_update",f="event_mail_update",m="event_announce_update"},"6be4":function(t,e,n){},"9ce3":function(t,e,n){"use strict";n("6be4")},c3d3:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-form",{ref:"filterForm",staticClass:"filter",attrs:{inline:!0,model:t.filterForm}},[n("el-form-item",{attrs:{label:"关键字",prop:"key"}},[n("el-input",{attrs:{placeholder:"关键字"},model:{value:t.filterForm.key,callback:function(e){t.$set(t.filterForm,"key",e)},expression:"filterForm.key"}})],1),n("el-form-item",{attrs:{label:"审核状态"}},[n("el-select",{staticClass:"w100",attrs:{placeholder:"所有"},model:{value:t.filterForm.publish,callback:function(e){t.$set(t.filterForm,"publish",e)},expression:"filterForm.publish"}},[n("el-option",{attrs:{value:"all",label:"所有"}},[t._v("所有")]),n("el-option",{attrs:{value:"true",label:"已审核"}},[t._v("已审核")]),n("el-option",{attrs:{value:"false",label:"未审核"}},[t._v("未审核")])],1)],1),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("查询")]),n("el-button",{on:{click:t.resetFilterForm}},[t._v("重置")])],1)],1),n("router-link",{attrs:{to:"/system/create"}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopman:edit"],expression:"['shopman:edit']"}],attrs:{type:"primary",icon:"el-icon-edit"}},[t._v(" 添加 ")])],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%","margin-top":"30px"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{width:"180px",align:"center",label:"添加时间"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("span",[t._v(t._s(t._f("parseTime")(a.createdAt)))])]}}])}),n("el-table-column",{attrs:{"min-width":"200px",label:"名称"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("router-link",{staticClass:"link-type",attrs:{to:"/system/edit/"+a._id}},[n("span",[t._v(t._s(a.name))])])]}}])}),n("el-table-column",{attrs:{label:"编号"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("span",[t._v(t._s(a.numid))])]}}])}),n("el-table-column",{attrs:{label:"ID"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("router-link",{staticClass:"link-type",attrs:{to:"/system/edit/"+a._id}},[n("span",[t._v(t._s(a.sid))])])]}}])}),n("el-table-column",{attrs:{label:"区域"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("span",[t._v(t._s(a.areaStr))])]}}])}),n("el-table-column",{attrs:{prop:"publish",align:"center",label:"审核状态"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("el-tag",{attrs:{size:"small",type:a.publish?"info":"danger"}},[t._v(t._s(t.formPublish(a.publish)))])]}}])}),n("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"320"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopman:review"],expression:"['shopman:review']"}],staticStyle:{"margin-left":"10px"},attrs:{type:e.row.publish?"warning":"success",size:"small"},on:{click:function(n){return t.publishShop(e)}}},[t._v(" "+t._s(e.row.publish?"取消审核":"通过审核")+" ")]),n("router-link",{attrs:{to:"/system/edit/"+e.row._id}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopman:edit"],expression:"['shopman:edit']"}],staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"small",icon:"el-icon-edit"}},[t._v(" 编辑 ")])],1),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopman:delete"],expression:"['shopman:delete']"}],staticStyle:{"margin-left":"10px"},attrs:{type:"danger",size:"small"},on:{click:function(n){return t.handleDelete(e)}}},[t._v(" "+t._s(t.$t("permission.delete"))+" ")])]}}])})],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],attrs:{total:t.total,page:t.listQuery.page,limit:t.listQuery.limit},on:{"update:page":function(e){return t.$set(t.listQuery,"page",e)},"update:limit":function(e){return t.$set(t.listQuery,"limit",e)},pagination:t.getList}})],1)},r=[],i=n("1da1"),o=n("d4ec"),u=n("bee2"),s=n("262e"),c=n("2caf"),l=(n("a434"),n("96cf"),n("9ab4")),p=n("1b40"),d=n("333d"),f=n("db85"),m=n("d257"),h=n("6ebf"),b=n("4c9b"),v=function(t){Object(s["a"])(n,t);var e=Object(c["a"])(n);function n(){var t;return Object(o["a"])(this,n),t=e.apply(this,arguments),t.total=0,t.list=[],t.listLoading=!0,t.listQuery={page:1,limit:20,key:"",publish:"all"},t.filterForm={key:"",publish:"all"},t}return Object(u["a"])(n,[{key:"created",value:function(){var t=this;this.getList(),b["k"].$on(b["j"],(function(){t.getList()}))}},{key:"beforeDestory",value:function(){b["k"].$off(b["j"])}},{key:"getList",value:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.listLoading=!0,t.next=3,Object(f["k"])(this.listQuery);case 3:e=t.sent,n=e.data,this.listLoading=!1,this.list=n.records,this.total=n.total;case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"formPublish",value:function(t){return t?"已审核":"未审核"}},{key:"handleDelete",value:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(e){var n,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.$index,a=e.row,t.prev=1,t.next=4,this.$confirm("确认删除该".concat(h["a"].tc("main.shop"),"?"),"Warning",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 4:return t.next=6,Object(f["b"])(a._id);case 6:this.list.splice(n,1),this.$message({type:"success",message:"删除成功!"}),t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](1);case 12:case"end":return t.stop()}}),t,this,[[1,10]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"publishShop",value:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(e){var n,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.row,a=n.publish?"确认取消该".concat(h["a"].tc("main.shop"),"的审核状态?"):"确定通过该".concat(h["a"].tc("main.shop"),"的审核?"),t.prev=2,t.next=5,this.$confirm(a,"Warning",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 5:return t.next=7,Object(f["p"])({id:n._id,publish:!n.publish});case 7:n.publish=!n.publish,b["k"].$emit(b["j"],{}),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](2),console.log(t.t0);case 14:case"end":return t.stop()}}),t,this,[[2,11]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"search",value:function(){this.filterData()}},{key:"filterData",value:function(){this.listQuery.key=this.filterForm.key,this.listQuery.page=1,this.listQuery.publish=this.filterForm.publish,this.getList()}},{key:"resetFilterForm",value:function(){this.$refs.filterForm.resetFields()}}]),n}(p["c"]);v=Object(l["a"])([Object(p["a"])({name:"ShopList",components:{Pagination:d["a"]},filters:{parseTime:function(t){return Object(m["d"])(t)}}})],v);var g=v,y=g,_=(n("9ce3"),n("0c7c")),j=Object(_["a"])(y,a,r,!1,null,"262453ec",null);e["default"]=j.exports},db85:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"k",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return u})),n.d(e,"m",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"n",(function(){return l})),n.d(e,"f",(function(){return p})),n.d(e,"g",(function(){return d})),n.d(e,"q",(function(){return f})),n.d(e,"p",(function(){return m})),n.d(e,"c",(function(){return h})),n.d(e,"l",(function(){return b})),n.d(e,"h",(function(){return v})),n.d(e,"o",(function(){return g})),n.d(e,"i",(function(){return y})),n.d(e,"r",(function(){return _})),n.d(e,"j",(function(){return j}));var a=n("b32d"),r={name:"",address:"",logo:"",local:0,qtypes:[]},i=function(t){return Object(a["a"])({url:"/api/shops",method:"post",params:t})},o=function(t,e){return Object(a["a"])({url:"/api/shop/".concat(t),method:"get",params:e})},u=function(){return Object(a["a"])({url:"/api/myshop",method:"get"})},s=function(t){return Object(a["a"])({url:"/api/shop/save",method:"post",data:t})},c=function(t){return Object(a["a"])({url:"/api/shop/".concat(t,"/delete"),method:"post"})},l=function(t){return Object(a["a"])({url:"/api/shop/gameinfo/save",method:"post",data:t})},p=function(t){return Object(a["a"])({url:"/api/shop/gameinfo",method:"post",data:t})},d=function(t){return Object(a["a"])({url:"/api/shop/gameqr",method:"post",data:t})},f=function(t){return Object(a["a"])({url:"/api/shop/save_qtype",method:"post",data:t})},m=function(t){return Object(a["a"])({url:"/api/shop/publish",method:"post",data:t})},h=function(t){return Object(a["a"])({url:"/api/shop/gametheme",method:"post",data:t})},b=function(t){return Object(a["a"])({url:"/api/shop/gametheme/save",method:"post",data:t})},v=function(t){return Object(a["a"])({url:"/api/shop/lottery",method:"post",data:t})},g=function(t){return Object(a["a"])({url:"/api/shop/lottery_update",method:"post",data:t})},y=function(t){return Object(a["a"])({url:"/api/shop/share",method:"post",data:t})},_=function(t){return Object(a["a"])({url:"/api/shop/share_update",method:"post",data:t})},j=function(t){return Object(a["a"])({url:"/api/shop/game_users",method:"post",data:t})}}}]);
//# sourceMappingURL=chunk-41e8e32c.6f9b8701.js.map