design-legacy.899640c8.js 5.5 KB

1
  1. !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function r(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){i(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function i(e,r,i){return(r=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}System.register(["./index-legacy.88892f9c.js"],(function(t,e){"use strict";var i,o,n=document.createElement("style");return n.textContent=".upload-design[data-v-53b99a6e]{position:relative;width:900px;height:521px;color:var(--color-black);background:var(--color-white);box-shadow:0 0 20px rgba(0,0,0,.16);border-radius:34px;margin:210px auto 349px}.upload-design .back[data-v-53b99a6e]{position:absolute;top:40px;left:40px;cursor:pointer}.upload-design .back img[data-v-53b99a6e]{width:46px;height:46px;border-radius:50%;box-shadow:0 0 6px rgba(0,0,0,.16)}.upload-design .center[data-v-53b99a6e]{width:480px;text-align:center;margin:0 auto;padding-top:53px}.center .center-title[data-v-53b99a6e]{font-size:24px;line-height:35px;margin-bottom:12px}.center .center-sub-title[data-v-53b99a6e]{font-size:16px;line-height:22px;display:flex;justify-content:center;align-items:center}.center-sub-title .dot[data-v-53b99a6e]{width:10px;height:10px;border-radius:50%;margin-right:9px}.center-sub-title .dot.yellow[data-v-53b99a6e]{background:#FFCB20}.upload-design .center ul[data-v-53b99a6e]{margin-top:76px}.center ul li[data-v-53b99a6e]{font-size:18px;line-height:26px;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.center ul li:hover .point[data-v-53b99a6e]{background:var(--color-blue)}.center ul li:hover .el-button[data-v-53b99a6e]{border:1px solid var(--color-blue);background:var(--color-blue)}ul li .left[data-v-53b99a6e]{display:flex;flex-direction:column}li .left .point[data-v-53b99a6e]{width:11px;height:11px;background:#dbdbdb;border-radius:50%;margin-right:20px}li .right .el-button[data-v-53b99a6e]{width:86px;height:40px;color:var(--color-white);font-size:14px;background:#999;border:1px solid #999;border-radius:20px}.left .left-top[data-v-53b99a6e]{font-size:20px;line-height:28px;display:flex;align-items:center}.left .left-bottom ul[data-v-53b99a6e]{margin-top:0;display:flex;padding-left:31px}.left .left-bottom ul li[data-v-53b99a6e]{font-size:14px;line-height:20px;margin-right:10px}\n",document.head.appendChild(n),{setters:[function(t){i=t.n,o=t._}],execute:function(){t("default",i({name:"upload-design",data:function(){return{category:{},categories:[]}},mounted:function(){var t=this,e=parseInt(this.$route.query.id),r=JSON.parse(sessionStorage.getItem("conf_categories"));this.category=r.find((function(t){return t.id===e}));var i=this.$t("common.failure");this.$axios.get("/api/upload_type_list",{params:{pid:e}}).then((function(e){var r=e.data,o=r.code,n=r.msg,a=void 0===n?i:n,s=r.data,l=void 0===s?[]:s;0==o?t.categories=t.rebuild(l):t.$message.error(a||i)}))},methods:{backToInformation:function(){var t=this.$route.query.id;this.$router.push({path:"/upload/information",query:{id:t,category:"design"}})},rebuild:function(t){return t.map((function(t){return r(r({},t),{},{children:t.describe.split(" ").filter((function(t){return!!t}))})}))},toSuccess:function(){this.$router.push({path:"/upload/success"})},uploadFile:function(t){var e=this,i=this.$t("common.failure"),o=JSON.parse(sessionStorage.getItem("conf_upload"));this.$axios.post("/api/product/add_product",r(r({},o),{},{type:[this.id,t]})).then((function(t){var r=t.data,o=r.code,n=r.msg,a=void 0===n?i:n;0==o?e.toSuccess():e.$message.error(a||i)}))}},computed:{id:function(){var t=this.$route.query.id;return parseInt(t)},nameKey:function(){return this.$store.state.nameKey}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"upload-design"},[e("div",{staticClass:"back",on:{click:t.backToInformation}},[e("img",{attrs:{src:o,alt:"back"}})]),e("div",{staticClass:"center"},[e("div",{staticClass:"center-title"},[e("b",{domProps:{innerHTML:t._s(t.$t("upload.index.title"))}})]),e("div",{staticClass:"center-sub-title"},[e("div",{staticClass:"dot yellow"}),t._v(" "+t._s(t.category[t.nameKey])+" ")]),e("ul",t._l(t.categories,(function(r){return e("li",{key:r.id},[e("div",{staticClass:"left"},[e("div",{staticClass:"left-top"},[e("div",{staticClass:"point"}),e("b",[t._v(t._s(r[t.nameKey]))])]),e("div",{staticClass:"left-bottom"},[e("ul",t._l(r.children,(function(r,i){return e("li",{key:i},[t._v(" "+t._s(r)+" ")])})),0)])]),e("div",{staticClass:"right"},[e("el-button",{attrs:{type:"primary",round:""},on:{click:function(e){return t.uploadFile(r.id)}}},[t._v(t._s(t.$t("common.select")))])],1)])})),0)])])}),[],!1,null,"53b99a6e",null,null).exports)}}}))}();