(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/archives/upcard"],{"14b5":function(t,n,i){"use strict";(function(t){i("02cf");e(i("66fd"));var n=e(i("98b7"));function e(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,i("543d")["createPage"])},"18be":function(t,n,i){"use strict";i.r(n);var e=i("3bcb"),a=i.n(e);for(var o in e)"default"!==o&&function(t){i.d(n,t,(function(){return e[t]}))}(o);n["default"]=a.a},"3bcb":function(t,n,i){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=a(i("a34a"));function a(t){return t&&t.__esModule?t:{default:t}}function o(t,n,i,e,a,o,r){try{var u=t[o](r),s=u.value}catch(c){return void i(c)}u.done?n(s):Promise.resolve(s).then(e,a)}function r(t){return function(){var n=this,i=arguments;return new Promise((function(e,a){var r=t.apply(n,i);function u(t){o(r,e,a,u,s,"next",t)}function s(t){o(r,e,a,u,s,"throw",t)}u(void 0)}))}}var u={onLoad:function(t){void 0!=t.id&&(this.archivesId=t.id,""!=JSON.parse(t.data)[0].url&&""!=JSON.parse(t.data)[1].url&&(this.imgListpoint=JSON.parse(t.data)))},onShow:function(){},data:function(){return{archivesId:"",imgListpoint:[],imgList:[]}},methods:{ChooseImage:function(){var n=this;t.chooseImage({count:2,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(t){0!=n.imgList.length?(n.imgList=n.imgList.concat(t.tempFilePaths),n.$request.upload("/api/v1/common/uploadFile",n.imgList[n.imgList.length-1],{}).then((function(t){n.imgListpoint.push(JSON.parse(t).data),console.log(n.imgListpoint)}))):(n.imgList=t.tempFilePaths,n.$request.upload("/api/v1/common/uploadFile",n.imgList[0],{}).then((function(t){n.imgListpoint.push(JSON.parse(t).data)})))}})},DelImg:function(n){var i=this;t.showModal({title:"提示",content:"确定要删除吗？",cancelText:"再想想",confirmText:"删除",success:function(t){t.confirm&&(i.imgListpoint.splice(n.currentTarget.dataset.index,1),i.imgListpoint=i.imgListpoint)}})},upcard:function(){var n=r(e.default.mark((function n(){var i;return e.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(2==this.imgListpoint.length){n.next=3;break}return t.showToast({title:"请上传身份证完整",icon:"none"}),n.abrupt("return",!1);case 3:if(2!=this.imgListpoint.length){n.next=8;break}return n.next=6,this.$request.post("/api/v1/patient/submitCardImg",{id:this.archivesId,card_img_url:this.imgListpoint[0].url,card_back_img_url:this.imgListpoint[1].url});case 6:i=n.sent,0==i.status&&(t.showToast({title:"上传成功",icon:"none",duration:1500}),setTimeout((function(){t.navigateBack({delta:1})}),1500));case 8:case"end":return n.stop()}}),n,this)})));function i(){return n.apply(this,arguments)}return i}()}};n.default=u}).call(this,i("543d")["default"])},"587f":function(t,n,i){},"5f08":function(t,n,i){"use strict";var e=i("587f"),a=i.n(e);a.a},"98b7":function(t,n,i){"use strict";i.r(n);var e=i("c608"),a=i("18be");for(var o in a)"default"!==o&&function(t){i.d(n,t,(function(){return a[t]}))}(o);i("5f08");var r,u=i("f0c5"),s=Object(u["a"])(a["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],r);n["default"]=s.exports},c608:function(t,n,i){"use strict";var e;i.d(n,"b",(function(){return a})),i.d(n,"c",(function(){return o})),i.d(n,"a",(function(){return e}));var a=function(){var t=this,n=t.$createElement;t._self._c},o=[]}},[["14b5","common/runtime","common/vendor"]]]);