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.
yanzong/public/js/collector.9fae09b0.js

1 line
15 KiB

6 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["collector"],{"19b1":function(e,t,a){},"556c":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("a-form-item",{staticClass:"mt-30",attrs:{label:"APIKEY",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["config.99api.apiKey",{rules:[{required:!0,min:2,message:"请输入APIKEY"}]}],expression:"['config.99api.apiKey', { rules: [{ required: true, min: 2, message: '请输入APIKEY' }] }]"}],attrs:{placeholder:"请输入APIKEY"}})],1),t("a-form-item",{attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],1)],1)],1)},n=[],i=(a("d3b7"),a("ddb0"),a("88bc")),o=a.n(i),l=a("ca00"),s=a("f585"),u={data:function(){return{labelCol:{span:4},wrapperCol:{span:10},isLoading:!1,form:this.$form.createForm(this),key:"collector",record:{}}},created:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.isLoading=!0,s["a"](this.key).then((function(t){e.record=t.data.values,e.setFieldsValue()})).finally((function(){return e.isLoading=!1}))},setFieldsValue:function(){var e=this.record,t=this.$nextTick,a=this.form;!Object(l["f"])(a.getFieldsValue())&&t((function(){a.setFieldsValue(o()(e,["config"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,s["b"](this.key,{form:e}).then((function(e){return t.$message.success(e.message,1.5)})).finally((function(){return t.isLoading=!1}))}}},c=u,d=(a("9385"),a("2877")),f=Object(d["a"])(c,r,n,!1,null,"4f21524e",null);t["default"]=f.exports},"59aa":function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return o}));var r=a("5c06"),n=new r["a"]([{key:"PHYSICAL",name:"实物商品",value:10},{key:"VIRTUAL",name:"虚拟商品",value:20}]),i=(new r["a"]([{key:"SINGLE",name:"单规格",value:10},{key:"MULTI",name:"多规格",value:20}]),new r["a"]([{key:"NORMAL",name:"进行中",value:10},{key:"COMPLETED",name:"导入完成",value:20}])),o=new r["a"]([{key:"NORMAL",name:"进行中",value:10},{key:"COMPLETED",name:"采集完成",value:20}])},"5c28":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"container"},[t("a-card",{staticClass:"mb-20",attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-alert",{staticClass:"mb-30",attrs:{showIcon:!0,message:"功能说明",banner:""}},[t("template",{slot:"description"},[t("p",[e._v("支持采集淘宝、天猫、京东、拼多多、1688平台的商品,需先进行API接口配置")])])],2),t("a-form",{staticClass:"my-form",attrs:{form:e.myForm},on:{submit:e.handleSubmit}},[t("a-form-item",{attrs:{label:"商品链接",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["urls",{rules:[{required:!0,message:"请输入商品链接"}]}],expression:"['urls', { rules: [{ required: true, message: '请输入商品链接' }] }]"}],attrs:{"auto-size":{minRows:6,maxRows:12}}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("请填写要采集的商品链接,请用回车换行间隔,每次最多100个;")]),t("a-popover",{attrs:{title:"其他说明"}},[t("template",{slot:"content"},[t("p",{staticClass:"mb-5"},[e._v("1. 商品采集数据来源于第三方,采集完成后建议手动编辑价格、库存等敏感信息后再上架;")]),t("p",{staticClass:"mb-5"},[e._v("2. 京东商品无法获取SKU的信息,默认写入主商品价格,所以务必手动编辑后再上架;")]),t("p",{staticClass:"mb-5"},[e._v(