1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/ucenter/setting"],{1811:function(t,e,n){"use strict";(function(t,e){var a=n("4ea4");n("dc53");a(n("66fd"));var r=a(n("9a2b"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"3a11":function(t,e,n){"use strict";(function(t){var a=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n("beb4"));function i(t){var e=new Date,n=e.getFullYear(),a=e.getMonth()+1,r=e.getDate();return"start"===t?n-=60:"end"===t&&(n+=2),a=a>9?a:"0"+a,r=r>9?r:"0"+r,"".concat(n,"-").concat(a,"-").concat(r)}var u={components:{navbar:function(){Promise.all([n.e("common/vendor"),n.e("components/navbar/navbar")]).then(function(){return resolve(n("2445"))}.bind(null,n)).catch(n.oe)}},data:function(){return{avatar:"",username:"",sex:"男",birthday:"",startDate:i("start"),endDate:i("end"),sexIndex:0,sexArray:[{name:"男"},{name:"女"}]}},onShow:function(){var t=this,e=this.$storage.getJson("users");null==e?this.$utils.navigateTo("public/login"):this.$http.getUserInfo().then((function(e){e.status&&(t.username=e.data.nickname,t.sex=e.data.sex,t.birthday=e.data.birthday,t.avatar=e.data.avatar)}))},methods:{bindDateChange:function(t){this.birthday=t.detail.value},bindSexPickerChange:function(t){this.sexIndex=t.detail.value},formSubmit:function(t){var e=this,n=t.detail.value;n.username.length<=0?this.$utils.msg("请填写用户名"):this.$http.editUserInfo(n).then((function(t){e.$utils.msg(t.info)}))},logout:function(){this.$store.commit("DELETEUSERS","users"),this.$utils.navigateTo("public/login")},upload:function(){var e=this.$storage.getJson("users"),n=this;t.chooseImage({count:1,success:function(a){var i=a.tempFilePaths;t.uploadFile({url:r.default.uni_app_web_api_url+"/ucenter/avatar",filePath:i[0],name:"file",header:{"Auth-Token":e.token},success:function(t){var e=JSON.parse(t.data);n.avatar=e.data}})}})}}};e.default=u}).call(this,n("543d")["default"])},"423f":function(t,e,n){"use strict";var a=n("951e"),r=n.n(a);r.a},"951e":function(t,e,n){},"9a2b":function(t,e,n){"use strict";n.r(e);var a=n("d5e5"),r=n("c07e");for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("423f");var u=n("f0c5"),o=Object(u["a"])(r["default"],a["b"],a["c"],!1,null,"2552942e",null,!1,a["a"],void 0);e["default"]=o.exports},c07e:function(t,e,n){"use strict";n.r(e);var a=n("3a11"),r=n.n(a);for(var i in a)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=r.a},d5e5:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return a}));var a={navbar:function(){return Promise.all([n.e("common/vendor"),n.e("components/navbar/navbar")]).then(n.bind(null,"2445"))}},r=function(){var t=this.$createElement;this._self._c},i=[]}},[["1811","common/runtime","common/vendor"]]]);
|