require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_tool/member/modify_face"],{"4c62":function(e,t,i){},"6ead":function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{memberImg:"",newImg:"",imgurl:""}},components:{imgCropping:function(){Promise.all([i.e("common/vendor"),i.e("pages_tool/components/img-cropping/cropping")]).then(function(){return resolve(i("046f"))}.bind(null,i)).catch(i.oe)}},onShow:function(){this.storeToken?(this.memberImg=this.memberInfo.headimg,this.imgurl=this.memberInfo.headimg):this.$util.redirectTo("/pages_tool/login/login",{back:"/pages_tool/member/modify_face"},"redirectTo")},methods:{chooseImage:function(){this.$refs.imgCropping.fSelect()},myUpload:function(t){var i=this;e.request({url:this.$config.baseUrl+"/api/upload/headimgBase64",method:"POST",data:{app_type:"weapp",app_type_name:"weapp",images:t.base64},header:{"content-type":"application/x-www-form-urlencoded;application/json"},dataType:"json",responseType:"text",success:function(e){0==e.data.code&&(i.newImg=e.data.data.pic_path,i.imgurl=e.data.data.pic_path)},fail:function(){i.$util.showToast({title:"头像上传失败"})}})},previewImage:function(){e.previewImage({current:0,urls:this.images})},save:function(){var e=this;this.$api.sendRequest({url:"/api/member/modifyheadimg",data:{headimg:this.imgurl},success:function(t){0==t.code?(e.memberInfo.headimg=e.imgurl,e.$store.commit("setMemberInfo",e.memberInfo),e.$util.showToast({title:"头像修改成功"}),setTimeout((function(){e.$util.redirectTo("/pages_tool/member/info",{},"redirectTo")}),2e3)):e.$util.showToast({title:t.message})}})},uploadFace:function(){var t=this;e.chooseImage({count:1,sizeType:["compressed"],success:function(e){var i=e.tempFilePaths;t.$api.upload({url:"/api/upload/headimg",filePath:i[0],fileType:"image",success:function(e){e.code&&(t.newImg=e.data.pic_path,t.imgurl=e.data.pic_path)}})}})}}};t.default=n}).call(this,i("df3c")["default"])},"805b":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,i=(e._self._c,""==e.newImg&&e.memberImg?e.$util.img(e.memberImg):null),n=""!=e.newImg||e.memberImg?null:e.$util.getDefaultImage(),a=""!=e.newImg?e.$util.img(e.newImg):null;e._isMounted||(e.e0=function(t){e.memberImg=e.$util.getDefaultImage().head},e.e1=function(t){e.newImg=e.$util.getDefaultImage().head}),e.$mp.data=Object.assign({},{$root:{g0:i,g1:n,g2:a}})},a=[]},"93bc":function(e,t,i){"use strict";(function(e,t){var n=i("47a9");i("1dee");n(i("3240"));var a=n(i("fd29"));e.__webpack_require_UNI_MP_PLUGIN__=i,t(a.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},c3a8:function(e,t,i){"use strict";var n=i("4c62"),a=i.n(n);a.a},d950:function(e,t,i){"use strict";i.r(t);var n=i("6ead"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(o);t["default"]=a.a},fd29:function(e,t,i){"use strict";i.r(t);var n=i("805b"),a=i("d950");for(var o in a)["default"].indexOf(o)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(o);i("c3a8");var u=i("828b"),c=Object(u["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=c.exports}},[["93bc","common/runtime","common/vendor"]]]);