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 lines
21 KiB
1 lines
21 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c2bdc85c"],{"0829":function(t,e,a){},"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),Math.easeInOutQuad=function(t,e,a,n){return t/=n/2,t<1?a/2*t*t+e:(t--,-a/2*(t*(t-2)-1)+e)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function r(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(t,e,a){var o=i(),s=t-o,c=20,u=0;e="undefined"===typeof e?500:e;var l=function t(){u+=c;var i=Math.easeInOutQuad(u,o,s,e);r(i),u<e?n(t):a&&"function"===typeof a&&a()};l()}},"27ae":function(t,e,a){(function(a){var n,r;(function(e,a){t.exports=a(e)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof a?a:this,(function(a){"use strict";a=a||{};var i,o=a.Base64,s="2.6.4",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=function(t){for(var e={},a=0,n=t.length;a<n;a++)e[t.charAt(a)]=a;return e}(c),l=String.fromCharCode,d=function(t){if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?l(192|e>>>6)+l(128|63&e):l(224|e>>>12&15)+l(128|e>>>6&63)+l(128|63&e)}e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return l(240|e>>>18&7)+l(128|e>>>12&63)+l(128|e>>>6&63)+l(128|63&e)},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(t){return t.replace(m,d)},f=function(t){var e=[0,2,1][t.length%3],a=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0),n=[c.charAt(a>>>18),c.charAt(a>>>12&63),e>=2?"=":c.charAt(a>>>6&63),e>=1?"=":c.charAt(63&a)];return n.join("")},A=a.btoa&&"function"==typeof a.btoa?function(t){return a.btoa(t)}:function(t){if(t.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return t.replace(/[\s\S]{1,3}/g,f)},h=function(t){return A(p(String(t)))},g=function(t){return t.replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"})).replace(/=/g,"")},v=function(t,e){return e?g(h(t)):h(t)},b=function(t){return v(t,!0)};a.Uint8Array&&(i=function(t,e){for(var a="",n=0,r=t.length;n<r;n+=3){var i=t[n],o=t[n+1],s=t[n+2],u=i<<16|o<<8|s;a+=c.charAt(u>>>18)+c.charAt(u>>>12&63)+("undefined"!=typeof o?c.charAt(u>>>6&63):"=")+("undefined"!=typeof s?c.charAt(63&u):"=")}return e?g(a):a});var y,w=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T=function(t){switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),a=e-65536;return l(55296+(a>>>10))+l(56320+(1023&a));case 3:return l((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return l((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},C=function(t){return t.replace(w,T)},B=function(t){var e=t.length,a=e%4,n=(e>0?u[t.charAt(0)]<<18:0)|(e>1?u[t.charAt(1)]<<12:0)|(e>2?u[t.charAt(2)]<<6:0)|(e>3?u[t.charAt(3)]:0),r=[l(n>>>16),l(n>>>8&255),l(255&n)];return r.length-=[0,0,2,1][a],r.join("")},O=a.atob&&"function"==typeof a.atob?function(t){return a.atob(t)}:function(t){return t.replace(/\S{1,4}/g,B)},x=function(t){return O(String(t).replace(/[^A-Za-z0-9\+\/]/g,""))},k=function(t){return C(O(t))},j=function(t){return String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},D=function(t){return k(j(t))};a.Uint8Array&&(y=function(t){return Uint8Array.from(x(j(t)),(function(t){return t.charCodeAt(0)}))});var E=function(){var t=a.Base64;return a.Base64=o,t};if(a.Base64={VERSION:s,atob:x,btoa:A,fromBase64:D,toBase64:v,utob:p,encode:v,encodeURI:b,btou:C,decode:D,noConflict:E,fromUint8Array:i,toUint8Array:y},"function"===typeof Object.defineProperty){var Q=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};a.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Q((function(){return D(this)}))),Object.defineProperty(String.prototype,"toBase64",Q((function(t){return v(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",Q((function(){return v(this,!0)})))}}return a["Meteor"]&&(Base64=a.Base64),t.exports?t.exports.Base64=a.Base64:(n=[],r=function(){return a.Base64}.apply(e,n),void 0===r||(t.exports=r)),{Base64:a.Base64}}))}).call(this,a("c8ba"))},"282d":function(t,e,a){"use strict";var n=a("5530"),r=a("9256"),i={page:{method:"POST",url:"/information/list"},update:{method:"PUT",url:"/information"},save:{method:"POST",url:"/information"},delete:{method:"DELETE",url:"/information"},activityPush:{method:"POST",url:"/app-push/notify"}};e["a"]={page:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.page),{},{data:t,custom:e}))},save:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.save),{},{data:t,custom:e}))},update:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.update),{},{data:t,custom:e}))},delete:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.delete),{},{data:t,custom:e}))},activityPush:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r["a"])(Object(n["a"])(Object(n["a"])({},i.activityPush),{},{data:t,custom:e}))}}},"3d86":function(t,e){t.exports="data:image/png;base64,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"},"4fad":function(t,e,a){var n=a("23e7"),r=a("6f53").entries;n({target:"Object",stat:!0},{entries:function(t){return r(t)}})},"6dc6":function(t,e,a){"use strict";var n=a("0829"),r=a.n(n);r.a},"6f53":function(t,e,a){var n=a("83ab"),r=a("df75"),i=a("fc6a"),o=a("d1e7").f,s=function(t){return function(e){var a,s=i(e),c=r(s),u=c.length,l=0,d=[];while(u>l)a=c[l++],n&&!o.call(s,a)||d.push(t?[a,s[a]]:s[a]);return d}};t.exports={entries:s(!0),values:s(!1)}},"7d3e":function(t,e,a){"use strict";var n=a("f847"),r=a.n(n);r.a},9256:function(t,e,a){"use strict";a("99af"),a("4160"),a("caad"),a("4fad"),a("d3b7"),a("159b");var n=a("5530"),r=a("bc3a"),i=a.n(r),o=a("5c96"),s=a("5657");a("27ae");function c(t,e){"ECONNABORTED"===t.code?Object(o["Message"])({message:"请求超时"}):t.response&&t.response.data?Object(o["Message"])({message:t.response.data}):t.message&&Object(o["Message"])({message:t.message}),e(t)}function u(t,e){t.data.isError&&(4e4===t.data.code||40001===t.data.code||40002===t.data.code||40003===t.data.code||40005===t.data.code||40006===t.data.code||40008===t.data.code?o["MessageBox"].alert(t.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):o["Message"].error(t.data.msg)),e(t)}i.a.interceptors.request.use((function(t){var e=!1!==t.headers["X-isToken"]||t.headers["X-isToken"],a=s["a"].get("TOKEN","");a&&e&&(t.headers.token="Bearer "+a);var n="ceres_admin_web",r="ceres_admin_web";return t.headers["Authorization"]="Basic ".concat("".concat(n,":").concat(r)),t}),(function(t){return Promise.reject(t)})),i.a.interceptors.response.use((function(t){return t}),(function(t){return Promise.reject(t)}));var l=function(t){console.log(t,"opts");var e={ts:Date.now()},a=t.method.toUpperCase(),r={method:a,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(t.url),responseType:t.responseType||"",timeout:2e4},o=["PUT","POST","PATCH"];o.includes(a)?r.data=t.data||{}:r.params=Object(n["a"])(Object(n["a"])({},e),t.data||{}),t.formData&&(r.transformRequest=[function(t){var e=new FormData;return t&&Object.entries(t).forEach((function(t){e.append(t[0],t[1])})),e}]);var s=new Promise((function(t,e){i()(r).then((function(e){u(e,t)})).catch((function(t){c(t,e)}))}));return s};e["a"]=l},a623:function(t,e,a){"use strict";var n=a("23e7"),r=a("b727").every,i=a("a640"),o=a("ae40"),s=i("every"),c=o("every");n({target:"Array",proto:!0,forced:!s||!c},{every:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},a93a:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"group-page"},[a("div",{staticClass:"toolbar"},[a("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-zoom-in"},on:{click:t.getActivityTweetsList}},[t._v(" 查询 ")]),a("el-button",{attrs:{type:"warning",size:"mini",icon:"el-icon-refresh-right"},on:{click:t.reset}},[t._v(" 重置 ")]),a("el-button",{attrs:{type:"goon",size:"mini",icon:"el-icon-circle-plus-outline"},on:{click:t.addGroup}},[t._v(" 新增 ")])],1),a("div",{staticClass:"group-content"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{id:"tables",data:t.tableData.list,"row-key":"id"}},[a("el-table-column",{attrs:{prop:"mainTitle",label:"活动标题",align:"center",width:"200"}}),a("el-table-column",{attrs:{prop:"viceTitle",label:"活动简介",align:"center",width:"200"}}),a("el-table-column",{attrs:{prop:"createTime",label:"发布时间",align:"center",width:"200"}}),a("el-table-column",{attrs:{prop:"createTime",label:"推送",align:"center",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"primary"},on:{click:function(a){return t.tuisong(e.row.id)}}},[t._v("推送文章")])]}}])}),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),t.editGroup(e.row)}}},[t._v(" 编辑 ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),t.deleteGroup(e.row)}}},[t._v(" 删除 ")])]}}])})],1)],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.tableData.total>0,expression:"tableData.total > 0"}],attrs:{limit:t.formParams.pageSize,page:t.formParams.pageNum,total:Number(t.tableData.total)},on:{"update:limit":function(e){return t.$set(t.formParams,"pageSize",e)},"update:page":function(e){return t.$set(t.formParams,"pageNum",e)},pagination:t.fetch}}),a("grope-edit",{ref:"edit",attrs:{"dialog-visible":t.dialog.isVisible,type:t.dialog.type},on:{close:t.editClose,success:t.getActivityTweetsList}})],1)},r=[],i=(a("96cf"),a("1da1")),o=a("282d"),s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{staticClass:"group-dialog",attrs:{"close-on-click-modal":!1,title:t.title,type:t.type,visible:t.isVisible,width:"800px",top:"50px"},on:{"update:visible":function(e){t.isVisible=e}}},[a("el-form",{ref:"params",attrs:{model:t.params,"label-width":"100px",rules:t.rules}},[a("el-form-item",{attrs:{label:"活动标题",prop:"mainTitle"}},[a("el-input",{staticStyle:{width:"200px"},model:{value:t.params.mainTitle,callback:function(e){t.$set(t.params,"mainTitle",e)},expression:"params.mainTitle"}})],1),a("el-form-item",{attrs:{label:"活动简介",prop:"viceTitle"}},[a("el-input",{staticStyle:{width:"200px"},model:{value:t.params.viceTitle,callback:function(e){t.$set(t.params,"viceTitle",e)},expression:"params.viceTitle"}})],1),a("el-form-item",{attrs:{label:"作者",prop:"name"}},[a("el-input",{staticStyle:{width:"200px"},model:{value:t.params.name,callback:function(e){t.$set(t.params,"name",e)},expression:"params.name"}})],1),a("el-form-item",{attrs:{label:"作者头像",prop:"avatar"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{headers:t.headers,data:t.dataObj,action:t.action,"show-file-list":!1,"on-success":t.handleAvatarSuccessAvatar}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1),t.params.avatar?a("img",{staticClass:"avatar",staticStyle:{"margin-top":"5px"},attrs:{src:t.params.avatar,width:"80"}}):t._e()],1),a("el-form-item",{attrs:{label:"活动封面图",prop:"coverImg"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{headers:t.headers,data:t.dataObj,action:t.action,"show-file-list":!1,"on-success":t.handleAvatarSuccess}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")])],1),t.params.coverImg?a("img",{staticClass:"avatar",staticStyle:{"margin-top":"5px"},attrs:{src:t.params.coverImg,width:"80"}}):t._e()],1),a("el-form-item",{attrs:{label:"开始时间",prop:"startTime"}},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"选择日期时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.params.startTime,callback:function(e){t.$set(t.params,"startTime",e)},expression:"params.startTime"}})],1),a("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"选择日期时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.params.endTime,callback:function(e){t.$set(t.params,"endTime",e)},expression:"params.endTime"}})],1),a("el-form-item",{attrs:{label:"富文本",prop:"content"}},[t.isVisible?a("Tinymce",{ref:"content",attrs:{height:200},model:{value:t.params.content,callback:function(e){t.$set(t.params,"content",e)},expression:"params.content"}}):t._e()],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(e){t.isVisible=!1}}},[t._v(" "+t._s(t.$t("common.cancel"))+" ")]),a("el-button",{attrs:{plain:"",type:"primary"},on:{click:function(e){return t.submitForm("params")}}},[t._v(" "+t._s(t.$t("common.confirm"))+" ")])],1)],1)},c=[],u=(a("b0c0"),a("5657")),l=a("8256"),d={components:{Tinymce:l["a"]},props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"}},data:function(){return{options:[],sizeForm:{},headers:{Authorization:""},action:"".concat("https://pos.admin.api.lotus-wallet.com","/file/upload"),dataObj:{folderId:1},params:{id:"",mainTitle:"",viceTitle:1,coverImg:"",startTime:"",endTime:"",content:"",name:"",avatar:""},rules:{groupName:[{required:!0,message:"不可为空",trigger:"blur"}]}}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){return"add"===this.type?"新建活动":"查看活动"}},created:function(){this.headers.token="Bearer "+u["a"].get("TOKEN",""),this.headers.tenant="0000"},methods:{close:function(){this.$emit("close")},reset:function(){this.params={}},submitForm:function(t){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.$refs[t].validate((function(t){t&&("add"===e.type?e.addGroup():"edit"===e.type&&e.updateGroup())}));case 1:case"end":return a.stop()}}),a)})))()},addGroup:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var a,n,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.params.type=2,a={name:t.params.name,avatar:t.params.avatar},t.params.author=JSON.stringify(a),e.next=5,o["a"].save(t.params);case 5:n=e.sent,r=n.data,i=r.code,0===i&&(t.isVisible=!1,t.$message({message:t.$t("tips.createSuccess"),type:"success"}),t.$emit("success"));case 9:case"end":return e.stop()}}),e)})))()},updateGroup:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var a,n,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a={name:t.params.name,avatar:t.params.avatar},t.params.author=JSON.stringify(a),t.params.type=2,e.next=5,o["a"].update(t.params);case 5:n=e.sent,r=n.data,i=r.code,0===i&&(t.isVisible=!1,t.$message({message:t.$t("tips.updateSuccess"),type:"success"}),t.$emit("success"));case 9:case"end":return e.stop()}}),e)})))()},handleAvatarSuccess:function(t){var e=t.data.url;this.params.coverImg=e},handleAvatarSuccessAvatar:function(t){var e=t.data.url;this.params.avatar=e},setParams:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.params={},t&&(this.params=JSON.parse(JSON.stringify(t)),this.params.name=JSON.parse(this.params.author).name,this.params.avatar=JSON.parse(this.params.author).avatar)}}},m=d,p=(a("6dc6"),a("2877")),f=Object(p["a"])(m,s,c,!1,null,"48281faf",null),A=f.exports,h=a("333d"),g={name:"ActivityTweets",components:{GropeEdit:A,Pagination:h["a"]},data:function(){return{loading:!0,formParams:{pageNum:1,pageSize:10,searchKey:"",type:2,state:""},dialog:{type:"add",isVisible:!1},tableData:[]}},created:function(){this.getActivityTweetsList()},mounted:function(){},methods:{tuisong:function(t){var e=this;this.$confirm("你确定推送消息吗",this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"info"}).then((function(){o["a"].activityPush({relational:t,typed:2}).then((function(t){t.data.isSuccess&&e.$message({type:"success",message:"推送成功"})}))})).catch((function(){}))},getActivityTweetsList:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var a,n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loading=!0,e.next=3,o["a"].page(t.formParams);case 3:a=e.sent,n=a.data,r=n.code,0===r&&(t.tableData=n.data,t.loading=!1,console.log(t.tableData,"this.tableData"));case 7:case"end":return e.stop()}}),e)})))()},fetch:function(){this.getActivityTweetsList()},reset:function(){this.getActivityTweetsList()},addGroup:function(){this.dialog={type:"add",isVisible:!0},this.$refs.edit.setParams(null)},editClose:function(){this.dialog.isVisible=!1},editGroup:function(t){t.id,t.mainTitle,t.viceTitle,t.coverImg,t.startTime,t.endTime,t.content,t.state;this.dialog={type:"edit",isVisible:!0},this.$refs.edit.setParams(t)},delete:function(t){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){var n,r,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,o["a"].delete(t);case 2:n=a.sent,r=n.data,i=r.code,0===i&&(e.$message({message:e.$t("tips.deleteSuccess"),type:"success"}),e.getActivityTweetsList());case 6:case"end":return a.stop()}}),a)})))()},deleteGroup:function(t){var e=this,a=t.id;this.$confirm(this.$t("tips.confirmDelete"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){e.delete({id:a})})).catch((function(){}))}}},v=g,b=(a("7d3e"),Object(p["a"])(v,n,r,!1,null,"13b35758",null));e["default"]=b.exports},f847:function(t,e,a){}}]); |