require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_user/user/addDocRecord"],{"05fa":function(t,e,n){"use strict";n.r(e);var i=n("f4df"),o=n.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(c);e["default"]=o.a},"33b2":function(t,e,n){},"3a19":function(t,e,n){"use strict";var i=n("33b2"),o=n.n(i);o.a},5232:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("584a");i(n("3240"));var o=i(n("a778"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"74cb":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=(this._self._c,this.imgList.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},o=[]},a778:function(t,e,n){"use strict";n.r(e);var i=n("74cb"),o=n("05fa");for(var c in o)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(c);n("3a19");var a=n("828b"),s=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=s.exports},f4df:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("4837"),o={data:function(){return{imgList:[],docId:null,form:{images:[],title:""}}},onLoad:function(t){this.docId=t.docId},methods:{contentInput:function(t){this.form.title=t.detail.value},chooseImage:function(e){var n=this;t.chooseImage({count:4,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(e){t.uploadFile({url:t.getStorageSync("requestPath")+"/app/common/uploadOSS",filePath:e.tempFilePaths[0],name:"file",success:function(t){n.imgList.push(JSON.parse(t.data).url)}})}})},previewImage:function(e){t.previewImage({urls:this.imgList,current:this.imgList[e]})},delImg:function(e){var n=this;t.showModal({title:"提示",content:"确定要删除这张图片吗？",cancelText:"取消",confirmText:"确定",success:function(t){t.confirm&&n.imgList.splice(e,1)}})},submit:function(){if(""!=this.form.title){t.showLoading({title:"正在处理中"});var e={docId:this.docId,title:this.form.title,images:this.imgList.toString()};(0,i.addDocRecord)(e).then((function(e){200==e.code?(t.hideLoading(),t.showToast({icon:"success",title:e.msg}),t.$emit("refreshDocRecord"),setTimeout((function(){t.navigateBack({delta:1})}),200)):t.showToast({icon:"none",title:e.msg})}),(function(t){}))}else t.showToast({icon:"none",title:"请输入健康记录内容"})}}};e.default=o}).call(this,n("df3c")["default"])}},[["5232","common/runtime","common/vendor","pages_user/common/vendor"]]]);