iedc-go/tpt/wx/js/chunk-02439de0.c7d27472.js
2022-10-30 23:44:05 +08:00

2 lines
3.0 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-02439de0"],{"1a36":function(e,t,n){},4181:function(e,t,n){"use strict";n.r(t);n("b0c0");var a=n("f2bf"),c=function(e){return Object(a["C"])("data-v-98c3db40"),e=e(),Object(a["A"])(),e},r={class:"center"},o={class:"boxs"},u=c((function(){return Object(a["i"])("h1",{class:"boxTitle"},"个人信息",-1)})),l={class:"nextbtn"},i=Object(a["j"])("保存");function d(e,t,n,c,d,b){var f=Object(a["G"])("van-nav-bar"),s=Object(a["G"])("van-field"),m=Object(a["G"])("van-uploader"),j=Object(a["G"])("van-cell-group"),O=Object(a["G"])("van-button");return Object(a["z"])(),Object(a["h"])("div",r,[Object(a["k"])(f,{title:"个人中心","left-arrow":"",onClickLeft:c.onClickLeft},null,8,["onClickLeft"]),Object(a["i"])("div",o,[u,Object(a["k"])(j,{outset:""},{default:Object(a["P"])((function(){return[Object(a["k"])(s,{label:"真实姓名",modelValue:e.form.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.form.name=t}),placeholder:"请输入真实姓名"},null,8,["modelValue"]),Object(a["k"])(s,{label:"身份证号",modelValue:e.form.idcard,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.form.idcard=t}),placeholder:"请输入身份证号",type:"number"},null,8,["modelValue"]),Object(a["k"])(s,{name:"uploader",label:"上传头像"},{input:Object(a["P"])((function(){return[Object(a["k"])(m,{modelValue:e.avatar,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.avatar=t}),"max-count":1,"after-read":b.afterRead},null,8,["modelValue","after-read"])]})),_:1})]})),_:1})]),Object(a["i"])("div",l,[Object(a["k"])(O,{type:"primary",onClick:b.onSubmit,block:"",round:"",size:"large",color:"#2f58e4"},{default:Object(a["P"])((function(){return[i]})),_:1},8,["onClick"])])])}n("e17f");var b=n("2241"),f=(n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861"),n("c1fb")),s={name:"Center",setup:function(){var e=function(){return history.back()};return{onClickLeft:e}},data:function(){return{avatar:[],form:{name:"",avatar:null,phone:null,idcard:null}}},mounted:function(){var e=this,t=Object(f["b"])("user");null!=t&&(this.form=t),Object(f["d"])("app/user/info").then((function(t){Object(f["b"])("user",t.result),console.log(e.info),e.form=t.result}))},methods:{afterRead:function(e){var t=this;this.cutImageBase64(e.file,1e3,.8,(function(e){Object(f["d"])("app/user/upload",{file:e}).then((function(e){t.form.avatar=e.result}))}))},onSubmit:function(){Object(f["d"])("app/user/update",this.form).then((function(){Object(b["a"])({message:"修改成功"})}))},cutImageBase64:function(e,t,n,a){var c,r=window.URL||window.webkitURL,o=r.createObjectURL(e),u=new Image;u.src=o,u.onload=function(){var e=this,r=e.width,o=e.height,u=r/o;r=t||r,o=r/u;var l=document.createElement("canvas"),i=l.getContext("2d");l.setAttribute("width",r),l.setAttribute("height",o),i.drawImage(e,0,0,r,o),c=l.toDataURL("image/jpeg",n||.8),a(c)}}}},m=(n("95c3"),n("d959")),j=n.n(m);const O=j()(s,[["render",d],["__scopeId","data-v-98c3db40"]]);t["default"]=O},"95c3":function(e,t,n){"use strict";n("1a36")}}]);
//# sourceMappingURL=chunk-02439de0.c7d27472.js.map