(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/complete-info/complete-info"],{228:function(e,n,t){"use strict";(function(e,n){var r=t(4);t(26);r(t(25));var s=r(t(229));e.__webpack_require_UNI_MP_PLUGIN__=t,n(s.default)}).call(this,t(1)["default"],t(2)["createPage"])},229:function(e,n,t){"use strict";t.r(n);var r=t(230),s=t(232);for(var a in s)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return s[e]}))}(a);t(235);var o,i=t(32),u=Object(i["default"])(s["default"],r["render"],r["staticRenderFns"],!1,null,"2e93e9cc",null,!1,r["components"],o);u.options.__file="pages/complete-info/complete-info.vue",n["default"]=u.exports},230:function(e,n,t){"use strict";t.r(n);var r=t(231);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"]}))},231:function(e,n,t){"use strict";var r;t.r(n),t.d(n,"render",(function(){return s})),t.d(n,"staticRenderFns",(function(){return o})),t.d(n,"recyclableRender",(function(){return a})),t.d(n,"components",(function(){return r}));var s=function(){var e=this,n=e.$createElement,t=(e._self._c,0==e.showEdit&&e.userInfo.sex?e.getSex(e.userInfo.sex):null);e._isMounted||(e.e0=function(n){e.showEdit=0},e.e1=function(n){e.showEdit=0}),e.$mp.data=Object.assign({},{$root:{m0:t}})},a=!1,o=[];s._withStripped=!0},232:function(e,n,t){"use strict";t.r(n);var r=t(233),s=t.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(a);n["default"]=s.a},233:function(e,n,t){"use strict";(function(e){var r=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=t(71),a=r(t(234)),o={data:function(){return{sexList:[{name:"男",val:1},{name:"女",val:2}],index:"",userSex:"",user_id:"",userInfo:"",showEdit:0,address:"",defaultAds:"",areaCode:"+86",areaName:"中国大陆",codeList:a.default}},onLoad:function(e){this.getUser(e.user_id),this.user_id=e.user_id},onShow:function(){this.otherFun(),this.address||this.getAds()},filters:{},methods:{addressList:function(){e.navigateTo({url:"../../pagesA/pages/ads-list/ads-list?user_id="+this.user_id})},otherFun:function(e){e&&(this.address=e)},getAds:function(){var n=this;(0,s.getAds)({id:this.user_id}).then((function(t){200==t.code?(n.store=t.data.store,n.defaultAds=t.data.address):e.showModal({content:t.data,showCancel:!1})}))},getSex:function(e){return!!e&&(1==e?"男":"女")},edit:function(e){this.showEdit=e},save:function(){var n=this.userInfo;n.user_id=this.user_id,(0,s.completeUser)(n).then((function(n){200==n.code?e.showModal({content:"保存成功",showCancel:!1,success:function(n){n.confirm&&e.reLaunch({url:"../user-manage/user-manage"})}}):e.showModal({content:n.data||"保存失败",showCancel:!1})}))},getUser:function(n){var t=this;(0,s.getUser)({user_id:n}).then((function(n){if(200==n.code){var r=n.data,s=r.name,a=r.nickname,o=r.phone,i=r.sex,u=r.remark,d=r.area_code;if(t.userInfo={name:s,nickname:a,phone:o,sex:i||"",remark:u||""},t.areaCode=d||"+86",t.areaCode){var c=t.areaCode.indexOf("+"),f=t.areaCode.substring(c+1);t.codeList[0].list.map((function(e){e.code===Number(f)&&(t.areaName=e.name)}))}}else e.showModal({content:n.data||"获取用户信息失败",showCancel:!1})}))},bindPickerChange:function(e){var n=e.target.value;this.userSex=this.sexList[n].name,this.userInfo.sex=n+1}}};n.default=o}).call(this,t(2)["default"])},235:function(e,n,t){"use strict";t.r(n);var r=t(236),s=t.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(a);n["default"]=s.a},236:function(e,n,t){}},[[228,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/complete-info/complete-info.js.map