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.1 KiB
1 line
2.1 KiB
12 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d230c26"],{ee3c: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:"divBox"},[a("el-card",{staticClass:"box-card"},[t.FormData?a("form-create",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"fc",staticClass:"formBox",attrs:{option:t.option,rule:t.FormData.rule,"handle-icon":"false"},on:{submit:t.onSubmit}}):t._e()],1)],1)},o=[],r=a("c80c"),s=(a("96cf"),a("3b8d")),c=a("30ba"),i=a.n(c),u=a("b7be"),l=a("0c6d"),m=a("83d6"),d={name:"CreatCoupon",data:function(){return{option:{form:{labelWidth:"150px"},global:{upload:{props:{onSuccess:function(t,e){200===t.status&&(e.url=t.data.src)}}}}},FormData:null,loading:!1}},components:{formCreate:i.a.$form()},mounted:function(){this.getFrom(),sessionStorage.setItem("singleChoice",0)},methods:{getFrom:function(){var t=this;this.loading=!0,this.$route.params.id?Object(u["y"])(this.$route.params.id).then(function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(a){return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.FormData=a.data,t.loading=!1;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message),t.loading=!1})):Object(u["C"])().then(function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(a){return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.FormData=a.data,t.loading=!1;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message),t.loading=!1}))},onSubmit:function(t){var e=this;l["a"][this.FormData.method.toLowerCase()](this.FormData.api,t).then((function(t){e.$message.success(t.message||"提交成功"),e.$router.push({path:"".concat(m["roterPre"],"/marketing/coupon/list")})})).catch((function(t){e.$message.error(t.message||"提交失败")}))}}},p=d,f=a("2877"),h=Object(f["a"])(p,n,o,!1,null,"66ea4727",null);e["default"]=h.exports}}]);
|