|
@@ -1274,9 +1274,31 @@ $(function () {
|
1274
|
1274
|
}
|
1275
|
1275
|
//注销
|
1276
|
1276
|
function logout() {
|
1277
|
|
- sessionStorage.removeItem('loginUser');
|
1278
|
|
- sessionStorage.removeItem('repair_main');
|
1279
|
|
- location.href = 'http://' + location.hostname + ':8080/pcreq_logout.jsp';
|
|
1277
|
+ //单点登录
|
|
1278
|
+ if (sessionStorage.getItem('isSSo') === '1') {
|
|
1279
|
+ sessionStorage.removeItem('loginUser');
|
|
1280
|
+ sessionStorage.removeItem('repair_main');
|
|
1281
|
+ sessionStorage.removeItem('isSSo');
|
|
1282
|
+ location.href = 'http://' + location.hostname + ':8080/pcreq_logout.jsp';
|
|
1283
|
+ } else {
|
|
1284
|
+ $.ajax({
|
|
1285
|
+ type: 'POST',
|
|
1286
|
+ contentType: "application/json;charset=UTF-8",
|
|
1287
|
+ url: baseUrl + "auth/logout2",
|
|
1288
|
+ data: JSON.stringify({}),
|
|
1289
|
+ success: function (res) {
|
|
1290
|
+ if (res.status == 200) {
|
|
1291
|
+ sessionStorage.removeItem('loginUser');
|
|
1292
|
+ sessionStorage.removeItem('repair_main');
|
|
1293
|
+ sessionStorage.removeItem('isSSo');
|
|
1294
|
+ window.location.href = 'login.html';
|
|
1295
|
+ }
|
|
1296
|
+ },
|
|
1297
|
+ error: function (err) {
|
|
1298
|
+ console.log(err)
|
|
1299
|
+ }
|
|
1300
|
+ })
|
|
1301
|
+ }
|
1280
|
1302
|
}
|
1281
|
1303
|
//图片上传
|
1282
|
1304
|
function addImgList(id, data) {
|