|
|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["subPackages/user/profile"],{154:function(e,t,n){"use strict";(function(e,t){var o=n(4);n(26);o(n(25));var i=o(n(155));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},155:function(e,t,n){"use strict";n.r(t);var o=n(156),i=n(158);for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n(160);var r,s=n(32),c=Object(s["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"88bf8616",null,!1,o["components"],r);c.options.__file="subPackages/user/profile.vue",t["default"]=c.exports},156:function(e,t,n){"use strict";n.r(t);var o=n(157);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"]}))},157:function(e,t,n){"use strict";var o;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return r})),n.d(t,"recyclableRender",(function(){return a})),n.d(t,"components",(function(){return o}));try{o={uniPopup:function(){return n.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(n.bind(null,292))}}}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 i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.info?e.showImg(e.info.avatar):null);e._isMounted||(e.e0=function(t){e.showSexSelect=!0},e.e1=function(t){return e.$refs.popup.open()},e.e2=function(t){return e.$refs.popup.close()}),e.$mp.data=Object.assign({},{$root:{m0:n}})},a=!1,r=[];i._withStripped=!0},158:function(e,t,n){"use strict";n.r(t);var o=n(159),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},159:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(143);var o={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 t=this,n=new Date;n=n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate(),this.today=n,this.Post({},"/api/user/getUserDetails").then((function(n){if(!n.data.birthday){var o=new Date;n.data.birthday=o.getFullYear()+"/"+(o.getMonth()+1)+"/"+o.getDate()}t.info=n.data,t.nickname=t.info.nickname,t.email=t.info.email,t.birthday=t.info.birthday,t.gender=t.info.gender,t.info.token=JSON.parse(e.getStorageSync("userInfo")).token||t.$store.state.user.userInfo.token,console.log(t.info),t.$store.commit("changeUserInfo",t.info)}))},uploadImg:function(){var t=this,n=this.NEWAPIURL;n+="/api/Common/upload",e.chooseImage({count:1,success:function(o){var i=o.tempFilePaths;e.uploadFile({url:n,filePath:i[0],name:"file",success:function(e){try{var n=JSON.parse(e.data);1==n.code&&(t.info.avatar=n.data.url)}catch(o){}},fail:function(){e.showToast({title:"上传失败",icon:"none"})}})},fail:function(){e.showToast({title:"上传失败",icon:"none"})}})},bindDateChange:function(e){this.birthday=e.detail.value},getDate:function(e){var t=new Date,n=t.getFullYear(),o=t.getMonth()+1,i=t.getDate();return"start"===e?n-=60:"end"===e&&(n+=2),o=o>9?o:"0"+o,i=i>9?i:"0"+i,"".concat(n,"/").concat(o,"/").concat(i)},changesex:function(e){this.gender=this.sexes[e].value,this.$refs.popup.close()},submit:
|