|
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/info"],{253:function(e,n,t){"use strict";(function(e,n){var o=t(4);t(26);o(t(25));var r=o(t(254));e.__webpack_require_UNI_MP_PLUGIN__=t,n(r.default)}).call(this,t(1)["default"],t(2)["createPage"])},254:function(e,n,t){"use strict";t.r(n);var o=t(255),r=t(257);for(var u in r)["default"].indexOf(u)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(u);t(259);var i,c=t(32),a=Object(c["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],i);a.options.__file="pages/user/info.vue",n["default"]=a.exports},255:function(e,n,t){"use strict";t.r(n);var o=t(256);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"]}))},256: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 u})),t.d(n,"components",(function(){return o}));try{o={uAvatar:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-avatar/u-avatar")]).then(t.bind(null,359))},"u-Form":function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u--form/u--form")]).then(t.bind(null,287))},uFormItem:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-form-item/u-form-item")]).then(t.bind(null,293))},"u-Input":function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u--input/u--input")]).then(t.bind(null,309))},uIcon:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(t.bind(null,342))},uInput:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-input/u-input")]).then(t.bind(null,301))},uActionSheet:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-action-sheet/u-action-sheet")]).then(t.bind(null,412))},uDatetimePicker:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-datetime-picker/u-datetime-picker")]).then(t.bind(null,420))},uButton:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-button/u-button")]).then(t.bind(null,261))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.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;e._self._c;e._isMounted||(e.e0=function(n){e.showGender=!0},e.e1=function(n){e.showDate=!0})},u=!1,i=[];r._withStripped=!0},257:function(e,n,t){"use strict";t.r(n);var o=t(258),r=t.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(u);n["default"]=r.a},258:function(e,n,t){"use strict";(function(e){var o=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(t(56)),u=o(t(58)),i=o(t(11));function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var s={data:function(){return{checked:!0,showDate:!1,showGender:!1,pickerDate:Number(new Date),form:{name:"",gender:"",date:"",height:"",weight:""},genderList:[{name:"男",subname:"",color:"#000",fontSize:"16"},{name:"女",subname:"",color:"#000",fontSize:"16"}],rules:{name:[{required:!0,message:"请输入昵称",trigger:["blur","change"]}],gender:[{required:!0,message:"请选择性别",trigger:["blur","change"]}],date:[{required:!0,message:"请选择出生日期",trigger:["blur","change"]}]},action:""}},onReady:function(){this.$refs.uForm.setRules(this.rules),this.$refs.datetimePicker.setFormatter(this.formatter)},computed:{themeColor:function(){return this.$themeColor},bgthemeColor:function(){return"#333"},avatarSrc:function(){return this.$store.state.user.userInfo.avatarSrc||t(217)},minDate:function(){var e=new Date,n=new Date(e.getFullYear()-50,e.getMonth(),e.getDate());return n},maxDate:function(){var e=new Date,n=new Date(e.getFullYear()-10,e.getMonth(),e.getDate());return n.getTime()},actionText:function(){return"update"===this.action?"修改资料":"创建用户"},userInfo:function(){return this.$store.state.user.userInfo}},onLoad:function(e){e&&(this.action=e.action,"update"===e.action&&this.userInfo&&(this.form=a({},this.userInfo),this.pickerDate=new Date(this.userInfo.date)),console.log("this.action",this.action))},methods:{formatter:function(e,n){return"year"===e?"".concat(n,"年"):"month"===e?"".concat(n,"月"):"day"===e?"".concat(n,"日"):n},onSubmit:function(){console.log("this.form",this.form);var n=this;this.$refs.uForm.validate().then(function(){var t=(0,u.default)(r.default.mark((function t(o){return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:o&&(e.showLoading({title:"update"===n.action?"修改中":"创建中",mask:!0}),setTimeout((function(){n.$store.commit("SET_USERINFO",n.form),n.$store.commit("saveAll"),e.showToast({title:"update"===n.action?"修改成功":"创建成功",icon:"success"})}),1e3),setTimeout((function(){e.switchTab({url:"/pages/index/index"})}),2e3));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){console.log("errors",e)}))},selectClickGender:function(e){console.log("e",e),this.form.gender=e.name,this.showGender=!1},onConfirmDate:function(e){console.log("date",e),this.form.date=this.$util.formateDate("yyyy-mm-dd",e.value),this.showDate=!1},onCancelDate:function(){this.showDate=!1}}};n.default=s}).call(this,t(2)["default"])},259:function(e,n,t){"use strict";t.r(n);var o=t(260),r=t.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(u);n["default"]=r.a},260:function(e,n,t){}},[[253,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/user/info.js.map
|