(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-API-upload-file-upload-file"],{"11c6":function(e,a,t){"use strict";t.r(a);var n=t("3ab7"),i=t("c227");for(var o in i)"default"!==o&&function(e){t.d(a,e,(function(){return i[e]}))}(o);t("1e5a");var c,s=t("f0c5"),u=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"79207c37",null,!1,n["a"],c);a["default"]=u.exports},"1e5a":function(e,a,t){"use strict";var n=t("5fd0"),i=t.n(n);i.a},"3ab7":function(e,a,t){"use strict";var n,i=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("v-uni-view",[t("page-head",{attrs:{title:e.title}}),t("v-uni-view",{staticClass:"uni-padding-wrap uni-common-mt"},[t("v-uni-view",{staticClass:"demo"},[e.imageSrc?[t("v-uni-image",{staticClass:"image",attrs:{src:e.imageSrc,mode:"widthFix"}})]:[t("v-uni-view",{staticClass:"uni-hello-addfile",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.chooseImage.apply(void 0,arguments)}}},[e._v("+ 选择图片")])]],2)],1)],1)},o=[];t.d(a,"b",(function(){return i})),t.d(a,"c",(function(){return o})),t.d(a,"a",(function(){return n}))},"5fd0":function(e,a,t){var n=t("7965");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=t("4f06").default;i("a76fc734",n,!0,{sourceMap:!1,shadowMode:!1})},7965:function(e,a,t){var n=t("24fb");a=n(!1),a.push([e.i,".image[data-v-79207c37]{width:100%}.demo[data-v-79207c37]{background:#fff;padding:%?50?%}",""]),e.exports=a},9628:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n={data:function(){return{title:"uploadFile",imageSrc:""}},onUnload:function(){this.imageSrc=""},methods:{chooseImage:function(){var e=this;uni.chooseImage({count:1,sizeType:["compressed"],sourceType:["album"],success:function(a){console.log("chooseImage success, temp path is",a.tempFilePaths[0]);var t=a.tempFilePaths[0];uni.uploadFile({url:"https://unidemo.dcloud.net.cn/upload",filePath:t,fileType:"image",name:"data",success:function(a){console.log("uploadImage success, res is:",a),uni.showToast({title:"上传成功",icon:"success",duration:1e3}),e.imageSrc=t},fail:function(e){console.log("uploadImage fail",e),uni.showModal({content:e.errMsg,showCancel:!1})}})},fail:function(e){console.log("chooseImage fail",e)}})}}};a.default=n},c227:function(e,a,t){"use strict";t.r(a);var n=t("9628"),i=t.n(n);for(var o in n)"default"!==o&&function(e){t.d(a,e,(function(){return n[e]}))}(o);a["default"]=i.a}}]);