糖尿病网pc端官网
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.
 
 
 
 
 

1 lines
16 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{732:function(e,t,n){var content=n(763);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(24).default)("ae7f4322",content,!0,{sourceMap:!1})},762:function(e,t,n){"use strict";n(732)},763:function(e,t,n){var o=n(23),r=n(39),c=n(42),d=o(function(i){return i[1]}),l=r(c);d.push([e.i,"*{border:none;margin:0;padding:0}html{height:100%}body{background:#fff;font-family:MicrosoftYaHei;font-size:0;min-height:100%;min-width:320px;position:relative}body .outer-container{min-width:1258px}body .outer-container.isMobile{min-width:auto}body .outer-container.isMobile .content-container{padding:60px 0 62px;width:100%}body .outer-container.isMobile .content-container .left-content{display:block!important;margin-right:0!important;width:100%!important}body .outer-container.isMobile .content-container .footer-outer{min-width:auto!important;position:absolute!important}body .outer-container.isMobile .content-container .load-more{width:100%!important}body .outer-container.isMobile .content-container .common-flex{display:block!important}body .outer-container.isMobile .content-container .common-other-content{margin:0!important}body .outer-container.isMobile .content-container .common-other-content h6{font-size:20px!important;line-height:28px!important;margin-bottom:10px!important}body .outer-container.isMobile .content-container .common-other-content .font-content b,body .outer-container.isMobile .content-container .common-other-content .font-content h5,body .outer-container.isMobile .content-container .common-other-content .font-content h6,body .outer-container.isMobile .content-container .common-other-content .font-content p{font-size:16px!important;line-height:24px!important;margin-bottom:8px!important;word-break:break-all}body .outer-container.isMobile .content-container .common-other-content .font-content h5{font-size:18px!important}body .outer-container.isMobile.hasLoginBottom{padding-bottom:calc(env(safe-area-inset-bottom) + 55px)}body .outer-container.isMobile.hasLoginBottom .bottom-outer,body .outer-container.isMobile.hasLoginBottom .footer-outer{bottom:calc(constant(safe-area-inset-bottom) + 55px);bottom:calc(env(safe-area-inset-bottom) + 55px)}body .outer-container.isMobile.hasLoginBottom .fixed-box{bottom:calc(constant(safe-area-inset-bottom) + 65px)!important;bottom:calc(env(safe-area-inset-bottom) + 65px)!important}body .content-container{margin:0 auto;width:1080px}body img{-o-object-fit:cover;object-fit:cover;vertical-align:top}body a{-webkit-text-decoration:none;text-decoration:none}body .text-ellipsis{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body .left-content{display:inline-block;margin-right:32px;width:723px}body .right-content{display:inline-block;float:right;width:325px}body .common-flex{display:grid;grid-template-columns:repeat(4,25%)}body .load-more{background:#f5f5f8;border-radius:4px;color:#939aa7;font-family:PingFangSC-Regular,PingFang SC;font-size:18px;font-weight:400;height:50px;line-height:50px;margin:0 auto;text-align:center;width:357px}body .footer-outer{background:#f5f5f8;bottom:0;left:0;min-width:1258px;position:fixed;width:100%;z-index:9}body .common-title{color:#001965;font-family:PingFangSC-Medium,PingFang SC;font-size:24px;font-weight:500;line-height:33px;padding:20px 0 10px;text-align:left}body .common-title a{color:#5d6269;float:right;font-family:PingFangSC-Regular,PingFang SC;font-size:16px;font-weight:400}body .common-title a i{color:#001965}body p.go-follow{background:#e6553f;border-radius:4px;color:#fff;cursor:pointer;font-family:PingFangSC-Medium,PingFang SC;font-size:18px;font-weight:500;height:50px;line-height:50px;margin-bottom:23px;text-align:center}body .common-other-content{box-sizing:border-box;margin:44px 0;padding:30px}body .common-other-content h6{color:#001965;font-family:PingFangSC-Medium,PingFang SC;font-size:24px;font-weight:500;line-height:33px;margin-bottom:20px}body .common-other-content .font-content b,body .common-other-content .font-content h5,body .common-other-content .font-content h6,body .common-other-content .font-content p{color:#5d6269;font-size:18px;line-height:30px;margin-bottom:12px}body .common-other-content .font-content h5{font-size:20px}body .el-message{top:50%!important}body .el-message i{font-size:16px}@media screen and (max-width:500px){body .el-message{max-width:80%;min-width:200px}}body .video-player-box .vjs-big-play-button{background:url("+l+") 50% no-repeat;background-color:transparent!important;background-size:68px 67px;border:none;height:67px;left:50%;outline:none;top:50%;transform:translate(-50%,-50%);width:68px}body .video-player-box .vjs-big-play-button .vjs-icon-placeholder:before{display:none}body .video-player-box .vjs-control-bar button{outline:none}body .el-avatar>img{width:100%}.user-setting-page{padding:36px 0 48px}.user-setting-page .top-box{background:#f5f5f8;height:259px;left:0;position:absolute;top:86px;width:100%}.user-setting-page>div:nth-child(2){background:#fff;border:1px solid #ededed;box-sizing:border-box;padding:36px 32px;position:relative}.user-setting-page>div:nth-child(2)>h6{color:#001965;font-size:24px;font-weight:400;line-height:31px;margin-bottom:32px}.user-setting-page>div:nth-child(2)>div{border-top:1px solid #ededed}.user-setting-page>div:nth-child(2)>div>div{border-bottom:1px solid #ededed;height:88px;padding-left:171px;position:relative}.user-setting-page>div:nth-child(2)>div>div>p:first-child{color:#5d6269;font-size:18px;left:0;line-height:88px;position:absolute}.user-setting-page>div:nth-child(2)>div>div>p:last-child{cursor:pointer;position:absolute;right:0}.user-setting-page>div:nth-child(2)>div>div:first-child .el-input{height:48px;margin-top:20px;width:361px}.user-setting-page>div:nth-child(2)>div>div:first-child .el-input .el-input__inner{background:#f5f5f8;border:none;color:#292b2c;font-size:18px;height:48px;line-height:24px;padding:0 18px}.user-setting-page>div:nth-child(2)>div>div:first-child>p:last-child{background:#005ad2;border-radius:4px;color:#fff;font-family:PingFangSC-Regular,PingFang SC;font-size:16px;font-weight:400;height:40px;line-height:40px;text-align:center;top:21px;width:90px}.user-setting-page>div:nth-child(2)>div>div:nth-child(2)>p:last-child,.user-setting-page>div:nth-child(2)>div>div:nth-child(4)>p:last-child{top:37px}.user-setting-page>div:nth-child(2)>div>div:nth-child(2)>p:last-child span,.user-setting-page>div:nth-child(2)>div>div:nth-child(4)>p:last-child span{color:#5d6269;font-family:PingFangSC-Regular,PingFang SC;font-size:16px;font-weight:400;line-height:22px}.user-setting-page>div:nth-child(2)>div>div:nth-child(2)>p:last-child span i,.user-setting-page>div:nth-child(2)>div>div:nth-child(4)>p:last-child span i{color:#005ad2}.user-setting-page>div:nth-child(2)>div>div:nth-child(3)>p:last-child{top:21px}.user-setting-page>div:nth-child(2)>div>div:nth-child(3)>p:last-child .el-switch{height:30px}.user-setting-page>div:nth-child(2)>div>div:nth-child(3)>p:last-child .el-switch .el-switch__core{border:none;border-radius:15px;height:30px}.user-setting-page>div:nth-child(2)>div>div:nth-child(3)>p:last-child .el-switch .el-switch__core:after{border-radius:12px;height:24px;left:3px;top:3px;width:24px}.user-setting-page>div:nth-child(2)>div>div:nth-child(3)>p:last-child .el-switch.is-checked .el-switch__core:after{left:100%;margin-left:-27px}.isMobile .user-setting-page{padding:0}.isMobile .user-setting-page .top-box{display:none}.isMobile .user-setting-page>div:nth-child(2){border:none;padding:0}.isMobile .user-setting-page>div:nth-child(2)>h6{display:none}.isMobile .user-setting-page>div:nth-child(2)>div>div{display:flex;height:60px;padding:0 15px}.isMobile .user-setting-page>div:nth-child(2)>div>div>p:first-child{font-size:16px;line-height:60px;margin-right:10px;position:relative}.isMobile .user-setting-page>div:nth-child(2)>div>div>p:last-child{right:15px}.isMobile .user-setting-page>div:nth-child(2)>div>div:first-child .el-input{height:40px;margin-top:10px;width:calc(100% - 130px)}.isMobile .user-setting-page>div:nth-child(2)>div>div:first-child .el-input .el-input__inner{height:40px;padding:0 10px}.isMobile .user-setting-page>div:nth-child(2)>div>div:first-child>p:last-child{font-size:15px;height:40px;top:10px;width:70px}.isMobile .user-setting-page>div:nth-child(2)>div>div:nth-child(2)>span{border-radius:20px;height:40px!important;margin-top:10px!important;width:40px!important}.isMobile .user-setting-page>div:nth-child(2)>div>div:nth-child(2)>p:last-child,.isMobile .user-setting-page>div:nth-child(2)>div>div:nth-child(4)>p:last-child{top:17px}.isMobile .user-setting-page>div:nth-child(2)>div>div:nth-child(3)>p:last-child{top:15px}.isMobile .user-setting-page~.bottom-outer{display:none}",""]),d.locals={},e.exports=d},793:function(e,t,n){"use strict";n.r(t);n(28),n(29),n(43),n(44),n(27),n(16),n(30);var o=n(15),r=n(9),c=(n(35),n(54),n(33));function d(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){Object(o.a)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var h={name:"UserIndexPage",layout:"detail",middleware:"authenticated",asyncData:function(e){return Object(r.a)(regeneratorRuntime.mark(function t(){var n,o,data;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.$axios,o=e.req,t.abrupt("return");case 1:return t.next=2,n.$get("/user/recommend-state",n.genSSROptions(o));case 2:return data=t.sent,t.abrupt("return",l({},data.detail));case 3:case"end":return t.stop()}},t)}))()},data:function(){return{inSaveName:!1,inSaveImg:!1,inChangeRecommend:!1,withdrawDialogVisible:!1,confirmDialogVisible:!1,inWithdraw:!1}},head:{title:"糖尿病网-个人设置",meta:[{hid:"description",name:"description",content:""}]},computed:l(l({},(0,Object(c.a)("user").mapState)({userInfo:function(e){return e.info}})),{},{userName:function(){return null!==this.userInfo&&null!==this.userInfo.name&&""!==this.userInfo.name?this.userInfo.name:""},userImg:function(){return null!==this.userInfo&&null!==this.userInfo.headimg&&""!==this.userInfo.headimg?this.userInfo.headimg:"https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"},deviceType:function(){return this.$store.state.device.deviceType}}),mounted:function(){this.baiduStat("账户设置页","show","账户设置页-访问")},methods:{changeName:function(e){this.$store.commit("user/setUserInfo",{name:e})},saveName:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark(function t(){var data;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log(e.userName),""===e.userName){t.next=4;break}if(!e.inSaveName){t.next=1;break}e.$message({message:"您的操作太快了",type:"warning"}),t.next=3;break;case 1:return e.baiduStat("账户设置页","click","账户设置-修改昵称"),e.inSaveName=!0,t.next=2,e.$axios.$post("/user/modify-name",{username:e.userName});case 2:(data=t.sent)&&data.success?e.$message({message:"修改成功",type:"success"}):e.$message.error(data.msg?data.msg:"修改失败"),e.inSaveName=!1;case 3:t.next=5;break;case 4:e.$message({message:"请输入昵称",type:"warning"});case 5:case"end":return t.stop()}},t)}))()},getFile:function(e,t){var n=this;return Object(r.a)(regeneratorRuntime.mark(function t(){var param,data;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n.baiduStat("账户设置页","click","账户设置-修改头像"),(param=new FormData).append("fileid",e.raw),n.inSaveImg=!0,t.next=1,n.$axios.$post("/user/modify-headimg",param,{headers:{"Content-Type":"multipart/form-data"}});case 1:(data=t.sent)&&data.success?(n.$message({message:"修改成功",type:"success"}),n.$store.commit("user/setUserInfo",{headimg:data.detail.headImgUrl})):n.$message.error(data.msg?data.msg:"修改失败"),n.inSaveImg=!1;case 2:case"end":return t.stop()}},t)}))()},beforeAvatarUploadImg:function(e){var t="image/jpeg"===e.type,n="image/png"===e.type,o=e.size/1024/1024<6;return t||n||this.$message.warning("上传图片只能是 JPG或PNG 格式!"),o||this.$message.warning("上传图片大小不能超过 6MB!"),(t||n)&&o},changeRecommend:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark(function t(){var data;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return console.log(e.open_recommend),e.inChangeRecommend=!0,t.next=1,e.$axios.$post("/user/recommend-state");case 1:(data=t.sent)&&data.success?(e.$message({message:"修改成功",type:"success"}),e.open_recommend=1===data.detail.user_recommend,e.baiduStat("账户设置页","click","账户设置-开启个性化推荐-"+(1===data.detail.user_recommend?"打开":"关闭"))):(e.open_recommend=!e.open_recommend,e.$message.error(data.msg?data.msg:"修改失败")),e.inChangeRecommend=!1;case 2:case"end":return t.stop()}},t)}))()},withdrawAccount:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark(function t(){var data;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.inWithdraw){t.next=1;break}e.$message({message:"您的操作太快了",type:"warning"}),t.next=3;break;case 1:return e.baiduStat("注销账户弹窗","click","注销账户弹窗-提交注销申请"),e.inWithdraw=!0,t.next=2,e.$axios.$post("/user/unRegister");case 2:(data=t.sent)&&data.success?e.$message({message:"注销申请提交成功",type:"success"}):e.$message.error(data.msg?data.msg:"注销申请提交失败"),e.inWithdraw=!1,e.confirmDialogVisible=!1;case 3:case"end":return t.stop()}},t)}))()}}},m=(n(762),n(13)),component=Object(m.a)(h,function(){var e=this,t=e._self._c;return t("div",{staticClass:"user-setting-page"},[t("div",{staticClass:"top-box"}),e._v(" "),t("div",[t("h6",[e._v("账号设置")]),e._v(" "),t("div",[t("div",[t("p",[e._v("昵称")]),e._v(" "),t("el-input",{attrs:{value:e.userName,placeholder:"请输入昵称"},on:{input:e.changeName}}),e._v(" "),t("p",{on:{click:e.saveName}},[t("span",[e._v("保存")])])],1),e._v(" "),t("div",[t("p",[e._v("头像")]),e._v(" "),t("el-avatar",{staticStyle:{"margin-top":"20px"},attrs:{size:48,src:e.userImg}}),e._v(" "),t("p",[t("el-upload",{staticClass:"upload-demo",attrs:{action:"string","auto-upload":!1,"show-file-list":!1,"on-change":e.getFile,"before-upload":e.beforeAvatarUploadImg}},[t("span",[e._v("编辑"),t("i",{staticClass:"el-icon-caret-right"})])])],1)],1),e._v(" "),t("div",[t("p",[e._v("开启个性化推荐")]),e._v(" "),t("p",[t("el-switch",{attrs:{width:60,"active-color":"#005AD2",disabled:e.inChangeRecommend,"inactive-color":"#939AA7"},on:{change:e.changeRecommend},model:{value:e.open_recommend,callback:function(t){e.open_recommend=t},expression:"open_recommend"}})],1)]),e._v(" "),t("div",[t("p",[e._v("注销账号")]),e._v(" "),t("p",{on:{click:function(t){e.baiduStat("账户设置页","click","账户设置-注销账号"),e.withdrawDialogVisible=!0}}},[e._m(0)])])])]),e._v(" "),t("BottomRightFixed"),e._v(" "),t("el-dialog",{attrs:{center:!0,"show-close":!1,title:"注销账户",visible:e.withdrawDialogVisible,width:"pc"===e.deviceType?"400px":"280px"},on:{"update:visible":function(t){e.withdrawDialogVisible=t}}},[t("span",[e._v("如果你想注销账号,请点击下方按钮进行申请,我们将于收到信息后的30天内完成注销流程。")]),e._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"danger"},on:{click:function(t){e.withdrawDialogVisible=!1,e.confirmDialogVisible=!0}}},[e._v("提交申请")])],1)]),e._v(" "),t("el-dialog",{attrs:{center:!0,"show-close":!1,title:"确定要注销账户吗?",visible:e.confirmDialogVisible,width:"pc"===e.deviceType?"400px":"280px"},on:{"update:visible":function(t){e.confirmDialogVisible=t}}},[t("span",[e._v("注销操作申请后将无法撤销,您的账户信息将永久清除。")]),e._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"danger"},on:{click:e.withdrawAccount}},[e._v("确认")]),e._v(" "),t("el-button",{attrs:{type:"info"},on:{click:function(t){e.confirmDialogVisible=!1}}},[e._v("取消")])],1)])],1)},[function(){var e=this._self._c;return e("span",[this._v("申请"),e("i",{staticClass:"el-icon-caret-right"})])}],!1,null,null,null);t.default=component.exports;installComponents(component,{BottomRightFixed:n(464).default})}}]);