cpop_nftmeta_sdm/web/admin-web/static/js/chunk-5179ce42.77bc643e.js
2024-10-25 16:17:26 +08:00

1 line
4.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5179ce42","chunk-2d0b9575","chunk-2d0b9575"],{3310:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));n("7f7f"),n("28a5");var o=n("40b3"),r=n.n(o),i=n("b775"),a=n("323e"),c=n.n(a),l="uthmeta-1300336827",s="ap-guangzhou",u=new r.a({getAuthorization:function(t,e){Object(i["a"])({url:"/admin/common/file/security_key",method:"GET"}).then((function(t){var n=t.code,o=t.data;"success"==n?e({TmpSecretId:o.credentials.tmpSecretId,TmpSecretKey:o.credentials.tmpSecretKey,SecurityToken:o.credentials.sessionToken,StartTime:o.startTime,ExpiredTime:o.expiredTime,ScopeLimit:!0}):console.error("cos密钥获取失败")}))}}),d=function(t){return c.a.start(),new Promise((function(e,n){var o=t.uid,r=t.name.split("."),i=r[r.length-1];u.putObject({Bucket:l,Region:s,Key:"".concat(o,".").concat(i),StorageClass:"STANDARD",Body:t},(function(t,o){c.a.done(),t?n(t):e("https://".concat(o.Location))}))}))}},b9c2:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:"协议内容",visible:t.show,width:"600px"},on:{"update:visible":function(e){t.show=e}}},[n("el-form",{ref:"form",attrs:{model:t.form,"label-width":"90px",rules:t.rules}},[n("el-form-item",{attrs:{label:"类型",prop:"type"}},[n("el-select",{staticStyle:{width:"300px"},attrs:{placeholder:"请选择服务类型"},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},t._l(t.types,(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),n("el-form-item",{attrs:{label:"标题",prop:"title"}},[n("el-input",{model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"内容",prop:"content"}},[n("TextEditor",{model:{value:t.form.content,callback:function(e){t.$set(t.form,"content",e)},expression:"form.content"}})],1)],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{type:"primary"},on:{click:t.saveHandler}},[t._v(t._s(t.btn_title))]),t._v(" "),n("el-button",{on:{click:t.close}},[t._v("取消")])],1)],1)},r=[],i=n("cd01"),a=n("e1c8"),c=n("50fa"),l={components:{customSelect:a["default"],TextEditor:c["default"]},name:"zProtocolContentForm",data:function(){return{form:{},show:!1,loading:!1,rules:{title:[{required:!0,trigger:"blur",message:"请输入标题"}]},types:[{value:"SERVE",label:"服务协议"},{value:"PRIVACY",label:"隐私协议"}]}},computed:{formState:function(){return!this.form.id},btn_title:function(){return this.formState?"新建":"保存"}},methods:{open:function(t){if(t){var e=Object.assign({},t);this.form=e}else this.form={type:"SERVE"};this.show=!0},close:function(){this.show=!1},saveHandler:function(){var t=this;this.$refs.form.validate((function(e){e&&(t.loading=!0,t.formState?t.createHandler():t.editHandler())}))},createHandler:function(){var t=this;Object(i["a"])(this.form).then((function(e){"success"===e.code?(t.finish(),t.$message.success("新建成功!")):t.$message.error("新建失败")})).finally((function(){t.loading=!1}))},editHandler:function(){var t=this;Object(i["d"])(this.form).then((function(e){"success"===e.code?(t.finish(),t.$message.success("编辑成功!")):t.$message.error("编辑失败")})).finally((function(){t.loading=!1}))},finish:function(){this.close(),this.$emit("reloadTable")}}},s=l,u=n("2877"),d=Object(u["a"])(s,o,r,!1,null,null,null);e["default"]=d.exports},cd01:function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return c}));var o=n("b775");function r(t){return Object(o["a"])({url:"/admin/zprotocolcontent/page",method:"get",params:t})}function i(t){return Object(o["a"])({url:"/admin/zprotocolcontent",method:"post",data:t})}function a(t){return Object(o["a"])({url:"/admin/zprotocolcontent",method:"put",data:t})}function c(t){return Object(o["a"])({url:"/admin/zprotocolcontent/"+t,method:"delete"})}}}]);