(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/my/userinfo"],{126:function(e,n,t){"use strict";(function(e){t(5);r(t(4));var n=r(t(127));function r(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t(1)["createPage"])},127:function(e,n,t){"use strict";t.r(n);var r=t(128),u=t(130);for(var o in u)"default"!==o&&function(e){t.d(n,e,(function(){return u[e]}))}(o);t(132);var a,s=t(11),i=Object(s["default"])(u["default"],r["render"],r["staticRenderFns"],!1,null,null,null,!1,r["components"],a);i.options.__file="pages/my/userinfo.vue",n["default"]=i.exports},128:function(e,n,t){"use strict";t.r(n);var r=t(129);t.d(n,"render",(function(){return r["render"]})),t.d(n,"staticRenderFns",(function(){return r["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return r["recyclableRender"]})),t.d(n,"components",(function(){return r["components"]}))},129:function(e,n,t){"use strict";var r;t.r(n),t.d(n,"render",(function(){return u})),t.d(n,"staticRenderFns",(function(){return a})),t.d(n,"recyclableRender",(function(){return o})),t.d(n,"components",(function(){return r}));try{r={uRadioGroup:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-radio-group/u-radio-group")]).then(t.bind(null,473))},uRadio:function(){return t.e("uview-ui/components/u-radio/u-radio").then(t.bind(null,480))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件")}var u=function(){var e=this,n=e.$createElement;e._self._c},o=!1,a=[];u._withStripped=!0},130:function(e,n,t){"use strict";t.r(n);var r=t(131),u=t.n(r);for(var o in r)"default"!==o&&function(e){t.d(n,e,(function(){return r[e]}))}(o);n["default"]=u.a},131:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=u(t(13));function u(e){return e&&e.__esModule?e:{default:e}}var o={data:function(){return{phone:"",avatar:"../../static/logo.png",userName:"",nickName:"",userId:"",realName:"",weChatId:"",password:"",platform:"",createTime:"",money:"",jiFen:"",status:"",zhiFuBao:"",zhiFuBaoName:"",sex:1,age:0}},onLoad:function(e){this.getUserInfo()},methods:{goMyAddress:function(){e.navigateTo({url:"../jifen/myaddress"})},uploadImg:function(){var n=e.getStorageSync("token");if(n){var t=this,r=null;e.showActionSheet({itemList:["查看头像","从相册选择图片"],success:function(n){var u=n.tapIndex;if(0===u){var o=t.avatar,a=[];a.push(o),e.previewImage({urls:a})}else 1===u&&e.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album"],success:function(n){e.showLoading({title:"上传中..."});var u=e.getStorageSync("token");e.getStorageSync("userId");e.uploadFile({url:t.config("APIHOST1")+"/alioss/upload",filePath:n.tempFilePaths[0],header:{token:u},name:"file",success:function(n){r=JSON.parse(n.data),t.avatar=r.data,e.hideLoading()}})}})}})}else this.goLoginInfo()},config:function(e){var n=null;if(e){var t=e.split(".");if(n=t.length>1?r.default[t[0]][t[1]]||null:r.default[e]||null,null==n){var u=cache.get("web_config");u&&(n=t.length>1?u[t[0]][t[1]]||null:u[e]||null)}}return n},getUserInfo:function(){var n=this;this.$Request.get("/sys/user/info").then((function(t){0==t.code&&(n.$queue.setData("avatar",t.user.userEntity.avatar),n.$queue.setData("userId",t.user.userId),n.$queue.setData("userName",t.user.userEntity.userName),n.$queue.setData("phone",t.user.userEntity.phone),n.$queue.setData("age",t.user.userEntity.age),n.sex=t.user.userEntity.sex,n.age=t.user.userEntity.age,n.phone=t.user.userEntity.phone,n.avatar=t.user.userEntity.avatar,n.userName=t.user.userEntity.userName,null==n.userName?n.userName=t.user.userEntity.nickName:n.userName=t.user.userEntity.userName),e.hideLoading()}))},messagebtn:function(){var n=this;n.userName?n.phone?e.showModal({title:"温馨提示",content:"确定保存信息",success:function(t){t.confirm&&n.$Request.postJson("/shop/shopmoney/updateUser",{userName:n.userName,avatar:n.avatar,phone:n.phone,sex:n.sex,age:n.age}).then((function(n){0===n.code?(e.showToast({title:"保存成功",icon:"none"}),setTimeout((function(){e.navigateBack()}),1e3)):e.showToast({title:n.msg,icon:"none"})}))}}):e.showToast({title:"联系电话不能为空",icon:"none"}):e.showToast({title:"用户名不能为空",icon:"none"})}}};n.default=o}).call(this,t(1)["default"])},132:function(e,n,t){"use strict";t.r(n);var r=t(133),u=t.n(r);for(var o in r)"default"!==o&&function(e){t.d(n,e,(function(){return r[e]}))}(o);n["default"]=u.a},133:function(e,n,t){}},[[126,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/userinfo.js.map