123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- var userAgent = window.localStorage.getItem(agentName);
- var firstUid = window.localStorage.getItem("firstUid");
- var d1 = dialog({contentType:'load', skin:'bk-popup',content:'退出中..'});
- var jsonstr = $.parseJSON(userAgent);
- var openid = jsonstr.openid;
- if(firstUid == null || firstUid == undefined){
- $('.div-qiehuan-account').hide()
- }
- appendFamilyMember($('#memberContainer'), function() {
- var jsonstr = $.parseJSON(window.localStorage.getItem(agentName));
- if(jsonstr.uid == jsonstr.represented) {
- $('.div-qiehuan-account').show()
- } else {
- $('.div-qiehuan-account').hide()
- }
- }, function() {
- //判断有授权家人,修改样式
- if($('#memberContainer').is(':hidden')) {
- $('#content').css('padding-top', '0px');
- } else {
- $('#content').css('padding-top', '90px');
- }
- });
- function goPage(url){
- window.location.href = url
- }
- function logout(){
- dialog({
- content:'您确定继续退出登录吗?',
- ok: function (){
- d1.show()
- sendPost("patient/wxloginout",{},"JSON","POST",function(res){
- d1.close()
- if (res && res.msg) {
- dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:res.msg}).show();
- } else {
- dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'退出登录失败!'}).show();
- }
- },function(res){
- d1.close()
- if(res.status==200){
- clearAgent();
- window.localStorage.removeItem("isTiXingVideoFaSong");//清除咨询详情移动网络下,用户点击不再提醒后的处理,换账号登陆后,还可以重新提醒
- var url = window.location.href;
- saveAgentPage(url);
- location.replace("../../home/html/login.html?openid="+openid+"&loginType=password");
- }else{
- if (res && res.msg) {
- dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:res.msg}).show();
- } else {
- dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'退出登录失败!'}).show();
- }
- }
- })
-
- },
- cancel: function () {
- return;
- }
- }).showModal();
- }
|