|
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/info"],{252:function(e,t,n){"use strict";(function(e,t){var o=n(4);n(26);o(n(25));var r=o(n(253));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n(1)["default"],n(2)["createPage"])},253:function(e,t,n){"use strict";n.r(t);var o=n(254),r=n(256);for(var u in r)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(u);n(258);var i,a=n(32),c=Object(a["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],i);c.options.__file="pages/user/info.vue",t["default"]=c.exports},254:function(e,t,n){"use strict";n.r(t);var o=n(255);n.d(t,"render",(function(){return o["render"]})),n.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(t,"components",(function(){return o["components"]}))},255:function(e,t,n){"use strict";var o;n.r(t),n.d(t,"render",(function(){return r})),n.d(t,"staticRenderFns",(function(){return i})),n.d(t,"recyclableRender",(function(){return u})),n.d(t,"components",(function(){return o}));try{o={uAvatar:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-avatar/u-avatar")]).then(n.bind(null,358))},"u-Form":function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u--form/u--form")]).then(n.bind(null,286))},uFormItem:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-form-item/u-form-item")]).then(n.bind(null,292))},"u-Input":function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u--input/u--input")]).then(n.bind(null,308))},uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,341))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-input/u-input")]).then(n.bind(null,300))},uActionSheet:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-action-sheet/u-action-sheet")]).then(n.bind(null,395))},uDatetimePicker:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-datetime-picker/u-datetime-picker")]).then(n.bind(null,403))},uButton:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-button/u-button")]).then(n.bind(null,260))}}}catch(a){if(-1===a.message.indexOf("Cannot find module")||-1===a.message.indexOf(".vue"))throw a;console.error(a.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,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.showGender=!0},e.e1=function(t){e.showDate=!0})},u=!1,i=[];r._withStripped=!0},256:function(e,t,n){"use strict";n.r(t);var o=n(257),r=n.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(u);t["default"]=r.a},257:function(e,t,n){"use strict";(function(e){var o=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(56)),u=o(n(58)),i=o(n(11));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={data:function(){return{checked:!0,showDate:!1,showGender:!1,pickerDate:Number(new Date),form:{name:"",gender:"",date:"",height:"",weight:"",avatarSrc:""},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:"",avatarSrcLoca:n(217)}},onReady:function(){this.$refs.uForm.setRules(this.rules),this.$refs.datetimePicker.setFormatter(this.formatter)},computed:{themeColor:function(){return this.$themeColor},bgthemeColor:function(){return"#333"},minDate:function(){var e=new Date,t=new Date(e.getFullYear()-50,e.getMonth(),e.getDate());return t},maxDate:function(){var e=new Date,t=new Date(e.getFullYear()-10,e.getMonth(),e.getDate());return t.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=c({},this.userInfo),this.pickerDate=new Date(this.userInfo.date),this.avatarSrcLoca=this.userInfo.avatarSrc),console.log("this.action",this.action))},methods:{formatter:function(e,t){return"year"===e?"".concat(t,"年"):"month"===e?"".concat(t,"月"):"day"===e?"".concat(t,"日"):t},onSubmit:function(){console.log("this.form",this.form);var t=this;this.$refs.uForm.validate().then(function(){var n=(0,u.default)(r.default.mark((function n(o){return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:o&&(e.showLoading({title:"update"===t.action?"修改中":"创建中",mask:!0}),setTimeout((function(){t.$store.commit("SET_USERINFO",t.form),t.$store.commit("saveAll"),e.showToast({title:"update"===t.action?"修改成功":"创建成功",icon:"success"})}),1e3),setTimeout((function(){e.switchTab({url:"/pages/index/index"})}),2e3));case 1:case"end":return n.stop()}}),n)})));return function(e){return n.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},chooseavatar:function(e){this.avatarSrcLoca=e.detail.avatarUrl,this.form.avatarSrc=e.detail.avatarUrl,console.log("头像路径:",this.avatarSrcLoca)}}};t.default=s}).call(this,n(2)["default"])},258:function(e,t,n){"use strict";n.r(t);var o=n(259),r=n.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(u);t["default"]=r.a},259:function(e,t,n){}},[[252,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/user/info.js.map
|