You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
4.7 KiB
2 lines
4.7 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["subPackages/user/profile"],{136:function(e,n,t){"use strict";(function(e,n){var o=t(4);t(26);o(t(25));var r=o(t(137));e.__webpack_require_UNI_MP_PLUGIN__=t,n(r.default)}).call(this,t(1)["default"],t(2)["createPage"])},137:function(e,n,t){"use strict";t.r(n);var o=t(138),r=t(140);for(var a in r)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(a);t(142);var i,s=t(32),c=Object(s["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,"88bf8616",null,!1,o["components"],i);c.options.__file="subPackages/user/profile.vue",n["default"]=c.exports},138:function(e,n,t){"use strict";t.r(n);var o=t(139);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},139:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return r})),t.d(n,"staticRenderFns",(function(){return i})),t.d(n,"recyclableRender",(function(){return a})),t.d(n,"components",(function(){return o}));try{o={uniPopup:function(){return t.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(t.bind(null,217))}}}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 r=function(){var e=this,n=e.$createElement,t=(e._self._c,e.info?e.showImg(e.info.avatar):null);e._isMounted||(e.e0=function(n){e.showSexSelect=!0},e.e1=function(n){return e.$refs.popup.open()},e.e2=function(n){return e.$refs.popup.close()}),e.$mp.data=Object.assign({},{$root:{m0:t}})},a=!1,i=[];r._withStripped=!0},140:function(e,n,t){"use strict";t.r(n);var o=t(141),r=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=r.a},141:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=t(125),r={name:"Profile",data:function(){var e=this.getDate({format:!0});return{date:e,info:null,showSexSelect:!1,sexes:[{value:"1",text:"男"},{value:"2",text:"女"},{value:"0",text:"保密"}],today:null,showCropper:!1,nickname:"",gender:"",birthday:"",email:"",fileList1:[],startDate:"1900-1-1",endDate:"2050-1-1"}},onShow:function(){console.log(this.$store.state.user.userInfo,e.getStorageSync("userInfo")),this.getList()},computed:{},methods:{getFile:function(e){console.log(e)},getList:function(){var n=this,t=new Date;t=t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate(),this.today=t,this.Post({},"/api/user/userInfo").then((function(t){if(!t.data.birthday){var o=new Date;t.data.birthday=o.getFullYear()+"/"+(o.getMonth()+1)+"/"+o.getDate()}n.info=t.data,n.nickname=n.info.nickname,n.email=n.info.email,n.birthday=n.info.birthday,n.gender=n.info.gender,n.info.token=JSON.parse(e.getStorageSync("userInfo")).token||n.$store.state.user.userInfo.token,console.log(n.info),n.$store.commit("changeUserInfo",n.info)}))},uploadImg:function(){var n=this;e.chooseImage({success:function(t){var r=t.tempFilePaths;(0,o.pathToBase64)(r[0]).then((function(t){n.Post({method:"POST",base64:t},"/api/common/base64").then((function(t){t.data&&n.Post({avatar:t.data},"/api/user/profile").then((function(t){e.showModal({title:"提示",content:t.msg,showCancel:!1,success:function(e){e.confirm&&n.getList()}})}))}))}))}})},bindDateChange:function(e){this.birthday=e.detail.value},getDate:function(e){var n=new Date,t=n.getFullYear(),o=n.getMonth()+1,r=n.getDate();return"start"===e?t-=60:"end"===e&&(t+=2),o=o>9?o:"0"+o,r=r>9?r:"0"+r,"".concat(t,"/").concat(o,"/").concat(r)},changesex:function(e){this.gender=this.sexes[e].value,this.$refs.popup.close()},submit:function(){var n=this;e.showModal({title:"提示",content:"确认修改您的信息?",success:function(t){t.confirm&&n.Post({nickname:n.nickname,gender:n.gender,birthday:n.birthday},"/api/user/profile").then((function(t){console.log(t),1==t.code&&e.showModal({title:"提示",content:t.msg,showCancel:!1,success:function(e){e.confirm&&n.getList()}})}))}})}}};n.default=r}).call(this,t(2)["default"])},142:function(e,n,t){"use strict";t.r(n);var o=t(143),r=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=r.a},143:function(e,n,t){}},[[136,"common/runtime","common/vendor"]]]);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/subPackages/user/profile.js.map
|